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-Thread: 103376,4c17e6ae73bd8c51 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.84.MISMATCH!xlned.com!feeder1.xlned.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Ada and UML Date: Thu, 02 Sep 2010 07:14:42 +0100 Organization: A noiseless patient Spider Message-ID: References: <4C7D7229.3000501@nowhere.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 2 Sep 2010 06:14:45 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="5808"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Uv2dmmUXNLn0jjIFJxAREPJzCpF9tUGg=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:Zb9fckPmaFR7VEZSULpkIUAymqM= sha1:MacyJ9k2MXwJUwntPMBau4jTBYE= Xref: g2news1.google.com comp.lang.ada:13906 Date: 2010-09-02T07:14:42+01:00 List-Id: "Yannick Duchêne (Hibou57)" writes: > Le Tue, 31 Aug 2010 23:20:41 +0200, nobody a écrit: >> Then the translation into code is just something mechanical. > > I do not really believe in automatic source generation from UML, as > there may be multiple possibilities. Or else, may be these systems use > something to tell “for This, use That”. 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). I am (was!) reasonably familiar with the ideas behind one approach to this, the one originating with Shlaer-Mellor OOA. You develop a model of your problem. This model is is precise enough that it can be translated, given a set of rules, into executable code, but it contains nothing about any specific platform (Ada, C, Java, ... / embedded, distributed, ...). Note, for UML specifically, this means you need precise semantics at the model level for this to be possible. You develop (or buy, or re-use) a translation engine which translates from that model to the platform you're using today. > 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. Bridgepoint presently from Mentor Graphics, http://www.mentor.com/products/sm/model_development/ iUML from Kennedy-Carter, http://www.kc.com/ (see 'Products') In both cases the actions (the part that does things) are written in a tool-specific programming language, and one of the jobs of the translation engine is to turn this into compilable code. Of particular interest to you, maybe, see http://www.kc.com/PRODUCTS/iccg/adacode.php where you are offered two Ada code generators, one for Ada 83 and one for SPARK (I don't know how the SPARK generator gets 'interesting' pre/post/invariant conditions in there; obviously the analyst is going to have to provide them).