comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pogner.demon.co.uk>
Subject: Re: pointers & OOP
Date: 1999/05/06
Date: 1999-05-06T00:00:00+00:00	[thread overview]
Message-ID: <x7v7lqmu4is.fsf@pogner.moho> (raw)
In-Reply-To: MVsZ8DAT0AM3EwF3@jr-and-assoc.demon.co.uk

John Robinson <john@jr-and-assoc.demon.co.uk> writes:

> Hence, a mapping from UML to Ada 95 should always map a single UML
> class box onto a package containing a single tagged type.  Although
> the language allows multiple tagged types to be declared in a single
> package it makes no sense whatsoever to do so.

It may make sense to have such a rule with regard to public
types. Indeed, you need some such translation rules between the UML
and the Ada or you are going to get lost (I suppose you could have a
'design' stage, where you map the UML onto the Ada using some other
formalism; I don't know enough about UML, perhaps it has this
technology inbuilt).

Perhaps there could be a set of patterns for recognising UML clusters
that should be translated into Ada using multiple-types-in-one-package.

However, I can see no need to restrict yourself with regard to private
types! of course, they are implementation support and so not likely to
appear in the UML anyway ..

I'm not holding out the Booch Components (well, anyway, the Ada95
version) as a stunning example of design, but consider the Graphs
package:

  generic
    [...]
  package BC.Graphs is

    [...]

    type Graph is abstract new Ada.Finalization.Limited_Controlled
       with private;
    type Graph_Ptr is access all Graph'Class;

    type Vertex is abstract new Ada.Finalization.Controlled with private;

    type Arc is abstract new Ada.Finalization.Controlled with private;

Clearly these three things are intimately intertwingled!




  parent reply	other threads:[~1999-05-06  0:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-01  0:00 pointers & OOP Matthew Heaney
1999-05-01  0:00 ` Matthew Heaney
1999-05-03  0:00 ` John Robinson
1999-05-03  0:00   ` Samuel Mize
1999-05-04  0:00     ` Martin C. Carlisle
1999-05-04  0:00     ` Robert Dewar
1999-05-04  0:00   ` Robert Dewar
1999-05-04  0:00     ` Mike Silva
1999-05-05  0:00     ` Francois Godme
1999-05-05  0:00     ` John Robinson
1999-05-05  0:00       ` Robert Dewar
1999-05-08  0:00         ` Ehud Lamm
1999-05-05  0:00       ` Matthew Heaney
1999-05-05  0:00       ` Robert Dewar
1999-05-05  0:00         ` John Robinson
1999-05-06  0:00           ` Brian Rogoff
1999-05-07  0:00             ` dennison
1999-05-07  0:00               ` Brian Rogoff
1999-05-10  0:00                 ` dennison
1999-05-11  0:00                   ` Jean-Pierre Rosen
1999-05-11  0:00                     ` dennison
1999-05-10  0:00             ` John Robinson
1999-05-14  0:00               ` Matthew Heaney
1999-05-14  0:00                 ` David Botton
1999-05-14  0:00           ` Matthew Heaney
1999-05-14  0:00             ` Ed Falis
1999-05-06  0:00       ` Tom Moran
1999-05-06  0:00         ` John Robinson
1999-05-06  0:00           ` Tom Moran
1999-05-07  0:00             ` dennison
1999-05-07  0:00             ` dennison
1999-05-07  0:00             ` dennison
1999-05-10  0:00             ` John Robinson
1999-05-14  0:00         ` Matthew Heaney
1999-05-06  0:00       ` Simon Wright [this message]
1999-05-06  0:00         ` John Robinson
1999-05-08  0:00           ` Simon Wright
1999-05-10  0:00             ` John Robinson
  -- strict thread matches above, loose matches on Subject: below --
1999-05-01  0:00 Tom Moran
replies disabled

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