From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5394d9ca5f955366 X-Google-Attributes: gid103376,public From: John Robinson Subject: Re: pointers & OOP Date: 1999/05/06 Message-ID: #1/1 X-Deja-AN: 474768852 X-NNTP-Posting-Host: jr-and-assoc.demon.co.uk:194.222.150.244 References: <$DL10CAsSgL3Iwj3@jr-and-assoc.demon.co.uk> <7gn7gr$fr5$1@nnrp1.dejanews.com> X-Trace: news.demon.co.uk 926003892 nnrp-06:19930 NO-IDENT jr-and-assoc.demon.co.uk:194.222.150.244 MIME-Version: 1.0 Newsgroups: comp.lang.ada X-Complaints-To: abuse@demon.net Date: 1999-05-06T00:00:00+00:00 List-Id: In article , Simon Wright writes >John Robinson 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). No I wouldn't say that any of this was "built in" to the UML but if you consider that the primary public type represents the data-centered heart of an object one can see that it acts as a hook onto which you may hang behaviour. Having two hooks inevitably means bringing more behaviour into one class with the danger that you then confuse the role of the class give too much responsibility to one class (resulting in increased maintenance overhead on that class). > >Perhaps there could be a set of patterns for recognising UML clusters >that should be translated into Ada using multiple-types-in-one-package. > Maybe, but it may be simpler to stick to a consistent mapping rule. >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 .. > Agreed. Similarly for "support" types, i.e. those built merely to support the declaration and/or use of the main type. In the Booch component is the arc a support type or an entity in its own right? The key factor (for me - and I am sure that I will get shouted at for saying this) is that if a type is associated with behaviour then this behaviour should be physically implemented in a dedicated, cohesive package. -- John Robinson John Robinson & Associates www.jr-and-assoc.demon.co.uk