Introduction

prevnext

Cross Referencing Project Information with Mark Reports


Overview

Understand for Ada offers a number of ways to cross reference Ada language items, for instance Packages, Functions, and Types. However, what about other things you may wish to keep track of, such as:

- Requirements - tracing requirements to implementation or design
- Authors - who wrote what code?
- Bugs - are there known bugs associated with this program unit? What known bugs are there and where are they found?
- TBD - things left to do
- Test Results - what has / hasn't been tested, what were the results?

And of course a number of other things.

Mark Reports offer a way to define what you want to cross reference and to then store information in the source code (where it is easy to maintain).

Working with Marks in your Source Code

The premise behind Mark Reports is that your source code is a good spot to document things about itself. To create a Mark Report simply place a comment of this form:

--+ mark_report_name mark_value [optional mark text to end of line]

Taking this line apart:

- --+ is the comment symbol used to tell analyze_ada that this comment is a Mark Report comment
- mark_report_name is the name of this mark report (no white space in the name). Each unique mark_report_name has a sub-report in the Mark Reports section of the ASCII or HTML output reports.
- mark_value is the value of the mark. No white space may be used. Each instance of this mark value is reported along with its location in the source and whatever optional mark text followed it.

For instance,

package Stack is
--+ tbd inspections needs a good walkthrough
...
Package List is
--+tbd test not tested yet

will result in a report structured as:

TBD
Inspections
Needs a good walkthrough
<< stack FILE: stack.ada LINE:4 >>
Test
Not tested yet
<< some_pack.nest1 FILE: new_mark.in LINE:15 >>

Example - Tracking Requirements

This type of marks setup would permit a report listing requirements and where they were met:

Package List is
--+ Requirements 2.2
--+ Requirements 2.3

Procedure Avionics;
--+ Requirements 3.1

Procedure TestSystem;
--+ Requirements 2.8
End;


Supporting older style ADADL marks

Understand for Ada fully supports old ADADL style marks (--&, --$, etc...). There is no need to retro-fit existing ADADL supported code. As such, this manual won't cover how to setup ADADL marks as we prefer that the new method described above be used in new code. If you need to know how ADADL marks work because you have inherited code that has them in it, consult the ADADL manual, or contact STI technical support.

prevnext


Scientific Toolworks, Inc.
http://www.scitools.com
Voice: (802) 763-2995
Fax: (802) 763-3066
support@scitools.com
sales@scitools.com