Ada-AuditAda-Audit is a tool for creating, viewing, and maintaining a database of facts about Ada code.
For information on how to invoke Ada-Audit from the command line see the aa-audit manual page.
Facts are collected into tables, known technically as relations. Here is a sample table of facts:
| KIND | ID | DESCRIPTION | FILE | CONTEXT | LINE | NOTE |
|---|---|---|---|---|---|---|
| Error | E2 | Improper parameter initialization. | demo.a | Gun.Ready.Aim | 234 | |
| Indicator | I18 | Record representation clause present. | demo.a | Gun.Arm | 199 | |
| Violation | V10 | All blocks must be named. | example.a | Poll.UnitA | 321 | |
| Violation | V10 | All blocks must be named. | example.a | Poll.UnitC | 680 | |
| Violation | V13 | Anonymous type declarations not allowed. | example.a | Poll.UnitB | 201 | |
| Violation | V17 | Excessive subprogram body size. | demo.a | Gun.Ready | 122 | |
The columns of a table are knows as attributes. Thus, the table shown has seven attributes. The names of the attributes are displayed in boldface at the head of each column.
Each row of a table is one fact. Thus, each fact includes the following information:
Three of the attributes shown are hot links that can be used for navigation:
The set of column names of a table is known as its schema. The schema consisting of the seven columns shown, which is predefined in Ada-Audit, is named STYLE.
Tables are displayed in views. For example, here is a different view of the table shown above in which the KIND attribute is omitted and the facts are displayed by FILE:
| ID | DESCRIPTION | CONTEXT | LINE | NOTE |
|---|---|---|---|---|
| E2 | Impropper parameter initialization. | Gun.Ready.Aim | 234 | |
| I18 | Record representation clause present. | Gun.Arm | 199 | |
| V17 | Excessive subprogram body size. | Gun.Ready | 122 | |
| ID | DESCRIPTION | CONTEXT | LINE | NOTE |
|---|---|---|---|---|
| V10 | All blocks must be named. | Poll.UnitA | 321 | |
| V10 | All blocks must be named. | Poll.UnitC | 680 | |
| V13 | Anonymous type declarations not allowed. | Poll.UnitB | 201 | |
Some views aggregate facts and display summary counts. For example, here is a view in which facts are summarized by KIND:
| KIND | COUNT |
|---|---|
| Error | 1 |
| Indicator | 1 |
| Violation | 4 |
Attention can be restricted to a subset of the facts. For example, here is a view of the table restricted to facts with ID's between V10 and V13 displayed by DESCRIPTION:
| ID | FILE | CONTEXT | LINE | NOTE |
|---|---|---|---|---|
| V10 | example.a | Poll.UnitA | 321 | |
| V10 | example.a | Poll.UnitC | 680 | |
| ID | FILE | CONTEXT | LINE | NOTE |
|---|---|---|---|---|
| V13 | example.a | Poll.UnitB | 201 | |