[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16. ASIS-Based Tools

Some of the tools distributed with GNAT are based on the ASIS implementation for GNAT (ASIS-for-GNAT). Binary executables for such tools do not require ASIS-for-GNAT to be around and they have a command-line interface similar to other GNAT tools. The main specific feature of ASIS-based tools is that they process tree output files.

16.1 The ASIS Implementation for GNAT (ASIS-for-GNAT)  
16.2 Tree Files  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16.1 The ASIS Implementation for GNAT (ASIS-for-GNAT)

The ASIS implementation for GNAT, called ASIS-for-GNAT, is the implementation if the Ada Semantic Interface Specification (ASIS). It is a separate product which is not included in the standard GNAT distribution. However, the binary executables for tools created on top of ASIS-for-GNAT do not require ASIS-for-GNAT installed on your system and they can be used for a standard GNAT distribution along with other GNAT tools


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16.2 Tree Files

The ASIS implementation for GNAT is based on tree output files (or, simply, tree files). A tree file stores a snapshot of the compiler internal data structures in the very end of a successful compilation. It contains all the syntactical and semantic information about the unit being compiled and all the units upon which it depends semantically. ASIS-for-GNAT (and, therefore, any tool based on its top) processes tree files, extracts this information from it and converts it into the format prescribing by the ASIS definition.

To use some ASIS-based tools, a user should take care of producing the right set of tree files for the tool, some other ASIS tools produce a needed set of tree files themselves.

GNAT produces a tree file if -gnatt option is set when calling gnatgcc. ASIS needs tree files created in "compile-only" GNAT mode set by -gnatc gnatgcc switch. Names of the tree files are obtained by replacing 'd' with 't' in the extension of the name of the source file being compiled.

Therefore, to produce a tree file for the body of a procedure Foo contained in the source file named 'foo.adb', you can compile it using

 
   $ gnatgcc -c -gnatc -gnatt foo.adb

and you will get the tree file named 'foo.atb' as a result of this compilation.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Tom Bennet on August, 25 2000 using texi2html