MML Questions



Date view Thread view Subject view Author view

Kerry Raymond (kerry@dstc.edu.au)
Wed, 20 Dec 2000 17:25:06 +1000


I'm reading "A Feasibility Study of Rearchitecting UML ..." and got stuck reading Section 4.2.1 (Core model concepts). Since I assume it is fairly important to understand this section correctly, can someone please explain some of the well-formedness rules on page 36: [3] The parents of a generalisable elements must be of the same type. I assume "type" here means "meta-type" as opposed to "type" as in "An Attribute has a type which is a Classifier" as shown in Fig 8? Also, I assume that "same" means same as the child (as the OCL suggests) and not same as the other parents? However, this rule seems very strong in that the type of the child cannot be a subtype (child) of the type of the parent? Looking at 4.7.4, it seems that there is the concept of being of the same "kind". On the surface, requiring the child to be of the same kind as the parent (or the type of the child "conformsTo" the type of the parent) would seem less restrictive. Is there some reason why the stronger rule is used? [4] A generalisable element must conform to its parents. Not being an OCL expert, I'm not sure if I should read this rule as "if you conform, then you must be a child" or "if you are a child, then you must conform" or both. The English version suggests the latter. If specific sub-classes can define their own conformsTo function, then presumably a grandchild can conform to its parent and its parent conform to the grandparent, yet the grandchild does not conform to thegrandparent? Or is there some rule that forces all conformsTo functions to minimally require the conformance given on page 38? Is this the intention or does this rule need to be applied recursively? [5] The elements of a class contain its attributes. [6] The elements of an attribute contain its type. Looking at Fig 8, I see two associations with association ends called "elements" (Container to ModelElement, and Classifier to Generalisable). Are these two separate containment relationships or is the one between Classifier and Generalisable intended as a special case of the one betwen Container and ModelElement? If the latter, should this be understood as Classifiers can contain only Generalisable? In the absence of any rules prohibiting it, can such containments be circular? For example, a class X contains its attibutes which contain their type(which is class X)? Similarly, can one ModelElement be contained within many Containers? As I understand [5] and [6], a class does not directly contain its attributes, but rather there is an intervening Set. Similarly for attribute contains its type. However, in the example in Fig 26, the dog class appears to directly contain its breed attribute, and the breed attribute appears to directly contain the type String. If the dog class had had a second string-valued attribute "colour", would the type String have been shared between the two attributes or would there have been two separate types, each called String? Again, it may be my lack of OCL expertise, but the OCL of Rule 5 appears to be defining a Class's attributes in terms of "allAttributes" which is in turn defined as being the union of attributes of a Class and its parents. This seems to be a circular definition. Thanks in advance for any insight anyone can shed. Kerry =========================================================================== Dr Kerry Raymond, Distinguished Research Fellow kerry@dstc.edu.au CRC for Enterprise Distributed Systems Technology Ph: +61 7 3365 4310 University of Queensland 4072 Australia Fax: +61 7 3365 4311 ===================================================== www.dstc.edu.au/kerry


Date view Thread view Subject view Author view