Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Generating Ada from UML on Linux

0 views
Skip to first unread message

Jacob Sparre Andersen

unread,
Aug 7, 2006, 5:50:21 AM8/7/06
to
I have to teach a course on software design with UML the upcoming
semester. Are there any Linux tools which can generate Ada code from
UML diagrams? Maybe even some Open Source tools?

I have found a package called "dia2code" on my Ubuntu system. Does
any of you have any experience with using it to generate Ada code from
UML diagrams? I have made some very simple experiments with it, and
it appears that it cannot express private attributes and operations
properly in Ada. Is that just me making a mistake? Or is it an error
in `dia2code`?

Jacob
--
Warning: Dates in calendars are closer than they appear.

Martin Krischik

unread,
Aug 7, 2006, 7:40:45 AM8/7/06
to
Am 07.08.2006, 12:50 Uhr, schrieb Jacob Sparre Andersen <spa...@nbi.dk>:

> I have to teach a course on software design with UML the upcoming
> semester. Are there any Linux tools which can generate Ada code from
> UML diagrams? Maybe even some Open Source tools?
>
> I have found a package called "dia2code" on my Ubuntu system. Does
> any of you have any experience with using it to generate Ada code from
> UML diagrams? I have made some very simple experiments with it, and
> it appears that it cannot express private attributes and operations
> properly in Ada. Is that just me making a mistake? Or is it an error
> in `dia2code`?

Well we also have xmi2code [1] which works with umbrello as UML tool.

Martin

[1] http://xmi2code.sourceforge.net/
[2] http://uml.sf.net/

--
Martin Krischik
kris...@users.sourceforge.net

okellogg

unread,
Aug 7, 2006, 9:08:12 AM8/7/06
to
Martin Krischik wrote:
>
> Well we also have xmi2code [1] which works with umbrello as UML tool.
>

While dia2code and xmi2code are close to unmaintained these days,
umbrello is alive and kicking. With umbrello you stand a much better
chance of getting possible problems fixed.

Just my EUR 0.02

Oliver M. Kellogg

Jacob Sparre Andersen

unread,
Aug 7, 2006, 9:18:58 AM8/7/06
to
Martin Krischik wrote:

> Well we also have xmi2code [1] which works with umbrello as UML
> tool.

Yes. It appears that the Ada code generator is included in the Ubuntu
package "umbrello". I would also say that it seems to work much more
like I would expect an UML to Ada converter to do.

Thanks for the pointer.

Jacob
--
"Don't get me wrong, perl is an OK operating system, but it
lacks a lightweight scripting language."

Colin Paul Gloster

unread,
Aug 9, 2006, 7:01:18 AM8/9/06
to
On Mon, 7 Aug 2006, Jacob Sparre Andersen wrote:

"I have to teach a course on software design with UML [..]

[..]"

Perhaps you should refuse to teach an inadequate modeling language which
is not a formal specification language.

Jacob Sparre Andersen

unread,
Aug 10, 2006, 6:59:44 AM8/10/06
to

Perhaps I should, but initially I am just refusing to teach the
students Java. And they will of course also be explained the
limitations of UML.

Which formal specification language would you suggest for teaching
undergraduate students? I am open to suggestions. Formal
specifications is not exactly my primary expertice. I can easily see
that UML is much too weak, compared to what we can implement in Ada,
but I am not aware of any more practical choices.

Greetings,

Jacob
--
The secret is to bang the rocks together.

Colin Paul Gloster

unread,
Aug 10, 2006, 1:06:54 PM8/10/06
to
On Thu, 10 Aug 2006, Jacob Sparre Andersen wrote:

"[..]

Which formal specification language would you suggest for teaching

undergraduate students? I am open to suggestions. [..]"

