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,cfcf6e3e7ade5a74 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-01 10:17:10 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newscon02.news.prodigy.com!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.com.POSTED!not-for-mail From: "Pat Rogers" Newsgroups: comp.lang.ada References: <3CED3807.5378EC9D@lmco.nospammmmmm.com> <9ff447f2.0205232202.2451c06e@posting.google.com> <9ff447f2.0205241831.51a00b60@posting.google.com> <9ff447f2.0205250715.53ddf36e@posting.google.com> <9ff447f2.0205302012.69da8f7c@posting.google.com> <9ff447f2.0205311903.631465e5@posting.google.com> Subject: Re: Free Ada UML tools Available (long) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <5k7K8.1039$LC4.482810033@newssvr11.news.prodigy.com> NNTP-Posting-Host: 208.191.182.164 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr11.news.prodigy.com 1022951809 ST000 208.191.182.164 (Sat, 01 Jun 2002 13:16:49 EDT) NNTP-Posting-Date: Sat, 01 Jun 2002 13:16:49 EDT Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: Q[R_PJONFJVMQVPXJZDBNFXBBZ\LPCXLLBWLOOAFJYWZUYICD^RAQBKZQTZTX\_I[^G_KGFNON[ZOE_AZNVO^\XGGNTCIRPIJH[@RQKBXLRZ@CD^HKANYVW@RLGEZEJN@\_WZJBNZYYKVIOR]T]MNMG_Z[YVWSCH_Q[GPC_A@CARQVXDSDA^M]@DRVUM@RBM Date: Sat, 01 Jun 2002 17:16:49 GMT Xref: archiver1.google.com comp.lang.ada:25161 Date: 2002-06-01T17:16:49+00:00 List-Id: "Adrian Hoe" wrote in message news:9ff447f2.0205311903.631465e5@posting.google.com... > > > Too bad, I don't have windows at my office and home. :) Here is the document that will (eventually) go into their help file (in html) describing the Ada 95 code generation: Ada 95 Code Generation For each master, a corresponding Ada package is generated in a separate file. If the master has a file name specified in its property sheet, this file name will be used for the generated file. Otherwise, the file name is determined as follows. If the namespace is specified in the master's property sheet, that namespace is used. If no namespace is specified, the master name is used. In any case, the file containing the package declaration will have an extension of "ads". Corresponding package bodies are generated in files having an extension of "adb". As each master is generated, its file names appear in the log window messages, e.g., "Generating: 'Foo.ads'". For each master, the file generated for the package declaration will contain the following: * For each master inherited/contained by this master, a with-clause is generated (e.g.: "with Bar;"). Clauses are also generated for packages referenced by types used for attributes and for generic formal object parameters (for template classes). * The class comment (if any) appears next. * The package declaration then appears, as follows: * A "primary" tagged type is generated within a corresponding package declaration to represent any single class in a diagram. (Other types are also generated as necessary.) A naming convention for the Ada package name and type name is used, based upon the names of the classes and the namespaces in the property sheets. Specifically, the namespace for the class is used as the package name and the class name is used as the primary type name. If the namespace is not specified, the class name becomes the package name and "Object" is used as the primary type name. This convention is used for all classes for which code is generated and is also reflected in the names referenced by with-clauses generated due to relationships in the diagrams. * The kind of type generated for the primary type depends upon the access control specifications for those things that can be components of the type: the attributes, the containments and the relations. If all (non-static/non- const) attributes are public, a simple Ada tagged type is generated with the attributes as visible record components. If none are public, a private tagged type is generated. If some attributes are public and others are not, a combination of private and non-private tagged types is used. Note that private non-const attributes are not truly private in the C++/Java sense -- they get protected/package visibility because they are placed within the primary type as record components so they can be referenced as part of individual object instances. To do otherwise would have the effect of making them static. * Containment relations are generated as components of the tagged type, using the specific type indicated. * Relationship declarations are generated as components of the tagged type, but use the access-to-classwide specific type for the relationship specified. * Derivations based upon inheritance in the diagram are handled in all the above cases. Note that, like Java, Ada only directly supports single inheritance. Violations are noted in the log. * An access type designating the primary tagged type is declared if the primary type is not abstract. * An access-to-class-wide type is declared, designating the class and any class ever derived from it. * Any exceptions defined by the master are declared. * Visible constant/static attributes are declared. * Visible methods defined by the master are declared. Methods specified as having a return value type are declared as functions; otherwise they are declared as procedures. Like some other object-oriented languages -- but unlike C++ and Java -- Ada doesn't use the "distinguished receiver" syntax of Object.Operation(params). The object to be referenced (that controls dynamic dispatch, etc.) is an explicit parameter of the method. If a method in an Ada package doesn't mention the primary tagged type (either as the type for a formal parameter, or, additionally for functions, as the type of the value returned), that method is not a "primitive operation" of the type and is not, for example, inherited by descendant types. Hence the script conditionally inserts a formal parameter named "This" during code generation, of the primary tagged type. (This insertion is controlled by the script's invocation options.) The parameter mode for This in all methods will be determined by the mode specification for the overall method. Thus, for const methods, parameter This will have mode "in"; for non-const procedures the mode will be "in out", and non-const functions will an access parameter. * Any exceptions propagated by any given visible method are indicated in a comment immediately following the method declaration. * All get/set methods requested for individual non-const/non-static attributes are declared. The "get" methods are declared as functions, with names that incorporate the corresponding attribute name. Specifically, the function names will start with the attribute name, followed by "_of". The formal parameter This will be inserted, following the rules described above for explicit methods, except that insertion is unconditional. Thus, an attribute named "Bar", of type Integer, for a type named "Foo", would be declared as follows: function Bar_of( This : Foo ) return Integer; The "set" methods are declared as procedures, with the name "Set". * The private part of the package is declared (if necessary) and the protected static/const attributes are declared, along with any type completions required from the visible part of the package declaration. For each master, a package body will be generated only if required, depending upon the content and access (visibility) specifications associated with the encapsulated declarations. For example, non-abstract methods require bodies and these are required to be within the corresponding package body. The file generated for the package body (if any) will contain the following: * Private static/const attributes are declared. These private attributes are sufficient to cause a package body to be generated even if no method bodies are necessary; pragma Elaborate_Body is generated in the package specification to make such bodies legal. Note, however, that a package body containing only attributes will have little use unless additional code is added to the body manually. * Private method bodies are generated, following the rules for the declarations described above. * Any subprogram bodies required to complete the method declarations occurring in the package declaration are generated. * An executable part, if any, is generated. This generation is controlled by the script invocation options.