Ada Semantic Interface Specification
ASIS, the Ada Semantic Interface Specification, is a library that gives applications access to the complete syntactic and semantic structure of an Ada compilation unit. This library is typically used by tools that need to perform some sort of static analysis on an Ada program.
ASIS is an international standard (ISO/IEC 15291:1995), and is designed to be compiler independent. Thus a tool that processes the ASIS representation of a program will work regardless of which ASIS implementation has been used. ASIS-for-GNAT is AdaCore’s implementation of the ASIS standard, for use with the GNAT Pro Ada development environment and toolset.
Typical ASIS-for-GNAT applications include:
- Design and Document Generation Tools
- Metric Testing or Timing Tools
- Dependency Tree Analysis Tools
- Type Dictionary Generators
- Coding Standards Enforcement Tools
- Language Translators (e.g., to/from CORBA)
- Reflection Tools (in the style of Java)
- Quality Assessment Tools
- Source Browsers and Formatters
- Syntax Directed Editors
AdaCore has used ASIS-for-GNAT to develop a number of tools:
- gnatelim
- Detects and eliminates unused subprograms, on a partition-wide basis
- gnatstub
- Generates stubbed compilable bodies from specs
- gnatcheck
- Enforces lexical and syntactic style (tailorable)
- gnatpp
- Produces pretty-printed version of program
- gnatmetric
- Analyzes source code to calculate a set of commonly used industry metrics