Introduction |
A commad line tool for creating and building Understand for Ada databases is undada. It is a command line program that parses your Ada 83 or Ada 95 source code to populate the database with information that can be browsed or reported on.
Creating a new database is a two-step process. First create the database with the -createdb option and then load the files into the database with either the -add option. Once the database is initially populated, subsequent parsing is incremental, meaning that a file only needs to be re-parsed when it has changed, or something it depends on changes. Refer to the following sections for command line examples.
The command line options for undada are:
This example creates a database populated with the Standard library for Ada 95:
undada -create_95 -db myprojectThe resulting database, myproject.uda, can then be used in the analysis of Ada 95 source code.
Use -create_83 instead of -create_95 if you have entirely Ada 83 source code. Use -create_95 if you have a mixed Ada 93/Ada 95 project.
Tip: To save space, specify the Ada 83 option if you have only Ada 83 code. The Ada 95 library is six times larger.If you have a small amount of source files then it may be easiest to just supply their names to the analyzer using the wildcarding abilities of your operating system shell. In this example we will process all Ada specification files (.ads) and Ada body files (.adb):
undada -db myproject -add *.ads *.adbNote that in some cases there maybe too many files to use the -files technique. A common command line limitation is 255 characters. A directory with hundreds or thousands of files may easily exceed this limit. In this case, or when you want more fine-grained/repeatable control over what files are processed, then you should create a "process list file". This file, the format of which is one filename per line:
myproject.ads
myproject.adb
mainpackage.adb
is processed via the -process command line option:
undada -db myproject -add @myproject_files.lst
Note that there is no limit on the number of files.
On Unix here are a couple ways to create such a file:
- use the `ls' command, as inIn a Windows NT/95 command shell:
- use the dir command with the /b option:Once you have successfully parsed your code for the first time, keeping the database up to date is simple:
undada -db myproject -refresh
will check each file previously parsed into the repository to see if it has changed. If it has changed then it will re-parse it, and any files that depend on it (and so on) until the database is fully refreshed.
Use this feature to keep your database up to date while keeping your parsing to a minimum.
Suppose you have 3 separate areas in my project:
- Radar
Ideally you would like to create a repository matching the structure of your software, thus permitting you to have reports of your whole system, or of each individual system.
An example way to accomplish this is to create a database, and to use undada three times - once for each partition. For instance:
This creates a database that has 4 library partitions in it, Standard (there when you started), Radar, Avionics, and Test_Support. These libraries can then be browsed separately, or in combination. Reports can also be constrained as well.
Scientific Toolworks, Inc. http://www.scitools.com Voice: (802) 763-2995 Fax: (802) 763-3066 support@scitools.com sales@scitools.com |