Issue 12213: Relations Language: how will metamodels get into a transformation scrip (qvt-rtf) Source: (, ) Nature: Clarification Severity: Minor Summary: Concerning to Relations Language, how will the metamodels get into a transformation script ? Is there a technique similar to Operational Mappings using metamodel declaration and modeltypes ? The RL sample transformation script in annex A.1 (pp 164) doesn't declare the metamodels. The OM sample (A.2.3) does. There is some syntax for declaring and using metamodels and modeltypes in OM (pp118), there isn't for RL (pp38). Resolution: Relations Language: how will metamodels get into a transformation scrip Concerning to Relations Language, how will the metamodels get into a transformation script ? Is there a technique similar to Operational Mappings using metamodel declaration and modeltypes ? The RL sample transformation script in annex A.1 (pp 164) doesn't declare the metamodels. The OM sample (A.2.3) does. There is some syntax for declaring and using metamodels and modeltypes in OM (pp118), there isn't for RL (pp38). Discussion We needs to support definition of e.g. UML in transformation umlToRdbms(uml:UML, rdbms:RDBMS) But we actually may want to reference a document URI or namespace URI http://www.omg.org/spec/UML/20131001/UML.xmihttp://www.omg.org/spec/UML/20131001 But the current syntax is essentially a Java import without the trailing * option. import my.model.package; It cannot reference URIs and it has the wrong separator. Something similar to QVTo's ModelType is needed: modeltype UML uses SimpleUml ("http://omg.qvt-examples.SimpleUml"); However ModelType has many problems that we do not need to replicate: *it is a Class; absolutely not *it supports strict/effective inside rather than outside the program *it has undefined URI usage Conversely Complrete OCL has a requirement for an import too, and here ModelType's are not appropriate at all. Let's fix up import. Revised Text: In 7.1 replace transformation umlRdbms (uml : SimpleUML, rdbms : SimpleRDBMS) { by import SimpleUML : 'http://www.omg.org/spec/UML/20131001/UML.xmi';transformation umlRdbms (uml : SimpleUML, rdbms : SimpleRDBMS) { Insert before 7.1.1 7.1.1 Import statements An import statement introduces definitions of unqualified, or first qualifier names for resolution as if defined at the root package of the transformation. The import of a document URI (such as [1]http://www.omg.org/spec/UML/20131001/UML.xmi) makes the root element (the UML Package) available to resolve references (to UML). Additionally, the optional alias (SimpleUML) also makes the root element available to resolve references to the alias name. Alternatively the import of a namespace URI (such as [2]http://www.omg.org/spec/UML/20131001) makes the referenced element available in a similar way. It is not specified how an implementation locates elements corresponding to namespace URIs or how it distinguishes namespace URI access from document URI access. (A plausible implementation maintains a catalog of known namespace URIs to support their resolution leaving everything else to be interpreted as a document URI.) The import may use further qualification such as 'http://www.omg.org/spec/UML/20131001'::Activities to provide a finer grained import. A trailing wildcard as in 'http://www.omg.org/spec/UML/20131001'::* imports all names defined by the reference preceding the wild card. For UML, this is the Packages Actions, Activities, Classification, ... . An alias and a wildcard cannot be used together. In 7.13.5 replace <topLevel> ::= ('import' <unit> ';' )* <transformation>* <unit> ::= <identifier> ('.' <identifier>)* by <topLevel> ::= <import>* <transformation>* <import> ::= 'import' [<identifier> ':'] <URI> ('::' <identifier>)* ['::*'] ';' <URI> ::= #x27 StringChar* #x27 //from OCL StringLiteralExpCS In 9.18 replace TopLevel ::= (Transformation | Mapping | Query)* by TopLevel ::= Import* (Transformation | Mapping | Query)* Import ::= 'import' [simpleNameCS ':'] <URI> ('::' simpleNameCS)* ['::*'] ';' <URI> ::= #x27 StringChar* #x27 //from OCL StringLiteralExpCS ---------------------------------------------------------------------------------------- [1] http://www.omg.org/spec/UML/20131001/UML.xmi [2] http://www.omg.org/spec/UML/20131001 Actions taken: February 6, 2008: received issue December 22, 2015: Resolved March 29, 2016: closed issue Discussion: Initial Response I don't think QVTo is any different to QVTr. Although A.2.3 happens to provide syntax for metamodels these have names that are distinct from the subsequent transformation and are separated by an explanatory paragraph. How short names such as "UML" are resolved to a particular version, location and representation of a meta-model is tool-specific. http://www.eclipse.org/gmt/umlx/doc/EclipseAndOMG08/ModelRegistry.pdf describes one re-usable solution to the problem. It is used by QVTr and QVTc editors. Discussion: I now consider the failure of QVTr, QVTc and Complete OCL to provide an ability to import a Document URI is a language bug and should not depend on external implementation magic. As for Issue 11690: OCL 2.5 should resolve the semantics of an import for Complete OCL. The QVTr (and QVTc) at least syntaxes should be compatible. Disposition: Deferred End of Annotations:===== m: webmaster@omg.org Date: 06 Feb 2008 08:10:59 -0500 To: Subject: Issue/Bug Report -------------------------------------------------------------------------------- Name: Siegfried Nolte Company: Siegfried Nolte mailFrom: siegfried@siegfried-nolte.de Notification: Yes Specification: MOF 2.0 QVT Section: 7 FormalNumber: ptc/07-07-07 Version: FTF RevisionDate: 07/07/07 Page: 13ff Nature: Clarification Severity: Minor HTTP User Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648) Description Concerning to Relations Language, how will the metamodels get into a transformation script ? Is there a technique similar to Operational Mappings using metamodel declaration and modeltypes ? The RL sample transformation script in annex A.1 (pp 164) doesn't declare the metamodels. The OM sample (A.2.3) does. There is some syntax for declaring and using metamodels and modeltypes in OM (pp118), there isn't for RL (pp38). From: "Willink, Ed" To: qvt-rtf@omg.org Subject: RE: issue 12213 -- QVT RTF issue Date: Wed, 6 Feb 2008 18:17:08 -0000 X-Mailer: Internet Mail Service (5.5.2656.59) Hi Siegried I don't think QVTo is any different to QVTr. Although A.2.3 happens to provide syntax for metamodels these have names that are distinct from the subsequent transformation and are separated by an explanatory paragraph. How short names such as "UML" are resolved to a particular version, location and representation of a meta-model is tool-specific. http://www.eclipse.org/gmt/umlx/doc/EclipseAndOMG08/ModelRegistry.pdf describes one re-usable solution to the problem. It is used by QVTr and QVTc editors. Regards Ed Willink -------------------------------------------------------------------------------- From: Juergen Boldt [mailto:juergen@omg.org] Sent: 06 February 2008 18:05 To: issues@omg.org; qvt-rtf@omg.org Subject: issue 12213 -- QVT RTF issue From: webmaster@omg.org Date: 06 Feb 2008 08:10:59 -0500 To: Subject: Issue/Bug Report -------------------------------------------------------------------------------- Name: Siegfried Nolte Company: Siegfried Nolte mailFrom: siegfried@siegfried-nolte.de Notification: Yes Specification: MOF 2.0 QVT Section: 7 FormalNumber: ptc/07-07-07 Version: FTF RevisionDate: 07/07/07 Page: 13ff Nature: Clarification Severity: Minor HTTP User Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648) Description Concerning to Relations Language, how will the metamodels get into a transformation script ? Is there a technique similar to Operational Mappings using metamodel declaration and modeltypes ? The RL sample transformation script in annex A.1 (pp 164) doesn't declare the metamodels. The OM sample (A.2.3) does. There is some syntax for declaring and using metamodels and modeltypes in OM (pp118), there isn't for RL (pp38). Juergen Boldt Director, Member Services Object Management Group 140 Kendrick St Building A Suite 300 Needham, MA 02494 USA tel: +1 781 444 0404 x 132 fax: +1 781 444 0320 email: juergen@omg.org www.omg.org ******************************************************************************* Please consider the environment before printing this email. ******************************************************************************* This email and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed and may not be divulged to any third party without the express permission of the originator. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thales Research & Technology (UK) Limited. *******************************************************************************