Issue 15525: redefinitionContext of Property (uml2-rtf) Source: International Business Machines (Dr. Maged Elaasar, melaasar(at)ca.ibm.com) Nature: Uncategorized Issue Severity: Summary: Constraint [4] in Property implies an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. However in the case of an association-owned end redefining a (non-association) classifier-owned end, whose association is an ancesor (of the owning association), the redefinitionContexts are stil: the owningAssociation for the redefining proeprty the classifier for the redefined property Doesn't this violate constraint [1] of RedefinableElement [1] At least one of the redefinition contexts of the redefining element must be a specialization of at least one of the redefinition contexts for each redefined element. self.redefinedElement->forAll(e | self.isRedefinitionContextValid(e)) where RedefinableElement::isRedefinitionContextValid(redefined: RedefinableElement): Boolean; result = self.redefinitionContext->exists(c | c.allParents()->includes(redefined.redefinitionContext)) since the classifier can never be an ancestor of the association? Resolution: Revised Text: Actions taken: September 15, 2010: received issue Discussion: End of Annotations:===== ubject: Fw: redefinitionContext of Property To: Juergen Boldt X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 From: Maged Elaasar Date: Wed, 15 Sep 2010 10:15:56 -0400 X-MIMETrack: Serialize by Router on D25ML03/25/M/IBM(Release 8.0.1|February 07, 2008) at 09/15/2010 10:16:05 Hi Jeurgen, please log this issue: Constraint [4] in Property implies an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. However in the case of an association-owned end redefining a (non-association) classifier-owned end, whose association is an ancesor (of the owning association), the redefinitionContexts are stil: the owningAssociation for the redefining proeprty the classifier for the redefined property Doesn't this violate constraint [1] of RedefinableElement [1] At least one of the redefinition contexts of the redefining element must be a specialization of at least one of the redefinition contexts for each redefined element. self.redefinedElement->forAll(e | self.isRedefinitionContextValid(e)) where RedefinableElement::isRedefinitionContextValid(redefined: RedefinableElement): Boolean; result = self.redefinitionContext->exists(c | c.allParents()->includes(redefined.redefinitionContext)) since the classifier can never be an ancestor of the association? Subject: redefinitionContext of Property To: uml2-rtf@omg.org X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 From: Maged Elaasar Date: Tue, 14 Sep 2010 12:22:08 -0400 X-MIMETrack: Serialize by Router on D25ML03/25/M/IBM(Release 8.0.1|February 07, 2008) at 09/14/2010 12:22:13 Hi All, In my analysis of metamodel well-formedness rules, I came across this question: How do you derive the redefinitionContext of a property? I think it is currently a derived union that is subsetted by Element::owner. But cannot an association-owned end redefine a class-owned end and vice versa? in which case the redefinitionContext is not the owner but really the type of the opposite end? Maged Subject: RE: redefinitionContext of Property Date: Tue, 14 Sep 2010 14:44:51 -0400 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: redefinitionContext of Property thread-index: ActUKahpjV+UWfCHRG6IxyDVV0O2LAADVlfg From: "Ed Seidewitz" To: "Maged Elaasar" Cc: Maged . Element::owner can.t subset redefinitionContext, because redefinitionContext is only defined for redefinable element. Each concrete subclass of RedefinableElement needs to subclass redefinitionContext to define what that means for that kind of redefinable element. For properties, there are two possibilities for redefinitionContext. If the property is an attribute of a classifier (which always ends meaning that it is owned by that classifier), then the redefinitionContext is that classifier (see Figure 7.9 in the UML 2.4 Superstructure spec). If the property is an owned end, then the redefinitionContext is the owning association. This latter case is stated in the definition for Property::owningAssociation in Subclause 7.3.45 (bottom of page 131), but the subset annotation unfortunately seems to be missing from Figure 7.12 and the metamodel. However, assuming that Property::owningAssociation does properly subset owningAssociation, then constraint [4] for Property effectively requires that the redefined properties of an owned end be features an ancestor of its owning association. Now, this constraint uses the allFeatures() operation, which is defined in Subclause 7.3.8 Classifier (operation [1]) to be all the members of the classifier that are features. And, since Association::memberEnd subsets Association::member, all the ends of an association are features of the association, whether they are owned ends or not. Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. On the other hand, an end that is not association owned can only redefine properties that are features of the (non-association) an ancestor of the classifier that owns it. Since the features of non-association classifiers never include association-owned ends, it is not possible for a non-association owned end to redefine an association-owned end. (But there doesn.t seem to be anything stopping a non-association owned end from redefining a property of an ancestor classifier that is not an association end at all.) I seem to remember that there was an RTF discussion of owned ends redefining non-owned ends and vice versa, as part of all the discussion on redefinition and subsetting. I am not sure if the above was the intentional result of that discussion, but I think this is the way it is. -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Tuesday, September 14, 2010 12:22 PM To: uml2-rtf@omg.org Subject: redefinitionContext of Property Hi All, In my analysis of metamodel well-formedness rules, I came across this question: How do you derive the redefinitionContext of a property? I think it is currently a derived union that is subsetted by Element::owner. But cannot an association-owned end redefine a class-owned end and vice versa? in which case the redefinitionContext is not the owner but really the type of the opposite end? Maged Subject: RE: redefinitionContext of Property To: "Ed Seidewitz" Cc: uml2-rtf@omg.org X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 From: Maged Elaasar Date: Tue, 14 Sep 2010 14:57:54 -0400 X-MIMETrack: Serialize by Router on D25ML03/25/M/IBM(Release 8.0.1|February 07, 2008) at 09/14/2010 14:57:56 >>I seem to remember that there was an RTF discussion of owned ends redefining non-owned ends and vice versa, as part of all the discussion on redefinition and subsetting. I am not sure if the above was the intentional result of that discussion, but I think this >>is the way it is. Thank you Ed. I was really questioning whether the way it is now in the spec is valid, or whether it should change to allow association-owned and classifier-owned ends to redefine each other, similar to how it is allowed for subsetting now (addition op [2] in 7.3.45). In my mind, redefinition can be thought of as an exclusive subset so I don't see why its "context" semantics should be any different. Maged "Ed Seidewitz" "Ed Seidewitz" 09/14/2010 02:44 PM To Maged Elaasar/Ottawa/IBM@IBMCA cc Subject RE: redefinitionContext of Property Maged . Element::owner can.t subset redefinitionContext, because redefinitionContext is only defined for redefinable element. Each concrete subclass of RedefinableElement needs to subclass redefinitionContext to define what that means for that kind of redefinable element. For properties, there are two possibilities for redefinitionContext. If the property is an attribute of a classifier (which always ends meaning that it is owned by that classifier), then the redefinitionContext is that classifier (see Figure 7.9 in the UML 2.4 Superstructure spec). If the property is an owned end, then the redefinitionContext is the owning association. This latter case is stated in the definition for Property::owningAssociation in Subclause 7.3.45 (bottom of page 131), but the subset annotation unfortunately seems to be missing from Figure 7.12 and the metamodel. However, assuming that Property::owningAssociation does properly subset owningAssociation, then constraint [4] for Property effectively requires that the redefined properties of an owned end be features an ancestor of its owning association. Now, this constraint uses the allFeatures() operation, which is defined in Subclause 7.3.8 Classifier (operation [1]) to be all the members of the classifier that are features. And, since Association::memberEnd subsets Association::member, all the ends of an association are features of the association, whether they are owned ends or not. Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. On the other hand, an end that is not association owned can only redefine properties that are features of the (non-association) an ancestor of the classifier that owns it. Since the features of non-association classifiers never include association-owned ends, it is not possible for a non-association owned end to redefine an association-owned end. (But there doesn.t seem to be anything stopping a non-association owned end from redefining a property of an ancestor classifier that is not an association end at all.) -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Tuesday, September 14, 2010 12:22 PM To: uml2-rtf@omg.org Subject: redefinitionContext of Property Hi All, In my analysis of metamodel well-formedness rules, I came across this question: How do you derive the redefinitionContext of a property? I think it is currently a derived union that is subsetted by Element::owner. But cannot an association-owned end redefine a class-owned end and vice versa? in which case the redefinitionContext is not the owner but really the type of the opposite end? Maged pic13325.gif Subject: RE: redefinitionContext of Property Date: Tue, 14 Sep 2010 15:12:46 -0400 X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: redefinitionContext of Property thread-index: ActUPsi1wSvkDojISBGbkIqC0cix6gAAeH+w From: "Ed Seidewitz" To: "Maged Elaasar" Cc: Maged . Redefinition is tied to (the explicit modeling of) generalization and inheritance, while subsetting is not, which makes the definition of the redefinition context a bit more involved than is the case for subsetting. -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Tuesday, September 14, 2010 2:58 PM To: Ed Seidewitz Cc: uml2-rtf@omg.org Subject: RE: redefinitionContext of Property >>I seem to remember that there was an RTF discussion of owned ends redefining non-owned ends and vice versa, as part of all the discussion on redefinition and subsetting. I am not sure if the above was the intentional result of that discussion, but I think this >>is the way it is. Thank you Ed. I was really questioning whether the way it is now in the spec is valid, or whether it should change to allow association-owned and classifier-owned ends to redefine each other, similar to how it is allowed for subsetting now (addition op [2] in 7.3.45). In my mind, redefinition can be thought of as an exclusive subset so I don't see why its "context" semantics should be any different. Maged "Ed Seidewitz" "Ed Seidewitz" 09/14/2010 02:44 PM To Maged Elaasar/Ottawa/IBM@IBMCA cc Subject RE: redefinitionContext of Property Maged . Element::owner can.t subset redefinitionContext, because redefinitionContext is only defined for redefinable element. Each concrete subclass of RedefinableElement needs to subclass redefinitionContext to define what that means for that kind of redefinable element. For properties, there are two possibilities for redefinitionContext. If the property is an attribute of a classifier (which always ends meaning that it is owned by that classifier), then the redefinitionContext is that classifier (see Figure 7.9 in the UML 2.4 Superstructure spec). If the property is an owned end, then the redefinitionContext is the owning association. This latter case is stated in the definition for Property::owningAssociation in Subclause 7.3.45 (bottom of page 131), but the subset annotation unfortunately seems to be missing from Figure 7.12 and the metamodel. However, assuming that Property::owningAssociation does properly subset owningAssociation, then constraint [4] for Property effectively requires that the redefined properties of an owned end be features an ancestor of its owning association. Now, this constraint uses the allFeatures() operation, which is defined in Subclause 7.3.8 Classifier (operation [1]) to be all the members of the classifier that are features. And, since Association::memberEnd subsets Association::member, all the ends of an association are features of the association, whether they are owned ends or not. Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. On the other hand, an end that is not association owned can only redefine properties that are features of the (non-association) an ancestor of the classifier that owns it. Since the features of non-association classifiers never include association-owned ends, it is not possible for a non-association owned end to redefine an association-owned end. (But there doesn.t seem to be anything stopping a non-association owned end from redefining a property of an ancestor classifier that is not an association end at all.) -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Tuesday, September 14, 2010 12:22 PM To: uml2-rtf@omg.org Subject: redefinitionContext of Property Hi All, In my analysis of metamodel well-formedness rules, I came across this question: How do you derive the redefinitionContext of a property? I think it is currently a derived union that is subsetted by Element::owner. But cannot an association-owned end redefine a class-owned end and vice versa? in which case the redefinitionContext is not the owner but really the type of the opposite end? Maged Subject: RE: redefinitionContext of Property To: "Ed Seidewitz" Cc: uml2-rtf@omg.org X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 From: Maged Elaasar Date: Tue, 14 Sep 2010 17:19:42 -0400 X-MIMETrack: Serialize by Router on D25ML03/25/M/IBM(Release 8.0.1|February 07, 2008) at 09/14/2010 17:19:48 Ed, >>Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. This is what is implied by constraint [4] in Property, however in the case of an association-owned end redefining a (non-association) classifier-owned end, whose association is an ancesor (of the owning association), the redefinitionContexts are stil: the owningAssociation for the redefining proeprty the classifier for the redefined property Doesn't this violate constraint [1] of RedefinableElement [1] At least one of the redefinition contexts of the redefining element must be a specialization of at least one of the redefinition contexts for each redefined element. self.redefinedElement->forAll(e | self.isRedefinitionContextValid(e)) where RedefinableElement::isRedefinitionContextValid(redefined: RedefinableElement): Boolean; result = self.redefinitionContext->exists(c | c.allParents()->includes(redefined.redefinitionContext)) since the classifier can never be an ancestor of the association? "Ed Seidewitz" "Ed Seidewitz" 09/14/2010 02:44 PM To Maged Elaasar/Ottawa/IBM@IBMCA cc Subject RE: redefinitionContext of Property Maged . Element::owner can.t subset redefinitionContext, because redefinitionContext is only defined for redefinable element. Each concrete subclass of RedefinableElement needs to subclass redefinitionContext to define what that means for that kind of redefinable element. For properties, there are two possibilities for redefinitionContext. If the property is an attribute of a classifier (which always ends meaning that it is owned by that classifier), then the redefinitionContext is that classifier (see Figure 7.9 in the UML 2.4 Superstructure spec). If the property is an owned end, then the redefinitionContext is the owning association. This latter case is stated in the definition for Property::owningAssociation in Subclause 7.3.45 (bottom of page 131), but the subset annotation unfortunately seems to be missing from Figure 7.12 and the metamodel. However, assuming that Property::owningAssociation does properly subset owningAssociation, then constraint [4] for Property effectively requires that the redefined properties of an owned end be features an ancestor of its owning association. Now, this constraint uses the allFeatures() operation, which is defined in Subclause 7.3.8 Classifier (operation [1]) to be all the members of the classifier that are features. And, since Association::memberEnd subsets Association::member, all the ends of an association are features of the association, whether they are owned ends or not. Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. On the other hand, an end that is not association owned can only redefine properties that are features of the (non-association) an ancestor of the classifier that owns it. Since the features of non-association classifiers never include association-owned ends, it is not possible for a non-association owned end to redefine an association-owned end. (But there doesn.t seem to be anything stopping a non-association owned end from redefining a property of an ancestor classifier that is not an association end at all.) I seem to remember that there was an RTF discussion of owned ends redefining non-owned ends and vice versa, as part of all the discussion on redefinition and subsetting. I am not sure if the above was the intentional result of that discussion, but I think this is the way it is. -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Tuesday, September 14, 2010 12:22 PM To: uml2-rtf@omg.org Subject: redefinitionContext of Property Hi All, In my analysis of metamodel well-formedness rules, I came across this question: How do you derive the redefinitionContext of a property? I think it is currently a derived union that is subsetted by Element::owner. But cannot an association-owned end redefine a class-owned end and vice versa? in which case the redefinitionContext is not the owner but really the type of the opposite end? Maged pic17516.gif Subject: RE: redefinitionContext of Property Date: Tue, 14 Sep 2010 18:28:02 -0400 X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: redefinitionContext of Property thread-index: ActUUrVyqqSTFyV9TSu8CSQxBHoWjQACRGPQ From: "Ed Seidewitz" To: "Maged Elaasar" Cc: Maged . Good point. Property should really redefine self.isRedefinitionContextValid. And, if this was done properly, constraint [4] in Property would not be needed at all. -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Tuesday, September 14, 2010 5:20 PM To: Ed Seidewitz Cc: uml2-rtf@omg.org Subject: RE: redefinitionContext of Property Ed, >>Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. This is what is implied by constraint [4] in Property, however in the case of an association-owned end redefining a (non-association) classifier-owned end, whose association is an ancesor (of the owning association), the redefinitionContexts are stil: the owningAssociation for the redefining proeprty the classifier for the redefined property Doesn't this violate constraint [1] of RedefinableElement [1] At least one of the redefinition contexts of the redefining element must be a specialization of at least one of the redefinition contexts for each redefined element. self.redefinedElement->forAll(e | self.isRedefinitionContextValid(e)) where RedefinableElement::isRedefinitionContextValid(redefined: RedefinableElement): Boolean; result = self.redefinitionContext->exists(c | c.allParents()->includes(redefined.redefinitionContext)) since the classifier can never be an ancestor of the association? "Ed Seidewitz" "Ed Seidewitz" 09/14/2010 02:44 PM To Maged Elaasar/Ottawa/IBM@IBMCA cc Subject RE: redefinitionContext of Property Maged . Element::owner can.t subset redefinitionContext, because redefinitionContext is only defined for redefinable element. Each concrete subclass of RedefinableElement needs to subclass redefinitionContext to define what that means for that kind of redefinable element. For properties, there are two possibilities for redefinitionContext. If the property is an attribute of a classifier (which always ends meaning that it is owned by that classifier), then the redefinitionContext is that classifier (see Figure 7.9 in the UML 2.4 Superstructure spec). If the property is an owned end, then the redefinitionContext is the owning association. This latter case is stated in the definition for Property::owningAssociation in Subclause 7.3.45 (bottom of page 131), but the subset annotation unfortunately seems to be missing from Figure 7.12 and the metamodel. However, assuming that Property::owningAssociation does properly subset owningAssociation, then constraint [4] for Property effectively requires that the redefined properties of an owned end be features an ancestor of its owning association. Now, this constraint uses the allFeatures() operation, which is defined in Subclause 7.3.8 Classifier (operation [1]) to be all the members of the classifier that are features. And, since Association::memberEnd subsets Association::member, all the ends of an association are features of the association, whether they are owned ends or not. Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. On the other hand, an end that is not association owned can only redefine properties that are features of the (non-association) an ancestor of the classifier that owns it. Since the features of non-association classifiers never include association-owned ends, it is not possible for a non-association owned end to redefine an association-owned end. (But there doesn.t seem to be anything stopping a non-association owned end from redefining a property of an ancestor classifier that is not an association end at all.) I seem to remember that there was an RTF discussion of owned ends redefining non-owned ends and vice versa, as part of all the discussion on redefinition and subsetting. I am not sure if the above was the intentional result of that discussion, but I think this is the way it is. -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Tuesday, September 14, 2010 12:22 PM To: uml2-rtf@omg.org Subject: redefinitionContext of Property Hi All, In my analysis of metamodel well-formedness rules, I came across this question: How do you derive the redefinitionContext of a property? I think it is currently a derived union that is subsetted by Element::owner. But cannot an association-owned end redefine a class-owned end and vice versa? in which case the redefinitionContext is not the owner but really the type of the opposite end? Maged Subject: Fw: redefinitionContext of Property To: Juergen Boldt X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 From: Maged Elaasar Date: Wed, 15 Sep 2010 10:15:56 -0400 X-MIMETrack: Serialize by Router on D25ML03/25/M/IBM(Release 8.0.1|February 07, 2008) at 09/15/2010 10:16:05 Hi Jeurgen, please log this issue: Constraint [4] in Property implies an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. However in the case of an association-owned end redefining a (non-association) classifier-owned end, whose association is an ancesor (of the owning association), the redefinitionContexts are stil: the owningAssociation for the redefining proeprty the classifier for the redefined property Doesn't this violate constraint [1] of RedefinableElement [1] At least one of the redefinition contexts of the redefining element must be a specialization of at least one of the redefinition contexts for each redefined element. self.redefinedElement->forAll(e | self.isRedefinitionContextValid(e)) where RedefinableElement::isRedefinitionContextValid(redefined: RedefinableElement): Boolean; result = self.redefinitionContext->exists(c | c.allParents()->includes(redefined.redefinitionContext)) since the classifier can never be an ancestor of the association? From: "Rouquette, Nicolas F (316A)" To: Ed Seidewitz CC: Maged Elaasar , "uml2-rtf@omg.org" Date: Wed, 15 Sep 2010 09:27:15 -0700 Subject: Re: redefinitionContext of Property Thread-Topic: redefinitionContext of Property Thread-Index: ActU8txnhmfTyqDVT3SwzFuxBkGOUA== Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-Source-IP: altvirehtstap01.jpl.nasa.gov [128.149.137.72] X-Source-Sender: nicolas.f.rouquette@jpl.nasa.gov X-AUTH: Authorized Ed, Thanks for your clear explanation! You said below: However, assuming that Property::owningAssociation does properly subset owningAssociation, then constraint [4] for Property effectively requires that the redefined properties of an owned end be features an ancestor of its owning association. Now, this constraint uses the allFeatures() operation, which is defined in Subclause 7.3.8 Classifier (operation [1]) to be all the members of the classifier that are features. And, since Association::memberEnd subsets Association::member, all the ends of an association are features of the association, whether they are owned ends or not. Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. The last sentence above clearly implies that there must be generalization relationships among the associations in order for associations to be in a specialization/ancestor relationship with one another. That is, you are advocating for using redefinitions as Bran Selic explained in slide 31 here: http://www.omg.org/members/cgi-bin/doc?omg/04-05-01.pdf In UML 2.4, we eventually decided to back off from adding such generalization relationships but if we are to fix the missing subsetting, i.e.: Property::owningAssociation {subsets redefinitionContext, subsets association, subsets featuringClassifier, subsets namespace} and Association::ownedEnd {ordered, subsets redefinableElement, subsets memberEnd, subsets feature, subsets ownedMember} then it really begs to review figure 7.9 and instead do: Feature::featuringClassifier { readOnly, union, subsets redefinitionContext, subsets memberNamespace} and Classifier::feature { readOnly, union, subsets redefinableElement, subsets member} This means that we would then be able to simplify the following: Property::classifier { subsets redefinitionContext, subsets featuringClassifier} and Classifier::attribute { readOnly, union, subsets refinableElement, subsets feature} to just: Property::classifier { subsets featuringClassifier} and Classifier::attribute { readOnly, union, subsets feature} Last but not least, this also means we'd have to add generalization relationships for associations for the case where at least one of the ends redefines another end. - Nicolas. On Sep 14, 2010, at 3:28 PM, Ed Seidewitz wrote: Maged . Good point. Property should really redefine self.isRedefinitionContextValid. And, if this was done properly, constraint [4] in Property would not be needed at all. -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Tuesday, September 14, 2010 5:20 PM To: Ed Seidewitz Cc: uml2-rtf@omg.org Subject: RE: redefinitionContext of Property Ed, >>Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. This is what is implied by constraint [4] in Property, however in the case of an association-owned end redefining a (non-association) classifier-owned end, whose association is an ancesor (of the owning association), the redefinitionContexts are stil: the owningAssociation for the redefining proeprty the classifier for the redefined property Doesn't this violate constraint [1] of RedefinableElement [1] At least one of the redefinition contexts of the redefining element must be a specialization of at least one of the redefinition contexts for each redefined element. self.redefinedElement->forAll(e | self.isRedefinitionContextValid(e)) where RedefinableElement::isRedefinitionContextValid(redefined: RedefinableElement): Boolean; result = self.redefinitionContext->exists(c | c.allParents()->includes(redefined.redefinitionContext)) since the classifier can never be an ancestor of the association? "Ed Seidewitz" "Ed Seidewitz" 09/14/2010 02:44 PM To Maged Elaasar/Ottawa/IBM@IBMCA cc Subject RE: redefinitionContext of Property Maged . Element::owner can.t subset redefinitionContext, because redefinitionContext is only defined for redefinable element. Each concrete subclass of RedefinableElement needs to subclass redefinitionContext to define what that means for that kind of redefinable element. For properties, there are two possibilities for redefinitionContext. If the property is an attribute of a classifier (which always ends meaning that it is owned by that classifier), then the redefinitionContext is that classifier (see Figure 7.9 in the UML 2.4 Superstructure spec). If the property is an owned end, then the redefinitionContext is the owning association. This latter case is stated in the definition for Property::owningAssociation in Subclause 7.3.45 (bottom of page 131), but the subset annotation unfortunately seems to be missing from Figure 7.12 and the metamodel. However, assuming that Property::owningAssociation does properly subset owningAssociation, then constraint [4] for Property effectively requires that the redefined properties of an owned end be features an ancestor of its owning association. Now, this constraint uses the allFeatures() operation, which is defined in Subclause 7.3.8 Classifier (operation [1]) to be all the members of the classifier that are features. And, since Association::memberEnd subsets Association::member, all the ends of an association are features of the association, whether they are owned ends or not. Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. On the other hand, an end that is not association owned can only redefine properties that are features of the (non-association) an ancestor of the classifier that owns it. Since the features of non-association classifiers never include association-owned ends, it is not possible for a non-association owned end to redefine an association-owned end. (But there doesn.t seem to be anything stopping a non-association owned end from redefining a property of an ancestor classifier that is not an association end at all.) I seem to remember that there was an RTF discussion of owned ends redefining non-owned ends and vice versa, as part of all the discussion on redefinition and subsetting. I am not sure if the above was the intentional result of that discussion, but I think this is the way it is. -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Tuesday, September 14, 2010 12:22 PM To: uml2-rtf@omg.org Subject: redefinitionContext of Property Hi All, In my analysis of metamodel well-formedness rules, I came across this question: How do you derive the redefinitionContext of a property? I think it is currently a derived union that is subsetted by Element::owner. But cannot an association-owned end redefine a class-owned end and vice versa? in which case the redefinitionContext is not the owner but really the type of the opposite end? Maged Subject: RE: redefinitionContext of Property Date: Wed, 15 Sep 2010 13:52:04 -0400 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: redefinitionContext of Property thread-index: ActU8txnhmfTyqDVT3SwzFuxBkGOUAAClpeQ From: "Ed Seidewitz" To: "Rouquette, Nicolas F (316A)" Cc: "Maged Elaasar" , Nicolas . Redefinition is always only defined in the context of a generalization. And, for an association that has an owned end that redefines another end, I believe I supported adding association generalizations. I just didn.t support adding them in the base of subsetting. Also, if the association end isn.t association owned, then association generalization isn.t necessary, because the owning class is the redefinition context, not the association. However, I believe there was also a general feeling that it was not a showstopper to have the association generalizations missing even in the cases when an owned end is a redefinition. That was why they were not put in. At this point, we need to just wrap up UML 2.4. Not having owningAssociation redefine redefinitionContext is clearly a metamodel error (since the redefinition is in the text) and not fixing this error means that any user model that has a owned end that is a redefinition is technically invalid. It is also a simple change that we can get into the final UML 2.4 ballot without any fuss. I don.t think we should do any more than that. What you are proposing may make sense, but it is just the kind of change that could have unintended consequences, so we would need to think it through carefully. And the time for that has passed on UML 2.4. -- Ed -------------------------------------------------------------------------------- From: Rouquette, Nicolas F (316A) [mailto:nicolas.f.rouquette@jpl.nasa.gov] Sent: Wednesday, September 15, 2010 12:27 PM To: Ed Seidewitz Cc: Maged Elaasar; uml2-rtf@omg.org Subject: Re: redefinitionContext of Property Ed, Thanks for your clear explanation! You said below: However, assuming that Property::owningAssociation does properly subset owningAssociation, then constraint [4] for Property effectively requires that the redefined properties of an owned end be features an ancestor of its owning association. Now, this constraint uses the allFeatures() operation, which is defined in Subclause 7.3.8 Classifier (operation [1]) to be all the members of the classifier that are features. And, since Association::memberEnd subsets Association::member, all the ends of an association are features of the association, whether they are owned ends or not. Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. The last sentence above clearly implies that there must be generalization relationships among the associations in order for associations to be in a specialization/ancestor relationship with one another. That is, you are advocating for using redefinitions as Bran Selic explained in slide 31 here: http://www.omg.org/members/cgi-bin/doc?omg/04-05-01.pdf In UML 2.4, we eventually decided to back off from adding such generalization relationships but if we are to fix the missing subsetting, i.e.: Property::owningAssociation {subsets redefinitionContext, subsets association, subsets featuringClassifier, subsets namespace} and Association::ownedEnd {ordered, subsets redefinableElement, subsets memberEnd, subsets feature, subsets ownedMember} then it really begs to review figure 7.9 and instead do: Feature::featuringClassifier { readOnly, union, subsets redefinitionContext, subsets memberNamespace} and Classifier::feature { readOnly, union, subsets redefinableElement, subsets member} This means that we would then be able to simplify the following: Property::classifier { subsets redefinitionContext, subsets featuringClassifier} and Classifier::attribute { readOnly, union, subsets refinableElement, subsets feature} to just: Property::classifier { subsets featuringClassifier} and Classifier::attribute { readOnly, union, subsets feature} Last but not least, this also means we'd have to add generalization relationships for associations for the case where at least one of the ends redefines another end. - Nicolas. On Sep 14, 2010, at 3:28 PM, Ed Seidewitz wrote: Maged . Good point. Property should really redefine self.isRedefinitionContextValid. And, if this was done properly, constraint [4] in Property would not be needed at all. -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Tuesday, September 14, 2010 5:20 PM To: Ed Seidewitz Cc: uml2-rtf@omg.org Subject: RE: redefinitionContext of Property Ed, >>Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. This is what is implied by constraint [4] in Property, however in the case of an association-owned end redefining a (non-association) classifier-owned end, whose association is an ancesor (of the owning association), the redefinitionContexts are stil: the owningAssociation for the redefining proeprty the classifier for the redefined property Doesn't this violate constraint [1] of RedefinableElement [1] At least one of the redefinition contexts of the redefining element must be a specialization of at least one of the redefinition contexts for each redefined element. self.redefinedElement->forAll(e | self.isRedefinitionContextValid(e)) where RedefinableElement::isRedefinitionContextValid(redefined: RedefinableElement): Boolean; result = self.redefinitionContext->exists(c | c.allParents()->includes(redefined.redefinitionContext)) since the classifier can never be an ancestor of the association? "Ed Seidewitz" "Ed Seidewitz" 09/14/2010 02:44 PM To Maged Elaasar/Ottawa/IBM@IBMCA cc Subject RE: redefinitionContext of Property Maged . Element::owner can.t subset redefinitionContext, because redefinitionContext is only defined for redefinable element. Each concrete subclass of RedefinableElement needs to subclass redefinitionContext to define what that means for that kind of redefinable element. For properties, there are two possibilities for redefinitionContext. If the property is an attribute of a classifier (which always ends meaning that it is owned by that classifier), then the redefinitionContext is that classifier (see Figure 7.9 in the UML 2.4 Superstructure spec). If the property is an owned end, then the redefinitionContext is the owning association. This latter case is stated in the definition for Property::owningAssociation in Subclause 7.3.45 (bottom of page 131), but the subset annotation unfortunately seems to be missing from Figure 7.12 and the metamodel. However, assuming that Property::owningAssociation does properly subset owningAssociation, then constraint [4] for Property effectively requires that the redefined properties of an owned end be features an ancestor of its owning association. Now, this constraint uses the allFeatures() operation, which is defined in Subclause 7.3.8 Classifier (operation [1]) to be all the members of the classifier that are features. And, since Association::memberEnd subsets Association::member, all the ends of an association are features of the association, whether they are owned ends or not. Therefore, an owned end can redefine any end of any ancestor of its owning association, whether that end is association owned or not. On the other hand, an end that is not association owned can only redefine properties that are features of the (non-association) an ancestor of the classifier that owns it. Since the features of non-association classifiers never include association-owned ends, it is not possible for a non-association owned end to redefine an association-owned end. (But there doesn.t seem to be anything stopping a non-association owned end from redefining a property of an ancestor classifier that is not an association end at all.) I seem to remember that there was an RTF discussion of owned ends redefining non-owned ends and vice versa, as part of all the discussion on redefinition and subsetting. I am not sure if the above was the intentional result of that discussion, but I think this is the way it is. -- Ed -------------------------------------------------------------------------------- From: Maged Elaasar [mailto:melaasar@ca.ibm.com] Sent: Tuesday, September 14, 2010 12:22 PM To: uml2-rtf@omg.org Subject: redefinitionContext of Property Hi All, In my analysis of metamodel well-formedness rules, I came across this question: How do you derive the redefinitionContext of a property? I think it is currently a derived union that is subsetted by Element::owner. But cannot an association-owned end redefine a class-owned end and vice versa? in which case the redefinitionContext is not the owner but really the type of the opposite end? Maged