From: nobody <nobody@nowhere.com>
Subject: Re: Ada and UML
Date: Thu, 02 Sep 2010 22:33:48 +0200
Date: 2010-09-02T22:33:48+02:00 [thread overview]
Message-ID: <4C800A2C.1060800@nowhere.com> (raw)
In-Reply-To: op.vidpuceaule2fv@garhos
Yannick Duchêne (Hibou57) wrote:
> Le Tue, 31 Aug 2010 23:20:41 +0200, nobody <nobody@nowhere.com> a écrit:
>
> I do not really believe in automatic source generation from UML
Neither do I because
- UML is too large, writing a model translator to cover it would take
longer than writing the system you want to generate.
- UML makes it possible to create models with internal conflicts.
> Or else, may be these systems use
> something to tell “for This, use That”.
As Simon Wright commented. The thing we use is Executeable UML (xtUML).
I use bridgepoint. For C++ generation we use a model compiler from
Mentor for Ada we have built one from scratch.
Regarding the for this use that, use it happens. Often. But not always.
The model compiler is in many cases quite as capable as I to analyze the
model and decide if instances of one class should be allocated
dynamically or created once and for all in an array. If traditional
pointers or some other mechanism should be used for relations and so on.
> Just think that in Ada, you may
> have for example at least, where polymorphism is required, two ways to
> do (when feasible, sometime only one will applies) : static (via
> generics) and dynamic (via tagged or interface) polymorphism. How can a
> system know it should use this or that ? This requires a human
> analysis, to say “well, this can be statically known, so let's use
> static polymorphism” or else the opposite (just an example).
There are of cource such examples. But remember that when doing the
translation from model into code you have the whole model of your system
available in a databas and can can look at things from a much better
perspective than when you are coding a single file.
An easy to understand example is relations. If you draw a simple line in
the class model you state that there is a relation. But the model
compiler can look at every single line of code in your system to see if
you use it (navigate) or not. If it sees that you never use it, it wont
have to generate the code to maintain it and if it finds you only
navigate one direction it can add the code neded for it to be one way
only. (Now many hard core coders will feel lost, what does he mean one
way only, arn't they all? No in xtUML they are always bidirectional,
composite, aggregate and navigability as in UML does not exist).
> Your point makes me think about the so called “Executable UML”.
> Unfortunately, I do not know anything about it. I am just pretty sure
> this cannot be automated.
I think it can. We are in the process of completing a pretty large
system. Its got ~650 classes of which probably around 200 has state
machines. Generated system is > 3000 ada packages.
> If you wan to tell more... just do :)
Sorry, not allowed to give details. Call Mentor, ask for when John Wolfe
or Cortland Starret can be in your area, you want to have a look at
their system modelling products.
Simon mentioned distribution. We use that. In our system we can mark
classes and services as distributed. Then the model compiler generates
definition files for the broker and in the classes it generates all the
interface code needed to distribute things when it is updated.
So, do I have anything to complain about? Yes
- Price of the tool.
- Your first project will fail. Try to combine this knowledge with the
pricecs when you seek finansing.
- Availability of model compilers
- Constantly having to defend the method
- Performance of the model compiler. Coming from a world where a
recompile takes perhaps as long as 15 seconds entering a world where
regeneration/recompilation takes three hours is sometimes (read always)
hard. The generated code is probably faster than anything I could have
written myself.
Regarding SPARK I know just about nothing. I know there has been work on
modifying the Ada compiler to produce spark code. Do not know how far
that has gone or what efforts need to be done.
There has also been work on generating VHDL. Just think about it. Model
a system and end up with hardware specific for your problem.
One strange thing the non believers tend to bring up is that software
development needs to be fun. My comment is that I have now done this for
six years. It has been the most interesting years of my twenty as a
professional software developer. The productivity you can reach is
beyond anything I had imagined before.
next prev parent reply other threads:[~2010-09-02 20:33 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-31 10:12 Ada and UML Yannick Duchêne (Hibou57)
2010-08-31 11:05 ` Yannick Duchêne (Hibou57)
2010-08-31 11:54 ` Yannick Duchêne (Hibou57)
2010-08-31 16:34 ` Matteo Bordin
2010-08-31 21:20 ` nobody
2010-09-02 0:19 ` Yannick Duchêne (Hibou57)
2010-09-02 6:14 ` Simon Wright
2010-09-02 20:33 ` nobody [this message]
2010-08-31 23:14 ` Yannick Duchêne (Hibou57)
2010-08-31 23:31 ` Yannick Duchêne (Hibou57)
2010-09-01 8:20 ` Matteo Bordin
2010-09-01 18:44 ` Simon Wright
2010-09-01 21:56 ` Simon Wright
2010-09-02 1:18 ` Yannick Duchêne (Hibou57)
2010-09-02 10:25 ` Brian Drummond
2010-09-02 0:43 ` Yannick Duchêne (Hibou57)
2010-09-02 7:50 ` Georg Bauhaus
2010-09-02 23:05 ` Yannick Duchêne (Hibou57)
2010-09-03 4:19 ` Yannick Duchêne (Hibou57)
2010-09-03 6:54 ` Matteo Bordin
2010-09-03 10:20 ` Yannick Duchêne (Hibou57)
2010-09-03 11:33 ` sjw
2010-09-03 13:18 ` Hibou57 (Yannick Duchêne)
2010-09-03 16:14 ` Matteo Bordin
2010-09-04 14:51 ` Yannick Duchêne (Hibou57)
2010-09-06 9:21 ` Matteo Bordin
2010-09-07 18:25 ` Yannick Duchêne (Hibou57)
2010-09-03 16:16 ` Matteo Bordin
2010-09-03 19:39 ` Simon Wright
2010-08-31 18:25 ` Martin Krischik
2010-09-01 8:40 ` sjw
2010-09-02 0:22 ` Yannick Duchêne (Hibou57)
2010-09-02 4:48 ` J-P. Rosen
2010-09-02 10:34 ` Brian Drummond
2010-09-02 13:00 ` Robert A Duff
2010-09-02 13:24 ` Yannick Duchêne (Hibou57)
2010-09-10 20:13 ` Yannick Duchêne (Hibou57)
-- strict thread matches above, loose matches on Subject: below --
2001-08-04 9:55 Paul Foster
2001-07-10 10:54 Death by analogy Part 2 (was Re: is ada dead?) Robert C. Leif, Ph.D.
2001-07-10 16:58 ` Al Christians
2001-07-10 18:39 ` Michael P. Card
2001-07-10 20:39 ` Al Christians
2001-07-10 21:11 ` Michael P. Card
2001-07-11 5:25 ` Ada and UML raj
2001-07-11 9:40 ` David C. Hoos, Sr.
2001-07-13 19:00 ` Nick Williams
2001-07-13 19:46 ` Ted Dennison
2001-07-17 8:25 ` David Humphris
2001-07-16 0:56 ` Ken Garlington
2001-07-17 18:59 ` Simon Wright
2001-07-23 14:38 ` John Kern
2001-08-04 6:29 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox