Examples of tools that benefit from the ASIS interface include: automated code monitors, browsers, call tree tools, code reformators, coding standards compliance tools, correctness verifiers, debuggers, dependency tree analysis tools, design tools, document generators, metrics tools, quality assessment tools, reverse engineering tools, re-engineering tools, style checkers, test tools, timing estimators, and translators.
The ASIS interface consists of a set of types, subtypes, and subprograms which provide a capability to query the Ada compilation environment for syntactic and semantic information. Package Asis is the root of the ASIS interface. It contains common types used throughout the ASIS interface. Important common abstractions include Context, Element, and Compilation_Unit. Type Context helps identify the compilation units considered to be analyzable as part of the Ada compilation environment. Type Element is an abstraction of entities within a logical Ada syntax tree. Type Compilation_Unit is an abstraction for Ada compilation units. In addition, there are two sets of enumeration types called Element Kinds and Unit Kinds. Element Kinds are a set of enumeration types providing a mapping to the Ada syntax. Unit Kinds are a set of enumeration types describing the various kinds of compilation units.
All ASIS subprogram interfaces are provided using child packages. Some child packages also contain type and subtype interfaces local to the child package.
The child package Asis.Implementation provides queries to initialize, finalize, and query the error status of the ASIS implementation; its child package Asis.Implementation.Permissions provides queries to identify implementation permissions. The child package Asis.Ada_Environments encapsulates a set of queries that map physical Ada compilation and program execution environments to logical ASIS environments, including Asis.Ada_Environments.Containers.
The child package Asis.Compilation_Units defines queries that deal with compilation units and serves as the gateway between Compilation_Units, Elements, and Ada_Environments. The child package Asis.Compilation_Units.Times encapsulates the time related functions used within ASIS. The child package Asis.Compilation_Units.Relations encapsulates semantic relationship concepts used in ASIS.
The child package Asis.Elements defines general Element queries and queries for pragmas. It provides information on the element kinds for further semantic analysis.
The child package Asis.Iterator provides a mechanism to perform an iterative traversal of a logical syntax tree. During the syntax tree traversal, ASIS can analyze the various elements contained within the syntax tree. ASIS can provide the application additional processing via generic procedures, which are instantiated by the application. These additional processing queries decompose as ASIS elements from the logical Ada semantic tree. Queries are provided in the child packages: Clauses, Declarations, Definitions, Expressions, and Statements.
The child package Asis.Text encapsulates a set of operations to access the text of ASIS elements. It defines the operations for obtaining compilation text spans, lines, and images of elements.
The child package Asis.Ids provides a mechanism to efficiently reference ASIS elements in a persistent manner.
To support portability amongst a variety of implementors' compilation environments, certain types and constants have been identified as implementation-defined.
The child package Asis.Errors defines the kinds of errors. The exceptions that can be raised across the ASIS interface are defined in the child package Asis.Exceptions.
The interface supports one optional child package and its single child package: child package Asis.Data_Decomposition - The interface also includes an optional capability to decompose data values using the ASIS type information and portable data stream, representing a data value of that type, in child package Asis.Data_Decomposition.Portable_Transfer
Last update 17 August 1998. Questions, comments to Clyde Roby (CRoby@IDA.Org)