Introduction

Top  Next

Pascal Analyzer, or PAL for short, is a utility program that analyzes, documents, debugs, and helps you optimize your source code. Pascal Analyzer makes a static code analysis. It only needs the source code unlike other similar tools that perform an analysis of the running program. It is our belief that it will help you better understand your code and support you in producing code of higher quality, consistency, and reliability.

 

PAL quickly pays itself back in easier maintenance, less errors and improved quality, not only during development, but also throughout the entire life cycle of your code.

 

clip0014

The main window in Pascal Analyzer

 

PAL comes as two separate EXE files, which are used independently of each other:

 

PAL.EXE        – the main Windows program with a friendly user interface

PALCMD.EXE        – a command-line analyzer

 

The command-line analyzer produces exactly the same reports as the GUI version.

You will however most often use the friendly user interface in PAL.EXE. For running analyses in batch mode or to integrate into a build process, use PALCMD.EXE.

 

There is also a Delphi IDE plug-in, PALWIZ.DLL, to enable the IDE to load a source file when double-clicking on a report line in Pascal Analyzer. The plug-in is automatically installed and enabled. You can enable/disable the plug-in from the Preferences dialog. The plug-in works with Delphi 5 and later versions.

 

Pascal Analyzer functions with Pascal/Delphi Compilers from BP7 and later:

 

Borland Pascal 7 (or earlier)
Delphi 1
Delphi 2
Delphi 3
Delphi 4
Delphi 5
Delphi 6
Delphi 7
Delphi 8 for .NET
Delphi 2005 for Win32
Delphi 2005 for .NET
Delphi 2006 for Win32 (also Turbo Delphi for Win32)
Delphi 2006 for .NET   (also Turbo Delphi for .NET)
Delphi 2007 for Win32
Delphi 2007 for .NET

 

Although PAL does not run under the Linux operating system, it can still be used to analyze code written for Borland Kylix, which in essence is Delphi for Linux. Just make sure to select XFM as the file extension for form files and set a few conditional directives. 

 

PAL parses your source code in the same way as the compiler. It builds large data tables in memory and when the parsing is finished, produces an assortment of reports. These reports hold plenty of useful information that can help you error-proof your applications.

 

Be forewarned that PAL occasionally needs a lot of memory (RAM). The amount of memory needed is proportional to the number of code lines and modules in the examined project.

 

In addition to common cross-reference reports, PAL produces reports that show which units are used, which identifiers are unused and so on. It also calculates industry standard metrics such as lines of code (LOC) and decision points (DP), and much more..

 

Pascal Analyzer generates reports as either ordinary text files, HTML or XML files. Text files are quicker to access from inside PAL than HTML files. However, the real advantages of HTML files are the possibilities to customize the layout. XML files are valuable when for instance transferring PAL data to a database or other tool for further processing.

 

 

Projects

 

To analyze a particular set of source code with Pascal Analyzer, you must first create a project. Do not confuse a Pascal Analyzer project with a Delphi project, they are completely different things. The project holds the options for the analysis and lets you conveniently use separate options for different sets of source code. Projects are saved as text files with the extension “pap”, like for example a file with the name MyProj.pap. The format of the files is equivalent to that of an INI file. It is possible to inspect and edit the project files in a normal text editor, although not recommended.

 

 

Multi-projects

 

Multi-projects are essentially collections of Pascal Analyzer projects (see above). In a way they are similar to Delphi project groups (*.bpg-files), in that they both reference other projects. When a multi-project is run, the included projects are analyzed sequentially. The reports that are generated contain mutual facts about these projects. Multi-projects are saved as text files with the extension “pam”, like for example a file with the name MyMProj.pam. The format of the files is equivalent to that of an INI file.

 

A subset of all reports and sections are generated for a multi-project:

 

Warnings Report

 

- Interfaced identifiers that are used, but not outside of unit

- Interfaced class identifiers that are public/published, but not used outside of unit

 

Optimization Report

 

- Virtual methods (procedures/functions) that are not overridden

 

Reduction Report

 

- Identifiers never used

- Functions called only as procedures (result ignored)

- Functions/procedures (methods excluded) only called once

- Methods only called once from other method of the same class

 

Uses Report

 

- Units used by the projects

- Units used by all projects

- Unit references

 

 

Special thanks to

 

- Borland, for giving us Delphi, the most productive programming environment ever

- CodeGear, for continuing Borland's work

 

- JEDI Code Library (JCL), a great utility library for Delphi developers, see http://www.delphi-jedi.org/

 

- FinalBuilder, a highly recommended solution to build your projects in a safe way, see http://www.finalbuilder.com

 

- TDMWeb for hosting our web site, see http://www.tdmweb.com

 

- glyFX (http://www.glyfx.com); many of our graphical elements are from their excellent glyph collections. Highly recommended!

 

- Ozmosys for providing Knowledge Base, a software developer’s repository. Lets you organize and store important information, see http://www.ozmosys.net.au

 

- XanaduTools for providing Easy To-Do, a small utility to manage your to-do lists. We used it extensively to handle the lists of small and large things that had to be done in order to finish the product and bring it to market. Surf to http://www.xanadutools.com

 

 

See also:

 

 

__________________________________________________________

 

Copyright © Peganza 2001-2007. All rights reserved. All product names are trademarks or registered trademarks of their respective owners.

 

Web site:        www.peganza.com

Email:                info@peganza.com