Issue 19253: Missing OpaqueXXX body constraint (uml2-rtf) Source: Model Driven Solutions (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Clarification Severity: Minor Summary: Presumably a well-formed UML model should have well-formed content, so surely there should be an OpaqueAction/Behavior/Expression constraint that requires the body to be well-formed in its corresponding language? Resolution: Revised Text: Actions taken: February 21, 2014: received issue Discussion: End of Annotations:===== vered-To: spamcop-net-omg4web@spamcop.net X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on filter8 X-Spam-Level: X-Spam-Status: hits=0.0 tests=none version=3.2.4 From: webmaster@omg.org Date: 21 Feb 2014 09:56:12 -0500 To: Subject: Issue/Bug Report X-SpamCop-Checked: 23.30.177.17 23.30.177.16 ******************************************************************************* Name: Edward Willink Employer: mailFrom: ed@willink.me.uk Terms_Agreement: Specification: UML Section: 8 FormalNumber: 2.5 Version: 2.5 Doc_Year: Year Doc_Month: Month Doc_Day: Day Page: 85 Title: Missing OpaqueXXX body constraint Nature: Clarification Severity: Minor CODE: 3TMw8 B1: Report Issue Remote Name: edwillink.plus.com Remote User: HTTP User Agent: Mozilla/5.0 (Windows NT 6.0; rv:27.0) Gecko/20100101 Firefox/27.0 Time: 09:56 AM Description: Presumably a well-formed UML model should have well-formed content, so surely there should be an OpaqueAction/Behavior/Expression constraint that requires the body to be well-formed in its corresponding language? Delivered-To: spamcop-net-omg4web@spamcop.net X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on filter8 X-Spam-Level: X-Spam-Status: hits=0.0 tests=HTML_MESSAGE version=3.2.4 X-Virus-Scanned: OK From: Ed Seidewitz To: "uml2-rtf@omg.org" CC: Juergen Boldt , "issues@omg.org" Subject: RE: issue 19253 -- UML 2.6 RTF issue Thread-Topic: issue 19253 -- UML 2.6 RTF issue Thread-Index: AQHPLyQffTmb1gHgiU6/ouFKNIwavJrAHmpg Date: Fri, 21 Feb 2014 19:56:41 +0000 Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [108.51.109.141] X-Virus-Scanned: amavisd-new at omg.org X-SpamCop-Checked: 23.30.177.17 23.30.177.10 173.203.6.153 184.106.31.85 14.3.169.1 How in the world would one formulate such a constraint, since it depends on the specification of some arbitrary other language (including any natural language)? The point of having a constraint in the UML metamodel is to provide a requirement for validation on a conforming UML tool. But since a modeler may use any language at all in an OpaqueAction/Behavior/Expression, there doesn.t seem to be any reasonable conformance requirement that the specification could place on a UML tool. For each Opaque thing, the UML 2.5 spec has a statement similar to the following one for OpaqueExpression: The UML specification does not define how body Strings are interpreted relative to any language, though other specifications may define specific language Strings to be used to indicate interpretation with respect to those specifications (e.g., .OCL. for expressions to be interpreted according to the OCL specification). This seems entirely reasonable to me. -- Ed From: Juergen Boldt [mailto:juergen@omg.org] Sent: Friday, February 21, 2014 11:43 AM To: issues@omg.org; uml2-rtf@omg.org Subject: issue 19253 -- UML 2.6 RTF issue Delivered-To: spamcop-net-omg4web@spamcop.net X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on filter8 X-Spam-Level: X-Spam-Status: hits=0.0 tests=none version=3.2.4 From: webmaster@omg.org Date: 21 Feb 2014 09:56:12 -0500 To: Subject: Issue/Bug Report X-SpamCop-Checked: 23.30.177.17 23.30.177.16 ******************************************************************************* Name: Edward Willink Employer: mailFrom: ed@willink.me.uk Terms_Agreement: Specification: UML Section: 8 FormalNumber: 2.5 Version: 2.5 Doc_Year: Year Doc_Month: Month Doc_Day: Day Page: 85 Title: Missing OpaqueXXX body constraint Nature: Clarification Severity: Minor CODE: 3TMw8 B1: Report Issue Remote Name: edwillink.plus.com Remote User: HTTP User Agent: Mozilla/5.0 (Windows NT 6.0; rv:27.0) Gecko/20100101 Firefox/27.0 Time: 09:56 AM Description: Presumably a well-formed UML model should have well-formed content, so surely there should be an OpaqueAction/Behavior/Expression constraint that requires the body to be well-formed in its corresponding language? Juergen Boldt Director, Member Services 109 Highland Ave Needham, MA 02494 USA Tel: 781 444 0404 x 132 fax: 781 444 0320 www.omg.org [] Delivered-To: spamcop-net-omg4web@spamcop.net X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on filter8 X-Spam-Level: X-Spam-Status: hits=0.0 tests=HTML_MESSAGE version=3.2.4 X-Virus-Scanned: OK From: Ed Seidewitz To: Ed Willink CC: "uml25-ftf@omg.org" Subject: RE: issue 19253 -- UML 2.6 RTF issue Thread-Topic: issue 19253 -- UML 2.6 RTF issue Thread-Index: AQHPLyQffTmb1gHgiU6/ouFKNIwavJrAHmpggABorID//5wJEIAEOW8AgACeukA= Date: Mon, 24 Feb 2014 22:24:55 +0000 Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [38.99.219.254] X-Virus-Scanned: amavisd-new at omg.org X-SpamCop-Checked: 23.30.177.17 23.30.177.10 173.203.6.158 184.106.31.85 14.3.169.1 Ed . The validation of bodies in certain languages already is essentially a conformance point for UML tools. It is the conformance to the specifications for those languages. Since OCL and Alf are intended for integration with UML, then those specifications should be very clear on what it means to use OCL or Alf text within a UML model. If a UML tool then chooses to also conform to the OCL or Alf standards, one would then expect the tool to validate bodies in those languages. But, for programming languages like C or Java, there is no standard for how to use snippets in those languages in UML. How do you reference UML elements with names that don.t conform to programming language identifier rules? How do you navigate associations? Various tools can and have provided various ways to do this, but, since there is no standard way, one cannot expect to simply require that a tool enforce .validation. in the abstract. So, the bottom line is a requirement for validation of text in a another language has no place in the UML specification. That is the job of the specifications of those other languages. -- Ed From: Ed Willink [mailto:ed@willink.me.uk] Sent: Monday, February 24, 2014 1:39 AM To: Ed Seidewitz Subject: Re: issue 19253 -- UML 2.6 RTF issue Hi Ed Obviously a constraint written in English cannot be enforced ever since an ambiguous language can never become unambiguous. Similarly a tool obviously cannot enforce body languages that it does not support. However it seems equally obvious that a tool that supports OCL/ALF bodies should ensure that those bodies are semantically valid. I would go further and expect that a tool that supports Ada/C++/Java code snippets should try to ensure that those snippets are integrable hen turned into code. Failure to validate bodies would seem to be a choice for UML vendors; as with other conformance points. The bottom line is: If a tool supports execution of bodies in language XYZZY, then a language XYZZY body in which a reference to a Property is mis-spelled should be diagnosed by the tool and so there should be a UML constraint that expects that diagnosis. REgards Ed Willink On 21/02/2014 20:15, Ed Seidewitz wrote: Ed . My point is that it is not only a constraint that cannot be written in OCL, but a constraint that we cannot possibly ask a UML tool to enforce. If a modeler creates an OpaqueExpression with language .English., does a UML tool need to make sure that the body is grammatical English? That it actually expresses a computation? If the modeler chooses language .Java., does the UML tool need to make sure that the body is a valid Java expression? That it makes sense in terms of UML semantics? And does a tool need to be able to do this for any .standard. programming language, no matter how obscure? UML Abstract Syntax Conformance (see Clause 2) requires that .The tool must also provide a way to validate the well-formedness of models that corresponds to the constraints defined in the UML metamodel.. So, if a tool cannot reasonably be expected to enforce a constraint, we should not be putting the constraint in the metamodel, whether written in OCL or not. The statement on the interpretation of .opaque. bodies given in the semantic descriptions is fine. -- Ed From: Ed Willink [mailto:ed@willink.me.uk] Sent: Friday, February 21, 2014 3:06 PM To: Ed Seidewitz; uml2-rtf@omg.org Cc: Juergen Boldt; issues@omg.org Subject: Re: issue 19253 -- UML 2.6 RTF issue Hi Ed It's obviously an example of a constraint that cannot be written in OCL. Consider the converse, is a UML model well-formed if its internal bodies are syntactic rubbish? Wouldn't users like to know? Regards Ed Willink On 21/02/2014 19:56, Ed Seidewitz wrote: How in the world would one formulate such a constraint, since it depends on the specification of some arbitrary other language (including any natural language)? The point of having a constraint in the UML metamodel is to provide a requirement for validation on a conforming UML tool. But since a modeler may use any language at all in an OpaqueAction/Behavior/Expression, there doesn.t seem to be any reasonable conformance requirement that the specification could place on a UML tool. For each Opaque thing, the UML 2.5 spec has a statement similar to the following one for OpaqueExpression: The UML specification does not define how body Strings are interpreted relative to any language, though other specifications may define specific language Strings to be used to indicate interpretation with respect to those specifications (e.g., .OCL. for expressions to be interpreted according to the OCL specification). This seems entirely reasonable to me. -- Ed From: Juergen Boldt [mailto:juergen@omg.org] Sent: Friday, February 21, 2014 11:43 AM To: issues@omg.org; uml2-rtf@omg.org Subject: issue 19253 -- UML 2.6 RTF issue Delivered-To: spamcop-net-omg4web@spamcop.net X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on filter8 X-Spam-Level: X-Spam-Status: hits=0.0 tests=none version=3.2.4 From: webmaster@omg.org Date: 21 Feb 2014 09:56:12 -0500 To: Subject: Issue/Bug Report X-SpamCop-Checked: 23.30.177.17 23.30.177.16 ******************************************************************************* Name: Edward Willink Employer: mailFrom: ed@willink.me.uk Terms_Agreement: Specification: UML Section: 8 FormalNumber: 2.5 Version: 2.5 Doc_Year: Year Doc_Month: Month Doc_Day: Day Page: 85 Title: Missing OpaqueXXX body constraint Nature: Clarification Severity: Minor CODE: 3TMw8 B1: Report Issue Remote Name: edwillink.plus.com Remote User: HTTP User Agent: Mozilla/5.0 (Windows NT 6.0; rv:27.0) Gecko/20100101 Firefox/27.0 Time: 09:56 AM Description: Presumably a well-formed UML model should have well-formed content, so surely there should be an OpaqueAction/Behavior/Expression constraint that requires the body to be well-formed in its corresponding language? Juergen Boldt Director, Member Services 109 Highland Ave Needham, MA 02494 USA Tel: 781 444 0404 x 132 fax: 781 444 0320 www.omg.org [] No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4335 / Virus Database: 3705/7114 - Release Date: 02/21/14 No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4335 / Virus Database: 3705/7114 - Release Date: 02/21/14