TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To:
Bill Taylor <[log in to unmask]>
Date:
Tue, 12 Oct 1999 10:49:45 -0700
Reply-To:
AdaWorks <[log in to unmask]>
Subject:
From:
AdaWorks <[log in to unmask]>
In-Reply-To:
Content-Type:
TEXT/PLAIN; charset=US-ASCII
MIME-Version:
1.0
Parts/Attachments:
TEXT/PLAIN (60 lines)
On Mon, 11 Oct 1999, Bill Taylor wrote:

> Rational Rose has an Ada add-in that successfully generates Ada 95 from UML.

I am including some UML diagrams in my book (in progress) and would love to
have some examples from the Rose add-in's to include, with attribution, of
course.

> Parameterised Classes map very well to generic packages, allowing any of the
> kind of formal parameter to be generated and the corresponding actuals to be
> supplied in the instantiation. Formal parameters don't fit well into UML but
> sufficiently for the required code to be generated.

I wonder if this includes generic formal signature pacakges. That is, those
packages that are little more than templates for generic formal pacakge
parameters.  This is one of the really powerful features of Ada 95 for
creating loosely-coupled generic reusable components.

> Child library units can be generated by specifying that a class is mapped to
> an Ada package called A.B - the semantics of the privateness of B cannot be
> captured in UML however.

Actually, as I see UML, the notion of privateness is not well represented for
most languages.  Even for C++, where the distinction is made between private,
protected and public, this is an implementation detail that seems to be
implied by the overall design and visibility requirements of the attributes.

More serious is the confusion of a private child unit with a class.  The
semantics are quite different.  In fact, it is that difference in semantics
that makes child library units such an attractive alternative to designing
every construct as a first-class object.

> By choice, a class can be mapped to a tagged type, a record type, a task
> type or a protected type, but in the last two cases inheritance cannot be
> supported.

This appears to be a fairly straightforward mapping.  The problem is that
the morphology of a protected type, for example, is seductively similar to
a class but the semantics are quite different.

Perhaps the real problem is reflected in the comments of Dr. Eachus where he
notes the emphaisis on using UML at a high-level of design and "decorating"
it with appropriate details.  It may be heretical to suggest, but I wonder
if there is a better approach than UML for Ada.  That is, are there good
alternative modeling notations and methods that more closely map to the
Ada language?

Richard


Richard Riehle
[log in to unmask]
AdaWorks Software Engineering
Suite 30
2555 Park Boulevard
Palo Alto, CA 94306
(650) 328-1815
FAX  328-1112
http://www.adaworks.com

ATOM RSS1 RSS2