Issue 15274: split the addition of generalization relationships among association in 14977 in two parts (uml2-rtf) Source: NASA (Dr. Nicolas F. Rouquette, nicolas.f.rouquette(at)jpl.nasa.gov) Nature: Uncategorized Issue Severity: Summary: Please create a new issue number to split the addition of generalization relationships among association in 14977 in two parts. Cases 2 and 3 below will remain in 14977 and the generalization relationships added for case 1 below will be moved to a resolution for this new issue number. This will give everyone in the RTF an opportunity to vote on the relationship between association end subsetting & association generalization separately from the fixes to the association end subsets. Resolution: Revised Text: Actions taken: June 5, 2010: received issue Discussion: End of Annotations:===== m: Steve Cook To: "juergen@omg.org" CC: "Rouquette, Nicolas F (316A) (nicolas.f.rouquette@jpl.nasa.gov)" Subject: FW: Issue 14977 -- Ballot 9 Resolution -- Does subsetting really imply generalization? Thread-Topic: Issue 14977 -- Ballot 9 Resolution -- Does subsetting really imply generalization? Thread-Index: AcsEEn+LgQ/Svd11Q7ecOY1dKgFDCAADt1mAAAGxegAABSVpgAAD0HkAAAIWWwAAAK0BgAAF8bWAAHo6AnA= Date: Mon, 7 Jun 2010 15:41:53 +0000 Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Juergen Just to confirm you received Nicolas.s message below? The title of the issue should be .Introduce association generalizations for subsetted properties.. Thanks! -- Steve From: Rouquette, Nicolas F (316A) [mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: 05 June 2010 07:20 To: Juergen Boldt Cc: uml2-rtf@omg.org; Ed Seidewitz Subject: Re: Issue 14977 -- Ballot 9 Resolution -- Does subsetting really imply generalization? Juergen, Please create a new issue number to split the addition of generalization relationships among association in 14977 in two parts. Cases 2 and 3 below will remain in 14977 and the generalization relationships added for case 1 below will be moved to a resolution for this new issue number. This will give everyone in the RTF an opportunity to vote on the relationship between association end subsetting & association generalization separately from the fixes to the association end subsets. - Nicolas. On Jun 4, 2010, at 8:30 PM, Ed Seidewitz wrote: Nicolas . As to the 182 associations with subsetting constraints on only one end, I actually don.t think this was really incorrect either. Subsetting is a constraint that a certain condition must hold between two properties. On the other hand, just because you can deduce that such a condition between two properties not mean that a subset constraint has to be explicitly modeled between those properties. In other words, while I agree that subsetting between association ends on one side of two association implies the effective condition of subsetting between the ends on the other side, I do not agree that this requires that subsetting be explicitly modeled between the latter pair of association ends. A subsetting annotation is an assertion, not a record of a deduction. I might agree that it is, nevertheless, clearer to include explicit subset annotations explicitly in the model, but their lack was really no big problem with the metamodel. Finally, adding generalization between associations does change the semantics of the model, in a very fundamental way, I believe. As I noted before, generalization asserts subsetting of extents. With the lack of generalization, there is no such insertion. On the other hand, if adding the generalizations does not change the meaning of the association involved, then there really is no point in adding them, since they just complicate the model. Again, unless there is a strong feeling otherwise on the part of the rest of the RTF (who we haven.t heard from yet), I think the most prudent thing to do at this late point is to simply withdraw the resolution. But if you can quickly (by Monday) update it so that generalizations are only added in your cases 2 and 3, I might be able to support that. -- Ed -------------------------------------------------------------------------------- From: Rouquette, Nicolas F (316A) [mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: Friday, June 04, 2010 11:11 PM To: Ed Seidewitz Cc: uml2-rtf@omg.org Subject: Re: Issue 14977 -- Ballot 9 Resolution -- Does subsetting really imply generalization? Ed, The simplicity you allude to is rooted in the notation conventions in the spec (clause 6.4). The fact that for many years we've equated what's shown in diagrams to what's in the metamodel has contributed to an accumulation of mistakes. Late in UML 2.3, we found that 182 associations had subsetting constraints only on one end, not both. A lot of these cases in fact come from the notation conventions where the missing subsetting constraints were not shown in diagrams per conventions defined in 6.4. What the UML has failed to do so far is to define explicitly the rules for architecting a metamodel; subsetting & redefinition are important mechanisms for that. We will need to explain this properly after UML 2.5 but not before. As far as UML 2.4 is concerned, I made sure that association generalizations reflect one of 3 cases: 1) symmetric subsetting 2) symmetric redefinition 3) one end has a subsetting constraint; the opposite end a redefinition constraint (2) and (3) require an explicit generalization relationship. For (1), we disagree about whether an explicit generalization relationship is required. I hope that in 2.5 or soon afterwards, we'll define a metaclass for Link and clarify the semantics of subsetting/redefinition properly. I hope you can at least recognize that adding an explicit generalization relationship does not change in any way the meaning of the associations involved (specific or general). If you do, then I hope you may appreciate that having such relationships explicitly in the metamodel can be valuable for, e.g., tool vendors, who reported implementation-related problems with the way certain associations fail to properly subset others -- e.g., 14926. In that context, explicit generalization relationships help clarify how associations "stack up" in terms of how subsetting/redefinition is used. In particular, I'm more concerned about (3). Dave Hawkins provided a valuable insight that redefinition in one end implies, at minimum, subsetting on the opposite end (unless both ends are redefining). This argument is subtle. Again, it's a topic to be explained in 2.5 or later. However, because it is currently used in several places in the metamodel, it is clearly important to make sure that tool vendors clearly understand what's going on. Unfortunately, the current notation for subsetting & redefinition is inherently ambiguous since the subsetted/redefined ends are designated by name (ambiguous) instead of qualified name (unambiguous) - Nicolas. On Jun 4, 2010, at 7:11 PM, Ed Seidewitz wrote: Nicolas . No, I still don.t agree with you. I claim that my explanation of subsetting is actually simpler than yours, since it doesn.t require the introduction of generalization relationships that no one seemed think necessary before. Especially since the pre-2.3 text explicitly states that subsetting does not imply specialization. That is why the subsetting constraints are on the association ends not the association. Redefinition, on the other hand, is explicitly defined to apply only in the case of specialization . there is no such formal constraint for subsetting. The redefinition constraints are still on the ends, but the generalization relationship is required between the associations in order to provide a proper redefinition context. This is the whole point, I think, of having two different such mechanisms. I also think your implementability argument is a red herring. I don.t know of any UML metamodel implementations that actually create links, anyway. They just maintain references in attributes. And consider this: Element::ownedElement and Namespace::ownedMember are different properties, owned by Element and Namespace, not by the associations. And Namespace inherits ownedElement, so it has both Namespace::ownedElement and Namespace::ownedMemnber properties What does it mean for all the links you mention to be the .same. when there are multiple different end properties? Note that this is not a problem with redefinition, because, of Namespace::ownedMember redefined Element::ownedElement, then it would semantically be the same property. This is a fundamental difference between redefinition and subsetting, and it really only makes sense because subsetting does not imply specialization. In any case, I am not sure the two of us are going to come to any agreement before Monday. Having to argue this out was exactly what worried me about trying to get this done at the last minute in this RTF. And not having these generalization relationships in there has not seemed to be a showstopper for anyone implementing UML, so far as I know. So, unless everyone else agrees that it is obvious that subsetting implies association specialization, I would ask that this resolution either be withdrawn for UML 2. or restricted to only 1) providing symmetric subsetting constraints where appropriate and 2) adding generalization relationships between associations only where redefinition is involved. -- Ed -------------------------------------------------------------------------------- From: Rouquette, Nicolas F (316A) [mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: Friday, June 04, 2010 8:22 PM To: Ed Seidewitz Cc: uml2-rtf@omg.org Subject: Re: Issue 14977 -- Ballot 9 Resolution -- Does subsetting really imply generalization? Ed, See below. On Jun 4, 2010, at 2:54 PM, Ed Seidewitz wrote: Nicolas . It boils down to this: Something is a generalization in a UML model if and only if it is modeled to be so. This statement is misleading; it's ostensibly false on face value because generalization is a transitive relationship among classifiers. For example if A specializes B and B specializes C, then A (indirectly) specializes C and this doesn't require an explicit generalization. Having generalization implies certain things. Conversely, certain UML constructs are invalid without generalization relationships. At least, we're in agreement that redefinition of association ends requires association generalization (direct or indirect). Just because those things may also hold in other cases does not imply that you can .infer. a generalization, or that a generalization is required. Of course. In particular, I do disagree with the following statements: By the definition of what subset is and the extensional semantics of an association, it follows that the set of links of an association with the subsetting ends must be a subset of the set of links of the association whose ends are subsetted. Therefore, the set of links of the subsetting association must be a subset of the set of links of the subsetted association. First of all, the definition of subsetting does not imply that the .set of links of an association with the subsetting ends must be a subset of the set of links of the association whose ends are subsetted.. We obviously disagree about this. All it implies is that there is a correspondence between the links of the first association and a subset of the links of the second association. I claim that the simplest explanation about the UML is that this correspondence is that the set of links of the association with the subsetting ends is precisely a subset of the set of links of the association whose ends are subsetted. The links of the first association are not links of the second association at all, regardless of the correspondence of values at the ends. I strongly disagree with this claim. The correspondence places a constraint on the extents of the two associations, but it does not make the extent of the first association a subset of the extent of the second association. It is the sets of values at the ends of the associations that are subsetted, not the associations themselves. A generalization relationship, on the other hand, does imply that the extent of the special classifier be a subset of the extent of the general classifier . that is, that every instance of the special classifier is an instance of the general classifier. But you only get this if you explicitly model it, never implicitly. If one association is a specialization of another, this does necessarily imply that the ends of the first association subset the ends of the second . but the converse is not true. There is no constraint in the UML spec that requires that an association that subsets the ends of another association must be a specialization of that association. As a specific example, consider associations A and B with two association ends x and y. Suppose the ends of A subset the corresponding ends of B. Then the following would be a legal snapshot of the extents of A and B: Extent of A: A(x=>a, y=>b) A(x=>c, y=>d) Extent of B: B(x=>a, y=>b) B(x=>c, y=>d) B(x=>e, y=>f) B(x=>g, y=>h) The subsetting constraints hold because the set of values of A::x, {a,c} is a subset of the set of values for B::x, {a,c,e,g}, and similarly for the A::y and B::y. Further, because of the required relationship between ends of associations, for the two links in the extent of A, there are corresponding links in the extent of B with the same end values. But, even though they are corresponding, the links in the extent of B are different links. If the links were different, the UML metamodel itself would be horribly inefficient to implement. Consider A = A_ownedElement_owner B = A_ownedAttribute_class The subsetting is stacked: A_ownedElement_owner A_ownedMember_namespace A_attribute_classifier A_ownedAttribute_class So, if we have a class, Foo, with an attribute, Foo::x : Integer, then you are claiming we'd have 4 distinct links for each of the associations above: A_ownedElement_owner (owner=Foo, ownedElement=Foo::x) A_ownedMember_namespace (namespace=Foo, ownedMember=Foo::x) A_attribute_classifier (classifier=Foo, attribute=Foo::x) A_ownedAttribute_class (class=Foo, ownedAttribute=Foo::x) I hope you will recognize that in fact there's only one link here. It would be extremely inefficient if, deleting Foo::x, required updating separately all 4 associations. Can you provide at least one example of an implementation of the UML where the meaning of association end subsetting is one of *disjoint* links whose end values are *equal*? I am not aware of any implementation that treats association end subsetting in the manner you described above. However, all of the implementations I've used do behave in precisely the manner I've described, i..e., subsetting of association ends entails subsetting of the association links. On the other hand, if A were a specialization of B, then the extent of B would necessarily include the extent of A: Extent of B: Extent of A: A(x=>a, y=>b) A(x=>c, y=>d) B(x=>e, y=>f) B(x=>g, y=>h) This is a different situation, and it only applies if A is explicitly modeled as a specialization of B. Now, maybe you would like to argue that it would be a better model if the association generalizations are there. The UML metamodel is certainly semantically more consistent and reflects the way current implementations of the UML work. In the above example, to create the attribute Foo::x, it suffices to add it only once to A_ownedAttribute_class and it will also present in all 3 (parent) associations. Conversely, it suffices to delete it from A_ownedAttribute_class to also delete from all other 3 associations. What else could it be except specialization of association *links* ? But that is a different argument, and one that we don.t have the time to discuss any longer. If we had a Link metaclass in the UML like MOF does, then it would be a lot easier to explain the semantic implication of association end subsetting on the links of the subsetting/subsetted association. After all, the original modelers chose to generally use subsetting rather than redefinition, which means that they specifically did not want to use association generalization (per the discussion I quoted in the Association Semantics section). It's difficult to tell what was the original intent behind these constructs. On the basis of how they are currently defined in the spec, I believe that the semantic effect of association end subsetting is precisely that of subsetting association links. This is the simplest explanation that makes sense w.r.t. what these terms mean in computer science and how most tools have implemented the UML. In any case, it is out of scope of this RTF to just try to make the metamodel .better. rather than correct a serious error. So, if there is no requirement for association generalization in the case of subsetting, and the desire is to preserve the current intent of the metamodel, then it is certainly not appropriate to change the metamodel to add unnecessary generalizations. I don't accept your argument. Please review the above and let me know if you still disagree after this. - Nicolas. -- Ed -------------------------------------------------------------------------------- From: Rouquette, Nicolas F (316A) [mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: Friday, June 04, 2010 5:06 PM To: Ed Seidewitz Cc: uml2-rtf@omg.org Subject: Re: Issue 14977 -- Ballot 9 Resolution -- Does subsetting really imply generalization? Thank you Ed for bringing this up before the voting phase started. Despite several issues asking for better explanations in the spec, we have yet to clearly explain what extensional vs. intensional semantics is in a metamodel. The extensional semantics of Class & Association is hinted at in the Description subclauses for 7.3.7 and 7.3.3 respectively: A class describes a set of objects that share the same specifications of features, constraints, and semantics. An association specifies a semantic relationship that can occur between typed instances. The current specification document does not make a clear explanation about: - extensional semantics is about the instances that define the extent of a classifier - intensional semantics is about the features & constraints that characterize membership in the extent of a classifier One could find perhaps better wording for these definitions. I emphasize these because they are particularly relevant for the description of Generalization in 7.3.20: A generalization is a taxonomic relationship between a more general classifier and a more specific classifier. Each instance of the specific classifier is also an indirect instance of the general classifier. Thus, the specific classifier inherits the features of the more general classifier. Unfortunately, the UML mixes aspects of extensional/intensional semantics quite often. For example, the 2nd sentence above is clearly about the relationship between the extensional semantics of a specific classifier to the extensional semantics of a general classifier. Conversely, the 3rd sentence above is clearly about the features that are part of the intensional semantics of a classifier; however, the relationship is incompletely described here. Going back to 7.3.3, the semantics subclause then clearly relates subsetting to extensional semantics & redefinition to intensional semantics. When we *explicitly* define an association whose ends subset those of another association, we *explicitly* indicate that there is a relationship between the extensional semantics of the association with the subsetting ends to the extensional semantics of the association with the subsetted ends. By the definition of what subset is and the extensional semantics of an association, it follows that the set of links of an association with the subsetting ends must be a subset of the set of links of the association whose ends are subsetted. Therefore, the set of links of the subsetting association must be a subset of the set of links of the subsetted association. If you disagree with this particular reasoning, please let me know what explicitly you disagree with. Note that the explanation above has been an important aspect of the language architecture of the UML since UML 2.0 We rely on this extensively for all derived union properties (e.g., A_ownedElement_owner and all of its extensive specialization) I believe that your objection stems from mixing two different things: that association end subsetting implies association generalization due to the extensional semantics of association and a concern whether the changes made to the metamodel have, somehow, changed the meaning of certain associations in the metamodel. That concern is a valid one and I strongly relate to it. In fact, I've been particularly worried about this because the OCL "bad smell" queries I wrote earlier had found so many places where a fix needed to be made that it was clear to me we couldn't fix the metamodel as we did in 2.3; the risk for error was too great. I'm pleased to say that we've addressed this concern. First, I made "detailed" UML diagrams of everything I worked on related to this and all other issues I worked on in ballot 9. These detailed diagrams have been particularly useful to make sure that the changes made reflect the *current* intent of the metamodel. For example, look at the detailed diagram corresponding to Figure 12.5 in Activities: From: "Rouquette, Nicolas F (316A)" To: "uml2-rtf@omg.org" CC: "Jenkins, J Steven (3101)" Date: Mon, 7 Jun 2010 13:41:01 -0700 Subject: Re: issue 15274 -- UML 2 RTF issue -- clarification about association end subsetting & association specialization. Thread-Topic: issue 15274 -- UML 2 RTF issue -- clarification about association end subsetting & association specialization. Thread-Index: AcsGgb3vwD0OxVybR3CrtDJp0pCzmA== Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-Source-IP: altvirehtstap02.jpl.nasa.gov [128.149.137.73] X-Source-Sender: nicolas.f.rouquette@jpl.nasa.gov X-AUTH: Authorized I'm very grateful to Steven Jenkins with whom I've been working on the integration of OWL2 & UML/SysML at JPL to have helped me sort out the subtle relationship (no pun intended) between association end subsetting & association specialization. In short: Symmetric association end subsetting does not necessarily imply that the subsetting association specializes the subsetted association. In that sense, Ed is right, subsetting is a constraint of the extent of the association end properties and there is no logical implication one can categorically make about the relationship of the extent of the links in the subsetting association vs. the links in the subsetted association. Steve came up with a simple example to explain this: Class Man; Class Woman; Association Married { husband : Man, wife : Woman }; Class MarriedManInMarriageCounseling extends Man; Class MarriedWomanInMarriageCounseling extends Woman; Association WorkingInMarriageCounselingPair { simulatedHusband : MarriedManInMarriageCounseling, simulatedWife : MarriedWomanInMarriageCounseling }; A man who is involved in the WorkingInMarriageCounselingPair association is not necessarily the husband of his simulatedWife. I hope this example suffices to make the above point without any implication about pro/con views on same-sex marriage. However, the UML metamodel is a very peculiar kind of model built using a few idioms that have been applied extensively in the infrastructure and superstructure. For example, when we combine association subsetting with derived unions, we get a tree of associations that disjunctively specialize a root, abstract association whose ends are derived or derived unions (e.g., A_ownedElement_owner). In such cases, association end subsetting is insufficient to necessarily guarantee that, e.g., a link instance of A_ownedAttribute_class is necessarily a link instance of the root association, i.e., A_ownedElement_owner. In practice, we do expect this to be true and tools have been designed & implemented to behave this way. The point here is that for such kinds of subsetting associations, there is a logical difference having vs. not having the generalization relationships explicitly present in the metamodel. Without them, we cannot logically explain what UML tools do today for example. When such generalization relationships are explicitly present in the metamodel, we can use them for various things including modeling guidance, well-formedness checking and, in JPL's case, a precise integration between UML/SysML and OWL2. So, rather than completely approve or reject the use of generalization relationships in 15274, I hope that the RTF members and in particular tool implementors as well as demanding users will provide constructive feedback where the use of such generalization relationships is distorting the meaning of the metamodel (in which case we shall remove them) or clarifying an important semantic property of the metamodel (in which case we shall keep them). I hope this will provide a more constructive and positive approach to address this issue; I apologize to Ed and the rest of the RTF for letting this discussion escalate this way; however, I believe it can help make 2.4 a better UML than 2.3 was without being out of scope w.r.t. what we set ourselves to do back in Jacksonville. - Nicolas. On Jun 7, 2010, at 8:55 AM, Juergen Boldt wrote: From: Rouquette, Nicolas F (316A) [ mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: 05 June 2010 07:20 To: Juergen Boldt Cc: uml2-rtf@omg.org; Ed Seidewitz Subject: Re: Issue 14977 -- Ballot 9 Resolution -- Does subsetting really imply generalization? Juergen, Please create a new issue number to split the addition of generalization relationships among association in 14977 in two parts. Cases 2 and 3 below will remain in 14977 and the generalization relationships added for case 1 below will be moved to a resolution for this new issue number. This will give everyone in the RTF an opportunity to vote on the relationship between association end subsetting & association generalization separately from the fixes to the association end subsets. - Nicolas. On Jun 4, 2010, at 8:30 PM, Ed Seidewitz wrote: Nicolas . As to the 182 associations with subsetting constraints on only one end, I actually don.t think this was really incorrect either. Subsetting is a constraint that a certain condition must hold between two properties. On the other hand, just because you can deduce that such a condition between two properties not mean that a subset constraint has to be explicitly modeled between those properties. In other words, while I agree that subsetting between association ends on one side of two association implies the effective condition of subsetting between the ends on the other side, I do not agree that this requires that subsetting be explicitly modeled between the latter pair of association ends. A subsetting annotation is an assertion, not a record of a deduction. I might agree that it is, nevertheless, clearer to include explicit subset annotations explicitly in the model, but their lack was really no big problem with the metamodel. Finally, adding generalization between associations does change the semantics of the model, in a very fundamental way, I believe. As I noted before, generalization asserts subsetting of extents. With the lack of generalization, there is no such insertion. On the other hand, if adding the generalizations does not change the meaning of the association involved, then there really is no point in adding them, since they just complicate the model. Again, unless there is a strong feeling otherwise on the part of the rest of the RTF (who we haven.t heard from yet), I think the most prudent thing to do at this late point is to simply withdraw the resolution. But if you can quickly (by Monday) update it so that generalizations are only added in your cases 2 and 3, I might be able to support that. -- Ed -------------------------------------------------------------------------------- From: Rouquette, Nicolas F (316A) [ mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: Friday, June 04, 2010 11:11 PM To: Ed Seidewitz Cc: uml2-rtf@omg.org Subject: Re: Issue 14977 -- Ballot 9 Resolution -- Does subsetting really imply generalization? Ed, The simplicity you allude to is rooted in the notation conventions in the spec (clause 6.4). The fact that for many years we've equated what's shown in diagrams to what's in the metamodel has contributed to an accumulation of mistakes. Late in UML 2.3, we found that 182 associations had subsetting constraints only on one end, not both. A lot of these cases in fact come from the notation conventions where the missing subsetting constraints were not shown in diagrams per conventions defined in 6.4. What the UML has failed to do so far is to define explicitly the rules for architecting a metamodel; subsetting & redefinition are important mechanisms for that. We will need to explain this properly after UML 2.5 but not before. As far as UML 2.4 is concerned, I made sure that association generalizations reflect one of 3 cases: 1) symmetric subsetting 2) symmetric redefinition 3) one end has a subsetting constraint; the opposite end a redefinition constraint (2) and (3) require an explicit generalization relationship. For (1), we disagree about whether an explicit generalization relationship is required. I hope that in 2.5 or soon afterwards, we'll define a metaclass for Link and clarify the semantics of subsetting/redefinition properly. I hope you can at least recognize that adding an explicit generalization relationship does not change in any way the meaning of the associations involved (specific or general). If you do, then I hope you may appreciate that having such relationships explicitly in the metamodel can be valuable for, e.g., tool vendors, who reported implementation-related problems with the way certain associations fail to properly subset others -- e.g., 14926. In that context, explicit generalization relationships help clarify how associations "stack up" in terms of how subsetting/redefinition is used. In particular, I'm more concerned about (3). Dave Hawkins provided a valuable insight that redefinition in one end implies, at minimum, subsetting on the opposite end (unless both ends are redefining). This argument is subtle. Again, it's a topic to be explained in 2.5 or later. However, because it is currently used in several places in the metamodel, it is clearly important to make sure that tool vendors clearly understand what's going on. Unfortunately, the current notation for subsetting & redefinition is inherently ambiguous since the subsetted/redefined ends are designated by name (ambiguous) instead of qualified name (unambiguous) - Nicolas. On Jun 4, 2010, at 7:11 PM, Ed Seidewitz wrote: Nicolas . No, I still don.t agree with you. I claim that my explanation of subsetting is actually simpler than yours, since it doesn.t require the introduction of generalization relationships that no one seemed think necessary before. Especially since the pre-2.3 text explicitly states that subsetting does not imply specialization. That is why the subsetting constraints are on the association ends not the association. Redefinition, on the other hand, is explicitly defined to apply only in the case of specialization . there is no such formal constraint for subsetting. The redefinition constraints are still on the ends, but the generalization relationship is required between the associations in order to provide a proper redefinition context. This is the whole point, I think, of having two different such mechanisms. I also think your implementability argument is a red herring. I don.t know of any UML metamodel implementations that actually create links, anyway. They just maintain references in attributes. And consider this: Element::ownedElement and Namespace::ownedMember are different properties, owned by Element and Namespace, not by the associations. And Namespace inherits ownedElement, so it has both Namespace::ownedElement and Namespace::ownedMemnber properties What does it mean for all the links you mention to be the .same. when there are multiple different end properties? Note that this is not a problem with redefinition, because, of Namespace::ownedMember redefined Element::ownedElement, then it would semantically be the same property. This is a fundamental difference between redefinition and subsetting, and it really only makes sense because subsetting does not imply specialization. In any case, I am not sure the two of us are going to come to any agreement before Monday. Having to argue this out was exactly what worried me about trying to get this done at the last minute in this RTF. And not having these generalization relationships in there has not seemed to be a showstopper for anyone implementing UML, so far as I know. So, unless everyone else agrees that it is obvious that subsetting implies association specialization, I would ask that this resolution either be withdrawn for UML 2. or restricted to only 1) providing symmetric subsetting constraints where appropriate and 2) adding generalization relationships between associations only where redefinition is involved. -- Ed -------------------------------------------------------------------------------- From: Rouquette, Nicolas F (316A) [ mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: Friday, June 04, 2010 8:22 PM To: Ed Seidewitz Cc: uml2-rtf@omg.org Subject: Re: Issue 14977 -- Ballot 9 Resolution -- Does subsetting really imply generalization? Ed, See below. On Jun 4, 2010, at 2:54 PM, Ed Seidewitz wrote: Nicolas . It boils down to this: Something is a generalization in a UML model if and only if it is modeled to be so. This statement is misleading; it's ostensibly false on face value because generalization is a transitive relationship among classifiers. For example if A specializes B and B specializes C, then A (indirectly) specializes C and this doesn't require an explicit generalization. Having generalization implies certain things. Conversely, certain UML constructs are invalid without generalization relationships. At least, we're in agreement that redefinition of association ends requires association generalization (direct or indirect). Just because those things may also hold in other cases does not imply that you can .infer. a generalization, or that a generalization is required. Of course. In particular, I do disagree with the following statements: By the definition of what subset is and the extensional semantics of an association, it follows that the set of links of an association with the subsetting ends must be a subset of the set of links of the association whose ends are subsetted. Therefore, the set of links of the subsetting association must be a subset of the set of links of the subsetted association. First of all, the definition of subsetting does not imply that the .set of links of an association with the subsetting ends must be a subset of the set of links of the association whose ends are subsetted.. We obviously disagree about this. All it implies is that there is a correspondence between the links of the first association and a subset of the links of the second association. I claim that the simplest explanation about the UML is that this correspondence is that the set of links of the association with the subsetting ends is precisely a subset of the set of links of the association whose ends are subsetted. The links of the first association are not links of the second association at all, regardless of the correspondence of values at the ends. I strongly disagree with this claim. The correspondence places a constraint on the extents of the two associations, but it does not make the extent of the first association a subset of the extent of the second association. It is the sets of values at the ends of the associations that are subsetted, not the associations themselves. A generalization relationship, on the other hand, does imply that the extent of the special classifier be a subset of the extent of the general classifier . that is, that every instance of the special classifier is an instance of the general classifier. But you only get this if you explicitly model it, never implicitly. If one association is a specialization of another, this does necessarily imply that the ends of the first association subset the ends of the second . but the converse is not true. There is no constraint in the UML spec that requires that an association that subsets the ends of another association must be a specialization of that association. As a specific example, consider associations A and B with two association ends x and y. Suppose the ends of A subset the corresponding ends of B. Then the following would be a legal snapshot of the extents of A and B: Extent of A: A(x=>a, y=>b) A(x=>c, y=>d) Extent of B: B(x=>a, y=>b) B(x=>c, y=>d) B(x=>e, y=>f) B(x=>g, y=>h) The subsetting constraints hold because the set of values of A::x, {a,c} is a subset of the set of values for B::x, {a,c,e,g}, and similarly for the A::y and B::y. Further, because of the required relationship between ends of associations, for the two links in the extent of A, there are corresponding links in the extent of B with the same end values. But, even though they are corresponding, the links in the extent of B are different links. If the links were different, the UML metamodel itself would be horribly inefficient to implement. Consider A = A_ownedElement_owner B = A_ownedAttribute_class The subsetting is stacked: A_ownedElement_owner A_ownedMember_namespace A_attribute_classifier A_ownedAttribute_class So, if we have a class, Foo, with an attribute, Foo::x : Integer, then you are claiming we'd have 4 distinct links for each of the associations above: A_ownedElement_owner (owner=Foo, ownedElement=Foo::x) A_ownedMember_namespace (namespace=Foo, ownedMember=Foo::x) A_attribute_classifier (classifier=Foo, attribute=Foo::x) A_ownedAttribute_class (class=Foo, ownedAttribute=Foo::x) I hope you will recognize that in fact there's only one link here. It would be extremely inefficient if, deleting Foo::x, required updating separately all 4 associations. Can you provide at least one example of an implementation of the UML where the meaning of association end subsetting is one of *disjoint* links whose end values are *equal*? I am not aware of any implementation that treats association end subsetting in the manner you described above. However, all of the implementations I've used do behave in precisely the manner I've described, i..e., subsetting of association ends entails subsetting of the association links. On the other hand, if A were a specialization of B, then the extent of B would necessarily include the extent of A: Extent of B: Extent of A: A(x=>a, y=>b) A(x=>c, y=>d) B(x=>e, y=>f) B(x=>g, y=>h) This is a different situation, and it only applies if A is explicitly modeled as a specialization of B. Now, maybe you would like to argue that it would be a better model if the association generalizations are there. The UML metamodel is certainly semantically more consistent and reflects the way current implementations of the UML work. In the above example, to create the attribute Foo::x, it suffices to add it only once to A_ownedAttribute_class and it will also present in all 3 (parent) associations. Conversely, it suffices to delete it from A_ownedAttribute_class to also delete from all other 3 associations. What else could it be except specialization of association *links* ? But that is a different argument, and one that we don.t have the time to discuss any longer. If we had a Link metaclass in the UML like MOF does, then it would be a lot easier to explain the semantic implication of association end subsetting on the links of the subsetting/subsetted association. After all, the original modelers chose to generally use subsetting rather than redefinition, which means that they specifically did not want to use association generalization (per the discussion I quoted in the Association Semantics section). It's difficult to tell what was the original intent behind these constructs. On the basis of how they are currently defined in the spec, I believe that the semantic effect of association end subsetting is precisely that of subsetting association links. This is the simplest explanation that makes sense w.r.t. what these terms mean in computer science and how most tools have implemented the UML. In any case, it is out of scope of this RTF to just try to make the metamodel .better. rather than correct a serious error. So, if there is no requirement for association generalization in the case of subsetting, and the desire is to preserve the current intent of the metamodel, then it is certainly not appropriate to change the metamodel to add unnecessary generalizations. I don't accept your argument. Please review the above and let me know if you still disagree after this. - Nicolas. -- Ed -------------------------------------------------------------------------------- From: Rouquette, Nicolas F (316A) [ mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: Friday, June 04, 2010 5:06 PM To: Ed Seidewitz Cc: uml2-rtf@omg.org Subject: Re: Issue 14977 -- Ballot 9 Resolution -- Does subsetting really imply generalization? Thank you Ed for bringing this up before the voting phase started. Despite several issues asking for better explanations in the spec, we have yet to clearly explain what extensional vs. intensional semantics is in a metamodel. The extensional semantics of Class & Association is hinted at in the Description subclauses for 7.3.7 and 7.3.3 respectively: A class describes a set of objects that share the same specifications of features, constraints, and semantics. An association specifies a semantic relationship that can occur between typed instances. The current specification document does not make a clear explanation about: - extensional semantics is about the instances that define the extent of a classifier - intensional semantics is about the features & constraints that characterize membership in the extent of a classifier One could find perhaps better wording for these definitions. I emphasize these because they are particularly relevant for the description of Generalization in 7.3.20: A generalization is a taxonomic relationship between a more general classifier and a more specific classifier. Each instance of the specific classifier is also an indirect instance of the general classifier. Thus, the specific classifier inherits the features of the more general classifier. Unfortunately, the UML mixes aspects of extensional/intensional semantics quite often. For example, the 2nd sentence above is clearly about the relationship between the extensional semantics of a specific classifier to the extensional semantics of a general classifier. Conversely, the 3rd sentence above is clearly about the features that are part of the intensional semantics of a classifier; however, the relationship is incompletely described here. Going back to 7.3.3, the semantics subclause then clearly relates subsetting to extensional semantics & redefinition to intensional semantics. When we *explicitly* define an association whose ends subset those of another association, we *explicitly* indicate that there is a relationship between the extensional semantics of the association with the subsetting ends to the extensional semantics of the association with the subsetted ends. By the definition of what subset is and the extensional semantics of an association, it follows that the set of links of an association with the subsetting ends must be a subset of the set of links of the association whose ends are subsetted. Therefore, the set of links of the subsetting association must be a subset of the set of links of the subsetted association. If you disagree with this particular reasoning, please let me know what explicitly you disagree with. Note that the explanation above has been an important aspect of the language architecture of the UML since UML 2.0 We rely on this extensively for all derived union properties (e.g., A_ownedElement_owner and all of its extensive specialization) I believe that your objection stems from mixing two different things: that association end subsetting implies association generalization due to the extensional semantics of association and a concern whether the changes made to the metamodel have, somehow, changed the meaning of certain associations in the metamodel. That concern is a valid one and I strongly relate to it. In fact, I've been particularly worried about this because the OCL "bad smell" queries I wrote earlier had found so many places where a fix needed to be made that it was clear to me we couldn't fix the metamodel as we did in 2.3; the risk for error was too great. I'm pleased to say that we've addressed this concern. First, I made "detailed" UML diagrams of everything I worked on related to this and all other issues I worked on in ballot 9. These detailed diagrams have been particularly useful to make sure that the changes made reflect the *current* intent of the metamodel. For example, look at the detailed diagram corresponding to Figure 12.5 in Activities: Juergen Boldt Director, Member Services Object Management Group 140 Kendrick St Building A Suite 300 Needham, MA 02494 USA tel: +1 781 444 0404 x 132 fax: +1 781 444 0320 email: juergen@omg.org www.omg.org From: "Bock, Conrad" To: "uml2-rtf@omg.org" CC: "Jenkins, J Steven (3101)" Date: Tue, 8 Jun 2010 09:44:42 -0400 Subject: RE: issue 15274 -- UML 2 RTF issue -- clarification about association end subsetting & association specialization. Thread-Topic: issue 15274 -- UML 2 RTF issue -- clarification about association end subsetting & association specialization. Thread-Index: AcsGgb3vwD0OxVybR3CrtDJp0pCzmAAjWC7A Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-NIST-MailScanner: Found to be clean X-NIST-MailScanner-From: conrad.bock@nist.gov Nicolas, > Symmetric association end subsetting does not necessarily imply that > the subsetting association specializes the subsetted association. > In that sense, Ed is right, subsetting is a constraint of the extent > of the association end properties and there is no logical > implication one can categorically make about the relationship of the > extent of the links in the subsetting association vs. the links in > the subsetted association. > Steve came up with a simple example to explain this: The example is actually very complicated, and I think a simpler example shows why property subsetting implies association specialization (logically): Class Woman; Class Man; Property MarriedTo: Woman Unidirectional. End of an association Married. Class ManInCA Property MarriedToUnderCALaw: Woman Susets MarriedTo. End of an association MarriedToUnderCALaw. The subsetting above will require links of MarriedToUnderCALaw to be links of Married, ie, Married generalizes MarriedToUnderCALaw. Since properties on the opposite ends of the above are logical inverses, links of them will imply links of the above properties/associations also. Nicolas, Steve J, can you adapt the above to show why you think subsetting does not imply generalization? Conrad From: "Bock, Conrad" To: "uml2-rtf@omg.org" CC: "Jenkins, J Steven (3101)" Date: Tue, 8 Jun 2010 09:48:21 -0400 Subject: RE: issue 15274 -- UML 2 RTF issue -- clarification about association end subsetting & association specialization. Thread-Topic: issue 15274 -- UML 2 RTF issue -- clarification about association end subsetting & association specialization. Thread-Index: AcsGgb3vwD0OxVybR3CrtDJp0pCzmAAjWC7A Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-NIST-MailScanner: Found to be clean X-NIST-MailScanner-From: conrad.bock@nist.gov P.S. > For example, when we combine association subsetting with > derived unions, we get a tree of associations that > disjunctively specialize a root, abstract association whose > ends are derived or derived unions (e.g., A_ownedElement_owner). > In such cases, association end subsetting is insufficient > to necessarily guarantee that, e.g., a link instance of > A_ownedAttribute_class is necessarily a link instance of > the root association, i.e., A_ownedElement_owner. This is another simple example you could use to explain why you think subsetting is insufficient to logically imply association specialization. Conrad Nicolas, > Symmetric association end subsetting does not necessarily imply that > the subsetting association specializes the subsetted association. > In that sense, Ed is right, subsetting is a constraint of the extent > of the association end properties and there is no logical > implication one can categorically make about the relationship of the > extent of the links in the subsetting association vs. the links in > the subsetted association. > Steve came up with a simple example to explain this: The example is actually very complicated, and I think a simpler example shows why property subsetting implies association specialization (logically): Class Woman; Class Man; Property MarriedTo: Woman Unidirectional. End of an association Married. Class ManInCA Property MarriedToUnderCALaw: Woman Susets MarriedTo. End of an association MarriedToUnderCALaw. The subsetting above will require links of MarriedToUnderCALaw to be links of Married, ie, Married generalizes MarriedToUnderCALaw. Since properties on the opposite ends of the above are logical inverses, links of them will imply links of the above properties/associations also. Nicolas, Steve J, can you adapt the above to show why you think subsetting does not imply generalization? Conrad