Ada#

The Lattix Understand for Ada module produces LDM’s from Scientific Tools Understand for Ada cross reference databases (.udb files). Understand is an interactive development environment (IDE) designed to help maintain and understand large amounts of legacy or newly created code in a variety of langauges including ADA83, ADA95 and ADA05. It works well even if the source code does not compile or if the build environment is not setup.

You can obtain an evaluation version of Understand for Ada from http://www.getunderstand.com.

Configure Lattix to Work With Understand for Ada#

The Understand module uses a library from Scientific Tools to read Understand database files (*.udb). Installing Understand 2.0 installs the library and alters the system PATH environment variable to include the Understand installation.

On Windows, the Understand library is called udb_api.dll and is typically found in the C:Program FilesSTIbinpc-win32 directory. If after installing Understand LDM does not find the library, try logging out and logging back into your Windows session.

On Linux, the Understand library is called libudb_api.so and is found in the bin/pc-elf directory of your Understand installation. You can specify the location of your Understand installation by setting STI_HOME environment variable to point to the top of your Understand installation. Alternatively, the shell scripts start up LDM (i.e. ldm.sh) will attempt to locate your Understand installation. The scripts cache the results of this search, so the search is conducted only once.

Note that the Understand library from Scientific Tools is a 32 bit library. This means you need to run LDM using a 32-bit version of Java to use the LDM Understand module. Windows LDM ships with a 32 bit version of Java. Under Linux, you will need to install and use 32 bit Java if you are running on a 64 bit version of Linux.

Input to Create a New Project#

Once you have generated your uda (from Understand 1.4) or udb (from Understand 2.0) file, you can create a new project:

  1. Start LDM.

  2. Select File –> New Project.

  3. Select All from the list of Profiles.

  4. Select Ada from the Module Type drop down.

  5. Navigate and select the und or udb file in the file tree.

  6. Click on Add File to add the selected uda or udb file to the project. The Ada module supports loading only one file for each project.

  7. Click on Create Project.

You will see an initial DSM come up after the input has been processed.

Options#

Member Level Processing#

Using LDM’s member level functionality, files can be expanded to show relationships between their contents. Member level elements in Ada include task, package, package body, method, method body, type, data, exception etc. Note that large projects, with member level enabled, can run out of memory because it goes down to the level of methods and data. Most projects do not have to be concerned about reaching this limit.

Do Not Load Members

This is the default. By default, LDM creates a project whose elements are Source Files. It aggregates the references between the entities in your uda udb file as references between files.

Load Only Specified Members

You can specify the list of files which are expanded down to their members.

Load All Members

Members are enabled for the entire project.

Dependencies for Members#

Do Not Load Member Dependencies

If this option is turned on, the member are displayed but their dependencies are not turned on. This can keep memory consumption down, even while allowing update report to show exactly what members changed.

Load Member Dependencies

Member level dependencies are shown.

Note that you can also enable member level functionality after a project is loaded:

  1. Right click on a subsystem to bring up a list of menus. You can expand the entire project by right clicking on $root.

  2. Select Expand Members.

  3. If you did not have members turned on, a project update dialog will come up. Click OK to update the project.

Skip symbols matching this pattern#

Skip symbols matching these patterns filters out symbols whose names match a user specified list of perl style regular expressions. The match is case sensitive.

Atom Types and Dependency Kinds#

The following types of Atoms are supported:

  • Source File

  • Method

  • Task

  • Package

  • Data

  • Type

  • PlaceHolder

  • Exception

  • Package Body

  • Method Body

The following kinds of dependencies are supported:

  • Type

  • Method

  • Data

  • Package

  • File

Note that each of the dependency kinds has several subkinds as well. The filter dialog allows you to filter the view for specific types of atoms and dependency kinds.

Other Functionality#

Integrating with LDC: LDC is Lattix command line program which can be run as part of the build process for continuous monitoring of the architecture. LDC takes the uda/udb file generated by Understand for Ada as input. Understand for Ada also provides a command line tool for creating and updating the uda/udc file. This tool is called unda. You can instrument your build so that you first run unda and then run LDC. unda is documented in the Understand for Ada User Guide and Reference Manual.

View Source: You can view source for any of the subsystems directly from Lattix LDM. On Windows, Lattix will invoke the notepad program to display the source. However, you can also configure Lattix LDM to invoke Understand for Ada directly from the View Source menu.