Issue 15930: Tags typed by classes/blocks (uml2-rtf) Source: Model Driven Solutions (Mr. Ed Seidewitz, ed-s(at)modeldriven.com) Nature: Uncategorized Issue Severity: Summary: The UML Superstructure spec states in Subclause 18.3.7 that: “A Profile can define Classes, DatatTypes, PrimitiveTypes and Enumerations as well as Stereotypes since Profiles imports Constructs. However, these types can only be used as the type of properties in the profile, they cannot be used as types in models the profile is applied to since they apply at the meta-model level, not the model level. It is however possible to define these types in separate packages and import them as needed in both profiles and models in order to use them for both purposes. Stereotypes can participate in binary associations. The opposite class can be another stereotype, a non-stereotype class that is owned by a profile, or a metaclass of the reference metamodel. For these associations there must be a property owned by the Stereotype to navigate to the opposite class. Where the opposite class is not a stereotype, the opposite property must be owned by the Association itself rather than the other class/metaclass.” However, the restrictions expressed in this text are not formalized by any constraints. Either OCL should be added to formalize these restrictions, or the restrictions should be removed Resolution: Revised Text: Actions taken: January 12, 2011: received issue Discussion: End of Annotations:===== ubject: RE: Tags typed by classes/blocks Date: Wed, 12 Jan 2011 12:19:23 -0500 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Tags typed by classes/blocks thread-index: Acuybxj0r7maXwEQTWWOI4bDZFlKkwADUcNw From: "Ed Seidewitz" To: "Juergen Boldt" Cc: , , Juergen . OK, OK. I suppose it makes sense to have an issue for the following: The UML Superstructure spec states in Subclause 18.3.7 that: .A Profile can define Classes, DatatTypes, PrimitiveTypes and Enumerations as well as Stereotypes since Profiles imports Constructs. However, these types can only be used as the type of properties in the profile, they cannot be used as types in models the profile is applied to since they apply at the meta-model level, not the model level. It is however possible to define these types in separate packages and import them as needed in both profiles and models in order to use them for both purposes. Stereotypes can participate in binary associations. The opposite class can be another stereotype, a non-stereotype class that is owned by a profile, or a metaclass of the reference metamodel. For these associations there must be a property owned by the Stereotype to navigate to the opposite class. Where the opposite class is not a stereotype, the opposite property must be owned by the Association itself rather than the other class/metaclass.. However, the restrictions expressed in this text are not formalized by any constraints. Either OCL should be added to formalize these restrictions, or the restrictions should be removed. -- Ed -------------------------------------------------------------------------------- From: Juergen Boldt [mailto:juergen@omg.org] Sent: Wednesday, January 12, 2011 10:41 AM To: Ed Seidewitz Subject: RE: Tags typed by classes/blocks hmmmm still no issue? -Juergen At 10:24 AM 1/12/2011, you wrote: Nerijus . Your original message actually said .The properties of stereotype must be typed by other metaclasses, stereotypes or primitive types (data types).. I interpret .metaclass. as a .metaclass of the reference metamodel.. In this case, your comment did seem to exclude the use of classes, even if they are part of the profile. However, I think we are all agreement that now that a non-stereotype class can be used as the type of a stereotype property, at least of that class is contained in the profile itself. Also, since there is nothing to prevent that class from itself being stereotyped, the class could be a SysML block, about which Michael was originally asking. On the issue of whether a class used as the type of a stereotype property must be contained in the profile for that stereotype, I will also note that, while Nicolas found this restriction in the text of the spec, I can find no formal constraints that enforce it. It would therefore seem that, for UML 2.5, we should either remove this restriction all together, or we should add the appropriate OCL constraints to formalize it. -- Ed -------------------------------------------------------------------------------- From: Nerijus Jankevicius [ mailto:nerijus@nomagic.com] Sent: Wednesday, January 12, 2011 3:03 AM To: Rouquette, Nicolas F (313K) Cc: Chonoles, Michael J; Ed Seidewitz; Sanford Friedenthal; Juergen Boldt; issues@omg.org; uml2-rtf@omg.org; sysml-rtf@omg.org Subject: Re: Tags typed by classes/blocks Nicolas, It clearly says that tag definition can be typed only by class from profile, but NOT user model. This exactly what I meant. So, if some predefined Blocks can be part of profile as library, yes, they can be used as type (however it is not clear for me, what does it mean). Stereotypes can participate in binary associations. The opposite class can be another stereotype, a non-stereotype class that is owned by a profile, or a metaclass of the reference metamodel. For these associations there must be a property owned by the Stereotype to navigate to the opposite class. Where the opposite class is not a stereotype, the opposite property must be owned by the Association itself rather than the other class/metaclass. Nerijus Jankevicius SysML Product Manager OMG-Certified UML Professional No Magic Europe Savanoriu pr. 363, LT 49425 Kaunas, Lithuania 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 - UML made simple! On Jan 12, 2011, at 1:06 AM, Rouquette, Nicolas F (313K) wrote: Nerijus, Michael: See page 683 of the change-barred UML2.4 superstructure document, clause 18.3.7: A Profile can define Classes, DatatTypes, PrimitiveTypes and Enumerations as well as Stereotypes since Profiles imports Constructs. However, these types can only be used as the type of properties in the profile, they cannot be used as types in models the profile is applied to since they apply at the meta-model level, not the model level. It is however possible to define these types in separate packages and import them as needed in both profiles and models in order to use them for both purposes. Stereotypes can participate in binary associations. The opposite class can be another stereotype, a non-stereotype class that is owned by a profile, or a metaclass of the reference metamodel. For these associations there must be a property owned by the Stereotype to navigate to the opposite class. Where the opposite class is not a stereotype, the opposite property must be owned by the Association itself rather than the other class/metaclass. The answer is still no. - Nicolas. On Jan 11, 2011, at 3:44 AM, Nerijus Jankevicius wrote: Guys, Stereotype alows to extend metamodel, it is the same as new metaclass. The properties of stereotype must be typed by other metaclasses, stereotypes or primitive types (data types). They can't be typed by user-level classes or blocks, because of different metalevel. -- Nerijus Jankevicius SysML Product Manager OMG-Certified UML Professional No Magic Europe Savanoriu pr. 363, LT 49425 Kaunas, Lithuania 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 - UML made simple! On Jan 10, 2011, at 11:35 PM, Ed Seidewitz wrote: Oops.Yes, that is what I meant! Thanks for the catch, Sandy. -------------------------------------------------------------------------------- From: Sanford Friedenthal [ mailto:safriedenthal@gmail.com] Sent: Monday, January 10, 2011 4:27 PM To: Ed Seidewitz; 'Chonoles, Michael J' Cc: 'Juergen Boldt'; issues@omg.org; uml2-rtf@omg.org; sysml-rtf@omg.org Subject: RE: Tags typed by classes/blocks Ed Don.t you mean .There is no further restriction on how they are typed.. From: Ed Seidewitz [ mailto:ed-s@modeldriven.com] Sent: Monday, January 10, 2011 4:14 PM To: Chonoles, Michael J Cc: Juergen Boldt; issues@omg.org; uml2-rtf@omg.org; sysml-rtf@omg.org Subject: RE: Tags typed by classes/blocks Michael . The tag definitions of a stereotype are just owned attributes of the stereotype considered as a class. There is further restriction on how they are typed. -- Ed -------------------------------------------------------------------------------- From: Chonoles, Michael J [ mailto:michael.j.chonoles@lmco.com] Sent: Monday, January 10, 2011 3:46 PM To: Juergen Boldt; issues@omg.org; uml2-rtf@omg.org; sysml-rtf@omg.org Subject: Tags typed by classes/blocks Is there any reason why a stereotype.s tag (property) can.t be typed by a class or block? Michael From: "Rouquette, Nicolas F (313K)" To: Ed Seidewitz CC: Nerijus Jankevicius , "uml2-rtf@omg.org" , "sysml-rtf@omg.org" Date: Thu, 13 Jan 2011 16:19:16 -0800 Subject: Re: Tags typed by classes/blocks -- issue 15930 Thread-Topic: Tags typed by classes/blocks -- issue 15930 Thread-Index: AcuzgLAbmu5KNsYLTJaBuIAXaeTzpg== 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 The restriction needs clarification. Removing this restriction just because we don't have OCL to express it would be a mistake. Clarifying this restriction would be easy if we had defined the concept of logical extent of a model/profile/package, something that some tool vendors have done (e.g., IBM's RSx API has this) but that has not been done at the specification level. I don't have a concise definition of logical extent to propose but I can point to examples where we use it tacitly. - the distinction between modeling levels -- e.g., metamodel level vs model level. When we define a model, we really assume that the metamodel is frozen. If the metamodel were to change at the same time that we construct the model; we'd have a big mess. - the notion of compliance levels We really use this term to denote a fixed scope of metaclasses/associations. The only time when the scope of a compliance level change is when we change the spec itself. - the notion of profile Again, I cite the gospel from the spec, clause 18.3.7, Semantics: The most direct implementation of the Profile mechanism that a tool can provide is by having a metamodel based implementation, similar to the Profile metamodel. However, this is not a requirement of the current standard, which requires only the support of the specified notions, and the standard XMI based interchange capacities. The profile mechanism has been designed to be implementable by tools that do not have a metamodel-based implementation. It would be impossible for someone to implement a profile according to the strategy mentioned above if the logical extent of the profile were to be allowed to depend on the context in which the profile is applied. I hope the above suffices to convince you that removing the restrictions would be a very bad idea. - Nicolas. On Jan 12, 2011, at 7:24 AM, Ed Seidewitz wrote: Nerijus . Your original message actually said .The properties of stereotype must be typed by other metaclasses, stereotypes or primitive types (data types).. I interpret .metaclass. as a .metaclass of the reference metamodel.. In this case, your comment did seem to exclude the use of classes, even if they are part of the profile. However, I think we are all agreement that now that a non-stereotype class can be used as the type of a stereotype property, at least of that class is contained in the profile itself. Also, since there is nothing to prevent that class from itself being stereotyped, the class could be a SysML block, about which Michael was originally asking. On the issue of whether a class used as the type of a stereotype property must be contained in the profile for that stereotype, I will also note that, while Nicolas found this restriction in the text of the spec, I can find no formal constraints that enforce it. It would therefore seem that, for UML 2.5, we should either remove this restriction all together, or we should add the appropriate OCL constraints to formalize it. -- Ed -------------------------------------------------------------------------------- From: Nerijus Jankevicius [mailto:nerijus@nomagic.com] Sent: Wednesday, January 12, 2011 3:03 AM To: Rouquette, Nicolas F (313K) Cc: Chonoles, Michael J; Ed Seidewitz; Sanford Friedenthal; Juergen Boldt; issues@omg.org; uml2-rtf@omg.org; sysml-rtf@omg.org Subject: Re: Tags typed by classes/blocks Nicolas, It clearly says that tag definition can be typed only by class from profile, but NOT user model. This exactly what I meant. So, if some predefined Blocks can be part of profile as library, yes, they can be used as type (however it is not clear for me, what does it mean). Stereotypes can participate in binary associations. The opposite class can be another stereotype, a non-stereotype class that is owned by a profile, or a metaclass of the reference metamodel. For these associations there must be a property owned by the Stereotype to navigate to the opposite class. Where the opposite class is not a stereotype, the opposite property must be owned by the Association itself rather than the other class/metaclass. Nerijus Jankevicius SysML Product Manager OMG-Certified UML Professional No Magic Europe Savanoriu pr. 363, LT 49425 Kaunas, Lithuania 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 - UML made simple! On Jan 12, 2011, at 1:06 AM, Rouquette, Nicolas F (313K) wrote: Nerijus, Michael: See page 683 of the change-barred UML2.4 superstructure document, clause 18.3.7: A Profile can define Classes, DatatTypes, PrimitiveTypes and Enumerations as well as Stereotypes since Profiles imports Constructs. However, these types can only be used as the type of properties in the profile, they cannot be used as types in models the profile is applied to since they apply at the meta-model level, not the model level. It is however possible to define these types in separate packages and import them as needed in both profiles and models in order to use them for both purposes. Stereotypes can participate in binary associations. The opposite class can be another stereotype, a non-stereotype class that is owned by a profile, or a metaclass of the reference metamodel. For these associations there must be a property owned by the Stereotype to navigate to the opposite class. Where the opposite class is not a stereotype, the opposite property must be owned by the Association itself rather than the other class/metaclass. The answer is still no. - Nicolas. On Jan 11, 2011, at 3:44 AM, Nerijus Jankevicius wrote: Guys, Stereotype alows to extend metamodel, it is the same as new metaclass. The properties of stereotype must be typed by other metaclasses, stereotypes or primitive types (data types). They can't be typed by user-level classes or blocks, because of different metalevel. -- Nerijus Jankevicius SysML Product Manager OMG-Certified UML Professional No Magic Europe Savanoriu pr. 363, LT 49425 Kaunas, Lithuania 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 - UML made simple! On Jan 10, 2011, at 11:35 PM, Ed Seidewitz wrote: Oops.Yes, that is what I meant! Thanks for the catch, Sandy. -------------------------------------------------------------------------------- From: Sanford Friedenthal [mailto:safriedenthal@gmail.com] Sent: Monday, January 10, 2011 4:27 PM To: Ed Seidewitz; 'Chonoles, Michael J' Cc: 'Juergen Boldt'; issues@omg.org; uml2-rtf@omg.org; sysml-rtf@omg.org Subject: RE: Tags typed by classes/blocks Ed Don.t you mean .There is no further restriction on how they are typed.. From: Ed Seidewitz [mailto:ed-s@modeldriven.com] Sent: Monday, January 10, 2011 4:14 PM To: Chonoles, Michael J Cc: Juergen Boldt; issues@omg.org; uml2-rtf@omg.org; sysml-rtf@omg.org Subject: RE: Tags typed by classes/blocks Michael . The tag definitions of a stereotype are just owned attributes of the stereotype considered as a class. There is further restriction on how they are typed. -- Ed -------------------------------------------------------------------------------- From: Chonoles, Michael J [mailto:michael.j.chonoles@lmco.com] Sent: Monday, January 10, 2011 3:46 PM To: Juergen Boldt; issues@omg.org; uml2-rtf@omg.org; sysml-rtf@omg.org Subject: Tags typed by classes/blocks Is there any reason why a stereotype.s tag (property) can.t be typed by a class or block? Michael