eyeling 1.24.4 → 1.24.6
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/HANDBOOK.md +2 -101
- package/README.md +2 -2
- package/dist/browser/eyeling.browser.js +256 -4
- package/examples/annotation.n3 +3 -4
- package/{see/examples/n3/backward_recursion.n3 → examples/backward-recursion.n3} +0 -2
- package/examples/collection.n3 +1 -2
- package/examples/context-association.n3 +56 -30
- package/{see/examples/n3/dijkstra_risk_path.n3 → examples/dijkstra-risk-path.n3} +3 -18
- package/{see/examples/n3/eco_route_insight.n3 → examples/eco-route-insight.n3} +2 -47
- package/{see/examples/n3/genetic_knapsack_selection.n3 → examples/genetic-knapsack-selection.n3} +2 -24
- package/{see/examples → examples}/input/annotation.trig +3 -3
- package/{see/examples/input/backward_recursion.trig → examples/input/backward-recursion.trig} +2 -2
- package/{see/examples/input/builtin_coverage.trig → examples/input/builtin-coverage.trig} +2 -2
- package/{see/examples → examples}/input/collection.trig +3 -3
- package/{see/examples/input/dijkstra_risk_path.trig → examples/input/dijkstra-risk-path.trig} +4 -4
- package/{see/examples/input/eco_route_insight.trig → examples/input/eco-route-insight.trig} +4 -4
- package/{see/examples/input/genetic_knapsack_selection.trig → examples/input/genetic-knapsack-selection.trig} +4 -4
- package/{see/examples/input/rc_discharge_envelope.trig → examples/input/rc-discharge-envelope.trig} +4 -4
- package/{see/examples/input/rdf_dataset.trig → examples/input/rdf-dataset.trig} +4 -4
- package/{see/examples/input/rdf_message_flow.trig → examples/input/rdf-message-flow.trig} +3 -3
- package/{see/examples/input/rdf_messages.trig → examples/input/rdf-messages.trig} +4 -4
- package/{see/examples/input/school_placement_audit.trig → examples/input/school-placement-audit.trig} +4 -4
- package/{see/examples/input/smoke_arithmetic.trig → examples/input/smoke-arithmetic.trig} +3 -3
- package/{see/examples/input/triple_terms.trig → examples/input/triple-terms.trig} +3 -3
- package/examples/output/backward-recursion.n3 +4 -0
- package/examples/output/context-association.n3 +9 -0
- package/examples/output/dijkstra-risk-path.n3 +3 -0
- package/examples/output/eco-route-insight.n3 +3 -0
- package/examples/output/genetic-knapsack-selection.n3 +3 -0
- package/examples/output/rc-discharge-envelope.n3 +9 -0
- package/examples/output/rc-discharge-envelope.txt +9 -0
- package/examples/output/rdf-dataset.n3 +5 -0
- package/examples/output/rdf-message-flow.n3 +7 -0
- package/examples/output/rdf-messages.n3 +7 -0
- package/examples/output/school-placement-audit.n3 +3 -0
- package/examples/output/smoke-arithmetic.n3 +5 -0
- package/examples/output/smoke-arithmetic.txt +5 -0
- package/examples/output/triple-terms.n3 +5 -0
- package/{see/examples/n3/rc_discharge_envelope.n3 → examples/rc-discharge-envelope.n3} +2 -15
- package/{see/examples/n3/rdf_dataset.n3 → examples/rdf-dataset.n3} +2 -11
- package/{see/examples/n3/rdf_message_flow.n3 → examples/rdf-message-flow.n3} +9 -75
- package/{see/examples/n3/rdf_messages.n3 → examples/rdf-messages.n3} +6 -43
- package/{see/examples/n3/school_placement_audit.n3 → examples/school-placement-audit.n3} +2 -14
- package/{see/examples/n3/smoke_arithmetic.n3 → examples/smoke-arithmetic.n3} +3 -5
- package/{see/examples/n3/triple_terms.n3 → examples/triple-terms.n3} +1 -4
- package/eyeling.js +256 -4
- package/lib/builtins.js +6 -0
- package/lib/lexer.js +250 -4
- package/package.json +4 -7
- package/test/api.test.js +65 -8
- package/test/examples.test.js +22 -2
- package/test/package.test.js +16 -2
- package/examples/arcling/README.md +0 -11
- package/examples/input/annotation.ttl +0 -6
- package/examples/input/collection.ttl +0 -13
- package/examples/input/reifies.ttl +0 -10
- package/examples/input/triple-term.ttl +0 -8
- package/examples/output/triple-term.n3 +0 -0
- package/examples/reifies.n3 +0 -8
- package/examples/triple-term.n3 +0 -7
- package/see/README.md +0 -149
- package/see/examples/_see.js +0 -249
- package/see/examples/age.js +0 -1459
- package/see/examples/annotation.js +0 -1320
- package/see/examples/backward.js +0 -1405
- package/see/examples/backward_recursion.js +0 -1504
- package/see/examples/bayes_diagnosis.js +0 -2883
- package/see/examples/bayes_therapy.js +0 -4152
- package/see/examples/bmi.js +0 -3038
- package/see/examples/builtin_coverage.js +0 -2524
- package/see/examples/collection.js +0 -1320
- package/see/examples/complex.js +0 -3762
- package/see/examples/complex_matrix_stability.js +0 -2973
- package/see/examples/composition_of_injective_functions_is_injective.js +0 -2170
- package/see/examples/control_system.js +0 -1918
- package/see/examples/crypto_builtins_tests.js +0 -1489
- package/see/examples/delfour.js +0 -3174
- package/see/examples/digital_product_passport.js +0 -2856
- package/see/examples/dijkstra.js +0 -2070
- package/see/examples/dijkstra_risk_path.js +0 -1874
- package/see/examples/doc/age.md +0 -27
- package/see/examples/doc/annotation.md +0 -24
- package/see/examples/doc/backward.md +0 -26
- package/see/examples/doc/backward_recursion.md +0 -26
- package/see/examples/doc/bayes_diagnosis.md +0 -41
- package/see/examples/doc/bayes_therapy.md +0 -40
- package/see/examples/doc/bmi.md +0 -38
- package/see/examples/doc/builtin_coverage.md +0 -53
- package/see/examples/doc/collection.md +0 -24
- package/see/examples/doc/complex.md +0 -38
- package/see/examples/doc/complex_matrix_stability.md +0 -35
- package/see/examples/doc/composition_of_injective_functions_is_injective.md +0 -24
- package/see/examples/doc/control_system.md +0 -32
- package/see/examples/doc/crypto_builtins_tests.md +0 -27
- package/see/examples/doc/delfour.md +0 -37
- package/see/examples/doc/digital_product_passport.md +0 -36
- package/see/examples/doc/dijkstra.md +0 -28
- package/see/examples/doc/dijkstra_risk_path.md +0 -30
- package/see/examples/doc/dog.md +0 -28
- package/see/examples/doc/eco_route_insight.md +0 -33
- package/see/examples/doc/equals.md +0 -26
- package/see/examples/doc/equivalence_classes_overlap_implies_same_class.md +0 -24
- package/see/examples/doc/euler_identity.md +0 -39
- package/see/examples/doc/ev_roundtrip_planner.md +0 -32
- package/see/examples/doc/existential_rule.md +0 -24
- package/see/examples/doc/expression_eval.md +0 -26
- package/see/examples/doc/family_cousins.md +0 -24
- package/see/examples/doc/fastpow.md +0 -29
- package/see/examples/doc/fibonacci.md +0 -28
- package/see/examples/doc/french_cities.md +0 -28
- package/see/examples/doc/fundamental_theorem_arithmetic.md +0 -36
- package/see/examples/doc/genetic_knapsack_selection.md +0 -29
- package/see/examples/doc/goldbach_1000.md +0 -31
- package/see/examples/doc/good_cobbler.md +0 -27
- package/see/examples/doc/gps.md +0 -35
- package/see/examples/doc/gray_code_counter.md +0 -31
- package/see/examples/doc/greatest_lower_bound_uniqueness.md +0 -24
- package/see/examples/doc/group_inverse_uniqueness.md +0 -24
- package/see/examples/doc/hadamard_approx.md +0 -32
- package/see/examples/doc/hanoi.md +0 -26
- package/see/examples/doc/odrl_dpv_risk_ranked.md +0 -57
- package/see/examples/doc/path_discovery.md +0 -33
- package/see/examples/doc/rc_discharge_envelope.md +0 -33
- package/see/examples/doc/rdf_dataset.md +0 -26
- package/see/examples/doc/rdf_message_flow.md +0 -35
- package/see/examples/doc/rdf_messages.md +0 -37
- package/see/examples/doc/school_placement_audit.md +0 -31
- package/see/examples/doc/smoke_arithmetic.md +0 -31
- package/see/examples/doc/socrates.md +0 -24
- package/see/examples/doc/triple_terms.md +0 -26
- package/see/examples/doc/wind_turbine.md +0 -37
- package/see/examples/doc/witch.md +0 -28
- package/see/examples/dog.js +0 -1436
- package/see/examples/eco_route_insight.js +0 -2110
- package/see/examples/equals.js +0 -1363
- package/see/examples/equivalence_classes_overlap_implies_same_class.js +0 -1792
- package/see/examples/euler_identity.js +0 -2038
- package/see/examples/ev_roundtrip_planner.js +0 -2562
- package/see/examples/existential_rule.js +0 -1363
- package/see/examples/expression_eval.js +0 -1798
- package/see/examples/family_cousins.js +0 -1586
- package/see/examples/fastpow.js +0 -2207
- package/see/examples/fibonacci.js +0 -1594
- package/see/examples/french_cities.js +0 -1492
- package/see/examples/fundamental_theorem_arithmetic.js +0 -2106
- package/see/examples/genetic_knapsack_selection.js +0 -1743
- package/see/examples/goldbach_1000.js +0 -1798
- package/see/examples/good_cobbler.js +0 -1396
- package/see/examples/gps.js +0 -2813
- package/see/examples/gray_code_counter.js +0 -1641
- package/see/examples/greatest_lower_bound_uniqueness.js +0 -1918
- package/see/examples/group_inverse_uniqueness.js +0 -1897
- package/see/examples/hadamard_approx.js +0 -4417
- package/see/examples/hanoi.js +0 -1625
- package/see/examples/input/age.trig +0 -27
- package/see/examples/input/backward.trig +0 -25
- package/see/examples/input/bayes_diagnosis.trig +0 -111
- package/see/examples/input/bayes_therapy.trig +0 -130
- package/see/examples/input/bmi.trig +0 -28
- package/see/examples/input/complex.trig +0 -26
- package/see/examples/input/complex_matrix_stability.trig +0 -65
- package/see/examples/input/composition_of_injective_functions_is_injective.trig +0 -35
- package/see/examples/input/control_system.trig +0 -31
- package/see/examples/input/crypto_builtins_tests.trig +0 -25
- package/see/examples/input/delfour.trig +0 -90
- package/see/examples/input/digital_product_passport.trig +0 -116
- package/see/examples/input/dijkstra.trig +0 -34
- package/see/examples/input/dog.trig +0 -31
- package/see/examples/input/equals.trig +0 -25
- package/see/examples/input/equivalence_classes_overlap_implies_same_class.trig +0 -28
- package/see/examples/input/euler_identity.trig +0 -34
- package/see/examples/input/ev_roundtrip_planner.trig +0 -90
- package/see/examples/input/existential_rule.trig +0 -26
- package/see/examples/input/expression_eval.trig +0 -41
- package/see/examples/input/family_cousins.trig +0 -39
- package/see/examples/input/fastpow.trig +0 -25
- package/see/examples/input/fibonacci.trig +0 -51
- package/see/examples/input/french_cities.trig +0 -38
- package/see/examples/input/fundamental_theorem_arithmetic.trig +0 -42
- package/see/examples/input/goldbach_1000.trig +0 -53
- package/see/examples/input/good_cobbler.trig +0 -24
- package/see/examples/input/gps.trig +0 -35
- package/see/examples/input/gray_code_counter.trig +0 -33
- package/see/examples/input/greatest_lower_bound_uniqueness.trig +0 -29
- package/see/examples/input/group_inverse_uniqueness.trig +0 -29
- package/see/examples/input/hadamard_approx.trig +0 -32
- package/see/examples/input/hanoi.trig +0 -26
- package/see/examples/input/odrl_dpv_risk_ranked.trig +0 -107
- package/see/examples/input/path-discovery.trig +0 -96448
- package/see/examples/input/path_discovery.trig +0 -29
- package/see/examples/input/socrates.trig +0 -26
- package/see/examples/input/wind_turbine.trig +0 -48
- package/see/examples/input/witch.trig +0 -26
- package/see/examples/n3/age.n3 +0 -28
- package/see/examples/n3/annotation.n3 +0 -7
- package/see/examples/n3/backward.n3 +0 -22
- package/see/examples/n3/bayes_diagnosis.n3 +0 -122
- package/see/examples/n3/bayes_therapy.n3 +0 -149
- package/see/examples/n3/bmi.n3 +0 -145
- package/see/examples/n3/collection.n3 +0 -3
- package/see/examples/n3/complex.n3 +0 -140
- package/see/examples/n3/complex_matrix_stability.n3 +0 -113
- package/see/examples/n3/composition_of_injective_functions_is_injective.n3 +0 -27
- package/see/examples/n3/control_system.n3 +0 -59
- package/see/examples/n3/crypto_builtins_tests.n3 +0 -18
- package/see/examples/n3/delfour.n3 +0 -167
- package/see/examples/n3/digital_product_passport.n3 +0 -156
- package/see/examples/n3/dijkstra.n3 +0 -46
- package/see/examples/n3/dog.n3 +0 -20
- package/see/examples/n3/equals.n3 +0 -11
- package/see/examples/n3/equivalence_classes_overlap_implies_same_class.n3 +0 -19
- package/see/examples/n3/euler_identity.n3 +0 -41
- package/see/examples/n3/ev_roundtrip_planner.n3 +0 -82
- package/see/examples/n3/existential_rule.n3 +0 -10
- package/see/examples/n3/expression_eval.n3 +0 -21
- package/see/examples/n3/family_cousins.n3 +0 -62
- package/see/examples/n3/fastpow.n3 +0 -56
- package/see/examples/n3/fibonacci.n3 +0 -44
- package/see/examples/n3/french_cities.n3 +0 -28
- package/see/examples/n3/fundamental_theorem_arithmetic.n3 +0 -84
- package/see/examples/n3/goldbach_1000.n3 +0 -66
- package/see/examples/n3/good_cobbler.n3 +0 -10
- package/see/examples/n3/gps.n3 +0 -70
- package/see/examples/n3/gray_code_counter.n3 +0 -53
- package/see/examples/n3/greatest_lower_bound_uniqueness.n3 +0 -20
- package/see/examples/n3/group_inverse_uniqueness.n3 +0 -19
- package/see/examples/n3/hadamard_approx.n3 +0 -43
- package/see/examples/n3/hanoi.n3 +0 -16
- package/see/examples/n3/odrl_dpv_risk_ranked.n3 +0 -460
- package/see/examples/n3/path_discovery.n3 +0 -43
- package/see/examples/n3/socrates.n3 +0 -21
- package/see/examples/n3/wind_turbine.n3 +0 -85
- package/see/examples/n3/witch.n3 +0 -30
- package/see/examples/odrl_dpv_risk_ranked.js +0 -5128
- package/see/examples/output/age.md +0 -48
- package/see/examples/output/annotation.md +0 -43
- package/see/examples/output/backward.md +0 -50
- package/see/examples/output/backward_recursion.md +0 -54
- package/see/examples/output/bayes_diagnosis.md +0 -103
- package/see/examples/output/bayes_therapy.md +0 -84
- package/see/examples/output/bmi.md +0 -164
- package/see/examples/output/builtin_coverage.md +0 -99
- package/see/examples/output/collection.md +0 -44
- package/see/examples/output/complex.md +0 -61
- package/see/examples/output/complex_matrix_stability.md +0 -55
- package/see/examples/output/composition_of_injective_functions_is_injective.md +0 -62
- package/see/examples/output/control_system.md +0 -61
- package/see/examples/output/crypto_builtins_tests.md +0 -68
- package/see/examples/output/delfour.md +0 -100
- package/see/examples/output/digital_product_passport.md +0 -100
- package/see/examples/output/dijkstra.md +0 -74
- package/see/examples/output/dijkstra_risk_path.md +0 -76
- package/see/examples/output/dog.md +0 -50
- package/see/examples/output/eco_route_insight.md +0 -88
- package/see/examples/output/equals.md +0 -50
- package/see/examples/output/equivalence_classes_overlap_implies_same_class.md +0 -86
- package/see/examples/output/euler_identity.md +0 -73
- package/see/examples/output/ev_roundtrip_planner.md +0 -79
- package/see/examples/output/existential_rule.md +0 -54
- package/see/examples/output/expression_eval.md +0 -50
- package/see/examples/output/family_cousins.md +0 -187
- package/see/examples/output/fastpow.md +0 -36
- package/see/examples/output/fibonacci.md +0 -53
- package/see/examples/output/french_cities.md +0 -70
- package/see/examples/output/fundamental_theorem_arithmetic.md +0 -101
- package/see/examples/output/genetic_knapsack_selection.md +0 -66
- package/see/examples/output/goldbach_1000.md +0 -58
- package/see/examples/output/good_cobbler.md +0 -54
- package/see/examples/output/gps.md +0 -102
- package/see/examples/output/gray_code_counter.md +0 -68
- package/see/examples/output/greatest_lower_bound_uniqueness.md +0 -60
- package/see/examples/output/group_inverse_uniqueness.md +0 -60
- package/see/examples/output/hadamard_approx.md +0 -510
- package/see/examples/output/hanoi.md +0 -51
- package/see/examples/output/odrl_dpv_risk_ranked.md +0 -139
- package/see/examples/output/path_discovery.md +0 -65
- package/see/examples/output/rc_discharge_envelope.md +0 -102
- package/see/examples/output/rdf_dataset.md +0 -54
- package/see/examples/output/rdf_message_flow.md +0 -198
- package/see/examples/output/rdf_messages.md +0 -134
- package/see/examples/output/school_placement_audit.md +0 -99
- package/see/examples/output/smoke_arithmetic.md +0 -54
- package/see/examples/output/socrates.md +0 -55
- package/see/examples/output/triple_terms.md +0 -53
- package/see/examples/output/wind_turbine.md +0 -108
- package/see/examples/output/witch.md +0 -87
- package/see/examples/path_discovery.js +0 -1774
- package/see/examples/rc_discharge_envelope.js +0 -1993
- package/see/examples/rdf_dataset.js +0 -1512
- package/see/examples/rdf_message_flow.js +0 -2580
- package/see/examples/rdf_messages.js +0 -2176
- package/see/examples/school_placement_audit.js +0 -1867
- package/see/examples/smoke_arithmetic.js +0 -1483
- package/see/examples/socrates.js +0 -1420
- package/see/examples/triple_terms.js +0 -1442
- package/see/examples/wind_turbine.js +0 -2853
- package/see/examples/witch.js +0 -1519
- package/see/see.js +0 -2179
- package/test/see.test.js +0 -159
- /package/{see/examples/n3/builtin_coverage.n3 → examples/builtin-coverage.n3} +0 -0
- /package/examples/output/{reifies.n3 → builtin-coverage.n3} +0 -0
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
# GPS route planning
|
|
2
|
-
|
|
3
|
-
## Entailment
|
|
4
|
-
Take the direct route via Brugge.
|
|
5
|
-
Recommended route: Gent -> Brugge -> Oostende
|
|
6
|
-
|
|
7
|
-
## Explanation
|
|
8
|
-
From Gent to Oostende, the planner found two routes in this small map. The direct route (Gent -> Brugge -> Oostende) takes 2400 seconds at cost 0.01, with belief 0.9408 and comfort 0.99. The alternative (Gent -> Kortrijk -> Brugge -> Oostende) takes 4100 seconds at cost 0.018, with belief 0.903168 and comfort 0.9801. So the direct route is faster, cheaper, more reliable, and slightly more comfortable.
|
|
9
|
-
|
|
10
|
-
**Generated derivation support**
|
|
11
|
-
|
|
12
|
-
Compiled support: 8 source fact(s), 7 rule(s), fixpoint reached before rendering.
|
|
13
|
-
|
|
14
|
-
Derivation steps:
|
|
15
|
-
- Rule 3: :i1 :location :Gent; (:Gent :Oostende ?Acts ?Dur ?Cost ?Bel ?Comf) :path true => :i1 gps:path (?Acts ?Dur ?Cost ?Bel ?Comf) derives :i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400 0.01 0.9408 0.99) ., :i1 gps:path ((:drive_gent_kortrijk :drive_kortrijk_brugge :drive_brugge_oostende) 4100 0.018 0.903168 0.9801) .
|
|
16
|
-
- Uses: :i1 :location :Gent . _(source)_
|
|
17
|
-
- Rule 4 (1 premise pattern(s) => 4 conclusion pattern(s)) derives :routeDirect :duration 2400 ., :routeDirect :cost 0.01 ., :routeDirect :belief 0.9408 ., :routeDirect :comfort 0.99 .
|
|
18
|
-
- Uses: :i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400 0.01 0.9408 0.99) . _(derived)_
|
|
19
|
-
- Rule 5 (1 premise pattern(s) => 4 conclusion pattern(s)) derives :routeViaKortrijk :duration 4100 ., :routeViaKortrijk :cost 0.018 ., :routeViaKortrijk :belief 0.903168 ., :routeViaKortrijk :comfort 0.9801 .
|
|
20
|
-
- Uses: :i1 gps:path ((:drive_gent_kortrijk :drive_kortrijk_brugge :drive_brugge_oostende) 4100 0.018 0.903168 0.9801) . _(derived)_
|
|
21
|
-
- Rule 6 (12 premise pattern(s) => 2 conclusion pattern(s)) derives :decision :recommendedRoute :routeDirect ., :decision :outcome "Take the direct route via Brugge." .
|
|
22
|
-
- Uses: :routeDirect :duration 2400 . _(derived)_; :routeDirect :cost 0.01 . _(derived)_; :routeDirect :belief 0.9408 . _(derived)_; :routeDirect :comfort 0.99 . _(derived)_; … +4 more premise fact(s)
|
|
23
|
-
- Rule 7 (13 premise pattern(s) => 1 conclusion pattern(s)) derives :report log:outputString "[authored report]" .
|
|
24
|
-
- Uses: :decision :recommendedRoute :routeDirect . _(derived)_; :decision :outcome "Take the direct route via Brugge." . _(derived)_; :routeDirect :label "Gent -> Brugge -> Oostende" . _(source)_; :routeDirect :duration 2400 . _(derived)_; … +8 more premise fact(s)
|
|
25
|
-
|
|
26
|
-
Selected explanation support:
|
|
27
|
-
- :report log:outputString "[authored report]" . _(authored report, Rule 7)_
|
|
28
|
-
- :decision :outcome "Take the direct route via Brugge." . _(derived by Rule 6)_
|
|
29
|
-
- :routeDirect :duration 2400 . _(derived by Rule 4)_
|
|
30
|
-
- :i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400 0.01 0.9408 0.99) . _(derived by Rule 3)_
|
|
31
|
-
- :i1 :location :Gent . _(source)_
|
|
32
|
-
- :routeDirect :cost 0.01 . _(derived by Rule 4)_
|
|
33
|
-
- :i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400 0.01 0.9408 0.99) . _(derived by Rule 3)_
|
|
34
|
-
- :i1 :location :Gent . _(source)_
|
|
35
|
-
- :routeDirect :belief 0.9408 . _(derived by Rule 4)_
|
|
36
|
-
- :i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400 0.01 0.9408 0.99) . _(derived by Rule 3)_
|
|
37
|
-
- :i1 :location :Gent . _(source)_
|
|
38
|
-
- :routeDirect :comfort 0.99 . _(derived by Rule 4)_
|
|
39
|
-
- :i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400 0.01 0.9408 0.99) . _(derived by Rule 3)_
|
|
40
|
-
- :i1 :location :Gent . _(source)_
|
|
41
|
-
- ... 4 more premise fact(s)
|
|
42
|
-
- :decision :recommendedRoute :routeDirect . _(derived by Rule 6)_
|
|
43
|
-
- :routeDirect :duration 2400 . _(derived by Rule 4)_
|
|
44
|
-
- :i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400 0.01 0.9408 0.99) . _(derived by Rule 3)_
|
|
45
|
-
- :i1 :location :Gent . _(source)_
|
|
46
|
-
- :routeDirect :cost 0.01 . _(derived by Rule 4)_
|
|
47
|
-
- :i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400 0.01 0.9408 0.99) . _(derived by Rule 3)_
|
|
48
|
-
- :i1 :location :Gent . _(source)_
|
|
49
|
-
- :routeDirect :belief 0.9408 . _(derived by Rule 4)_
|
|
50
|
-
- :i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400 0.01 0.9408 0.99) . _(derived by Rule 3)_
|
|
51
|
-
- :i1 :location :Gent . _(source)_
|
|
52
|
-
- :routeDirect :comfort 0.99 . _(derived by Rule 4)_
|
|
53
|
-
- :i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400 0.01 0.9408 0.99) . _(derived by Rule 3)_
|
|
54
|
-
- :i1 :location :Gent . _(source)_
|
|
55
|
-
- ... 4 more premise fact(s)
|
|
56
|
-
- :routeViaKortrijk :comfort 0.9801 . _(derived by Rule 5)_
|
|
57
|
-
- :i1 gps:path ((:drive_gent_kortrijk :drive_kortrijk_brugge :drive_brugge_oostende) 4100 0.018 0.903168 0.9801) . _(derived by Rule 3)_
|
|
58
|
-
- :i1 :location :Gent . _(source)_
|
|
59
|
-
|
|
60
|
-
## Formal TriG Output
|
|
61
|
-
|
|
62
|
-
```trig
|
|
63
|
-
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
|
64
|
-
@prefix math: <http://www.w3.org/2000/10/swap/math#> .
|
|
65
|
-
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
|
|
66
|
-
@prefix string: <http://www.w3.org/2000/10/swap/string#> .
|
|
67
|
-
@prefix gps: <https://eyereasoner.github.io/see/examples/gps#> .
|
|
68
|
-
@prefix : <https://eyereasoner.github.io/see/examples/gps#> .
|
|
69
|
-
@prefix see: <https://example.org/see#> .
|
|
70
|
-
@prefix in: <https://example.org/see/input#> .
|
|
71
|
-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
72
|
-
|
|
73
|
-
:i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400 0.01 0.9408 0.99) .
|
|
74
|
-
:i1 gps:path ((:drive_gent_kortrijk :drive_kortrijk_brugge :drive_brugge_oostende) 4100 0.018 0.903168 0.9801) .
|
|
75
|
-
:routeDirect :duration 2400 .
|
|
76
|
-
:routeDirect :cost 0.01 .
|
|
77
|
-
:routeDirect :belief 0.9408 .
|
|
78
|
-
:routeDirect :comfort 0.99 .
|
|
79
|
-
:routeViaKortrijk :duration 4100 .
|
|
80
|
-
:routeViaKortrijk :cost 0.018 .
|
|
81
|
-
:routeViaKortrijk :belief 0.903168 .
|
|
82
|
-
:routeViaKortrijk :comfort 0.9801 .
|
|
83
|
-
:decision :recommendedRoute :routeDirect .
|
|
84
|
-
:decision :outcome "Take the direct route via Brugge." .
|
|
85
|
-
:report log:outputString "=== Answer ===\nTake the direct route via Brugge.\nRecommended route: Gent -> Brugge -> Oostende\n\n=== Explanation ===\nFrom Gent to Oostende, the planner found two routes in this small map. The direct route (Gent -> Brugge -> Oostende) takes 2400 seconds at cost 0.01, with belief 0.9408 and comfort 0.99. The alternative (Gent -> Kortrijk -> Brugge -> Oostende) takes 4100 seconds at cost 0.018, with belief 0.903168 and comfort 0.9801. So the direct route is faster, cheaper, more reliable, and slightly more comfortable." .
|
|
86
|
-
|
|
87
|
-
in:metadata {
|
|
88
|
-
in:run a see:InputDataset .
|
|
89
|
-
in:run see:name "gps" .
|
|
90
|
-
in:run see:title "GPS route planning" .
|
|
91
|
-
in:run see:sourceFile "examples/n3/gps.n3" .
|
|
92
|
-
in:run see:sourceSHA256 "3ca7a57d4a2d06215e852e74b51d71f6b0aa36230eb172fa3e17465052c06404" .
|
|
93
|
-
in:run see:description "Goal-driven path planning over a tiny western-Belgium map. The N3 source is\nadapted from Eyeling's GPS example and compiles to a standalone SEE example." .
|
|
94
|
-
in:run see:compiler "see.js N3-to-JS compiler" .
|
|
95
|
-
in:run see:inputFacts 8 .
|
|
96
|
-
in:run see:compiledRules 5 .
|
|
97
|
-
in:run see:compiledBackwardRules 2 .
|
|
98
|
-
in:run see:compiledFuses 4 .
|
|
99
|
-
in:run see:compiledQueries 0 .
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Gray Code Counter
|
|
2
|
-
|
|
3
|
-
## Entailment
|
|
4
|
-
bits : 4
|
|
5
|
-
states visited : 16
|
|
6
|
-
unique states : 16
|
|
7
|
-
sequence prefix : 0000, 0001, 0011, 0010, 0110, 0111, 0101, 0100
|
|
8
|
-
wrap transition : 1000 -> 0000
|
|
9
|
-
maximum adjacent Hamming distance : 1
|
|
10
|
-
|
|
11
|
-
## Explanation
|
|
12
|
-
The counter maps each integer n to n xor (n >> 1), which is the reflected binary Gray-code construction. For 4 bits, the first 16 integers cover the full state space without duplicates. The Hamming-distance comparison compares each state with the next state, including the final wraparound transition. A valid cyclic Gray counter therefore changes exactly one bit at every step.
|
|
13
|
-
|
|
14
|
-
**Generated derivation support**
|
|
15
|
-
|
|
16
|
-
Compiled support: 7 source fact(s), 3 rule(s), fixpoint reached before rendering.
|
|
17
|
-
|
|
18
|
-
Derivation steps:
|
|
19
|
-
- Rule 1: :Counter :sequence ?Sequence; ?Sequence list:length ?Visited => :Counter :statesVisited ?Visited derives :Counter :statesVisited 16 .
|
|
20
|
-
- Uses: :Counter :sequence (0 1 3 2 6 7 5 4 12 13 15 14 10 11 9 8) . _(source)_
|
|
21
|
-
- Rule 2 (4 premise pattern(s) => 1 conclusion pattern(s)) derives :Counter :validGrayCycle true .
|
|
22
|
-
- Uses: :Counter :steps 16 . _(source)_; :Counter :statesVisited 16 . _(derived)_; :Counter :uniqueStateCount 16 . _(source)_; :Counter :maxHammingDistance 1 . _(source)_
|
|
23
|
-
- Rule 3 (8 premise pattern(s) => 1 conclusion pattern(s)) derives :report log:outputString "[authored report]" .
|
|
24
|
-
- Uses: :Counter :bits 4 . _(source)_; :Counter :statesVisited 16 . _(derived)_; :Counter :uniqueStateCount 16 . _(source)_; :Counter :sequencePrefix "0000, 0001, 0011, 0010, 0110, 0111, 0101, 0100" . _(source)_; … +3 more premise fact(s)
|
|
25
|
-
|
|
26
|
-
Selected explanation support:
|
|
27
|
-
- :report log:outputString "[authored report]" . _(authored report, Rule 3)_
|
|
28
|
-
- :Counter :validGrayCycle true . _(derived by Rule 2)_
|
|
29
|
-
- :Counter :steps 16 . _(source)_
|
|
30
|
-
- :Counter :statesVisited 16 . _(derived by Rule 1)_
|
|
31
|
-
- :Counter :sequence (0 1 3 2 6 7 5 4 12 13 15 14 10 11 9 8) . _(source)_
|
|
32
|
-
- :Counter :uniqueStateCount 16 . _(source)_
|
|
33
|
-
- :Counter :maxHammingDistance 1 . _(source)_
|
|
34
|
-
- :Counter :statesVisited 16 . _(derived by Rule 1)_
|
|
35
|
-
- :Counter :sequence (0 1 3 2 6 7 5 4 12 13 15 14 10 11 9 8) . _(source)_
|
|
36
|
-
|
|
37
|
-
## Formal TriG Output
|
|
38
|
-
|
|
39
|
-
```trig
|
|
40
|
-
@prefix : <https://eyereasoner.github.io/see/examples/gray-code-counter#> .
|
|
41
|
-
@prefix list: <http://www.w3.org/2000/10/swap/list#> .
|
|
42
|
-
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
|
43
|
-
@prefix math: <http://www.w3.org/2000/10/swap/math#> .
|
|
44
|
-
@prefix string: <http://www.w3.org/2000/10/swap/string#> .
|
|
45
|
-
@prefix see: <https://example.org/see#> .
|
|
46
|
-
@prefix in: <https://example.org/see/input#> .
|
|
47
|
-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
48
|
-
|
|
49
|
-
:Counter :statesVisited 16 .
|
|
50
|
-
:Counter :validGrayCycle true .
|
|
51
|
-
:report log:outputString "=== Answer ===\nbits : 4\nstates visited : 16\nunique states : 16\nsequence prefix : 0000, 0001, 0011, 0010, 0110, 0111, 0101, 0100\nwrap transition : 1000 -> 0000\nmaximum adjacent Hamming distance : 1\n\n=== Explanation ===\nThe counter maps each integer n to n xor (n >> 1), which is the reflected binary Gray-code construction. For 4 bits, the first 16 integers cover the full state space without duplicates. The Hamming-distance comparison compares each state with the next state, including the final wraparound transition. A valid cyclic Gray counter therefore changes exactly one bit at every step." .
|
|
52
|
-
|
|
53
|
-
in:metadata {
|
|
54
|
-
in:run a see:InputDataset .
|
|
55
|
-
in:run see:name "gray_code_counter" .
|
|
56
|
-
in:run see:title "Gray Code Counter" .
|
|
57
|
-
in:run see:sourceFile "examples/n3/gray_code_counter.n3" .
|
|
58
|
-
in:run see:sourceSHA256 "61f77dc563c8a38d612cf4fba812e6066f00449e27b9bc620e866a52e08ea4d2" .
|
|
59
|
-
in:run see:description "N3-compiled version of the 4-bit Gray counter SEE example. The example keeps\nthe known reflected Gray-code sequence as data, derives its visited-state count\nwith a list builtin, and derives the published invariants before rendering the\nSEE report." .
|
|
60
|
-
in:run see:compiler "see.js N3-to-JS compiler" .
|
|
61
|
-
in:run see:inputFacts 7 .
|
|
62
|
-
in:run see:compiledRules 3 .
|
|
63
|
-
in:run see:compiledBackwardRules 0 .
|
|
64
|
-
in:run see:compiledFuses 0 .
|
|
65
|
-
in:run see:compiledQueries 0 .
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# In a partial order, a greatest lower bound is unique.
|
|
2
|
-
|
|
3
|
-
## Entailment
|
|
4
|
-
The compiled query selected 2 fact(s) after the rule closure was computed.
|
|
5
|
-
Main entailment: **:result :sameGreatestLowerBound (:a :b :g2 :g1).**
|
|
6
|
-
|
|
7
|
-
Selected entailments:
|
|
8
|
-
- :result :sameGreatestLowerBound (:a :b :g2 :g1) .
|
|
9
|
-
- :result :sameGreatestLowerBound (:a :b :g1 :g2) .
|
|
10
|
-
|
|
11
|
-
## Explanation
|
|
12
|
-
Starts with 6 source fact(s), applies 7 rule(s), and reaches a fixpoint.
|
|
13
|
-
The log:query projection then keeps only the matching fact(s) shown above.
|
|
14
|
-
|
|
15
|
-
Derivation steps:
|
|
16
|
-
- Rule 1: ?x :inP true => ?x :leq ?x derives :a :leq :a ., :b :leq :b ., :g1 :leq :g1 ., :g2 :leq :g2 .
|
|
17
|
-
- Uses: :a :inP true . _(source)_; :b :inP true . _(source)_; :g1 :inP true . _(source)_; :g2 :inP true . _(source)_
|
|
18
|
-
- Rule 3: ?x :leq ?y; ?y :leq ?x => (?x ?y) :sameTerm true derives (:a :a) :sameTerm true ., (:b :b) :sameTerm true ., (:g1 :g1) :sameTerm true ., (:g2 :g2) :sameTerm true ., … +2 more
|
|
19
|
-
- Uses: :a :leq :a . _(derived)_; :b :leq :b . _(derived)_; :g1 :leq :g1 . _(derived)_; :g2 :leq :g2 . _(derived)_; … +2 more premise fact(s)
|
|
20
|
-
- Rule 5 (1 premise pattern(s) => 3 conclusion pattern(s)) derives :g1 :lowerBoundOf (:a :b) ., :g1 :leq :a ., :g1 :leq :b ., :g2 :lowerBoundOf (:a :b) ., … +2 more
|
|
21
|
-
- Uses: :g1 :glbOf (:a :b) . _(source)_; :g2 :glbOf (:a :b) . _(source)_
|
|
22
|
-
- Rule 6: ?m :glbOf (?a ?b); ?l :lowerBoundOf (?a ?b) => ?l :leq ?m derives :g2 :leq :g1 ., :g1 :leq :g2 .
|
|
23
|
-
- Uses: :g1 :glbOf (:a :b) . _(source)_; :g2 :lowerBoundOf (:a :b) . _(derived)_; :g2 :glbOf (:a :b) . _(source)_; :g1 :lowerBoundOf (:a :b) . _(derived)_
|
|
24
|
-
- Rule 7 (3 premise pattern(s) => 1 conclusion pattern(s)) derives (:a :b :g1 :g1) :sameGlb true ., (:a :b :g2 :g2) :sameGlb true ., (:a :b :g1 :g2) :sameGlb true ., (:a :b :g2 :g1) :sameGlb true .
|
|
25
|
-
- Uses: :g1 :glbOf (:a :b) . _(source)_; (:g1 :g1) :sameTerm true . _(derived)_; :g2 :glbOf (:a :b) . _(source)_; (:g2 :g2) :sameTerm true . _(derived)_; … +2 more premise fact(s)
|
|
26
|
-
|
|
27
|
-
Selected explanation support:
|
|
28
|
-
- :result :sameGreatestLowerBound (:a :b :g2 :g1) . _(no recorded rule support)_
|
|
29
|
-
- :result :sameGreatestLowerBound (:a :b :g1 :g2) . _(no recorded rule support)_
|
|
30
|
-
|
|
31
|
-
The query-selected facts are serialized in the Formal TriG Output section.
|
|
32
|
-
|
|
33
|
-
## Formal TriG Output
|
|
34
|
-
|
|
35
|
-
```trig
|
|
36
|
-
@prefix : <https://eyereasoner.github.io/eye/reasoning#> .
|
|
37
|
-
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
|
38
|
-
@prefix see: <https://example.org/see#> .
|
|
39
|
-
@prefix in: <https://example.org/see/input#> .
|
|
40
|
-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
41
|
-
|
|
42
|
-
:result :sameGreatestLowerBound (:a :b :g1 :g2) .
|
|
43
|
-
:result :sameGreatestLowerBound (:a :b :g2 :g1) .
|
|
44
|
-
|
|
45
|
-
in:metadata {
|
|
46
|
-
in:run a see:InputDataset .
|
|
47
|
-
in:run see:name "greatest_lower_bound_uniqueness" .
|
|
48
|
-
in:run see:title "In a partial order, a greatest lower bound is unique." .
|
|
49
|
-
in:run see:sourceFile "examples/n3/greatest_lower_bound_uniqueness.n3" .
|
|
50
|
-
in:run see:sourceSHA256 "3a199585b9906a895deba6508458c88551558aec89fdc1b490ed9493bbb63433" .
|
|
51
|
-
in:run see:description "" .
|
|
52
|
-
in:run see:compiler "see.js N3-to-JS compiler" .
|
|
53
|
-
in:run see:inputFacts 6 .
|
|
54
|
-
in:run see:compiledRules 7 .
|
|
55
|
-
in:run see:compiledBackwardRules 0 .
|
|
56
|
-
in:run see:compiledFuses 0 .
|
|
57
|
-
in:run see:compiledQueries 1 .
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# In a group, the inverse of an element is unique.
|
|
2
|
-
|
|
3
|
-
## Entailment
|
|
4
|
-
The compiled query selected 2 fact(s) after the rule closure was computed.
|
|
5
|
-
Main entailment: **:result :sameInverse (:x :j :i).**
|
|
6
|
-
|
|
7
|
-
Selected entailments:
|
|
8
|
-
- :result :sameInverse (:x :j :i) .
|
|
9
|
-
- :result :sameInverse (:x :i :j) .
|
|
10
|
-
|
|
11
|
-
## Explanation
|
|
12
|
-
Starts with 6 source fact(s), applies 6 rule(s), and reaches a fixpoint.
|
|
13
|
-
The log:query projection then keeps only the matching fact(s) shown above.
|
|
14
|
-
|
|
15
|
-
Derivation steps:
|
|
16
|
-
- Rule 3: ?a :inG true => (:e ?a) :mul ?a derives (:e :x) :mul :x ., (:e :i) :mul :i ., (:e :j) :mul :j ., (:e :e) :mul :e .
|
|
17
|
-
- Uses: :x :inG true . _(source)_; :i :inG true . _(source)_; :j :inG true . _(source)_; :e :inG true . _(source)_
|
|
18
|
-
- Rule 4: ?a :inG true => (?a :e) :mul ?a derives (:x :e) :mul :x ., (:i :e) :mul :i ., (:j :e) :mul :j .
|
|
19
|
-
- Uses: :x :inG true . _(source)_; :i :inG true . _(source)_; :j :inG true . _(source)_
|
|
20
|
-
- Rule 5 (3 premise pattern(s) => 2 conclusion pattern(s)) derives (:x :i) :mul :e ., (:i :x) :mul :e ., (:x :j) :mul :e ., (:j :x) :mul :e .
|
|
21
|
-
- Uses: :x :inG true . _(source)_; :i :inG true . _(source)_; :i :inverseOf :x . _(source)_; :j :inG true . _(source)_; … +1 more premise fact(s)
|
|
22
|
-
- Rule 1 (4 premise pattern(s) => 1 conclusion pattern(s)) derives (:x :x) :sameTerm true ., (:e :e) :sameTerm true ., (:i :i) :sameTerm true ., (:j :j) :sameTerm true ., … +2 more
|
|
23
|
-
- Uses: (:e :x) :mul :x . _(derived)_; (:x :e) :mul :x . _(derived)_; (:x :i) :mul :e . _(derived)_; (:e :e) :mul :e . _(derived)_; … +7 more premise fact(s)
|
|
24
|
-
- Rule 6 (3 premise pattern(s) => 1 conclusion pattern(s)) derives (:x :i :i) :sameInverse true ., (:x :i :j) :sameInverse true ., (:x :j :i) :sameInverse true ., (:x :j :j) :sameInverse true .
|
|
25
|
-
- Uses: :i :inverseOf :x . _(source)_; (:i :i) :sameTerm true . _(derived)_; :j :inverseOf :x . _(source)_; (:i :j) :sameTerm true . _(derived)_; … +2 more premise fact(s)
|
|
26
|
-
|
|
27
|
-
Selected explanation support:
|
|
28
|
-
- :result :sameInverse (:x :j :i) . _(no recorded rule support)_
|
|
29
|
-
- :result :sameInverse (:x :i :j) . _(no recorded rule support)_
|
|
30
|
-
|
|
31
|
-
The query-selected facts are serialized in the Formal TriG Output section.
|
|
32
|
-
|
|
33
|
-
## Formal TriG Output
|
|
34
|
-
|
|
35
|
-
```trig
|
|
36
|
-
@prefix : <https://eyereasoner.github.io/eye/reasoning#> .
|
|
37
|
-
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
|
38
|
-
@prefix see: <https://example.org/see#> .
|
|
39
|
-
@prefix in: <https://example.org/see/input#> .
|
|
40
|
-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
41
|
-
|
|
42
|
-
:result :sameInverse (:x :i :j) .
|
|
43
|
-
:result :sameInverse (:x :j :i) .
|
|
44
|
-
|
|
45
|
-
in:metadata {
|
|
46
|
-
in:run a see:InputDataset .
|
|
47
|
-
in:run see:name "group_inverse_uniqueness" .
|
|
48
|
-
in:run see:title "In a group, the inverse of an element is unique." .
|
|
49
|
-
in:run see:sourceFile "examples/n3/group_inverse_uniqueness.n3" .
|
|
50
|
-
in:run see:sourceSHA256 "956bff60a7e087600d31b0fce180031de1e03f7a995b3f2949e531653b7b5dc3" .
|
|
51
|
-
in:run see:description "" .
|
|
52
|
-
in:run see:compiler "see.js N3-to-JS compiler" .
|
|
53
|
-
in:run see:inputFacts 6 .
|
|
54
|
-
in:run see:compiledRules 6 .
|
|
55
|
-
in:run see:compiledBackwardRules 0 .
|
|
56
|
-
in:run see:compiledFuses 0 .
|
|
57
|
-
in:run see:compiledQueries 1 .
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|