TOC PREV NEXT INDEX DOC LIST MASTER INDEX



Locate_Subunit_Candidates

This command locates package, subprogram, and task body declarations whose size is greater than some threshold, making them good candidates for subunits. Existing subunits are also located, with their sizes displayed.

Usage Tip: Breaking large units into subunits can improve readability and reduce total compilation time. This command provides information to help decide which units should be subunits and which should not.

Command-Line Interface

Locate_Subunit_Candidates
  -Size_Threshold [integer-expression, default = 100]
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/subunit_candidate_analysis]
  <list of units>

Nonstandard Parameters

Sample Output

Subunit Candidates

Existing Subunits

Locate_System_Address_Usage

This command locates each usage of the type System.Address, including object declarations and 'ADDRESS attributes. Taking 'ADDRESS of constants and dynamic object declarations, such as parameters and local variable declarations, can be error-prone.

Usage Tip: Using addresses to reference data and performing computations on machine addresses are generally considered error-prone programming styles. Constant values may have no address and dynamic objects such as parameters and local subprogram variables may have addresses that are valid only for a short period of time. This command highlights the use of System.Address within a program.

Command-Line Interface

Locate_System_Address_Usage
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/system_address_analysis]
  <list of units>

Nonstandard Parameters

All parameters are standard parameters.

Sample Output

Declarations of System.Address

Use of Address Attributes

Locate_Tasking

This command locates all tasks, their entries, accept statements of those entries, and other tasks that rendezvous with them through entry calls.

Usage Tip: This command collects and displays all static interactions with tasks. The number and location of all entry calls and the available accept statements can aid in understanding multitasking interactions. Potential errors such as no accepts or no entry calls for an entry can also be seen easily.

Command-Line Interface

Locate_Tasking
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/tasking_analysis]
  <list of units>

Nonstandard Parameters

All parameters are standard parameters.

Sample Output

Task Rendezvous

Locate_Type_Declarations

This command locates type declarations and collects attributes about each kind.

Usage Tip: The declaration and use of types is one of the key design aspects of Ada programs. This command helps locate redundant type structures and similar structures that could better be combined into one structure (perhaps a variant record). Some typing standards, for example, require that all subtypes and derived types have constraints. Such standards can be analyzed easily with this command.

Command-Line Interface

Locate_Type_Declarations
  -Include_Integer_Types
  -Include_Modular_Types
  -Include_Float_Types
  -Include_Fixed_Types
  -Include_Decimal_Fixed_Types
  -Include_Enumeration_Types
  -Include_Character_Types
  -Include_String_Types
  -Include_Record_Types
  -Include_Discriminant_Record_Types
  -Include_Array_Types
  -Include_Unconstrained_Array_Types
  -Include_Access_Types
  -Include_Derived_Types
  -Include_Extension_Types
  -Include_Task_Types
  -Include_Protected_Types
  -Include_Private_Types
  -Include_Limited_Private_Types
  -Include_Subtypes
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/type_declaration_analysis]
  <list of units>

Nonstandard Parameters

Sample Output

Integer Type Declarations

Subtype Declarations

Note: Tables for all other type declaration kinds contain attribute columns relevant to the description of that type declaration.

Locate_Unused_Declarations

This command locates declarations that have no references. This command is similar to the Rational Apex Show_Unused command, but it performs the following additional operations:

Note: To determine whether a declaration is unused or not, the entire closure of a program must be searched. In particular, subsystems that import the subsystem under analysis must be included in the search because those subsystems can have dependencies; a configuration file containing all views in a program should be given for the "Configuration" section of the dialog box. The "Use import closure" button can yield incorrect results, listing declarations as unused when they are in fact used by importing subsystems.

Usage Tip: Declarations can be unused or become unused for many reasons. In most cases (perhaps reusable abstractions excluded), it is a good idea to remove unused declarations and record components from the code. Depending on the compiler implementation, removal of these declarations may reduce code size and will reduce compilation time and increase understandability. Note that because of the filtering of dependencies based on the current imports, some declarations may be unused in the current release but still used in older releases. Care must be taken when removing declarations to maintain release compatibility.

The recursive option can be used to locate strings or groups of declarations that depend on each other but have no outside dependencies

Command-Line Interface

Locate_Unused_Declarations
  -Include_Subprogram_Declarations
  -Include_Type_Declarations
  -Include_Record_Component_Declarations
  -Include_All_Other_Declarations
  -Dont_Filter_Weak_Dependencies
  -Compute_Unit_Dependencies
  -Reecursive
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/unused_declaration_analysis]
  <list of units>

Nonstandard Parameters

Sample Output

Unused Subprogram Declarations

Unused Type Declarations

Unused Record Components

Other Unused Declarations

Locate_Unused_With_Clauses

This command locates with clauses that are not used, used only in use or renames clauses, or could be moved from the spec to the body.

Usage Tip: This report identifies units named in with clauses that are unused or misplaced. Such withed units can become unused for many reasons as development progresses, although the reason is usually not obvious to the developer. Their removal can improve code readability and reduce compilation time. More importantly, from an architectural perspective, such references introduce false dependencies that unnecessarily complicate the overall system structure. (Note that the removal of statically unused with clauses, as analyzed in this report, can affect dynamic elaboration order at run-time, perhaps adversely. Where the design calls for such effects, they should be made obvious and portable with a pragma Elaborate.)

