eyeling 1.5.12 → 1.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/examples/age.n3 +29 -0
- package/examples/backward.n3 +24 -0
- package/examples/basic-monadic.n3 +10032 -0
- package/examples/cat-koko.n3 +29 -0
- package/examples/collect-all-in.n3 +32 -0
- package/examples/complex.n3 +142 -0
- package/examples/control-system.n3 +77 -0
- package/examples/crypto-builtins-tests.n3 +60 -0
- package/examples/deep-taxonomy-10.n3 +21 -0
- package/examples/deep-taxonomy-100.n3 +111 -0
- package/examples/deep-taxonomy-1000.n3 +1011 -0
- package/examples/deep-taxonomy-10000.n3 +10011 -0
- package/examples/derived-backward-rule-2.n3 +28 -0
- package/examples/derived-backward-rule.n3 +32 -0
- package/examples/derived-rule.n3 +19 -0
- package/examples/dijkstra.n3 +64 -0
- package/examples/dog.n3 +21 -0
- package/examples/equals.n3 +12 -0
- package/examples/existential-rule.n3 +18 -0
- package/examples/fibonacci.n3 +34 -0
- package/examples/for-all-in.n3 +21 -0
- package/examples/french-cities.n3 +32 -0
- package/examples/fuse.n3 +13 -0
- package/examples/good-cobbler.n3 +18 -0
- package/examples/gray-code-counter.n3 +64 -0
- package/examples/hanoi.n3 +21 -0
- package/examples/liar.n3 +6 -0
- package/examples/list-builtins-tests.n3 +84 -0
- package/examples/lldm.n3 +133 -0
- package/examples/math-builtins-tests.n3 +612 -0
- package/examples/monkey.n3 +11 -0
- package/examples/output/age.n3 +20 -0
- package/examples/output/backward.n3 +18 -0
- package/examples/output/basic-monadic.n3 +122 -0
- package/examples/output/cat-koko.n3 +125 -0
- package/examples/output/collect-all-in.n3 +122 -0
- package/examples/output/complex.n3 +57 -0
- package/examples/output/control-system.n3 +79 -0
- package/examples/output/crypto-builtins-tests.n3 +66 -0
- package/examples/output/deep-taxonomy-10.n3 +636 -0
- package/examples/output/deep-taxonomy-100.n3 +6036 -0
- package/examples/output/deep-taxonomy-1000.n3 +60036 -0
- package/examples/output/deep-taxonomy-10000.n3 +600036 -0
- package/examples/output/derived-backward-rule-2.n3 +71 -0
- package/examples/output/derived-backward-rule.n3 +53 -0
- package/examples/output/derived-rule.n3 +52 -0
- package/examples/output/dijkstra.n3 +315 -0
- package/examples/output/dog.n3 +33 -0
- package/examples/output/equals.n3 +18 -0
- package/examples/output/existential-rule.n3 +38 -0
- package/examples/output/fibonacci.n3 +44 -0
- package/examples/output/for-all-in.n3 +30 -0
- package/examples/output/french-cities.n3 +507 -0
- package/examples/output/fuse.n3 +1 -0
- package/examples/output/good-cobbler.n3 +27 -0
- package/examples/output/gray-code-counter.n3 +20 -0
- package/examples/output/hanoi.n3 +20 -0
- package/examples/output/liar.n3 +1 -0
- package/examples/output/list-builtins-tests.n3 +148 -0
- package/examples/output/lldm.n3 +1000 -0
- package/examples/output/math-builtins-tests.n3 +4479 -0
- package/examples/output/monkey.n3 +40 -0
- package/examples/output/peano.n3 +26 -0
- package/examples/output/pi.n3 +20 -0
- package/examples/output/polygon.n3 +20 -0
- package/examples/output/reordering.n3 +29 -0
- package/examples/output/rule-matching.n3 +29 -0
- package/examples/output/self-referential.n3 +88 -0
- package/examples/output/similar.n3 +18 -0
- package/examples/output/skolem.n3 +20 -0
- package/examples/output/snaf.n3 +26 -0
- package/examples/output/socrates.n3 +24 -0
- package/examples/output/string-builtins-tests.n3 +258 -0
- package/examples/output/turing.n3 +44 -0
- package/examples/output/uri.n3 +46 -0
- package/examples/output/witch.n3 +115 -0
- package/examples/output/zebra.n3 +114 -0
- package/examples/peano.n3 +45 -0
- package/examples/pi.n3 +32 -0
- package/examples/polygon.n3 +26 -0
- package/examples/reordering.n3 +23 -0
- package/examples/rule-matching.n3 +15 -0
- package/examples/self-referential.n3 +32 -0
- package/examples/similar.n3 +28 -0
- package/examples/skolem.n3 +15 -0
- package/examples/snaf.n3 +18 -0
- package/examples/socrates.n3 +19 -0
- package/examples/string-builtins-tests.n3 +210 -0
- package/examples/test +154 -0
- package/examples/turing.n3 +93 -0
- package/examples/uri.n3 +17 -0
- package/examples/witch.n3 +33 -0
- package/examples/zebra.n3 +47 -0
- package/package.json +6 -2
- package/test/api.test.js +22 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@prefix : <http://example.org/socrates#> .
|
|
2
|
+
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
|
3
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
4
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
5
|
+
|
|
6
|
+
# ----------------------------------------------------------------------
|
|
7
|
+
# Proof for derived triple:
|
|
8
|
+
# {
|
|
9
|
+
# :Socrates a :Human .
|
|
10
|
+
# } <= true .
|
|
11
|
+
# This triple is the head of a forward rule with an empty premise,
|
|
12
|
+
# so it holds unconditionally whenever the program is loaded.
|
|
13
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
14
|
+
# ----------------------------------------------------------------------
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
:Socrates a :Human .
|
|
18
|
+
} <= true .
|
|
19
|
+
|
|
20
|
+
# ----------------------------------------------------------------------
|
|
21
|
+
# Proof for derived triple:
|
|
22
|
+
# {
|
|
23
|
+
# :Human rdfs:subClassOf :Mortal .
|
|
24
|
+
# } <= true .
|
|
25
|
+
# This triple is the head of a forward rule with an empty premise,
|
|
26
|
+
# so it holds unconditionally whenever the program is loaded.
|
|
27
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
28
|
+
# ----------------------------------------------------------------------
|
|
29
|
+
|
|
30
|
+
{
|
|
31
|
+
:Human rdfs:subClassOf :Mortal .
|
|
32
|
+
} <= true .
|
|
33
|
+
|
|
34
|
+
# ----------------------------------------------------------------------
|
|
35
|
+
# Proof for derived triple:
|
|
36
|
+
# :Socrates a :Mortal .
|
|
37
|
+
# It holds because the following instance of the rule body is provable:
|
|
38
|
+
# :Socrates a :Human .
|
|
39
|
+
# :Human rdfs:subClassOf :Mortal .
|
|
40
|
+
# via the schematic forward rule:
|
|
41
|
+
# {
|
|
42
|
+
# ?S a ?A .
|
|
43
|
+
# ?A rdfs:subClassOf ?B .
|
|
44
|
+
# } => {
|
|
45
|
+
# ?S a ?B .
|
|
46
|
+
# } .
|
|
47
|
+
# with substitution (on rule variables):
|
|
48
|
+
# ?A = :Human
|
|
49
|
+
# ?B = :Mortal
|
|
50
|
+
# ?S = :Socrates
|
|
51
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
52
|
+
# ----------------------------------------------------------------------
|
|
53
|
+
|
|
54
|
+
:Socrates a :Mortal .
|
|
55
|
+
|
|
56
|
+
# ----------------------------------------------------------------------
|
|
57
|
+
# Proof for derived triple:
|
|
58
|
+
# :test :is true .
|
|
59
|
+
# It holds because the following instance of the rule body is provable:
|
|
60
|
+
# :Socrates a :Mortal .
|
|
61
|
+
# via the schematic forward rule:
|
|
62
|
+
# {
|
|
63
|
+
# :Socrates a :Mortal .
|
|
64
|
+
# } => {
|
|
65
|
+
# :test :is true .
|
|
66
|
+
# } .
|
|
67
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
68
|
+
# ----------------------------------------------------------------------
|
|
69
|
+
|
|
70
|
+
:test :is true .
|
|
71
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@prefix : <https://eyereasoner.github.io/ns#> .
|
|
2
|
+
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
|
3
|
+
|
|
4
|
+
# ----------------------------------------------------------------------
|
|
5
|
+
# Proof for derived triple:
|
|
6
|
+
# {
|
|
7
|
+
# ?x :childOf ?y .
|
|
8
|
+
# } <= {
|
|
9
|
+
# ?y :parentOf ?x .
|
|
10
|
+
# } .
|
|
11
|
+
# It holds because the following instance of the rule body is provable:
|
|
12
|
+
# :parentOf :invOf :childOf .
|
|
13
|
+
# via the schematic forward rule:
|
|
14
|
+
# {
|
|
15
|
+
# ?p :invOf ?q .
|
|
16
|
+
# } => {
|
|
17
|
+
# {
|
|
18
|
+
# ?x ?q ?y .
|
|
19
|
+
# } <= {
|
|
20
|
+
# ?y ?p ?x .
|
|
21
|
+
# } .
|
|
22
|
+
# } .
|
|
23
|
+
# with substitution (on rule variables):
|
|
24
|
+
# ?p = :parentOf
|
|
25
|
+
# ?q = :childOf
|
|
26
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
27
|
+
# ----------------------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
{
|
|
30
|
+
?x :childOf ?y .
|
|
31
|
+
} <= {
|
|
32
|
+
?y :parentOf ?x .
|
|
33
|
+
} .
|
|
34
|
+
|
|
35
|
+
# ----------------------------------------------------------------------
|
|
36
|
+
# Proof for derived triple:
|
|
37
|
+
# :bob :hasParent :alice .
|
|
38
|
+
# It holds because the following instance of the rule body is provable:
|
|
39
|
+
# :bob :childOf :alice .
|
|
40
|
+
# via the schematic forward rule:
|
|
41
|
+
# {
|
|
42
|
+
# ?x :childOf ?y .
|
|
43
|
+
# } => {
|
|
44
|
+
# ?x :hasParent ?y .
|
|
45
|
+
# } .
|
|
46
|
+
# with substitution (on rule variables):
|
|
47
|
+
# ?x = :bob
|
|
48
|
+
# ?y = :alice
|
|
49
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
50
|
+
# ----------------------------------------------------------------------
|
|
51
|
+
|
|
52
|
+
:bob :hasParent :alice .
|
|
53
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@prefix : <https://eyereasoner.github.io/ns#> .
|
|
2
|
+
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
|
3
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
4
|
+
|
|
5
|
+
# ----------------------------------------------------------------------
|
|
6
|
+
# Proof for derived triple:
|
|
7
|
+
# {
|
|
8
|
+
# ?y a :Dog .
|
|
9
|
+
# } => {
|
|
10
|
+
# :test :is true .
|
|
11
|
+
# } .
|
|
12
|
+
# It holds because the following instance of the rule body is provable:
|
|
13
|
+
# :Minka a :Cat .
|
|
14
|
+
# via the schematic forward rule:
|
|
15
|
+
# {
|
|
16
|
+
# ?x a :Cat .
|
|
17
|
+
# } => {
|
|
18
|
+
# {
|
|
19
|
+
# ?y a :Dog .
|
|
20
|
+
# } => {
|
|
21
|
+
# :test :is true .
|
|
22
|
+
# } .
|
|
23
|
+
# } .
|
|
24
|
+
# with substitution (on rule variables):
|
|
25
|
+
# ?x = :Minka
|
|
26
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
27
|
+
# ----------------------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
{
|
|
30
|
+
?y a :Dog .
|
|
31
|
+
} => {
|
|
32
|
+
:test :is true .
|
|
33
|
+
} .
|
|
34
|
+
|
|
35
|
+
# ----------------------------------------------------------------------
|
|
36
|
+
# Proof for derived triple:
|
|
37
|
+
# :test :is true .
|
|
38
|
+
# It holds because the following instance of the rule body is provable:
|
|
39
|
+
# :Charly a :Dog .
|
|
40
|
+
# via the schematic forward rule:
|
|
41
|
+
# {
|
|
42
|
+
# ?y a :Dog .
|
|
43
|
+
# } => {
|
|
44
|
+
# :test :is true .
|
|
45
|
+
# } .
|
|
46
|
+
# with substitution (on rule variables):
|
|
47
|
+
# ?y = :Charly
|
|
48
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
49
|
+
# ----------------------------------------------------------------------
|
|
50
|
+
|
|
51
|
+
:test :is true .
|
|
52
|
+
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
@prefix : <https://eyereasoner.github.io/ns#> .
|
|
2
|
+
|
|
3
|
+
# ----------------------------------------------------------------------
|
|
4
|
+
# Proof for derived triple:
|
|
5
|
+
# (:b :a) :edge 4 .
|
|
6
|
+
# It holds because the following instance of the rule body is provable:
|
|
7
|
+
# (:a :b) :edge 4 .
|
|
8
|
+
# via the schematic forward rule:
|
|
9
|
+
# {
|
|
10
|
+
# (?A ?B) :edge ?C .
|
|
11
|
+
# } => {
|
|
12
|
+
# (?B ?A) :edge ?C .
|
|
13
|
+
# } .
|
|
14
|
+
# with substitution (on rule variables):
|
|
15
|
+
# ?A = :a
|
|
16
|
+
# ?B = :b
|
|
17
|
+
# ?C = 4
|
|
18
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
19
|
+
# ----------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
(:b :a) :edge 4 .
|
|
22
|
+
|
|
23
|
+
# ----------------------------------------------------------------------
|
|
24
|
+
# Proof for derived triple:
|
|
25
|
+
# (:c :a) :edge 2 .
|
|
26
|
+
# It holds because the following instance of the rule body is provable:
|
|
27
|
+
# (:a :c) :edge 2 .
|
|
28
|
+
# via the schematic forward rule:
|
|
29
|
+
# {
|
|
30
|
+
# (?A ?B) :edge ?C .
|
|
31
|
+
# } => {
|
|
32
|
+
# (?B ?A) :edge ?C .
|
|
33
|
+
# } .
|
|
34
|
+
# with substitution (on rule variables):
|
|
35
|
+
# ?A = :a
|
|
36
|
+
# ?B = :c
|
|
37
|
+
# ?C = 2
|
|
38
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
39
|
+
# ----------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
(:c :a) :edge 2 .
|
|
42
|
+
|
|
43
|
+
# ----------------------------------------------------------------------
|
|
44
|
+
# Proof for derived triple:
|
|
45
|
+
# (:c :b) :edge 1 .
|
|
46
|
+
# It holds because the following instance of the rule body is provable:
|
|
47
|
+
# (:b :c) :edge 1 .
|
|
48
|
+
# via the schematic forward rule:
|
|
49
|
+
# {
|
|
50
|
+
# (?A ?B) :edge ?C .
|
|
51
|
+
# } => {
|
|
52
|
+
# (?B ?A) :edge ?C .
|
|
53
|
+
# } .
|
|
54
|
+
# with substitution (on rule variables):
|
|
55
|
+
# ?A = :b
|
|
56
|
+
# ?B = :c
|
|
57
|
+
# ?C = 1
|
|
58
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
59
|
+
# ----------------------------------------------------------------------
|
|
60
|
+
|
|
61
|
+
(:c :b) :edge 1 .
|
|
62
|
+
|
|
63
|
+
# ----------------------------------------------------------------------
|
|
64
|
+
# Proof for derived triple:
|
|
65
|
+
# (:d :b) :edge 5 .
|
|
66
|
+
# It holds because the following instance of the rule body is provable:
|
|
67
|
+
# (:b :d) :edge 5 .
|
|
68
|
+
# via the schematic forward rule:
|
|
69
|
+
# {
|
|
70
|
+
# (?A ?B) :edge ?C .
|
|
71
|
+
# } => {
|
|
72
|
+
# (?B ?A) :edge ?C .
|
|
73
|
+
# } .
|
|
74
|
+
# with substitution (on rule variables):
|
|
75
|
+
# ?A = :b
|
|
76
|
+
# ?B = :d
|
|
77
|
+
# ?C = 5
|
|
78
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
79
|
+
# ----------------------------------------------------------------------
|
|
80
|
+
|
|
81
|
+
(:d :b) :edge 5 .
|
|
82
|
+
|
|
83
|
+
# ----------------------------------------------------------------------
|
|
84
|
+
# Proof for derived triple:
|
|
85
|
+
# (:d :c) :edge 8 .
|
|
86
|
+
# It holds because the following instance of the rule body is provable:
|
|
87
|
+
# (:c :d) :edge 8 .
|
|
88
|
+
# via the schematic forward rule:
|
|
89
|
+
# {
|
|
90
|
+
# (?A ?B) :edge ?C .
|
|
91
|
+
# } => {
|
|
92
|
+
# (?B ?A) :edge ?C .
|
|
93
|
+
# } .
|
|
94
|
+
# with substitution (on rule variables):
|
|
95
|
+
# ?A = :c
|
|
96
|
+
# ?B = :d
|
|
97
|
+
# ?C = 8
|
|
98
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
99
|
+
# ----------------------------------------------------------------------
|
|
100
|
+
|
|
101
|
+
(:d :c) :edge 8 .
|
|
102
|
+
|
|
103
|
+
# ----------------------------------------------------------------------
|
|
104
|
+
# Proof for derived triple:
|
|
105
|
+
# (:e :c) :edge 10 .
|
|
106
|
+
# It holds because the following instance of the rule body is provable:
|
|
107
|
+
# (:c :e) :edge 10 .
|
|
108
|
+
# via the schematic forward rule:
|
|
109
|
+
# {
|
|
110
|
+
# (?A ?B) :edge ?C .
|
|
111
|
+
# } => {
|
|
112
|
+
# (?B ?A) :edge ?C .
|
|
113
|
+
# } .
|
|
114
|
+
# with substitution (on rule variables):
|
|
115
|
+
# ?A = :c
|
|
116
|
+
# ?B = :e
|
|
117
|
+
# ?C = 10
|
|
118
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
119
|
+
# ----------------------------------------------------------------------
|
|
120
|
+
|
|
121
|
+
(:e :c) :edge 10 .
|
|
122
|
+
|
|
123
|
+
# ----------------------------------------------------------------------
|
|
124
|
+
# Proof for derived triple:
|
|
125
|
+
# (:e :d) :edge 2 .
|
|
126
|
+
# It holds because the following instance of the rule body is provable:
|
|
127
|
+
# (:d :e) :edge 2 .
|
|
128
|
+
# via the schematic forward rule:
|
|
129
|
+
# {
|
|
130
|
+
# (?A ?B) :edge ?C .
|
|
131
|
+
# } => {
|
|
132
|
+
# (?B ?A) :edge ?C .
|
|
133
|
+
# } .
|
|
134
|
+
# with substitution (on rule variables):
|
|
135
|
+
# ?A = :d
|
|
136
|
+
# ?B = :e
|
|
137
|
+
# ?C = 2
|
|
138
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
139
|
+
# ----------------------------------------------------------------------
|
|
140
|
+
|
|
141
|
+
(:e :d) :edge 2 .
|
|
142
|
+
|
|
143
|
+
# ----------------------------------------------------------------------
|
|
144
|
+
# Proof for derived triple:
|
|
145
|
+
# (:f :d) :edge 6 .
|
|
146
|
+
# It holds because the following instance of the rule body is provable:
|
|
147
|
+
# (:d :f) :edge 6 .
|
|
148
|
+
# via the schematic forward rule:
|
|
149
|
+
# {
|
|
150
|
+
# (?A ?B) :edge ?C .
|
|
151
|
+
# } => {
|
|
152
|
+
# (?B ?A) :edge ?C .
|
|
153
|
+
# } .
|
|
154
|
+
# with substitution (on rule variables):
|
|
155
|
+
# ?A = :d
|
|
156
|
+
# ?B = :f
|
|
157
|
+
# ?C = 6
|
|
158
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
159
|
+
# ----------------------------------------------------------------------
|
|
160
|
+
|
|
161
|
+
(:f :d) :edge 6 .
|
|
162
|
+
|
|
163
|
+
# ----------------------------------------------------------------------
|
|
164
|
+
# Proof for derived triple:
|
|
165
|
+
# (:f :e) :edge 3 .
|
|
166
|
+
# It holds because the following instance of the rule body is provable:
|
|
167
|
+
# (:e :f) :edge 3 .
|
|
168
|
+
# via the schematic forward rule:
|
|
169
|
+
# {
|
|
170
|
+
# (?A ?B) :edge ?C .
|
|
171
|
+
# } => {
|
|
172
|
+
# (?B ?A) :edge ?C .
|
|
173
|
+
# } .
|
|
174
|
+
# with substitution (on rule variables):
|
|
175
|
+
# ?A = :e
|
|
176
|
+
# ?B = :f
|
|
177
|
+
# ?C = 3
|
|
178
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
179
|
+
# ----------------------------------------------------------------------
|
|
180
|
+
|
|
181
|
+
(:f :e) :edge 3 .
|
|
182
|
+
|
|
183
|
+
# ----------------------------------------------------------------------
|
|
184
|
+
# Proof for derived triple:
|
|
185
|
+
# (:a :f) :path ((:a :c :d :f) 16) .
|
|
186
|
+
# It holds because the following instance of the rule body is provable:
|
|
187
|
+
# (:a :f) :dijkstra ((:a :c :d :f) 16) .
|
|
188
|
+
# via the schematic forward rule:
|
|
189
|
+
# {
|
|
190
|
+
# (:a :f) :dijkstra (?Path ?Cost) .
|
|
191
|
+
# } => {
|
|
192
|
+
# (:a :f) :path (?Path ?Cost) .
|
|
193
|
+
# } .
|
|
194
|
+
# with substitution (on rule variables):
|
|
195
|
+
# ?Cost = 16
|
|
196
|
+
# ?Path = (:a :c :d :f)
|
|
197
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
198
|
+
# ----------------------------------------------------------------------
|
|
199
|
+
|
|
200
|
+
(:a :f) :path ((:a :c :d :f) 16) .
|
|
201
|
+
|
|
202
|
+
# ----------------------------------------------------------------------
|
|
203
|
+
# Proof for derived triple:
|
|
204
|
+
# (:a :f) :path ((:a :c :d :e :f) 15) .
|
|
205
|
+
# It holds because the following instance of the rule body is provable:
|
|
206
|
+
# (:a :f) :dijkstra ((:a :c :d :e :f) 15) .
|
|
207
|
+
# via the schematic forward rule:
|
|
208
|
+
# {
|
|
209
|
+
# (:a :f) :dijkstra (?Path ?Cost) .
|
|
210
|
+
# } => {
|
|
211
|
+
# (:a :f) :path (?Path ?Cost) .
|
|
212
|
+
# } .
|
|
213
|
+
# with substitution (on rule variables):
|
|
214
|
+
# ?Cost = 15
|
|
215
|
+
# ?Path = (:a :c :d :e :f)
|
|
216
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
217
|
+
# ----------------------------------------------------------------------
|
|
218
|
+
|
|
219
|
+
(:a :f) :path ((:a :c :d :e :f) 15) .
|
|
220
|
+
|
|
221
|
+
# ----------------------------------------------------------------------
|
|
222
|
+
# Proof for derived triple:
|
|
223
|
+
# (:a :f) :path ((:a :c :e :f) 15) .
|
|
224
|
+
# It holds because the following instance of the rule body is provable:
|
|
225
|
+
# (:a :f) :dijkstra ((:a :c :e :f) 15) .
|
|
226
|
+
# via the schematic forward rule:
|
|
227
|
+
# {
|
|
228
|
+
# (:a :f) :dijkstra (?Path ?Cost) .
|
|
229
|
+
# } => {
|
|
230
|
+
# (:a :f) :path (?Path ?Cost) .
|
|
231
|
+
# } .
|
|
232
|
+
# with substitution (on rule variables):
|
|
233
|
+
# ?Cost = 15
|
|
234
|
+
# ?Path = (:a :c :e :f)
|
|
235
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
236
|
+
# ----------------------------------------------------------------------
|
|
237
|
+
|
|
238
|
+
(:a :f) :path ((:a :c :e :f) 15) .
|
|
239
|
+
|
|
240
|
+
# ----------------------------------------------------------------------
|
|
241
|
+
# Proof for derived triple:
|
|
242
|
+
# (:a :f) :path ((:a :b :d :f) 15) .
|
|
243
|
+
# It holds because the following instance of the rule body is provable:
|
|
244
|
+
# (:a :f) :dijkstra ((:a :b :d :f) 15) .
|
|
245
|
+
# via the schematic forward rule:
|
|
246
|
+
# {
|
|
247
|
+
# (:a :f) :dijkstra (?Path ?Cost) .
|
|
248
|
+
# } => {
|
|
249
|
+
# (:a :f) :path (?Path ?Cost) .
|
|
250
|
+
# } .
|
|
251
|
+
# with substitution (on rule variables):
|
|
252
|
+
# ?Cost = 15
|
|
253
|
+
# ?Path = (:a :b :d :f)
|
|
254
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
255
|
+
# ----------------------------------------------------------------------
|
|
256
|
+
|
|
257
|
+
(:a :f) :path ((:a :b :d :f) 15) .
|
|
258
|
+
|
|
259
|
+
# ----------------------------------------------------------------------
|
|
260
|
+
# Proof for derived triple:
|
|
261
|
+
# (:a :f) :path ((:a :b :d :e :f) 14) .
|
|
262
|
+
# It holds because the following instance of the rule body is provable:
|
|
263
|
+
# (:a :f) :dijkstra ((:a :b :d :e :f) 14) .
|
|
264
|
+
# via the schematic forward rule:
|
|
265
|
+
# {
|
|
266
|
+
# (:a :f) :dijkstra (?Path ?Cost) .
|
|
267
|
+
# } => {
|
|
268
|
+
# (:a :f) :path (?Path ?Cost) .
|
|
269
|
+
# } .
|
|
270
|
+
# with substitution (on rule variables):
|
|
271
|
+
# ?Cost = 14
|
|
272
|
+
# ?Path = (:a :b :d :e :f)
|
|
273
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
274
|
+
# ----------------------------------------------------------------------
|
|
275
|
+
|
|
276
|
+
(:a :f) :path ((:a :b :d :e :f) 14) .
|
|
277
|
+
|
|
278
|
+
# ----------------------------------------------------------------------
|
|
279
|
+
# Proof for derived triple:
|
|
280
|
+
# (:a :f) :path ((:a :c :b :d :f) 14) .
|
|
281
|
+
# It holds because the following instance of the rule body is provable:
|
|
282
|
+
# (:a :f) :dijkstra ((:a :c :b :d :f) 14) .
|
|
283
|
+
# via the schematic forward rule:
|
|
284
|
+
# {
|
|
285
|
+
# (:a :f) :dijkstra (?Path ?Cost) .
|
|
286
|
+
# } => {
|
|
287
|
+
# (:a :f) :path (?Path ?Cost) .
|
|
288
|
+
# } .
|
|
289
|
+
# with substitution (on rule variables):
|
|
290
|
+
# ?Cost = 14
|
|
291
|
+
# ?Path = (:a :c :b :d :f)
|
|
292
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
293
|
+
# ----------------------------------------------------------------------
|
|
294
|
+
|
|
295
|
+
(:a :f) :path ((:a :c :b :d :f) 14) .
|
|
296
|
+
|
|
297
|
+
# ----------------------------------------------------------------------
|
|
298
|
+
# Proof for derived triple:
|
|
299
|
+
# (:a :f) :path ((:a :c :b :d :e :f) 13) .
|
|
300
|
+
# It holds because the following instance of the rule body is provable:
|
|
301
|
+
# (:a :f) :dijkstra ((:a :c :b :d :e :f) 13) .
|
|
302
|
+
# via the schematic forward rule:
|
|
303
|
+
# {
|
|
304
|
+
# (:a :f) :dijkstra (?Path ?Cost) .
|
|
305
|
+
# } => {
|
|
306
|
+
# (:a :f) :path (?Path ?Cost) .
|
|
307
|
+
# } .
|
|
308
|
+
# with substitution (on rule variables):
|
|
309
|
+
# ?Cost = 13
|
|
310
|
+
# ?Path = (:a :c :b :d :e :f)
|
|
311
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
312
|
+
# ----------------------------------------------------------------------
|
|
313
|
+
|
|
314
|
+
(:a :f) :path ((:a :c :b :d :e :f) 13) .
|
|
315
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@prefix : <https://eyereasoner.github.io/ns#> .
|
|
2
|
+
|
|
3
|
+
# ----------------------------------------------------------------------
|
|
4
|
+
# Proof for derived triple:
|
|
5
|
+
# :alice :mustHave :dogLicense .
|
|
6
|
+
# It holds because the following instance of the rule body is provable:
|
|
7
|
+
# :alice :hasDog :dog5 .
|
|
8
|
+
# (1 {
|
|
9
|
+
# :alice :hasDog ?Dog .
|
|
10
|
+
# } (1 1 1 1 1)) log:collectAllIn ?Scope .
|
|
11
|
+
# (1 1 1 1 1) math:sum 5 .
|
|
12
|
+
# 5 math:greaterThan 4 .
|
|
13
|
+
# via the schematic forward rule:
|
|
14
|
+
# {
|
|
15
|
+
# ?Subject :hasDog ?Any .
|
|
16
|
+
# (1 {
|
|
17
|
+
# ?Subject :hasDog ?Dog .
|
|
18
|
+
# } ?List) log:collectAllIn ?Scope .
|
|
19
|
+
# ?List math:sum ?Count .
|
|
20
|
+
# ?Count math:greaterThan 4 .
|
|
21
|
+
# } => {
|
|
22
|
+
# ?Subject :mustHave :dogLicense .
|
|
23
|
+
# } .
|
|
24
|
+
# with substitution (on rule variables):
|
|
25
|
+
# ?Any = :dog5
|
|
26
|
+
# ?Count = 5
|
|
27
|
+
# ?List = (1 1 1 1 1)
|
|
28
|
+
# ?Subject = :alice
|
|
29
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
30
|
+
# ----------------------------------------------------------------------
|
|
31
|
+
|
|
32
|
+
:alice :mustHave :dogLicense .
|
|
33
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@prefix : <http://example.org/socrates#> .
|
|
2
|
+
|
|
3
|
+
# ----------------------------------------------------------------------
|
|
4
|
+
# Proof for derived triple:
|
|
5
|
+
# :test :is true .
|
|
6
|
+
# It holds because the following instance of the rule body is provable:
|
|
7
|
+
# :X = :Y .
|
|
8
|
+
# via the schematic forward rule:
|
|
9
|
+
# {
|
|
10
|
+
# :X = :Y .
|
|
11
|
+
# } => {
|
|
12
|
+
# :test :is true .
|
|
13
|
+
# } .
|
|
14
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
15
|
+
# ----------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
:test :is true .
|
|
18
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@prefix : <http://example.org/socrates#> .
|
|
2
|
+
|
|
3
|
+
# ----------------------------------------------------------------------
|
|
4
|
+
# Proof for derived triple:
|
|
5
|
+
# :Socrates :is _:sk_0 .
|
|
6
|
+
# It holds because the following instance of the rule body is provable:
|
|
7
|
+
# :Socrates a :Human .
|
|
8
|
+
# via the schematic forward rule:
|
|
9
|
+
# {
|
|
10
|
+
# ?S a :Human .
|
|
11
|
+
# } => {
|
|
12
|
+
# ?S :is _:B .
|
|
13
|
+
# } .
|
|
14
|
+
# with substitution (on rule variables):
|
|
15
|
+
# ?S = :Socrates
|
|
16
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
17
|
+
# ----------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
:Socrates :is _:sk_0 .
|
|
20
|
+
|
|
21
|
+
# ----------------------------------------------------------------------
|
|
22
|
+
# Proof for derived triple:
|
|
23
|
+
# :Plato :is _:sk_1 .
|
|
24
|
+
# It holds because the following instance of the rule body is provable:
|
|
25
|
+
# :Plato a :Human .
|
|
26
|
+
# via the schematic forward rule:
|
|
27
|
+
# {
|
|
28
|
+
# ?S a :Human .
|
|
29
|
+
# } => {
|
|
30
|
+
# ?S :is _:B .
|
|
31
|
+
# } .
|
|
32
|
+
# with substitution (on rule variables):
|
|
33
|
+
# ?S = :Plato
|
|
34
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
35
|
+
# ----------------------------------------------------------------------
|
|
36
|
+
|
|
37
|
+
:Plato :is _:sk_1 .
|
|
38
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@prefix : <https://eyereasoner.github.io/eye/reasoning#> .
|
|
2
|
+
|
|
3
|
+
# ----------------------------------------------------------------------
|
|
4
|
+
# Proof for derived triple:
|
|
5
|
+
# :test :is {
|
|
6
|
+
# 0 :fibonacci 0 .
|
|
7
|
+
# 1 :fibonacci 1 .
|
|
8
|
+
# 10 :fibonacci 55 .
|
|
9
|
+
# 100 :fibonacci 354224848179261915075 .
|
|
10
|
+
# } .
|
|
11
|
+
# It holds because the following instance of the rule body is provable:
|
|
12
|
+
# 0 :fibonacci 0 .
|
|
13
|
+
# 1 :fibonacci 1 .
|
|
14
|
+
# 10 :fibonacci 55 .
|
|
15
|
+
# 100 :fibonacci 354224848179261915075 .
|
|
16
|
+
# via the schematic forward rule:
|
|
17
|
+
# {
|
|
18
|
+
# 0 :fibonacci ?F0 .
|
|
19
|
+
# 1 :fibonacci ?F1 .
|
|
20
|
+
# 10 :fibonacci ?F10 .
|
|
21
|
+
# 100 :fibonacci ?F100 .
|
|
22
|
+
# } => {
|
|
23
|
+
# :test :is {
|
|
24
|
+
# 0 :fibonacci ?F0 .
|
|
25
|
+
# 1 :fibonacci ?F1 .
|
|
26
|
+
# 10 :fibonacci ?F10 .
|
|
27
|
+
# 100 :fibonacci ?F100 .
|
|
28
|
+
# } .
|
|
29
|
+
# } .
|
|
30
|
+
# with substitution (on rule variables):
|
|
31
|
+
# ?F0 = 0
|
|
32
|
+
# ?F1 = 1
|
|
33
|
+
# ?F10 = 55
|
|
34
|
+
# ?F100 = 354224848179261915075
|
|
35
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
36
|
+
# ----------------------------------------------------------------------
|
|
37
|
+
|
|
38
|
+
:test :is {
|
|
39
|
+
0 :fibonacci 0 .
|
|
40
|
+
1 :fibonacci 1 .
|
|
41
|
+
10 :fibonacci 55 .
|
|
42
|
+
100 :fibonacci 354224848179261915075 .
|
|
43
|
+
} .
|
|
44
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@prefix : <http://example.org/> .
|
|
2
|
+
|
|
3
|
+
# ----------------------------------------------------------------------
|
|
4
|
+
# Proof for derived triple:
|
|
5
|
+
# :result :is true .
|
|
6
|
+
# It holds because the following instance of the rule body is provable:
|
|
7
|
+
# :c a :CompositeTask .
|
|
8
|
+
# ({
|
|
9
|
+
# :c :subTask ?s .
|
|
10
|
+
# } {
|
|
11
|
+
# ?s :state :Completed .
|
|
12
|
+
# }) log:forAllIn ?_b1 .
|
|
13
|
+
# via the schematic forward rule:
|
|
14
|
+
# {
|
|
15
|
+
# ?c a :CompositeTask .
|
|
16
|
+
# ({
|
|
17
|
+
# ?c :subTask ?s .
|
|
18
|
+
# } {
|
|
19
|
+
# ?s :state :Completed .
|
|
20
|
+
# }) log:forAllIn ?_b1 .
|
|
21
|
+
# } => {
|
|
22
|
+
# :result :is true .
|
|
23
|
+
# } .
|
|
24
|
+
# with substitution (on rule variables):
|
|
25
|
+
# ?c = :c
|
|
26
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
27
|
+
# ----------------------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
:result :is true .
|
|
30
|
+
|