]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Transformation4.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Transformation4.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Transformation4.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Transformation4.scl
new file mode 100644 (file)
index 0000000..5a889e1
--- /dev/null
@@ -0,0 +1,27 @@
+import "StandardLibrary"
+
+mapping relation M Integer (Integer,Integer)
+
+rule Mix where
+    @when
+    M ?a (?b, ?c)
+    ?a <= 10
+    
+    @where
+    M (?a + 1) (?c, ?b)
+
+rule PrintIt where
+    @when
+    M ?a (?b,?c)
+    
+    @to
+    Execute (print "\(?a) -> \(?b), \(?c)")
+    
+rule Seed where
+    @where
+    M 0 (1,?x)
+    M 10 (?y,2)
+
+main = transformation OneShotForward where
+--
+()