Issue 8094: Stereotypes applying in UML 2.0 (uml2-rtf) Source: No Magic, Inc. (Mr. Nerijus Jankevicius, nerijus(at)nomagic.com) Nature: Uncategorized Issue Severity: Summary: I have some questions regarding stereotypes using in UML 2.0. 1. How to declare user defined stereotype in the model? Should class with stereotype <<metaclass>> and metaclass name be created in the model? How to declare stereotype <<metaclass>>? 2. Is some relationship between stereotyped model element and stereotype instance exist? Where stereotype instance should be created (contained) and how model element can collect all applied stereotypes? Resolution: Revised Text: Actions taken: January 17, 2005: received issue August 23, 2006: closed issue Discussion: These aspects have been largely discussed and amended in the spec. I believe that this issue is outdated. 1. A <<metaclass>> model element should indeed be part of the model (if not already present, it should be defined) and an extension between the stereotype instance and that model element created as per the metamodel in figure 446. 2. The relationship between a stereotype instance and the stereotyped model element is explained in the semantics section of Extension on page 717 and in figure 448. Since, by definition, stereotyped model elements are not affected by the presence of stereotypes, a tool will have to either do a search of the model or cache information that identifies which stereotypes are applied to that model element. Disposition: Closed, no change End of Annotations:===== m: "Nerijus Jankevicius" To: Subject: Stereotypes applying in UML 2.0 Date: Mon, 17 Jan 2005 17:47:40 +0200 X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-Virus-Scanned: clamd / ClamAV version 0.72, clamav-milter version 0.72 on banginis.nomagic.com X-Virus-Status: Clean Hello, I have some questions regarding stereotypes using in UML 2.0. 1. How to declare user defined stereotype in the model? Should class with stereotype <> and metaclass name be created in the model? How to declare stereotype <>? 2. Is some relationship between stereotyped model element and stereotype instance exist? Where stereotype instance should be created (contained) and how model element can collect all applied stereotypes? Thanks. -- Nerijus Jankevicius Senior Programmer & System Analyst 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 Reply-To: From: "Desfray" To: "'Nerijus Jankevicius'" , "'Branislav Selic'" Cc: Subject: RE: Stereotypes applying in UML 2.0 Date: Tue, 18 Jan 2005 15:38:32 +0100 X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0) X-Virus-Scanned: by amavisd-new at softeam.com Nerijus, metaclass is a stereotype as recalled in C.1 StandardProfileL1 A class can be both a usual class or a metaclass depending on the focus that the model currently has on it. Typical examples are "string", boolean, or the "Class" notion used at MOF level (M3 for some conventions) or at UML level (M2 in the same perspective). The stereotype "metaclass" is not mandatory: its main merit is to make clear the focus that one has on it. A stereotype can extend a class be it extended by "meta" or not. >>> Should such class be shared if two stereotypes for the same metaclass are defined? certainly yes. Should replica of all UML metamodel be created in M1 level and used as profile? This is not stated by the UML standard:it is a tool dependant approach: one could provide an access to its metamodel, or provide a "proxy" metamodel as you suggest. >>>Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. The extension defined between a stereotype and a metaclass is a kind of association (see fig 448): at the instance level, you will get the usual objects instanciating an association as shown in fig 458. Hope this helps. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Nerijus Jankevicius [mailto:nerijus@nomagic.com] Envoyé : mardi 18 janvier 2005 09:01 À : Branislav Selic Cc : uml2-rtf@omg.org Objet : Re: Stereotypes applying in UML 2.0 Hi Bran, Thanks for your time. 1. <> issue. Defining of stereotype. Page 715: "A Class that is extended by a Stereotype may be extended by the optional stereotype «metaclass» (see Appendix C. on page -753) shown above or before its name." So is <> stereotype or just a keyword? Appendix C. describes it as stereotype applied to Class. If <> is just a keyword in notation, how such classes (Class, which represents the metaclass) can be recognized in the model and what is difference from ordinary class? Should such class be shared if two stereotypes for the same metaclass are defined? Should replica of all UML metamodel be created in M1 level and used as profile? 2. Applying of stereotype. Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. Figure 458 depicts just stereotype defining, not stereotype usages. It's not clear how for example UseCase instance can reference all applied stereotypes. It seems every tool should extend metamodel, because it is not completed. For example new Rational Software Architect 6.0 uses own "appliedStereotypes" collection for references to stereotypes instances applied to some element. 3. Could you please explain some primitive scenario: 1. Define stereotype <> for Component 2. Create Component "myComponent" 2. Apply this stereotype on "myComponent". How many and what instances of M2 classes will be created in M1 level. How they are related? Thanks. -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Sent: Monday, January 17, 2005 9:34 PM Subject: Re: Stereotypes applying in UML 2.0 Hello Nerijus, In reply to your e-mail: > I have some questions regarding stereotypes using in UML 2.0. > > 1. How to declare user defined stereotype in the model? Should class > with stereotype <> and metaclass name be created in the > model? How to declare stereotype <>? First of all, please note that model elements labeled in a diagram with the <> keyword are not stereotypes. Not everything in guillemets represents a setereotype (see appendix B of ptc/04-10-02). User-defined stereotypes can appear in any user-level (M1) model. For the details of how this looks inside the model, see figure 458 as an example. Note that an extension always points to an instance of Class, which represents the metaclass that is being extended. (Strictly speaking, that metaclass is not part of the user model.) > 2. Is some relationship between stereotyped model element and > stereotype instance exist? Where stereotype instance should be > created (contained) and how model element can collect all applied stereotypes? See figure 458. If that does not answer your question, please try to provide a more detailed description of the issue that concerns you. Cheers....Bran To: "Nerijus Jankevicius" Cc: uml2-rtf@omg.org Subject: Re: Stereotypes applying in UML 2.0 X-Mailer: Lotus Notes Release 6.0.1CF1 March 04, 2003 From: Branislav Selic Date: Mon, 17 Jan 2005 14:34:11 -0500 X-MIMETrack: Serialize by Router on D25ML01/25/M/IBM(Release 6.0.2CF2|July 23, 2003) at 01/17/2005 14:34:17, Serialize complete at 01/17/2005 14:34:17 Hello Nerijus, In reply to your e-mail: > I have some questions regarding stereotypes using in UML 2.0. > > 1. How to declare user defined stereotype in the model? Should class > with stereotype <> and metaclass name be created in the > model? How to declare stereotype <>? First of all, please note that model elements labeled in a diagram with the <> keyword are not stereotypes. Not everything in guillemets represents a setereotype (see appendix B of ptc/04-10-02). User-defined stereotypes can appear in any user-level (M1) model. For the details of how this looks inside the model, see figure 458 as an example. Note that an extension always points to an instance of Class, which represents the metaclass that is being extended. (Strictly speaking, that metaclass is not part of the user model.) > 2. Is some relationship between stereotyped model element and > stereotype instance exist? Where stereotype instance should be > created (contained) and how model element can collect all applied stereotypes? See figure 458. If that does not answer your question, please try to provide a more detailed description of the issue that concerns you. Cheers....Bran From: "Nerijus Jankevicius" To: , "'Branislav Selic'" Cc: Subject: Re: Stereotypes applying in UML 2.0 Date: Tue, 18 Jan 2005 16:56:29 +0200 X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-Virus-Scanned: clamd / ClamAV version 0.72, clamav-milter version 0.72 on banginis.nomagic.com X-Virus-Status: Clean Philippe, Please answer to question 3. What kind of elements should be created in the model for such simple scenario? How component can access tagged values (properties), if Element do not have references to Stereotype instances? -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Desfray To: 'Nerijus Jankevicius' ; 'Branislav Selic' Cc: uml2-rtf@omg.org Sent: Tuesday, January 18, 2005 4:38 PM Subject: RE: Stereotypes applying in UML 2.0 Nerijus, metaclass is a stereotype as recalled in C.1 StandardProfileL1 A class can be both a usual class or a metaclass depending on the focus that the model currently has on it. Typical examples are "string", boolean, or the "Class" notion used at MOF level (M3 for some conventions) or at UML level (M2 in the same perspective). The stereotype "metaclass" is not mandatory: its main merit is to make clear the focus that one has on it. A stereotype can extend a class be it extended by "meta" or not. >>> Should such class be shared if two stereotypes for the same metaclass are defined? certainly yes. Should replica of all UML metamodel be created in M1 level and used as profile? This is not stated by the UML standard:it is a tool dependant approach: one could provide an access to its metamodel, or provide a "proxy" metamodel as you suggest. >>>Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. The extension defined between a stereotype and a metaclass is a kind of association (see fig 448): at the instance level, you will get the usual objects instanciating an association as shown in fig 458. Hope this helps. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Nerijus Jankevicius [mailto:nerijus@nomagic.com] Envoyé : mardi 18 janvier 2005 09:01 À : Branislav Selic Cc : uml2-rtf@omg.org Objet : Re: Stereotypes applying in UML 2.0 Hi Bran, Thanks for your time. 1. <> issue. Defining of stereotype. Page 715: "A Class that is extended by a Stereotype may be extended by the optional stereotype «metaclass» (see Appendix C. on page -753) shown above or before its name." So is <> stereotype or just a keyword? Appendix C. describes it as stereotype applied to Class. If <> is just a keyword in notation, how such classes (Class, which represents the metaclass) can be recognized in the model and what is difference from ordinary class? Should such class be shared if two stereotypes for the same metaclass are defined? Should replica of all UML metamodel be created in M1 level and used as profile? 2. Applying of stereotype. Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. Figure 458 depicts just stereotype defining, not stereotype usages. It's not clear how for example UseCase instance can reference all applied stereotypes. It seems every tool should extend metamodel, because it is not completed. For example new Rational Software Architect 6.0 uses own "appliedStereotypes" collection for references to stereotypes instances applied to some element. 3. Could you please explain some primitive scenario: 1. Define stereotype <> for Component 2. Create Component "myComponent" 2. Apply this stereotype on "myComponent". How many and what instances of M2 classes will be created in M1 level. How they are related? Thanks. -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Sent: Monday, January 17, 2005 9:34 PM Subject: Re: Stereotypes applying in UML 2.0 Hello Nerijus, In reply to your e-mail: > I have some questions regarding stereotypes using in UML 2.0. > > 1. How to declare user defined stereotype in the model? Should class > with stereotype <> and metaclass name be created in the > model? How to declare stereotype <>? First of all, please note that model elements labeled in a diagram with the <> keyword are not stereotypes. Not everything in guillemets represents a setereotype (see appendix B of ptc/04-10-02). User-defined stereotypes can appear in any user-level (M1) model. For the details of how this looks inside the model, see figure 458 as an example. Note that an extension always points to an instance of Class, which represents the metaclass that is being extended. (Strictly speaking, that metaclass is not part of the user model.) > 2. Is some relationship between stereotyped model element and > stereotype instance exist? Where stereotype instance should be > created (contained) and how model element can collect all applied stereotypes? See figure 458. If that does not answer your question, please try to provide a more detailed description of the issue that concerns you. Cheers....Bran To: "Nerijus Jankevicius" Cc: uml2-rtf@omg.org Subject: Re: Stereotypes applying in UML 2.0 X-Mailer: Lotus Notes Release 6.0.1CF1 March 04, 2003 From: Branislav Selic Date: Tue, 18 Jan 2005 10:09:57 -0500 X-MIMETrack: Serialize by Router on D25ML01/25/M/IBM(Release 6.0.2CF2|July 23, 2003) at 01/18/2005 10:10:02, Serialize complete at 01/18/2005 10:10:02 Nerijus, In reply to your further questions: > 1. <> issue. Defining of stereotype. > > Page 715: > "A Class that is extended by a Stereotype may be extended by the > optional stereotype «metaclass» (see Appendix C. on > page -753) shown above or before its name." This text should be fixed. It should not say "stereotype" but "keyword". The distinction was vague in previous versions of the spec. We added Appendix B at the very end to clarify the distinction but did not fix all the places where it needed to be fixed. Please raise an official issue on this to issues@omg.org. > So is <> stereotype or just a keyword? It's a keyword. > Appendix C. describes it as stereotype applied to Class. > If <> is just a keyword in notation, how such classes ( > Class, which represents the metaclass) can be recognized in the > model and what is difference from ordinary class? In the model it is recognized by being at the "metaclass" end of an Extension instance. > Should such class be shared if two stereotypes for the same > metaclass are defined? Probably should be for efficiency's sake, but it depends on the implementation. Strictly speaking this is a class in the M2 level. If a tool is a metamodel based tool that incorporates the actual metamodel as a model, then the pointer in the Extension could point to the appropriate metamodel class. However, not all tools are metamodel based. > Should replica of all UML metamodel be created in M1 level and used > as profile? That is up to the implementor. > 2. Applying of stereotype. > Another more problematic issue is reference between any stereotyped > element instance (M1 level) and stereotype instance. > Figure 458 depicts just stereotype defining, not stereotype usages. This question was raised before (by Alan Moore I believe). >From what I recall, an instance of a stereotype is represented an instance of InstanceSpecification with its type set to the appropriate Stereotype. Either Alan Moore or Philippe Desfray may have the detailed example handy, I don't unfortunately. (It really should be included in the spec.) > It's not clear how for example UseCase instance can reference all > applied stereotypes. > It seems every tool should extend metamodel, because it is not completed. > For example new Rational Software Architect 6.0 uses own > "appliedStereotypes" collection for references to stereotypes > instances applied to some element. This could be added to the spec as an additional OCL peration if people agree. However, in principle, additional operations should only be defined if they are needed to define something else in the spec. If this operation is not used for anything else in the spec (and it does not seem to be), then it is merely a utility function that is useful to tool vendors. > name="Class1"> > source="appliedStereotypes"> > id="_deftwWZJEdm7dvxcV71qBg"/> > id="_del0YGZJEdm7dvxcV71qBg"/> > > (An aside, we dhould refrain from publishing details of proprietary implementations on a public mailing list.) > 3. Could you please explain some primitive scenario: > > 1. Define stereotype <> for Component > 2. Create Component "myComponent" > 2. Apply this stereotype on "myComponent". > > How many and what instances of M2 classes will be created in M1 > level. How they are related? As I said, this depends on the implementation. Regards...Bran To: Cc: "'Nerijus Jankevicius'" , uml2-rtf@omg.org Subject: RE: Stereotypes applying in UML 2.0 X-Mailer: Lotus Notes Release 6.0.1CF1 March 04, 2003 From: Branislav Selic Date: Tue, 18 Jan 2005 10:14:37 -0500 X-MIMETrack: Serialize by Router on D25ML01/25/M/IBM(Release 6.0.2CF2|July 23, 2003) at 01/18/2005 10:14:45, Serialize complete at 01/18/2005 10:14:45 Philippe, I have to correct you: <> is not a stereotype but a keyword. I guess we have a bit of cleaning up to do. I don't think <> should appear in the standard profile at all. This is a bug in the spec. For example, we use <> to annotate a dependency-like line to distinguish a PackageMerge from a Dependency. PackageMerge is not a stereotype of anything. Cheers, Bran Selic IBM Distinguished Engineer IBM Rational Software 770 Palladium Drive Kanata, Ontario, Canada K2V 1C8 ph.: (613) 591-7915 fax: (613) 599-3912 e-mail: bselic@ca.ibm.com "Desfray" 01/18/2005 09:38 AM Please respond to Philippe.Desfray To "'Nerijus Jankevicius'" , Branislav Selic/Ottawa/IBM@IBMCA cc Subject RE: Stereotypes applying in UML 2.0 Nerijus, metaclass is a stereotype as recalled in C.1 StandardProfileL1 A class can be both a usual class or a metaclass depending on the focus that the model currently has on it. Typical examples are "string", boolean, or the "Class" notion used at MOF level (M3 for some conventions) or at UML level (M2 in the same perspective). The stereotype "metaclass" is not mandatory: its main merit is to make clear the focus that one has on it. A stereotype can extend a class be it extended by "meta" or not. >>> Should such class be shared if two stereotypes for the same metaclass are defined? certainly yes. Should replica of all UML metamodel be created in M1 level and used as profile? This is not stated by the UML standard:it is a tool dependant approach: one could provide an access to its metamodel, or provide a "proxy" metamodel as you suggest. >>>Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. The extension defined between a stereotype and a metaclass is a kind of association (see fig 448): at the instance level, you will get the usual objects instanciating an association as shown in fig 458. Hope this helps. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Nerijus Jankevicius [mailto:nerijus@nomagic.com] Envoyé : mardi 18 janvier 2005 09:01 À : Branislav Selic Cc : uml2-rtf@omg.org Objet : Re: Stereotypes applying in UML 2.0 Hi Bran, Thanks for your time. 1. <> issue. Defining of stereotype. Page 715: "A Class that is extended by a Stereotype may be extended by the optional stereotype «metaclass» (see Appendix C. on page -753) shown above or before its name." So is <> stereotype or just a keyword? Appendix C. describes it as stereotype applied to Class. If <> is just a keyword in notation, how such classes (Class, which represents the metaclass) can be recognized in the model and what is difference from ordinary class? Should such class be shared if two stereotypes for the same metaclass are defined? Should replica of all UML metamodel be created in M1 level and used as profile? 2. Applying of stereotype. Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. Figure 458 depicts just stereotype defining, not stereotype usages. It's not clear how for example UseCase instance can reference all applied stereotypes. It seems every tool should extend metamodel, because it is not completed. For example new Rational Software Architect 6.0 uses own "appliedStereotypes" collection for references to stereotypes instances applied to some element. 3. Could you please explain some primitive scenario: 1. Define stereotype <> for Component 2. Create Component "myComponent" 2. Apply this stereotype on "myComponent". How many and what instances of M2 classes will be created in M1 level. How they are related? Thanks. -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Sent: Monday, January 17, 2005 9:34 PM Subject: Re: Stereotypes applying in UML 2.0 Hello Nerijus, In reply to your e-mail: > I have some questions regarding stereotypes using in UML 2.0. > > 1. How to declare user defined stereotype in the model? Should class > with stereotype <> and metaclass name be created in the > model? How to declare stereotype <>? First of all, please note that model elements labeled in a diagram with the <> keyword are not stereotypes. Not everything in guillemets represents a setereotype (see appendix B of ptc/04-10-02). User-defined stereotypes can appear in any user-level (M1) model. For the details of how this looks inside the model, see figure 458 as an example. Note that an extension always points to an instance of Class, which represents the metaclass that is being extended. (Strictly speaking, that metaclass is not part of the user model.) > 2. Is some relationship between stereotyped model element and > stereotype instance exist? Where stereotype instance should be > created (contained) and how model element can collect all applied stereotypes? See figure 458. If that does not answer your question, please try to provide a more detailed description of the issue that concerns you. Cheers....Bran Reply-To: From: "Desfray" To: "'Branislav Selic'" Cc: "'Nerijus Jankevicius'" , Subject: RE: Stereotypes applying in UML 2.0 Date: Tue, 18 Jan 2005 16:21:18 +0100 X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0) X-Virus-Scanned: by amavisd-new at softeam.com OK, so there is an issue to the UML2 rtf. (for Nerijus) Semantically, this does not change anything. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Branislav Selic [mailto:bselic@ca.ibm.com] Envoyé : mardi 18 janvier 2005 16:15 À : Philippe.Desfray@softeam.fr Cc : 'Nerijus Jankevicius'; uml2-rtf@omg.org Objet : RE: Stereotypes applying in UML 2.0 Philippe, I have to correct you: <> is not a stereotype but a keyword. I guess we have a bit of cleaning up to do. I don't think <> should appear in the standard profile at all. This is a bug in the spec. For example, we use <> to annotate a dependency-like line to distinguish a PackageMerge from a Dependency. PackageMerge is not a stereotype of anything. Cheers, Bran Selic IBM Distinguished Engineer IBM Rational Software 770 Palladium Drive Kanata, Ontario, Canada K2V 1C8 ph.: (613) 591-7915 fax: (613) 599-3912 e-mail: bselic@ca.ibm.com "Desfray" 01/18/2005 09:38 AM Please respond to Philippe.Desfray To "'Nerijus Jankevicius'" , Branislav Selic/Ottawa/IBM@IBMCA cc Subject RE: Stereotypes applying in UML 2.0 Nerijus, metaclass is a stereotype as recalled in C.1 StandardProfileL1 A class can be both a usual class or a metaclass depending on the focus that the model currently has on it. Typical examples are "string", boolean, or the "Class" notion used at MOF level (M3 for some conventions) or at UML level (M2 in the same perspective). The stereotype "metaclass" is not mandatory: its main merit is to make clear the focus that one has on it. A stereotype can extend a class be it extended by "meta" or not. >>> Should such class be shared if two stereotypes for the same metaclass are defined? certainly yes. Should replica of all UML metamodel be created in M1 level and used as profile? This is not stated by the UML standard:it is a tool dependant approach: one could provide an access to its metamodel, or provide a "proxy" metamodel as you suggest. >>>Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. The extension defined between a stereotype and a metaclass is a kind of association (see fig 448): at the instance level, you will get the usual objects instanciating an association as shown in fig 458. Hope this helps. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Nerijus Jankevicius [mailto:nerijus@nomagic.com] Envoyé : mardi 18 janvier 2005 09:01 À : Branislav Selic Cc : uml2-rtf@omg.org Objet : Re: Stereotypes applying in UML 2.0 Hi Bran, Thanks for your time. 1. <> issue. Defining of stereotype. Page 715: "A Class that is extended by a Stereotype may be extended by the optional stereotype «metaclass» (see Appendix C. on page -753) shown above or before its name." So is <> stereotype or just a keyword? Appendix C. describes it as stereotype applied to Class. If <> is just a keyword in notation, how such classes (Class, which represents the metaclass) can be recognized in the model and what is difference from ordinary class? Should such class be shared if two stereotypes for the same metaclass are defined? Should replica of all UML metamodel be created in M1 level and used as profile? 2. Applying of stereotype. Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. Figure 458 depicts just stereotype defining, not stereotype usages. It's not clear how for example UseCase instance can reference all applied stereotypes. It seems every tool should extend metamodel, because it is not completed. For example new Rational Software Architect 6.0 uses own "appliedStereotypes" collection for references to stereotypes instances applied to some element. 3. Could you please explain some primitive scenario: 1. Define stereotype <> for Component 2. Create Component "myComponent" 2. Apply this stereotype on "myComponent". How many and what instances of M2 classes will be created in M1 level. How they are related? Thanks. -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Sent: Monday, January 17, 2005 9:34 PM Subject: Re: Stereotypes applying in UML 2.0 Hello Nerijus, In reply to your e-mail: > I have some questions regarding stereotypes using in UML 2.0. > > 1. How to declare user defined stereotype in the model? Should class > with stereotype <> and metaclass name be created in the > model? How to declare stereotype <>? First of all, please note that model elements labeled in a diagram with the <> keyword are not stereotypes. Not everything in guillemets represents a setereotype (see appendix B of ptc/04-10-02). User-defined stereotypes can appear in any user-level (M1) model. For the details of how this looks inside the model, see figure 458 as an example. Note that an extension always points to an instance of Class, which represents the metaclass that is being extended. (Strictly speaking, that metaclass is not part of the user model.) > 2. Is some relationship between stereotyped model element and > stereotype instance exist? Where stereotype instance should be > created (contained) and how model element can collect all applied stereotypes? See figure 458. If that does not answer your question, please try to provide a more detailed description of the issue that concerns you. Cheers....Bran Reply-To: From: "Desfray" To: "'Nerijus Jankevicius'" , "'Branislav Selic'" Cc: Subject: RE: Stereotypes applying in UML 2.0 Date: Tue, 18 Jan 2005 16:29:32 +0100 X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0) X-Virus-Scanned: by amavisd-new at softeam.com You are right, Figure 458 represents the stereotype declaration, not the usage. For this, use 461. The rules for getting there is specified in "Extension:Semantics" ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Nerijus Jankevicius [mailto:nerijus@nomagic.com] Envoyé : mardi 18 janvier 2005 15:56 À : Philippe.Desfray@softeam.fr; 'Branislav Selic' Cc : uml2-rtf@omg.org Objet : Re: Stereotypes applying in UML 2.0 Philippe, Please answer to question 3. What kind of elements should be created in the model for such simple scenario? How component can access tagged values (properties), if Element do not have references to Stereotype instances? -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Desfray To: 'Nerijus Jankevicius' ; 'Branislav Selic' Cc: uml2-rtf@omg.org Sent: Tuesday, January 18, 2005 4:38 PM Subject: RE: Stereotypes applying in UML 2.0 Nerijus, metaclass is a stereotype as recalled in C.1 StandardProfileL1 A class can be both a usual class or a metaclass depending on the focus that the model currently has on it. Typical examples are "string", boolean, or the "Class" notion used at MOF level (M3 for some conventions) or at UML level (M2 in the same perspective). The stereotype "metaclass" is not mandatory: its main merit is to make clear the focus that one has on it. A stereotype can extend a class be it extended by "meta" or not. >>> Should such class be shared if two stereotypes for the same metaclass are defined? certainly yes. Should replica of all UML metamodel be created in M1 level and used as profile? This is not stated by the UML standard:it is a tool dependant approach: one could provide an access to its metamodel, or provide a "proxy" metamodel as you suggest. >>>Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. The extension defined between a stereotype and a metaclass is a kind of association (see fig 448): at the instance level, you will get the usual objects instanciating an association as shown in fig 458. Hope this helps. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Nerijus Jankevicius [mailto:nerijus@nomagic.com] Envoyé : mardi 18 janvier 2005 09:01 À : Branislav Selic Cc : uml2-rtf@omg.org Objet : Re: Stereotypes applying in UML 2.0 Hi Bran, Thanks for your time. 1. <> issue. Defining of stereotype. Page 715: "A Class that is extended by a Stereotype may be extended by the optional stereotype «metaclass» (see Appendix C. on page -753) shown above or before its name." So is <> stereotype or just a keyword? Appendix C. describes it as stereotype applied to Class. If <> is just a keyword in notation, how such classes (Class, which represents the metaclass) can be recognized in the model and what is difference from ordinary class? Should such class be shared if two stereotypes for the same metaclass are defined? Should replica of all UML metamodel be created in M1 level and used as profile? 2. Applying of stereotype. Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. Figure 458 depicts just stereotype defining, not stereotype usages. It's not clear how for example UseCase instance can reference all applied stereotypes. It seems every tool should extend metamodel, because it is not completed. For example new Rational Software Architect 6.0 uses own "appliedStereotypes" collection for references to stereotypes instances applied to some element. 3. Could you please explain some primitive scenario: 1. Define stereotype <> for Component 2. Create Component "myComponent" 2. Apply this stereotype on "myComponent". How many and what instances of M2 classes will be created in M1 level. How they are related? Thanks. -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Sent: Monday, January 17, 2005 9:34 PM Subject: Re: Stereotypes applying in UML 2.0 Hello Nerijus, In reply to your e-mail: > I have some questions regarding stereotypes using in UML 2.0. > > 1. How to declare user defined stereotype in the model? Should class > with stereotype <> and metaclass name be created in the > model? How to declare stereotype <>? First of all, please note that model elements labeled in a diagram with the <> keyword are not stereotypes. Not everything in guillemets represents a setereotype (see appendix B of ptc/04-10-02). User-defined stereotypes can appear in any user-level (M1) model. For the details of how this looks inside the model, see figure 458 as an example. Note that an extension always points to an instance of Class, which represents the metaclass that is being extended. (Strictly speaking, that metaclass is not part of the user model.) > 2. Is some relationship between stereotyped model element and > stereotype instance exist? Where stereotype instance should be > created (contained) and how model element can collect all applied stereotypes? See figure 458. If that does not answer your question, please try to provide a more detailed description of the issue that concerns you. Cheers....Bran From: "Nerijus Jankevicius" To: , "'Branislav Selic'" Cc: Subject: Re: Stereotypes applying in UML 2.0 Date: Tue, 18 Jan 2005 17:32:44 +0200 X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-Virus-Scanned: clamd / ClamAV version 0.72, clamav-milter version 0.72 on banginis.nomagic.com X-Virus-Status: Clean So how about missing association between Element and stereotype Instance (InstanceSpecification)? Now we should extend our metamodel implementation because elements do not know nothing about applied stereotypes. This cause problems XMI and JMI compatibility, for data exchange. Regards, -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Desfray To: 'Branislav Selic' Cc: 'Nerijus Jankevicius' ; uml2-rtf@omg.org Sent: Tuesday, January 18, 2005 5:21 PM Subject: RE: Stereotypes applying in UML 2.0 OK, so there is an issue to the UML2 rtf. (for Nerijus) Semantically, this does not change anything. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Branislav Selic [mailto:bselic@ca.ibm.com] Envoyé : mardi 18 janvier 2005 16:15 À : Philippe.Desfray@softeam.fr Cc : 'Nerijus Jankevicius'; uml2-rtf@omg.org Objet : RE: Stereotypes applying in UML 2.0 Philippe, I have to correct you: <> is not a stereotype but a keyword. I guess we have a bit of cleaning up to do. I don't think <> should appear in the standard profile at all. This is a bug in the spec. For example, we use <> to annotate a dependency-like line to distinguish a PackageMerge from a Dependency. PackageMerge is not a stereotype of anything. Cheers, Bran Selic IBM Distinguished Engineer IBM Rational Software 770 Palladium Drive Kanata, Ontario, Canada K2V 1C8 ph.: (613) 591-7915 fax: (613) 599-3912 e-mail: bselic@ca.ibm.com "Desfray" 01/18/2005 09:38 AM Please respond to Philippe.Desfray To "'Nerijus Jankevicius'" , Branislav Selic/Ottawa/IBM@IBMCA cc Subject RE: Stereotypes applying in UML 2.0 Nerijus, metaclass is a stereotype as recalled in C.1 StandardProfileL1 A class can be both a usual class or a metaclass depending on the focus that the model currently has on it. Typical examples are "string", boolean, or the "Class" notion used at MOF level (M3 for some conventions) or at UML level (M2 in the same perspective). The stereotype "metaclass" is not mandatory: its main merit is to make clear the focus that one has on it. A stereotype can extend a class be it extended by "meta" or not. >>> Should such class be shared if two stereotypes for the same metaclass are defined? certainly yes. Should replica of all UML metamodel be created in M1 level and used as profile? This is not stated by the UML standard:it is a tool dependant approach: one could provide an access to its metamodel, or provide a "proxy" metamodel as you suggest. >>>Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. The extension defined between a stereotype and a metaclass is a kind of association (see fig 448): at the instance level, you will get the usual objects instanciating an association as shown in fig 458. Hope this helps. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Nerijus Jankevicius [mailto:nerijus@nomagic.com] Envoyé : mardi 18 janvier 2005 09:01 À : Branislav Selic Cc : uml2-rtf@omg.org Objet : Re: Stereotypes applying in UML 2.0 Hi Bran, Thanks for your time. 1. <> issue. Defining of stereotype. Page 715: "A Class that is extended by a Stereotype may be extended by the optional stereotype «metaclass» (see Appendix C. on page -753) shown above or before its name." So is <> stereotype or just a keyword? Appendix C. describes it as stereotype applied to Class. If <> is just a keyword in notation, how such classes (Class, which represents the metaclass) can be recognized in the model and what is difference from ordinary class? Should such class be shared if two stereotypes for the same metaclass are defined? Should replica of all UML metamodel be created in M1 level and used as profile? 2. Applying of stereotype. Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. Figure 458 depicts just stereotype defining, not stereotype usages. It's not clear how for example UseCase instance can reference all applied stereotypes. It seems every tool should extend metamodel, because it is not completed. For example new Rational Software Architect 6.0 uses own "appliedStereotypes" collection for references to stereotypes instances applied to some element. 3. Could you please explain some primitive scenario: 1. Define stereotype <> for Component 2. Create Component "myComponent" 2. Apply this stereotype on "myComponent". How many and what instances of M2 classes will be created in M1 level. How they are related? Thanks. -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Sent: Monday, January 17, 2005 9:34 PM Subject: Re: Stereotypes applying in UML 2.0 Hello Nerijus, In reply to your e-mail: > I have some questions regarding stereotypes using in UML 2.0. > > 1. How to declare user defined stereotype in the model? Should class > with stereotype <> and metaclass name be created in the > model? How to declare stereotype <>? First of all, please note that model elements labeled in a diagram with the <> keyword are not stereotypes. Not everything in guillemets represents a setereotype (see appendix B of ptc/04-10-02). User-defined stereotypes can appear in any user-level (M1) model. For the details of how this looks inside the model, see figure 458 as an example. Note that an extension always points to an instance of Class, which represents the metaclass that is being extended. (Strictly speaking, that metaclass is not part of the user model.) > 2. Is some relationship between stereotyped model element and > stereotype instance exist? Where stereotype instance should be > created (contained) and how model element can collect all applied stereotypes? See figure 458. If that does not answer your question, please try to provide a more detailed description of the issue that concerns you. Cheers....Bran To: "Nerijus Jankevicius" Cc: Philippe.Desfray@softeam.fr, uml2-rtf@omg.org Subject: Re: Stereotypes applying in UML 2.0 X-Mailer: Lotus Notes Release 6.0.1CF1 March 04, 2003 From: Branislav Selic Date: Tue, 18 Jan 2005 10:38:55 -0500 X-MIMETrack: Serialize by Router on D25ML01/25/M/IBM(Release 6.0.2CF2|July 23, 2003) at 01/18/2005 10:39:16, Serialize complete at 01/18/2005 10:39:16 First, one of the design principles of the profile mechanism is that a profile can be un-applied without changing the underlying model. So, a model element should not be changed if stereotypes are removed from the model. Second, you don't really need this association. Your tool can certainly find out all the stereotypes applied to a model element by doing a global search of model elements. of course, a clever implementation can come up with ways of optimizing this by caching this information when a stereotype is applied. I don't see how any of this affects interchange. Bran "Nerijus Jankevicius" 01/18/2005 10:32 AM To , Branislav Selic/Ottawa/IBM@IBMCA cc Subject Re: Stereotypes applying in UML 2.0 So how about missing association between Element and stereotype Instance (InstanceSpecification)? Now we should extend our metamodel implementation because elements do not know nothing about applied stereotypes. This cause problems XMI and JMI compatibility, for data exchange. Regards, -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Desfray To: 'Branislav Selic' Cc: 'Nerijus Jankevicius' ; uml2-rtf@omg.org Sent: Tuesday, January 18, 2005 5:21 PM Subject: RE: Stereotypes applying in UML 2.0 OK, so there is an issue to the UML2 rtf. (for Nerijus) Semantically, this does not change anything. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Branislav Selic [mailto:bselic@ca.ibm.com] Envoyé : mardi 18 janvier 2005 16:15 À : Philippe.Desfray@softeam.fr Cc : 'Nerijus Jankevicius'; uml2-rtf@omg.org Objet : RE: Stereotypes applying in UML 2.0 Philippe, I have to correct you: <> is not a stereotype but a keyword. I guess we have a bit of cleaning up to do. I don't think <> should appear in the standard profile at all. This is a bug in the spec. For example, we use <> to annotate a dependency-like line to distinguish a PackageMerge from a Dependency. PackageMerge is not a stereotype of anything. Cheers, Bran Selic IBM Distinguished Engineer IBM Rational Software 770 Palladium Drive Kanata, Ontario, Canada K2V 1C8 ph.: (613) 591-7915 fax: (613) 599-3912 e-mail: bselic@ca.ibm.com "Desfray" 01/18/2005 09:38 AM Please respond to Philippe.Desfray To "'Nerijus Jankevicius'" , Branislav Selic/Ottawa/IBM@IBMCA cc Subject RE: Stereotypes applying in UML 2.0 Nerijus, metaclass is a stereotype as recalled in C.1 StandardProfileL1 A class can be both a usual class or a metaclass depending on the focus that the model currently has on it. Typical examples are "string", boolean, or the "Class" notion used at MOF level (M3 for some conventions) or at UML level (M2 in the same perspective). The stereotype "metaclass" is not mandatory: its main merit is to make clear the focus that one has on it. A stereotype can extend a class be it extended by "meta" or not. >>> Should such class be shared if two stereotypes for the same metaclass are defined? certainly yes. Should replica of all UML metamodel be created in M1 level and used as profile? This is not stated by the UML standard:it is a tool dependant approach: one could provide an access to its metamodel, or provide a "proxy" metamodel as you suggest. >>>Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. The extension defined between a stereotype and a metaclass is a kind of association (see fig 448): at the instance level, you will get the usual objects instanciating an association as shown in fig 458. Hope this helps. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Nerijus Jankevicius [mailto:nerijus@nomagic.com] Envoyé : mardi 18 janvier 2005 09:01 À : Branislav Selic Cc : uml2-rtf@omg.org Objet : Re: Stereotypes applying in UML 2.0 Hi Bran, Thanks for your time. 1. <> issue. Defining of stereotype. Page 715: "A Class that is extended by a Stereotype may be extended by the optional stereotype «metaclass» (see Appendix C. on page -753) shown above or before its name." So is <> stereotype or just a keyword? Appendix C. describes it as stereotype applied to Class. If <> is just a keyword in notation, how such classes (Class, which represents the metaclass) can be recognized in the model and what is difference from ordinary class? Should such class be shared if two stereotypes for the same metaclass are defined? Should replica of all UML metamodel be created in M1 level and used as profile? 2. Applying of stereotype. Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. Figure 458 depicts just stereotype defining, not stereotype usages. It's not clear how for example UseCase instance can reference all applied stereotypes. It seems every tool should extend metamodel, because it is not completed. For example new Rational Software Architect 6.0 uses own "appliedStereotypes" collection for references to stereotypes instances applied to some element. 3. Could you please explain some primitive scenario: 1. Define stereotype <> for Component 2. Create Component "myComponent" 2. Apply this stereotype on "myComponent". How many and what instances of M2 classes will be created in M1 level. How they are related? Thanks. -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Sent: Monday, January 17, 2005 9:34 PM Subject: Re: Stereotypes applying in UML 2.0 Hello Nerijus, In reply to your e-mail: > I have some questions regarding stereotypes using in UML 2.0. > > 1. How to declare user defined stereotype in the model? Should class > with stereotype <> and metaclass name be created in the > model? How to declare stereotype <>? First of all, please note that model elements labeled in a diagram with the <> keyword are not stereotypes. Not everything in guillemets represents a setereotype (see appendix B of ptc/04-10-02). User-defined stereotypes can appear in any user-level (M1) model. For the details of how this looks inside the model, see figure 458 as an example. Note that an extension always points to an instance of Class, which represents the metaclass that is being extended. (Strictly speaking, that metaclass is not part of the user model.) > 2. Is some relationship between stereotyped model element and > stereotype instance exist? Where stereotype instance should be > created (contained) and how model element can collect all applied stereotypes? See figure 458. If that does not answer your question, please try to provide a more detailed description of the issue that concerns you. Cheers....Bran From: "Nerijus Jankevicius" To: "Branislav Selic" Cc: Subject: Re: Stereotypes applying in UML 2.0 Date: Tue, 18 Jan 2005 10:01:15 +0200 X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-Virus-Scanned: clamd / ClamAV version 0.72, clamav-milter version 0.72 on banginis.nomagic.com X-Virus-Status: Clean Hi Bran, Thanks for your time. 1. <> issue. Defining of stereotype. Page 715: "A Class that is extended by a Stereotype may be extended by the optional stereotype «metaclass» (see Appendix C. on page -753) shown above or before its name." So is <> stereotype or just a keyword? Appendix C. describes it as stereotype applied to Class. If <> is just a keyword in notation, how such classes (Class, which represents the metaclass) can be recognized in the model and what is difference from ordinary class? Should such class be shared if two stereotypes for the same metaclass are defined? Should replica of all UML metamodel be created in M1 level and used as profile? 2. Applying of stereotype. Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. Figure 458 depicts just stereotype defining, not stereotype usages. It's not clear how for example UseCase instance can reference all applied stereotypes. It seems every tool should extend metamodel, because it is not completed. For example new Rational Software Architect 6.0 uses own "appliedStereotypes" collection for references to stereotypes instances applied to some element. 3. Could you please explain some primitive scenario: 1. Define stereotype <> for Component 2. Create Component "myComponent" 2. Apply this stereotype on "myComponent". How many and what instances of M2 classes will be created in M1 level. How they are related? Thanks. -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Sent: Monday, January 17, 2005 9:34 PM Subject: Re: Stereotypes applying in UML 2.0 Hello Nerijus, In reply to your e-mail: > I have some questions regarding stereotypes using in UML 2.0. > > 1. How to declare user defined stereotype in the model? Should class > with stereotype <> and metaclass name be created in the > model? How to declare stereotype <>? First of all, please note that model elements labeled in a diagram with the <> keyword are not stereotypes. Not everything in guillemets represents a setereotype (see appendix B of ptc/04-10-02). User-defined stereotypes can appear in any user-level (M1) model. For the details of how this looks inside the model, see figure 458 as an example. Note that an extension always points to an instance of Class, which represents the metaclass that is being extended. (Strictly speaking, that metaclass is not part of the user model.) > 2. Is some relationship between stereotyped model element and > stereotype instance exist? Where stereotype instance should be > created (contained) and how model element can collect all applied stereotypes? See figure 458. If that does not answer your question, please try to provide a more detailed description of the issue that concerns you. Cheers....Bran From: "Nerijus Jankevicius" To: "Branislav Selic" Cc: , Subject: Re: Stereotypes applying in UML 2.0 Date: Wed, 19 Jan 2005 11:22:19 +0200 X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-Virus-Scanned: clamd / ClamAV version 0.72, clamav-milter version 0.72 on banginis.nomagic.com X-Virus-Status: Clean Bran, >>Your tool can certainly find out all the stereotypes applied to a model element by doing a global search of model elements Tool can find all Instances of stereotypes, but they are not related with model elements (stereotyped), so it's impossible to recognize which stereotype instance is applied to your model element. Please explain what information (data) is added into model (M1 level) after stereotype applying to some model element and how this data can be found and recognized. > How many and what instances of M2 classes will be created in M1 level. How they are related? >>>As I said, this depends on the implementation. >>I don't see how any of this affects interchange. So if it depends on the implementation, such model saved into XMI can't be exchanged between tools. Profiles specification is on theoretical tales level and should be improved. Regards, -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: Philippe.Desfray@softeam.fr ; uml2-rtf@omg.org Sent: Tuesday, January 18, 2005 5:38 PM Subject: Re: Stereotypes applying in UML 2.0 First, one of the design principles of the profile mechanism is that a profile can be un-applied without changing the underlying model. So, a model element should not be changed if stereotypes are removed from the model. Second, you don't really need this association. Your tool can certainly find out all the stereotypes applied to a model element by doing a global search of model elements. of course, a clever implementation can come up with ways of optimizing this by caching this information when a stereotype is applied. I don't see how any of this affects interchange. Bran "Nerijus Jankevicius" 01/18/2005 10:32 AM To , Branislav Selic/Ottawa/IBM@IBMCA cc Subject Re: Stereotypes applying in UML 2.0 So how about missing association between Element and stereotype Instance (InstanceSpecification)? Now we should extend our metamodel implementation because elements do not know nothing about applied stereotypes. This cause problems XMI and JMI compatibility, for data exchange. Regards, -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Desfray To: 'Branislav Selic' Cc: 'Nerijus Jankevicius' ; uml2-rtf@omg.org Sent: Tuesday, January 18, 2005 5:21 PM Subject: RE: Stereotypes applying in UML 2.0 OK, so there is an issue to the UML2 rtf. (for Nerijus) Semantically, this does not change anything. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Branislav Selic [mailto:bselic@ca.ibm.com] Envoyé : mardi 18 janvier 2005 16:15 À : Philippe.Desfray@softeam.fr Cc : 'Nerijus Jankevicius'; uml2-rtf@omg.org Objet : RE: Stereotypes applying in UML 2.0 Philippe, I have to correct you: <> is not a stereotype but a keyword. I guess we have a bit of cleaning up to do. I don't think <> should appear in the standard profile at all. This is a bug in the spec. For example, we use <> to annotate a dependency-like line to distinguish a PackageMerge from a Dependency. PackageMerge is not a stereotype of anything. Cheers, Bran Selic IBM Distinguished Engineer IBM Rational Software 770 Palladium Drive Kanata, Ontario, Canada K2V 1C8 ph.: (613) 591-7915 fax: (613) 599-3912 e-mail: bselic@ca.ibm.com "Desfray" 01/18/2005 09:38 AM Please respond to Philippe.Desfray To "'Nerijus Jankevicius'" , Branislav Selic/Ottawa/IBM@IBMCA cc Subject RE: Stereotypes applying in UML 2.0 Nerijus, metaclass is a stereotype as recalled in C.1 StandardProfileL1 A class can be both a usual class or a metaclass depending on the focus that the model currently has on it. Typical examples are "string", boolean, or the "Class" notion used at MOF level (M3 for some conventions) or at UML level (M2 in the same perspective). The stereotype "metaclass" is not mandatory: its main merit is to make clear the focus that one has on it. A stereotype can extend a class be it extended by "meta" or not. >>> Should such class be shared if two stereotypes for the same metaclass are defined? certainly yes. Should replica of all UML metamodel be created in M1 level and used as profile? This is not stated by the UML standard:it is a tool dependant approach: one could provide an access to its metamodel, or provide a "proxy" metamodel as you suggest. >>>Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. The extension defined between a stereotype and a metaclass is a kind of association (see fig 448): at the instance level, you will get the usual objects instanciating an association as shown in fig 458. Hope this helps. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Nerijus Jankevicius [mailto:nerijus@nomagic.com] Envoyé : mardi 18 janvier 2005 09:01 À : Branislav Selic Cc : uml2-rtf@omg.org Objet : Re: Stereotypes applying in UML 2.0 Hi Bran, Thanks for your time. 1. <> issue. Defining of stereotype. Page 715: "A Class that is extended by a Stereotype may be extended by the optional stereotype «metaclass» (see Appendix C. on page -753) shown above or before its name." So is <> stereotype or just a keyword? Appendix C. describes it as stereotype applied to Class. If <> is just a keyword in notation, how such classes (Class, which represents the metaclass) can be recognized in the model and what is difference from ordinary class? Should such class be shared if two stereotypes for the same metaclass are defined? Should replica of all UML metamodel be created in M1 level and used as profile? 2. Applying of stereotype. Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. Figure 458 depicts just stereotype defining, not stereotype usages. It's not clear how for example UseCase instance can reference all applied stereotypes. It seems every tool should extend metamodel, because it is not completed. For example new Rational Software Architect 6.0 uses own "appliedStereotypes" collection for references to stereotypes instances applied to some element. 3. Could you please explain some primitive scenario: 1. Define stereotype <> for Component 2. Create Component "myComponent" 2. Apply this stereotype on "myComponent". How many and what instances of M2 classes will be created in M1 level. How they are related? Thanks. -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Sent: Monday, January 17, 2005 9:34 PM Subject: Re: Stereotypes applying in UML 2.0 Hello Nerijus, In reply to your e-mail: > I have some questions regarding stereotypes using in UML 2.0. > > 1. How to declare user defined stereotype in the model? Should class > with stereotype <> and metaclass name be created in the > model? How to declare stereotype <>? First of all, please note that model elements labeled in a diagram with the <> keyword are not stereotypes. Not everything in guillemets represents a setereotype (see appendix B of ptc/04-10-02). User-defined stereotypes can appear in any user-level (M1) model. For the details of how this looks inside the model, see figure 458 as an example. Note that an extension always points to an instance of Class, which represents the metaclass that is being extended. (Strictly speaking, that metaclass is not part of the user model.) > 2. Is some relationship between stereotyped model element and > stereotype instance exist? Where stereotype instance should be > created (contained) and how model element can collect all applied stereotypes? See figure 458. If that does not answer your question, please try to provide a more detailed description of the issue that concerns you. Cheers....Bran Reply-To: From: "Desfray" To: "'Nerijus Jankevicius'" , "'Branislav Selic'" Cc: Subject: RE: Stereotypes applying in UML 2.0 Date: Wed, 19 Jan 2005 10:29:37 +0100 X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0) X-Virus-Scanned: by amavisd-new at softeam.com Nerijus, As I mailed before, instances of stereotypes are related to model elements: "For this, use 461. The rules for getting there is specified in "Extension:Semantics" " That navigability is from the extension stereotype to the base model element, and you want to know for a model element what are the extension stereotypes. If you cannot get it from an implementation, that's an implementation issue. Some do, some don't but provide dedicated services. As this kind of request is a frequent one, (getting the entending stereotype from a model element), this could be emphasized as Bran suggested by introducing an OCL operation to elements. Best regards ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Nerijus Jankevicius [mailto:nerijus@nomagic.com] Envoyé : mercredi 19 janvier 2005 10:22 À : Branislav Selic Cc : Philippe.Desfray@softeam.fr; uml2-rtf@omg.org Objet : Re: Stereotypes applying in UML 2.0 Bran, >>Your tool can certainly find out all the stereotypes applied to a model element by doing a global search of model elements Tool can find all Instances of stereotypes, but they are not related with model elements (stereotyped), so it's impossible to recognize which stereotype instance is applied to your model element. Please explain what information (data) is added into model (M1 level) after stereotype applying to some model element and how this data can be found and recognized. > How many and what instances of M2 classes will be created in M1 level. How they are related? >>>As I said, this depends on the implementation. >>I don't see how any of this affects interchange. So if it depends on the implementation, such model saved into XMI can't be exchanged between tools. Profiles specification is on theoretical tales level and should be improved. Regards, -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: Philippe.Desfray@softeam.fr ; uml2-rtf@omg.org Sent: Tuesday, January 18, 2005 5:38 PM Subject: Re: Stereotypes applying in UML 2.0 First, one of the design principles of the profile mechanism is that a profile can be un-applied without changing the underlying model. So, a model element should not be changed if stereotypes are removed from the model. Second, you don't really need this association. Your tool can certainly find out all the stereotypes applied to a model element by doing a global search of model elements. of course, a clever implementation can come up with ways of optimizing this by caching this information when a stereotype is applied. I don't see how any of this affects interchange. Bran "Nerijus Jankevicius" 01/18/2005 10:32 AM To , Branislav Selic/Ottawa/IBM@IBMCA cc Subject Re: Stereotypes applying in UML 2.0 So how about missing association between Element and stereotype Instance (InstanceSpecification)? Now we should extend our metamodel implementation because elements do not know nothing about applied stereotypes. This cause problems XMI and JMI compatibility, for data exchange. Regards, -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Desfray To: 'Branislav Selic' Cc: 'Nerijus Jankevicius' ; uml2-rtf@omg.org Sent: Tuesday, January 18, 2005 5:21 PM Subject: RE: Stereotypes applying in UML 2.0 OK, so there is an issue to the UML2 rtf. (for Nerijus) Semantically, this does not change anything. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Branislav Selic [mailto:bselic@ca.ibm.com] Envoyé : mardi 18 janvier 2005 16:15 À : Philippe.Desfray@softeam.fr Cc : 'Nerijus Jankevicius'; uml2-rtf@omg.org Objet : RE: Stereotypes applying in UML 2.0 Philippe, I have to correct you: <> is not a stereotype but a keyword. I guess we have a bit of cleaning up to do. I don't think <> should appear in the standard profile at all. This is a bug in the spec. For example, we use <> to annotate a dependency-like line to distinguish a PackageMerge from a Dependency. PackageMerge is not a stereotype of anything. Cheers, Bran Selic IBM Distinguished Engineer IBM Rational Software 770 Palladium Drive Kanata, Ontario, Canada K2V 1C8 ph.: (613) 591-7915 fax: (613) 599-3912 e-mail: bselic@ca.ibm.com "Desfray" 01/18/2005 09:38 AM Please respond to Philippe.Desfray To "'Nerijus Jankevicius'" , Branislav Selic/Ottawa/IBM@IBMCA cc Subject RE: Stereotypes applying in UML 2.0 Nerijus, metaclass is a stereotype as recalled in C.1 StandardProfileL1 A class can be both a usual class or a metaclass depending on the focus that the model currently has on it. Typical examples are "string", boolean, or the "Class" notion used at MOF level (M3 for some conventions) or at UML level (M2 in the same perspective). The stereotype "metaclass" is not mandatory: its main merit is to make clear the focus that one has on it. A stereotype can extend a class be it extended by "meta" or not. >>> Should such class be shared if two stereotypes for the same metaclass are defined? certainly yes. Should replica of all UML metamodel be created in M1 level and used as profile? This is not stated by the UML standard:it is a tool dependant approach: one could provide an access to its metamodel, or provide a "proxy" metamodel as you suggest. >>>Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. The extension defined between a stereotype and a metaclass is a kind of association (see fig 448): at the instance level, you will get the usual objects instanciating an association as shown in fig 458. Hope this helps. ==================================== Philippe Desfray VP for R&D - SOFTEAM Tel: (33) 01 53968400 Fax: (33) 01 53968401 144 Av. des champs Elysées 75008 PARIS www.softeam.com www.objecteering.com -----Message d'origine----- De : Nerijus Jankevicius [mailto:nerijus@nomagic.com] Envoyé : mardi 18 janvier 2005 09:01 À : Branislav Selic Cc : uml2-rtf@omg.org Objet : Re: Stereotypes applying in UML 2.0 Hi Bran, Thanks for your time. 1. <> issue. Defining of stereotype. Page 715: "A Class that is extended by a Stereotype may be extended by the optional stereotype «metaclass» (see Appendix C. on page -753) shown above or before its name." So is <> stereotype or just a keyword? Appendix C. describes it as stereotype applied to Class. If <> is just a keyword in notation, how such classes (Class, which represents the metaclass) can be recognized in the model and what is difference from ordinary class? Should such class be shared if two stereotypes for the same metaclass are defined? Should replica of all UML metamodel be created in M1 level and used as profile? 2. Applying of stereotype. Another more problematic issue is reference between any stereotyped element instance (M1 level) and stereotype instance. Figure 458 depicts just stereotype defining, not stereotype usages. It's not clear how for example UseCase instance can reference all applied stereotypes. It seems every tool should extend metamodel, because it is not completed. For example new Rational Software Architect 6.0 uses own "appliedStereotypes" collection for references to stereotypes instances applied to some element. 3. Could you please explain some primitive scenario: 1. Define stereotype <> for Component 2. Create Component "myComponent" 2. Apply this stereotype on "myComponent". How many and what instances of M2 classes will be created in M1 level. How they are related? Thanks. -- Nerijus Jankevicius Senior Programmer & System Analyst 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 ----- Original Message ----- From: Branislav Selic To: Nerijus Jankevicius Cc: uml2-rtf@omg.org Sent: Monday, January 17, 2005 9:34 PM Subject: Re: Stereotypes applying in UML 2.0 Hello Nerijus, In reply to your e-mail: > I have some questions regarding stereotypes using in UML 2.0. > > 1. How to declare user defined stereotype in the model? Should class > with stereotype <> and metaclass name be created in the > model? How to declare stereotype <>? First of all, please note that model elements labeled in a diagram with the <> keyword are not stereotypes. Not everything in guillemets represents a setereotype (see appendix B of ptc/04-10-02). User-defined stereotypes can appear in any user-level (M1) model. For the details of how this looks inside the model, see figure 458 as an example. Note that an extension always points to an instance of Class, which represents the metaclass that is being extended. (Strictly speaking, that metaclass is not part of the user model.) > 2. Is some relationship between stereotyped model element and > stereotype instance exist? Where stereotype instance should be > created (contained) and how model element can collect all applied stereotypes? See figure 458. If that does not answer your question, please try to provide a more detailed description of the issue that concerns you. Cheers....Bran To: uml2-rtf@omg.org, oysteinh@ifi.uio.no Subject: Re: Draft ballot 8 X-Mailer: Lotus Notes Release 6.0.1CF1 March 04, 2003 From: Branislav Selic Date: Mon, 15 Aug 2005 16:01:15 -0400 X-MIMETrack: Serialize by Router on D25ML01/25/M/IBM(Release 6.5.4|March 27, 2005) at 08/15/2005 16:01:22, Serialize complete at 08/15/2005 16:01:22 A few comments on proposed resolutions in draft ballot 8 (I still have to review the resolutions associated with profiles). Except for the first one, I believe all of these relate to resolutions proposed by Oystein. 8094 -- needs a bit more explanation where the information requested can be found. 8327 - this really should include an OCL constraint. However, in looking at it, the constraint does not seem easy to write, so it may not be practical to do this now. (Note that there is an outstanding general issue about missing OCL constraints that will ensure the issue of the missing OCL will not get swept under the rug.) 8330 - The discussion claims that the FTF made a change that removed the term "expression" for an attribute of CombinedFragment. However, the FTF record shows no such change. 8340, 8343, 8345, 8346, 8351 - Each one of these makes the excuse that, by its own convention, the Interactions chapter does not provide the subsetting information in its description of association ends. However, this information is provided in every other chapter of the spec and, making an exception here will only confuse readers. This information must be included for every association end that subsets another. The preferred format is "Subsets ::". 8341- This resolution needs to include a change to figure 331 and not use a non-conformant subsection heading ("Literals") [I will make these changes in the proposed resolution -- there is no need to resubmit the resolution] 8343 - The revised text should refer to an "operation call" and not a "method call" (both operations and signals have corresponding methods, but only operations have reply messages) [I can fix this -- there is no need to resubmit the resolution] Cheers...Bran