What's new in Pascal Analyzer 3?

This section describes changes and new features in Pascal Analyzer version 3. Generally a lot of work has been done in order to reduce the number of false warnings and listings, and to further raise the quality. But there is also a great number of new features that make this the biggest upgrade ever of Pascal Analyzer:

Projects
Version 3 of Pascal Analyzer introduces a new project concept. A project is linked to a main file and keeps settings for an analysis. To run an analysis for a particular set of source code, you must first create a project. Projects allow you to use different options for different source code. Of course it is also possible to create several projects for the same source code, but with different options. Project data is stored in files with the extension “pap”, for example in a file named MyProject.pap. There is also a default folder where projects are saved. Initially this is the “\Projects” folder just under the application folder.

Multi-projects
Multi-projects consist of two or more “normal” Pascal Analyzer projects. When the multi-project is run, these projects are analyzed sequentially. The generated reports will reveal mutual facts about all these projects. Multi-projects are particularly suitable for analyzing common modules that are used by many projects. Multi-projects are stored in files with the extension “pam”, for example MyMultiProject.pam.

Selectable report sections
You can select for each report which sections that will be generated. In this way you can reduce the amount of data generated for the reports and concentrate on the details that you really need.

Project templates
Any project or multi-project can be saved as a template for new projects. When a new project is created, the options will be initialized according to the template.

New source code selection option
In previous versions of PAL you could parse and analyze either only the main file or all files that were found. In this version there is a new third option: “Main file and directly used”. For example, if you select a Delphi project (DPR-file), this option would result in the main file and only those units listed in the uses statement of the DPR-file, would be parsed and analyzed. Units listed in any of the referenced units interface and implementation uses statements would not be parsed. This option will let you select only those files that really are important for your project. It is also the new default selection.

New enhanced report tree
The report tree in the main window has been enhanced. It now also lists the selected sections for every report. For each section there is information about the number of reported items. If one or more sections are turned off (not selected), information about this is written in the report caption. You can right-click and select a popup menu and expand or collapse the tree.

New sections in Identifiers Report
There are two new sections in the Identifiers Report, titled “Global Variables” and “Module Global variables”. The first of these lists variables that are globally declared in unit interface parts. The second new section lists variables that are globally declared in the unit implementation parts. It is desirable to keep the number of global variables as low as possible to reduce the risk of undesired side-effects.

Support for Delphi .NET
The new Delphi 8 and Delphi 2005 products compiles code targeted for Microsoft’s new .NET framework. This version of PAL also parses and analyzes code written for this new platform. PAL is however not a .NET application, it is still an ordinary Win32 application. All new language features in Delphi 8 and Delphi 2005 are supported, like for example dotted unit names, namespaces, nested type declarations and class helpers. Of course Pascal Analyzer still supports older versions of Borland’s compiler, all the way from Borland Pascal 7 up to now Delphi 8.

Dotted unit namnes, like “unit My.Utils” were unofficially supported by Delphi 7. This is also implemented in PAL, so if you select Delphi 7 as your compiler target, dotted unit names can be used.

New Missing Property Report
This new report is similar to the Property Value Report. You specify one or more types and properties that you want to monitor with this report, for example the class type TLabel and its Caption property. This report will then present a list of all occurencies in DFM-files, where a TLabel exists, but where the Caption property has not been set.

New Reverse Call Tree Report
This report produces an outline of the call structure of your program, like the Call Tree Report. But it does so in reverse order. This means it starts with the subprograms that are only called, and that not call any other subprograms. This report can help you get a better understanding of how your low-level routines are used.

New Events Report
This report documents how events are linked to controls. You can use it to get an overview of events in your application.

New Object-oriented metrics Report
This report calculates six different metrics according to Chidamber and Kemerer’s metrics suite for object-oriented design. These metrics are calculated for each class. With the help of these metrics you can get a better understanding of your classes.

New Third-party dependencies Report
This report shows the dependency on third-party code. It shows which folders, units and identifiers that are referenced from code in the main file folder. It is often desirable to keep the dependency on third-party code as low as possible.

New section in Literal Strings Report
There is a new section in the Literal Strings Report that lists literal strings that could be replaced with constants or resourcestrings.

New section in Complexity Report
There is a new section in the Complexity Report titled “Most Parameters per Subprogram”. This section lists subprograms with the most number of parameters. A high number of parameters may indicate that the subprogram is too large or does too much.

New section in Warnings Report
There is a new section in the Warnings Report titled “Dangerous Raise”. This section lists locations where a stray raise command may have been left behind.

Uses Report enhancements
The Uses Report now marks units that have initialization sections. It is often desirable to keep those units in the uses lists, even if they are not formally needed, in order to execute the initialization code. There is also a new section titled “Runtime Initialization Order”. This section lists the order in which the initialization sections are executed at runtime.

Miscellaneous
The help system and tutorial have been enhanced and updated. Menus and toolbar buttons now use the new Windows XP style.