Ada Instrumentor - attolada


The source code insertion (SCI) Instrumentor for Ada inserts functions from a Target Deployment Port library into the Ada source code under test. The Ada Instrumentor is used for Code Coverage only.


attolada <src> <instr> [<options>]



The Instrumentor builds an output source file from an input source file, by adding special calls to the Target Deployment Port function definitions.

The Ada Instrumentor (attolada) supports Ada83 and Ada95 standard source code without distinction.

You can select one or more types of coverage at the instrumentation stage (see the User Guide for more information).

When you generate reports, results from some or all of the subset of selected coverage types are available.



-PROC alone instruments procedure, function, package, and task entries. This is the default setting.

The -PROC=RET option instruments both entries and exits.



Instruments Ada functions or procedures.



This option specifies how blocks are to be instrumented.

By default, the Instrumentor instruments implicit blocks.



When -COND is used with no parameter, the Instrumentor instruments basic conditions.


Disables instrumentation of procedure inputs, outputs, or returns, etc.



Disables instrumentation of calls.



Disables instrumentation of simple, implicit, or logical blocks.



Disables instrumentation of basic conditions.



This option forces the product to ignore the full path of files. Use this option if you need to consolidate test results when a same file can be identified with various paths, for example in a multi-user development environment using source control.


-UNIT=<name>[{,<name>}] | -EXUNIT=<name>[{,<name>}]

-UNIT specifies Ada units (packages or functions or procedures in packages) whose bodies are to be instrumented, where <name> is an Ada unit which is to be explicitly instrumented. All other functions are ignored.

-EXUNIT specifies packages, or functions or procedures in packages that are to be excluded from the instrumentation. All other Ada units are instrumented. Units that are excluded from the instrumentation process with the -EXUNIT option are still analyzed. Any errors found in those files are still reported. For example: -EXUNIT=MYPACKAGE or -EXUNIT=MYPACKAGE.MYFUNCTION

-UNIT and -EXUNIT cannot be used together.



Provides a set of link files to the Instrumentor.




These options allow you to inject a procedure definition into the instrumented source code. -INJECT specifies the package(s) that contain the procedure definition. -NAMEINJECT specifies the name of the procedure that is injected. If <name> is not specified, then the procedure name ATTOL_TEST is assumed. These options must be used together.



Provides a standard link file to the Instrumentor.



Specifies the destination <directory> for the .fdc correspondence file, which is generated for Code Coverage after the instrumentation for each source file. Correspondence files contain static information about each enumerated branch and are used as inputs to the Code Coverage Report Generator. If <directory> is not specified, each .fdc file is generated in the directory of the corresponding source file. If you do not use this option, the default .fdc files directory is the working directory (the attolada execution directory). You cannot use this option with the -FDCNAME option.



By default, the instrumentor generates one .fdc static correspondence file for each source file involved in the code to be instrumented. Use this option to specify a single static file for all source files in order to avoid file access conflicts, for example when a parallel build is involved. When this option is specified, the generated .fdc file contains one FDC section per source file. You cannot use this option with the -FDCDIR option.




These options allow you to explicitly define upon which incoming or returning function(s) the trace dump must be performed.  Please refer to General Runtime Analysis Settings in the User Guide for further details.



Associates the text from either the Code Coverage Launcher (preprocessing command line) or from you with the source file and stores it in the FDC file to be mentioned in coverage reports. In Code Coverage Viewer, a magnifying glass is put in front of the source file. Clicking on this magnifying glass, shows this text in a separate window. The comment text must not contain commas or non-alphanumeric characters.



Saves the metrics basic data calculation time.



Use this option to set a restriction.


Replaces the generation of the colorized viewer source listing by a colorized viewer pre-annotated report containing line number references.



Disables generation of a Code Coverage report that can be displayed in the Code Coverage Viewer.



Provides static metric data for compatibility with old versions of the product. Use the static metrics features of the Test Script Compiler tools instead. By default no static metrics are produced by the Instrumentors.




Use these options to add a package to the header of the generated file to store coverage traces. You can specify the name of the generated package using one of the following three options:

<File> is used  without checking whether it is a valid Ada identifier.

By default, the -GENERATEDNAME=<FILE> option is used.



Use this option to calculate a more unambiguous checksum for .fdc and .tsf files. Before using this option, you must delete existing fdc and tsf files, which will be re-created with the new checksum. File keys are not changed by this option.



You can prefix some instrumentations (name of the generated package, variables, etc.) if there are any semantic ambiguities.  Thus, packages generated by attolada can be recognized by giving them a known prefix.

By default, no prefix is used.

Note  The prefix you provide is used, without checking whether it is a valid Ada identifier.



Extends instrumentation of calls and conditions to source code inside package specifications.



Forces a trace dump at the end of the main unit of your application.



Only applies when -CALL is used. Excludes all specified calls to the function or procedure units from the instrumentation. The <unit> names must be fully qualified names, for example: package.procedure


-ADA83 | -ADA95

Choose specifies the Ada language used by the Instrumentor.  This language is applied to the analyzed and generated file.



Specifies the Instrumentation Mode:

By default, count mode is used, which is a compromise between the flow mode (everything is a call to the Target Deployment Package) and the inline mode (when possible, the code is directly inserted into the generated file).


Asks the Instrumentor not to generate the identification header. This header is normally written at the beginning of the instrumented file, to strictly identify the instrument used.


This option is for internal usage only.

Return Codes

After execution, the program exits with the following return codes





End of execution with no errors


End of execution because of fatal error


End of execution because of internal error


All messages are sent to the standard error output device.