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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fceb4e36ba4d570f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-27 12:18:01 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!212.74.64.35!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!pogner.demon.co.uk!zap!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada95 and UML Date: 26 Apr 2001 20:46:39 +0100 Organization: CodeFella Message-ID: References: NNTP-Posting-Host: localhost X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 X-Trace: news.demon.co.uk 988399051 nnrp-01:27196 NO-IDENT pogner.demon.co.uk:158.152.70.98 X-Complaints-To: abuse@demon.net NNTP-Posting-Date: 26 Apr 2001 19:46:39 GMT X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: newsfeed.google.com comp.lang.ada:7000 Date: 2001-04-26T19:46:39+00:00 List-Id: "Robert C. Leif, Ph.D." writes: > Simon writes: > > True; model + translation rules -> code. This is possible provided > > your model is expressed with the precision required by the translation > > rules[1]. > > What Simon writes is true of any formal rewriting system. > As stated, it maybe too general to be useful. > > Let us suppose, however, that in this context "model" is limited to > UML, and "code" stands for Ada. > > In this hypothetical situation, it should be possible to > go from the model to an executable, and not very many people > at all need to be concerned with the intermediate representation. > Assembly language or machine code is fine. No need to bother > anyone with Ada. Keep it simple. > > But my conceit misses the point of using modeling as > an abstraction to help understand the problem and/or the > solution. The model is deliberately more simple than the final > design and implementation. That is the nature of modeling. > To require the model to carry all the details seems misguided, > sophomoric, to me. I think we may be slightly at cross purposes here. So far the scheme I've been working on is a means of converting a UML model into a code skeleton, rather like what you can get from Aonix in StP. The point is that the model can and should contain all the problem-domain concepts, relations, policies etc[2] but shouldn't contain stuff about the implementation[0]; the translation engine (be it machine or human) which converts that representation into code is governed by rules designed by the software architect. The same translation rules can convert a model of a different problem domain into (skeleton[1]) code for the same runtime, or different translation rules can convert the same model into code for a different runtime. This isn't so far from the way that different compilers can generate different code for different architectures from the same source (eg, parallelizing Fortran compilers for vector processors). My feeling is that in many cases the Ada constructs that you might want to implement the model have no place in the model itself. I could never get excited about Raymond Buhr's notation, for example -- one might as well have just written the Ada! -S [0] Often you need 'guidance' information .. but rules like 'implement the container for this class using an Array rather than a Map if the Identifier is an integral or enumerated type with a range of less than 256 values' are perfectly feasible, provided you have enough control over the translation infrastructure. [1] Work is under way on a Precise Action Specification sceme for OMG, to become part of UML eventually -- so that the intellectual effort of fully understanding a problem domain, actions and all, can be reused at minimal cost. [2] I can't see why you would _want_ to have a model of the problem domain which was too vague to generate code from! You need to abstract away the implementation detail, sure, but why fuzz over problem detail? You need to be very sure about what the model actually means, can't do that if you leave stuff out and don't have a set of rules to tell you _precisely_ what the semantics of modelling constructs are. (rant off!)