-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlists.n3
66 lines (55 loc) · 1017 Bytes
/
lists.n3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@prefix : <urn:example:> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
:exp1 :value _:x0 .
_:x0 rdf:first 1 .
_:x0 rdf:rest _:x1 .
_:x1 rdf:first 2 .
_:x1 rdf:rest _:x2 .
_:x2 rdf:first 3 .
_:x2 rdf:rest rdf:nil .
{
:exp1 :value ?x .
?x rdf:first 1 .
}
=>
{
:test1 :is true .
} .
{
:exp1 :value ?x .
?x log:rawType log:LabeledBlankNode .
}
=>
{
:test2 :is true .
} .
{
:exp1 :value ?x .
?x log:equalTo (1 2 3) . # debatable if this is true or not ...
}
=>
{
:test3 :is true .
} .
{
# Attention _:x0 is here scoped to the premise..
# this should match the three rdf:rest predicates above
_:x0 rdf:rest ?O .
}
=>
{
:test4 :is ?O .
} .
{
:test1 :is true .
:test2 :is true .
:test3 :is true .
:test4 :is [ rdf:first 2 ; rdf:rest [ rdf:first 3 ; rdf:rest rdf:nil ] ] .
:test4 :is [ rdf:first 3 ; rdf:rest rdf:nil ] .
:test4 :is ()
}
=>
{
:test :is true .
} .