eyeling 1.5.19 → 1.5.21
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/examples/expression-eval.n3 +70 -0
- package/examples/family-cousins.n3 +63 -0
- package/examples/gps.n3 +68 -0
- package/examples/light-eaters.n3 +109 -0
- package/examples/odrl-trust.n3 +146 -0
- package/examples/output/expression-eval.n3 +23 -0
- package/examples/output/family-cousins.n3 +663 -0
- package/examples/output/gps.n3 +53 -0
- package/examples/output/light-eaters.n3 +326 -0
- package/examples/output/odrl-trust.n3 +51 -0
- package/examples/output/spectral-week.n3 +366 -0
- package/examples/spectral-week.n3 +104 -0
- package/package.json +1 -1
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
@prefix : <http://example.org/light-eaters#> .
|
|
2
|
+
|
|
3
|
+
# ----------------------------------------------------------------------
|
|
4
|
+
# Proof for derived triple:
|
|
5
|
+
# :Forest :dailyLightEnergy 200 .
|
|
6
|
+
# It holds because the following instance of the rule body is provable:
|
|
7
|
+
# :Today :lightHours 10.0 .
|
|
8
|
+
# :Forest :lightIntensity 20.0 .
|
|
9
|
+
# (20.0 10.0) math:product 200 .
|
|
10
|
+
# via the schematic forward rule:
|
|
11
|
+
# {
|
|
12
|
+
# :Today :lightHours ?H .
|
|
13
|
+
# ?Place :lightIntensity ?I .
|
|
14
|
+
# (?I ?H) math:product ?E .
|
|
15
|
+
# } => {
|
|
16
|
+
# ?Place :dailyLightEnergy ?E .
|
|
17
|
+
# } .
|
|
18
|
+
# with substitution (on rule variables):
|
|
19
|
+
# ?E = 200
|
|
20
|
+
# ?H = 10.0
|
|
21
|
+
# ?I = 20.0
|
|
22
|
+
# ?Place = :Forest
|
|
23
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
24
|
+
# ----------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
:Forest :dailyLightEnergy 200 .
|
|
27
|
+
|
|
28
|
+
# ----------------------------------------------------------------------
|
|
29
|
+
# Proof for derived triple:
|
|
30
|
+
# :Meadow :dailyLightEnergy 1000 .
|
|
31
|
+
# It holds because the following instance of the rule body is provable:
|
|
32
|
+
# :Today :lightHours 10.0 .
|
|
33
|
+
# :Meadow :lightIntensity 100.0 .
|
|
34
|
+
# (100.0 10.0) math:product 1000 .
|
|
35
|
+
# via the schematic forward rule:
|
|
36
|
+
# {
|
|
37
|
+
# :Today :lightHours ?H .
|
|
38
|
+
# ?Place :lightIntensity ?I .
|
|
39
|
+
# (?I ?H) math:product ?E .
|
|
40
|
+
# } => {
|
|
41
|
+
# ?Place :dailyLightEnergy ?E .
|
|
42
|
+
# } .
|
|
43
|
+
# with substitution (on rule variables):
|
|
44
|
+
# ?E = 1000
|
|
45
|
+
# ?H = 10.0
|
|
46
|
+
# ?I = 100.0
|
|
47
|
+
# ?Place = :Meadow
|
|
48
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
49
|
+
# ----------------------------------------------------------------------
|
|
50
|
+
|
|
51
|
+
:Meadow :dailyLightEnergy 1000 .
|
|
52
|
+
|
|
53
|
+
# ----------------------------------------------------------------------
|
|
54
|
+
# Proof for derived triple:
|
|
55
|
+
# :Fern :storedEnergy 50 .
|
|
56
|
+
# It holds because the following instance of the rule body is provable:
|
|
57
|
+
# :Fern a :Plant .
|
|
58
|
+
# :Fern :location :Forest .
|
|
59
|
+
# :Forest :dailyLightEnergy 200 .
|
|
60
|
+
# :Fern :efficiency 0.25 .
|
|
61
|
+
# (200 0.25) math:product 50 .
|
|
62
|
+
# via the schematic forward rule:
|
|
63
|
+
# {
|
|
64
|
+
# ?Plant a :Plant .
|
|
65
|
+
# ?Plant :location ?Place .
|
|
66
|
+
# ?Place :dailyLightEnergy ?E .
|
|
67
|
+
# ?Plant :efficiency ?Eff .
|
|
68
|
+
# (?E ?Eff) math:product ?Stored .
|
|
69
|
+
# } => {
|
|
70
|
+
# ?Plant :storedEnergy ?Stored .
|
|
71
|
+
# } .
|
|
72
|
+
# with substitution (on rule variables):
|
|
73
|
+
# ?E = 200
|
|
74
|
+
# ?Eff = 0.25
|
|
75
|
+
# ?Place = :Forest
|
|
76
|
+
# ?Plant = :Fern
|
|
77
|
+
# ?Stored = 50
|
|
78
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
79
|
+
# ----------------------------------------------------------------------
|
|
80
|
+
|
|
81
|
+
:Fern :storedEnergy 50 .
|
|
82
|
+
|
|
83
|
+
# ----------------------------------------------------------------------
|
|
84
|
+
# Proof for derived triple:
|
|
85
|
+
# :Sunflower :storedEnergy 250 .
|
|
86
|
+
# It holds because the following instance of the rule body is provable:
|
|
87
|
+
# :Sunflower a :Plant .
|
|
88
|
+
# :Sunflower :location :Meadow .
|
|
89
|
+
# :Meadow :dailyLightEnergy 1000 .
|
|
90
|
+
# :Sunflower :efficiency 0.25 .
|
|
91
|
+
# (1000 0.25) math:product 250 .
|
|
92
|
+
# via the schematic forward rule:
|
|
93
|
+
# {
|
|
94
|
+
# ?Plant a :Plant .
|
|
95
|
+
# ?Plant :location ?Place .
|
|
96
|
+
# ?Place :dailyLightEnergy ?E .
|
|
97
|
+
# ?Plant :efficiency ?Eff .
|
|
98
|
+
# (?E ?Eff) math:product ?Stored .
|
|
99
|
+
# } => {
|
|
100
|
+
# ?Plant :storedEnergy ?Stored .
|
|
101
|
+
# } .
|
|
102
|
+
# with substitution (on rule variables):
|
|
103
|
+
# ?E = 1000
|
|
104
|
+
# ?Eff = 0.25
|
|
105
|
+
# ?Place = :Meadow
|
|
106
|
+
# ?Plant = :Sunflower
|
|
107
|
+
# ?Stored = 250
|
|
108
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
109
|
+
# ----------------------------------------------------------------------
|
|
110
|
+
|
|
111
|
+
:Sunflower :storedEnergy 250 .
|
|
112
|
+
|
|
113
|
+
# ----------------------------------------------------------------------
|
|
114
|
+
# Proof for derived triple:
|
|
115
|
+
# :Sunflower :netEnergy 100 .
|
|
116
|
+
# It holds because the following instance of the rule body is provable:
|
|
117
|
+
# :Sunflower :storedEnergy 250 .
|
|
118
|
+
# :Sunflower :maintenance 150.0 .
|
|
119
|
+
# (250 150.0) math:difference 100 .
|
|
120
|
+
# via the schematic forward rule:
|
|
121
|
+
# {
|
|
122
|
+
# ?Org :storedEnergy ?Stored .
|
|
123
|
+
# ?Org :maintenance ?Maint .
|
|
124
|
+
# (?Stored ?Maint) math:difference ?Net .
|
|
125
|
+
# } => {
|
|
126
|
+
# ?Org :netEnergy ?Net .
|
|
127
|
+
# } .
|
|
128
|
+
# with substitution (on rule variables):
|
|
129
|
+
# ?Maint = 150.0
|
|
130
|
+
# ?Net = 100
|
|
131
|
+
# ?Org = :Sunflower
|
|
132
|
+
# ?Stored = 250
|
|
133
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
134
|
+
# ----------------------------------------------------------------------
|
|
135
|
+
|
|
136
|
+
:Sunflower :netEnergy 100 .
|
|
137
|
+
|
|
138
|
+
# ----------------------------------------------------------------------
|
|
139
|
+
# Proof for derived triple:
|
|
140
|
+
# :Fern :netEnergy -100 .
|
|
141
|
+
# It holds because the following instance of the rule body is provable:
|
|
142
|
+
# :Fern :storedEnergy 50 .
|
|
143
|
+
# :Fern :maintenance 150.0 .
|
|
144
|
+
# (50 150.0) math:difference -100 .
|
|
145
|
+
# via the schematic forward rule:
|
|
146
|
+
# {
|
|
147
|
+
# ?Org :storedEnergy ?Stored .
|
|
148
|
+
# ?Org :maintenance ?Maint .
|
|
149
|
+
# (?Stored ?Maint) math:difference ?Net .
|
|
150
|
+
# } => {
|
|
151
|
+
# ?Org :netEnergy ?Net .
|
|
152
|
+
# } .
|
|
153
|
+
# with substitution (on rule variables):
|
|
154
|
+
# ?Maint = 150.0
|
|
155
|
+
# ?Net = -100
|
|
156
|
+
# ?Org = :Fern
|
|
157
|
+
# ?Stored = 50
|
|
158
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
159
|
+
# ----------------------------------------------------------------------
|
|
160
|
+
|
|
161
|
+
:Fern :netEnergy -100 .
|
|
162
|
+
|
|
163
|
+
# ----------------------------------------------------------------------
|
|
164
|
+
# Proof for derived triple:
|
|
165
|
+
# :Fern :canPhotosynthesize true .
|
|
166
|
+
# It holds because the following instance of the rule body is provable:
|
|
167
|
+
# :Fern a :Plant .
|
|
168
|
+
# :Fern :chlorophyll true .
|
|
169
|
+
# :Fern :storedEnergy 50 .
|
|
170
|
+
# (50 0.0) math:greaterThan true .
|
|
171
|
+
# via the schematic forward rule:
|
|
172
|
+
# {
|
|
173
|
+
# ?Plant a :Plant .
|
|
174
|
+
# ?Plant :chlorophyll true .
|
|
175
|
+
# ?Plant :storedEnergy ?Stored .
|
|
176
|
+
# (?Stored 0.0) math:greaterThan true .
|
|
177
|
+
# } => {
|
|
178
|
+
# ?Plant :canPhotosynthesize true .
|
|
179
|
+
# ?Plant :lightEater true .
|
|
180
|
+
# } .
|
|
181
|
+
# with substitution (on rule variables):
|
|
182
|
+
# ?Plant = :Fern
|
|
183
|
+
# ?Stored = 50
|
|
184
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
185
|
+
# ----------------------------------------------------------------------
|
|
186
|
+
|
|
187
|
+
:Fern :canPhotosynthesize true .
|
|
188
|
+
|
|
189
|
+
# ----------------------------------------------------------------------
|
|
190
|
+
# Proof for derived triple:
|
|
191
|
+
# :Fern :lightEater true .
|
|
192
|
+
# It holds because the following instance of the rule body is provable:
|
|
193
|
+
# :Fern a :Plant .
|
|
194
|
+
# :Fern :chlorophyll true .
|
|
195
|
+
# :Fern :storedEnergy 50 .
|
|
196
|
+
# (50 0.0) math:greaterThan true .
|
|
197
|
+
# via the schematic forward rule:
|
|
198
|
+
# {
|
|
199
|
+
# ?Plant a :Plant .
|
|
200
|
+
# ?Plant :chlorophyll true .
|
|
201
|
+
# ?Plant :storedEnergy ?Stored .
|
|
202
|
+
# (?Stored 0.0) math:greaterThan true .
|
|
203
|
+
# } => {
|
|
204
|
+
# ?Plant :canPhotosynthesize true .
|
|
205
|
+
# ?Plant :lightEater true .
|
|
206
|
+
# } .
|
|
207
|
+
# with substitution (on rule variables):
|
|
208
|
+
# ?Plant = :Fern
|
|
209
|
+
# ?Stored = 50
|
|
210
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
211
|
+
# ----------------------------------------------------------------------
|
|
212
|
+
|
|
213
|
+
:Fern :lightEater true .
|
|
214
|
+
|
|
215
|
+
# ----------------------------------------------------------------------
|
|
216
|
+
# Proof for derived triple:
|
|
217
|
+
# :Sunflower :canPhotosynthesize true .
|
|
218
|
+
# It holds because the following instance of the rule body is provable:
|
|
219
|
+
# :Sunflower a :Plant .
|
|
220
|
+
# :Sunflower :chlorophyll true .
|
|
221
|
+
# :Sunflower :storedEnergy 250 .
|
|
222
|
+
# (250 0.0) math:greaterThan true .
|
|
223
|
+
# via the schematic forward rule:
|
|
224
|
+
# {
|
|
225
|
+
# ?Plant a :Plant .
|
|
226
|
+
# ?Plant :chlorophyll true .
|
|
227
|
+
# ?Plant :storedEnergy ?Stored .
|
|
228
|
+
# (?Stored 0.0) math:greaterThan true .
|
|
229
|
+
# } => {
|
|
230
|
+
# ?Plant :canPhotosynthesize true .
|
|
231
|
+
# ?Plant :lightEater true .
|
|
232
|
+
# } .
|
|
233
|
+
# with substitution (on rule variables):
|
|
234
|
+
# ?Plant = :Sunflower
|
|
235
|
+
# ?Stored = 250
|
|
236
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
237
|
+
# ----------------------------------------------------------------------
|
|
238
|
+
|
|
239
|
+
:Sunflower :canPhotosynthesize true .
|
|
240
|
+
|
|
241
|
+
# ----------------------------------------------------------------------
|
|
242
|
+
# Proof for derived triple:
|
|
243
|
+
# :Sunflower :lightEater true .
|
|
244
|
+
# It holds because the following instance of the rule body is provable:
|
|
245
|
+
# :Sunflower a :Plant .
|
|
246
|
+
# :Sunflower :chlorophyll true .
|
|
247
|
+
# :Sunflower :storedEnergy 250 .
|
|
248
|
+
# (250 0.0) math:greaterThan true .
|
|
249
|
+
# via the schematic forward rule:
|
|
250
|
+
# {
|
|
251
|
+
# ?Plant a :Plant .
|
|
252
|
+
# ?Plant :chlorophyll true .
|
|
253
|
+
# ?Plant :storedEnergy ?Stored .
|
|
254
|
+
# (?Stored 0.0) math:greaterThan true .
|
|
255
|
+
# } => {
|
|
256
|
+
# ?Plant :canPhotosynthesize true .
|
|
257
|
+
# ?Plant :lightEater true .
|
|
258
|
+
# } .
|
|
259
|
+
# with substitution (on rule variables):
|
|
260
|
+
# ?Plant = :Sunflower
|
|
261
|
+
# ?Stored = 250
|
|
262
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
263
|
+
# ----------------------------------------------------------------------
|
|
264
|
+
|
|
265
|
+
:Sunflower :lightEater true .
|
|
266
|
+
|
|
267
|
+
# ----------------------------------------------------------------------
|
|
268
|
+
# Proof for derived triple:
|
|
269
|
+
# :Mushroom :lightEater false .
|
|
270
|
+
# It holds because the following instance of the rule body is provable:
|
|
271
|
+
# :Mushroom a :Fungus .
|
|
272
|
+
# via the schematic forward rule:
|
|
273
|
+
# {
|
|
274
|
+
# ?X a :Fungus .
|
|
275
|
+
# } => {
|
|
276
|
+
# ?X :lightEater false .
|
|
277
|
+
# } .
|
|
278
|
+
# with substitution (on rule variables):
|
|
279
|
+
# ?X = :Mushroom
|
|
280
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
281
|
+
# ----------------------------------------------------------------------
|
|
282
|
+
|
|
283
|
+
:Mushroom :lightEater false .
|
|
284
|
+
|
|
285
|
+
# ----------------------------------------------------------------------
|
|
286
|
+
# Proof for derived triple:
|
|
287
|
+
# :Sunflower :thriving true .
|
|
288
|
+
# It holds because the following instance of the rule body is provable:
|
|
289
|
+
# :Sunflower :netEnergy 100 .
|
|
290
|
+
# (100 0.0) math:greaterThan true .
|
|
291
|
+
# via the schematic forward rule:
|
|
292
|
+
# {
|
|
293
|
+
# ?Org :netEnergy ?Net .
|
|
294
|
+
# (?Net 0.0) math:greaterThan true .
|
|
295
|
+
# } => {
|
|
296
|
+
# ?Org :thriving true .
|
|
297
|
+
# } .
|
|
298
|
+
# with substitution (on rule variables):
|
|
299
|
+
# ?Net = 100
|
|
300
|
+
# ?Org = :Sunflower
|
|
301
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
302
|
+
# ----------------------------------------------------------------------
|
|
303
|
+
|
|
304
|
+
:Sunflower :thriving true .
|
|
305
|
+
|
|
306
|
+
# ----------------------------------------------------------------------
|
|
307
|
+
# Proof for derived triple:
|
|
308
|
+
# :Fern :hungry true .
|
|
309
|
+
# It holds because the following instance of the rule body is provable:
|
|
310
|
+
# :Fern :netEnergy -100 .
|
|
311
|
+
# (-100 0.0) math:notGreaterThan true .
|
|
312
|
+
# via the schematic forward rule:
|
|
313
|
+
# {
|
|
314
|
+
# ?Org :netEnergy ?Net .
|
|
315
|
+
# (?Net 0.0) math:notGreaterThan true .
|
|
316
|
+
# } => {
|
|
317
|
+
# ?Org :hungry true .
|
|
318
|
+
# } .
|
|
319
|
+
# with substitution (on rule variables):
|
|
320
|
+
# ?Net = -100
|
|
321
|
+
# ?Org = :Fern
|
|
322
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
323
|
+
# ----------------------------------------------------------------------
|
|
324
|
+
|
|
325
|
+
:Fern :hungry true .
|
|
326
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@prefix : <http://example.org/odrl-trust#> .
|
|
2
|
+
@prefix odrl: <http://www.w3.org/ns/odrl/2/> .
|
|
3
|
+
|
|
4
|
+
# ----------------------------------------------------------------------
|
|
5
|
+
# Proof for derived triple:
|
|
6
|
+
# :req1 :decision odrl:permit .
|
|
7
|
+
# It holds because the following instance of the rule body is provable:
|
|
8
|
+
# (:req1 odrl:permit 0.95) :cand true .
|
|
9
|
+
# (:req1 odrl:prohibit 0.70) :cand true .
|
|
10
|
+
# (0.95 0.70) math:greaterThan true .
|
|
11
|
+
# via the schematic forward rule:
|
|
12
|
+
# {
|
|
13
|
+
# (:req1 odrl:permit ?Sp) :cand true .
|
|
14
|
+
# (:req1 odrl:prohibit ?Sd) :cand true .
|
|
15
|
+
# (?Sp ?Sd) math:greaterThan true .
|
|
16
|
+
# } => {
|
|
17
|
+
# :req1 :decision odrl:permit .
|
|
18
|
+
# :req1 :confidence ?Sp .
|
|
19
|
+
# } .
|
|
20
|
+
# with substitution (on rule variables):
|
|
21
|
+
# ?Sd = 0.70
|
|
22
|
+
# ?Sp = 0.95
|
|
23
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
24
|
+
# ----------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
:req1 :decision odrl:permit .
|
|
27
|
+
|
|
28
|
+
# ----------------------------------------------------------------------
|
|
29
|
+
# Proof for derived triple:
|
|
30
|
+
# :req1 :confidence 0.95 .
|
|
31
|
+
# It holds because the following instance of the rule body is provable:
|
|
32
|
+
# (:req1 odrl:permit 0.95) :cand true .
|
|
33
|
+
# (:req1 odrl:prohibit 0.70) :cand true .
|
|
34
|
+
# (0.95 0.70) math:greaterThan true .
|
|
35
|
+
# via the schematic forward rule:
|
|
36
|
+
# {
|
|
37
|
+
# (:req1 odrl:permit ?Sp) :cand true .
|
|
38
|
+
# (:req1 odrl:prohibit ?Sd) :cand true .
|
|
39
|
+
# (?Sp ?Sd) math:greaterThan true .
|
|
40
|
+
# } => {
|
|
41
|
+
# :req1 :decision odrl:permit .
|
|
42
|
+
# :req1 :confidence ?Sp .
|
|
43
|
+
# } .
|
|
44
|
+
# with substitution (on rule variables):
|
|
45
|
+
# ?Sd = 0.70
|
|
46
|
+
# ?Sp = 0.95
|
|
47
|
+
# Therefore the derived triple above is entailed by the rules and facts.
|
|
48
|
+
# ----------------------------------------------------------------------
|
|
49
|
+
|
|
50
|
+
:req1 :confidence 0.95 .
|
|
51
|
+
|