-
Installation
Verify that you have a recent version of GNAT and ASIS installed and remember the paths.
After downloading the latest version of Ast2Dot unpack the tarball and cd to the newly created directory. Open the Makefile in your favourite editor and adapt the paths at the beginning of the file to your needs. Execute make all and copy the resulting executable to a directory in your path.
For example:
$ tar -xzf ast2dot-0.9.2.tar.gz $ cd ast2dot-0.9.2 $ vim Makefile # edit the paths $ make all $ cp ast2dot /usr/bin
-
Usage
ast2dot [-o DIRECTORY [-f] | -l]
Process all adt files in the current directory and write the dot contents to stdout. Note that every digraph has to be in a separate dot file.
Options:
-o: (create DIRECTORY) and save a dot file for every graph there
-f: force DIRECTORY creation. If a directory with same name already exists, it will be deleted.
-l: show license details -
Tree Files (.adt)
Ast2Dot takes tree files that are generated by GNAT as input. In order to generate those files you need to compile the program you want to analyse with the -gnatt and the -gnatc switch. For detailed information on those files see the ASIS-for-GNAT documentation.