eyeling 1.30.5 → 1.31.0

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 (60) hide show
  1. package/README.md +0 -157
  2. package/dist/browser/eyeling.browser.js +13 -561
  3. package/eyeling.js +13 -561
  4. package/index.d.ts +0 -4
  5. package/index.js +1 -2
  6. package/lib/cli.js +4 -11
  7. package/lib/engine.js +6 -14
  8. package/lib/lexer.js +0 -4
  9. package/lib/multisource.js +3 -5
  10. package/package.json +3 -6
  11. package/test/examples.test.js +5 -37
  12. package/test/playground.test.js +1 -1
  13. package/test/run.js +60 -0
  14. package/examples/input/rdf-surfaces-all-values-from-reverse.ttl +0 -17
  15. package/examples/input/rdf-surfaces-all-values-from.ttl +0 -13
  16. package/examples/input/rdf-surfaces-ancestor.ttl +0 -20
  17. package/examples/input/rdf-surfaces-city.ttl +0 -11
  18. package/examples/input/rdf-surfaces-disjunction-elimination.ttl +0 -16
  19. package/examples/input/rdf-surfaces-disjunction-route-filter.ttl +0 -11
  20. package/examples/input/rdf-surfaces-domain.ttl +0 -11
  21. package/examples/input/rdf-surfaces-explicit-disjunction.ttl +0 -22
  22. package/examples/input/rdf-surfaces-multi-premise.ttl +0 -13
  23. package/examples/input/rdf-surfaces-owl-all-values-from-codex.ttl +0 -35
  24. package/examples/input/rdf-surfaces-property-chain.ttl +0 -13
  25. package/examples/input/rdf-surfaces-range.ttl +0 -11
  26. package/examples/input/rdf-surfaces-rdfs-range-codex.ttl +0 -18
  27. package/examples/input/rdf-surfaces-rdfs-subclass-codex.ttl +0 -18
  28. package/examples/input/rdf-surfaces-strong-negation-access.ttl +0 -14
  29. package/examples/output/rdf-surfaces-all-values-from-reverse.n3 +0 -3
  30. package/examples/output/rdf-surfaces-all-values-from.n3 +0 -3
  31. package/examples/output/rdf-surfaces-ancestor.n3 +0 -5
  32. package/examples/output/rdf-surfaces-city.n3 +0 -3
  33. package/examples/output/rdf-surfaces-disjunction-elimination.n3 +0 -3
  34. package/examples/output/rdf-surfaces-disjunction-route-filter.n3 +0 -3
  35. package/examples/output/rdf-surfaces-domain.n3 +0 -3
  36. package/examples/output/rdf-surfaces-explicit-disjunction.n3 +0 -3
  37. package/examples/output/rdf-surfaces-multi-premise.n3 +0 -3
  38. package/examples/output/rdf-surfaces-owl-all-values-from-codex.n3 +0 -6
  39. package/examples/output/rdf-surfaces-property-chain.n3 +0 -3
  40. package/examples/output/rdf-surfaces-range.n3 +0 -3
  41. package/examples/output/rdf-surfaces-rdfs-range-codex.n3 +0 -3
  42. package/examples/output/rdf-surfaces-rdfs-subclass-codex.n3 +0 -3
  43. package/examples/output/rdf-surfaces-strong-negation-access.n3 +0 -4
  44. package/examples/rdf-surfaces-all-values-from-reverse.n3 +0 -6
  45. package/examples/rdf-surfaces-all-values-from.n3 +0 -6
  46. package/examples/rdf-surfaces-ancestor.n3 +0 -6
  47. package/examples/rdf-surfaces-city.n3 +0 -6
  48. package/examples/rdf-surfaces-disjunction-elimination.n3 +0 -13
  49. package/examples/rdf-surfaces-disjunction-route-filter.n3 +0 -24
  50. package/examples/rdf-surfaces-domain.n3 +0 -6
  51. package/examples/rdf-surfaces-explicit-disjunction.n3 +0 -16
  52. package/examples/rdf-surfaces-multi-premise.n3 +0 -6
  53. package/examples/rdf-surfaces-owl-all-values-from-codex.n3 +0 -10
  54. package/examples/rdf-surfaces-property-chain.n3 +0 -6
  55. package/examples/rdf-surfaces-range.n3 +0 -6
  56. package/examples/rdf-surfaces-rdfs-range-codex.n3 +0 -6
  57. package/examples/rdf-surfaces-rdfs-subclass-codex.n3 +0 -6
  58. package/examples/rdf-surfaces-strong-negation-access.n3 +0 -20
  59. package/lib/rdf_surfaces.js +0 -524
  60. package/test/rdf_surfaces.test.js +0 -214
