Issue 12518: errors and anomalies in QVT_1.0.mdl in the 07-07-08 ZIP (qvt-rtf) Source: Model Driven Solutions (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Uncategorized Issue Severity: Summary: Use of automated tooling to support comparison of the models developed initially as part of the Eclipse GMT/UMLX project and being transferred to the Eclipse QVT Declarative/QVT Operational Mappings Projects reveals the following errors and anomalies in QVT_1.0.mdl in the 07-07-08 ZIP. Since the diagrams are printed from QVT_1.0.mdl all the QVT problems also occur in 08-04-03. Textual errors in 08-04-03 cannot be analyzed automatically. There are so many that a thorough proof read is required combined with a statement that the diagrams only are normative Resolution: The QVT 1.0 diagrams and models were originally from the models in the QVT_1.0.mdl file. The diagrams rely on proprietary tooling. Unfortunately some independent evolution occurred and so there were many inconsistencies. Consistent Ecore/EMOF files from Eclipse were endorsed as the QVT 1.1 non-normative files. For QVT 1.2, the primary non-normative files are UML models derived from the QVT 1.1 Ecore files. The diagrams are redrawn from the UML using the Open Source Papyrus tool. The diagrams are drawn to assist understanding rather than to squeeze as much as possible into the useable area. The redrawn diagrams are therefore larger/more numerous. (Unfortunately Papyrus does not support {ordered} so {ordered} text is added manually.) In all other respects diagrams and UML non-normative files should be consistent. The multiplicity of unnavigable opposites was not present in the Ecore files and so is set to 0..1 for compositions, and 0..* for non-compositions by the Ecore2UML conversion. This causes a few 1 multiplicities to change to 0..1. The 1 multiplicities were needlessly restrictive prohibiting re-use of classes, so the 0..1 seems better. Perhaps we should have an issue to change navigable containers too. TemplateParameterType is missing from the diagrams since it is not preset in the non-normative files. TemplateParameterType has no practical utility implementations are required to work magic for templates types which may or may not involve the TemplateParameterType class. I find that when I consult the specification, I want to see all the diagrams, which is hard when they are spread thoughout the AS section. All diagrams are therefore brought to the start of their AS section. Revised Text: see pages 32 - 44 of ptc/2014-03-36 for details Actions taken: June 6, 2008: received issue July 15, 2014: closed issue Discussion: End of Annotations:===== m: "Ed Willink" To: Subject: Errors and anomalies in QVT 1.0 07-07-08 ZIP QVT_1.0.mdl and QVT 1.0 08-04-03 diagrams Date: Fri, 6 Jun 2008 20:36:36 +0100 X-Mailer: Microsoft Outlook, Build 10.0.6838 Thread-Index: AcjIDKIXnBl97UTBRE+mQXeKuHTDng== X-Plusnet-Relay: 014fd25c6ad784fa7e308b2f905aa2ea Use of automated tooling to support comparison of the models developed initially as part of the Eclipse GMT/UMLX project and being transferred to the Eclipse QVT Declarative/QVT Operational Mappings Projects reveals the following errors and anomalies in QVT_1.0.mdl in the 07-07-08 ZIP. Since the diagrams are printed from QVT_1.0.mdl all the QVT problems also occur in 08-04-03. Textual errors in 08-04-03 cannot be analyzed automatically. There are so many that a thorough proof read is required combined with a statement that the diagrams only are normative. MDL and CAT files resolving these anomalies are attached. 'nsURI' for 'EMOF' should be 'http://schema.omg.org/spec/MOF/2.0/emof.xml' rather than 'http:///emof.ecore' 'name' for 'EMOF' should be 'EMOF' rather than 'emof' 'name' for 'Property.isID' should be 'isID' rather than 'isId' 'Factory' should be defined 'ReflectiveCollection' should be defined 'ReflectiveSequence' should be defined 'Comment.body' should be defined 'Factory.package' should be defined 'Element.tag' should be undefined 'eOpposite' for 'Tag.element' should be undefined 'lowerBound' for 'Operation.class' should be '0' rather than '1' 'lowerBound' for 'Type.package' should be '0' rather than '1' 'lowerBound' for 'Property.class' should be '0' rather than '1' 'ordered' for 'Class.ownedAttribute' should be 'true' rather than 'false' 'ordered' for 'Class.ownedOperation' should be 'true' rather than 'false' 'ordered' for 'Operation.ownedParameter' should be 'true' rather than 'false' 'defaultValueLiteral' for 'Class.isAbstract' should be 'false' rather than undefined 'defaultValueLiteral' for 'MultiplicityElement.isOrdered' should be 'false' rather than undefined 'defaultValueLiteral' for 'MultiplicityElement.isUnique' should be 'true' rather than undefined 'defaultValueLiteral' for 'MultiplicityElement.lower' should be '1' rather than undefined 'defaultValueLiteral' for 'MultiplicityElement.upper' should be '1' rather than undefined 'defaultValueLiteral' for 'Property.isComposite' should be 'false' rather than undefined 'defaultValueLiteral' for 'Property.isDerived' should be 'false' rather than undefined 'defaultValueLiteral' for 'Property.isReadOnly' should be 'false' rather than undefined 'Element.container()' should be defined 'Element.equals(object)' should be defined 'Element.get(property)' should be defined 'Element.getMetaClass()' should be defined 'Element.isSet(property)' should be defined 'Element.set(property,object)' should be defined 'Element.unset(property)' should be defined 'Extent.elements()' should be defined 'Extent.useContainment()' should be defined 'Factory.convertToString(dataType,object)' should be defined 'Factory.create(metaClass)' should be defined 'Factory.createFromString(dataType,string)' should be defined 'ReflectiveCollection.add(object)' should be defined 'ReflectiveCollection.addAll(objects)' should be defined 'ReflectiveCollection.clear()' should be defined 'ReflectiveCollection.remove(object)' should be defined 'ReflectiveCollection.size()' should be defined 'ReflectiveSequence.add(index,object)' should be defined 'ReflectiveSequence.get(index)' should be defined 'ReflectiveSequence.remove(index)' should be defined 'ReflectiveSequence.set(index,object)' should be defined 'Type.isInstance(object)' should be defined 'URIExtent.contextURI()' should be defined 'URIExtent.element(uri)' should be defined 'URIExtent.uri(element)' should be defined Unnavigable 'opposite' of 'Element.ownedComment' should be modelled 'nsURI' for 'EssentialOCL' should be 'http://schema.omg.org/spec/QVT/1.0/essentialocl.xml' rather than 'http:///essentialocl.ecore' 'name' for 'EssentialOCL' should be 'EssentialOCL' rather than 'essentialocl' 'name' for 'FeatureCallExp' should be 'FeatureCallExp' rather than 'FeaturePropertyCall' 'name' for 'ExpressionInOcl.contextVariable' should be 'contextVariable' rather than 'context' 'name' for 'Variable.representedParameter' should be 'representedParameter' rather than 'bindParameter' 'NavigationCallExp' should be defined 'OpaqueExpression' should be undefined 'TypeType' should be defined 'CollectionKind::Collection' should be defined 'eSuperTypes' for 'ExpressionInOcl' should be 'TypedElement' rather than 'OpaqueExpression' 'eSuperTypes' for 'PropertyCallExp' should be 'NavigationCallExp' rather than 'FeaturePropertyCall' 'eSuperTypes' for 'AnyType' should be 'Type' rather than 'Class','Type' 'abstract' for 'CollectionType' should be 'false' rather than 'true' 'containment' for 'TupleLiteralPart.attribute' should be 'false' rather than 'true' 'lowerBound' for 'CollectionType.elementType' should be '1' rather than '0' 'upperBound' for 'ExpressionInOcl.parameterVariable' should be '-1' rather than '1' 'ordered' for 'ExpressionInOcl.parameterVariable' should be 'false' rather than 'true' 'ordered' for 'OperationCallExp.argument' should be 'true' rather than 'false' 'nsPrefix' for 'QVTBase' should be 'qvtb' rather than 'qvtbase' 'nsURI' for 'QVTBase' should be 'http://schema.omg.org/spec/QVT/1.0/qvtbase.xml' rather than 'http:///qvtbase.ecore' 'name' for 'QVTBase' should be 'QVTBase' rather than 'qvtbase' 'lowerBound' for 'Domain.typedModel' should be '1' rather than '0' 'lowerBound' for 'Rule.transformation' should be '0' rather than '1' 'ordered' for 'Transformation.modelParameter' should be 'false' rather than 'true' 'nsURI' for 'QVTTemplate' should be 'http://schema.omg.org/spec/QVT/1.0/qvttemplate.xml' rather than 'http:///qvttemplate.ecore' 'nsPrefix' for 'QVTTemplate' should be 'qvtt' rather than 'qvttemplate' 'name' for 'QVTTemplate' should be 'QVTTemplate' rather than 'qvttemplate' 'lowerBound' for 'CollectionTemplateExp.member' should be '0' rather than '1' 'lowerBound' for 'CollectionTemplateExp.rest' should be '0' rather than '1' 'lowerBound' for 'CollectionTemplateExp.referredCollectionType' should be '1' rather than '0' 'nsURI' for 'QVTRelation' should be 'http://schema.omg.org/spec/QVT/1.0/qvtrelation.xml' rather than 'http:///qvtrelation.ecore' 'nsPrefix' for 'QVTRelation' should be 'qvtr' rather than 'qvtrelation' 'name' for 'QVTRelation' should be 'QVTRelation' rather than 'qvtrelation' 'lowerBound' for 'RelationCallExp.argument' should be '2' rather than '0' 'lowerBound' for 'RelationCallExp.referredRelation' should be '1' rather than '0' 'lowerBound' for 'RelationDomain.pattern' should be '1' rather than '0' 'nsURI' for 'QVTCore' should be 'http://schema.omg.org/spec/QVT/1.0/qvtcore.xml' rather than 'http:///qvtcore.ecore' 'nsPrefix' for 'QVTCore' should be 'qvtc' rather than 'qvtcore' 'name' for 'QVTCore' should be 'QVTCore' rather than 'qvtcore' 'eSuperTypes' for 'Assignment' should be 'Element' rather than nothing 'eSuperTypes' for 'EnforcementOperation' should be 'Element' rather than nothing 'abstract' for 'Assignment' should be 'true' rather than 'false' 'containment' for 'EnforcementOperation.operationCallExp' should be 'true' rather than 'false' 'Assignment.slotExpression' should be undefined 'PropertyAssignment.slotExpression' should be defined Unnavigable 'opposite' of 'PropertyAssignment.slotExpression' should be modelled 'CorePattern.variable' should be defined 'Mapping.refinement' should be defined 'Mapping.refinement' should be the 'opposite' of 'Mapping.specification' 'nsURI' for 'ImperativeOCL' should be 'http://schema.omg.org/spec/QVT/1.0/imperativeocl.xml' rather than 'http:///imperativeocl.ecore' 'nsPrefix' for 'ImperativeOCL' should be 'impocl' rather than 'imperativeocl' 'name' for 'ImperativeOCL' should be 'ImperativeOCL' rather than 'imperativeocl' 'name' for 'TryExp.exceptClause' should be 'exceptClause' rather than undefined 'containment' for 'UnpackExp.targetVariable' should be 'false' rather than 'true' 'lowerBound' for 'ReturnExp.value' should be '0' rather than '1' 'defaultValueLiteral' for 'AssertExp.severity' should be 'error' rather than undefined 'defaultValueLiteral' for 'VariableInitExp.withResult' should be 'false' rather than undefined 'eSuperTypes' for 'SwitchExp' should not include 'CallExp' 'nsPrefix' for 'QVTOperational' should be 'qvto' rather than 'qvtoperational' 'nsURI' for 'QVTOperational' should be 'http://schema.omg.org/spec/QVT/1.0/qvtoperational.xml' rather than 'http:///qvtoperational.ecore' 'name' for 'QVTOperational' should be 'QVTOperational' rather than 'qvtoperational' 'name' for 'MappingParameter.referredDomain' should be 'referredDomain' rather than 'refinedDomain' 'eSuperTypes' for 'ImperativeCallExp' should be 'OperationCallExp','ImperativeExpression' rather than 'OperationCallExp' 'eSuperTypes' for 'MappingOperation' should be 'ImperativeOperation' rather than 'ImperativeOperation','Operation','NamedElement' 'eSuperTypes' for 'ModelType' should be 'Class' rather than 'Class','URIExtent' 'eSuperTypes' for 'ResolveExp' should be 'CallExp','ImperativeExpression' rather than 'CallExp' 'eType' for 'Module.entry' should be 'EntryOperation' rather than 'Operation' 'lowerBound' for 'ModelType.metamodel' should be '1' rather than '0' 'defaultValueLiteral' for 'ImperativeCallExp.isVirtual' should be 'true' rather than undefined 'defaultValueLiteral' for 'ModelType.conformanceKind' should be 'effective' rather than undefined 'ordered' for 'OperationBody.content' should be 'true' rather than 'false' From: "Ed Willink" To: Cc: "Quentin Glineur" Subject: Re: QVT 1.0 Issue 12524 (and also 12518 to 12527) Date: Sun, 7 Sep 2008 11:35:38 +0100 X-Mailer: Microsoft Outlook, Build 10.0.6838 Thread-Index: AckQ1XfW7+MYoOdaRZqsH383msTnIg== X-Plusnet-Relay: cfc4683e0ac6584088ccb75eec87b977 Hi The submitted models are now available and used by the Eclipse QVT Declarative and QVT OML projects. The basic Rose model may be found at org.eclipse.m2m/org.eclipse.qvt.declarative/plugins/org.eclipse.qvt/model/QVT.mdl in the /cvsroot/modeling module on the CVS server at dev.eclipse.org, which is accessible to an 'anonymous' user. The referenced CAT files are in the same folder. EMOF and Ecore files may be found in the ecore, emof, traditionalEcore, traditionalEmof sub-folders. The non-traditional folders have a PrimitiveTypes package. The traditional folders merge the PrimitiveTypes package into the EMOF package. A FlatQVT is also available for use by the RelToCore example. ------- The QVT Relation model has been updated to incorporate the resolution of Issue 9380. The observation "'lowerBound' for 'RelationDomain.pattern' should be '1' rather than '0'" is therefore retracted. Regards Ed Willink Date: Fri, 12 Dec 2008 06:29:43 +0000 From: Ed Willink User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) To: qvt-rtf@omg.org, Quentin Glineur Subject: Re: Issue 12518, 12519, 12522 QVTBase::Transformation.modelParameter ordering ambiguity resolution. X-Plusnet-Relay: 6ceef13d8e0acdb906da18ff1cc1dd01 Hi The diagram/text conflict for QVTBase::Transformation.modelParameter ordering needs to be resolved as ordered rather than not ordered as previously suggested. An ordered behaviour is required to make the argument list of a QVTRelation::RelationCallExp well-defined. Updated files will be made available shortly in the Eclipse QVT Declarative CVS. Login: anonymous@dev.eclipse.org CVS Root: /cvsroot/modeling CVS Path: org.eclipse.m2m/org.eclipse.qvt.declarative/plugins/org.eclipse.qvt/ Files: QVTBase.cat, ecore/QVTBase.ecore, emof/QVTBase.xml Regards model.zip X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=KvrD2AmN c=1 sm=1 tr=0 a=eW53zEZrsyElcQ0NK1QpqA==:117 a=eW53zEZrsyElcQ0NK1QpqA==:17 a=0Bzu9jTXAAAA:8 a=U5aTihw9y_sA:10 a=C1bwLQVPsXEA:10 a=N659UExz7-8A:10 a=YYzpnO7rAAAA:8 a=BacSYRD8z58A:10 a=JIVOxcAaAAAA:8 a=KHpXyVWLAAAA:8 a=oCcaPWc0AAAA:8 a=OJ91prEgqrRZF5iI3hgA:9 a=Ht-jYmhdiaMCKTDy:21 a=2JkFak8CzYfToa2T:21 a=pILNOxqGKmIA:10 Date: Tue, 04 Feb 2014 07:27:21 +0000 From: Ed Willink User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 To: "Rouquette, Nicolas F (313D)" , "qvt-rtf@omg.org" , QVTOML developer mailing list Subject: Issue 12518 QVT metamodels (was Re: QVT 1.2 RTF Ballot 3 preview 2) X-Virus-Scanned: amavisd-new at omg.org Hi Nicolas My intention with the new non-normative metamodels is just to make progress; near perfection is too hard. - we have models defined using UML so that the unnavigable opposites are now modelled - we have diagrams drawn from the same UML models - we have some small fixes In QVT 1.3, I hope that we can turn the tables and make the UML models normative and autogenerate the specification text. When converting the Ecore files to UML, I was able to exploit the existence of oppositeRoleName EAnnotations so that I only had to add a few missing names. I fixed a problem in UMLUtil (https://bugs.eclipse.org/bugs/show_bug.cgi?id=427167#c3) so that appropriate multiplicities were applied to the unnavigable oposites. For a few unnavigable containments this changed the diagram to 1 rather than 0..1. I used my discretion to variously make the unnavigable containment navigable and keep the 1 multiplicity, or retain unnavigability but change the multiplicity to 0..1. Since containment is likely to be easily navigable in real models, the additional navigability should cost little. I'm not that keen on containment multiplicity 1, since it prohibits reuse; thus QVTc has to change QVTb to allow nested mappings (Rule). However a 1 containment can be more efficient for pattern matching so where re-use is unlikely it is kept .... Compromise. You can see the detail of changes in the org.eclipse.qvt plugin of the QVTd GIT repository. I thought about adding the redefines relationships such as Constructor.body, but in part ran out of time, in part didn't want to change too much at once. I see the dual Package/Class inheritance as a much more pressing issue for progress. I don't really understand your subsets issue. Perhaps you are assuming that QVT is aligned with UML 2.5. Currently QVT defines its own EMOF and EssentialOCL models. These are at least inspired by the much simpler UML InfrastructureLibrary::Core::Basic in which Operation::ownedParameter is not a subset of anything. UML Basic is not supported in UML 2.5, so I expect QVT 1.3 to migrate to the OCL 2.5 Pivot model which will have similar subsets-free execution-friendly characteristics to the obsolete UML Basic. If you can identify specific negative progress in the Issue 12518 diagrams we can try to fix it. For new concerns that were also a concern for QVT 1.1, please raise new issues. Nearly all the changes were in Eclipse QVTo/QVTd already. I raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=426969, https://bugs.eclipse.org/bugs/show_bug.cgi?id=426971, https://bugs.eclipse.org/bugs/show_bug.cgi?id=426983 for some fairly trivial discrepancies. I have not yet investigated whether CatchExp::exceptionVariableName is implemented. Regards Ed Willink On 04/02/2014 03:53, Rouquette, Nicolas F (313D) wrote: Ed, Thanks for the improved metamodels in 12518! However, this now exposes some deficiencies of the QVT metamodels! In QVTBase 1, a Transformation (a kind of Package & Class) has composite associations to TypedModel, Rule (NamedElements) and Tag. In QVTBase 2, a Pattern (a kind of Element) has a composite association to a Predicate (a kind of Element) In QVTTemplate 1, an ObjectTemplateExp (a kind of LiteralExp) has a composite association to PropertyTemplateItem (a kind of Element). . In QVTO 3, an ImperativeOPeration (a kind of Operation) has composite associations to VarParameter (a kind of Parameter & OCL Variable). Because EMOF well-formedness prevents specifying subsets/redefinitions (see MOF 2.4.1, section 12.4, constraint [9]), none of the composite properties defined in QVT metaclasses can be specified to subset/redefine composite properties of their inherited EMOF metaclass. What's the point then of saying that a QVT ImperativeOperation is a kind of Operation since neither ImperativeOperation::context : VarParameter[0..1] nor ImperativeOperation::result : VarParameter[*] are Operation::ownedParameter : Parameter[*] in the EMOF sense? It seems to me that it would be preferable to specify the QVT metamodel as CMOF metamodels (including symmetric association end subsetting/redefinition as appropriate). EMOF QVT metamodels can be extracted from CMOF QVT metamodels (just ignore the stuff that's outside the scope of EMOF) However, with *only* EMOF QVT metamodels, there's not enough information to generate an implementation. At least, in the case of the Eclipse QVTO implementation, we'd be missing the subsets/redefinitions that allows the Eclipse QVTO code to use the inherited EMF API (as an implantation of EMOF). Surely, this would be a step backwards. I hope that for the same of generating an implementation from the spec, we're not going down the road of adding too many smarts in the code generators that would, somehow, add the functionality equivalent to the CMOF subsetting/redefinition constraints had we had a genuine CMOF QVT metamodel. - Nicolas. On 2/3/14 11:01 AM, "Ed Willink" wrote: Hi Note that voting for Ballot 1 reballot is still open. Please vote. Note that voting for Ballot 2 is still open. Please vote. The second preview of QVT 1.2 RTF Ballot 3 is attached (with change bars since Preview 1). Preview 30-Jan to 5-Feb Voting 5-Feb to 19-Feb Most of the working material may be found at http://svn.omg.org/repos/QVT/trunk/Documents/TaskForces/1.2. Apply to Juergen for a password, and beware of using SVN 1.8 tooling for the 1.4 server (1.7 seems fine). I have managed to provide simple resolutions to two previously deferred issues. Issue 12518 is substantially updated to include the redrawn Papyrus diagrams. The provisional Ecore and UML models and Papyrus diagrams can be found in http://svn.omg.org/repos/QVT/trunk/Documents/Specifications/1.2/Models Regards Ed Willink ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4259 / Virus Database: 3684/7056 - Release Date: 02/03/14