]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Select2.scl
Merge commit 'bd5bc6e45f700e755b61bd112631796631330ecb'
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Select2.scl
1 import "StandardLibrary"
2 import "Minigraph"
3
4 main = withGraph do
5     a = resource "a"
6     b = map resource ["b0", "b1", "b2", "b3", "b4"]
7     r = map resource ["r0", "r1"]
8     
9     enforce
10         Statement a (r!0) (b!0)
11         Statement a (r!0) (b!1)
12         Statement a (r!1) (b!4)
13         Statement a (r!1) (b!3)
14         Statement (b!1) (r!0) (b!2)
15     R a :- {}
16     R ?x :- R ?y ; Statement ?y (r!0) ?x
17     S ?x :- R ?x ; Statement ?x (r!0) _
18     sort $ map uriOf $ select ?x where S ?x
19 --
20 [a, b1]