Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative')
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/ClassesCS2AS.qvti45
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug456900/ClassesCS2AS.qvti22
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2AS.qvti6
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2.qvti8
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2_AS.qvtias111
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug459225/ClassesCS2AS.qvti6
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Constructors/Constructors.qvti4
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.qvti29
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.ref.qvtias431
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphMinimal/Graph2GraphMinimal.qvti14
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/HSV2HLS/HSV2HLS.qvti44
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/HSV2HLS/HSV2HLSas.qvtias446
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/KiamaRewrite/KiamaRewrite.qvti37
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ManualUML2RDBMS/ManualUML2RDBMS.qvti217
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/SimpleUML2RDBMS/SimpleUML2RDBMS.qvti215
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Tree2TallTree/Tree2TallTree.qvti29
16 files changed, 775 insertions, 889 deletions
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/ClassesCS2AS.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/ClassesCS2AS.qvti
index c5eb6a284..49ae1c638 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/ClassesCS2AS.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/ClassesCS2AS.qvti
@@ -15,9 +15,7 @@ map mClassCS2Class_LM in classescs2as
enforce middle() {
realize c2c : ClassCS2Class
}
- where () {
- c2c.classCS := classCS;
- }
+ set c2c.classCS := classCS;
}
map mRootCS2Root_LM in classescs2as
@@ -26,9 +24,7 @@ map mRootCS2Root_LM in classescs2as
enforce middle() {
realize r2r : RootCS2Root
}
- where () {
- r2r.rootCS := rootCS;
- }
+ set r2r.rootCS := rootCS;
}
map mPackageCS2Package_LM in classescs2as
@@ -37,9 +33,7 @@ map mPackageCS2Package_LM in classescs2as
enforce middle() {
realize p2p : PackageCS2Package
}
- where () {
- p2p.packageCS := packageCS;
- }
+ set p2p.packageCS := packageCS;
}
map mClassCS2Class_MR in classescs2as
@@ -48,9 +42,7 @@ map mClassCS2Class_MR in classescs2as
enforce rightAS() {
realize _'class' : Class
}
- where () {
- c2c._'class' := _'class';
- }
+ set c2c._'class' := _'class';
}
map mRootCS2Root_MR in classescs2as
@@ -59,9 +51,7 @@ map mRootCS2Root_MR in classescs2as
enforce rightAS() {
realize root : Root
}
- where () {
- r2r.root := root;
- }
+ set r2r.root := root;
}
map mPackageCS2Package_MR in classescs2as
@@ -70,50 +60,43 @@ map mPackageCS2Package_MR in classescs2as
enforce rightAS() {
realize _'package' : Package
}
- where () {
- p2p._'package' := _'package';
- }
+ set p2p._'package' := _'package';
}
map uClass_name in classescs2as
{
check rightAS(_'class' : Class) {}
check leftCS(classCS : ClassCS) {}
- where (classCS.ClassCS2Class._'class' = _'class';) {
- _'class'.name := classCS.name;
- }
+ where (classCS.ClassCS2Class._'class' = _'class';) {}
+ set _'class'.name := classCS.name;
}
map uRoot_ownedPackages in classescs2as
{
check rightAS(root : Root) {}
check leftCS(rootCS : RootCS) {}
- where (rootCS.RootCS2Root.root = root;) {
- root.ownedPackages := rootCS.ownedPackages.PackageCS2Package._'package'->asOrderedSet();
- }
+ where (rootCS.RootCS2Root.root = root;) {}
+ set root.ownedPackages := rootCS.ownedPackages.PackageCS2Package._'package'->asOrderedSet();
}
map uPackage_name in classescs2as
{
check rightAS(_'package' : Package) {}
check leftCS(packageCS : PackageCS) {}
- where (packageCS.PackageCS2Package._'package' = _'package';) {
- _'package'.name := packageCS.name;
- }
+ where (packageCS.PackageCS2Package._'package' = _'package';) {}
+ set _'package'.name := packageCS.name;
}
map uPackage_ownedClasses in classescs2as
{
check rightAS(_'package' : Package) {}
check leftCS(packageCS : PackageCS) {}
- where (packageCS.PackageCS2Package._'package' = _'package';) {
- _'package'.ownedClasses := packageCS.ownedClasses.ClassCS2Class._'class'->asOrderedSet();
- }
+ where (packageCS.PackageCS2Package._'package' = _'package';) {}
+ set _'package'.ownedClasses := packageCS.ownedClasses.ClassCS2Class._'class'->asOrderedSet();
}
map __root__ in classescs2as
{
- where () {}
for packageCS : classescs::PackageCS in classescs::PackageCS.allInstances() {
call mPackageCS2Package_LM {
packageCS := packageCS;
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug456900/ClassesCS2AS.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug456900/ClassesCS2AS.qvti
index ba985d073..def4190c7 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug456900/ClassesCS2AS.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug456900/ClassesCS2AS.qvti
@@ -13,9 +13,7 @@ map mCreationRootCS2Root in classescs2as
enforce rightAS() {
realize root : Root
}
- where () {
- rootCS.ast := root;
- }
+ set rootCS.ast := root;
}
map mCreationPackageCS2Package in classescs2as
@@ -24,29 +22,31 @@ map mCreationPackageCS2Package in classescs2as
enforce rightAS() {
realize _'package' : Package
}
- where () {
- packageCS.ast := _'package';
- }
+ set packageCS.ast := _'package';
}
map uPackage_name in classescs2as
{
check leftCS(packageCS : PackageCS) {}
- enforce rightAS() {}
+ enforce rightAS() {
+ l1 : classes::Package
+ }
where () {
- packageCS.ast.oclAsType(classes::Package).name := packageCS.name;
+ l1 := packageCS.ast.oclAsType(classes::Package);
}
+ set l1.name := packageCS.name;
}
map uRoot_ownedPackages in classescs2as
{
check leftCS(rootCS : RootCS) {}
- enforce rightAS() {}
+ enforce rightAS() {z1 : classes::Root}
where () {
- rootCS.ast.oclAsType(classes::Root).ownedPackages :=
- rootCS.ownedPackages.ast.oclAsType(classes::Package)->asOrderedSet();
+ z1 := rootCS.ast.oclAsType(classes::Root);
}
+ set z1.ownedPackages :=
+ rootCS.ownedPackages.ast.oclAsType(classes::Package)->asOrderedSet();
}
map __root__ in classescs2as
{
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2AS.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2AS.qvti
index 26e5c5705..7c89e11d1 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2AS.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2AS.qvti
@@ -14,18 +14,14 @@ map createPackage in classescs2as
enforce rightAS() {
realize _'package' : Package
}
- where () {
- _'package'.name := if packageCS.hasName()
+ set _'package'.name := if packageCS.hasName()
then packageCS.name
else 'unnamed'
endif;
- }
}
map __root__ in classescs2as
{
- where () {}
-
for packageCS : classescs::PackageCS in classescs::PackageCS.allInstances() {
call createPackage {
packageCS := packageCS;
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2.qvti
index 975d70762..e82454f4b 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2.qvti
@@ -12,21 +12,17 @@ map createPackage in classescs2as
{
check leftCS(packageCS : PackageCS) {}
enforce rightAS() {
- realize package : Package
+ realize _package : Package
}
- where () {
- package.name := if packageCS.aBooleanElementOp()
+ set _package.name := if packageCS.aBooleanElementOp()
--if not packageCS.name.oclIsUndefined()
then 'transformation worked'
else 'unexpected'
endif;
- }
}
map __root__ in classescs2as
{
- where () {}
-
for packageCS : classescs::PackageCS in classescs::PackageCS.allInstances() {
call createPackage {
packageCS := packageCS;
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2_AS.qvtias b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2_AS.qvtias
index 8e63a8705..cd3f9f8e9 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2_AS.qvtias
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2_AS.qvtias
@@ -1,95 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
-<qvti:ImperativeModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:pivot="http://www.eclipse.org/ocl/2015/Pivot" xmlns:qvtb="http://www.eclipse.org/qvt/2015/QVTbase"
- xmlns:qvti="http://www.eclipse.org/qvt/2015/QVTimperative"
- xsi:schemaLocation="http://www.eclipse.org/ocl/2015/Pivot java://org.eclipse.ocl.pivot.PivotPackage http://www.eclipse.org/qvt/2015/QVTbase java://org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage http://www.eclipse.org/qvt/2015/QVTimperative java://org.eclipse.qvtd.pivot.qvtimperative.QVTimperativePackage"
+<qvti:ImperativeModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pivot="http://www.eclipse.org/ocl/2015/Pivot"
+ xmlns:qvtb="http://www.eclipse.org/qvt/2015/QVTbase" xmlns:qvti="http://www.eclipse.org/qvt/2015/QVTimperative" xsi:schemaLocation="http://www.eclipse.org/ocl/2015/Pivot java://org.eclipse.ocl.pivot.PivotPackage http://www.eclipse.org/qvt/2015/QVTbase java://org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage http://www.eclipse.org/qvt/2015/QVTimperative java://org.eclipse.qvtd.pivot.qvtimperative.QVTimperativePackage"
name="ClassesCS2ASv2.qvti" externalURI="platform:/resource/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2.qvti">
<ownedImports name="classes" importedNamespace="pivot:Model ../Classes.ecore.oclas#/"/>
<ownedImports name="classescs" importedNamespace="pivot:Model ../ClassesCS.ecore.oclas#/"/>
<ownedImports importedNamespace="pivot:Model helpers.ocl.oclas#/"/>
<ownedPackages xmi:id="P." name="">
- <ownedClasses xsi:type="qvtb:Transformation" xmi:id="T..classescs2as" name="classescs2as"
- superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclElement">
- <modelParameter xmi:id="qT..classescs2as.leftCS" name="leftCS" usedPackage="../ClassesCS.ecore.oclas#P.classescs"/>
- <modelParameter xmi:id="qT..classescs2as.rightAS" name="rightAS" usedPackage="../Classes.ecore.oclas#P.classes"/>
+ <ownedClasses xsi:type="qvtb:Transformation" xmi:id="T..classescs2as" name="classescs2as" superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclElement">
+ <modelParameter xmi:id="qT..classescs2as.leftCS" name="leftCS" usedPackage="helpers.ocl.oclas#P.classescs">
+ <ownedContext xmi:id="qV..classescs2as.leftCS.leftCS" name="leftCS" type="pivot:Class http://www.eclipse.org/qvt/2015/QVTimperativeLibrary.oclas#T.qvtbaselibrary.Model"/>
+ </modelParameter>
+ <modelParameter xmi:id="qT..classescs2as.rightAS" name="rightAS" usedPackage="../Classes.ecore.oclas#P.classes">
+ <ownedContext xmi:id="qV..classescs2as.rightAS.rightAS" name="rightAS" type="pivot:Class http://www.eclipse.org/qvt/2015/QVTimperativeLibrary.oclas#T.qvtbaselibrary.Model"/>
+ </modelParameter>
<rule xsi:type="qvti:Mapping" xmi:id="m..classescs2as.createPackage" name="createPackage">
- <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false"
- typedModel="#qT..classescs2as.leftCS">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false" typedModel="#qT..classescs2as.leftCS">
<guardPattern>
- <variable xmi:id="qV..classescs2as.createPackage.leftCS.guard.packageCS"
- name="packageCS" type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"/>
+ <variable name="packageCS" isRequired="false" type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"/>
</guardPattern>
- <bottomPattern/>
+ <bottomPattern/>AC
</domain>
- <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true"
- typedModel="#qT..classescs2as.rightAS">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true" typedModel="#qT..classescs2as.rightAS">
<guardPattern/>
<bottomPattern>
- <realizedVariable xmi:id="qV..classescs2as.createPackage.rightAS.bottom.package"
- name="package" type="pivot:Class ../Classes.ecore.oclas#T.classes.Package"/>
+ <realizedVariable xmi:id="qV..classescs2as.createPackage.rightAS.bottom._package" name="_package" isRequired="false" type="pivot:Class ../Classes.ecore.oclas#T.classes.Package"/>
</bottomPattern>
</domain>
<guardPattern/>
- <bottomPattern>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Classes.ecore.oclas#p.classes.NamedElement.name">
- <value xsi:type="pivot:IfExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String">
- <ownedCondition xsi:type="pivot:OperationCallExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Boolean"
- referredOperation="helpers.ocl.oclas#o.ocl.OclElement.aBooleanElementOp">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
- referredVariable="#qV..classescs2as.createPackage.leftCS.guard.packageCS"/>
- </ownedCondition>
- <ownedElse xsi:type="pivot:StringLiteralExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- stringSymbol="unexpected"/>
- <ownedThen xsi:type="pivot:StringLiteralExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- stringSymbol="transformation worked"/>
- </value>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Classes.ecore.oclas#T.classes.Package"
- referredVariable="#qV..classescs2as.createPackage.rightAS.bottom.package"/>
- </assignment>
- </bottomPattern>
+ <bottomPattern/>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="../Classes.ecore.oclas#p.classes.NamedElement.name">
+ <slotExpression isRequired="false" type="pivot:Class ../Classes.ecore.oclas#T.classes.Package" referredVariable="#qV..classescs2as.createPackage.rightAS.bottom._package"/>
+ <value xsi:type="pivot:IfExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String">
+ <ownedCondition xsi:type="pivot:OperationCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Boolean"
+ referredOperation="helpers.ocl.oclas#o.ocl.OclElement.aBooleanElementOp">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.0/@domain.0/@guardPattern/@variable.0"/>
+ </ownedCondition>
+ <ownedElse xsi:type="pivot:StringLiteralExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
+ stringSymbol="unexpected"/>
+ <ownedThen xsi:type="pivot:StringLiteralExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
+ stringSymbol="transformation worked"/>
+ </value>
+ </ownedStatements>
</rule>
<rule xsi:type="qvti:Mapping" xmi:id="m..classescs2as.__root__" name="__root__">
<guardPattern/>
<bottomPattern/>
- <ownedStatements xsi:type="qvti:MappingLoop">
- <ownedSource xsi:type="pivot:OperationCallExp" type="#//@ownedPackages.1/@ownedClasses.0"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclElement.allInstances">
- <ownedSource xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
- referredType="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"/>
- </ownedSource>
- <ownedMappingStatements xsi:type="qvti:MappingCall" referredMapping="#m..classescs2as.createPackage">
- <binding boundVariable="#qV..classescs2as.createPackage.leftCS.guard.packageCS">
- <value xsi:type="pivot:VariableExp" type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
- referredVariable="#i..classescs2as.__root__.0.0.packageCS"/>
- </binding>
- </ownedMappingStatements>
- <ownedIterators xmi:id="i..classescs2as.__root__.0.0.packageCS" name="packageCS"
- type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"/>
- </ownedStatements>
- </rule>
+ <ownedStatements xsi:type="qvti:MappingLoop">
+ <ownedIterators xmi:id="i..classescs2as.__root__.0.packageCS" name="packageCS" type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"/>
+ <ownedMappingStatements xsi:type="qvti:MappingCall" isInfinite="false" referredMapping="#m..classescs2as.createPackage">
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.0/@domain.0/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS" referredVariable="#i..classescs2as.__root__.0.packageCS"/>
+ </binding>
+ </ownedMappingStatements>
+ <ownedSource xsi:type="pivot:OperationCallExp" type="#//@ownedPackages.1/@ownedClasses.0" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclElement.allInstances">
+ <ownedSource xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Pivot.oclas#T.pivot.Class" referredType="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"/>
+ </ownedSource>
+ </ownedStatements>
+ </rule>
+ <ownedContext xmi:id="qV..classescs2as.this" name="this" type="#T..classescs2as"/>
</ownedClasses>
</ownedPackages>
- <ownedPackages xmi:id="P.$$" name="$$" URI="http://www.eclipse.org/ocl/2015/Orphanage"
- nsPrefix="orphanage">
- <ownedClasses xsi:type="pivot:SetType" name="Set" superClasses="#//@ownedPackages.1/@ownedClasses.1"
- elementType="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS">
+ <ownedPackages xmi:id="P.$$" name="$$" URI="http://www.eclipse.org/ocl/2015/Orphanage" nsPrefix="orphanage">
+ <ownedClasses xsi:type="pivot:SetType" name="Set" superClasses="#//@ownedPackages.1/@ownedClasses.1" elementType="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
+ isNullFree="true">
<ownedBindings>
- <ownedSubstitutions actual="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
- formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SetT"/>
+ <ownedSubstitutions actual="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SetT"/>
</ownedBindings>
</ownedClasses>
- <ownedClasses xsi:type="pivot:CollectionType" name="UniqueCollection" superClasses="#//@ownedPackages.1/@ownedClasses.2"
- elementType="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS">
+ <ownedClasses xsi:type="pivot:CollectionType" name="UniqueCollection" superClasses="#//@ownedPackages.1/@ownedClasses.2" elementType="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS">
<ownedBindings>
- <ownedSubstitutions actual="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
- formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..UniqueCollectionT"/>
+ <ownedSubstitutions actual="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..UniqueCollectionT"/>
</ownedBindings>
</ownedClasses>
<ownedClasses xsi:type="pivot:CollectionType" name="Collection" superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclAny"
elementType="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS">
<ownedBindings>
- <ownedSubstitutions actual="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
- formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..CollectionT"/>
+ <ownedSubstitutions actual="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..CollectionT"/>
</ownedBindings>
</ownedClasses>
</ownedPackages>
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug459225/ClassesCS2AS.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug459225/ClassesCS2AS.qvti
index 92876e536..842149c8f 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug459225/ClassesCS2AS.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug459225/ClassesCS2AS.qvti
@@ -14,18 +14,14 @@ map createPackage in classescs2as_Bug459225
enforce rightAS() {
realize _'package' : Package
}
- where () {
- _'package'.name := if packageCS.hasName()
+ set _'package'.name := if packageCS.hasName()
then packageCS.computeName()
else 'unnamed'
endif;
- }
}
map __root__ in classescs2as_Bug459225
{
- where () {}
-
for packageCS : classescs::PackageCS in classescs::PackageCS.allInstances() {
call createPackage {
packageCS := packageCS;
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Constructors/Constructors.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Constructors/Constructors.qvti
index ce02b8922..19e62feed 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Constructors/Constructors.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Constructors/Constructors.qvti
@@ -16,7 +16,5 @@ map ep2ep in Constructors {
realize epOut1 : EPackage := this.createEPackage(epIn.name),
realize epOut2 : EPackage
}
- where () {
- epOut2.name := epIn.name;
- }
+ set epOut2.name := epIn.name;
}
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.qvti
index c357161dd..5da7e73ce 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.qvti
@@ -9,7 +9,6 @@ transformation CopyGraph {
map __root__ in CopyGraph {
- where () {}
for g1 : SimpleGraph::Graph in SimpleGraph::Graph.allInstances() {
call Graph2Middle {
g1 := g1;
@@ -22,10 +21,8 @@ map Graph2Middle in CopyGraph { -- L to M for G
enforce middle() {
realize middleG2G:Graph2Graph
}
- where () {
- middleG2G.graph1 := g1;
- middleG2G.name := g1.name.toLowerCase();
- }
+ set middleG2G.graph1 := g1;
+ set middleG2G.name := g1.name.toLowerCase();
for child in g1.element->select(e | e.oclIsTypeOf(simplegraph::Node)) {
call Node2Middle {
n1 := child;
@@ -42,11 +39,9 @@ map Node2Middle in CopyGraph { -- L to M for N
enforce middle(middleParent:Graph2Graph) {
realize n2n:Node2Node
}
- where () {
- n2n.owner := middleParent;
- n2n.node1 := n1;
- n2n.label := n1.label.toLowerCase();
- }
+ set n2n.owner := middleParent;
+ set n2n.node1 := n1;
+ set n2n.label := n1.label.toLowerCase();
}
map Middle2Graph in CopyGraph { -- M to R for G
@@ -54,10 +49,8 @@ map Middle2Graph in CopyGraph { -- M to R for G
enforce lowerGraph() {
realize g2:Graph
}
- where () {
- g2Gmiddle.graph2 := g2;
- g2.name := g2Gmiddle.name;
- }
+ set g2Gmiddle.graph2 := g2;
+ set g2.name := g2Gmiddle.name;
for child in g2Gmiddle.element2Element->select(e2e | e2e.oclIsTypeOf(simplegraph2graph::Node2Node)) {
call Middle2Node {
n2n := child;
@@ -70,9 +63,7 @@ map Middle2Node in CopyGraph { -- M to R for N
enforce lowerGraph () {
realize n2:Node
}
- where () {
- n2n.node2 := n2;
- n2.graph := n2n.owner.graph2;
- n2.label := n2n.label;
- }
+ set n2n.node2 := n2;
+ set n2.graph := n2n.owner.graph2;
+ set n2.label := n2n.label;
}
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.ref.qvtias b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.ref.qvtias
index 2783b8c68..6d0380ea7 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.ref.qvtias
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.ref.qvtias
@@ -1,301 +1,296 @@
<?xml version="1.0" encoding="UTF-8"?>
-<qvti:ImperativeModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:pivot="http://www.eclipse.org/ocl/2015/Pivot" xmlns:qvtb="http://www.eclipse.org/qvt/2015/QVTbase"
- xmlns:qvti="http://www.eclipse.org/qvt/2015/QVTimperative"
- xsi:schemaLocation="http://www.eclipse.org/ocl/2015/Pivot java://org.eclipse.ocl.pivot.PivotPackage http://www.eclipse.org/qvt/2015/QVTbase java://org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage http://www.eclipse.org/qvt/2015/QVTimperative java://org.eclipse.qvtd.pivot.qvtimperative.QVTimperativePackage"
- name="Graph2GraphHierarchical.qvti" externalURI="file:/C:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.qvti">
+<qvti:ImperativeModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pivot="http://www.eclipse.org/ocl/2015/Pivot"
+ xmlns:qvtb="http://www.eclipse.org/qvt/2015/QVTbase" xmlns:qvti="http://www.eclipse.org/qvt/2015/QVTimperative" xsi:schemaLocation="http://www.eclipse.org/ocl/2015/Pivot java://org.eclipse.ocl.pivot.PivotPackage http://www.eclipse.org/qvt/2015/QVTbase java://org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage http://www.eclipse.org/qvt/2015/QVTimperative java://org.eclipse.qvtd.pivot.qvtimperative.QVTimperativePackage"
+ name="Graph2GraphHierarchical.qvti" externalURI="file:/E:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphHierarchical/Graph2GraphHierarchical.qvti">
+ <ownedImports name="SimpleGraph" importedNamespace="pivot:Package ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#P.simplegraph"/>
+ <ownedImports name="SimpleGraph2Graph" importedNamespace="pivot:Package ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#P.simplegraph2graph"/>
<ownedPackages xmi:id="P." name="">
- <ownedClasses xsi:type="qvtb:Transformation" xmi:id="T..CopyGraph" name="CopyGraph"
- superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclElement">
- <modelParameter xmi:id="qT..CopyGraph.upperGraph" name="upperGraph" usedPackage="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#P.simplegraph"/>
- <modelParameter xmi:id="qT..CopyGraph.lowerGraph" name="lowerGraph" usedPackage="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#P.simplegraph"/>
- <modelParameter xmi:id="qT..CopyGraph.middle" name="middle" usedPackage="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#P.simplegraph2graph"/>
+ <ownedClasses xsi:type="qvtb:Transformation" xmi:id="T..CopyGraph" name="CopyGraph" superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclElement">
+ <modelParameter xmi:id="qT..CopyGraph.upperGraph" name="upperGraph" usedPackage="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#P.simplegraph">
+ <ownedContext xmi:id="qV..CopyGraph.upperGraph.upperGraph" name="upperGraph" type="pivot:Class http://www.eclipse.org/qvt/2015/QVTimperativeLibrary.oclas#T.qvtbaselibrary.Model"/>
+ </modelParameter>
+ <modelParameter xmi:id="qT..CopyGraph.lowerGraph" name="lowerGraph" usedPackage="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#P.simplegraph">
+ <ownedContext xmi:id="qV..CopyGraph.lowerGraph.lowerGraph" name="lowerGraph" type="pivot:Class http://www.eclipse.org/qvt/2015/QVTimperativeLibrary.oclas#T.qvtbaselibrary.Model"/>
+ </modelParameter>
+ <modelParameter xmi:id="qT..CopyGraph.middle" name="middle" usedPackage="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#P.simplegraph2graph">
+ <ownedContext xmi:id="qV..CopyGraph.middle.middle" name="middle" type="pivot:Class http://www.eclipse.org/qvt/2015/QVTimperativeLibrary.oclas#T.qvtbaselibrary.Model"/>
+ </modelParameter>
+ <rule xsi:type="qvti:Mapping" xmi:id="m..CopyGraph.__root__" name="__root__">
+ <guardPattern/>
+ <bottomPattern/>
+ <ownedStatements xsi:type="qvti:MappingLoop">
+ <ownedIterators xmi:id="i..CopyGraph.__root__.0.g1" name="g1" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"/>
+ <ownedMappingStatements xsi:type="qvti:MappingCall" isInfinite="false" referredMapping="#m..CopyGraph.Graph2Middle">
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.1/@domain.0/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
+ referredVariable="#i..CopyGraph.__root__.0.g1"/>
+ </binding>
+ </ownedMappingStatements>
+ <ownedSource xsi:type="pivot:OperationCallExp" type="#//@ownedPackages.1/@ownedClasses.0" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclElement.allInstances">
+ <ownedSource xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Pivot.oclas#T.pivot.Class" referredType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"/>
+ </ownedSource>
+ </ownedStatements>
+ </rule>
<rule xsi:type="qvti:Mapping" xmi:id="m..CopyGraph.Graph2Middle" name="Graph2Middle">
- <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false"
- typedModel="#qT..CopyGraph.upperGraph">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false" typedModel="#qT..CopyGraph.upperGraph">
<guardPattern>
- <variable xmi:id="qV..CopyGraph.Graph2Middle.upperGraph.guard.g1" name="g1"
- type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"/>
+ <variable name="g1" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"/>
</guardPattern>
<bottomPattern/>
</domain>
- <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true"
- typedModel="#qT..CopyGraph.middle">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true" typedModel="#qT..CopyGraph.middle">
<guardPattern/>
<bottomPattern>
- <realizedVariable xmi:id="qV..CopyGraph.Graph2Middle.middle.bottom.middleG2G"
- name="middleG2G" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"/>
+ <realizedVariable xmi:id="qV..CopyGraph.Graph2Middle.middle.bottom.middleG2G" name="middleG2G" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"/>
</bottomPattern>
</domain>
<guardPattern/>
- <bottomPattern>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.graph1">
- <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
- referredVariable="#qV..CopyGraph.Graph2Middle.upperGraph.guard.g1"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
- referredVariable="#qV..CopyGraph.Graph2Middle.middle.bottom.middleG2G"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.name">
- <value xsi:type="pivot:OperationCallExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.String.toLowerCase">
- <ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- referredProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Graph.name">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
- referredVariable="#qV..CopyGraph.Graph2Middle.upperGraph.guard.g1"/>
- </ownedSource>
- </value>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
- referredVariable="#qV..CopyGraph.Graph2Middle.middle.bottom.middleG2G"/>
- </assignment>
- </bottomPattern>
- <ownedStatements xsi:type="qvti:MappingLoop">
- <ownedSource xsi:type="pivot:IteratorExp" type="#//@ownedPackages.1/@ownedClasses.0"
- referredIteration="http://www.eclipse.org/ocl/2015/Library.oclas#i.ocl.OrderedSet.select..T">
- <ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.0"
- referredProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Graph.element">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
- referredVariable="#qV..CopyGraph.Graph2Middle.upperGraph.guard.g1"/>
- </ownedSource>
- <ownedBody xsi:type="pivot:OperationCallExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Boolean"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclIsTypeOf..ocl.OclType">
- <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element"
- referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.0/@ownedStatements.0/@ownedSource/@ownedIterators.0"/>
- <ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
- referredType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"/>
- </ownedBody>
- <ownedIterators name="e" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element"
- representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.OrderedSet.select..T"/>
+ <bottomPattern/>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.graph1">
+ <slotExpression isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
+ referredVariable="#qV..CopyGraph.Graph2Middle.middle.bottom.middleG2G"/>
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.1/@domain.0/@guardPattern/@variable.0"/>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.name">
+ <slotExpression isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
+ referredVariable="#qV..CopyGraph.Graph2Middle.middle.bottom.middleG2G"/>
+ <value xsi:type="pivot:OperationCallExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.String.toLowerCase">
+ <ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
+ referredProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Graph.name">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.1/@domain.0/@guardPattern/@variable.0"/>
</ownedSource>
- <ownedMappingStatements xsi:type="qvti:MappingCall" referredMapping="#m..CopyGraph.Node2Middle">
- <binding boundVariable="#qV..CopyGraph.Node2Middle.upperGraph.guard.n1">
- <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element"
- referredVariable="#i..CopyGraph.Graph2Middle.0.0.child"/>
- </binding>
- <binding boundVariable="#qV..CopyGraph.Node2Middle.middle.guard.middleParent">
- <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
- referredVariable="#qV..CopyGraph.Graph2Middle.middle.bottom.middleG2G"/>
- </binding>
- </ownedMappingStatements>
- <ownedIterators xmi:id="i..CopyGraph.Graph2Middle.0.0.child" name="child"
- type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element"/>
- </ownedStatements>
- <ownedStatements xsi:type="qvti:MappingCall" referredMapping="#m..CopyGraph.Middle2Graph">
- <binding boundVariable="#qV..CopyGraph.Middle2Graph.middle.guard.g2Gmiddle">
- <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
+ </value>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:MappingLoop">
+ <ownedIterators xmi:id="i..CopyGraph.Graph2Middle.2.child" name="child" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element"/>
+ <ownedMappingStatements xsi:type="qvti:MappingCall" isInfinite="false" referredMapping="#m..CopyGraph.Node2Middle">
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.0/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element"
+ referredVariable="#i..CopyGraph.Graph2Middle.2.child"/>
+ </binding>
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.1/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
referredVariable="#qV..CopyGraph.Graph2Middle.middle.bottom.middleG2G"/>
</binding>
- </ownedStatements>
+ </ownedMappingStatements>
+ <ownedSource xsi:type="pivot:IteratorExp" type="#//@ownedPackages.1/@ownedClasses.1" referredIteration="http://www.eclipse.org/ocl/2015/Library.oclas#i.ocl.OrderedSet.select..T">
+ <ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.1" referredProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Graph.element">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.1/@domain.0/@guardPattern/@variable.0"/>
+ </ownedSource>
+ <ownedBody xsi:type="pivot:OperationCallExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Boolean"
+ referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclIsTypeOf..ocl.OclType">
+ <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.1/@ownedStatements.2/@ownedSource/@ownedIterators.0"/>
+ <ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Pivot.oclas#T.pivot.Class" referredType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"/>
+ </ownedBody>
+ <ownedIterators name="e" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element" representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.OrderedSet.select..T"/>
+ </ownedSource>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:MappingCall" isInfinite="false" referredMapping="#m..CopyGraph.Middle2Graph">
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.3/@domain.0/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
+ referredVariable="#qV..CopyGraph.Graph2Middle.middle.bottom.middleG2G"/>
+ </binding>
+ </ownedStatements>
</rule>
<rule xsi:type="qvti:Mapping" xmi:id="m..CopyGraph.Node2Middle" name="Node2Middle">
- <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false"
- typedModel="#qT..CopyGraph.upperGraph">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false" typedModel="#qT..CopyGraph.upperGraph">
<guardPattern>
- <variable xmi:id="qV..CopyGraph.Node2Middle.upperGraph.guard.n1" name="n1"
- type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"/>
+ <variable name="n1" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"/>
</guardPattern>
<bottomPattern/>
</domain>
- <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true"
- typedModel="#qT..CopyGraph.middle">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true" typedModel="#qT..CopyGraph.middle">
<guardPattern>
- <variable xmi:id="qV..CopyGraph.Node2Middle.middle.guard.middleParent"
- name="middleParent" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"/>
+ <variable name="middleParent" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"/>
</guardPattern>
<bottomPattern>
- <realizedVariable xmi:id="qV..CopyGraph.Node2Middle.middle.bottom.n2n"
- name="n2n" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"/>
+ <realizedVariable xmi:id="qV..CopyGraph.Node2Middle.middle.bottom.n2n" name="n2n" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"/>
</bottomPattern>
</domain>
<guardPattern/>
- <bottomPattern>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Element2Element.owner">
- <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
- referredVariable="#qV..CopyGraph.Node2Middle.middle.guard.middleParent"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
- referredVariable="#qV..CopyGraph.Node2Middle.middle.bottom.n2n"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Node2Node.node1">
- <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"
- referredVariable="#qV..CopyGraph.Node2Middle.upperGraph.guard.n1"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
- referredVariable="#qV..CopyGraph.Node2Middle.middle.bottom.n2n"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Node2Node.label">
- <value xsi:type="pivot:OperationCallExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.String.toLowerCase">
- <ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- referredProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Node.label">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"
- referredVariable="#qV..CopyGraph.Node2Middle.upperGraph.guard.n1"/>
- </ownedSource>
- </value>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
- referredVariable="#qV..CopyGraph.Node2Middle.middle.bottom.n2n"/>
- </assignment>
- </bottomPattern>
+ <bottomPattern/>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Element2Element.owner">
+ <slotExpression isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
+ referredVariable="#qV..CopyGraph.Node2Middle.middle.bottom.n2n"/>
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.1/@guardPattern/@variable.0"/>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Node2Node.node1">
+ <slotExpression isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
+ referredVariable="#qV..CopyGraph.Node2Middle.middle.bottom.n2n"/>
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.0/@guardPattern/@variable.0"/>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Node2Node.label">
+ <slotExpression isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
+ referredVariable="#qV..CopyGraph.Node2Middle.middle.bottom.n2n"/>
+ <value xsi:type="pivot:OperationCallExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.String.toLowerCase">
+ <ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
+ referredProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Node.label">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.0/@guardPattern/@variable.0"/>
+ </ownedSource>
+ </value>
+ </ownedStatements>
</rule>
<rule xsi:type="qvti:Mapping" xmi:id="m..CopyGraph.Middle2Graph" name="Middle2Graph">
- <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false"
- typedModel="#qT..CopyGraph.middle">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false" typedModel="#qT..CopyGraph.middle">
<guardPattern>
- <variable xmi:id="qV..CopyGraph.Middle2Graph.middle.guard.g2Gmiddle" name="g2Gmiddle"
- type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"/>
+ <variable name="g2Gmiddle" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"/>
</guardPattern>
<bottomPattern/>
</domain>
- <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true"
- typedModel="#qT..CopyGraph.lowerGraph">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true" typedModel="#qT..CopyGraph.lowerGraph">
<guardPattern/>
<bottomPattern>
- <realizedVariable xmi:id="qV..CopyGraph.Middle2Graph.lowerGraph.bottom.g2"
- name="g2" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"/>
+ <realizedVariable xmi:id="qV..CopyGraph.Middle2Graph.lowerGraph.bottom.g2" name="g2" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"/>
</bottomPattern>
</domain>
<guardPattern/>
- <bottomPattern>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.graph2">
- <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
- referredVariable="#qV..CopyGraph.Middle2Graph.lowerGraph.bottom.g2"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
- referredVariable="#qV..CopyGraph.Middle2Graph.middle.guard.g2Gmiddle"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Graph.name">
- <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- referredProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.name">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
- referredVariable="#qV..CopyGraph.Middle2Graph.middle.guard.g2Gmiddle"/>
- </value>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
- referredVariable="#qV..CopyGraph.Middle2Graph.lowerGraph.bottom.g2"/>
- </assignment>
- </bottomPattern>
- <ownedStatements xsi:type="qvti:MappingLoop">
- <ownedSource xsi:type="pivot:IteratorExp" type="#//@ownedPackages.1/@ownedClasses.1"
- referredIteration="http://www.eclipse.org/ocl/2015/Library.oclas#i.ocl.OrderedSet.select..T">
- <ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.1"
- referredProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.element2Element">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
- referredVariable="#qV..CopyGraph.Middle2Graph.middle.guard.g2Gmiddle"/>
- </ownedSource>
- <ownedBody xsi:type="pivot:OperationCallExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Boolean"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclIsTypeOf..ocl.OclType">
- <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element"
- referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@ownedStatements.0/@ownedSource/@ownedIterators.0"/>
- <ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
- referredType="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"/>
- </ownedBody>
- <ownedIterators name="e2e" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element"
- representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.OrderedSet.select..T"/>
+ <bottomPattern/>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.graph2">
+ <slotExpression isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.3/@domain.0/@guardPattern/@variable.0"/>
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
+ referredVariable="#qV..CopyGraph.Middle2Graph.lowerGraph.bottom.g2"/>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Graph.name">
+ <slotExpression isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph" referredVariable="#qV..CopyGraph.Middle2Graph.lowerGraph.bottom.g2"/>
+ <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
+ referredProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.name">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.3/@domain.0/@guardPattern/@variable.0"/>
+ </value>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:MappingLoop">
+ <ownedIterators xmi:id="i..CopyGraph.Middle2Graph.2.child" name="child" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element"/>
+ <ownedMappingStatements xsi:type="qvti:MappingCall" isInfinite="false" referredMapping="#m..CopyGraph.Middle2Node">
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@domain.0/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element"
+ referredVariable="#i..CopyGraph.Middle2Graph.2.child"/>
+ </binding>
+ </ownedMappingStatements>
+ <ownedSource xsi:type="pivot:IteratorExp" type="#//@ownedPackages.1/@ownedClasses.2" referredIteration="http://www.eclipse.org/ocl/2015/Library.oclas#i.ocl.OrderedSet.select..T">
+ <ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.2" referredProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.element2Element">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.3/@domain.0/@guardPattern/@variable.0"/>
</ownedSource>
- <ownedMappingStatements xsi:type="qvti:MappingCall" referredMapping="#m..CopyGraph.Middle2Node">
- <binding boundVariable="#qV..CopyGraph.Middle2Node.middle.guard.n2n">
- <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element"
- referredVariable="#i..CopyGraph.Middle2Graph.0.0.child"/>
- </binding>
- </ownedMappingStatements>
- <ownedIterators xmi:id="i..CopyGraph.Middle2Graph.0.0.child" name="child"
- type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element"/>
- </ownedStatements>
+ <ownedBody xsi:type="pivot:OperationCallExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Boolean"
+ referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.oclIsTypeOf..ocl.OclType">
+ <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.3/@ownedStatements.2/@ownedSource/@ownedIterators.0"/>
+ <ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Pivot.oclas#T.pivot.Class" referredType="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"/>
+ </ownedBody>
+ <ownedIterators name="e2e" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element"
+ representedParameter="http://www.eclipse.org/ocl/2015/Library.oclas#i0i.ocl.OrderedSet.select..T"/>
+ </ownedSource>
+ </ownedStatements>
</rule>
<rule xsi:type="qvti:Mapping" xmi:id="m..CopyGraph.Middle2Node" name="Middle2Node">
- <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false"
- typedModel="#qT..CopyGraph.middle">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false" typedModel="#qT..CopyGraph.middle">
<guardPattern>
- <variable xmi:id="qV..CopyGraph.Middle2Node.middle.guard.n2n" name="n2n"
- type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"/>
+ <variable name="n2n" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"/>
</guardPattern>
<bottomPattern/>
</domain>
- <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true"
- typedModel="#qT..CopyGraph.lowerGraph">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true" typedModel="#qT..CopyGraph.lowerGraph">
<guardPattern/>
<bottomPattern>
- <realizedVariable xmi:id="qV..CopyGraph.Middle2Node.lowerGraph.bottom.n2"
- name="n2" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"/>
+ <realizedVariable xmi:id="qV..CopyGraph.Middle2Node.lowerGraph.bottom.n2" name="n2" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"/>
</bottomPattern>
</domain>
<guardPattern/>
- <bottomPattern>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Node2Node.node2">
- <value xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"
- referredVariable="#qV..CopyGraph.Middle2Node.lowerGraph.bottom.n2"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
- referredVariable="#qV..CopyGraph.Middle2Node.middle.guard.n2n"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Element.graph">
- <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
- referredProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.graph2">
- <ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
- referredProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Element2Element.owner">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
- referredVariable="#qV..CopyGraph.Middle2Node.middle.guard.n2n"/>
- </ownedSource>
- </value>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"
- referredVariable="#qV..CopyGraph.Middle2Node.lowerGraph.bottom.n2"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Node.label">
- <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- referredProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Node2Node.label">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
- referredVariable="#qV..CopyGraph.Middle2Node.middle.guard.n2n"/>
- </value>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"
- referredVariable="#qV..CopyGraph.Middle2Node.lowerGraph.bottom.n2"/>
- </assignment>
- </bottomPattern>
+ <bottomPattern/>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Node2Node.node2">
+ <slotExpression isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@domain.0/@guardPattern/@variable.0"/>
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node"
+ referredVariable="#qV..CopyGraph.Middle2Node.lowerGraph.bottom.n2"/>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Element.graph">
+ <slotExpression isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node" referredVariable="#qV..CopyGraph.Middle2Node.lowerGraph.bottom.n2"/>
+ <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
+ referredProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Graph2Graph.graph2">
+ <ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Graph2Graph"
+ referredProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Element2Element.owner">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@domain.0/@guardPattern/@variable.0"/>
+ </ownedSource>
+ </value>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="../Graph2GraphMinimal/SimpleGraph.ecore.oclas#p.simplegraph.Node.label">
+ <slotExpression isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Node" referredVariable="#qV..CopyGraph.Middle2Node.lowerGraph.bottom.n2"/>
+ <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
+ referredProperty="../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#p.simplegraph2graph.Node2Node.label">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Node2Node"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@domain.0/@guardPattern/@variable.0"/>
+ </value>
+ </ownedStatements>
</rule>
+ <ownedContext xmi:id="qV..CopyGraph.this" name="this" type="#T..CopyGraph"/>
</ownedClasses>
</ownedPackages>
- <ownedPackages xmi:id="P.$$" name="$$" URI="http://www.eclipse.org/ocl/2015/Orphanage"
- nsPrefix="orphanage">
- <ownedClasses xsi:type="pivot:OrderedSetType" name="OrderedSet" superClasses="#//@ownedPackages.1/@ownedClasses.2 #//@ownedPackages.1/@ownedClasses.3"
- elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element">
+ <ownedPackages xmi:id="P.$$" name="$$" URI="http://www.eclipse.org/ocl/2015/Orphanage" nsPrefix="orphanage">
+ <ownedClasses xsi:type="pivot:SetType" name="Set" superClasses="#//@ownedPackages.1/@ownedClasses.3" elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph"
+ isNullFree="true">
<ownedBindings>
- <ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element"
- formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..OrderedSetT"/>
+ <ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SetT"/>
</ownedBindings>
</ownedClasses>
<ownedClasses xsi:type="pivot:OrderedSetType" name="OrderedSet" superClasses="#//@ownedPackages.1/@ownedClasses.4 #//@ownedPackages.1/@ownedClasses.5"
- elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element">
+ elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element" isNullFree="true">
+ <ownedBindings>
+ <ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..OrderedSetT"/>
+ </ownedBindings>
+ </ownedClasses>
+ <ownedClasses xsi:type="pivot:OrderedSetType" name="OrderedSet" superClasses="#//@ownedPackages.1/@ownedClasses.6 #//@ownedPackages.1/@ownedClasses.7"
+ elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element" isNullFree="true">
<ownedBindings>
<ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element"
formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..OrderedSetT"/>
</ownedBindings>
</ownedClasses>
- <ownedClasses xsi:type="pivot:CollectionType" name="OrderedCollection" superClasses="#//@ownedPackages.1/@ownedClasses.6"
- elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element">
+ <ownedClasses xsi:type="pivot:CollectionType" name="UniqueCollection" superClasses="#//@ownedPackages.1/@ownedClasses.8" elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph">
<ownedBindings>
- <ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element"
- formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..OrderedCollectionT"/>
+ <ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..UniqueCollectionT"/>
</ownedBindings>
</ownedClasses>
- <ownedClasses xsi:type="pivot:CollectionType" name="UniqueCollection" superClasses="#//@ownedPackages.1/@ownedClasses.6"
- elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element">
+ <ownedClasses xsi:type="pivot:CollectionType" name="OrderedCollection" superClasses="#//@ownedPackages.1/@ownedClasses.9" elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element">
<ownedBindings>
- <ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element"
- formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..UniqueCollectionT"/>
+ <ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..OrderedCollectionT"/>
</ownedBindings>
</ownedClasses>
- <ownedClasses xsi:type="pivot:CollectionType" name="OrderedCollection" superClasses="#//@ownedPackages.1/@ownedClasses.7"
- elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element">
+ <ownedClasses xsi:type="pivot:CollectionType" name="UniqueCollection" superClasses="#//@ownedPackages.1/@ownedClasses.9" elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element">
+ <ownedBindings>
+ <ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..UniqueCollectionT"/>
+ </ownedBindings>
+ </ownedClasses>
+ <ownedClasses xsi:type="pivot:CollectionType" name="OrderedCollection" superClasses="#//@ownedPackages.1/@ownedClasses.10" elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element">
<ownedBindings>
<ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element"
formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..OrderedCollectionT"/>
</ownedBindings>
</ownedClasses>
- <ownedClasses xsi:type="pivot:CollectionType" name="UniqueCollection" superClasses="#//@ownedPackages.1/@ownedClasses.7"
- elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element">
+ <ownedClasses xsi:type="pivot:CollectionType" name="UniqueCollection" superClasses="#//@ownedPackages.1/@ownedClasses.10" elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element">
<ownedBindings>
<ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#T.simplegraph2graph.Element2Element"
formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..UniqueCollectionT"/>
</ownedBindings>
</ownedClasses>
<ownedClasses xsi:type="pivot:CollectionType" name="Collection" superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclAny"
+ elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph">
+ <ownedBindings>
+ <ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Graph" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..CollectionT"/>
+ </ownedBindings>
+ </ownedClasses>
+ <ownedClasses xsi:type="pivot:CollectionType" name="Collection" superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclAny"
elementType="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element">
<ownedBindings>
- <ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element"
- formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..CollectionT"/>
+ <ownedSubstitutions actual="pivot:Class ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#T.simplegraph.Element" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..CollectionT"/>
</ownedBindings>
</ownedClasses>
<ownedClasses xsi:type="pivot:CollectionType" name="Collection" superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclAny"
@@ -306,6 +301,4 @@
</ownedBindings>
</ownedClasses>
</ownedPackages>
- <ownedImports name="SimpleGraph" importedNamespace="pivot:Package ../Graph2GraphMinimal/SimpleGraph.ecore.oclas#P.simplegraph"/>
- <ownedImports name="SimpleGraph2Graph" importedNamespace="pivot:Package ../Graph2GraphMinimal/SimpleGraph2Graph.ecore.oclas#P.simplegraph2graph"/>
</qvti:ImperativeModel>
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphMinimal/Graph2GraphMinimal.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphMinimal/Graph2GraphMinimal.qvti
index 773a1e6c7..a14bd2933 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphMinimal/Graph2GraphMinimal.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Graph2GraphMinimal/Graph2GraphMinimal.qvti
@@ -12,10 +12,8 @@ map graph2graphLM in CopyGraphMinimal {
enforce middle() {
realize g2g:Graph2Graph
}
- where () {
- g2g.graph1 := g1;
- g2g.name := g1.name;
- }
+ set g2g.graph1 := g1;
+ set g2g.name := g1.name;
call graph2graphMR {
g2gout := g2g;
}
@@ -26,15 +24,11 @@ map graph2graphMR in CopyGraphMinimal {
enforce lowerGraph() {
realize g2:Graph
}
- where () { -- M to R for G
- g2gout.graph2 := g2;
- g2.name := g2gout.name;
- }
+ set g2gout.graph2 := g2;
+ set g2.name := g2gout.name;
}
map __root__ in CopyGraphMinimal {
-
- where () {}
for g1 : SimpleGraph::Graph in SimpleGraph::Graph.allInstances() {
call graph2graphLM {
g1 := g1;
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/HSV2HLS/HSV2HLS.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/HSV2HLS/HSV2HLS.qvti
index d693430c5..50d9eb7b2 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/HSV2HLS/HSV2HLS.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/HSV2HLS/HSV2HLS.qvti
@@ -34,18 +34,17 @@ map HSV2MiddleRoot in hsv2hls { -- Mapping root nodes L to M
}
where(
hsvRoot.parent = null;
- ) {
- middleRoot.hsv := hsvRoot;
- middleRoot.name := hsvRoot.name;
- --middleRoot.rgb := hsv2rgb(hsvRoot.hsv);
- }
+ ) {}
+ set middleRoot.hsv := hsvRoot;
+ set middleRoot.name := hsvRoot.name;
+ -- set middleRoot.rgb := hsv2rgb(hsvRoot.hsv);
for hsvChild in hsvRoot.children { -- recursive call to visit children
call HSV2MiddleRecursion {
hsvNode := hsvChild;
middleParent := middleRoot;
}
}
- call Middle2HLSRoot { -- invoke middle to output mapping
+ call Middle2HLSRoot { -- invoke middle to outset mapping
middleNode := middleRoot;
}
}
@@ -55,12 +54,11 @@ map HSV2MiddleRecursion in hsv2hls { -- Mapping child nodes L to M
enforce middle(middleParent : HSVNode2HLSNode) {
realize middleNode : HSVNode2HLSNode
}
- where() {
- middleNode.parent := middleParent;
- middleNode.hsv := hsvNode;
- middleNode.name := hsvNode.name;
- --middleNode.rgb := hsv2rgb(hsvNode.hsv);
- }
+ where() {}
+ set middleNode.parent := middleParent;
+ set middleNode.hsv := hsvNode;
+ set middleNode.name := hsvNode.name;
+ -- set middleNode.rgb := hsv2rgb(hsvNode.hsv);
for hsvChild in hsvNode.children { -- recursive call to visit children
call HSV2MiddleRecursion {
hsvNode := hsvChild;
@@ -74,12 +72,11 @@ map Middle2HLSRoot in hsv2hls { -- Mapping root nodes M to R
enforce hls() {
realize hlsNode : HLSNode
}
- where() {
- hlsNode.parent := null;
- middleNode.hls := hlsNode;
- hlsNode.name := middleNode.name;
- --hlsNode.hls := rgb2hls(middleNode.rgb);
- }
+ where() {}
+ set hlsNode.parent := null;
+ set middleNode.hls := hlsNode;
+ set hlsNode.name := middleNode.name;
+ -- set hlsNode.hls := rgb2hls(middleNode.rgb);
for middleChild in middleNode.children { -- recursive call to visit children
call Middle2HLSRecursion {
middleNode := middleChild;
@@ -92,12 +89,11 @@ map Middle2HLSRecursion in hsv2hls { -- Mapping child nodes M to R
enforce hls() {
realize hlsNode : HLSNode
}
- where() {
- hlsNode.parent := middleNode.parent.hls;
- middleNode.hls := hlsNode;
- hlsNode.name := middleNode.name;
- --hlsNode.hls := rgb2hls(middleNode.rgb);
- }
+ where() {}
+ set hlsNode.parent := middleNode.parent.hls;
+ set middleNode.hls := hlsNode;
+ set hlsNode.name := middleNode.name;
+ -- set hlsNode.hls := rgb2hls(middleNode.rgb);
for middleChild in middleNode.children { -- recursive call to visit children
call Middle2HLSRecursion {
middleNode := middleChild;
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/HSV2HLS/HSV2HLSas.qvtias b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/HSV2HLS/HSV2HLSas.qvtias
index f5c53fb2d..4b74411af 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/HSV2HLS/HSV2HLSas.qvtias
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/HSV2HLS/HSV2HLSas.qvtias
@@ -1,27 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<qvti:ImperativeModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pivot="http://www.eclipse.org/ocl/2015/Pivot"
- xmlns:qvtb="http://www.eclipse.org/qvt/2015/QVTbase" xmlns:qvti="http://www.eclipse.org/qvt/2015/QVTimperative"
- xsi:schemaLocation="http://www.eclipse.org/ocl/2015/Pivot java://org.eclipse.ocl.pivot.PivotPackage http://www.eclipse.org/qvt/2015/QVTbase java://org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage http://www.eclipse.org/qvt/2015/QVTimperative java://org.eclipse.qvtd.pivot.qvtimperative.QVTimperativePackage"
- name="HSV2HLS.qvtp.qvti" externalURI="platform:/resource/org.eclipse.qvtd.build.etl.tests/src/org/eclipse/qvtd/build/etl/tests/HSV2HLS/HSV2HLS.qvtp.qvti">
+ xmlns:qvtb="http://www.eclipse.org/qvt/2015/QVTbase" xmlns:qvti="http://www.eclipse.org/qvt/2015/QVTimperative" xsi:schemaLocation="http://www.eclipse.org/ocl/2015/Pivot java://org.eclipse.ocl.pivot.PivotPackage http://www.eclipse.org/qvt/2015/QVTbase java://org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage http://www.eclipse.org/qvt/2015/QVTimperative java://org.eclipse.qvtd.pivot.qvtimperative.QVTimperativePackage"
+ name="HSV2HLS.qvti" externalURI="file:/E:/GIT/org.eclipse.qvtd/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/bin/org/eclipse/qvtd/xtext/qvtimperative/tests/HSV2HLS/HSV2HLS.qvti">
<ownedImports importedNamespace="pivot:Package HSVTree.ecore.oclas#P.HSVTree"/>
<ownedImports importedNamespace="pivot:Package HLSTree.ecore.oclas#P.HLSTree"/>
- <ownedImports importedNamespace="pivot:Package HSV2HLS.ecore.oclas#P.HSV2HLS"/>
+ <ownedImports name="hsv2hls_0" importedNamespace="pivot:Package HSV2HLS.ecore.oclas#P.HSV2HLS"/>
<ownedPackages xmi:id="P." name="">
- <ownedClasses xsi:type="qvtb:Transformation" xmi:id="T..hsv2hls" name="hsv2hls">
- <modelParameter xmi:id="qT..hsv2hls.hsv" name="hsv" usedPackage="HSVTree.ecore.oclas#P.HSVTree"/>
- <modelParameter xmi:id="qT..hsv2hls.hls" name="hls" usedPackage="HLSTree.ecore.oclas#P.HLSTree"/>
- <modelParameter xmi:id="qT..hsv2hls.middle" name="middle" usedPackage="HSV2HLS.ecore.oclas#P.HSV2HLS"/>
- <rule xsi:type="qvti:Mapping" xmi:id="m..hsv2hls.HSV2HLSRoot_LM" name="HSV2HLSRoot_LM">
- <domain xsi:type="qvti:ImperativeDomain" name="hsv" isCheckable="true" isEnforceable="false" typedModel="#qT..hsv2hls.hsv">
+ <ownedClasses xsi:type="qvtb:Transformation" xmi:id="T..hsv2hls" name="hsv2hls" superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclElement">
+ <ownedOperations xsi:type="qvtb:Function" xmi:id="o..hsv2hls.hls2rgb..HLSTree.HLS" name="hls2rgb" isRequired="false" type="pivot:DataType HSV2HLS.ecore.oclas#T.HSV2HLS.RGB">
+ <ownedParameters xsi:type="qvtb:FunctionParameter" xmi:id="p0o..hsv2hls.hls2rgb..HLSTree.HLS" name="color" isRequired="false"
+ type="pivot:DataType HLSTree.ecore.oclas#T.HLSTree.HLS"/>
+ </ownedOperations>
+ <ownedOperations xsi:type="qvtb:Function" xmi:id="o..hsv2hls.hsv2rgb..HSVTree.HSV" name="hsv2rgb" isRequired="false" type="pivot:DataType HSV2HLS.ecore.oclas#T.HSV2HLS.RGB">
+ <ownedParameters xsi:type="qvtb:FunctionParameter" xmi:id="p0o..hsv2hls.hsv2rgb..HSVTree.HSV" name="color" isRequired="false"
+ type="pivot:DataType HSVTree.ecore.oclas#T.HSVTree.HSV"/>
+ </ownedOperations>
+ <ownedOperations xsi:type="qvtb:Function" xmi:id="o..hsv2hls.rgb2hls..HSV2HLS.RGB" name="rgb2hls" isRequired="false" type="pivot:DataType HLSTree.ecore.oclas#T.HLSTree.HLS">
+ <ownedParameters xsi:type="qvtb:FunctionParameter" xmi:id="p0o..hsv2hls.rgb2hls..HSV2HLS.RGB" name="color" isRequired="false"
+ type="pivot:DataType HSV2HLS.ecore.oclas#T.HSV2HLS.RGB"/>
+ </ownedOperations>
+ <ownedOperations xsi:type="qvtb:Function" xmi:id="o..hsv2hls.rgb2hsv..HSV2HLS.RGB" name="rgb2hsv" isRequired="false" type="pivot:DataType HSVTree.ecore.oclas#T.HSVTree.HSV">
+ <ownedParameters xsi:type="qvtb:FunctionParameter" xmi:id="p0o..hsv2hls.rgb2hsv..HSV2HLS.RGB" name="color" isRequired="false"
+ type="pivot:DataType HSV2HLS.ecore.oclas#T.HSV2HLS.RGB"/>
+ </ownedOperations>
+ <modelParameter xmi:id="qT..hsv2hls.hsv" name="hsv" usedPackage="HSVTree.ecore.oclas#P.HSVTree">
+ <ownedContext xmi:id="qV..hsv2hls.hsv.hsv" name="hsv" type="pivot:Class http://www.eclipse.org/qvt/2015/QVTimperativeLibrary.oclas#T.qvtbaselibrary.Model"/>
+ </modelParameter>
+ <modelParameter xmi:id="qT..hsv2hls.hls" name="hls" usedPackage="HLSTree.ecore.oclas#P.HLSTree">
+ <ownedContext xmi:id="qV..hsv2hls.hls.hls" name="hls" type="pivot:Class http://www.eclipse.org/qvt/2015/QVTimperativeLibrary.oclas#T.qvtbaselibrary.Model"/>
+ </modelParameter>
+ <modelParameter xmi:id="qT..hsv2hls.middle" name="middle" usedPackage="HSV2HLS.ecore.oclas#P.HSV2HLS">
+ <ownedContext xmi:id="qV..hsv2hls.middle.middle" name="middle" type="pivot:Class http://www.eclipse.org/qvt/2015/QVTimperativeLibrary.oclas#T.qvtbaselibrary.Model"/>
+ </modelParameter>
+ <rule xsi:type="qvti:Mapping" xmi:id="m..hsv2hls.__root__" name="__root__">
+ <guardPattern/>
+ <bottomPattern/>
+ <ownedStatements xsi:type="qvti:MappingLoop">
+ <ownedIterators xmi:id="i..hsv2hls.__root__.0.hsvRoot" name="hsvRoot" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"/>
+ <ownedMappingStatements xsi:type="qvti:MappingCall" isInfinite="false" referredMapping="#m..hsv2hls.HSV2MiddleRoot">
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.1/@domain.0/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#i..hsv2hls.__root__.0.hsvRoot"/>
+ </binding>
+ </ownedMappingStatements>
+ <ownedSource xsi:type="pivot:OperationCallExp" type="#//@ownedPackages.1/@ownedClasses.0" referredOperation="http://www.eclipse.org/qvt/2015/QVTimperativeLibrary.oclas#o.qvtbaselibrary.Model.objectsOfKind..TT">
+ <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class http://www.eclipse.org/qvt/2015/QVTimperativeLibrary.oclas#T.qvtbaselibrary.Model"
+ referredVariable="#qV..hsv2hls.hsv.hsv"/>
+ <ownedArguments xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Pivot.oclas#T.pivot.Class" referredType="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"/>
+ </ownedSource>
+ </ownedStatements>
+ </rule>
+ <rule xsi:type="qvti:Mapping" xmi:id="m..hsv2hls.HSV2MiddleRoot" name="HSV2MiddleRoot">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false" typedModel="#qT..hsv2hls.hsv">
<guardPattern>
- <variable xmi:id="qV..hsv2hls.HSV2HLSRoot_LM.hsv.guard.hsvRoot" name="hsvRoot" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"/>
+ <variable name="hsvRoot" isRequired="false" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"/>
</guardPattern>
<bottomPattern/>
</domain>
- <domain xsi:type="qvti:ImperativeDomain" name="middle" isCheckable="false" isEnforceable="true" typedModel="#qT..hsv2hls.middle">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true" typedModel="#qT..hsv2hls.middle">
<guardPattern/>
<bottomPattern>
- <realizedVariable xmi:id="qV..hsv2hls.HSV2HLSRoot_LM.middle.bottom.middleRoot" name="middleRoot" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
+ <realizedVariable xmi:id="qV..hsv2hls.HSV2MiddleRoot.middle.bottom.middleRoot" name="middleRoot" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
</bottomPattern>
</domain>
<guardPattern>
@@ -30,256 +68,240 @@
referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.%61%..ocl.OclSelf">
<ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"
referredProperty="HSVTree.ecore.oclas#p.HSVTree.HSVNode.parent">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_LM.hsv.guard.hsvRoot"/>
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.1/@domain.0/@guardPattern/@variable.0"/>
</ownedSource>
<ownedArguments xsi:type="pivot:NullLiteralExp" isRequired="false" type="pivot:VoidType http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclVoid"/>
</conditionExpression>
</predicate>
</guardPattern>
- <bottomPattern>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.hsv">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_LM.hsv.guard.hsvRoot"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_LM.middle.bottom.middleRoot"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.name">
- <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- referredProperty="HSVTree.ecore.oclas#p.HSVTree.HSVNode.name">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_LM.hsv.guard.hsvRoot"/>
- </value>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_LM.middle.bottom.middleRoot"/>
- </assignment>
- </bottomPattern>
- <ownedStatements xsi:type="qvti:MappingCall" referredMapping="#m..hsv2hls.HSV2HLSRecursion_LM">
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvNode">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_LM.hsv.guard.hsvRoot"/>
- </binding>
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.middle.guard.middleParent">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_LM.middle.bottom.middleRoot"/>
- </binding>
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvParent">
- <value xsi:type="pivot:PropertyCallExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredProperty="HSVTree.ecore.oclas#p.HSVTree.HSVNode.parent">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_LM.hsv.guard.hsvRoot"/>
- </value>
+ <bottomPattern/>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.hsv">
+ <slotExpression isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2MiddleRoot.middle.bottom.middleRoot"/>
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.1/@domain.0/@guardPattern/@variable.0"/>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.name">
+ <slotExpression isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2MiddleRoot.middle.bottom.middleRoot"/>
+ <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
+ referredProperty="HSVTree.ecore.oclas#p.HSVTree.HSVNode.name">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.1/@domain.0/@guardPattern/@variable.0"/>
+ </value>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:MappingLoop">
+ <ownedIterators xmi:id="i..hsv2hls.HSV2MiddleRoot.2.hsvChild" name="hsvChild" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"/>
+ <ownedMappingStatements xsi:type="qvti:MappingCall" isInfinite="false" referredMapping="#m..hsv2hls.HSV2MiddleRecursion">
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.0/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#i..hsv2hls.HSV2MiddleRoot.2.hsvChild"/>
</binding>
- </ownedStatements>
- <ownedStatements xsi:type="qvti:MappingCall" referredMapping="#m..hsv2hls.HSV2HLSRoot_MR">
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRoot_MR.middle.guard.middleRoot">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_LM.middle.bottom.middleRoot"/>
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.1/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"
+ referredVariable="#qV..hsv2hls.HSV2MiddleRoot.middle.bottom.middleRoot"/>
</binding>
- </ownedStatements>
- </rule>
- <rule xsi:type="qvti:Mapping" xmi:id="m..hsv2hls.HSV2HLSRoot_MR" name="HSV2HLSRoot_MR">
- <domain xsi:type="qvti:ImperativeDomain" name="hls" isCheckable="false" isEnforceable="true" typedModel="#qT..hsv2hls.hls">
- <guardPattern/>
- <bottomPattern>
- <realizedVariable xmi:id="qV..hsv2hls.HSV2HLSRoot_MR.hls.bottom.hlsRoot" name="hlsRoot" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode"/>
- </bottomPattern>
- </domain>
- <domain xsi:type="qvti:ImperativeDomain" name="middle" isCheckable="true" isEnforceable="false" typedModel="#qT..hsv2hls.middle">
- <guardPattern>
- <variable xmi:id="qV..hsv2hls.HSV2HLSRoot_MR.middle.guard.middleRoot" name="middleRoot" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
- </guardPattern>
- <bottomPattern/>
- </domain>
- <guardPattern/>
- <bottomPattern>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="HLSTree.ecore.oclas#p.HLSTree.HLSNode.name">
- <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.name">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_MR.middle.guard.middleRoot"/>
- </value>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_MR.hls.bottom.hlsRoot"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.hls">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_MR.hls.bottom.hlsRoot"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_MR.middle.guard.middleRoot"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="HLSTree.ecore.oclas#p.HLSTree.HLSNode.parent">
- <value xsi:type="pivot:NullLiteralExp" isRequired="false" type="pivot:VoidType http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclVoid"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_MR.hls.bottom.hlsRoot"/>
- </assignment>
- </bottomPattern>
- <ownedStatements xsi:type="qvti:MappingCall" referredMapping="#m..hsv2hls.HSV2HLSRecursion_MR">
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleNode">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_MR.middle.guard.middleRoot"/>
- </binding>
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.hls.guard.hlsParent">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_MR.hls.bottom.hlsRoot"/>
- </binding>
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleParent">
- <value xsi:type="pivot:PropertyCallExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.parent">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRoot_MR.middle.guard.middleRoot"/>
- </value>
+ </ownedMappingStatements>
+ <ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.1" referredProperty="HSVTree.ecore.oclas#p.HSVTree.HSVNode.children">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.1/@domain.0/@guardPattern/@variable.0"/>
+ </ownedSource>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:MappingCall" isInfinite="false" referredMapping="#m..hsv2hls.Middle2HLSRoot">
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.3/@domain.0/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2MiddleRoot.middle.bottom.middleRoot"/>
</binding>
</ownedStatements>
</rule>
- <rule xsi:type="qvti:Mapping" xmi:id="m..hsv2hls.HSV2HLSRecursion_LM" name="HSV2HLSRecursion_LM">
- <domain xsi:type="qvti:ImperativeDomain" name="hsv" isCheckable="true" isEnforceable="false" typedModel="#qT..hsv2hls.hsv">
+ <rule xsi:type="qvti:Mapping" xmi:id="m..hsv2hls.HSV2MiddleRecursion" name="HSV2MiddleRecursion">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false" typedModel="#qT..hsv2hls.hsv">
<guardPattern>
- <variable xmi:id="qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvParent" name="hsvParent" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"/>
- <variable xmi:id="qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvNode" name="hsvNode" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"/>
+ <variable name="hsvNode" isRequired="false" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"/>
</guardPattern>
<bottomPattern/>
</domain>
- <domain xsi:type="qvti:ImperativeDomain" name="middle" isCheckable="false" isEnforceable="true" typedModel="#qT..hsv2hls.middle">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true" typedModel="#qT..hsv2hls.middle">
<guardPattern>
- <variable xmi:id="qV..hsv2hls.HSV2HLSRecursion_LM.middle.guard.middleParent" name="middleParent" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
+ <variable name="middleParent" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
</guardPattern>
<bottomPattern>
- <realizedVariable xmi:id="qV..hsv2hls.HSV2HLSRecursion_LM.middle.bottom.middleNode" name="middleNode" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
+ <realizedVariable xmi:id="qV..hsv2hls.HSV2MiddleRecursion.middle.bottom.middleNode" name="middleNode" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
</bottomPattern>
</domain>
- <guardPattern>
- <predicate>
- <conditionExpression xsi:type="pivot:OperationCallExp" name="=" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Boolean"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.%61%..ocl.OclSelf">
- <ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.hsv">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.middle.guard.middleParent"/>
- </ownedSource>
- <ownedArguments xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvParent"/>
- </conditionExpression>
- </predicate>
- <predicate>
- <conditionExpression xsi:type="pivot:OperationCallExp" name="=" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Boolean"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.%61%..ocl.OclSelf">
- <ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredProperty="HSVTree.ecore.oclas#p.HSVTree.HSVNode.parent">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvNode"/>
- </ownedSource>
- <ownedArguments xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvParent"/>
- </conditionExpression>
- </predicate>
- </guardPattern>
- <bottomPattern>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.hsv">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvNode"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.middle.bottom.middleNode"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.name">
- <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- referredProperty="HSVTree.ecore.oclas#p.HSVTree.HSVNode.name">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvNode"/>
- </value>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.middle.bottom.middleNode"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.parent">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.middle.guard.middleParent"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.middle.bottom.middleNode"/>
- </assignment>
- </bottomPattern>
- <ownedStatements xsi:type="qvti:MappingCall" referredMapping="#m..hsv2hls.HSV2HLSRecursion_LM">
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvNode">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvNode"/>
- </binding>
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.middle.guard.middleParent">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.middle.guard.middleParent"/>
- </binding>
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvParent">
- <value xsi:type="pivot:PropertyCallExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredProperty="HSVTree.ecore.oclas#p.HSVTree.HSVNode.parent">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_LM.hsv.guard.hsvNode"/>
- </value>
- </binding>
+ <guardPattern/>
+ <bottomPattern/>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.parent">
+ <slotExpression isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2MiddleRecursion.middle.bottom.middleNode"/>
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.1/@guardPattern/@variable.0"/>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.hsv">
+ <slotExpression isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2MiddleRecursion.middle.bottom.middleNode"/>
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.0/@guardPattern/@variable.0"/>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.name">
+ <slotExpression isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2MiddleRecursion.middle.bottom.middleNode"/>
+ <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
+ referredProperty="HSVTree.ecore.oclas#p.HSVTree.HSVNode.name">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.0/@guardPattern/@variable.0"/>
+ </value>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:MappingLoop">
+ <ownedIterators xmi:id="i..hsv2hls.HSV2MiddleRecursion.3.hsvChild" name="hsvChild" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"/>
+ <ownedMappingStatements xsi:type="qvti:MappingCall" isInfinite="false" referredMapping="#m..hsv2hls.HSV2MiddleRecursion">
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.0/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#i..hsv2hls.HSV2MiddleRecursion.3.hsvChild"/>
+ </binding>
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.1/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"
+ referredVariable="#qV..hsv2hls.HSV2MiddleRecursion.middle.bottom.middleNode"/>
+ </binding>
+ </ownedMappingStatements>
+ <ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.1" referredProperty="HSVTree.ecore.oclas#p.HSVTree.HSVNode.children">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.2/@domain.0/@guardPattern/@variable.0"/>
+ </ownedSource>
</ownedStatements>
</rule>
- <rule xsi:type="qvti:Mapping" xmi:id="m..hsv2hls.HSV2HLSRecursion_MR" name="HSV2HLSRecursion_MR">
- <domain xsi:type="qvti:ImperativeDomain" name="hls" isCheckable="false" isEnforceable="true" typedModel="#qT..hsv2hls.hls">
+ <rule xsi:type="qvti:Mapping" xmi:id="m..hsv2hls.Middle2HLSRoot" name="Middle2HLSRoot">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false" typedModel="#qT..hsv2hls.middle">
<guardPattern>
- <variable xmi:id="qV..hsv2hls.HSV2HLSRecursion_MR.hls.guard.hlsParent" name="hlsParent" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode"/>
+ <variable name="middleNode" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
</guardPattern>
+ <bottomPattern/>
+ </domain>
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true" typedModel="#qT..hsv2hls.hls">
+ <guardPattern/>
<bottomPattern>
- <realizedVariable xmi:id="qV..hsv2hls.HSV2HLSRecursion_MR.hls.bottom.hlsNode" name="hlsNode" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode"/>
+ <realizedVariable xmi:id="qV..hsv2hls.Middle2HLSRoot.hls.bottom.hlsNode" name="hlsNode" isRequired="false" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode"/>
</bottomPattern>
</domain>
- <domain xsi:type="qvti:ImperativeDomain" name="middle" isCheckable="true" isEnforceable="false" typedModel="#qT..hsv2hls.middle">
+ <guardPattern/>
+ <bottomPattern/>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="HLSTree.ecore.oclas#p.HLSTree.HLSNode.parent">
+ <slotExpression isRequired="false" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.Middle2HLSRoot.hls.bottom.hlsNode"/>
+ <value xsi:type="pivot:NullLiteralExp" isRequired="false" type="pivot:VoidType http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclVoid"/>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.hls">
+ <slotExpression isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.3/@domain.0/@guardPattern/@variable.0"/>
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.Middle2HLSRoot.hls.bottom.hlsNode"/>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="HLSTree.ecore.oclas#p.HLSTree.HLSNode.name">
+ <slotExpression isRequired="false" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.Middle2HLSRoot.hls.bottom.hlsNode"/>
+ <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
+ referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.name">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.3/@domain.0/@guardPattern/@variable.0"/>
+ </value>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:MappingLoop">
+ <ownedIterators xmi:id="i..hsv2hls.Middle2HLSRoot.3.middleChild" name="middleChild" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
+ <ownedMappingStatements xsi:type="qvti:MappingCall" isInfinite="false" referredMapping="#m..hsv2hls.Middle2HLSRecursion">
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@domain.0/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#i..hsv2hls.Middle2HLSRoot.3.middleChild"/>
+ </binding>
+ </ownedMappingStatements>
+ <ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.2" referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.children">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.3/@domain.0/@guardPattern/@variable.0"/>
+ </ownedSource>
+ </ownedStatements>
+ </rule>
+ <rule xsi:type="qvti:Mapping" xmi:id="m..hsv2hls.Middle2HLSRecursion" name="Middle2HLSRecursion">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false" typedModel="#qT..hsv2hls.middle">
<guardPattern>
- <variable xmi:id="qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleParent" name="middleParent" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
- <variable xmi:id="qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleNode" name="middleNode" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
+ <variable name="middleNode" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
</guardPattern>
<bottomPattern/>
</domain>
- <guardPattern>
- <predicate>
- <conditionExpression xsi:type="pivot:OperationCallExp" name="=" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Boolean"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.%61%..ocl.OclSelf">
- <ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.hls">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleParent"/>
- </ownedSource>
- <ownedArguments xsi:type="pivot:VariableExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.hls.guard.hlsParent"/>
- </conditionExpression>
- </predicate>
- <predicate>
- <conditionExpression xsi:type="pivot:OperationCallExp" name="=" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Boolean"
- referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclAny.%61%..ocl.OclSelf">
- <ownedSource xsi:type="pivot:PropertyCallExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.parent">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleNode"/>
- </ownedSource>
- <ownedArguments xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleParent"/>
- </conditionExpression>
- </predicate>
- </guardPattern>
- <bottomPattern>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.hls">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.hls.bottom.hlsNode"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleNode"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="HLSTree.ecore.oclas#p.HLSTree.HLSNode.name">
- <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
- referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.name">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleNode"/>
- </value>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.hls.bottom.hlsNode"/>
- </assignment>
- <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="HLSTree.ecore.oclas#p.HLSTree.HLSNode.parent">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.hls.guard.hlsParent"/>
- <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.hls.bottom.hlsNode"/>
- </assignment>
- </bottomPattern>
- <ownedStatements xsi:type="qvti:MappingCall" referredMapping="#m..hsv2hls.HSV2HLSRecursion_MR">
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleNode">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleParent"/>
- </binding>
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.hls.guard.hlsParent">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.hls.bottom.hlsNode"/>
- </binding>
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleParent">
- <value xsi:type="pivot:PropertyCallExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.parent">
- <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#qV..hsv2hls.HSV2HLSRecursion_MR.middle.guard.middleParent"/>
- </value>
- </binding>
- </ownedStatements>
- </rule>
- <rule xsi:type="qvti:Mapping" xmi:id="m..hsv2hls.__root__" name="__root__">
+ <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true" typedModel="#qT..hsv2hls.hls">
+ <guardPattern/>
+ <bottomPattern>
+ <realizedVariable xmi:id="qV..hsv2hls.Middle2HLSRecursion.hls.bottom.hlsNode" name="hlsNode" isRequired="false" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode"/>
+ </bottomPattern>
+ </domain>
<guardPattern/>
- <bottomPattern xsi:type="qvti:BottomPattern"/>
+ <bottomPattern/>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="HLSTree.ecore.oclas#p.HLSTree.HLSNode.parent">
+ <slotExpression isRequired="false" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.Middle2HLSRecursion.hls.bottom.hlsNode"/>
+ <value xsi:type="pivot:PropertyCallExp" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.hls">
+ <ownedSource xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"
+ referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.parent">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@domain.0/@guardPattern/@variable.0"/>
+ </ownedSource>
+ </value>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.hls">
+ <slotExpression isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@domain.0/@guardPattern/@variable.0"/>
+ <value xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.Middle2HLSRecursion.hls.bottom.hlsNode"/>
+ </ownedStatements>
+ <ownedStatements xsi:type="qvti:SetStatement" targetProperty="HLSTree.ecore.oclas#p.HLSTree.HLSNode.name">
+ <slotExpression isRequired="false" type="pivot:Class HLSTree.ecore.oclas#T.HLSTree.HLSNode" referredVariable="#qV..hsv2hls.Middle2HLSRecursion.hls.bottom.hlsNode"/>
+ <value xsi:type="pivot:PropertyCallExp" isRequired="false" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
+ referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.name">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@domain.0/@guardPattern/@variable.0"/>
+ </value>
+ </ownedStatements>
<ownedStatements xsi:type="qvti:MappingLoop">
- <ownedSource xsi:type="pivot:OperationCallExp" type="#//@ownedPackages.1/@ownedClasses.0" referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclElement.allInstances">
- <ownedSource xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class" referredType="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"/>
+ <ownedIterators xmi:id="i..hsv2hls.Middle2HLSRecursion.3.middleChild" name="middleChild" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"/>
+ <ownedMappingStatements xsi:type="qvti:MappingCall" isInfinite="false" referredMapping="#m..hsv2hls.Middle2HLSRecursion">
+ <binding boundVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@domain.0/@guardPattern/@variable.0" isPolled="false">
+ <value xsi:type="pivot:VariableExp" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" referredVariable="#i..hsv2hls.Middle2HLSRecursion.3.middleChild"/>
+ </binding>
+ </ownedMappingStatements>
+ <ownedSource xsi:type="pivot:PropertyCallExp" type="#//@ownedPackages.1/@ownedClasses.2" referredProperty="HSV2HLS.ecore.oclas#p.HSV2HLS.HSVNode2HLSNode.children">
+ <ownedSource xsi:type="pivot:VariableExp" isRequired="false" type="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode"
+ referredVariable="#//@ownedPackages.0/@ownedClasses.0/@rule.4/@domain.0/@guardPattern/@variable.0"/>
</ownedSource>
- <ownedMappingStatements xsi:type="qvti:MappingCall" referredMapping="#m..hsv2hls.HSV2HLSRoot_LM">
- <binding boundVariable="#qV..hsv2hls.HSV2HLSRoot_LM.hsv.guard.hsvRoot">
- <value xsi:type="pivot:VariableExp" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" referredVariable="#i..hsv2hls.__root__.0._hsvRoot_HSVNode"/>
- </binding>
- </ownedMappingStatements>
- <ownedIterators xmi:id="i..hsv2hls.__root__.0._hsvRoot_HSVNode" name="_hsvRoot_HSVNode" type="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode"/>
</ownedStatements>
</rule>
+ <ownedContext xmi:id="qV..hsv2hls.this" name="this" type="#T..hsv2hls"/>
</ownedClasses>
</ownedPackages>
<ownedPackages xmi:id="P.$$" name="$$" URI="http://www.eclipse.org/ocl/2015/Orphanage" nsPrefix="orphanage">
- <ownedClasses xsi:type="pivot:SetType" name="Set" superClasses="#//@ownedPackages.1/@ownedClasses.1" elementType="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode">
+ <ownedClasses xsi:type="pivot:SetType" name="Set" superClasses="#//@ownedPackages.1/@ownedClasses.3" elementType="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode">
<ownedBindings>
<ownedSubstitutions actual="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SetT"/>
</ownedBindings>
</ownedClasses>
- <ownedClasses xsi:type="pivot:CollectionType" name="UniqueCollection" superClasses="#//@ownedPackages.1/@ownedClasses.2" elementType="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode">
+ <ownedClasses xsi:type="pivot:OrderedSetType" name="OrderedSet" superClasses="#//@ownedPackages.1/@ownedClasses.4 #//@ownedPackages.1/@ownedClasses.3"
+ elementType="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" isNullFree="true">
+ <ownedBindings>
+ <ownedSubstitutions actual="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..OrderedSetT"/>
+ </ownedBindings>
+ </ownedClasses>
+ <ownedClasses xsi:type="pivot:OrderedSetType" name="OrderedSet" superClasses="#//@ownedPackages.1/@ownedClasses.5 #//@ownedPackages.1/@ownedClasses.6"
+ elementType="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" isNullFree="true">
+ <ownedBindings>
+ <ownedSubstitutions actual="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..OrderedSetT"/>
+ </ownedBindings>
+ </ownedClasses>
+ <ownedClasses xsi:type="pivot:CollectionType" name="UniqueCollection" superClasses="#//@ownedPackages.1/@ownedClasses.7" elementType="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode">
<ownedBindings>
<ownedSubstitutions actual="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..UniqueCollectionT"/>
</ownedBindings>
</ownedClasses>
+ <ownedClasses xsi:type="pivot:CollectionType" name="OrderedCollection" superClasses="#//@ownedPackages.1/@ownedClasses.7" elementType="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode">
+ <ownedBindings>
+ <ownedSubstitutions actual="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..OrderedCollectionT"/>
+ </ownedBindings>
+ </ownedClasses>
+ <ownedClasses xsi:type="pivot:CollectionType" name="OrderedCollection" superClasses="#//@ownedPackages.1/@ownedClasses.8" elementType="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode">
+ <ownedBindings>
+ <ownedSubstitutions actual="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..OrderedCollectionT"/>
+ </ownedBindings>
+ </ownedClasses>
+ <ownedClasses xsi:type="pivot:CollectionType" name="UniqueCollection" superClasses="#//@ownedPackages.1/@ownedClasses.8" elementType="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode">
+ <ownedBindings>
+ <ownedSubstitutions actual="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..UniqueCollectionT"/>
+ </ownedBindings>
+ </ownedClasses>
<ownedClasses xsi:type="pivot:CollectionType" name="Collection" superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclAny"
elementType="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode">
<ownedBindings>
<ownedSubstitutions actual="pivot:Class HSVTree.ecore.oclas#T.HSVTree.HSVNode" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..CollectionT"/>
</ownedBindings>
</ownedClasses>
+ <ownedClasses xsi:type="pivot:CollectionType" name="Collection" superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclAny"
+ elementType="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode">
+ <ownedBindings>
+ <ownedSubstitutions actual="pivot:Class HSV2HLS.ecore.oclas#T.HSV2HLS.HSVNode2HLSNode" formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..CollectionT"/>
+ </ownedBindings>
+ </ownedClasses>
</ownedPackages>
</qvti:ImperativeModel>
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/KiamaRewrite/KiamaRewrite.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/KiamaRewrite/KiamaRewrite.qvti
index ba85a5968..451a716e7 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/KiamaRewrite/KiamaRewrite.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/KiamaRewrite/KiamaRewrite.qvti
@@ -92,9 +92,7 @@ map m_NumCS_ast in KiamaRewrite_qvtp_qvtcas
enforce rightAS() {
realize rNum : Num
}
- where () {
- lNumCS.ast := rNum;
- }
+ set lNumCS.ast := rNum;
}
map m_NumCS_ast_2 in KiamaRewrite_qvtp_qvtcas
@@ -110,9 +108,8 @@ map m_NumCS_ast_2 in KiamaRewrite_qvtp_qvtcas
_'if' : Integer := if _'oclIsKindOf\nkiamaas::Top'
then 0
else oclContainer.oclAsType(kiamaas::Plus).depth + 1 endif
- |
- aNum.depth := _'if';
- }
+ |}
+ set aNum.depth := _'if';
}
map m_NumCS_ast_value_1 in KiamaRewrite_qvtp_qvtcas
@@ -124,10 +121,9 @@ map m_NumCS_ast_value_1 in KiamaRewrite_qvtp_qvtcas
ast : ecore::EObject := lNumCS.ast,
value : ecore::EInt := lNumCS.value,
aNum : kiamaas::Num := ast.oclAsType(kiamaas::Num)
- |
- aNum.height := 0;
- aNum.value := value;
}
+ set aNum.height := 0;
+ set aNum.value := value;
}
map m_PlusCS_ast in KiamaRewrite_qvtp_qvtcas
@@ -146,9 +142,8 @@ map m_PlusCS_ast in KiamaRewrite_qvtp_qvtcas
including : Set(ecore::EIntegerObject) := oclAsSet->including(height1),
max : ecore::EIntegerObject := including->max(),
_'+' : Integer := max + 1
- |
- aPlus.height := _'+';
}
+ set aPlus.height := _'+';
}
map m_PlusCS_ast_1 in KiamaRewrite_qvtp_qvtcas
@@ -164,9 +159,8 @@ map m_PlusCS_ast_1 in KiamaRewrite_qvtp_qvtcas
_'if' : Integer := if _'oclIsKindOf\nkiamaas::Top'
then 0
else oclContainer.oclAsType(kiamaas::Plus).depth + 1 endif
- |
- aPlus.depth := _'if';
}
+ set aPlus.depth := _'if';
}
map m_PlusCS_ast_2 in KiamaRewrite_qvtp_qvtcas
@@ -175,9 +169,7 @@ map m_PlusCS_ast_2 in KiamaRewrite_qvtp_qvtcas
enforce rightAS() {
realize rPlus : Plus
}
- where () {
- lPlusCS.ast := rPlus;
- }
+ set lPlusCS.ast := rPlus;
}
map m_PlusCS_ast_left in KiamaRewrite_qvtp_qvtcas
@@ -190,9 +182,8 @@ map m_PlusCS_ast_left in KiamaRewrite_qvtp_qvtcas
aPlus : kiamaas::Plus := ast.oclAsType(kiamaas::Plus),
ast1 : ecore::EObject := left.ast,
aNode : kiamaas::Node := ast1.oclAsType(kiamaas::Node)
- |
- aPlus.left := aNode;
}
+ set aPlus.left := aNode;
}
map m_PlusCS_ast_right in KiamaRewrite_qvtp_qvtcas
@@ -205,9 +196,8 @@ map m_PlusCS_ast_right in KiamaRewrite_qvtp_qvtcas
aPlus : kiamaas::Plus := ast.oclAsType(kiamaas::Plus),
ast1 : ecore::EObject := right.ast,
aNode : kiamaas::Node := ast1.oclAsType(kiamaas::Node)
- |
- aPlus.right := aNode;
}
+ set aPlus.right := aNode;
}
map m_TopCS_ast in KiamaRewrite_qvtp_qvtcas
@@ -216,9 +206,7 @@ map m_TopCS_ast in KiamaRewrite_qvtp_qvtcas
enforce rightAS() {
realize rTop : Top
}
- where () {
- lTopCS.ast := rTop;
- }
+ set lTopCS.ast := rTop;
}
map m_TopCS_ast_node in KiamaRewrite_qvtp_qvtcas
@@ -231,9 +219,8 @@ map m_TopCS_ast_node in KiamaRewrite_qvtp_qvtcas
aTop : kiamaas::Top := ast.oclAsType(kiamaas::Top),
ast1 : ecore::EObject := node.ast,
aNode : kiamaas::Node := ast1.oclAsType(kiamaas::Node)
- |
- aTop.node := aNode;
}
+ set aTop.node := aNode;
}
map r_PlusCS_left in KiamaRewrite_qvtp_qvtcas
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ManualUML2RDBMS/ManualUML2RDBMS.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ManualUML2RDBMS/ManualUML2RDBMS.qvti
index 332823188..235c170f8 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ManualUML2RDBMS/ManualUML2RDBMS.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ManualUML2RDBMS/ManualUML2RDBMS.qvti
@@ -9,8 +9,6 @@ transformation ManualUML2RDBMS {
}
map __root__ in ManualUML2RDBMS {
-
- where () {}
for p1 : UML::Package in UML::Package.allInstances() {
call packageToSchemaLM {
p := p1;
@@ -23,10 +21,8 @@ map packageToSchemaLM in ManualUML2RDBMS {
enforce middle () {
realize p2s:PackageToSchema
}
- where () {
- p2s.umlPackage := p;
- p2s.name := p.name;
- }
+ set p2s.umlPackage := p;
+ set p2s.name := p.name;
/* L to M */
-- A package has elements, elements can be Classifiers or Associations. A
-- classifier can be a Class or a PrimitiveDataType
@@ -79,9 +75,7 @@ map packageToSchemaMR in ManualUML2RDBMS {
enforce rdbms () {
realize s:Schema
}
- where () {
- p2s.schema := s;
- }
+ set p2s.schema := s;
call packageToSchemaMR_1 {
s_1 := s;
p2s_1 := p2s;
@@ -112,9 +106,7 @@ map packageToSchemaMR in ManualUML2RDBMS {
map packageToSchemaMR_1 in ManualUML2RDBMS {
check middle (p2s_1:PackageToSchema) {}
enforce rdbms (s_1:Schema) {}
- where () {
- s_1.name := p2s_1.name;
- }
+ set s_1.name := p2s_1.name;
}
map integerToNumberLM in ManualUML2RDBMS {
@@ -125,12 +117,11 @@ map integerToNumberLM in ManualUML2RDBMS {
where (prim.namespace = p;
prim.name = 'Integer';
p2s.umlPackage=p;
- ) {
- p2n.owner := p2s;
- p2n._'primitive' := prim;
- p2n.name := prim.name + '2' + 'NUMBER';
- p2n.typeName := 'NUMBER';
- }
+ ) {}
+ set p2n.owner := p2s;
+ set p2n._'primitive' := prim;
+ set p2n.name := prim.name + '2' + 'NUMBER';
+ set p2n.typeName := 'NUMBER';
}
map integerToNumberMR in ManualUML2RDBMS {
@@ -151,12 +142,11 @@ map booleanToBooleanLM in ManualUML2RDBMS {
prim.namespace = p;
prim.name = 'Boolean';
p2s.umlPackage=p;
- ) {
- p2n.owner := p2s;
- p2n._'primitive' := prim;
- p2n.name := prim.name + '2' + 'BOOLEAN';
- p2n.typeName := 'BOOLEAN';
- }
+ ) {}
+ set p2n.owner := p2s;
+ set p2n._'primitive' := prim;
+ set p2n.name := prim.name + '2' + 'BOOLEAN';
+ set p2n.typeName := 'BOOLEAN';
}
map booleanToBooleanMR in ManualUML2RDBMS {
@@ -177,12 +167,11 @@ map stringToVarcharLM in ManualUML2RDBMS {
prim.namespace = p;
prim.name = 'String';
p2s.umlPackage=p;
- ) {
- p2n.owner := p2s;
- p2n._'primitive' := prim;
- p2n.name := prim.name + '2' + 'VARCHAR';
- p2n.typeName := 'VARCHAR';
- }
+ ) {}
+ set p2n.owner := p2s;
+ set p2n._'primitive' := prim;
+ set p2n.name := prim.name + '2' + 'VARCHAR';
+ set p2n.typeName := 'VARCHAR';
}
map stringToVarcharMR in ManualUML2RDBMS {
@@ -215,11 +204,10 @@ map classToTableLM in ManualUML2RDBMS {
c.kind = 'persistent';
c.namespace = p;
p2s.umlPackage=p;
- ) {
- c2t.owner := p2s;
- c2t.umlClass := c;
- c2t.name := c.name;
- }
+ ) {}
+ set c2t.owner := p2s;
+ set c2t.umlClass := c;
+ set c2t.name := c.name;
-- A Class has attributes
for anAttribute in c.attributes {
call classPrimitiveAttributesLM {
@@ -250,10 +238,9 @@ map classToTableMR in ManualUML2RDBMS {
}
where (
c2t.owner = p2s;
- ) {
- t.kind := 'base';
- t.schema := s;
- }
+ ) {}
+ set t.kind := 'base';
+ set t.schema := s;
call classToTableMR_1 {
c2t_1 := c2t;
t_1 := t;
@@ -289,10 +276,8 @@ map classToTableMR in ManualUML2RDBMS {
map classToTableMR_1 in ManualUML2RDBMS {
check middle (c2t_1:ClassToTable) {}
enforce rdbms (t_1:Table) { }
- where () {
- c2t_1.table := t_1;
- t_1.name := c2t_1.name;
- }
+ set c2t_1.table := t_1;
+ set t_1.name := c2t_1.name;
}
map classToTableMR_2 in ManualUML2RDBMS {
@@ -301,13 +286,11 @@ map classToTableMR_2 in ManualUML2RDBMS {
realize pk:Key,
realize pc:Column
}
- where () {
- pk.owner := t_2;
- pk.kind := 'primary';
- pc.owner := t_2;
- pc._'key' := OrderedSet(Key){pk};
- pc.type := 'NUMBER';
- }
+ set pk.owner := t_2;
+ set pk.kind := 'primary';
+ set pc.owner := t_2;
+ set pc._'key' := OrderedSet(Key){pk};
+ set pc.type := 'NUMBER';
call classToTableMR_2_1 {
c2t_2_1 := c2t_2;
pk_2_1 := pk;
@@ -323,19 +306,15 @@ map classToTableMR_2 in ManualUML2RDBMS {
map classToTableMR_2_1 in ManualUML2RDBMS {
check middle (c2t_2_1:ClassToTable) {}
enforce rdbms (pk_2_1:Key, pc_2_1:Column) {}
- where () {
- c2t_2_1.primaryKey := pk_2_1;
- c2t_2_1.column := pc_2_1;
- }
+ set c2t_2_1.primaryKey := pk_2_1;
+ set c2t_2_1.column := pc_2_1;
}
map classToTableMR_2_2 in ManualUML2RDBMS {
check middle () {}
enforce rdbms (pk_2_2:Key, pc_2_2:Column, t_2_2:Table) {}
- where () {
- pc_2_2.name := t_2_2.name+'_tid';
- pk_2_2.name := t_2_2.name+'_pk';
- }
+ set pc_2_2.name := t_2_2.name+'_tid';
+ set pk_2_2.name := t_2_2.name+'_pk';
}
map associationToForeignKeyLM in ManualUML2RDBMS {
@@ -351,13 +330,13 @@ map associationToForeignKeyLM in ManualUML2RDBMS {
-- getAllForwards(sc)->includes(a);
-- getAllSupers(dc)->includes(a.destination);
p2s.umlPackage = p;
- ) {
- sc2t.owner := p2s;
- a2f.owner := sc2t;
- a2f.referenced := dc2t;
- a2f.association := a;
+ ) {}
+ set sc2t.owner := p2s;
+ set a2f.owner := sc2t;
+ set a2f.referenced := dc2t;
+ set a2f.association := a;
-- FIXME Bug 461994 working around Bug 459397; dc2 is gratuitous
- a2f.name := let dc2 = dc in if a.destination=dc and a.source=sc
+ set a2f.name := let dc2 = dc in if a.destination=dc and a.source=sc
then a.name
else if a.destination<>dc and a.source=sc
then dc2.name +'_'+a.name
@@ -365,7 +344,6 @@ map associationToForeignKeyLM in ManualUML2RDBMS {
then a.name+'_'+sc.name
else dc2.name+'_'+a.name+'_'+sc.name
endif endif endif;
- }
}
map associationToForeignKeyMR in ManualUML2RDBMS {
@@ -385,13 +363,12 @@ map associationToForeignKeyMR in ManualUML2RDBMS {
st.schema = s;
-- rk.owner = dt;
-- rk.kind = 'primary';
- ) {
- sc2t.owner := p2s;
- fk.name := a2f.name;
- fc.name := a2f.name +'_tid';
- fk.owner := st;
- fc.owner := st;
- }
+ ) {}
+ set sc2t.owner := p2s;
+ set fk.name := a2f.name;
+ set fc.name := a2f.name +'_tid';
+ set fk.owner := st;
+ set fc.owner := st;
call associationToForeignKeyMR_1 {
fk := fk;
fc := fc;
@@ -408,20 +385,16 @@ map associationToForeignKeyMR in ManualUML2RDBMS {
map associationToForeignKeyMR_1 in ManualUML2RDBMS {
check middle () {}
enforce rdbms (fk:ForeignKey, fc:Column, dt:Table, rk:Key) {}
- where () {
- fk.refersTo := rk;
- fc.foreignKeys := OrderedSet(ForeignKey){fk};
- fc.type := rk.column->first().type;
- }
+ set fk.refersTo := rk;
+ set fc.foreignKeys := OrderedSet(ForeignKey){fk};
+ set fc.type := rk.column->first().type;
}
map associationToForeignKeyMR_2 in ManualUML2RDBMS {
check middle (a2f_1:AssociationToForeignKey) {}
enforce rdbms (fk_1:ForeignKey, fc_1:Column) {}
- where () {
- a2f_1.foreignKey := fk_1;
- a2f_1.column := fc_1;
- }
+ set a2f_1.foreignKey := fk_1;
+ set a2f_1.column := fc_1;
}
map classPrimitiveAttributesLM in ManualUML2RDBMS {
@@ -435,14 +408,13 @@ map classPrimitiveAttributesLM in ManualUML2RDBMS {
--getAllAttributes(c)->includes(a);
fao.umlClass = c;
- ) {
- atc._'attribute' := a;
- atc.owner := fao;
- atc.type := p2n;
- atc.kind := a.kind;
- atc.name := a.name;
- atc.leafs := Set(AttributeToColumn) {atc};
- }
+ ) {}
+ set atc._'attribute' := a;
+ set atc.owner := fao;
+ set atc.type := p2n;
+ set atc.kind := a.kind;
+ set atc.name := a.name;
+ set atc.leafs := Set(AttributeToColumn) {atc};
}
map classComplexAttributesLM in ManualUML2RDBMS {
@@ -455,13 +427,12 @@ map classComplexAttributesLM in ManualUML2RDBMS {
a.owner = c;
--getAllAttributes(c)->includes(a);
fao.umlClass=c;
- ) {
- fa._'attribute' := a;
- fa.owner := fao;
- fa.kind := a.kind;
- fa.name := a.name;
- fa.leafs := fao.fromAttributes.leafs->asSet();
- }
+ ) {}
+ set fa._'attribute' := a;
+ set fa.owner := fao;
+ set fa.kind := a.kind;
+ set fa.name := a.name;
+ set fa.leafs := fao.fromAttributes.leafs->asSet();
}
map complexAttributePrimitiveAttributesLM in ManualUML2RDBMS {
@@ -491,14 +462,13 @@ map complexAttributePrimitiveAttributesLM_1 in ManualUML2RDBMS {
}
where (
--getAllAttributes(c)->includes(a);
- ) {
- fa.owner := fao_1;
- fa.leafs := Set(AttributeToColumn) {fa};
- fa._'attribute' := a_1;
- fa.type := p2n_1;
- fa.kind := a_1.kind;
- fa.name := ca_1.name + '_' + a_1.name;
- }
+ ) {}
+ set fa.owner := fao_1;
+ set fa.leafs := Set(AttributeToColumn) {fa};
+ set fa._'attribute' := a_1;
+ set fa.type := p2n_1;
+ set fa.kind := a_1.kind;
+ set fa.name := ca_1.name + '_' + a_1.name;
}
map complexAttributeComplexAttributesLM in ManualUML2RDBMS {
@@ -528,14 +498,13 @@ map complexAttributeComplexAttributesLM_1 in ManualUML2RDBMS {
where (
a_1.owner = c_1;
--getAllAttributes(c)->includes(a);
- ) {
- fa.owner := fao_1;
- fa.leafs := fao_1.fromAttributes.leafs->asSet();
- fa._'attribute' := a_1;
- fa.kind := a_1.kind;
- fa.name := ca_1.name + '_' + a_1.name;
--- fa._'attribute' := t_1;
- }
+ ) {}
+ set fa.owner := fao_1;
+ set fa.leafs := fao_1.fromAttributes.leafs->asSet();
+ set fa._'attribute' := a_1;
+ set fa.kind := a_1.kind;
+ set fa.name := ca_1.name + '_' + a_1.name;
+-- set fa._'attribute' := t_1;
}
@@ -548,9 +517,8 @@ map attributeColumnsMR in ManualUML2RDBMS {
-- c2t.fromAttributes.leafs->includes(a2c); -- need to go deeper in the recursion
-- a2c.owner = c2t; NOT ALL a2c are owned by c2t (complex attributes)
c2t.table = t;
- ) {
- c.owner := t;
- }
+ ) {}
+ set c.owner := t;
call attributeColumnsMR_1 {
a2c_1 := a2c;
c_1 := c;
@@ -570,9 +538,7 @@ map attributeColumnsMR in ManualUML2RDBMS {
map attributeColumnsMR_1 in ManualUML2RDBMS {
check middle (a2c_1:AttributeToColumn) {}
enforce rdbms (c_1:Column) {}
- where () {
- a2c_1.column := c_1;
- }
+ set a2c_1.column := c_1;
}
map attributeColumnsMR_2 in ManualUML2RDBMS {
@@ -580,9 +546,8 @@ map attributeColumnsMR_2 in ManualUML2RDBMS {
enforce rdbms (c_2:Column, ct_2:String) {}
where (
a2c_2.type = p2n_2;
- ) {
- c_2.type := ct_2;
- }
+ ) {}
+ set c_2.type := ct_2;
call attributeColumnsMR_2_1 {
p2n_2_1 := p2n_2;
ct_2_1 := ct_2;
@@ -592,16 +557,12 @@ map attributeColumnsMR_2 in ManualUML2RDBMS {
map attributeColumnsMR_2_1 in ManualUML2RDBMS {
check middle (p2n_2_1:PrimitiveToName) {}
enforce rdbms (ct_2_1:String) {}
- where () {
- p2n_2_1.typeName := ct_2_1;
- }
+ set p2n_2_1.typeName := ct_2_1;
}
map attributeColumnsMR_3 in ManualUML2RDBMS {
check middle (a2c_3:AttributeToColumn) {}
enforce rdbms (c_3:Column) { }
- where () {
- c_3.name := a2c_3.name;
- c_3.kind := a2c_3.kind;
- }
+ set c_3.name := a2c_3.name;
+ set c_3.kind := a2c_3.kind;
}
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/SimpleUML2RDBMS/SimpleUML2RDBMS.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/SimpleUML2RDBMS/SimpleUML2RDBMS.qvti
index a78157f0c..a3e2255b2 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/SimpleUML2RDBMS/SimpleUML2RDBMS.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/SimpleUML2RDBMS/SimpleUML2RDBMS.qvti
@@ -18,10 +18,8 @@ map packageToSchema_LM in simpleUML2RDBMS::SimpleUML2RDBMS
enforce middle() {
realize p2s : PackageToSchema
}
- where () {
- p2s.umlPackage := p;
- p2s.name := p.name;
- }
+ set p2s.umlPackage := p;
+ set p2s.name := p.name;
}
map packageToSchema_MR in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -30,10 +28,8 @@ map packageToSchema_MR in simpleUML2RDBMS::SimpleUML2RDBMS
realize s : Schema
}
check middle(p2s : PackageToSchema) {}
- where () {
- s.name := p2s.name;
- p2s.schema := s;
- }
+ set s.name := p2s.name;
+ set p2s.schema := s;
}
map integerToNumber_LM in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -45,11 +41,10 @@ map integerToNumber_LM in simpleUML2RDBMS::SimpleUML2RDBMS
}
where (p2s.umlPackage = p;
prim.namespace = p;
- prim.name = 'Integer';) {
- p2n.owner := p2s;
- p2n._'primitive' := prim;
- p2n.name := prim.name + '2' + 'NUMBER';
- }
+ prim.name = 'Integer';) {}
+ set p2n.owner := p2s;
+ set p2n._'primitive' := prim;
+ set p2n.name := prim.name + '2' + 'NUMBER';
}
map integerToNumber_MR in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -59,9 +54,8 @@ map integerToNumber_MR in simpleUML2RDBMS::SimpleUML2RDBMS
p2n : IntegerToNumber) {}
where (p2n.owner = p2s;) {
sqlType : String := 'NUMBER'
- |
- p2n.typeName := sqlType;
}
+ set p2n.typeName := sqlType;
}
map booleanToBoolean_MR in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -72,9 +66,9 @@ map booleanToBoolean_MR in simpleUML2RDBMS::SimpleUML2RDBMS
where (p2n.owner = p2s;) {
sqlType : String
|
- p2n.typeName := sqlType;
sqlType := 'BOOLEAN';
}
+ set p2n.typeName := sqlType;
}
map booleanToBoolean_LM in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -86,11 +80,10 @@ map booleanToBoolean_LM in simpleUML2RDBMS::SimpleUML2RDBMS
}
where (p2s.umlPackage = p;
prim.namespace = p;
- prim.name = 'Boolean';) {
- p2n._'primitive' := prim;
- p2n.name := prim.name + '2' + 'BOOLEAN';
- p2n.owner := p2s;
- }
+ prim.name = 'Boolean';) {}
+ set p2n._'primitive' := prim;
+ set p2n.name := prim.name + '2' + 'BOOLEAN';
+ set p2n.owner := p2s;
}
map stringToVarchar_MR in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -100,9 +93,8 @@ map stringToVarchar_MR in simpleUML2RDBMS::SimpleUML2RDBMS
p2n : StringToVarchar) {}
where (p2n.owner = p2s;) {
sqlType : String := 'VARCHAR'
- |
- p2n.typeName := sqlType;
- }
+ |}
+ set p2n.typeName := sqlType;
}
map stringToVarchar_LM in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -114,11 +106,10 @@ map stringToVarchar_LM in simpleUML2RDBMS::SimpleUML2RDBMS
}
where (p2s.umlPackage = p;
prim.namespace = p;
- prim.name = 'String';) {
- p2n.name := prim.name + '2' + 'VARCHAR';
- p2n.owner := p2s;
- p2n._'primitive' := prim;
- }
+ prim.name = 'String';) {}
+ set p2n.name := prim.name + '2' + 'VARCHAR';
+ set p2n.owner := p2s;
+ set p2n._'primitive' := prim;
}
map classToTable_MR in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -132,21 +123,20 @@ map classToTable_MR in simpleUML2RDBMS::SimpleUML2RDBMS
c2t : ClassToTable) {}
where (p2s.schema = s;
c2t.owner = p2s;) {
- c2t_name : String[?] := c2t.name |
- c2t.table := t;
- t.name := c2t_name;
- c2t.primaryKey := pk;
- c2t.column := pc;
- default t.kind := 'base';
- t.schema := s;
- pk.owner := t;
- pk.kind := 'primary';
- pc.owner := t;
- default pc.keys := OrderedSet(simplerdbms::Key){pk};
- default pc.type := 'NUMBER';
- pc.name := c2t_name + '_tid';
- pk.name := c2t_name + '_pk';
- }
+ c2t_name : String[?] := c2t.name |}
+ set c2t.table := t;
+ set t.name := c2t_name;
+ set c2t.primaryKey := pk;
+ set c2t.column := pc;
+ set t.kind := 'base';
+ set t.schema := s;
+ set pk.owner := t;
+ set pk.kind := 'primary';
+ set pc.owner := t;
+ set pc.keys := OrderedSet(simplerdbms::Key){pk};
+ set pc.type := 'NUMBER';
+ set pc.name := c2t_name + '_tid';
+ set pk.name := c2t_name + '_pk';
}
map classToTable_LM in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -158,11 +148,10 @@ map classToTable_LM in simpleUML2RDBMS::SimpleUML2RDBMS
}
where (p2s.umlPackage = p;
c.kind = 'persistent';
- c.namespace = p;) {
- c2t.owner := p2s;
- c2t.name := c.name;
- c2t.umlClass := c;
- }
+ c.namespace = p;) {}
+ set c2t.owner := p2s;
+ set c2t.name := c.name;
+ set c2t.umlClass := c;
}
map associationToForeignKey_MR in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -186,17 +175,16 @@ map associationToForeignKey_MR in simpleUML2RDBMS::SimpleUML2RDBMS
a2f.owner = sc2t;
rk.kind = 'primary';
rk.owner = dt;
- st.schema = s;) {
- fk.name := a2f.name;
- a2f.foreignKey := fk;
- fc.type := rk.column->first().type;
- fc.name := a2f.name + '_tid';
- a2f.column := fc;
- fk.owner := st;
- fc.owner := st;
- fk.refersTo := rk;
- default fc.foreignKeys := OrderedSet(simplerdbms::ForeignKey){fk};
- }
+ st.schema = s;) {}
+ set fk.name := a2f.name;
+ set a2f.foreignKey := fk;
+ set fc.type := rk.column->first().type;
+ set fc.name := a2f.name + '_tid';
+ set a2f.column := fc;
+ set fk.owner := st;
+ set fc.owner := st;
+ set fk.refersTo := rk;
+ set fc.foreignKeys := OrderedSet(simplerdbms::ForeignKey){fk};
}
map associationToForeignKey_LM in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -218,8 +206,8 @@ map associationToForeignKey_LM in simpleUML2RDBMS::SimpleUML2RDBMS
sc.namespace = p;
a.source = sc;
a.destination = dc;) {
- a2f_name : String |
- a2f_name := if a.destination = dc and a.source = sc
+ a2f_name : String |
+ a2f_name := if a.destination = dc and a.source = sc
then a.name
else if a.destination <> dc and a.source = sc
then dc.name + '_' + a.name
@@ -229,15 +217,15 @@ map associationToForeignKey_LM in simpleUML2RDBMS::SimpleUML2RDBMS
endif
endif
endif;
- a2f.association := a;
- a2f.referenced := dc2t;
- a2f.name := a2f_name;
- a2f.owner := sc2t;
- a.name := if a.destination = dc and a.source = sc
+ }
+ set a2f.association := a;
+ set a2f.referenced := dc2t;
+ set a2f.name := a2f_name;
+ set a2f.owner := sc2t;
+ set a.name := if a.destination = dc and a.source = sc
then a2f_name
else a.name
endif;
- }
}
map classPrimitiveAttributes_LM in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -252,17 +240,16 @@ map classPrimitiveAttributes_LM in simpleUML2RDBMS::SimpleUML2RDBMS
where (fao.umlClass = c;
p2n._'primitive' = t;
a.owner = c;
- a.type = t;) {
- fa.owner := fao;
- fa.type := p2n;
- fa.name := a.name;
--- fa.owner := fao;
- fa.kind := a.kind;
--- fa.kind := a.kind;
- fa._'attribute' := a;
--- fa._'attribute' := a;
- fa.leafs := Set(umltordbms::AttributeToColumn){fa};
- }
+ a.type = t;) {}
+ set fa.owner := fao;
+ set fa.type := p2n;
+ set fa.name := a.name;
+-- set fa.owner := fao;
+ set fa.kind := a.kind;
+-- set fa.kind := a.kind;
+ set fa._'attribute' := a;
+-- set fa._'attribute' := a;
+ set fa.leafs := Set(umltordbms::AttributeToColumn){fa};
}
map classComplexAttributes_LM in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -275,15 +262,14 @@ map classComplexAttributes_LM in simpleUML2RDBMS::SimpleUML2RDBMS
}
where (fao.umlClass = c;
a.owner = c;
- a.type = t;) {
- fa._'attribute' := a;
- fa.kind := a.kind;
- fa.owner := fao;
--- fa.owner := fao;
- fa.name := a.name;
- fa.leafs := fao.fromAttributes.leafs->asSet();
--- fa.kind := a.kind;
- }
+ a.type = t;) {}
+ set fa._'attribute' := a;
+ set fa.kind := a.kind;
+ set fa.owner := fao;
+-- set fa.owner := fao;
+ set fa.name := a.name;
+ set fa.leafs := fao.fromAttributes.leafs->asSet();
+-- set fa.kind := a.kind;
}
map complexAttributePrimitiveAttributes_LM in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -301,17 +287,16 @@ map complexAttributePrimitiveAttributes_LM in simpleUML2RDBMS::SimpleUML2RDBMS
a.owner = c;
a.type = t;
ca.type = c;
- a.owner = c;) {
- fa.owner := fao;
- fa._'attribute' := a;
- fa.kind := a.kind;
- fa.type := p2n;
- fa.leafs := Set(umltordbms::AttributeToColumn){fa};
- fa.name := fao.name + '_' + a.name;
--- fa.kind := a.kind;
--- fa._'attribute' := a;
--- fa.owner := fao;
- }
+ a.owner = c;) {}
+ set fa.owner := fao;
+ set fa._'attribute' := a;
+ set fa.kind := a.kind;
+ set fa.type := p2n;
+ set fa.leafs := Set(umltordbms::AttributeToColumn){fa};
+ set fa.name := fao.name + '_' + a.name;
+-- set fa.kind := a.kind;
+-- set fa._'attribute' := a;
+-- set fa.owner := fao;
}
map complexAttributeComplexAttributes_LM in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -327,16 +312,15 @@ map complexAttributeComplexAttributes_LM in simpleUML2RDBMS::SimpleUML2RDBMS
a.owner = c;
a.owner = c;
ca.type = c;
- a.type = t;) {
- fa.owner := fao;
- fa.kind := a.kind;
- fa.leafs := fao.fromAttributes.leafs->asSet();
- fa._'attribute' := a;
--- fa._'attribute' := a;
- fa.name := fao.name + '_' + a.name;
--- fa.kind := a.kind;
--- fa.owner := fao;
- }
+ a.type = t;) {}
+ set fa.owner := fao;
+ set fa.kind := a.kind;
+ set fa.leafs := fao.fromAttributes.leafs->asSet();
+ set fa._'attribute' := a;
+-- set fa._'attribute' := a;
+ set fa.name := fao.name + '_' + a.name;
+-- set fa.kind := a.kind;
+-- set fa.owner := fao;
}
map attributeColumns_MR in simpleUML2RDBMS::SimpleUML2RDBMS
@@ -352,13 +336,12 @@ map attributeColumns_MR in simpleUML2RDBMS::SimpleUML2RDBMS
p2n.typeName = ct;
a2c.owner = c2t;
c2t.fromAttributes.leafs->includes(a2c);
- a2c.type = p2n;) {
- c.name := a2c.name;
- c.kind := a2c.kind;
- a2c.column := c;
- c.owner := t;
- c.type := ct;
- }
+ a2c.type = p2n;) {}
+ set c.name := a2c.name;
+ set c.kind := a2c.kind;
+ set a2c.column := c;
+ set c.owner := t;
+ set c.type := ct;
}
map __root__ in simpleUML2RDBMS::SimpleUML2RDBMS
diff --git a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Tree2TallTree/Tree2TallTree.qvti b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Tree2TallTree/Tree2TallTree.qvti
index 7eb32ddd9..8a280b965 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Tree2TallTree/Tree2TallTree.qvti
+++ b/tests/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/Tree2TallTree/Tree2TallTree.qvti
@@ -32,10 +32,8 @@ map Node2MiddleNode in Tree2TallTree {
enforce tree2talltree() {
realize node2tallNode : Node2TallNode
}
- where() {
- node2tallNode.node := node;
- node2tallNode.name := node.name;
- }
+ set node2tallNode.node := node;
+ set node2tallNode.name := node.name;
}
map Edge2MiddleEdge in Tree2TallTree {
@@ -45,10 +43,9 @@ map Edge2MiddleEdge in Tree2TallTree {
} (node2tallNode : Node2TallNode) {
-- realize node2tallNode : Node2TallNode
}
- where(node.parent <> null;) {
- node2tallNode.parent := node.parent.Node2TallNode;
+ where(node.parent <> null;) {}
+ set node2tallNode.parent := node.parent.Node2TallNode;
-- node2tallNode.name := node.name;
- }
}
map MiddleNode2TallNode in Tree2TallTree {
@@ -60,12 +57,18 @@ map MiddleNode2TallNode in Tree2TallTree {
check TallNode::height
enforce TallNode::height
} () {
- realize tallNode : TallNode
+ realize tallNode : TallNode,
+ tallNode_name : String,
+ tallNode_height : Integer,
+ tallNode_children : Set(TallNode)
}
- where() {
- node2tallNode.tallNode := tallNode;
- tallNode.name := node2tallNode.name;
- tallNode.children := node2tallNode.children?.tallNode->asSet();
- tallNode.height := if node2tallNode.children->notEmpty() then node2tallNode.children.tallNode.height->max() + 1 else 0 endif;
+ where () {
+ tallNode_name := node2tallNode.name;
+ tallNode_children := node2tallNode.children?.tallNode->asSet();
+ tallNode_height := if node2tallNode.children->notEmpty() then node2tallNode.children.tallNode.height->max() + 1 else 0 endif;
}
+ set node2tallNode.tallNode := tallNode;
+ set tallNode.name := tallNode_name;
+ set tallNode.children := tallNode_children;
+ set tallNode.height := tallNode_height;
}

Back to the top