|
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.
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 (or PALWIZ2.DLL and PALWIZ3.DLL for Delphi 2009 and later), 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:
Although PAL does not run under the Linux operating system, it can still be used to analyze code written for 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 - Embarcadero/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
See also:
How to use PAL.EXE Command Line Options for PAL.EXE
__________________________________________________________
Copyright © Peganza 2001-2010. All rights reserved. All product names are trademarks or registered trademarks of their respective owners.
Web site: www.peganza.com Email: info@peganza.com |