TOC PREV NEXT INDEX DOC LIST MASTER INDEX



Locate_Similar_Record_Structures

This command locates record types that are identical to or have a high degree of commonality with other record structures in the program. A record type is identical to another record type if it contains exactly the same number of components and those components have exactly the same type marks. Component names are not considered. Similar record types have small differences in these two attributes.

Usage Tip: Identical record structures can sometimes be eliminated from the program, reducing redundancy and complexity. Similar record structures can sometimes be merged into a single discriminated record type.

Command-Line Interface

Locate_Similar_Record_Structures
  -Maximum_Differences_Allowed [integer-expression, default = 1]
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/record_structure_analysis]
  <list of units>

Nonstandard Parameters

Sample Output

Record Cross-Reference

Component Cross-Reference

Comparison Tables

Locate_Specific_Coding_Violations

This command is not actually a separate command but a variant of the Locate_Coding_Violations command on page 128. The Locate_Coding_Violations command checks for standards-conformance violations enabled in the rule_enforcement file in the standards_conformance subdirectory of the current configuration policy. This command allows standards-conformance checks to be selected in the Boolean options section of the command dialog box.

Usage Tip: This command can be used to check for a specific subset of coding violations without having to modify the rule_enforcement file in the current configuration policy. Note also that it is possible to define custom dialog boxes with preselected combinations of options. This allows users to create there own sets of rules, still allowing the convenience of selection and deselection of rules when required. Consult the documentation on "Adding a New Dialog Box Definition" on page 261 for more information.

Command-Line Interface

Locate_Specific_Coding_Violations
  -<rule enforcement name>
  -Include_Allowed_Violations
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/specific_coding_violations_analysis]
  <list of units>

Nonstandard Parameters

Locate_Ada95_Coding_Violations

This command is not actually a separate command but a variant of the Locate_Coding_Violations command on page 128. The Locate_Coding_Violations command checks for standards-conformance violations that are enabled in the rule_enforcement file in the standards_conformance subdirectory of the current configuration policy. This command allows standards-conformance checks (Ada 95 checks only) to be selected in the Boolean options section of the command dialog box.

Usage Tip: This command can be used to check for incompatibilities with Ada 95 without having to modify the rule_enforcement file in the current configuration policy.

Command-Line Interface

Locate_Specific_Coding_Violations
  -<rule enforcement name>
  -Include_Allowed_Violations
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/ada95_coding_violations_analysis]
  <list of units>

Nonstandard Parameters

Locate_Statements

This command locates statements and collects general statement attributes.

Usage Tip: In some cases, compilers will generate more efficient code if constructs are used (or not used) in a particular way. Some projects prohibit the use of certain statements (such as goto) or have restrictions on use (the use of null statements, for example). This command can help locate all statements of a specific kind and display their attributes.

Command-Line Interface

Locate_Statements
  -Include_Null_Statements
  -Include_Assignment_Statements
  -Include_Proc_Call_Statements
  -Include_Exit_Statements
  -Include_Return_Statements
  -Include_Goto_Statements
  -Include_Entry_Call_Statements
  -Include_Delay_Statements
  -Include_Abort_Statements
  -Include_Raise_Statements
  -Include_Code_Statements
  -Include_If_Statements
  -Include_Case_Statements
  -Include_Loop_Statements
  -Include_Block_Statements
  -Include_Accept_Statements
  -Include_Select_Statements
  -Include_Asynchronous_Select_Statements
  -Include_Requeue_Statements
  -Include_Cond_Entry_Statements
  -Include_Timed_Entry_Statements
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/statement_analysis]
  <list of units>

Nonstandard Parameters

Sample Output

Null Statements

Assignment Statements

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

Locate_Static_Constraint_Violations

This command locates points where objects (for example, constants, variables, and parameters) are assigned static values that will always result in a Constraint_Error exception. If the constraints of the object and value expression do not match, they are reported by this command.

Usage Tip: The compilation system locates many static constraint violations but not all. Floating-point values and values that are computed from numeric expressions are not reported. This command will report these violations when the type bounds and assigned values are statically computable.

Command-Line Interface

Locate_Static_Constraint_Violations
  -Include_String_Checking
  -Include_Integer_Checking
  -Include_Real_Checking
  -Include_Array_Checking
  -Include_Record_Component_Checking
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/static_constraint_violation_analysis]
  <list of units>

Nonstandard Parameters

Sample Output

String Values

Integer Values

Real Values

Array Values

Record Component Selection

Locate_Subprogram_Complexities

This command locates all subprogram and task bodies that have high complexity. The following metrics are computed:

A threshold parameter is available for several of the above attributes to limit which subprograms are included in the hypertable output.

Usage Tip: Complexity in subprograms is not inherently bad, but it can reduce readability and increase maintenance costs in the future. This command locates subprograms that exceed certain thresholds for inspection and possible modification.

Command-Line Interface

Locate_Subprogram_Complexities
  -Minimum_Statement_Depth [integer-expression, default = 4]
  -Minimum_Number_Of_External_Calls [integer-expression, default = 5]
  -Minimum_Number_Of_External_Var_Refs [integer-expression, default = 5]
  -Minimum_Number_Of_Procedure_Returns [integer-expression, default = 0]
  -Minimum_Number_Of_Function_Returns [integer-expression, default = 1]
  -Minimum_Number_Of_Execution_Paths [integer-expression, default = 5]
  -And_Threshold_Values
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/subprogram_complexity_analysis]
  <list of units>

Nonstandard Parameters

Sample Output

Locate_Subprograms_Propagating_Exceptions

This command locates all subprograms and the exceptions that are propagated from them. Subprograms that do not propagate any exceptions are also listed, with "None" as the name of the exception. A subprogram propagates an exception if:

Command-Line Interface

Locate_Subprograms_Propagating_Exceptions
  -Include_Non_Visible_Subprograms
  -Include_All_Raise_Points
  -Sort_By_Subsystem
  -Use_Configuration [string-expression, default = ""]
  -To_Report_Named [string-expression, default =
      <default_output_directory>/propagation_analysis]
  <list of units>

Nonstandard Parameters

Sample Output

Locate_Subprogram_References

This command locates all data objects (for example, variables, constants, and parameters) that are referenced by a subprogram. Each referenced object is classified by its kind and context, and whether the program sets (writes) the object, uses (reads) it, or both.

Note: Since this analysis generates one table entry for each data object referenced, it is usually intended to be run over a limited number of program units.

Usage Tip: How subprograms use data is key in the design and implementation of most programs. Whether data is passed as a parameter, stored locally in the body of the package, or referenced globally from some other package can impact a program in many dimensions. This command provides an overview of all subprogram data access.

Command-Line Interface

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

Nonstandard Parameters

All parameters are standard parameters.

Sample Output

References Sorted by Subprogram

References Sorted by Object


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