Command-Line Interface

Locate_Unused_With_Clauses
  -Include_Missing_Local_Clauses
  -Include_Redundant_Clauses
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/unused_with_clause_analysis]
  <list of units>

Nonstandard Parameters

Sample Output

Key for "Status" column: 

 Unused:  With is not used in the Ada unit at all

 Movable to Body:  With is not used in the specification, but is in the body.

 Movable to Subunit:  With is not used in the body, but is in a subunit.

 Repeat "with":  With appears more than once in the unit (either in the local program unit or parent unit)

 Used for use/rename: With clause is necessary only to compile a use clause, rename clause, or a local pragma Elaborate. Withs used for exported renames are not reported as they may be externally used.

Locate_Use_Clauses

This command locates all Ada use clauses in a program. The user can specify names of allowed use clauses in the allowed_use_clauses file in the standards_conformance subdirectory of the current configuration.

Usage Tip: Use clauses generally reduce program readability and increase compilation time because of more complicated name resolution. This command locates all use clauses and displays their context so that decisions can be made about their continued use.

Command-Line Interface

Locate_Use_Clauses
  -Include_Allowed_Use_Clauses
  -Include_Use_Type_Clauses
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/use_clause_analysis]
  <list of units>

Nonstandard Parameters

Sample Output

Merge_Reports

This command takes as input a set of reports generated by the same Ada Analyzer command and merges them into a single report. This can be useful when the software under analysis is so large that a single invocation of the Ada Analyzer takes too long to complete. In such cases, analysis can be performed on sections of the code (that is, each subsystem or subdirectory) to generate a separate report containing analysis of that subset. A combined report can then be generated with this command.

It is also possible to filter the input tables to create a report whose contents includes only those table entries that match the filtering specification. Details are provided in the description of the Column_Filtering option below. This allows users to reduce the size of reports to contain more specific information. For example, one could use this capability to obtain all information specific to a single unit or set of units from several Ada Analyzer reports.

Usage Tip: This command can be used to combine several reports containing analysis information on several system subsets into a single, sorted report that represents analysis of the entire software system.

Command-Line Interface

Merge_Reports
  -Include_Linkage
  -Column_Filtering [string-expression, defualt = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/data_synchronization_analysis]
  <list of reports>

Nonstandard Parameters

Release_Token

This command releases a token so that another user can access the Ada Analyzer. Whenever a user executes an Ada Analyzer command or views a report, a token is requested from the pool of available tokens. A token is not returned to the pool until the user exits Apex or executes this command.

Note: This command can be entered only from a shell window (created from the Tools menu) using the command line: aa release_token. This command takes no options.

Separate_Reports_By_Subsystem

This command will take a set of reports as input, locate all distinct subsystem entries (listed in the SS column), and create one output report for each located subsystem. The names of the output reports are created from the prefix defined by the To_Report_Named parameter followed by a "_for_" <subsystem_name> suffix. The resulting reports will each contain only those entries that refer to that subsystem.

Note: It is possible for reports to be created with no SS column (Display_Subsystem_Name switch => False). In this case, a warning is issued in the command log and no entries entered into the output reports.

Usage Tip: This command can be useful to separate all reported entries for delivery to individual programmers or development teams. It is often the case that software ownership is defined at the subsystem boundary and that reports targeted to each owner are less confusing and more effective.

Command-Line Interface

Separate_Reports_By_Subsystem
  -Include_Empty_Tables
  -To_Report_Named = [string-expression, default =
      <default_output_directory>/separation_report]
  <list of reports>

Nonstandard Parameters

Visit_Current_Configuration_Policy

This command visits (displays a window containing) the current configuration-policy directory. This can be useful for updating a configuration file or simply viewing which configuration-policy directory is currently active. See the section titled "Determining the Currently Active Configuration Policy" on page 25 for the algorithm used to determine the active configuration.

Note: This command is available only through the Visit Current menu item within the Configuration Policy menu. It is not available from the command line.

Write_To_Ascii_File

This command converts an Ada Analyzer report file into an ASCII file in one of six formats:

Note: The GUI also provides this capability with the SaveAs command. This description is intended only for command-line users.

Usage Tip: Current database tools can be used to correlate report contents and perform statistical analysis. Use of the FrameMaker MIF format is currently the only method to print PostScript-quality images of a report.

Command-Line Interface

Write_To_Ascii_File
  -Formatted_Columns_Format  [(default = Column_Delimited_Format)]
  -Frame_Mif_Format  [(default = Column_Delimited_Format)]
  -Interleaf_Iaf_Format  [(default = Column_Delimited_Format)]
  -Rtf_Format [(default = Column_Delimited_Format)]
  -Html_format [(default = Column_Delimited_Format)]
  -Column_Delimiter [string-expression, default = "$"]
  -Sort_On_Column [integer-expression, default = 0 (no sort)]
  -New_File [string-expression, default =
      existing_report_name & "_column_delimited"]
  <pathname of existing report>

Nonstandard Parameters


Rational Software Corporation  http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2000, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX DOC LIST MASTER INDEX