Locate_Pragmas
This command locates pragmas and their parameters, if any.
Usage Tip: Pragmas imply certain attributes about the code in which they appear. Location of all pragmas can help locate all parts of the code that share this characteristic. Some projects will prohibit or restrict the use of some pragmas (such as Suppress) during certain phases of the development cycle.
Command-Line Interface
Locate_Pragmas
-Include_Controlled_Pragmas
-Include_Elaborate_Pragmas
-Include_Inline_Pragmas
-Include_Interface_Pragmas
-Include_List_Pragmas
-Include_Memory_Size_Pragmas
-Include_Optimize_Pragmas
-Include_Pack_Pragmas
-Include_Page_Pragmas
-Include_Priority_Pragmas
-Include_Shared_Pragmas
-Include_Storage_Unit_Pragmas
-Include_Suppress_Pragmas
-Include_System_Name_Pragmas
-Include_Other_Pragmas
-Pragma_Name [string-expression, default = ""]
-Sort_By_Subsystem
-Use_Configuration [string-expression, default = ""]
-To_Report_Named [string-expression, default =
<default_output_directory>/pragma_analysis]
<list of units>Nonstandard Parameters
- Include_*: Specifies whether to include the * kind of pragma in the hypertable output.
- Pragma_Name: Specifies the name of a pragma to locate. If a name is specified, only pragmas with that name and specific pragmas selected in the boolean options will be displayed. If a null string is provided (the default), and the other_pragmas option is selected, all named pragmas (other than those with specific boolean options) will be located and displayed.
Sample Output
Locate_Recursive_Subprograms
This command locates all recursive subprogram calls and places them in a hypertable. Only subprogram bodies are checked since only they can have recursive calls.
Usage Tip: Use of recursion can impact the required stack size for execution threads that use it. Unwanted recursion or corecursion can creep into software as it is developed and/or maintained by several developers.
Command-Line Interface
Locate_Recursive_Subprograms
-Check_To_Depth [positive-expression, default = 3]
-Sort_By_Subsystem
-Use_Configuration [string-expression, default = ""]
-To_Report_Named [string-expression, default =
<default_output_directory>/recursive_analysis]
<list of units>Nonstandard Parameters
- Check_To_Depth: Specifies the depth of calls when checking whether a subprogram is recursive. Recursion can occur through many calling levels, but it is most likely to occur in the first level or first few levels. Checking all calls to great depths, especially for main programs, can take a very long time with no hope of finding recursion.
Sample Output
Locate_Renames
This command locates renaming declarations. The name of the existing declaration and new name introduced by the rename are included in the hypertable.
Usage Tip: This command can be used to ensure that renaming is used consistently throughout the software (that is, that one package is not given several aliases in different parts of the program). Recursive renaming (that is, renames of renames) can also be located. Repair of these inconsistencies can improve software readability.
Command-Line Interface
Locate_Renames
-Sort_By_Subsystem
-Use_Configuration [string-expression, default = ""]
-To_Report_Named [string-expression, default =
<default_output_directory>/rename_analysis]
<list of units>Nonstandard Parameters
All parameters are standard parameters.
Sample Output
Object Renames
Subprogram RenamesEnumeration Renames
Exception Renames
Locate_Rep_Spec_Inconsistencies
This command locates the following representation-specification problems:
- Length clauses that are too small to contain values of the type represented
- Values in representation specifications that must be static and are not
- Values in the enumeration representation specification that are not in ascending order
- Components of record representations that are specified more than once
- Components of record representations that are not specified in the representation clauses. Since this is allowed, it will commonly be recognized as a warning.
- Components that are an even number of bytes in size (characters (1 byte) and integers (2 or 4 bytes), for example) that are not byte-aligned in the representation specification. This will lead to inefficiencies in the manipulation of this component. Note that byte size is defined in the type_sizing_file in the current configuration policy.
- Bit ranges in a component's representation specification that overlap with bit ranges from a previous component.
- Bit ranges in a component's representation specification that are not specified. When bit ranges are not specified, the compiler will often generate additional initialization code, which may negatively impact performance.
- The number of bits allocated for a record component is too small for that component's size
Usage Tip: The Rational compilation system checks some representation specifications but not all. Consistency and correctness of representation specifications may not be important during development on the host, but it is critical on the target. This command can help ensure that representation specifications are correct before they are downloaded to the target for compilation.
Command-Line Interface
Locate_Rep_Spec_Inconsistencies
-Sort_By_Subsystem
-Use_Configuration [string-expression, default = ""]
-To_Report_Named [string-expression, default =
<default_output_directory>/rep_spec_consistency_analysis]
<list of units>Nonstandard Parameters
All parameters are standard parameters.
Sample Output
Inconsistencies in Length Clauses
Inconsistencies in Record Representation Specifications
Locate_Rep_Specs
This command locates all representation and length clauses and collects attributes for them. The following kinds of representation specifications are located:
- Enumeration representation specifications
- Record representation specifications
- Attribute clauses
Usage Tip: Use of representation specifications, or in some cases the lack of specifications (collection and task storage size), can have major impacts on program efficiency. This command can help locate inappropriate or missing representation specifications.
Command-Line Interface
Locate_Rep_Specs
-Include_Enumeration_Representation_Clauses
-Include_Record_Representation_Clauses
-Include_Address_Attribute_Clauses
-Include_Alignment_Attribute_Clauses
-Include_Bit_Order_Attribute_Clauses
-Include_Component_Size_Attribute_Clauses
-Include_External_Tag_Attribute_Clauses
-Include_Input_Attribute_Clauses
-Include_Machine_Radix_Attribute_Clauses
-Include_Output_Attribute_Clauses
-Include_Read_Attribute_Clauses
-Include_Small_Attribute_Clauses
-Include_Size_Attribute_Clauses
-Include_Storage_Pool_Attribute_Clauses
-Include_Storage_Size_Attribute_Clauses
-Include_Write_Attribute_Clauses
-Include_Implementation_Defined_Attribute_Clauses
-Sort_By_Subsystem
-Use_Configuration [string-expression, default = ""]
-To_Report_Named [string-expression, default =
<default_output_directory>/rep_spec_analysis]
<list of units>Nonstandard Parameters
- Include_*: Specifies whether to include the * kind of representation clause or attribute clause in the hypertable output.
Sample Output
Enumeration Representation Specifications
Record Representation Specifications
Address Attribute Clauses
Size Attribute Clauses
Storage Pool/Collection Size Attribute Clauses
'Small Attribute Clauses
Note: The report format and contents for all other attribute clauses is similar to those above.
Locate_Short_Circuit_Opportunities
This command locates the following Boolean operator usage:
- Or operators
- Or else operators
- And operators
- And then operators
Usage Tip: Often, depending on the compiler implementation, and then and or else (that is, short-circuit forms) will be more run-time efficient than the and and or forms. This analysis locates opportunities to select other operators.
Command-Line Interface
Locate_Short_Circuit_Opportunities
-Include_Or_Operators
-Include_Or_Else_Operators
-Include_And_Operators
-Include_And_Then_Operators
-Sort_By_Subsystem
-Use_Configuration [string-expression, default = ""]
-To_Report_Named [string-expression, default =
<default_output_directory>/short_circuit_analysis]
<list of units>Nonstandard Parameters
- Include_*: Specifies whether to include the * kind of Boolean operator in the hypertable output.
Sample Output
Or Operators
Or Else Operators
And Operators
And Then Operators
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2000, Rational Software Corporation. All rights reserved. |