Issue 11238: composite subsets (uml2-rtf) Source: No Magic, Inc. (Mr. Nerijus Jankevicius, nerijus(at)nomagic.com) Nature: Uncategorized Issue Severity: Summary: There are several places in metamodel where non-derived composite property is subset of other non-derived composite property. In this case element is owned in two collections, so how it should be reflected in XMI where element could appear just once? We can leave element just in subset, and merge collections after load, but is this correct? Below are these occurrences: classes::mdKernel::Operation::bodyCondition subsets ownedRule statemachines::mdBehaviorStateMachines::Transition::guard subsets ownedRule classes::mdKernel::Operation::postcondition subsets ownedRule statemachines::mdProtocolStateMachines::ProtocolTransition::postCondition subsets ownedRule classes::mdKernel::Operation::precondition subsets ownedRule statemachines::mdProtocolStateMachines::ProtocolTransition::preCondition subsets ownedRule Profile::metaclassReference subsets elementImport uml2.1.1::mdProfiles::Profile::metaclassReference subsets packageImport Resolution: Revised Text: Actions taken: August 1, 2007: received issue Discussion: End of Annotations:===== m: "Nerijus Jankevicius" To: Subject: composite subsets Date: Wed, 1 Aug 2007 14:10:37 +0300 X-Mailer: Microsoft Windows Mail 6.0.6000.16480 Hello, There are several places in metamodel where non-derived composite property is subset of other non-derived composite property. In this case element is owned in two collections, so how it should be reflected in XMI where element could appear just once? We can leave element just in subset, and merge collections after load, but is this correct? Below are these occurrences: classes::mdKernel::Operation::bodyCondition subsets ownedRule statemachines::mdBehaviorStateMachines::Transition::guard subsets ownedRule classes::mdKernel::Operation::postcondition subsets ownedRule statemachines::mdProtocolStateMachines::ProtocolTransition::postCondition subsets ownedRule classes::mdKernel::Operation::precondition subsets ownedRule statemachines::mdProtocolStateMachines::ProtocolTransition::preCondition subsets ownedRule Profile::metaclassReference subsets elementImport uml2.1.1::mdProfiles::Profile::metaclassReference subsets packageImport Regards, -- Nerijus Jankevicius Senior System Analyst OMG-Certified UML Professional No Magic Lithuanian Development Center Savanoriu pr. 363, LT 49425 Kaunas P.O. box 2166, LT- 3000, Kaunas Phone: +370-37-324032 Fax: +370-37-320670 e-mail: nerijus@magicdraw.com WWW: http://www.magicdraw.com -- MagicDraw - Architecture made simple! Reply-To: From: "Conrad Bock" To: "'Nerijus Jankevicius'" , Subject: RE: composite subsets Date: Wed, 1 Aug 2007 08:39:50 -0400 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcfULTRVwyn1IZpySu28+RKJ75mB/QAC0FPg X-MailScanner-Information: Please contact postmaster@mel.nist.gov for more information X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-MailScanner-From: conrad.bock@nist.gov X-Spam-Status: No Nerijus, > There are several places in metamodel where non-derived composite > property is subset of other non-derived composite property. In this > case element is owned in two collections, so how it should be > reflected in XMI where element could appear just once? Why is it necessary to appear in only one collection? The only semantic (M0) constraint on composite associations is that an M0 element can be "owned" by at most one other M0 element, where ownership is determined by the composite associations. It doesn't prevent an M0 element from being linked to the same M0 element by multiple composite associations. Conrad Reply-To: From: "Conrad Bock" To: "'Ed Seidewitz'" , "'Nerijus Jankevicius'" Cc: Subject: RE: composite subsets Date: Wed, 1 Aug 2007 08:42:42 -0400 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcfULR/EY0FF3owkRfKTIXROVgfnkwABazmQAAGQnlA= X-MailScanner-Information: Please contact postmaster@mel.nist.gov for more information X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-MailScanner-From: conrad.bock@nist.gov X-Spam-Status: No Nerijus, > 1. Section 6.5.2, page 18 (in the context of association > specialization): "The constraint {subsets endA} means that > the association end to which this constraint is applied is > a specialization of association end endA that is part of > the association being specialized." The above definition doesn't make sense, because association ends aren't classifers, so can't be specialized. > This leaves case 2. But in this case, there are two > separate associations that just happen to be related by an > implicit constraint. This means that they can't both > legally be composition associations. Didn't follow this. Conrad From: "Nerijus Jankevicius" To: "Frank, Karl (Mission Systems)" , "Ed Seidewitz" Cc: Subject: Re: composite subsets Date: Wed, 1 Aug 2007 16:35:35 +0300 X-Mailer: Microsoft Windows Mail 6.0.6000.16480 I'm not looking for correct description what is subset. This concept is more or less clear. My problem is these specific cases which can't be saved into XMI, because the same element can't be defined twice. Should we change metamodel or should we save just a superset (or just subset) to XMI? Nerijus ----- Original Message ----- From: Frank, Karl (Mission Systems) To: Ed Seidewitz ; Nerijus Jankevicius Cc: uml2-rtf@omg.org Sent: Wednesday, August 01, 2007 4:21 PM Subject: RE: composite subsets seems a confusion is implicit in the first item Ed found in the spec wrt subset concept: 1. Section 6.5.2, page 18 (in the context of association specialization): "The constraint {subsets endA} means that the association end to which this constraint is applied is a specialization of association end endA that is part of the association being specialized." imo confusion is at heart this: that specialization is an intensional relationship between definitions, and subset an extensional one between extents, so it is inappropriate to define [subsets endA} in terms of specialization. observations relevant include: a subset may not be a proper subset, in the usual set-theory sense of proper subset, since every set is a subset of itself. So am proposing that of these definitions Ed found, the bad apple is number 1. Number 3 is ok in this regard, because the union of subsets may, in the special case of subsets which are not PROPER subsets, may have the same cardinality and members as its subsets. The common mistake of thinking that specializing a concept narrows its extension is lurking here. Cordially yours, Karl Frank General Scientist, Mission Systems Northrop-Grumman Corporation GMT-5 (EDT, EST) cell: +1 978 853 3592 -------------------------------------------------------------------------------- From: Ed Seidewitz [mailto:ed-s@modeldriven.com] Sent: Wednesday, August 01, 2007 8:17 AM To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Subject: RE: composite subsets Nerijus -- This is a really good question. I think the issue of subsets has come up before, but I don't think it has ever been fully resolved. The problem is, there are at least three definitions of what "subsets" means on an association end (references are to the 2.1.1 spec): 1. Section 6.5.2, page 18 (in the context of association specialization): "The constraint {subsets endA} means that the association end to which this constraint is applied is a specialization of association end endA that is part of the association being specialized." 2. Section 7.3.3, page 44: "{subsets } to show that the end is a subset of the property called ."; page 46, Figure 7.22 and page 47: "Subsetting on d. For an instance of class C, the collection d is a subset of the collection b. This is equivalent to the OCL constraint: context C inv: b->includesAll(d)" (see also Section 7.3.44, page 130). 3. Section 7.3.3, page 43: "{union} to show that the end is derived by being the union of its subsets." and page 48, Figure 7.25. I think 3 is supposed to be a special case of 2, but the semantics of 3 are really constructive (of the derived union), while those of 2 are declarative. When case 3 is used in the spec, the convention is not to use composition for the derived union, but only for the ultimate "owned" property subset. The issue in the examples you give is that they are of properties that further subset non-derived "ownership" subsets of derived union properties. The question is, which of cases 1 or 2 then apply? If case 1 applied, and the subset properties where properties of a specialized association, then I think there could be a reasonable semantics in which both the generalization and the specialization are composite (indeed, perhaps if the generalization was, the specialization would have to be). However, the semantic details of association specialization is not really at all clear in the spec. And, in any case, it is not be used in the metamodel. This leaves case 2. But in this case, there are two separate associations that just happen to be related by an implicit constraint. This means that they can't both legally be composition associations. So, I think the answer to your question is that the spec is simply ill formed in the cases you note. None of the associations with the subset properties you indicated should be composition associations. In the XMI, an element in one of the subset properties should be referenced (at least) twice: once in the subset property and once in the superset property. Does that make sense? -- Ed -------------------------------------------------------------------------------- From: Nerijus Jankevicius [mailto:nerijus@nomagic.com] Sent: Wednesday, August 01, 2007 7:11 AM To: uml2-rtf@omg.org Subject: composite subsets Hello, There are several places in metamodel where non-derived composite property is subset of other non-derived composite property. In this case element is owned in two collections, so how it should be reflected in XMI where element could appear just once? We can leave element just in subset, and merge collections after load, but is this correct? Below are these occurrences: classes::mdKernel::Operation::bodyCondition subsets ownedRule statemachines::mdBehaviorStateMachines::Transition::guard subsets ownedRule classes::mdKernel::Operation::postcondition subsets ownedRule statemachines::mdProtocolStateMachines::ProtocolTransition::postCondition subsets ownedRule classes::mdKernel::Operation::precondition subsets ownedRule statemachines::mdProtocolStateMachines::ProtocolTransition::preCondition subsets ownedRule Profile::metaclassReference subsets elementImport uml2.1.1::mdProfiles::Profile::metaclassReference subsets packageImport Regards, -- Nerijus Jankevicius Senior System Analyst OMG-Certified UML Professional No Magic Lithuanian Development Center Savanoriu pr. 363, LT 49425 Kaunas P.O. box 2166, LT- 3000, Kaunas Phone: +370-37-324032 Fax: +370-37-320670 e-mail: nerijus@magicdraw.com WWW: http://www.magicdraw.com -- MagicDraw - Architecture made simple! Date: Wed, 01 Aug 2007 14:38:17 +0100 From: Dave Hawkins User-Agent: Thunderbird 1.5.0.4 (X11/20060516) To: conrad.bock@nist.gov Cc: "'Nerijus Jankevicius'" , uml2-rtf@omg.org Subject: Re: composite subsets X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE You only want to output the data for the part once, however the current XMI spec isn't explicit about how to indicate that the part participates in several composite links. For example, Constraint1 is also a member of the ownedRule end which is subset by bodyCondition. In this case the superset membership can be assumed, however I don't believe the XMI spec explicitly says you can do this. Dave Conrad Bock wrote: Nerijus, > There are several places in metamodel where non-derived composite > property is subset of other non-derived composite property. In this > case element is owned in two collections, so how it should be > reflected in XMI where element could appear just once? Why is it necessary to appear in only one collection? The only semantic (M0) constraint on composite associations is that an M0 element can be "owned" by at most one other M0 element, where ownership is determined by the composite associations. It doesn't prevent an M0 element from being linked to the same M0 element by multiple composite associations. Conrad Reply-To: From: "Conrad Bock" To: "'Nerijus Jankevicius'" , "'Frank, Karl (Mission Systems)'" , "'Ed Seidewitz'" Cc: Subject: RE: composite subsets Date: Wed, 1 Aug 2007 10:01:17 -0400 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcfUQ7zfBEhIzg8lSYuQxHcr8ts1MAAAK75Q X-MailScanner-Information: Please contact postmaster@mel.nist.gov for more information X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-MailScanner-From: conrad.bock@nist.gov X-Spam-Status: No Dave, > You only want to output the data for the part once, however the > current XMI spec isn't explicit about how to indicate that the part > participates in several composite links. > [Nerijus] My problem is these specific cases which can't be saved > into XMI, because the same element can't be defined twice. Should > we change metamodel or should we save just a superset (or just > subset) to XMI? An element should only be defined once, but XMI should specify how it can be referred to mulitple times. This isn't restricted to composite associations. An instance of a class can have multiple properties that all have the same object as a value. Conrad Subject: RE: composite subsets Date: Wed, 1 Aug 2007 08:17:15 -0400 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: composite subsets thread-index: AcfULR/EY0FF3owkRfKTIXROVgfnkwABazmQ From: "Ed Seidewitz" To: "Nerijus Jankevicius" Cc: Nerijus -- This is a really good question. I think the issue of subsets has come up before, but I don't think it has ever been fully resolved. The problem is, there are at least three definitions of what "subsets" means on an association end (references are to the 2.1.1 spec): 1. Section 6.5.2, page 18 (in the context of association specialization): "The constraint {subsets endA} means that the association end to which this constraint is applied is a specialization of association end endA that is part of the association being specialized." 2. Section 7.3.3, page 44: "{subsets } to show that the end is a subset of the property called ."; page 46, Figure 7.22 and page 47: "Subsetting on d. For an instance of class C, the collection d is a subset of the collection b. This is equivalent to the OCL constraint: context C inv: b->includesAll(d)" (see also Section 7.3.44, page 130). 3. Section 7.3.3, page 43: "{union} to show that the end is derived by being the union of its subsets." and page 48, Figure 7.25. I think 3 is supposed to be a special case of 2, but the semantics of 3 are really constructive (of the derived union), while those of 2 are declarative. When case 3 is used in the spec, the convention is not to use composition for the derived union, but only for the ultimate "owned" property subset. The issue in the examples you give is that they are of properties that further subset non-derived "ownership" subsets of derived union properties. The question is, which of cases 1 or 2 then apply? If case 1 applied, and the subset properties where properties of a specialized association, then I think there could be a reasonable semantics in which both the generalization and the specialization are composite (indeed, perhaps if the generalization was, the specialization would have to be). However, the semantic details of association specialization is not really at all clear in the spec. And, in any case, it is not be used in the metamodel. This leaves case 2. But in this case, there are two separate associations that just happen to be related by an implicit constraint. This means that they can't both legally be composition associations. So, I think the answer to your question is that the spec is simply ill formed in the cases you note. None of the associations with the subset properties you indicated should be composition associations. In the XMI, an element in one of the subset properties should be referenced (at least) twice: once in the subset property and once in the superset property. Does that make sense? -- Ed -------------------------------------------------------------------------------- From: Nerijus Jankevicius [mailto:nerijus@nomagic.com] Sent: Wednesday, August 01, 2007 7:11 AM To: uml2-rtf@omg.org Subject: composite subsets Hello, There are several places in metamodel where non-derived composite property is subset of other non-derived composite property. In this case element is owned in two collections, so how it should be reflected in XMI where element could appear just once? We can leave element just in subset, and merge collections after load, but is this correct? Below are these occurrences: classes::mdKernel::Operation::bodyCondition subsets ownedRule statemachines::mdBehaviorStateMachines::Transition::guard subsets ownedRule classes::mdKernel::Operation::postcondition subsets ownedRule statemachines::mdProtocolStateMachines::ProtocolTransition::postCondition subsets ownedRule classes::mdKernel::Operation::precondition subsets ownedRule statemachines::mdProtocolStateMachines::ProtocolTransition::preCondition subsets ownedRule Profile::metaclassReference subsets elementImport uml2.1.1::mdProfiles::Profile::metaclassReference subsets packageImport Regards, -- Nerijus Jankevicius Senior System Analyst OMG-Certified UML Professional No Magic Lithuanian Development Center Savanoriu pr. 363, LT 49425 Kaunas P.O. box 2166, LT- 3000, Kaunas Phone: +370-37-324032 Fax: +370-37-320670 e-mail: nerijus@magicdraw.com WWW: http://www.magicdraw.com -- MagicDraw - Architecture made simple! Subject: RE: composite subsets Date: Wed, 1 Aug 2007 09:21:39 -0400 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: composite subsets Thread-Index: AcfULR/EY0FF3owkRfKTIXROVgfnkwABazmQAAKfD1A= From: "Frank, Karl (Mission Systems)" To: "Ed Seidewitz" , "Nerijus Jankevicius" Cc: X-OriginalArrivalTime: 01 Aug 2007 13:21:41.0193 (UTC) FILETIME=[E5CE9390:01C7D43E] seems a confusion is implicit in the first item Ed found in the spec wrt subset concept: 1. Section 6.5.2, page 18 (in the context of association specialization): "The constraint {subsets endA} means that the association end to which this constraint is applied is a specialization of association end endA that is part of the association being specialized." imo confusion is at heart this: that specialization is an intensional relationship between definitions, and subset an extensional one between extents, so it is inappropriate to define [subsets endA} in terms of specialization. observations relevant include: a subset may not be a proper subset, in the usual set-theory sense of proper subset, since every set is a subset of itself. So am proposing that of these definitions Ed found, the bad apple is number 1. Number 3 is ok in this regard, because the union of subsets may, in the special case of subsets which are not PROPER subsets, may have the same cardinality and members as its subsets. The common mistake of thinking that specializing a concept narrows its extension is lurking here. Cordially yours, Karl Frank General Scientist, Mission Systems Northrop-Grumman Corporation GMT-5 (EDT, EST) cell: +1 978 853 3592 -------------------------------------------------------------------------------- From: Ed Seidewitz [mailto:ed-s@modeldriven.com] Sent: Wednesday, August 01, 2007 8:17 AM To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Subject: RE: composite subsets Nerijus -- This is a really good question. I think the issue of subsets has come up before, but I don't think it has ever been fully resolved. The problem is, there are at least three definitions of what "subsets" means on an association end (references are to the 2.1.1 spec): 1. Section 6.5.2, page 18 (in the context of association specialization): "The constraint {subsets endA} means that the association end to which this constraint is applied is a specialization of association end endA that is part of the association being specialized." 2. Section 7.3.3, page 44: "{subsets } to show that the end is a subset of the property called ."; page 46, Figure 7.22 and page 47: "Subsetting on d. For an instance of class C, the collection d is a subset of the collection b. This is equivalent to the OCL constraint: context C inv: b->includesAll(d)" (see also Section 7.3.44, page 130). 3. Section 7.3.3, page 43: "{union} to show that the end is derived by being the union of its subsets." and page 48, Figure 7.25. I think 3 is supposed to be a special case of 2, but the semantics of 3 are really constructive (of the derived union), while those of 2 are declarative. When case 3 is used in the spec, the convention is not to use composition for the derived union, but only for the ultimate "owned" property subset. The issue in the examples you give is that they are of properties that further subset non-derived "ownership" subsets of derived union properties. The question is, which of cases 1 or 2 then apply? If case 1 applied, and the subset properties where properties of a specialized association, then I think there could be a reasonable semantics in which both the generalization and the specialization are composite (indeed, perhaps if the generalization was, the specialization would have to be). However, the semantic details of association specialization is not really at all clear in the spec. And, in any case, it is not be used in the metamodel. This leaves case 2. But in this case, there are two separate associations that just happen to be related by an implicit constraint. This means that they can't both legally be composition associations. So, I think the answer to your question is that the spec is simply ill formed in the cases you note. None of the associations with the subset properties you indicated should be composition associations. In the XMI, an element in one of the subset properties should be referenced (at least) twice: once in the subset property and once in the superset property. Does that make sense? -- Ed -------------------------------------------------------------------------------- From: Nerijus Jankevicius [mailto:nerijus@nomagic.com] Sent: Wednesday, August 01, 2007 7:11 AM To: uml2-rtf@omg.org Subject: composite subsets Hello, There are several places in metamodel where non-derived composite property is subset of other non-derived composite property. In this case element is owned in two collections, so how it should be reflected in XMI where element could appear just once? We can leave element just in subset, and merge collections after load, but is this correct? Below are these occurrences: classes::mdKernel::Operation::bodyCondition subsets ownedRule statemachines::mdBehaviorStateMachines::Transition::guard subsets ownedRule classes::mdKernel::Operation::postcondition subsets ownedRule statemachines::mdProtocolStateMachines::ProtocolTransition::postCondition subsets ownedRule classes::mdKernel::Operation::precondition subsets ownedRule statemachines::mdProtocolStateMachines::ProtocolTransition::preCondition subsets ownedRule Profile::metaclassReference subsets elementImport uml2.1.1::mdProfiles::Profile::metaclassReference subsets packageImport Regards, -- Nerijus Jankevicius Senior System Analyst OMG-Certified UML Professional No Magic Lithuanian Development Center Savanoriu pr. 363, LT 49425 Kaunas P.O. box 2166, LT- 3000, Kaunas Phone: +370-37-324032 Fax: +370-37-320670 e-mail: nerijus@magicdraw.com WWW: http://www.magicdraw.com -- MagicDraw - Architecture made simple! Date: Wed, 01 Aug 2007 15:44:02 +0100 From: Dave Hawkins User-Agent: Thunderbird 1.5.0.4 (X11/20060516) To: conrad.bock@nist.gov Cc: "'Nerijus Jankevicius'" , "'Frank, Karl (Mission Systems)'" , "'Ed Seidewitz'" , uml2-rtf@omg.org Subject: Re: composite subsets X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE Conrad Bock wrote: Dave, > You only want to output the data for the part once, however the > current XMI spec isn't explicit about how to indicate that the part > participates in several composite links. > [Nerijus] My problem is these specific cases which can't be saved > into XMI, because the same element can't be defined twice. Should > we change metamodel or should we save just a superset (or just > subset) to XMI? I think the answer is that you should store the subset, but the Document Production section of the spec needs to be updated to say that. (Actually there are quite a few issues with the BNF in that section.) However that doesn't cover the case where two composite ends separately subset a composite end and both subsets should exist. I suspect there also might be some issues if ends aren't unique. An element should only be defined once, but XMI should specify how it can be referred to mulitple times. This isn't restricted to composite associations. An instance of a class can have multiple properties that all have the same object as a value. Yes the spec should, that it isn't clear for composite ends is an issue that should be logged. Dave Subject: RE: composite subsets Date: Wed, 1 Aug 2007 17:45:46 -0400 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: composite subsets thread-index: AcfULTRVwyn1IZpySu28+RKJ75mB/QAC0FPgABMOPCA= From: "Ed Seidewitz" To: Cc: X-MIME-Autoconverted: from quoted-printable to 8bit by amethyst.omg.org id l71LhAFs026780 Conrad -- Good point. I had always assumed that a part instance could be in at most one link instance of a composite association at a time. However, as you point out, the spec clearly requires only that "a part instance be included in at most one composite at a time". This would seem to me certainly to allow, as you say, a part instance be linked to the _same_ composite by more than one composite association. So I would agree that there really isn't any conceptual issue here, only an XMI mapping issue. -- Ed > -----Original Message----- > From: Conrad Bock [mailto:conrad.bock@nist.gov] > Sent: Wednesday, August 01, 2007 8:40 AM > To: 'Nerijus Jankevicius'; uml2-rtf@omg.org > Subject: RE: composite subsets > > Nerijus, > > > There are several places in metamodel where non-derived composite > > property is subset of other non-derived composite > property. In this > > case element is owned in two collections, so how it should be > > reflected in XMI where element could appear just once? > > Why is it necessary to appear in only one collection? The > only semantic > (M0) constraint on composite associations is that an M0 element can be > "owned" by at most one other M0 element, where ownership is determined > by the composite associations. It doesn't prevent an M0 element from > being linked to the same M0 element by multiple composite > associations. > > Conrad > > Subject: RE: composite subsets Date: Wed, 1 Aug 2007 18:00:50 -0400 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: composite subsets thread-index: AcfUSnRCqW7Bly//TC65+gnBf91sHQAOzhsQ From: "Ed Seidewitz" To: X-MIME-Autoconverted: from quoted-printable to 8bit by amethyst.omg.org id l71Lvx3N028200 Conceptually, if one association end subsets the other, and neither is derived, then these are still two separate associations, there is just a constraint between them. If neither association is composite, then it seems to me that one would map both sets of references just like any other associations, it is up to whatever is generating the XMI to make sure the constraint hold properly (just like other well-formedness constraints). It seems inconsistent to say that, only in the case of composites, you should generate the subset instances only in the subset association, but not in the superset. Note that one would still need to generate the superset association, since it could contain instances not in the subset. When reading the XMI back in, it would then be necessary to merge any subsets into the superset, which would, of course, mean the reader would have to know which associations are subsets of which others. I think the solution Conrad was suggesting makes more sense. That is, it should be possible to output the definition for the part in the superset association, and then effectively treat the subset association as if it wasn't composite. That is, it would simply reference the appropriate subset of entities from the superset composition. Of course, it might just be simpler to change the subset associations pointed out be Nerijus to not be composite. I am not sure that it adds that much in the spec for them to be composite (since what they subset already is). Certainly, this would seem to be an easier short term solution than changing the XMI spec. -- Ed > -----Original Message----- > From: Dave Hawkins [mailto:dave.hawkins@oracle.com] > Sent: Wednesday, August 01, 2007 10:44 AM > To: conrad.bock@nist.gov > Cc: 'Nerijus Jankevicius'; 'Frank, Karl (Mission Systems)'; > Ed Seidewitz; uml2-rtf@omg.org > Subject: Re: composite subsets > > Conrad Bock wrote: > > Dave, > > > > > You only want to output the data for the part once, however the > > > current XMI spec isn't explicit about how to indicate > that the part > > > participates in several composite links. > > > > > [Nerijus] My problem is these specific cases which > can't be saved > > > into XMI, because the same element can't be defined > twice. Should > > > we change metamodel or should we save just a superset (or just > > > subset) to XMI? > > I think the answer is that you should store the subset, but > the Document > Production section of the spec needs to be updated to say > that. (Actually > there are quite a few issues with the BNF in that section.) > However that > doesn't cover the case where two composite ends separately subset a > composite end and both subsets should exist. I suspect there > also might > be some issues if ends aren't unique. > > > An element should only be defined once, but XMI should > specify how it > > can be referred to mulitple times. This isn't restricted > to composite > > associations. An instance of a class can have multiple > properties that > > all have the same object as a value. > > Yes the spec should, that it isn't clear for composite ends > is an issue > that should be logged. > > Dave