eyeling 1.12.11 → 1.12.12

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.
@@ -0,0 +1,11 @@
1
+ @prefix : <http://example.org/ns#> .
2
+ @prefix log: <http://www.w3.org/2000/10/swap/log#> .
3
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
4
+
5
+ {
6
+ :c a :Cat .
7
+ } => {
8
+ :c a :Animal .
9
+ } .
10
+ :c a :Animal .
11
+ :test :is true .
@@ -0,0 +1,36 @@
1
+ # ==========================
2
+ # Quoted head unquote select
3
+ # ==========================
4
+ #
5
+ # Activate a quoted rule via metadata selection (class → rule → formula),
6
+ # then unquote it by using a term RHS (=> ?F). This should derive :test :is true.
7
+
8
+ @prefix : <http://example.org/ns#> .
9
+
10
+ # Two rules stored as data
11
+ :ruleCat :formula {
12
+ { ?X a :Cat } => { ?X a :Animal } .
13
+ } .
14
+
15
+ :ruleDog :formula {
16
+ { ?X a :Dog } => { ?X a :Pet } .
17
+ } .
18
+
19
+ # Metadata chooses which stored rule applies for a given class
20
+ :Cat :activates :ruleCat .
21
+ :Dog :activates :ruleDog .
22
+
23
+ # Different pattern: pick the rule based on the instance's class, then unquote it
24
+ {
25
+ ?X a ?Class .
26
+ ?Class :activates ?Rule .
27
+ ?Rule :formula ?F .
28
+ }
29
+ => ?F .
30
+
31
+ # Data
32
+ :c a :Cat .
33
+
34
+ # Check
35
+ { :c a :Animal } => { :test :is true } .
36
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyeling",
3
- "version": "1.12.11",
3
+ "version": "1.12.12",
4
4
  "description": "A minimal Notation3 (N3) reasoner in JavaScript.",
5
5
  "main": "./index.js",
6
6
  "keywords": [