Samuel Mize wrote,

> You could use a pre-processor or stand-alone tool too, of course.  But
> it would have to do some semantic analysis -- may as well use the
> compiler if you can.
>
> I don't know much about ASIS --

The magic of ASIS is that it *does* leverage the semantic analysis that
a compiler already performs. The compiler is an excellent (and ACVC
certified!) analysis engine -- so why reinvent one? But whereas the
compiler's goal is to produce executable code, ASIS plugs into the same
compilation results to produce *other* output, such as enforcement of
the class semantics you've been discussing.

> might it allow class-checking to be
> integrated into a tool suite WITHOUT being integrated into a specific
> compiler?  Kewl, d00d!

Well, yes and no. ASIS (the Ada Semantic Interface Specification) is
intended to be vendor and version independent; so a class-checking tool
like the one you have in mind could indeed be portable across multiple
compilers. The catch would be that those compilers would need to support
ASIS (some don't), and further, you would need to compile your code
first (ie, have it semantically analyzed) before applying the tool. So
in that sense, you *do* depend on a "specific compiler"... and the tool
is a post-processor, not a pre-processor; hence the Pragma approach
would be a viable way to go. As a real life example, I know of at least
on such ASIS-based tool (Ada Analyzer from Rational) that checks for the
Ada95 semantics of Pragma Pure and Pragma Preelaborate for Ada83 code.
Kewl indeed!

--

C. Daniel Cooper ==========v=======================.
Adv Computing Technologist | All opinions are mine |
206-655-3519               | and may not represent |
[log in to unmask]  | those of my employer. |
---------------------------^-----------------------<
The question is not "What is the answer?"; rather, |
the question is "What is the question?" --Poincare |
==================================================='