I am not sure which to suggest, a number of them also have weaknesses and
I do not know all of the good specification languages. VDM (specifically
VDM-SL) can be represented in ASCII but it has no reuse capability
whatsoever (e.g. it is not possible to write in VDM
predicate_p := some really long expression which will appear many times
predicate_q := some really long expression which will appear many times
predicate_r := some really long expression which will appear many times
if predicate_p and predicate_q
--...
elsif predicate_p or predicate_r
--...
else
--...). Z has this basic capability but is not expressible in ASCII (some
people write it in LaTeX but LaTeX can easily need several runs before
all interdependant references are resolved but still produces output
which if not thoroughly checked could be mistaken for a finished
document). Also, Z does not have any built-in temporal facilities.

Being an Ada course, the SPARK specification language might not be
irrelevant.

Georg Bauhaus

unread,
Aug 10, 2006, 2:50:16 PM8/10/06
to
On Thu, 2006-08-10 at 19:06 +0200, Colin Paul Gloster wrote:

> Z has this basic capability but is not expressible in ASCII

I wouldn't say you can get a nice 2D layout, but
you can get a fair bit of Z expressed in plain text.
Here is a formula randomly copied from a text book:

∃n : ℕ ∙ 6 + n = 4 ⋀ n = 2


-- Georg


Stephen Leake

unread,
Aug 12, 2006, 8:07:05 AM8/12/06
to
Jacob Sparre Andersen <spa...@nbi.dk> writes:

> Colin Paul Gloster wrote:
>> Jacob Sparre Andersen wrote:
>>
>> "I have to teach a course on software design with UML [..]
>>
>> [..]"
>
>> Perhaps you should refuse to teach an inadequate modeling language
>> which is not a formal specification language.
>
> Perhaps I should, but initially I am just refusing to teach the
> students Java. And they will of course also be explained the
> limitations of UML.
>
> Which formal specification language would you suggest for teaching
> undergraduate students?

In no sense is UML a "formal specification language"!

Ada is a better specification language than UML, if you are looking
for well-defined execution semantics.

As far as I can tell, the only advantage UML has over Ada is that you
can write it with a mouse - and personally, I consider that a
disadvantage :).

> I am open to suggestions. Formal specifications is not exactly my
> primary expertice. I can easily see that UML is much too weak,
> compared to what we can implement in Ada, but I am not aware of any
> more practical choices.

I understand there are good tools for Z (much better than just LaTeX),
but I have not used them.

--
-- Stephe

Jacob Sparre Andersen

unread,
Aug 14, 2006, 2:40:18 AM8/14/06
to
Stephen Leake wrote:
> Jacob Sparre Andersen wrote:
>> Colin Paul Gloster wrote:
>>> Jacob Sparre Andersen wrote:

>>> "I have to teach a course on software design with UML [..]
>>>
>>> [..]"
>>

>>> Perhaps you should refuse to teach an inadequate modelling


>>> language which is not a formal specification language.
>>
>> Perhaps I should, but initially I am just refusing to teach the
>> students Java. And they will of course also be explained the
>> limitations of UML.
>>
>> Which formal specification language would you suggest for teaching
>> undergraduate students?
>
> In no sense is UML a "formal specification language"!

Agreed. I hope I didn't give the impression that I consider UML a
formal specification language. It was Colin who suggested that I
rather than UML use a formal specification language.

> Ada is a better specification language than UML, if you are looking
> for well-defined execution semantics.

Yes.

> As far as I can tell, the only advantage UML has over Ada is that
> you can write it with a mouse - and personally, I consider that a
> disadvantage :).

Me too. But it is also an advantage that you easily can get a 2D
visual overview of a UML specification. I don't know any tools which
can do that for Ada, although I think it may be possible.

> I understand there are good tools for Z (much better than just
> LaTeX), but I have not used them.

I will take a look at them. I don't think I can switch the course
from UML to Z this year, but maybe I can be ready to do it next year.

Greetings,

Jacob
--
Rent-a-Minion Inc. Because good help is so hard to find.

