[Up]
[SIGAda]
[ACM]
ASIS for GNAT
Update - June 1995
We would like to bring to the attention of the ASISWG a little
information about the the current state of the ASIS for GNAT
implementation and our position concerning some open ASIS issues.
Sergey Rybin Alfred Strohmeier
(rybin@alex.srcc.msu.su) (alfred.strohmeier@di.epfl.ch)
Eugene Zueff
(zueff@such.srcc.msu.su) Swiss Federal Institute of
Technology
Moscow State University
I. ASIS for GNAT Implementation: the current state.
The initial version of the prototype implementation of the ASIS
interface for the GNAT compiler has been already implemented. It
allows to make up sample ASIS applications which could perform
simple structural decomposition of Compilation Unit down to the
statements/declarations level (for some kinds of statements and
declarations more detailed decomposition is also possible).
The ASIS specification to be implemented in the project has been
obtained by applying the ASIS 2.0.A Drafts to the ASIS 1.1.1
specification (so we are trying to implement some pre-prototype of
ASIS 2.X for GNAT) and we are looking forward for appearing the
first complete Draft ASIS specification for Ada 95.
II. ASIS Open Issues.
2.1. Library Model for ASIS 95.
The starting points for revising the ASIS Library Model for
ASIS/Ada 95 should include:
- Ada 95 does not even formally define the notion of the Compiler
Library and of the Obsolete Compilation Unit;
- All what is defined by Ada 95 LRM is related to the source texts
of the Ada Compilation Units.
- Some Ada 95 compilers could inherit their Library models
(together with the notions of the Program Library and Obsolete
Compilation Unit, which are defined rather strictly in RM83!)
from their Ada 83 "parents", but the other could use "novel"
approaches based on the "loose" definition of the compilation
process in Ada 95 LRM -- GNAT is an excellent example!
- ASIS Library-level and Compilation-Unit-level queries could be
subdivided into two parts:
- related to the content (=sources) of the library;
- related to the history of the (creation and modification of
the) library;
- History of the library:
- the principles of handling the history
may differ essentially among different compilers (depending on
at leas the smart recompilation techniques), GNAT does not
handle the history at all;
- Content of the library:
- the question is who should define the
content of the (Ada Program?) Library handled by ASIS
implementation and (through the ASIS interface) by Ada tool
working as ASIS application?
Our suggestions concerning the new ASIS Library model are:
- ASIS Library should have the compiler-independent definition and
it should be source-based;
- ASIS should work only with the content of the library but not
with the history of the library; all history-related queries
should be removed from ASIS or reformulated to make them more
(or completely, if it could be possible) content-oriented --
it would be a very few queries indeed;
- The content of the ASIS Library handled by an ASIS
implementation and processed by an Ada tool (ASIS application)
should be determined by the ASIS implementation, but not by the
compiler. Moreover, ASIS implementation could be even a
stand-alone tool (which does not require any compiler at all and
which could handle the arbitrary collections of Ada sources);
- ASIS Library should contain the Compilable Compilation Units
only (see RM95. 10.1.4); the notion of compilable unit may be
considered as the "weak" Ada 95 analog of the Ada 83 rules
defining the belonging of the Unit to an (Ada 83!) Library;
- The content of the ASIS Library should be frozen from the
Initialization till the Finalization of the ASIS Environment.
That means that ASIS is to process the snapshots of the
compilation environment of a compiler or of some set of Ada
sources;
We think that the GNAT compilation model could be used as the
initial prototype for defining the ASIS 95 Library Model.
2.2 ASIS Semantics for Ada Implicit Constructs.
Not long ago Sergey Rybin asked some questions concerning the
reasons for having differences between ASIS and Ada LRM semantics
of the Ada implicit constructs. He got the explanations from ASIS
"gurus" which could be summarized as:
- ASIS treatment of the Ada implicit constructs is much more
convenient for the vendor libraries, because implicit elements
are more hard and resource-consuming to process and to store by
a compiler library.
But what about GNAT? It could represent and process implicit
constructs just in the same way as explicit ones.
- ASIS treatment of the Ada implicit constructs is much more
convenient for ASIS users, because ASIS application usually
would like to see namely those constructs which have been
"explicitly" typed by programmer.
But the questions are:
- Is this the result of the consensus among ASIS users?
- Do ASIS users (as well as Ada compiler vendors) really like to
use two different formal models for just the same object -- the
content of the Ada Compilation Unit (even if these models could
be proved as being completely equivalent)?
And one more question concerning the latest plans to standardize
ASIS: could it be really possible to get the acceptance of the
ASIS as an (ISO) information technology standard having the direct
relation to the Ada 95 standard and having also formal
contradiction with Ada Standard?
We would suggest to revisit the ASIS semantics of Ada implicit
constructs once again. Our proposal is that ASIS should confirm
with Ada LRM in this aspect.
III. Announcement of a workshop about ASIS.
There are plans to organize an ASIS Workshop, on Friday October 6,
1995, during the
Ada in Europe 95
conference (October 2-6, Frankfurt, Germany). We will be the organizers
of the Workshop. We hope to mail out the corresponding announcement
soon.
In no case, this workshop will be a "competitor" with the work
done by your working group (the ASIS working group). Our goal is
to improve awareness of ASIS in Europe. The workshop may well
start by some kind of short tutorial for new-comers to ASIS, but
more technical issues will be tackled too. You are all welcome to
attend!
[Up]
[SIGAda]
[ACM]
Last update 9 June 1995. Questions, comments to
Clyde Roby (CRoby@IDA.Org)