Ada (AdaCore)#
The Lattix Ada module that uses AdaCore’s libadalang python module. The Module consists of a python program that can be run standalone or as a module of Lattix. See below for instructions on how to use Ada module directly from Lattix Architect.
Running ltxada command standalone#
The python program “ltxada” is installed in the “ada” directory in the Lattix installation.
- There are three subdirectories:
bin
lib
python
The “bin” directory contains the “ltxada” program which can be used to process the Ada source files and create a Lattix LDI file that represents the dependencies.
The usage is as follows:
usage: ltxada [-h] [--version] [--directory-recursive DIRECTORY_RECURSIVE] [--directory DIRECTORY] [--ada-file-extensions ADA_FILE_EXTENSIONS]
[--file FILE] [--output OUTPUT] [--verbose]
Lattix Ada Analyser
options:
-h, --help show this help message and exit
--version, -v Display version information
--directory-recursive DIRECTORY_RECURSIVE, -D DIRECTORY_RECURSIVE
Recursively search for Ada files in the specified directory
--directory DIRECTORY, -d DIRECTORY
Search for Ada files in the specified directory (non-recursively)
--ada-file-extensions ADA_FILE_EXTENSIONS, -e ADA_FILE_EXTENSIONS
Specify file extensions to analyse as Ada files. (defaults to "adb" and "ads")
--file FILE, -f FILE Analyse the specified Ada file
--output OUTPUT, -o OUTPUT
Output LDI file (defaults to ltxada.ldi.xml)
--verbose Enable verbose output
Example:
ltxada --directory-recursive path/to/my/ada/files --output outputfile.ldi.xml
The resulting outputfile.ldi.xml can be loaded into Lattix via the “Ada” Module, or via the LDI Module.
Create ADA Project in Lattix Architect#
You can load the LDI file created above by selecting the “Ada Module”
Then select the “LDI” Datasource input. Select the LDI file that was created in the above step and click “Add Files”.
It is also possible to load the ADA data directly from Lattix Architect, skipping the above step running ltxada. Select the “Ada Module”.
Select the “Ada Files” radio button in “Datasources”. Then navigate to the directory that contains the Ada project and click “Add Directory”
Click the “Create Project” button