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.
- package/README.md +0 -157
- package/dist/browser/eyeling.browser.js +13 -561
- package/eyeling.js +13 -561
- package/index.d.ts +0 -4
- package/index.js +1 -2
- package/lib/cli.js +4 -11
- package/lib/engine.js +6 -14
- package/lib/lexer.js +0 -4
- package/lib/multisource.js +3 -5
- package/package.json +3 -6
- package/test/examples.test.js +5 -37
- package/test/playground.test.js +1 -1
- package/test/run.js +60 -0
- package/examples/input/rdf-surfaces-all-values-from-reverse.ttl +0 -17
- package/examples/input/rdf-surfaces-all-values-from.ttl +0 -13
- package/examples/input/rdf-surfaces-ancestor.ttl +0 -20
- package/examples/input/rdf-surfaces-city.ttl +0 -11
- package/examples/input/rdf-surfaces-disjunction-elimination.ttl +0 -16
- package/examples/input/rdf-surfaces-disjunction-route-filter.ttl +0 -11
- package/examples/input/rdf-surfaces-domain.ttl +0 -11
- package/examples/input/rdf-surfaces-explicit-disjunction.ttl +0 -22
- package/examples/input/rdf-surfaces-multi-premise.ttl +0 -13
- package/examples/input/rdf-surfaces-owl-all-values-from-codex.ttl +0 -35
- package/examples/input/rdf-surfaces-property-chain.ttl +0 -13
- package/examples/input/rdf-surfaces-range.ttl +0 -11
- package/examples/input/rdf-surfaces-rdfs-range-codex.ttl +0 -18
- package/examples/input/rdf-surfaces-rdfs-subclass-codex.ttl +0 -18
- package/examples/input/rdf-surfaces-strong-negation-access.ttl +0 -14
- package/examples/output/rdf-surfaces-all-values-from-reverse.n3 +0 -3
- package/examples/output/rdf-surfaces-all-values-from.n3 +0 -3
- package/examples/output/rdf-surfaces-ancestor.n3 +0 -5
- package/examples/output/rdf-surfaces-city.n3 +0 -3
- package/examples/output/rdf-surfaces-disjunction-elimination.n3 +0 -3
- package/examples/output/rdf-surfaces-disjunction-route-filter.n3 +0 -3
- package/examples/output/rdf-surfaces-domain.n3 +0 -3
- package/examples/output/rdf-surfaces-explicit-disjunction.n3 +0 -3
- package/examples/output/rdf-surfaces-multi-premise.n3 +0 -3
- package/examples/output/rdf-surfaces-owl-all-values-from-codex.n3 +0 -6
- package/examples/output/rdf-surfaces-property-chain.n3 +0 -3
- package/examples/output/rdf-surfaces-range.n3 +0 -3
- package/examples/output/rdf-surfaces-rdfs-range-codex.n3 +0 -3
- package/examples/output/rdf-surfaces-rdfs-subclass-codex.n3 +0 -3
- package/examples/output/rdf-surfaces-strong-negation-access.n3 +0 -4
- package/examples/rdf-surfaces-all-values-from-reverse.n3 +0 -6
- package/examples/rdf-surfaces-all-values-from.n3 +0 -6
- package/examples/rdf-surfaces-ancestor.n3 +0 -6
- package/examples/rdf-surfaces-city.n3 +0 -6
- package/examples/rdf-surfaces-disjunction-elimination.n3 +0 -13
- package/examples/rdf-surfaces-disjunction-route-filter.n3 +0 -24
- package/examples/rdf-surfaces-domain.n3 +0 -6
- package/examples/rdf-surfaces-explicit-disjunction.n3 +0 -16
- package/examples/rdf-surfaces-multi-premise.n3 +0 -6
- package/examples/rdf-surfaces-owl-all-values-from-codex.n3 +0 -10
- package/examples/rdf-surfaces-property-chain.n3 +0 -6
- package/examples/rdf-surfaces-range.n3 +0 -6
- package/examples/rdf-surfaces-rdfs-range-codex.n3 +0 -6
- package/examples/rdf-surfaces-rdfs-subclass-codex.n3 +0 -6
- package/examples/rdf-surfaces-strong-negation-access.n3 +0 -20
- package/lib/rdf_surfaces.js +0 -524
- 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,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,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,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 . } .
|