Issue 18806: Definition of allOwningPackages() (uml25-ftf) Source: Microsoft (Mr. Steve Cook, stcook(at)microsoft.com) Nature: Revision Severity: Summary: NamedElement:: allOwningPackages() is documented as “The query allOwningPackages() returns all the Packages that in which this NamedElement is directly or indirectly contained, without any intervening Namespace that is not a Package.” But the OCL is if namespace.oclIsKindOf(Package) then let owningPackage : Package = namespace.oclAsType(Package) in owningPackage->union(owningPackage.allOwningPackages()) else null endif Which would stop looking at any element not owned by a Package - which contradicts the documentation. I think it should instead read: allNamespaces()->select(oclIsKindOf(Package)) But allOwningPackages is only used in Profile::references_same_metamodel, and I don’t like that either: All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. inv: metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages()-> union(metaclassReference.importedElement.allOwningPackages() )->notEmpty() Surely this is completely wrong, both in its own right, and especially in the light of the following statement: Where both a metaclassReference and a metamodelReference are present on a profile, the latter is ignored and only the specific metaclasses are available. I’m thinking the right logic would be something like this: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) Any comments? Resolution: Revised Text: Actions taken: July 10, 2013: received issue Discussion: End of Annotations:===== m: Steve Cook To: "uml25-ftf@omg.org" Subject: Definition of allOwningPackages() Thread-Topic: Definition of allOwningPackages() Thread-Index: Ac59by2f69x/yaK/Qnqgu8ev0AI7OQ== Date: Wed, 10 Jul 2013 13:49:39 +0000 Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.166.18.100] X-Forefront-Antispam-Report: CIP:131.107.125.37;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(35774003)(199002)(189002)(50986001)(47976001)(76786001)(81342001)(56776001)(15202345003)(76176001)(77982001)(55846006)(69226001)(74502001)(74662001)(6806003)(77096001)(71186001)(512954002)(59766001)(81542001)(54356001)(44976004)(76482001)(53806001)(16406001)(49866001)(16236675002)(20776003)(74876001)(79102001)(47736001)(80022001)(74706001)(51856001)(56816003)(63696002)(31966008)(65816001)(46102001)(83072001)(19300405004)(4396001)(74366001)(33656001)(76796001)(54316002)(47446002);DIR:OUT;SFP:;SCL:1;SRVR:BL2FFO11HUB017;H:TK5EX14HUBC107.redmond.corp.microsoft.com;CLIP:131.107.125.37;RD:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-OriginatorOrg: microsoft.onmicrosoft.com X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY) X-Forefront-PRVS: 0903DD1D85 X-Virus-Scanned: amavisd-new at omg.org NamedElement:: allOwningPackages() is documented as .The query allOwningPackages() returns all the Packages that in which this NamedElement is directly or indirectly contained, without any intervening Namespace that is not a Package.. But the OCL is if namespace.oclIsKindOf(Package) then let owningPackage : Package = namespace.oclAsType(Package) in owningPackage->union(owningPackage.allOwningPackages()) else null endif Which would stop looking at any element not owned by a Package - which contradicts the documentation. I think it should instead read: allNamespaces()->select(oclIsKindOf(Package)) But allOwningPackages is only used in Profile::references_same_metamodel, and I don.t like that either: All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. inv: metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages()-> union(metaclassReference.importedElement.allOwningPackages() )->notEmpty() Surely this is completely wrong, both in its own right, and especially in the light of the following statement: Where both a metaclassReference and a metamodelReference are present on a profile, the latter is ignored and only the specific metaclasses are available. I.m thinking the right logic would be something like this: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) Any comments? -- Steve X-Virus-Scanned: OK From: Ed Seidewitz To: Steve Cook CC: "uml25-ftf@omg.org" Subject: RE: Definition of allOwningPackages() Thread-Topic: Definition of allOwningPackages() Thread-Index: Ac59by2f69x/yaK/Qnqgu8ev0AI7OQABmiFg Date: Wed, 10 Jul 2013 14:05:51 +0000 Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.228.227.222] X-Virus-Scanned: amavisd-new at omg.org Steve . I haven.t looked at the references_same_metamodel constraint, but I believe that allOwningPackages is correct (thought the name and the documentation may not be the best). The final clause in the description, .without any intervening Namespace that is not a Package. means that, if in the chain of ownership of a NamedElement, there is a Namespace that is not a Package, then any Packages in which that Namespace is contained are not included in the output of allOwningPackages. If the NamedElement is directly owned by a Namespace that is not a Package, then, in this sense, it has no .owning packages., so there is no need to look further. -- Ed From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 9:50 AM To: uml25-ftf@omg.org Subject: Definition of allOwningPackages() NamedElement:: allOwningPackages() is documented as .The query allOwningPackages() returns all the Packages that in which this NamedElement is directly or indirectly contained, without any intervening Namespace that is not a Package.. But the OCL is if namespace.oclIsKindOf(Package) then let owningPackage : Package = namespace.oclAsType(Package) in owningPackage->union(owningPackage.allOwningPackages()) else null endif Which would stop looking at any element not owned by a Package - which contradicts the documentation. I think it should instead read: allNamespaces()->select(oclIsKindOf(Package)) But allOwningPackages is only used in Profile::references_same_metamodel, and I don.t like that either: All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. inv: metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages()-> union(metaclassReference.importedElement.allOwningPackages() )->notEmpty() Surely this is completely wrong, both in its own right, and especially in the light of the following statement: Where both a metaclassReference and a metamodelReference are present on a profile, the latter is ignored and only the specific metaclasses are available. I.m thinking the right logic would be something like this: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) Any comments? -- Steve From: Steve Cook To: Ed Seidewitz CC: "uml25-ftf@omg.org" Subject: RE: Definition of allOwningPackages() Thread-Topic: Definition of allOwningPackages() Thread-Index: Ac59by2f69x/yaK/Qnqgu8ev0AI7OQABmiFgAAB3XqA= Date: Wed, 10 Jul 2013 14:16:51 +0000 Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.166.18.102] X-Forefront-Antispam-Report: CIP:131.107.125.37;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(377454003)(189002)(35774003)(199002)(33656001)(6806003)(63696002)(77982001)(31966008)(74706001)(76786001)(77096001)(74366001)(80022001)(15202345003)(74876001)(79102001)(20776003)(53806001)(81342001)(46102001)(49866001)(65816001)(74502001)(76796001)(512954002)(50986001)(81542001)(54316002)(16406001)(47446002)(47976001)(51856001)(4396001)(56776001)(16236675002)(55846006)(76482001)(44976004)(74662001)(54356001)(56816003)(19300405004)(59766001)(47736001)(69226001)(71186001)(83072001);DIR:OUT;SFP:;SCL:1;SRVR:BL2FFO11HUB042;H:TK5EX14MLTC102.redmond.corp.microsoft.com;CLIP:131.107.125.37;RD:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-OriginatorOrg: microsoft.onmicrosoft.com X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY) X-Forefront-PRVS: 0903DD1D85 X-Virus-Scanned: amavisd-new at omg.org Ed. Hmm. I cannot agree. The phrase .all the Packages that in which this NamedElement is directly or indirectly contained. seems perfectly unambiguous to me, and in the case where an intervening Namespace were not a Package (for example, a Class nested in a Class), it should surely return the Packages that contain the nesting Class, not null. The fact that this operation is only used within UML for Profiles makes this a moot conversation, but still . -- Steve From: Ed Seidewitz [mailto:eseidewitz@ivarjacobson.com] Sent: 10 July 2013 15:06 To: Steve Cook Cc: uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() Steve . I haven.t looked at the references_same_metamodel constraint, but I believe that allOwningPackages is correct (thought the name and the documentation may not be the best). The final clause in the description, .without any intervening Namespace that is not a Package. means that, if in the chain of ownership of a NamedElement, there is a Namespace that is not a Package, then any Packages in which that Namespace is contained are not included in the output of allOwningPackages. If the NamedElement is directly owned by a Namespace that is not a Package, then, in this sense, it has no .owning packages., so there is no need to look further. -- Ed From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 9:50 AM To: uml25-ftf@omg.org Subject: Definition of allOwningPackages() NamedElement:: allOwningPackages() is documented as .The query allOwningPackages() returns all the Packages that in which this NamedElement is directly or indirectly contained, without any intervening Namespace that is not a Package.. But the OCL is if namespace.oclIsKindOf(Package) then let owningPackage : Package = namespace.oclAsType(Package) in owningPackage->union(owningPackage.allOwningPackages()) else null endif Which would stop looking at any element not owned by a Package - which contradicts the documentation. I think it should instead read: allNamespaces()->select(oclIsKindOf(Package)) But allOwningPackages is only used in Profile::references_same_metamodel, and I don.t like that either: All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. inv: metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages()-> union(metaclassReference.importedElement.allOwningPackages() )->notEmpty() Surely this is completely wrong, both in its own right, and especially in the light of the following statement: Where both a metaclassReference and a metamodelReference are present on a profile, the latter is ignored and only the specific metaclasses are available. I.m thinking the right logic would be something like this: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) Any comments? -- Steve X-Virus-Scanned: OK From: Ed Seidewitz To: Steve Cook CC: "uml25-ftf@omg.org" Subject: RE: Definition of allOwningPackages() Thread-Topic: Definition of allOwningPackages() Thread-Index: Ac59by2f69x/yaK/Qnqgu8ev0AI7OQABmiFgAAB3XqAAATXd8A== Date: Wed, 10 Jul 2013 14:53:27 +0000 Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.228.227.222] X-Virus-Scanned: amavisd-new at omg.org Steve . .without any intervening Namespace that is not a Package. modifies .contained.. That is, the intent is for the phrase to be read .all the Packages in which this NamedElement is directly or indirectly (contained without any intervening Namespace that is not a Package).. Parameters, for instance, have no .owning packages. in this sense, because they are always owned by behavioral features or behaviors, which are not packages. The owners of the behavioral feature or behavior are not relevant in this case. Indeed, I can.t think of anything off the top of my head that can own a package other than a package. If that.s true, then what this operation really does is return null for any NamedElement not owned by a Package and all owning Packages otherwise. -- Ed From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 10:17 AM To: Ed Seidewitz Cc: uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() Ed. Hmm. I cannot agree. The phrase .all the Packages that in which this NamedElement is directly or indirectly contained. seems perfectly unambiguous to me, and in the case where an intervening Namespace were not a Package (for example, a Class nested in a Class), it should surely return the Packages that contain the nesting Class, not null. The fact that this operation is only used within UML for Profiles makes this a moot conversation, but still . -- Steve From: Ed Seidewitz [mailto:eseidewitz@ivarjacobson.com] Sent: 10 July 2013 15:06 To: Steve Cook Cc: uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() Steve . I haven.t looked at the references_same_metamodel constraint, but I believe that allOwningPackages is correct (thought the name and the documentation may not be the best). The final clause in the description, .without any intervening Namespace that is not a Package. means that, if in the chain of ownership of a NamedElement, there is a Namespace that is not a Package, then any Packages in which that Namespace is contained are not included in the output of allOwningPackages. If the NamedElement is directly owned by a Namespace that is not a Package, then, in this sense, it has no .owning packages., so there is no need to look further. -- Ed From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 9:50 AM To: uml25-ftf@omg.org Subject: Definition of allOwningPackages() NamedElement:: allOwningPackages() is documented as .The query allOwningPackages() returns all the Packages that in which this NamedElement is directly or indirectly contained, without any intervening Namespace that is not a Package.. But the OCL is if namespace.oclIsKindOf(Package) then let owningPackage : Package = namespace.oclAsType(Package) in owningPackage->union(owningPackage.allOwningPackages()) else null endif Which would stop looking at any element not owned by a Package - which contradicts the documentation. I think it should instead read: allNamespaces()->select(oclIsKindOf(Package)) But allOwningPackages is only used in Profile::references_same_metamodel, and I don.t like that either: All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. inv: metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages()-> union(metaclassReference.importedElement.allOwningPackages() )->notEmpty() Surely this is completely wrong, both in its own right, and especially in the light of the following statement: Where both a metaclassReference and a metamodelReference are present on a profile, the latter is ignored and only the specific metaclasses are available. I.m thinking the right logic would be something like this: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) Any comments? -- Steve From: Steve Cook To: Ed Seidewitz CC: "uml25-ftf@omg.org" Subject: RE: Definition of allOwningPackages() Thread-Topic: Definition of allOwningPackages() Thread-Index: Ac59by2f69x/yaK/Qnqgu8ev0AI7OQABmiFgAAB3XqAAATXd8AAASdhw Date: Wed, 10 Jul 2013 15:02:36 +0000 Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.166.18.102] X-Forefront-Antispam-Report: CIP:131.107.125.37;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(35774003)(199002)(189002)(377454003)(52314003)(16236675002)(80022001)(46102001)(56816003)(74366001)(79102001)(16406001)(76482001)(71186001)(49866001)(74502001)(50986001)(76796001)(77096001)(512954002)(81342001)(53806001)(20776003)(31966008)(65816001)(47976001)(77982001)(55846006)(76786001)(83072001)(59766001)(47736001)(33656001)(74706001)(19300405004)(56776001)(74662001)(54356001)(69226001)(63696002)(15202345003)(81542001)(51856001)(6806003)(74876001)(4396001)(47446002)(54316002)(559001)(579003);DIR:OUT;SFP:;SCL:1;SRVR:BN1AFFO11HUB049;H:TK5EX14HUBC104.redmond.corp.microsoft.com;CLIP:131.107.125.37;RD:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-OriginatorOrg: microsoft.onmicrosoft.com X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY) X-Forefront-PRVS: 0903DD1D85 X-Virus-Scanned: amavisd-new at omg.org >That is, the intent is for the phrase to be read .all the Packages in which this NamedElement is directly or indirectly (contained without any intervening Namespace that is not a Package). Why is there a comma after .contained. then? Seems unequivocally ambiguous to me. >Indeed, I can.t think of anything off the top of my head that can own a package other than a package. A Component can. Anyway, as I said, this operation is only used in the context of Profiles (where the difference doesn.t matter), and the constraint on Profiles is the real problem here. -- Steve From: Ed Seidewitz [mailto:eseidewitz@ivarjacobson.com] Sent: 10 July 2013 15:53 To: Steve Cook Cc: uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() Steve . .without any intervening Namespace that is not a Package. modifies .contained.. That is, the intent is for the phrase to be read .all the Packages in which this NamedElement is directly or indirectly (contained without any intervening Namespace that is not a Package).. Parameters, for instance, have no .owning packages. in this sense, because they are always owned by behavioral features or behaviors, which are not packages. The owners of the behavioral feature or behavior are not relevant in this case. Indeed, I can.t think of anything off the top of my head that can own a package other than a package. If that.s true, then what this operation really does is return null for any NamedElement not owned by a Package and all owning Packages otherwise. -- Ed From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 10:17 AM To: Ed Seidewitz Cc: uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() Ed. Hmm. I cannot agree. The phrase .all the Packages that in which this NamedElement is directly or indirectly contained. seems perfectly unambiguous to me, and in the case where an intervening Namespace were not a Package (for example, a Class nested in a Class), it should surely return the Packages that contain the nesting Class, not null. The fact that this operation is only used within UML for Profiles makes this a moot conversation, but still . -- Steve From: Ed Seidewitz [mailto:eseidewitz@ivarjacobson.com] Sent: 10 July 2013 15:06 To: Steve Cook Cc: uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() Steve . I haven.t looked at the references_same_metamodel constraint, but I believe that allOwningPackages is correct (thought the name and the documentation may not be the best). The final clause in the description, .without any intervening Namespace that is not a Package. means that, if in the chain of ownership of a NamedElement, there is a Namespace that is not a Package, then any Packages in which that Namespace is contained are not included in the output of allOwningPackages. If the NamedElement is directly owned by a Namespace that is not a Package, then, in this sense, it has no .owning packages., so there is no need to look further. -- Ed From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 9:50 AM To: uml25-ftf@omg.org Subject: Definition of allOwningPackages() NamedElement:: allOwningPackages() is documented as .The query allOwningPackages() returns all the Packages that in which this NamedElement is directly or indirectly contained, without any intervening Namespace that is not a Package.. But the OCL is if namespace.oclIsKindOf(Package) then let owningPackage : Package = namespace.oclAsType(Package) in owningPackage->union(owningPackage.allOwningPackages()) else null endif Which would stop looking at any element not owned by a Package - which contradicts the documentation. I think it should instead read: allNamespaces()->select(oclIsKindOf(Package)) But allOwningPackages is only used in Profile::references_same_metamodel, and I don.t like that either: All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. inv: metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages()-> union(metaclassReference.importedElement.allOwningPackages() )->notEmpty() Surely this is completely wrong, both in its own right, and especially in the light of the following statement: Where both a metaclassReference and a metamodelReference are present on a profile, the latter is ignored and only the specific metaclasses are available. I.m thinking the right logic would be something like this: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) Any comments? -- Steve From: "Rouquette, Nicolas F (313K)" To: Ed Seidewitz , Steve Cook CC: "uml25-ftf@omg.org" Subject: Re: Definition of allOwningPackages() Thread-Topic: Definition of allOwningPackages() Thread-Index: Ac59by2f69x/yaK/Qnqgu8ev0AI7OQABmiFgAAB3XqAAATXd8AAApk+A Date: Wed, 10 Jul 2013 15:05:13 +0000 Accept-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.4.130416 x-originating-ip: [128.149.137.113] X-Source-Sender: nicolas.f.rouquette@jpl.nasa.gov X-AUTH: Authorized X-Virus-Scanned: amavisd-new at omg.org Ed, A Component can own a Package. I'm not sure what allOwningPackages() should be for the components, packages and class in the following cases. At least OMG and OMG::Packages ought be included in all cases. Is this correct? P1.allOwningPackages() = OMG, OMG::Packages C1.allOwningPackages() = OMG, OMG::Packages, OMG::Packages::P1 P2.allOwningPackages() = OMG, OMG::Packages, OMG::Packages::P1 C2.allOwningPackages() = OMG, OMG::Packages, OMG::Packages::P1, OMG::Packages::P1::C1::P2 P3.allOwningPackages() = OMG, OMG::Packages, OMG::Packages::P1, OMG::Packages::P1::C1::P2 A.allOwningPackages() = OMG, OMG::Packages, OMG::Packages::P1, OMG::Packages::P1::C1::P2, OMG::Packages::P1::C1::P2::C2::P3 Besides Components, it is possible for a Package to be owned as a TemplateParameter of a TemplateSignature of a ParameterableElement. In that case, I believe that "without any intervening Namespace that is not a Package" is actually incomplete, it ought to say: "without any intervening owner that is not a Package". Nicolas. From: Ed Seidewitz Date: Wednesday, July 10, 2013 7:53 AM To: Steve Cook Cc: "uml25-ftf@omg.org" Subject: RE: Definition of allOwningPackages() Steve . .without any intervening Namespace that is not a Package. modifies .contained.. That is, the intent is for the phrase to be read .all the Packages in which this NamedElement is directly or indirectly (contained without any intervening Namespace that is not a Package).. Parameters, for instance, have no .owning packages. in this sense, because they are always owned by behavioral features or behaviors, which are not packages. The owners of the behavioral feature or behavior are not relevant in this case. Indeed, I can.t think of anything off the top of my head that can own a package other than a package. If that.s true, then what this operation really does is return null for any NamedElement not owned by a Package and all owning Packages otherwise. -- Ed From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 10:17 AM To: Ed Seidewitz Cc: uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() Ed. Hmm. I cannot agree. The phrase .all the Packages that in which this NamedElement is directly or indirectly contained. seems perfectly unambiguous to me, and in the case where an intervening Namespace were not a Package (for example, a Class nested in a Class), it should surely return the Packages that contain the nesting Class, not null. The fact that this operation is only used within UML for Profiles makes this a moot conversation, but still . -- Steve From: Ed Seidewitz [mailto:eseidewitz@ivarjacobson.com] Sent: 10 July 2013 15:06 To: Steve Cook Cc: uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() Steve . I haven.t looked at the references_same_metamodel constraint, but I believe that allOwningPackages is correct (thought the name and the documentation may not be the best). The final clause in the description, .without any intervening Namespace that is not a Package. means that, if in the chain of ownership of a NamedElement, there is a Namespace that is not a Package, then any Packages in which that Namespace is contained are not included in the output of allOwningPackages. If the NamedElement is directly owned by a Namespace that is not a Package, then, in this sense, it has no .owning packages., so there is no need to look further. -- Ed From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 9:50 AM To: uml25-ftf@omg.org Subject: Definition of allOwningPackages() NamedElement:: allOwningPackages() is documented as .The query allOwningPackages() returns all the Packages that in which this NamedElement is directly or indirectly contained, without any intervening Namespace that is not a Package.. But the OCL is if namespace.oclIsKindOf(Package) then let owningPackage : Package = namespace.oclAsType(Package) in owningPackage->union(owningPackage.allOwningPackages()) else null endif Which would stop looking at any element not owned by a Package - which contradicts the documentation. I think it should instead read: allNamespaces()->select(oclIsKindOf(Package)) But allOwningPackages is only used in Profile::references_same_metamodel, and I don.t like that either: All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. inv: metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages()-> union(metaclassReference.importedElement.allOwningPackages() )->notEmpty() Surely this is completely wrong, both in its own right, and especially in the light of the following statement: Where both a metaclassReference and a metamodelReference are present on a profile, the latter is ignored and only the specific metaclasses are available. I.m thinking the right logic would be something like this: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) Any comments? -- Steve Subject: RE: Definition of allOwningPackages() Date: Wed, 10 Jul 2013 08:58:57 -0700 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Definition of allOwningPackages() Thread-Index: Ac59by2f69x/yaK/Qnqgu8ev0AI7OQABjT+w From: "Pete Rivett" To: "Steve Cook" , X-Virus-Scanned: amavisd-new at omg.org For: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) There is a bad uppercase C in the first metaClassReference This condition will be satisfied if imported metaclasses (or members of base metamodel) have some random package as common parent: it should I think check that the packages include the base metamodel if specified (which would imply modifying the text that says metamodelReference is completely ignored). Pete From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 6:50 AM To: uml25-ftf@omg.org Subject: Definition of allOwningPackages() NamedElement:: allOwningPackages() is documented as .The query allOwningPackages() returns all the Packages that in which this NamedElement is directly or indirectly contained, without any intervening Namespace that is not a Package.. But the OCL is if namespace.oclIsKindOf(Package) then let owningPackage : Package = namespace.oclAsType(Package) in owningPackage->union(owningPackage.allOwningPackages()) else null endif Which would stop looking at any element not owned by a Package - which contradicts the documentation. I think it should instead read: allNamespaces()->select(oclIsKindOf(Package)) But allOwningPackages is only used in Profile::references_same_metamodel, and I don.t like that either: All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. inv: metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages()-> union(metaclassReference.importedElement.allOwningPackages() )->notEmpty() Surely this is completely wrong, both in its own right, and especially in the light of the following statement: Where both a metaclassReference and a metamodelReference are present on a profile, the latter is ignored and only the specific metaclasses are available. I.m thinking the right logic would be something like this: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) Any comments? -- Steve From: Steve Cook To: Pete Rivett , "uml25-ftf@omg.org" Subject: RE: Definition of allOwningPackages() Thread-Topic: Definition of allOwningPackages() Thread-Index: Ac59by2f69x/yaK/Qnqgu8ev0AI7OQABjT+wAAd6MgY= Date: Wed, 10 Jul 2013 17:31:21 +0000 Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: X-Forefront-Antispam-Report: CIP:131.107.125.37;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(189002)(35774003)(199002)(377454003)(74706001)(76482001)(56776001)(59766001)(71186001)(76786001)(79102001)(16406001)(47736001)(65816001)(55846006)(6806003)(50986001)(80022001)(74876001)(74366001)(77982001)(81542001)(4396001)(49866001)(56816003)(54316002)(33656001)(69226001)(83072001)(51856001)(54356001)(77096001)(47446002)(16236675002)(44976004)(53806001)(74662001)(74502001)(46102001)(63696002)(20776003)(47976001)(31966008)(76796001)(81342001);DIR:OUT;SFP:;SCL:1;SRVR:BL2FFO11HUB033;H:TK5EX14HUBC103.redmond.corp.microsoft.com;CLIP:131.107.125.37;RD:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-OriginatorOrg: microsoft.onmicrosoft.com X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY) X-Forefront-PRVS: 0903DD1D85 X-Virus-Scanned: amavisd-new at omg.org Pete - how do you propose to find the base metamodel? Sent from my Windows Phone -------------------------------------------------------------------------------- From: Pete Rivett Sent: .10/.07/.2013 16:59 To: Steve Cook; uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() For: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) There is a bad uppercase C in the first metaClassReference This condition will be satisfied if imported metaclasses (or members of base metamodel) have some random package as common parent: it should I think check that the packages include the base metamodel if specified (which would imply modifying the text that says metamodelReference is completely ignored). Pete From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 6:50 AM To: uml25-ftf@omg.org Subject: Definition of allOwningPackages() NamedElement:: allOwningPackages() is documented as .The query allOwningPackages() returns all the Packages that in which this NamedElement is directly or indirectly contained, without any intervening Namespace that is not a Package.. But the OCL is if namespace.oclIsKindOf(Package) then let owningPackage : Package = namespace.oclAsType(Package) in owningPackage->union(owningPackage.allOwningPackages()) else null endif Which would stop looking at any element not owned by a Package - which contradicts the documentation. I think it should instead read: allNamespaces()->select(oclIsKindOf(Package)) But allOwningPackages is only used in Profile::references_same_metamodel, and I don.t like that either: All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. inv: metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages()-> union(metaclassReference.importedElement.allOwningPackages() )->notEmpty() Surely this is completely wrong, both in its own right, and especially in the light of the following statement: Where both a metaclassReference and a metamodelReference are present on a profile, the latter is ignored and only the specific metaclasses are available. I.m thinking the right logic would be something like this: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) Any comments? -- Steve Subject: RE: Definition of allOwningPackages() Date: Wed, 10 Jul 2013 13:32:52 -0700 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Definition of allOwningPackages() Thread-Index: Ac59by2f69x/yaK/Qnqgu8ev0AI7OQABjT+wAAd6MgYABlE8UA== From: "Pete Rivett" To: "Steve Cook" , X-Virus-Scanned: amavisd-new at omg.org If metamodelReference is set it could be checked as opposed to completely ignored. From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 10:31 AM To: Pete Rivett; uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() Pete - how do you propose to find the base metamodel? Sent from my Windows Phone -------------------------------------------------------------------------------- From: Pete Rivett Sent: .10/.07/.2013 16:59 To: Steve Cook; uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() For: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) There is a bad uppercase C in the first metaClassReference This condition will be satisfied if imported metaclasses (or members of base metamodel) have some random package as common parent: it should I think check that the packages include the base metamodel if specified (which would imply modifying the text that says metamodelReference is completely ignored). Pete From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 6:50 AM To: uml25-ftf@omg.org Subject: Definition of allOwningPackages() NamedElement:: allOwningPackages() is documented as .The query allOwningPackages() returns all the Packages that in which this NamedElement is directly or indirectly contained, without any intervening Namespace that is not a Package.. But the OCL is if namespace.oclIsKindOf(Package) then let owningPackage : Package = namespace.oclAsType(Package) in owningPackage->union(owningPackage.allOwningPackages()) else null endif Which would stop looking at any element not owned by a Package - which contradicts the documentation. I think it should instead read: allNamespaces()->select(oclIsKindOf(Package)) But allOwningPackages is only used in Profile::references_same_metamodel, and I don.t like that either: All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. inv: metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages()-> union(metaclassReference.importedElement.allOwningPackages() )->notEmpty() Surely this is completely wrong, both in its own right, and especially in the light of the following statement: Where both a metaclassReference and a metamodelReference are present on a profile, the latter is ignored and only the specific metaclasses are available. I.m thinking the right logic would be something like this: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) Any comments? -- Steve From: Steve Cook To: Pete Rivett , "uml25-ftf@omg.org" Subject: RE: Definition of allOwningPackages() Thread-Topic: Definition of allOwningPackages() Thread-Index: Ac59by2f69x/yaK/Qnqgu8ev0AI7OQABjT+wAAd6MgYABlE8UAAd8XRQ Date: Thu, 11 Jul 2013 10:52:05 +0000 Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.166.18.101] X-Forefront-Antispam-Report: CIP:131.107.125.37;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(377454003)(35774003)(199002)(189002)(15202345003)(51856001)(49866001)(46102001)(54316002)(74662001)(59766001)(56816003)(47976001)(79102001)(33656001)(55846006)(69226001)(54356001)(76796001)(77096001)(81342001)(20776003)(31966008)(74502001)(71186001)(6806004)(74706001)(19300405004)(16406001)(56776001)(76786001)(53806001)(4396001)(47446002)(80022001)(74876001)(50986001)(65816001)(47736001)(83072001)(63696002)(74366001)(44976004)(77982001)(81542001)(76482001)(16236675002);DIR:OUT;SFP:;SCL:1;SRVR:BY2FFO11HUB016;H:TK5EX14HUBC106.redmond.corp.microsoft.com;CLIP:131.107.125.37;RD:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-OriginatorOrg: microsoft.onmicrosoft.com X-O365ENT-EOP-Header: Message processed by - O365_ENT: Allow from ranges (Engineering ONLY) X-Forefront-PRVS: 0904004ECB X-Virus-Scanned: amavisd-new at omg.org Well, I shall raise an issue against clause 12 that the logic of Profile::references_same_metamodel is wrong. I would like to see those people who have promised to work on resolving clause 12 issues to decide what to do about it. From: Pete Rivett [mailto:pete.rivett@adaptive.com] Sent: 10 July 2013 21:33 To: Steve Cook; uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() If metamodelReference is set it could be checked as opposed to completely ignored. From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 10:31 AM To: Pete Rivett; uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() Pete - how do you propose to find the base metamodel? Sent from my Windows Phone -------------------------------------------------------------------------------- From: Pete Rivett Sent: .10/.07/.2013 16:59 To: Steve Cook; uml25-ftf@omg.org Subject: RE: Definition of allOwningPackages() For: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) There is a bad uppercase C in the first metaClassReference This condition will be satisfied if imported metaclasses (or members of base metamodel) have some random package as common parent: it should I think check that the packages include the base metamodel if specified (which would imply modifying the text that says metamodelReference is completely ignored). Pete From: Steve Cook [mailto:Steve.Cook@microsoft.com] Sent: Wednesday, July 10, 2013 6:50 AM To: uml25-ftf@omg.org Subject: Definition of allOwningPackages() NamedElement:: allOwningPackages() is documented as .The query allOwningPackages() returns all the Packages that in which this NamedElement is directly or indirectly contained, without any intervening Namespace that is not a Package.. But the OCL is if namespace.oclIsKindOf(Package) then let owningPackage : Package = namespace.oclAsType(Package) in owningPackage->union(owningPackage.allOwningPackages()) else null endif Which would stop looking at any element not owned by a Package - which contradicts the documentation. I think it should instead read: allNamespaces()->select(oclIsKindOf(Package)) But allOwningPackages is only used in Profile::references_same_metamodel, and I don.t like that either: All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. inv: metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages()-> union(metaclassReference.importedElement.allOwningPackages() )->notEmpty() Surely this is completely wrong, both in its own right, and especially in the light of the following statement: Where both a metaclassReference and a metamodelReference are present on a profile, the latter is ignored and only the specific metaclasses are available. I.m thinking the right logic would be something like this: (metaClassReference->isEmpty() implies metamodelReference.importedPackage.member->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty())) and metaclassReference.importedElement->forAll( m1, m2 | m1.allOwningPackages().intersection(m2.allOwningPackages())->notEmpty()) Any comments? -- Steve