eyeling 1.24.8 → 1.24.9
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/act-alarm-bit-interoperability.n3 +4 -4
- package/examples/act-barley-seed-lineage.n3 +4 -4
- package/examples/act-docking-abort.n3 +4 -4
- package/examples/act-gravity-mediator-witness.n3 +4 -4
- package/examples/act-isolation-breach.n3 +4 -4
- package/examples/act-photosynthetic-exciton-transfer.n3 +4 -4
- package/examples/act-sensor-memory-reset.n3 +4 -4
- package/examples/act-tunnel-junction-wake-switch.n3 +4 -4
- package/examples/act-yeast-self-reproduction.n3 +4 -4
- package/examples/annotation.n3 +1 -1
- package/examples/auroracare.n3 +22 -22
- package/examples/backward-recursion.n3 +1 -1
- package/examples/barley-seed-becoming.n3 +4 -4
- package/examples/bmi.n3 +4 -4
- package/examples/builtin-coverage.n3 +1 -1
- package/examples/calidor.n3 +1 -1
- package/examples/collection.n3 +1 -1
- package/examples/complex-matrix-stability.n3 +4 -4
- package/examples/context-association.n3 +1 -1
- package/examples/control-system.n3 +4 -4
- package/examples/deep-taxonomy-10.n3 +4 -4
- package/examples/deep-taxonomy-100.n3 +4 -4
- package/examples/deep-taxonomy-1000.n3 +4 -4
- package/examples/deep-taxonomy-10000.n3 +4 -4
- package/examples/deep-taxonomy-100000.n3 +2 -2
- package/examples/delfour.n3 +1 -1
- package/examples/digital-product-passport.n3 +1 -1
- package/examples/dijkstra-risk-path.n3 +1 -1
- package/examples/easter.n3 +4 -4
- package/examples/eco-route-insight.n3 +1 -1
- package/examples/flandor.n3 +1 -1
- package/examples/french-cities.n3 +4 -4
- package/examples/fundamental-theorem-arithmetic.n3 +4 -4
- package/examples/genetic-algorithm-knapsack.n3 +1 -1
- package/examples/genetic-algorithm.n3 +1 -1
- package/examples/genetic-knapsack-selection.n3 +1 -1
- package/examples/gps.n3 +4 -4
- package/examples/harborsmr.n3 +4 -4
- package/examples/input/ontology-question-generation.trig +79 -0
- package/examples/interop-demo.n3 +1 -1
- package/examples/matrix-mechanics.n3 +1 -1
- package/examples/medior.n3 +1 -1
- package/examples/n3-speaks-for-itself.n3 +1 -1
- package/examples/odrl-dpv-ehds-risk-ranked.n3 +1 -1
- package/examples/odrl-dpv-healthcare-risk-ranked.n3 +1 -1
- package/examples/odrl-dpv-risk-ranked.n3 +1 -1
- package/examples/odrl-risk-mitigation.n3 +1 -1
- package/examples/odrl-risk.n3 +1 -1
- package/examples/ontology-question-generation.n3 +409 -0
- package/examples/output/act-alarm-bit-interoperability.md +7 -3
- package/examples/output/act-barley-seed-lineage.md +7 -3
- package/examples/output/act-docking-abort.md +7 -3
- package/examples/output/act-gravity-mediator-witness.md +7 -3
- package/examples/output/act-isolation-breach.md +7 -3
- package/examples/output/act-photosynthetic-exciton-transfer.md +7 -3
- package/examples/output/act-sensor-memory-reset.md +7 -3
- package/examples/output/act-tunnel-junction-wake-switch.md +7 -3
- package/examples/output/act-yeast-self-reproduction.md +7 -3
- package/examples/output/annotation.md +6 -0
- package/examples/output/auroracare.md +25 -21
- package/examples/output/backward-recursion.md +5 -0
- package/examples/output/barley-seed-becoming.md +7 -3
- package/examples/output/bmi.md +7 -3
- package/examples/output/builtin-coverage.md +6 -0
- package/examples/output/calidor.md +4 -0
- package/examples/output/collection.md +6 -0
- package/examples/output/complex-matrix-stability.md +7 -3
- package/examples/output/context-association.md +5 -0
- package/examples/output/control-system.md +7 -3
- package/examples/output/deep-taxonomy-10.md +7 -3
- package/examples/output/deep-taxonomy-100.md +7 -3
- package/examples/output/deep-taxonomy-1000.md +7 -3
- package/examples/output/deep-taxonomy-10000.md +7 -3
- package/examples/output/deep-taxonomy-100000.md +7 -3
- package/examples/output/delfour.md +4 -0
- package/examples/output/digital-product-passport.md +4 -0
- package/examples/output/dijkstra-risk-path.md +5 -0
- package/examples/output/easter.md +34 -30
- package/examples/output/eco-route-insight.md +5 -0
- package/examples/output/flandor.md +4 -0
- package/examples/output/french-cities.md +7 -3
- package/examples/output/fundamental-theorem-arithmetic.md +7 -3
- package/examples/output/genetic-algorithm-knapsack.md +4 -0
- package/examples/output/genetic-algorithm.md +4 -0
- package/examples/output/genetic-knapsack-selection.md +5 -0
- package/examples/output/gps.md +7 -3
- package/examples/output/harborsmr.md +7 -3
- package/examples/output/interop-demo.md +4 -0
- package/examples/output/matrix-mechanics.md +4 -0
- package/examples/output/medior.md +4 -0
- package/examples/output/n3-speaks-for-itself.md +4 -0
- package/examples/output/odrl-dpv-ehds-risk-ranked.md +4 -0
- package/examples/output/odrl-dpv-healthcare-risk-ranked.md +4 -0
- package/examples/output/odrl-dpv-risk-ranked.md +4 -0
- package/examples/output/odrl-risk-mitigation.md +4 -0
- package/examples/output/odrl-risk.md +4 -0
- package/examples/output/ontology-question-generation.md +31 -0
- package/examples/output/parcellocker.md +7 -3
- package/examples/output/pn-junction-tunneling.md +4 -0
- package/examples/output/queens.md +4 -0
- package/examples/output/rc-discharge-envelope.md +5 -0
- package/examples/output/rdf-dataset.md +5 -0
- package/examples/output/rdf-message-flow.md +5 -0
- package/examples/output/rdf-messages.md +5 -0
- package/examples/output/resto.md +7 -3
- package/examples/output/school-placement-audit.md +5 -0
- package/examples/output/smoke-arithmetic.md +5 -0
- package/examples/output/sqrt2-cauchy.md +4 -0
- package/examples/output/sqrt2-dedekind.md +4 -0
- package/examples/output/sudoku.md +4 -0
- package/examples/output/transcendental-numbers-stretched.md +4 -0
- package/examples/output/transistor-switch.md +4 -0
- package/examples/output/triple-terms.md +5 -0
- package/examples/output/tunnel-junction-wake-switch-becoming.md +7 -3
- package/examples/output/wind-turbine.md +7 -3
- package/examples/parcellocker.n3 +2 -2
- package/examples/pn-junction-tunneling.n3 +1 -1
- package/examples/queens.n3 +1 -1
- package/examples/rc-discharge-envelope.n3 +1 -1
- package/examples/rdf-dataset.n3 +1 -1
- package/examples/rdf-message-flow.n3 +1 -1
- package/examples/rdf-messages.n3 +1 -1
- package/examples/resto.n3 +4 -4
- package/examples/school-placement-audit.n3 +1 -1
- package/examples/smoke-arithmetic.n3 +1 -1
- package/examples/sqrt2-cauchy.n3 +1 -1
- package/examples/sqrt2-dedekind.n3 +1 -1
- package/examples/sudoku.n3 +5 -5
- package/examples/transcendental-numbers-stretched.n3 +1 -1
- package/examples/transistor-switch.n3 +1 -1
- package/examples/triple-terms.n3 +1 -1
- package/examples/tunnel-junction-wake-switch-becoming.n3 +4 -4
- package/examples/wind-turbine.n3 +4 -4
- package/package.json +1 -1
|
@@ -10021,7 +10021,7 @@
|
|
|
10021
10021
|
|
|
10022
10022
|
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
|
|
10023
10023
|
|
|
10024
|
-
:000_md_title log:outputString "# deep-taxonomy-10000\n\n" .
|
|
10024
|
+
:000_md_title log:outputString "# deep-taxonomy-10000\n\n## Source files\n\n- [N3 rules](../deep-taxonomy-10000.n3)\n\n" .
|
|
10025
10025
|
|
|
10026
10026
|
# ARC checks
|
|
10027
10027
|
{ :ind a :N0. }
|
|
@@ -10051,13 +10051,13 @@
|
|
|
10051
10051
|
{
|
|
10052
10052
|
:report log:outputString "Deep Taxonomy - deep classification benchmark
|
|
10053
10053
|
|
|
10054
|
-
Answer
|
|
10054
|
+
## Answer
|
|
10055
10055
|
The test succeeds: starting from one individual classified as N0, the rules eventually classify it as N10000 and then as A2.
|
|
10056
10056
|
|
|
10057
|
-
Reason Why
|
|
10057
|
+
## Reason Why
|
|
10058
10058
|
Each rule moves the same individual one level deeper in the taxonomy and also adds two side labels. Because that chain continues all the way from N0 to N10000, the final rule deriving A2 fires, and that in turn makes the test true.
|
|
10059
10059
|
|
|
10060
|
-
Check
|
|
10060
|
+
## Check
|
|
10061
10061
|
C1 OK - the starting classification N0 is present.
|
|
10062
10062
|
C2 OK - the first expansion produced N1 together with side labels I1 and J1.
|
|
10063
10063
|
C3 OK - the chain reaches the midpoint N5000 and still carries both side-label branches.
|
|
@@ -100022,7 +100022,7 @@
|
|
|
100022
100022
|
|
|
100023
100023
|
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
|
|
100024
100024
|
|
|
100025
|
-
:000_md_title log:outputString "# deep-taxonomy-100000\n\n" .
|
|
100025
|
+
:000_md_title log:outputString "# deep-taxonomy-100000\n\n## Source files\n\n- [N3 rules](../deep-taxonomy-100000.n3)\n\n" .
|
|
100026
100026
|
|
|
100027
100027
|
# ARC checks
|
|
100028
100028
|
{ :ind a :N0. }
|
|
@@ -100050,5 +100050,5 @@
|
|
|
100050
100050
|
}
|
|
100051
100051
|
=>
|
|
100052
100052
|
{
|
|
100053
|
-
:report log:outputString "Deep Taxonomy - very deep classification benchmark\n\
|
|
100053
|
+
:report log:outputString "Deep Taxonomy - very deep classification benchmark\n\n## Answer\nThe test succeeds: starting from one individual classified as N0, the rules eventually classify it as N100000 and then as A2.\n\n## Reason Why\nEach rule moves the same individual one level deeper in the taxonomy and also adds two side labels. Because that chain continues all the way from N0 to N100000, the final rule deriving A2 fires, and that in turn makes the test true.\n\n## Check\nC1 OK - the starting classification N0 is present.\nC2 OK - the first expansion produced N1 together with side labels I1 and J1.\nC3 OK - the chain reaches the midpoint N50000 and still carries both side-label branches.\nC4 OK - the final taxonomy step from N99999 to N100000 was completed.\nC5 OK - once N100000 is reached, the terminal class A2 is derived.\nC6 OK - the success flag is raised only after the terminal class A2 is present.\n" .
|
|
100054
100054
|
} .
|
package/examples/delfour.n3
CHANGED
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
# ARC rendering through log:outputString
|
|
332
332
|
# --------------------------------------
|
|
333
333
|
|
|
334
|
-
:out01 log:outputString "# delfour\n\n## Answer\n" .
|
|
334
|
+
:out01 log:outputString "# delfour\n\n## Source files\n\n- [N3 rules](../delfour.n3)\n\n## Answer\n" .
|
|
335
335
|
:out02 log:outputString "The scanner is allowed to use a neutral shopping insight and recommends Low-Sugar Tea Biscuits instead of Classic Tea Biscuits.\n" .
|
|
336
336
|
:out03 log:outputString "case : delfour\n" .
|
|
337
337
|
:out04 log:outputString "decision : Allowed\n" .
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
|
18
18
|
@prefix string: <http://www.w3.org/2000/10/swap/string#> .
|
|
19
19
|
|
|
20
|
-
:000_md_title log:outputString "# digital-product-passport\n\n" .
|
|
20
|
+
:000_md_title log:outputString "# digital-product-passport\n\n## Source files\n\n- [N3 rules](../digital-product-passport.n3)\n\n" .
|
|
21
21
|
|
|
22
22
|
# --------------------
|
|
23
23
|
# 1) Actors and places
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
{
|
|
44
44
|
:Case :selectedPath :pathB; :trustGate :noEnumeratedPathIsLower; :notes :riskCanOutweighRawCost.
|
|
45
45
|
:pathB :routeText ?Route; :rawCost ?Raw; :riskSum ?Risk; :score ?Score; :edgeCount ?Edges.
|
|
46
|
-
("# dijkstra-risk-path\n\n## Answer\nselected path : %s\nraw cost : %.2f\nrisk sum : %.2f\nrisk-adjusted score : %.2f\nedges in selected path : %d\n\n## Explanation\nEach edge contributes its delivery cost plus the configured risk penalty. The N3 source enumerates the small graph's simple route candidates and compares the selected route against each alternative score. The selected route balances cost and risk through DepotB and LabD, while the apparently cheaper DepotC path is rejected once risk is priced in." ?Route ?Raw ?Risk ?Score ?Edges) string:format ?Block.
|
|
46
|
+
("# dijkstra-risk-path\n\n## Source files\n\n- [N3 rules](../dijkstra-risk-path.n3)\n- [Input TriG](../input/dijkstra-risk-path.trig)\n\n## Answer\nselected path : %s\nraw cost : %.2f\nrisk sum : %.2f\nrisk-adjusted score : %.2f\nedges in selected path : %d\n\n## Explanation\nEach edge contributes its delivery cost plus the configured risk penalty. The N3 source enumerates the small graph's simple route candidates and compares the selected route against each alternative score. The selected route balances cost and risk through DepotB and LabD, while the apparently cheaper DepotC path is rejected once risk is priced in." ?Route ?Raw ?Risk ?Score ?Edges) string:format ?Block.
|
|
47
47
|
} => {
|
|
48
48
|
:dijkstraRiskPath log:outputString ?Block.
|
|
49
49
|
:dijkstraRiskPath :selects :pathB.
|
package/examples/easter.n3
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
16
16
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
17
17
|
|
|
18
|
-
:000_md_title log:outputString "# easter\n\n" .
|
|
18
|
+
:000_md_title log:outputString "# easter\n\n## Source files\n\n- [N3 rules](../easter.n3)\n\n" .
|
|
19
19
|
|
|
20
20
|
<> rdfs:comment """This ARC-style version keeps the Gregorian computus from the original example and reports, for each sample year, an Answer, a Reason Why, and a set of independent Checks.""" .
|
|
21
21
|
|
|
@@ -197,13 +197,13 @@
|
|
|
197
197
|
(
|
|
198
198
|
"Easter — Gregorian computus\n\n"
|
|
199
199
|
"## " ?Y "\n"
|
|
200
|
-
"Answer\n"
|
|
200
|
+
"## Answer\n"
|
|
201
201
|
"Easter Sunday falls on " ?Month " " ?Day ".\n\n"
|
|
202
|
-
"Reason Why\n"
|
|
202
|
+
"## Reason Why\n"
|
|
203
203
|
"For year " ?Y ", the computus gives j=" ?J ", k=" ?K ", q=" ?Q
|
|
204
204
|
", r=" ?R ", v=" ?V ", and final month/day numbers x=" ?X ", z=" ?Z ". "
|
|
205
205
|
"Because the day is z+1, the resulting Easter date is " ?Month " " ?Day ".\n\n"
|
|
206
|
-
"Check\n"
|
|
206
|
+
"## Check\n"
|
|
207
207
|
?C1 ?C2 ?C3 ?C4 ?C5
|
|
208
208
|
) string:concatenation ?Block. }
|
|
209
209
|
=>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
:Shipment :id ?ShipmentId; :payloadTons ?PayloadTons.
|
|
35
35
|
:Envelope :rawDataExported ?Raw; :payloadDigest ?Digest; :signatureKey ?Key; :signature ?Signature.
|
|
36
36
|
:Policy :fuelIndexThreshold ?Threshold; :signatureAlgorithm ?Algorithm.
|
|
37
|
-
("# eco-route-insight\n\n## Answer\ninsight status : issue\nshow eco banner : %s\naudience : %s\nallowed use : %s\nsuggested route : %s\ncurrent fuel index : %.2f\nsuggested fuel index : %.2f\nestimated saving : %.2f\nexpires at : %s\nraw data exported : %s\nsignature algorithm : %s\npayload digest : %s\nsignature key : %s\nsignature : %s\n\n## Explanation\nThe current route uses fuel index = distanceKm × (payloadKg / 1000) × gradientFactor. For %s, Current urban route gives %.2f × %.2f × %.2f = %.2f. The policy threshold is %.2f, so a local eco banner is justified. The selected alternative %s gives %.2f × %.2f × %.2f = %.2f, saving %.2f while staying within the ETA delay limit. The signed envelope exposes audience, use, expiry, route suggestion, and compact fuel indices, but not raw payload, GPS trace, driver behavior, or raw telemetry." ?Show ?Audience ?Use ?AltId ?CurrentIndex ?AltIndex ?Saving ?Expiry ?Raw ?Algorithm ?Digest ?Key ?Signature ?ShipmentId ?CurrentDistance ?PayloadTons ?CurrentGradient ?CurrentIndex ?Threshold ?AltId ?AltDistance ?PayloadTons ?AltGradient ?AltIndex ?Saving) string:format ?Block.
|
|
37
|
+
("# eco-route-insight\n\n## Source files\n\n- [N3 rules](../eco-route-insight.n3)\n- [Input TriG](../input/eco-route-insight.trig)\n\n## Answer\ninsight status : issue\nshow eco banner : %s\naudience : %s\nallowed use : %s\nsuggested route : %s\ncurrent fuel index : %.2f\nsuggested fuel index : %.2f\nestimated saving : %.2f\nexpires at : %s\nraw data exported : %s\nsignature algorithm : %s\npayload digest : %s\nsignature key : %s\nsignature : %s\n\n## Explanation\nThe current route uses fuel index = distanceKm × (payloadKg / 1000) × gradientFactor. For %s, Current urban route gives %.2f × %.2f × %.2f = %.2f. The policy threshold is %.2f, so a local eco banner is justified. The selected alternative %s gives %.2f × %.2f × %.2f = %.2f, saving %.2f while staying within the ETA delay limit. The signed envelope exposes audience, use, expiry, route suggestion, and compact fuel indices, but not raw payload, GPS trace, driver behavior, or raw telemetry." ?Show ?Audience ?Use ?AltId ?CurrentIndex ?AltIndex ?Saving ?Expiry ?Raw ?Algorithm ?Digest ?Key ?Signature ?ShipmentId ?CurrentDistance ?PayloadTons ?CurrentGradient ?CurrentIndex ?Threshold ?AltId ?AltDistance ?PayloadTons ?AltGradient ?AltIndex ?Saving) string:format ?Block.
|
|
38
38
|
} => {
|
|
39
39
|
:ecoRouteInsight log:outputString ?Block.
|
|
40
40
|
:ecoRouteInsight :issues :Insight.
|
package/examples/flandor.n3
CHANGED
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
# ARC rendering through log:outputString
|
|
372
372
|
# --------------------------------------
|
|
373
373
|
|
|
374
|
-
:out01 log:outputString "# flandor\n\n## Answer\n" .
|
|
374
|
+
:out01 log:outputString "# flandor\n\n## Source files\n\n- [N3 rules](../flandor.n3)\n\n## Answer\n" .
|
|
375
375
|
:out02 log:outputString "Name: Flandor\n" .
|
|
376
376
|
:out03 log:outputString "Region: Flanders\n" .
|
|
377
377
|
:out04 log:outputString "Metric: regional_retooling_priority\n" .
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
@prefix string: <http://www.w3.org/2000/10/swap/string#>.
|
|
15
15
|
@prefix : <https://example.org/french-cities#>.
|
|
16
16
|
|
|
17
|
-
:000_md_title log:outputString "# french-cities\n\n" .
|
|
17
|
+
:000_md_title log:outputString "# french-cities\n\n## Source files\n\n- [N3 rules](../french-cities.n3)\n\n" .
|
|
18
18
|
|
|
19
19
|
# ---------------------------------------------------------------------------
|
|
20
20
|
# Facts
|
|
@@ -130,16 +130,16 @@
|
|
|
130
130
|
:check :c1 ?C1; :c2 ?C2; :c3 ?C3; :c4 ?C4.
|
|
131
131
|
(
|
|
132
132
|
"French cities — ARC style graph reachability\n\n"
|
|
133
|
-
"Answer\n"
|
|
133
|
+
"## Answer\n"
|
|
134
134
|
?Outcome "\n\n"
|
|
135
|
-
"Reason Why\n"
|
|
135
|
+
"## Reason Why\n"
|
|
136
136
|
"The original example says that every :oneway link is also a :path, and that :path is transitive. "
|
|
137
137
|
"So once Angers can reach Nantes directly, longer routes can be built by chaining earlier links. "
|
|
138
138
|
?Angers " reaches Nantes directly. "
|
|
139
139
|
?LeMans " reaches Nantes through Angers. "
|
|
140
140
|
?Chartres " reaches Nantes through Le Mans and Angers. "
|
|
141
141
|
?Paris " reaches Nantes through Chartres, Le Mans, and Angers.\n\n"
|
|
142
|
-
"Check\n"
|
|
142
|
+
"## Check\n"
|
|
143
143
|
"C1 " ?C1 "\n"
|
|
144
144
|
"C2 " ?C2 "\n"
|
|
145
145
|
"C3 " ?C3 "\n"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
|
|
18
18
|
@prefix string: <http://www.w3.org/2000/10/swap/string#> .
|
|
19
19
|
|
|
20
|
-
:000_md_title log:outputString "# fundamental-theorem-arithmetic\n\n" .
|
|
20
|
+
:000_md_title log:outputString "# fundamental-theorem-arithmetic\n\n## Source files\n\n- [N3 rules](../fundamental-theorem-arithmetic.n3)\n\n" .
|
|
21
21
|
|
|
22
22
|
# --------------
|
|
23
23
|
# Editable input
|
|
@@ -224,17 +224,17 @@ true .
|
|
|
224
224
|
:Check :c6 ?C6.
|
|
225
225
|
(
|
|
226
226
|
"Fundamental Theorem of Arithmetic — ARC-style\n\n"
|
|
227
|
-
"Answer\n"
|
|
227
|
+
"## Answer\n"
|
|
228
228
|
"For n = " ?N ", the prime factors are " ?Flat ", the prime-power form is " ?PrimePower
|
|
229
229
|
", and the product of these factors is " ?N " with " ?Distinct " distinct primes.\n\n"
|
|
230
|
-
"Reason Why\n"
|
|
230
|
+
"## Reason Why\n"
|
|
231
231
|
"Existence in this run comes from repeated smallest-divisor decomposition: " ?N
|
|
232
232
|
" factors as " ?Flat ". Each distinct factor is prime. "
|
|
233
233
|
"For uniqueness up to order, the reverse traversal gives " ?LargestFlat
|
|
234
234
|
", and both traversals sort to the same multiset of primes. "
|
|
235
235
|
"So this concrete case exhibits the Fundamental Theorem of Arithmetic for " ?N
|
|
236
236
|
": a prime factorization exists and is unique up to order. The extreme prime factors are " ?Smallest " and " ?Largest ".\n\n"
|
|
237
|
-
"Check\n"
|
|
237
|
+
"## Check\n"
|
|
238
238
|
"C1 " ?C1 "\n"
|
|
239
239
|
"C2 " ?C2 "\n"
|
|
240
240
|
"C3 " ?C3 "\n"
|
|
@@ -257,4 +257,4 @@
|
|
|
257
257
|
?Best ?Ok ?W ?V ?Gen ) string:format ?Line
|
|
258
258
|
}
|
|
259
259
|
log:query
|
|
260
|
-
{ 0 log:outputString "# genetic-algorithm-knapsack\n\n". 1 log:outputString ?Line }.
|
|
260
|
+
{ 0 log:outputString "# genetic-algorithm-knapsack\n\n## Source files\n\n- [N3 rules](../genetic-algorithm-knapsack.n3)\n\n". 1 log:outputString ?Line }.
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
:Run :capacity ?Capacity; :localSearchStopsAt :FinalLocal.
|
|
24
24
|
:FinalLocal :genome ?Genome; :selectedItems ?Items; :weight ?Weight; :value ?Value; :fitness ?Fitness; :generationsEvaluated ?Generations.
|
|
25
25
|
:ExhaustiveOptimum :genome ?OptGenome; :value ?OptValue.
|
|
26
|
-
("# genetic-knapsack-selection\n\n## Answer\nfinal genome : %s\nselected items : %s\nweight : %d / %d\nvalue : %d\nfitness : %d\ngenerations evaluated : %d\nexhaustive optimum value : %d at genome %s\n\n## Explanation\nEach genome bit says whether the corresponding item is selected for the knapsack. Feasible candidates get fitness 1000000 minus value, so higher value means lower fitness; overweight candidates are penalized above every feasible candidate. The N3 source records the deterministic local-search result and validates that the final genome respects capacity and has no strictly better one-bit neighbor. For transparency, an exhaustive enumeration also records the global best feasible value, showing this is a local mutation search rather than a global-optimality claim." ?Genome ?Items ?Weight ?Capacity ?Value ?Fitness ?Generations ?OptValue ?OptGenome) string:format ?Block.
|
|
26
|
+
("# genetic-knapsack-selection\n\n## Source files\n\n- [N3 rules](../genetic-knapsack-selection.n3)\n- [Input TriG](../input/genetic-knapsack-selection.trig)\n\n## Answer\nfinal genome : %s\nselected items : %s\nweight : %d / %d\nvalue : %d\nfitness : %d\ngenerations evaluated : %d\nexhaustive optimum value : %d at genome %s\n\n## Explanation\nEach genome bit says whether the corresponding item is selected for the knapsack. Feasible candidates get fitness 1000000 minus value, so higher value means lower fitness; overweight candidates are penalized above every feasible candidate. The N3 source records the deterministic local-search result and validates that the final genome respects capacity and has no strictly better one-bit neighbor. For transparency, an exhaustive enumeration also records the global best feasible value, showing this is a local mutation search rather than a global-optimality claim." ?Genome ?Items ?Weight ?Capacity ?Value ?Fitness ?Generations ?OptValue ?OptGenome) string:format ?Block.
|
|
27
27
|
} => {
|
|
28
28
|
:geneticKnapsackSelection log:outputString ?Block.
|
|
29
29
|
:geneticKnapsackSelection :selects :FinalLocal.
|
package/examples/gps.n3
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@prefix gps: <https://example.org/gps#>.
|
|
16
16
|
@prefix : <https://example.org/gps-case#>.
|
|
17
17
|
|
|
18
|
-
:000_md_title log:outputString "# gps\n\n" .
|
|
18
|
+
:000_md_title log:outputString "# gps\n\n## Source files\n\n- [N3 rules](../gps.n3)\n\n" .
|
|
19
19
|
|
|
20
20
|
# -----
|
|
21
21
|
# Facts
|
|
@@ -107,17 +107,17 @@
|
|
|
107
107
|
:routeViaKortrijk :label ?AltLabel; :duration ?AltDur; :cost ?AltCost; :belief ?AltBel; :comfort ?AltComf.
|
|
108
108
|
(
|
|
109
109
|
"GPS — Goal driven route planning\n\n"
|
|
110
|
-
"Answer\n"
|
|
110
|
+
"## Answer\n"
|
|
111
111
|
?Outcome "\n"
|
|
112
112
|
"Recommended route: " ?BestLabel "\n\n"
|
|
113
|
-
"Reason Why\n"
|
|
113
|
+
"## Reason Why\n"
|
|
114
114
|
"From Gent to Oostende, the planner found two routes in this small map. "
|
|
115
115
|
"The direct route (" ?BestLabel ") takes " ?BestDur " seconds at cost " ?BestCost
|
|
116
116
|
", with belief " ?BestBel " and comfort " ?BestComf ". "
|
|
117
117
|
"The alternative (" ?AltLabel ") takes " ?AltDur " seconds at cost " ?AltCost
|
|
118
118
|
", with belief " ?AltBel " and comfort " ?AltComf ". "
|
|
119
119
|
"So the direct route is faster, cheaper, more reliable, and slightly more comfortable.\n\n"
|
|
120
|
-
"Check\n"
|
|
120
|
+
"## Check\n"
|
|
121
121
|
"C1 OK - the direct Gent → Brugge → Oostende route was derived.\n"
|
|
122
122
|
"C2 OK - the alternative Gent → Kortrijk → Brugge → Oostende route was derived.\n"
|
|
123
123
|
"C3 OK - the recommended route is faster than the alternative.\n"
|
package/examples/harborsmr.n3
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
@prefix string: <http://www.w3.org/2000/10/swap/string#> .
|
|
23
23
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
24
24
|
|
|
25
|
-
:000_md_title log:outputString "# harborsmr\n\n" .
|
|
25
|
+
:000_md_title log:outputString "# harborsmr\n\n## Source files\n\n- [N3 rules](../harborsmr.n3)\n\n" .
|
|
26
26
|
|
|
27
27
|
# -----
|
|
28
28
|
# Facts
|
|
@@ -186,14 +186,14 @@
|
|
|
186
186
|
=> {
|
|
187
187
|
:out log:outputString """HarborSMR — bounded flexible-export insight for port electrolysis
|
|
188
188
|
|
|
189
|
-
Answer
|
|
189
|
+
## Answer
|
|
190
190
|
PERMIT
|
|
191
191
|
The port hydrogen hub may use the SMR insight to run PEM electrolyzer train 2 at 16 MW from 14:00 to 18:00.
|
|
192
192
|
|
|
193
|
-
Reason Why
|
|
193
|
+
## Reason Why
|
|
194
194
|
The operator shares only a narrow, expiring insight that a temporary 18 MW flexible-export window is available. The request is for electrolysis dispatch only, the requested 16 MW fits inside the permitted window, safety margins are above threshold, no outage blocks the window, and the policy forbids redistribution for market resale. Raw reactor telemetry stays local.
|
|
195
195
|
|
|
196
|
-
Check
|
|
196
|
+
## Check
|
|
197
197
|
C1 OK - reserve margin exceeds the dispatch threshold
|
|
198
198
|
C2 OK - cooling margin exceeds the dispatch threshold
|
|
199
199
|
C3 OK - no planned outage blocks the window
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@prefix ex: <http://example.org/ontology-question-generation/domain#> .
|
|
2
|
+
@prefix see: <https://eyereasoner.github.io/eye/reasoning#> .
|
|
3
|
+
@prefix in: <http://example.org/eyeling/input#> .
|
|
4
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
5
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
6
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
7
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
8
|
+
|
|
9
|
+
# A tiny ontology containing common OWL/RDFS patterns from which
|
|
10
|
+
# competency questions can be generated.
|
|
11
|
+
|
|
12
|
+
ex:Person a owl:Class ;
|
|
13
|
+
rdfs:label "person" .
|
|
14
|
+
|
|
15
|
+
ex:Organization a owl:Class ;
|
|
16
|
+
rdfs:label "organization" .
|
|
17
|
+
|
|
18
|
+
ex:Project a owl:Class ;
|
|
19
|
+
rdfs:label "project" .
|
|
20
|
+
|
|
21
|
+
ex:Employee a owl:Class ;
|
|
22
|
+
rdfs:label "employee" ;
|
|
23
|
+
rdfs:subClassOf ex:Person ;
|
|
24
|
+
rdfs:subClassOf [
|
|
25
|
+
a owl:Restriction ;
|
|
26
|
+
owl:onProperty ex:worksFor ;
|
|
27
|
+
owl:someValuesFrom ex:Organization
|
|
28
|
+
] ;
|
|
29
|
+
rdfs:subClassOf [
|
|
30
|
+
a owl:Restriction ;
|
|
31
|
+
owl:onProperty ex:assignedTo ;
|
|
32
|
+
owl:minCardinality 1
|
|
33
|
+
] .
|
|
34
|
+
|
|
35
|
+
ex:worksFor a owl:ObjectProperty ;
|
|
36
|
+
rdfs:label "works for" ;
|
|
37
|
+
rdfs:domain ex:Person ;
|
|
38
|
+
rdfs:range ex:Organization ;
|
|
39
|
+
owl:inverseOf ex:employs .
|
|
40
|
+
|
|
41
|
+
ex:employs a owl:ObjectProperty ;
|
|
42
|
+
rdfs:label "employs" ;
|
|
43
|
+
rdfs:domain ex:Organization ;
|
|
44
|
+
rdfs:range ex:Person .
|
|
45
|
+
|
|
46
|
+
ex:assignedTo a owl:ObjectProperty ;
|
|
47
|
+
rdfs:label "assigned to" ;
|
|
48
|
+
rdfs:domain ex:Employee ;
|
|
49
|
+
rdfs:range ex:Project .
|
|
50
|
+
|
|
51
|
+
ex:birthDate a owl:DatatypeProperty, owl:FunctionalProperty ;
|
|
52
|
+
rdfs:label "birth date" ;
|
|
53
|
+
rdfs:domain ex:Person ;
|
|
54
|
+
rdfs:range xsd:date .
|
|
55
|
+
|
|
56
|
+
ex:legalName a owl:DatatypeProperty ;
|
|
57
|
+
rdfs:label "legal name" ;
|
|
58
|
+
rdfs:domain ex:Organization ;
|
|
59
|
+
rdfs:range xsd:string .
|
|
60
|
+
|
|
61
|
+
ex:Organization owl:disjointWith ex:Person .
|
|
62
|
+
|
|
63
|
+
ex:principalEmployer rdfs:subPropertyOf ex:worksFor ;
|
|
64
|
+
rdfs:label "principal employer" .
|
|
65
|
+
|
|
66
|
+
xsd:date a rdfs:Datatype ;
|
|
67
|
+
rdfs:label "date" .
|
|
68
|
+
|
|
69
|
+
xsd:string a rdfs:Datatype ;
|
|
70
|
+
rdfs:label "string" .
|
|
71
|
+
|
|
72
|
+
in:metadata {
|
|
73
|
+
in:run a see:InputDataset .
|
|
74
|
+
in:run see:name "ontology-question-generation" .
|
|
75
|
+
in:run see:title "Ontology Question Generation" .
|
|
76
|
+
in:run see:sourceFile "examples/ontology-question-generation.n3" .
|
|
77
|
+
in:run see:description "Small OWL/RDFS ontology used to generate Markdown competency questions from ontological patterns." .
|
|
78
|
+
in:run see:compiler "Eyeling RDF/TriG input sidecar" .
|
|
79
|
+
}
|
package/examples/interop-demo.n3
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
|
|
15
15
|
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
|
|
16
16
|
|
|
17
|
-
"000" log:outputString "# interop-demo\n\n" .
|
|
17
|
+
"000" log:outputString "# interop-demo\n\n## Source files\n\n- [N3 rules](../interop-demo.n3)\n\n" .
|
|
18
18
|
|
|
19
19
|
# ---------------------------------------------
|
|
20
20
|
# 1) Three independent apps (different schemas)
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
}
|
|
242
242
|
=>
|
|
243
243
|
{
|
|
244
|
-
:s01 log:outputString "# matrix-mechanics\n\n## Answer\n" .
|
|
244
|
+
:s01 log:outputString "# matrix-mechanics\n\n## Source files\n\n- [N3 rules](../matrix-mechanics.n3)\n\n## Answer\n" .
|
|
245
245
|
:s02 log:outputString ?txt .
|
|
246
246
|
:s03 log:outputString "\n\n## Reason Why\n" .
|
|
247
247
|
} .
|
package/examples/medior.n3
CHANGED
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
# ARC rendering through log:outputString
|
|
367
367
|
# --------------------------------------
|
|
368
368
|
|
|
369
|
-
:out01 log:outputString "# medior\n\n## Answer\n" .
|
|
369
|
+
:out01 log:outputString "# medior\n\n## Source files\n\n- [N3 rules](../medior.n3)\n\n## Answer\n" .
|
|
370
370
|
:out02 log:outputString "Name: Medior\n" .
|
|
371
371
|
:out03 log:outputString "Region: Flanders\n" .
|
|
372
372
|
:out04 log:outputString "Metric: post_discharge_coordination_priority\n" .
|
|
@@ -119,5 +119,5 @@ log:query
|
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
# Markdown rendering via log:outputString.
|
|
122
|
-
:__md_output :text "# n3-speaks-for-itself\n\n@prefix : <https://example.org/n3-speaks#> .\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix id: <https://example.org/id/> .\n\n:report :aliceReaches id:bob .\n:report :aliceReaches id:carol .\n:report :aliceReaches id:dave .\n:report :believes {\n id:alice foaf:knows id:bob .\n} .\n:report :believes {\n id:alice foaf:name \"Alice\" .\n} .\n:report :believes {\n id:bob foaf:knows id:carol .\n} .\n:report :believes {\n id:bob foaf:name \"Bob\" .\n} .\n:report :believes {\n id:carol foaf:knows id:dave .\n} .\n:report :believes {\n id:carol foaf:name \"Carol\" .\n} .\n:report :believes {\n id:dave foaf:name \"Dave\" .\n} .\n:report :trusts <https://alice.example/profile.n3> .\n:report :trusts <https://bob.example/profile.n3> .\n:report :trusts <https://carol.example/profile.n3> .\n{\n id:alice foaf:knows id:bob .\n} :believedFromDoc <https://alice.example/profile.n3> .\n{\n id:alice foaf:name \"Alice\" .\n} :believedFromDoc <https://alice.example/profile.n3> .\n{\n id:bob foaf:knows id:carol .\n} :believedFromDoc <https://bob.example/profile.n3> .\n{\n id:bob foaf:name \"Bob\" .\n} :believedFromDoc <https://bob.example/profile.n3> .\n{\n id:carol foaf:knows id:dave .\n} :believedFromDoc <https://carol.example/profile.n3> .\n{\n id:carol foaf:name \"Carol\" .\n} :believedFromDoc <https://carol.example/profile.n3> .\n{\n id:dave foaf:name \"Dave\" .\n} :believedFromDoc <https://carol.example/profile.n3> .\n" .
|
|
122
|
+
:__md_output :text "# n3-speaks-for-itself\n\n## Source files\n\n- [N3 rules](../n3-speaks-for-itself.n3)\n\n@prefix : <https://example.org/n3-speaks#> .\n@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n@prefix id: <https://example.org/id/> .\n\n:report :aliceReaches id:bob .\n:report :aliceReaches id:carol .\n:report :aliceReaches id:dave .\n:report :believes {\n id:alice foaf:knows id:bob .\n} .\n:report :believes {\n id:alice foaf:name \"Alice\" .\n} .\n:report :believes {\n id:bob foaf:knows id:carol .\n} .\n:report :believes {\n id:bob foaf:name \"Bob\" .\n} .\n:report :believes {\n id:carol foaf:knows id:dave .\n} .\n:report :believes {\n id:carol foaf:name \"Carol\" .\n} .\n:report :believes {\n id:dave foaf:name \"Dave\" .\n} .\n:report :trusts <https://alice.example/profile.n3> .\n:report :trusts <https://bob.example/profile.n3> .\n:report :trusts <https://carol.example/profile.n3> .\n{\n id:alice foaf:knows id:bob .\n} :believedFromDoc <https://alice.example/profile.n3> .\n{\n id:alice foaf:name \"Alice\" .\n} :believedFromDoc <https://alice.example/profile.n3> .\n{\n id:bob foaf:knows id:carol .\n} :believedFromDoc <https://bob.example/profile.n3> .\n{\n id:bob foaf:name \"Bob\" .\n} :believedFromDoc <https://bob.example/profile.n3> .\n{\n id:carol foaf:knows id:dave .\n} :believedFromDoc <https://carol.example/profile.n3> .\n{\n id:carol foaf:name \"Carol\" .\n} :believedFromDoc <https://carol.example/profile.n3> .\n{\n id:dave foaf:name \"Dave\" .\n} :believedFromDoc <https://carol.example/profile.n3> .\n" .
|
|
123
123
|
{ :__md_output :text ?text } log:query { :__md_output log:outputString ?text } .
|
|
@@ -410,7 +410,7 @@
|
|
|
410
410
|
{
|
|
411
411
|
:AgreementEHDS1 dct:title ?alabel .
|
|
412
412
|
:PatientProfileExample dct:title ?plabel .
|
|
413
|
-
( "# odrl-dpv-ehds-risk-ranked\n\n## Ranked DPV Risk Report (EHDS-aligned)\nAgreement: %s\nProfile: %s\n\n"
|
|
413
|
+
( "# odrl-dpv-ehds-risk-ranked\n\n## Source files\n\n- [N3 rules](../odrl-dpv-ehds-risk-ranked.n3)\n\n## Ranked DPV Risk Report (EHDS-aligned)\nAgreement: %s\nProfile: %s\n\n"
|
|
414
414
|
?alabel ?plabel ) string:format ?hdr .
|
|
415
415
|
}
|
|
416
416
|
log:query
|
|
@@ -527,7 +527,7 @@
|
|
|
527
527
|
{
|
|
528
528
|
:AgreementHC1 dct:title ?alabel .
|
|
529
529
|
:PatientExample dct:title ?plabel .
|
|
530
|
-
( "# odrl-dpv-healthcare-risk-ranked\n\n## Ranked DPV Risk Report (Healthcare & Life Sciences)\nAgreement: %s\nProfile: %s\n\n"
|
|
530
|
+
( "# odrl-dpv-healthcare-risk-ranked\n\n## Source files\n\n- [N3 rules](../odrl-dpv-healthcare-risk-ranked.n3)\n\n## Ranked DPV Risk Report (Healthcare & Life Sciences)\nAgreement: %s\nProfile: %s\n\n"
|
|
531
531
|
?alabel ?plabel ) string:format ?hdr .
|
|
532
532
|
}
|
|
533
533
|
=>
|
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
{
|
|
413
413
|
:Agreement1 dct:title ?alabel .
|
|
414
414
|
:ConsumerExample dct:title ?plabel .
|
|
415
|
-
( "# odrl-dpv-risk-ranked\n\n## Ranked DPV Risk Report\nAgreement: %s\nProfile: %s\n\n"
|
|
415
|
+
( "# odrl-dpv-risk-ranked\n\n## Source files\n\n- [N3 rules](../odrl-dpv-risk-ranked.n3)\n\n## Ranked DPV Risk Report\nAgreement: %s\nProfile: %s\n\n"
|
|
416
416
|
?alabel ?plabel ) string:format ?hdr .
|
|
417
417
|
}
|
|
418
418
|
log:query
|
|
@@ -773,7 +773,7 @@
|
|
|
773
773
|
{
|
|
774
774
|
?agreement a :Agreement; :label ?alabel.
|
|
775
775
|
?profile a :ConsumerProfile; :label ?plabel.
|
|
776
|
-
( "# odrl-risk-mitigation\n\n## Risk report for %s (profile: %s)\n" ?alabel ?plabel ) string:format ?hdr.
|
|
776
|
+
( "# odrl-risk-mitigation\n\n## Source files\n\n- [N3 rules](../odrl-risk-mitigation.n3)\n\n## Risk report for %s (profile: %s)\n" ?alabel ?plabel ) string:format ?hdr.
|
|
777
777
|
}
|
|
778
778
|
=>
|
|
779
779
|
{
|
package/examples/odrl-risk.n3
CHANGED
|
@@ -391,7 +391,7 @@
|
|
|
391
391
|
?agreement a :Agreement; :label ?alabel.
|
|
392
392
|
?profile a :ConsumerProfile; :label ?plabel.
|
|
393
393
|
|
|
394
|
-
( "# odrl-risk\n\n## Risk report for %s (profile: %s)\n" ?alabel ?plabel ) string:format ?hdr.
|
|
394
|
+
( "# odrl-risk\n\n## Source files\n\n- [N3 rules](../odrl-risk.n3)\n\n## Risk report for %s (profile: %s)\n" ?alabel ?plabel ) string:format ?hdr.
|
|
395
395
|
}
|
|
396
396
|
=>
|
|
397
397
|
{
|