Mark Lorenzen

unread,
Aug 14, 2006, 3:32:44 PM8/14/06
to
Jacob Sparre Andersen <spa...@nbi.dk> writes:

> I will take a look at them. I don't think I can switch the course
> from UML to Z this year, but maybe I can be ready to do it next year.

Jacob, as a Dane you should of course use RSL ;-)

- Mark

Jacob Sparre Andersen

unread,
Aug 15, 2006, 9:42:49 AM8/15/06
to
Mark Lorenzen wrote:
> Jacob Sparre Andersen wrote:

>> I will take a look at them. I don't think I can switch the course
>> from UML to Z this year, but maybe I can be ready to do it next
>> year.
>
> Jacob, as a Dane you should of course use RSL ;-)

Maybe I should. First time I hear about it. I'll get our library to
order some books on RSL/RAISE (if they haven't got some already).

Jacob
--
»If you're going to have crime,
it might as well be organized crime.« -- Lord Vetinari

Jacob Sparre Andersen

unread,
Aug 15, 2006, 10:27:37 AM8/15/06
to
Jacob Sparre Andersen wrote:
> Mark Lorenzen wrote:

>> Jacob, as a Dane you should of course use RSL ;-)
>
> Maybe I should. First time I hear about it. I'll get our library
> to order some books on RSL/RAISE (if they haven't got some already).

I took a look at the table of contents for Dines Bjørner's "Software
Engineering: Abstraction and Modelling". It looked much too
theoretical for my students. I have no intention of teaching them the
complete theoretical foundations of RSL, which seems to be the aim
with Dines Bjørner's book. Are there some more practically oriented
introductions to RSL?

Greetings,

Jacob
--
"War does not determine who is right - only who is left."
-- Bertrand Russell

Mark Lorenzen

unread,
Aug 15, 2006, 9:10:44 PM8/15/06
to
Jacob Sparre Andersen <spa...@nbi.dk> writes:

> Jacob Sparre Andersen wrote:
>
> I took a look at the table of contents for Dines Bjørner's "Software
> Engineering: Abstraction and Modelling". It looked much too
> theoretical for my students. I have no intention of teaching them the
> complete theoretical foundations of RSL, which seems to be the aim
> with Dines Bjørner's book. Are there some more practically oriented
> introductions to RSL?

That actually surprises me. I haven't looked at Dines Bjørner's books

http://www.amazon.co.uk/gp/product/3540211497/202-6720966-7982242?v=glance&n=266239&s=gateway&v=glance

http://www.amazon.co.uk/gp/product/3540211500/202-6720966-7982242?v=glance&n=266239&s=gateway&v=glance

http://www.amazon.co.uk/gp/product/3540211519/202-6720966-7982242?v=glance&n=266239&s=gateway&v=glance

but I thought they gave an introduction to to Software Engineering
using, for example, RSL. Dines usually focuses on practical
applications when writing text books. There are "pure" RSL books
available, but they are definately more theoretical, althought still
accessible.

There is of course always the problem of tool support (or lack of)
when one wants to use RSL.

Cheers,
- Mark

Colin Paul Gloster

unread,
Aug 21, 2006, 8:26:51 AM8/21/06
to
Jacob Sparre Andersen wrote:

"I took a look at the table of contents for Dines Bjørner's "Software
Engineering: Abstraction and Modelling". It looked much too
theoretical for my students. I have no intention of teaching them the
complete theoretical foundations of RSL, which seems to be the aim
with Dines Bjørner's book. Are there some more practically oriented
introductions to RSL?"

But he used to lecture RSL to students!

On Wed, 16 Aug 2006, Mark Lorenzen wrote:

"[..]

There is of course always the problem of tool support (or lack of)
when one wants to use RSL."

Check
WWW.IIST.UNU.edu/newrh/III/3/1/page.html
which is not the only source of an RSL tool.

0 new messages