Introduction

## Generating Reports with repada

The primary tool for creating and building Understand for Ada reports is repada. It is a command line program that uses the database created by undada to build reports about the analyzed software.

The command line syntax for repada is:

repada -db database_name [options]

Option | Explanation
--- | ---
-db <database_name> | Specify the Understand for Ada database to be used to create reports. This is the database created by analyze_ada.
-test output_file | Specify the output file name. Use this option to create an ASCII output file containing all reports. Cannot be used in conjunction with -prefix or -html options.
-separate prefix_filename | Used to break each report into a separate ASCII file. The prefix_filename is pre-pended to each generated file. See Extensions used by the -separate option. This option may not be used if -html or -o options are used.

-html html_directory

Use this option to generate HTML versions of the reports. If the directory specified by html_directory exists, it is used, if not it is created. The "home" file of the directory is index.html.
Also specify one of the options -htmlall, -htmlalpha, or -htmlsplit to specify if and how the html files are to be split up. The -html option may not be used if -text or -prefix is used.

-htmlall | Use this option to specify that each html report is to be kept in one html file. Using this option on large projects may cause html browser problems when loading large files.
-htmlalpha | Generate multiple files for each html report, splitting up the files alphabetically by the first character of each entity name. The "home" file of the directory is index.html. This is the default.
-htmlsplit n | Generate multilple files for each html report, splitting up the files into "n" entities per file. By default, the report is split into 500 entities per file. The "home" file of the directory is index.html.
-l library_name... | Use this option to specify which library or set of libraries within the database are to be reported. Multiple libraries may be specified, separated by a space. No reports are generated if a library name is invalid. If this option is not specified then "Application" is assumed. See Example: Using Libraries to Partition Analysis for information about libraries.
-metrics filename | Export metrics information to a comma delimited file of name "filename"
-help [reports] [format] | Provides on-line guidance for command line syntax. Used as just -help only provides non-report selection guidance. If used as "-help reports" then a list of report generation options is provided. When used as "-help format" provides a list of report format options.
-quiet | Run quietly (don't output message about what report is being generated and so on). This option is useful when using repada in cron jobs or other batch creation situations.
[report options] | repada offers a variety of reports, these options are used to turn reports on or off. See Choosing Reports for details.

### Choosing Reports

By default, all reports are turned on. However, you control what reports are generated either by turning them off individually, or by turning them all off and then on individually. For instance, this line would turn off just the complexity report:

repada -db myproject -html html -rep_complexity off

Alternately, if you wished to just see the complexity report you could turn off all others and then choose just the complexity report:

repada -db myproject -html html -rep_complexity on

The usage extensions for choosing reports to repada are shown in the table below.

Option | Explanation
--- | ---
-rep_complexity On | Off | Controls Complexity Report. Default is on.
-rep_dec_not_used On | Off | Controls Declared but Not Used Report. Default is On.f
-rep_dectree On | Off | Controls Declaration Tree Report. Default is On.
-rep_dict On | Off | Controls Data Dictionary Report. Default is On.
-rep_exception On | Off | Controls Exception Cross Reference Report. The default is On.
-rep_generic On | Off | Controls Generic Instantiations Cross Reference Report. The default is On.
-rep_interrupt On | Off | Controls Interrupt Cross Reference Report. The default is On.
-rep_invtree On | Off | Controls Full Invocation Tree Report. The default is On.
-rep_mark On | Off | Controls if Mark Cross Reference reports are enabled. The default is On.
-rep_metrics_file On | Off | Controls if the File Metrics Report is produced. Default is On.
-rep_metrics_pu On | Off | Controls if the Program Unit Metrics Report is created. The default is On.
-rep_metrics_pu_inclusive On | Off | Controls if the Program Unit Metrics, inclusive (bundling up any nested program units) is created. The default is On.
-rep_object On | Off | Controls if the Object Cross Reference Report is output. The default is On.
-rep_program_unit On | Off | Specifies if the Program Unit Cross Reference Report is made. The default is On.
-rep_renames On | Off | Specifies if the Renames Cross Reference Reports is enabled. The default is On.
-rep_type On | Off | Specifies if the Type Cross Reference Report is enabled. The default is On.
-rep_withtree On | Off | Controls if the With Hiearchy Tree Report is provided. The default is On.
-rep_withs_not_needed On | Off | Controls if the Withs Not Needed Report is enabled. The default is On.

### Report Format Options

The following report formatting options are available.

Option | explanation
--- | ---
-fmt_fullname | Specify use of full entity names in the invocation tree and metrics reports. The default is to use shortnames.
-fmt_profiles | Reports fullnames with a "parameter profile" for entities in the invocation tree and metrics reports. The default is "parameter profiles" are not included.
-fmt_xref_detailed | Includes additional details in cross reference reports. This additional information includes object types in the objects report and referencing program unit fullnames in all cross reference reports. The default is that this additional information is not provided.

### Extensions used by the -separate option

The -separate option (described above) is used to break ASCII output reports into multiple reports. On larger projects this can make for more managable output file sizes. A .pcn file is also created as in index to every program unit, listing it's parameters and file/line declaration.

For instance, if this command is used,

repada -db myproject -separate test

then a variety of files beginning with test and using these extensions would be created:

.cmx - Program Unit Complexity Report
.con - Table Of Contents
.dct - Program Unit Declaration Tree
.dic - Data Dictionary Report
.exx - Exception Cross Reference Report
.fmx - File Metrics Cross Reference Report
.gnx - Generic Instantiation Cross Reference
.mkx - Mark Cross References
.ntx - Interrupt Cross Reference Report
.nvt - Full Invocation Tree
.obx - Object Cross Reference
.pcn - Index of Program Units
.pmi - Program Unit Inclusive Metrics Report
.pmx - Program Unit Metrics
.pux - Program Unit Cross Reference
.qno - Unused Objects
.qnt - Unused Types
.qnu - Unused Program Units
.qwn - Withs Not Needed
.rnx - Program Unit Renames Cross Reference
.tyx - Type Cross Reference
.wit - With Hiearchy Tree

### Example - Creating All Reports in an HTML directory

The following command will generate all reports, create a directory called html and fill it with the HTML versions of each report:

repada -db my_project -html html

The resulting file index.html is the home page of the report directory.

### Example - Turning Off A Couple Reports

This command will generate all reports except for the Program Unit Renames and the Interrupt Cross Reference Report:

repada -db my_project -html html -rep_renames off -rep_interrupt off

Scientific Toolworks, Inc. http://www.scitools.com Voice: (802) 763-2995 Fax: (802) 763-3066 support@scitools.com sales@scitools.com