eyeleng 1.0.13 → 1.1.1

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 CHANGED
@@ -148,13 +148,15 @@ W3C checks:
148
148
 
149
149
  ```sh
150
150
  npm run w3c:rules
151
+ npm run w3c:rules:json
152
+ npm run w3c:rules:earl
151
153
  npm run w3c:rdf
152
- npm run w3c:all
153
154
  npm run w3c:rdf:json
154
155
  npm run w3c:rdf:earl
156
+ npm run w3c:all
155
157
  ```
156
158
 
157
- `npm test` includes the W3C harnesses. When W3C URLs are reachable, progress is printed test by test. In offline environments, remote W3C checks are reported as unreachable unless `EYELENG_W3C_REQUIRED=1` is set.
159
+ `npm test` includes the W3C harnesses. When W3C URLs are reachable, progress is printed test by test. In offline environments, remote W3C checks are reported as unreachable unless `EYELENG_W3C_REQUIRED=1` is set. The `*:earl` scripts also print test progress, but write the EARL Turtle only to `reports/` instead of printing the report to the terminal.
158
160
 
159
161
  The official Eyeleng EARL 1.0 report for the W3C SHACL 1.2 Rules manifest is in [reports/w3c-shacl12-rules-earl.ttl](./reports/w3c-shacl12-rules-earl.ttl).
160
162
 
@@ -178,7 +180,6 @@ Use message logs directly, import them from SRL, or force message-log parsing fr
178
180
  ```sh
179
181
  ./eyeleng.js examples/rdf-messages.srl
180
182
  ./eyeleng.js --rdf-messages --all examples/rdf-messages.trig
181
- ./eyeleng.js --stream-messages --all examples/rdf-messages.trig
182
183
  ```
183
184
 
184
185
  The replay data includes message streams, envelopes, offsets, next-envelope links, payload kind, payload graph, and `eymsg:payloadTriple` triple terms. Blank-node labels are scoped per message. For Eyeleng, each payload graph is also represented as a closed RDF list of RDF 1.2 triple terms via `log:nameOf`.
@@ -206,12 +207,14 @@ Important options:
206
207
  --check parse and analyze only; do not run rules
207
208
  --strict treat static warnings as errors, including recursive term generation
208
209
  --deps print rule dependency edges during --check
209
- --query TEXT run a raw SRL body pattern over the closure
210
+ --query TEXT run a raw SRL body pattern over the closure or backward planner
210
211
  --query-file FILE read a raw SRL body pattern from a file
212
+ --query-mode MODE use auto, forward, or backward query planning (default auto)
213
+ --hybrid force aggressive hybrid orientation for function-like rules
214
+ --no-hybrid disable automatic hybrid forward/backward execution
211
215
  --max-iterations N stop after N fixpoint iterations within a recursive layer
212
216
  --no-imports parse IMPORTS/owl:imports but do not load imported rule sets
213
217
  --rdf-messages parse input as an RDF Message Log
214
- --stream-messages replay RDF Message Log envelopes
215
218
  --include-message-facts include payload facts while parsing RDF Message Logs
216
219
  --syntax MODE use srl, rdf, or auto syntax detection (default auto)
217
220
  --ruleset TERM in RDF syntax, run only the selected srl:RuleSet
@@ -242,6 +245,21 @@ const { runQuery, formatBindings } = require('./src/index.js');
242
245
 
243
246
  const result = runQuery(source, '?x :ancestorOf ?y');
244
247
  console.log(formatBindings(result.query.bindings, result.prefixes));
248
+
249
+ // Query mode defaults to auto. Supported query/rule shapes are proved
250
+ // backward with tabling. If full backward proving is not safe but the
251
+ // ruleset contains function-like derived predicates, auto mode uses a
252
+ // hybrid plan before falling back to plain forward closure.
253
+ const justInTime = runQuery(source, ':alice :computedValue ?value', { queryMode: 'backward' });
254
+
255
+ // Run mode uses conservative auto-hybrid planning by default. It keeps
256
+ // ordinary rules materialized, but can prove demanded function-like predicates
257
+ // backward with tabling. Pass { hybrid: false } to force pure forward closure,
258
+ // or { hybrid: true } to force aggressive hybrid orientation.
259
+ const resultWithAutoHybrid = run(source);
260
+
261
+ // The backward planner is demand-driven: irrelevant unsupported rules do not
262
+ // prevent a query from using tabled backward proving.
245
263
  ```
246
264
 
247
265
  Imports:
@@ -274,6 +292,7 @@ src/store.js triple set, predicate index, matching, paths
274
292
  src/builtins.js expression evaluation and built-in functions
275
293
  src/analyze.js diagnostics, dependencies, strata
276
294
  src/engine.js layered forward-chaining evaluator
295
+ src/backward.js goal-directed backward query prover with tabling
277
296
  src/query.js external raw-body query operation
278
297
  src/format.js text and JSON output
279
298
  src/api.js public JavaScript API and import merging