![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Rational ASIS: Ada Semantic Interface Specification This online reference describes the ASIS standard version 1.1.0 and Rational ASIS, Rational's implementation of ASIS. It describes the packages, subprograms, and types available in Rational ASIS and how to use them to programmatically extract semantic and syntactic information from compiled Ada programs.
This introduction includes (click on a topic to see it):
- "About ASIS"
- "Before Using ASIS"
- "Using ASIS"
- "About the ASIS Online Reference"
- "Additional ASIS Documentation"
About ASISThe Ada Semantic Interface Specification (ASIS) is a programmatic interface that provides access to the syntactic and semantic information derived from the compilation units stored in Ada program libraries. ASIS makes the information available through standardized, open-architecture interfaces that are independent of any vendor's Ada program library representation.
ASIS can simplify the construction of software-engineering tools such as test-case generators, metrics tools, style checkers, and documentation generators.
ASIS is an industry standard published by the Ada Semantic Interface Specification Working Group (ASISWG) under the auspices of the Association of Computing Machinery's Special Interest Group on Ada (SIGAda). The current ASIS version is 1.1.0 and conforms to Ada as defined in the Ada Language Reference Manual (LRM), ANSI/MIL-STD-1815A-1983.
The packages in ASIS and how to use them, are described in this document.
ASIS Compared to Rational ASIS
Rational ASIS is Rational's implementation of ASIS. It provides access to DIANA information generated by the Rational Ada compiler under Rational Apex.
Rational ASIS is a separately licensed Rational layered product. If Rational ASIS is not installed on your system, contact your Rational representative for more information.
Before Using ASISRational ASIS documentation assumes that you:
- Have programmed in Ada
- Are familiar with the Reference Manual for the Ada Programming Language (LRM), ANSI/MIL-STD-1815A-1983; you can access this online by selecting either the Help > Manuals command and selecting the Ada83 LRM or on an LRM cross-reference in this document
- Know how to create, edit, compile, and debug Ada code under Rational Apex. If not, see:
- Getting Started
- Programmer's Guide
- The Rational Apex on-line command reference, which is accessed from Apex's Help menu
- Have some familiarity with recursive programming
techniques- Glossary
Additional ASIS DocumentationOther sources of information about ASIS:
- Rational ASIS Concepts Guide, a description of global ASIS concepts (???will include examples & syntax mapping later...)
- Rational ASIS package specifications
- manpage for asis (if supported by your operating system)
Using ASISRational ASIS consists of 14 major packages.
Your ASIS program will use resources from these packages in roughly the following order:
- Asis
- Environment
- Libraries
- Compilation_Units
- Declarations or Elements
- Expressions, Ids, Representation_Clauses, Statements, Text, or Type_Declarations
- Data_Decomposition and Portable_Transfer (optional)
For a description of the purpose and use of the resources in a package, read the "Key Concepts" section for that package. You can get to the "Key Concepts" section for a package by going to "Packages in ASIS" (below) and then clicking on the package name.
For more overview information, click on one of:
Packages in ASISPackages that perform nonsemantic operations (click on a package for detailed reference information):
- Asis: Encompasses and renames all other ASIS packages
- Compilation_Units: Accesses for analysis Ada compilation units and pragmas that affect the unit
- Data_Decomposition: The inverse of Portable_Transfer
- Environment: Includes subprograms to initialize and finalize the ASIS environment, to determine implementation-dependent features, and to provide error status information
- Libraries: Accesses Ada program libraries for analysis
- Portable_Transfer: Converts ASIS-provided data structures into portable data streams
Packages that provide access to specific semantic information from Ada programs:
- Declarations: Accesses Ada declarations and specifications
- Expressions: Accesses expressions and their components, function calls, and use clauses
- Representation_Clauses: Accesses representation clauses
- Statements: Accesses statement labels, statements, exception handlers, machine-code insertions, and parameter
associations- Text: Accesses the text of compilation units
- Type_Declarations: Accesses type definitions, generic-actual parameter type definitions, constraints, and choices
Packages that assist in the analysis of the semantic information:
- Elements: Accesses syntactic elements that make up program units; includes functions that traverse the element tree and identify the kinds of elements encountered
- Ids: Supports persistent and unique names for elements
Using the ASIS PackagesUsing Rational Apex, import the Apex view that contains the specification for package Asis into the view that contains your ASIS program. This pathname will be the latest view in this Apex subsystem:
$APEX_BASE/ada/asis.ss
- 1. . Include a context clause for package Asis only:
with Asis;
- 2. . Initialize the ASIS environment:
Asis.Environment.Initialize (...);
- 3. . Identify and access each Ada program library that you will use:
Asis.Libraries.Associate (...); Asis.Libraries.Open (...);
- 4. . Identify each compilation unit that you will analyze using one of:
Asis.Compilation_Units.Library_Unit (...);
Asis.Compilation_Units.Secondary_Unit (...);
- 5. . Use packages Declarations, Elements, Statements, and so on to extract information from the compilation units.
- 6. . Close the libraries:
Asis.Libraries.Close (...); Asis.Libraries.Dissociate (...);
- 7. . Terminate the ASIS environment:
Asis.Environment.Finalize (...);
Note: To run your ASIS program, you must either use an Apex shell or first execute apexinit in your own operating system shell.
About the ASIS Online ReferenceThis Rational ASIS online reference describes the subprograms that you can call and the types that you can use to interpret the semantic content of Ada program libraries. Specifically, this document contains the following detailed reference information:
- Definitions of ASIS terms and data types
- Descriptions of every ASIS subprogram, including:
- Appropriate parameters and parameter values
- Operational descriptions
- Error conditions
- Cross-references to related subprograms and topics
- The exceptions raised by ASIS and their causes
- Analysis and decomposition strategies
- Relationships between the LRM syntactic description of Ada and the ASIS subprograms used to analyze the syntax
More Information About the Online Reference
Click on a topic for more information:
- "Moving Around in the ASIS Online Reference"
- "Organization and Content of the Online Reference"
- "Reference-Entry Description"
Moving Around in the ASIS Online ReferenceNavigation through the ASIS online reference is essentially the same as for the Apex online help. You can click on:
- One of the command buttons at the bottom of the page (differences from the Apex help are shown below)
- A topic that has a diamond bullet (u)
- An underlined reference
For more information, select Help > On Help from the menu.
Organization and Content of the Online ReferenceThe ASIS online reference contains:
- Overview material about ASIS and the online reference itself. You are currently viewing some of this overview material. To return to the beginning of the overview, click the Asis Main button at the bottom of any page.
- An index that lists all ASIS packages and the resources in the packages. To access the index, click the Index button at the bottom of any page. For information on using the index, use the Apex Help > On Help menu command.
- A package entry for each ASIS package as described below. To access package entries, an overview page describing all ASIS packages is provided.
Package Entry Contents
- A description of the purpose and content of the package.
- "Resources in Package Pkg_Name," which contains a list of the subprograms and types (the resources) in package Pkg_Name, arranged by the kinds of operations that you might need to do.
- "Key Concepts for Package Pkg_Name," which contains topics such as how to use the resources in the package and the meaning of the various types in the package.
- A set of reference entries for the resources in the package. These entries follow the Key Concepts, so that you can step through the reference entries page by page in alphabetic order. More likely, however, you will click on the name of a resource in one of the two sections mentioned above and go directly to that reference entry.
Reference-Entry DescriptionEach ASIS resource (subprogram, type, or nested package) has its own reference entry, which looks similar to the following:
![]()
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |