]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Select3.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / Select3.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Select3.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Select3.scl
new file mode 100644 (file)
index 0000000..a3e4f44
--- /dev/null
@@ -0,0 +1,18 @@
+import "StandardLibrary"
+import "Minigraph"
+
+main = withGraph do
+    a = resource "a"
+    b = map resource ["b0", "b1", "b2", "b3", "b4"]
+    r = map resource ["r0", "r1"]
+    
+    enforce
+        Statement a (r!0) (b!0)
+        Statement a (r!0) (b!1)
+        Statement a (r!1) (b!4)
+        Statement (b!1) (r!1) (b!3)
+        Statement (b!1) (r!0) (b!2)
+    sort $ map uriOf $ select ?x where 
+        Statement a (r!0) (_ : Resource { #r1 = ?x })
+--
+[b3]