Re: ANN: Ada source code decorator
- From: Martin Krischik <krischik@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 27 May 2006 10:59:24 +0200
Simon Wright wrote:
"Martin Krischik" <krischik@xxxxxxxxxxxxxxxxxxxxx> writes:
Manuel Collado wrote:
That's my case. I would love an ASIS export utility that provides
the full ASIS-accesible information about a single compilation unit
as a single XML document.
And I would like that format to be XMI [1]. What good woul be any
XML format when there are tools which can read it.
Martin
[1] http://en.wikipedia.org/wiki/XMI
I'm not at all sure that XMI is capable of representing _all_ of an
Ada program without extensions. And you would certainly have to make
some mapping decisions.
In the reverse direction, given a UML model, are you going to map a
Class to a package? to a tagged type? Either would be valid ... (and
would have its own difficulties).
UML has both Classes and Packages. If I was to make an UML <-> Ada mapping
then packages are mapped to Packages and type/subtype is mapped to Classes.
Unadorned Classes would become tagged types while adorned Classes could
become any other Ada type. Like (use an unproportional font for what
follows):
+-------------------+
| <<range>> Integer |
+-------------------+
^
|
| <<subtype>>
|
+-------------------------+
| <<range>> Day |
+-------------------------+
| First : Integer := 1 |
| Last : Integer := 31 |
+-------------------------+
Would become:
subtype Day is Integer range 1 .. 31;
and
+---------------+
| <<range>> Day |
+---------------+
| First := 1 |
| Last := 31 |
| Size := 8 |
+---------------+
Would become:
type Day is new range 1 .. 31;
For Day'Size use 8;
I think that this a full natural way of mapping Ada <-> UML - After all
'First and 'Last are called Attributes on both sides. And if you continue
the way of stereotypes then you can map all Ada feature to UML.
Martin
--
mailto://krischik@xxxxxxxxxxxxxxxxxxxxx
Ada programming at: http://ada.krischik.com
.
- Follow-Ups:
- Re: ANN: Ada source code decorator
- From: Simon Wright
- Re: ANN: Ada source code decorator
- From: Georg Bauhaus
- Re: ANN: Ada source code decorator
- References:
- ANN: Ada source code decorator
- From: Georg Bauhaus
- Re: ANN: Ada source code decorator
- From: Simon Wright
- Re: ANN: Ada source code decorator
- From: Stephen Leake
- Re: ANN: Ada source code decorator
- From: Jeffrey R. Carter
- Re: ANN: Ada source code decorator
- From: Stephen Leake
- Re: ANN: Ada source code decorator
- From: Manuel Collado
- Re: ANN: Ada source code decorator
- From: Martin Krischik
- Re: ANN: Ada source code decorator
- From: Simon Wright
- ANN: Ada source code decorator
- Prev by Date: Re: ANN: Ada source code decorator
- Next by Date: Re: ANN: Ada source code decorator
- Previous by thread: Re: ANN: Ada source code decorator
- Next by thread: Re: ANN: Ada source code decorator
- Index(es):
Relevant Pages
|
|