eyeling 1.6.13 → 1.6.15

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.
Files changed (77) hide show
  1. package/README.md +8 -19
  2. package/examples/output/age.n3 +0 -17
  3. package/examples/output/alignment-demo.n3 +0 -572
  4. package/examples/output/backward.n3 +0 -15
  5. package/examples/output/basic-monadic.n3 +0 -105
  6. package/examples/output/brussels-brew-club.n3 +0 -476
  7. package/examples/output/cat-koko.n3 +0 -108
  8. package/examples/output/cobalt-kepler-kitchen.n3 +0 -7064
  9. package/examples/output/complex.n3 +0 -46
  10. package/examples/output/control-system.n3 +0 -75
  11. package/examples/output/cranberry-calculus.n3 +0 -1313
  12. package/examples/output/crypto-builtins-tests.n3 +0 -60
  13. package/examples/output/deep-taxonomy-10.n3 +0 -602
  14. package/examples/output/deep-taxonomy-100.n3 +1 -5733
  15. package/examples/output/deep-taxonomy-1000.n3 +1 -57033
  16. package/examples/output/deep-taxonomy-10000.n3 +1 -570033
  17. package/examples/output/derived-backward-rule-2.n3 +0 -58
  18. package/examples/output/derived-backward-rule.n3 +0 -44
  19. package/examples/output/derived-rule.n3 +0 -42
  20. package/examples/output/dijkstra.n3 +0 -297
  21. package/examples/output/dog.n3 +0 -30
  22. package/examples/output/drone-corridor-planner.n3 +0 -799
  23. package/examples/output/easter.n3 +0 -3570
  24. package/examples/output/equals.n3 +0 -15
  25. package/examples/output/ev-roundtrip-planner.n3 +0 -392
  26. package/examples/output/existential-rule.n3 +0 -34
  27. package/examples/output/expression-eval.n3 +0 -20
  28. package/examples/output/family-cousins.n3 +0 -636
  29. package/examples/output/fibonacci.n3 +0 -36
  30. package/examples/output/french-cities.n3 +0 -484
  31. package/examples/output/good-cobbler.n3 +0 -22
  32. package/examples/output/gps.n3 +0 -62
  33. package/examples/output/gray-code-counter.n3 +0 -17
  34. package/examples/output/hanoi.n3 +0 -17
  35. package/examples/output/jade-eigen-loom.n3 +0 -4690
  36. package/examples/output/json-pointer.n3 +0 -529
  37. package/examples/output/json-reconcile-vat.n3 +0 -12882
  38. package/examples/output/light-eaters.n3 +0 -311
  39. package/examples/output/list-builtins-tests.n3 +0 -167
  40. package/examples/output/list-iterate.n3 +0 -124
  41. package/examples/output/lldm.n3 +0 -960
  42. package/examples/output/log-collect-all-in.n3 +0 -117
  43. package/examples/output/log-for-all-in.n3 +0 -27
  44. package/examples/output/log-not-includes.n3 +0 -59
  45. package/examples/output/log-skolem.n3 +0 -17
  46. package/examples/output/log-uri.n3 +0 -42
  47. package/examples/output/math-builtins-tests.n3 +0 -4434
  48. package/examples/output/minimal-skos-alignment.n3 +0 -39
  49. package/examples/output/monkey.n3 +0 -36
  50. package/examples/output/odrl-trust.n3 +0 -46
  51. package/examples/output/oslo-steps-library-scholarly.n3 +0 -1260
  52. package/examples/output/oslo-steps-workflow-composition.n3 +0 -180
  53. package/examples/output/peano.n3 +0 -23
  54. package/examples/output/pi.n3 +0 -17
  55. package/examples/output/pillar.n3 +0 -32
  56. package/examples/output/polygon.n3 +0 -17
  57. package/examples/output/rdf-list.n3 +0 -28
  58. package/examples/output/reordering.n3 +0 -26
  59. package/examples/output/ruby-runge-workshop.n3 +0 -613
  60. package/examples/output/rule-matching.n3 +0 -26
  61. package/examples/output/saffron-slopeworks.n3 +0 -1447
  62. package/examples/output/self-referential.n3 +0 -81
  63. package/examples/output/similar.n3 +0 -15
  64. package/examples/output/snaf.n3 +0 -23
  65. package/examples/output/socrates.n3 +0 -21
  66. package/examples/output/spectral-week.n3 +0 -350
  67. package/examples/output/string-builtins-tests.n3 +0 -240
  68. package/examples/output/topaz-markov-mill.n3 +0 -4178
  69. package/examples/output/traffic-skos-aggregate.n3 +0 -3151
  70. package/examples/output/turing.n3 +0 -36
  71. package/examples/output/ultramarine-simpson-forge.n3 +0 -3873
  72. package/examples/output/witch.n3 +0 -107
  73. package/examples/output/zebra.n3 +0 -111
  74. package/eyeling.js +129 -25
  75. package/index.js +13 -6
  76. package/package.json +1 -1
  77. package/test/examples.test.js +1 -1
@@ -3,69 +3,11 @@
3
3
  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
4
4
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
5
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
6
  {
17
7
  :Socrates a :Human .
18
8
  } <= 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
9
  {
31
10
  :Human rdfs:subClassOf :Mortal .
32
11
  } <= 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
12
  :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
13
  :test :is true .
71
-
@@ -1,53 +1,9 @@
1
1
  @prefix : <https://eyereasoner.github.io/ns#> .
2
2
  @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
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
4
  {
30
5
  ?x :childOf ?y .
31
6
  } <= {
32
7
  ?y :parentOf ?x .
33
8
  } .
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
9
  :bob :hasParent :alice .
53
-
@@ -2,51 +2,9 @@
2
2
  @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
3
  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
4
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
5
  {
30
6
  ?y a :Dog .
31
7
  } => {
32
8
  :test :is true .
33
9
  } .
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
10
  :test :is true .
52
-
@@ -1,315 +1,18 @@
1
1
  @prefix : <https://eyereasoner.github.io/ns#> .
2
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
3
  (: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
4
  (: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
5
  (: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
6
  (: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
7
  (: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
8
  (: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
9
  (: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
10
  (: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
11
  (: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
12
  (: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
13
  (: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
14
  (: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
15
  (: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
16
  (: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
17
  (: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
18
  (:a :f) :path ((:a :c :b :d :e :f) 13) .
315
-
@@ -1,33 +1,3 @@
1
1
  @prefix : <https://eyereasoner.github.io/ns#> .
2
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
3
  :alice :mustHave :dogLicense .
33
-