@@ -1,14 +0,0 @@
1
- # eyeling-options: --rdf-surfaces
2
- @prefix ex: <http://example.org/> .
3
-
4
- ex:alice ex:requests ex:lab .
5
- ex:bob ex:requests ex:lab .
6
- ex:lab a ex:RestrictedArea .
7
- ex:alice ex:clearance ex:general .
8
- ex:bob ex:clearance ex:admin .
9
-
10
- # Strong negation: nobody with general clearance may access the lab.
11
- %not[ _:person
12
- _:person ex:access ex:lab .
13
- _:person ex:clearance ex:general .
14
- %]
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:box a ex:AllowedContainer .
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:item42 a ex:AllowedItem .
@@ -1,5 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:ann ex:ancestor ex:bob .
4
- ex:bob ex:ancestor ex:cat .
5
- ex:ann ex:ancestor ex:cat .
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:Brussels a ex:HumanCommunity .
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:caseSplit ex:disjunctionEntails ex:NeedsHumanAttention .
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:shipment17 ex:viableRoute ex:Rail .
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:alice a ex:Member .
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:shipment23 ex:selectedRoute ex:Rail .
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:case123 a ex:PriorityCase .
@@ -1,6 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:item43 a ex:AllowedItem .
4
- ex:item42 a ex:AllowedItem .
5
- ex:box a ex:AllowedContainer .
6
- ex:crate a ex:AllowedContainer .
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:alice ex:grandparent ex:carol .
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:bob a ex:Person .
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:bob a ex:Person .
@@ -1,3 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:Brussels a ex:HumanCommunity .
@@ -1,4 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
-
3
- ex:bob ex:decision ex:Permit .
4
- ex:alice ex:decision ex:Deny .
@@ -1,6 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- { ?s a ex:AllowedContainer . }
5
- log:query
6
- { ?s a ex:AllowedContainer . } .
@@ -1,6 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- { ?s a ex:AllowedItem . }
5
- log:query
6
- { ?s a ex:AllowedItem . } .
@@ -1,6 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- { ?s ex:ancestor ?o . }
5
- log:query
6
- { ?s ex:ancestor ?o . } .
@@ -1,6 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- { ?s a ex:HumanCommunity . }
5
- log:query
6
- { ?s a ex:HumanCommunity . } .
@@ -1,13 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- # Disjunction elimination as N3 rules: if every disjunctive option implies the
5
- # same candidate conclusion, then the whole disjunction entails that conclusion.
6
- { ?choice ex:candidateConclusion ?conclusion .
7
- ( { ?choice ex:option ?option . }
8
- { ?option ex:implies ?conclusion . } ) log:forAllIn 1 .
9
- } => { ?choice ex:disjunctionEntails ?conclusion . } .
10
-
11
- { ?choice ex:disjunctionEntails ?conclusion . }
12
- log:query
13
- { ?choice ex:disjunctionEntails ?conclusion . } .
@@ -1,24 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- # Extra N3 rules encode a disjunction as explicit alternatives. This does not
5
- # assert both routes; it derives candidate routes that can be filtered.
6
- { ?shipment a ex:ExpressShipment . }
7
- => {
8
- ?shipment ex:possibleRoute ex:Rail .
9
- ?shipment ex:possibleRoute ex:Drone .
10
- } .
11
-
12
- # Mirror the strong-negation policy into a filterable denial fact before any
13
- # candidate route is selected as viable.
14
- { ?shipment ex:destination ex:CityCenter .
15
- ?shipment ex:possibleRoute ex:Drone .
16
- } => { ?shipment ex:stronglyNegatedRoute ex:Drone . } .
17
-
18
- { ?shipment ex:possibleRoute ?route .
19
- 1 log:notIncludes { ?shipment ex:stronglyNegatedRoute ?route . } .
20
- } => { ?shipment ex:viableRoute ?route . } .
21
-
22
- { ?shipment ex:viableRoute ?route . }
23
- log:query
24
- { ?shipment ex:viableRoute ?route . } .
@@ -1,6 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- { ?s a ex:Member . }
5
- log:query
6
- { ?s a ex:Member . } .
@@ -1,16 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- # Extra N3 rules interpret the explicit surface disjunction as candidate
5
- # alternatives and select the alternatives that are not strongly negated.
6
- { ?shipment ex:destination ex:CityCenter .
7
- ?shipment ex:possibleRoute ex:Drone .
8
- } => { ?shipment ex:stronglyNegatedRoute ex:Drone . } .
9
-
10
- { ?shipment ex:possibleRoute ?route .
11
- 1 log:notIncludes { ?shipment ex:stronglyNegatedRoute ?route . } .
12
- } => { ?shipment ex:selectedRoute ?route . } .
13
-
14
- { ?shipment ex:selectedRoute ?route . }
15
- log:query
16
- { ?shipment ex:selectedRoute ?route . } .
@@ -1,6 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- { ?s a ex:PriorityCase . }
5
- log:query
6
- { ?s a ex:PriorityCase . } .
@@ -1,10 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- { ?s a ex:AllowedItem . }
5
- log:query
6
- { ?s a ex:AllowedItem . } .
7
-
8
- { ?s a ex:AllowedContainer . }
9
- log:query
10
- { ?s a ex:AllowedContainer . } .
@@ -1,6 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- { ?s ex:grandparent ?o . }
5
- log:query
6
- { ?s ex:grandparent ?o . } .
@@ -1,6 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- { ?s a ex:Person . }
5
- log:query
6
- { ?s a ex:Person . } .
@@ -1,6 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- { ?s a ex:Person . }
5
- log:query
6
- { ?s a ex:Person . } .
@@ -1,6 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- { ?s a ex:HumanCommunity . }
5
- log:query
6
- { ?s a ex:HumanCommunity . } .
@@ -1,20 +0,0 @@
1
- @prefix ex: <http://example.org/> .
2
- @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
-
4
- # Extra N3 rules interpret the positive policy. The RDF Surface above remains
5
- # a hard strong-negation guard: deriving the forbidden access would trip the fuse.
6
- { ?person ex:requests ?area .
7
- ?person ex:clearance ex:admin .
8
- } => { ?person ex:access ?area . } .
9
-
10
- { ?person ex:requests ?area .
11
- ?person ex:access ?area .
12
- } => { ?person ex:decision ex:Permit . } .
13
-
14
- { ?person ex:requests ?area .
15
- 1 log:notIncludes { ?person ex:decision ex:Permit . } .
16
- } => { ?person ex:decision ex:Deny . } .
17
-
18
- { ?person ex:decision ?decision . }
19
- log:query
20
- { ?person ex:decision ?decision . } .