comp.lang.ada
 help / color / mirror / Atom feed
From: Ray Blaak <blaak@infomatch.com>
Subject: Re: UML (Was: Ada to C++ translator?)
Date: 13 Feb 2001 22:19:29 -0800
Date: 2001-02-13T22:19:29-08:00	[thread overview]
Message-ID: <m3wvatlrbi.fsf@blight.transcend.org> (raw)
In-Reply-To: e6oi6.485$Sx5.63122@news.flash.net

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2226 bytes --]

"Ken Garlington" <Ken.Garlington@computer.org> writes:
> "Frode Tenneb�" <frodet@nvg.org> wrote in message news:ddo969.8qa.ln@leia...
> : And if it can do Ada -> UML -> Ada, why should it not manage
> : Ada -> UML -> C++ (or more desireable, C++ -> UML -> Ada)?

One of the realities of modeling in UML is that you can never become completely
independent of the target language.

For example, one tends to name things using the style of the target language
(e.g Do_Something vs DoSomething vs doSomething), and one tends to use when
necessary the primitive types of the target language for attribute types,
return and parameter types (e.g. Integer vs int, empty return type vs "void").

E.g. a UML method destined for Ada might look like this on a UML diagram:

  Do_Something(Right_Now : Integer)

for Java:

  doSomething(rightNow : int) : void

The types especially are the real problem. As the primitive types vary from
language to language, and as UML does not have any such primitive types, there
is no standard with which a code generator or reverse engineering tool could
automatically translate things.

Other nits: default parameters (Java doesn't have them, Ada and C++ do),
overall UML representation (C++ and Java use classes almost exclusively, Ada,
technically speaking has only packages, types, and routines -- the class
structure in UML for Ada has to follow some sort of convention), target
language types that don't map to UML (e.g. Ada's array types also need to have
some sort of convention to map them on to UML classes).

All these things directly affect the contents of the UML model, and the
conventions of representing UML for one language does not necessarily or even
usually apply to the conventions for another language.

The best you can do (and I have done this myself) is to reverse engineer into
UML, and run some sort script on the UML model to translate the primitive types
and conventions over.

--
Cheers,                                        The Rhythm is around me,
                                               The Rhythm has control.
Ray Blaak                                      The Rhythm is inside me,
blaak@infomatch.com                            The Rhythm has my soul.




  reply	other threads:[~2001-02-14  6:19 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-09 19:17 Ada to C++ translator? Robert Brantley
2001-02-09 20:48 ` Britt Snodgrass
2001-02-09 23:35   ` Jeffrey Carter
2001-02-09 23:47   ` Brian Rogoff
2001-02-12 15:07     ` Ted Dennison
2001-02-12 15:49       ` Brian Rogoff
2001-02-13 19:36         ` Ted Dennison
2001-02-12 20:25       ` David C. Hoos, Sr.
2001-02-11 10:36 ` Gautier
2001-02-11 11:15   ` Pascal Obry
2001-02-11 11:15   ` Jean-Pierre Rosen
2001-02-12 10:36     ` David C. Hoos, Sr.
2001-02-11 13:15   ` Larry Kilgallen
2001-02-11 14:50   ` Ken Garlington
2001-02-11 15:58   ` Florian Weimer
2001-02-11 17:05   ` Aaro Koskinen
2001-02-15 23:47   ` Robert Brantley
2001-02-16 15:20     ` Ted Dennison
     [not found]       ` <cyik6.1725$DE.61421700@newssvr10-int.news.prodigy.com>
     [not found]         ` <%Wvk6.102$aw5.380@www.newsranger.com>
2001-02-21  0:33           ` Ken Garlington
2001-02-21 10:54             ` Ole-Hjalmar Kristensen
2001-02-21 12:40               ` Ken Garlington
2001-02-21 12:56                 ` Ole-Hjalmar Kristensen
2001-02-21 18:36             ` Brian Rogoff
2001-02-21 19:05               ` Marin David Condic
2001-02-21 21:26                 ` Simon Wright
2001-02-23 21:05                   ` Marin David Condic
2001-02-24  8:38                     ` Simon Wright
2001-02-24 16:22                     ` Nick Williams
2001-02-24 19:22                       ` Marin David Condic
2001-02-24 19:38                         ` Ken Garlington
2001-02-25 15:21                           ` Marin David Condic
2001-02-12 15:33 ` Ted Dennison
2001-02-12 22:34   ` UML (Was: Ada to C++ translator?) Frode Tennebø
2001-02-14  4:48     ` Ken Garlington
2001-02-14  6:19       ` Ray Blaak [this message]
2001-02-14 20:38       ` Nick Williams
2001-02-15  7:57         ` Ray Blaak
2001-02-15 11:14           ` Pierre Dissaux
2001-02-15 23:37   ` Ada to C++ translator? Robert Brantley
2001-02-16  0:34     ` tmoran
2001-02-16  4:59       ` Lao Xiao Hai
2001-02-16 15:20         ` Marin David Condic
2001-02-16 11:02     ` Tarjei T. Jensen
2001-02-16 13:34       ` Ken Garlington
2001-02-16 14:55         ` Marin David Condic
2001-02-16 21:04         ` tmoran
2001-02-16 15:44     ` Ted Dennison
2001-02-21 13:21       ` Bob Jacobs
2001-02-21 14:14         ` Ted Dennison
2001-02-21 14:59           ` Bob Jacobs
2001-02-21 15:58         ` Martin Dowie
2001-02-21 16:15           ` Bob Jacobs
2001-02-21 16:57             ` Ted Dennison
2001-02-22  1:39               ` Andrew Berg
2001-02-22  9:47                 ` STL for Ada (was: Re: Ada to C++ translator?) Stefan Nobis
2001-02-22 15:20                   ` Lutz Donnerhacke
2001-02-22 15:30                   ` Ted Dennison
2001-02-22 17:55                   ` Brian Rogoff
2001-02-22  9:09             ` Ada to C++ translator? Martin Dowie
2001-02-22 13:32               ` Bob Jacobs
2001-02-22 14:30               ` Ted Dennison
2001-02-22  9:17             ` Martin Dowie
2001-02-15 23:09 ` Robert Brantley
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox