PASCAL ANALYZER
Pascal Analyzer parses Delphi or Borland
Pascal source code. It builds large internal tables of identifiers, and collects other
information such as calls between subprograms. When the parsing is completed, extensive
reports are produced. These reports contain a great deal of important information about
the source code. This information will help you understand your source code better, and
assist you in producing code of higher quality and reliability.
For a real world example of what PAL can do with your source code, visit
TurboControl and
download sample PAL reports for the Async Professional toolkit from TurboPower.
View a screenshot of the main screen in Pascal Analyzer.
For a full reference, see the documentation page or the
online documentation.
Pascal Analyzer provides a full collection of useful informative reports to both
control and document the source code. These 44 reports are divided into five groups:
General Reports
Status Report
Strong Warnings Report
Warnings Report
Optimization Report
Memory Report
Code Reduction Report
Convention Compliance Report
Inconsistent Case Report
Prefix Report
Metrics Reports
Totals Report
Complexity Report
Object-oriented Metrics Report
Reference Reports
Modules Report
Identifiers Report
Duplicate Identifiers Report
Literal Strings Report
Subprogram Index Report
Bindings Report
Third-party Dependencies Report
Most Called Report
Call Tree Report
Reverse Call Tree Report
Call Index Report
Brief Cross-reference Report
Cross-reference Report
Directives Report
To-Do Report
Module Call Tree Report
Conditional Symbols Report
Used Outside Report
Uses Report
Class Reports
Class Index Report
Class Summary Report
Class Hierarchy Report
Class Field Access Report
Control Reports
Control Index Report
Control Alignment Report
Control Size Report
Control Tab Order Report
Control Warnings Report
Property Value Report
Missing Property Report
Form Report
Events Report
General Reports
Status Report
PAL always generates this report, regardless of any setting. It presents important facts
about the current analysis, e.g. selected compiler directives and searched folders.
Strong Warnings Report
This report generates warnings that help you identify especially severe errors.
Those are errors that can cause runtime failures ("showstoppers"), or erroneous results in your application.
Warnings Report
This report consists of several lists with different types of warnings. The warnings point
to possible anomalies and errors in the code.
Optimization Report
This report pinpoints elements of the code that you can improve, resulting in better
performance.
Memory Report
This report helps you find locations in your code with possible memory leaks.
Code Reduction Report
This report pinpoints locations in your code where unnecessary code could be deleted,
resulting in a smaller amount of code to maintain and search for errors.
Convention Compliance Report
This report contains several lists of identifiers that do not comply with the conventions
for naming of identifiers.
Inconsistent Case Report
This report that lists all identifiers with inconsistent case. If for instance,
the identifier tblEmployee is declared, and it is written as tblemployee
in other locations, those places in the code are listed.
Prefix Report
This report contains a list with variables that have a different prefix than the defined ones.
For instance you can decide that all TLabel variables must start with the letters 'lbl'.
Labels that don't will then be listed by this report.
Metrics Reports
Totals Report
This report provides a table that summarizes the number of files, procedures, functions,
types etc, in the analyzed source code. It also shows how many of each category that are
global, interfaced and unused.
Complexity Report
The Complexity Report lists for each unit and subprogram some important metrics.
Total Lines
Lines of Code (LOC)
Comment Lines
Comments/Total Lines
Decision Points (DP)
Decision Points/Lines of Code (DP/LOC)
Characters/Lines of Code
These metrics can help you evaluate source code in terms of understandability, complexity,
and reusability. You can also locate complex subprograms that should be split up.
PAL also creates a list of all identifiers with names that are longer than 15 (default)
characters.
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.
Reference Reports
Modules Report
All modules are listed, indicating whether the corresponding source file was found or not.
For the modules found, PAL reports the following data:
Lines
Size
Date
Time
Path
Identifiers Report
This report writes a table listing all the identifiers in the program indicating their
type and location. Use this as an index for your source code, and to locate a specific
identifier.
Duplicate Identifiers Report
This report produces a list of all identifiers that share the same name. Even if it is
legal to duplicate identifier names, it may sometimes be confusing, and lead to bugs that
are hard to find.
Literal Strings Report
This report creates a list of all literal strings, both those declared as constants and
those that are immersed in the code. You may use this report to locate and document all
strings, for instance when translating your program to another language.
Subprogram Index Report
This report produces an index of all subprograms. Procedures, functions, constructors,
destructors, and methods are reported. The indentation at the beginning of each line
indicates which routines are nested within each another. This report helps you quickly
locate any subprogram in your source code.
Bindings Report
This report produces a list of all subprograms (functions/procedures) in your source code.
For each subprogram it documents all outside subprograms, variables etc that are
referenced (used) by the subprogram. This gives a measure of how dependent a subprogram is
of other code. Subprograms that have few bindings are more generic and stand-alone.
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.
Most Called Report
This report lists, in descending order, the subprograms that are most often called.
Call Tree Report
Source code consists of calls from subprograms to other subprograms. From these
subprograms, other subprograms are called. These calls form call trees.
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.
Call Index Report
This report is similar to the Call Tree Report. For every subprogram, it lists which other
subprograms that are called. In addition, it lists all calls from other subprograms to the
particular subprogram.
Brief Cross-reference Report
This report lists for each identifier, all locations where it is referenced and set.
Cross-reference Report
This report lists for each identifier, all locations where it is referenced and set. The
layout is more spacious than in the Brief Cross-reference Report, but the content is
equivalent.
Directives Report
This report displays information about various directives (like "deprecated").
To-Do Report
This report displays information about To-Do items that are entered in the source code or by the IDE.
Module Call Tree Report
This report shows a call tree for modules. It shows how modules "use" each other
by inclusion in the uses lists in the interface and implementation sections.
Conditional Symbols Report
This report lists locations where a $DEFINE/$UNDEF or $IFDEF/$IFNDEF directive
is unnecessarily repeated.
Used Outside Report
For each unit, every identifier is listed that is referenced from another units. This
gives a measurement of how general the unit is.
Uses Report
This report lists all units that PAL finds. For each unit, the uses statements are
analyzed. The units specified in these clauses are reported, indicating whether they are
actually used.
Class Reports
Class Index Report
This report presents important facts about each class in the class hierarchy.
Class Summary Report
This report gives for each class a table of the methods, how many are static, inherited
etc.
Class Hierarchy Report
This report creates a hierarchical list of all classes. Use this list to get an
understanding of the class hierarchy in the source code.
Class Field Access Report
This is a list of all class fields that are accessed directly from the outside. This means
that they are not accessed by means of a property. OOP purists consider this bad practice,
and you should avoid this.
Controls Reports
Control Index Report
This is a list of all controls that are included in form files (DFM-files). You may use
this report as an index to the controls.
Control Alignment Report
This report gives a list of the alignment of the controls. You may use this report to
detect cases of incorrect alignment between controls.
Control Size Report
This report gives a list of the controls and their sizes. You may use this report to
detect unwanted size differences.
Control Tab Order Report
This report lists all controls that possibly have an incorrect tab order. Normal tab order
is considered as left to right, up down.
Control Warnings Report
This report presents several lists, helping you spot possible errors in your form files.
Property Value Report
This report shows values for selected properties in your Delphi forms.
For instance, it can show every value of the Caption property for all controls of type TButton.
You can use this report to document your property settings, or to spot bad values.
Missing Property Report
This 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.
Form Report
This report shows important properties for your Delphi forms.
Events Report
This report documents how events are linked to controls. You can use it to get an overview
of events in your application.
ICARUS
ICARUS parses Delphi or Borland
Pascal source code and generates a Uses Report. This report will help you remove
unneeded units from your uses lists. You will also know which units that can be moved
from the interface uses list to the implementation uses list.
Removing unused uses references has multiple benefits:
- cleaner code to maintain, no need to bother about code that is not used
- code from initialization and finalization sections in unused units is not
linked in, reducing the size of the final EXE
- compilation runs smoother and quicker
ICARUS is very easy to use, just select a source file, set a few options, and
start analyzing. Or let the built-in wizard guide you through this process.
ICARUS is freeware. Get it from our download page!
According to Greek mythology, Icarus (greek: Ikaros) was the son of Daedalus
who to escape imprisonment flies by means of artificial wings.
He falls into the sea and drowns when the wax of his wings
melts as he flies too near the sun.
© Copyright 2001-2007 Peganza
All product names are trademarks or registered trademarks of their respective owners.