eyeling 1.8.5 → 1.8.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.
Files changed (2) hide show
  1. package/eyeling.js +14 -27
  2. package/package.json +1 -1
package/eyeling.js CHANGED
@@ -4458,7 +4458,7 @@ function evalCryptoHashBuiltin(g, subst, algo) {
4458
4458
  // log: scoped-closure priority helper
4459
4459
  // ---------------------------------------------------------------------------
4460
4460
  // When log:collectAllIn / log:forAllIn are used with an object that is a
4461
- // natural number literal, that number is treated as a *priority* (closure level).
4461
+ // positive integer literal (>= 1), that number is treated as a *priority* (closure level).
4462
4462
  // See the adapted semantics near those builtins.
4463
4463
  function __logNaturalPriorityFromTerm(t) {
4464
4464
  const info = parseNumericLiteralInfo(t);
@@ -4467,12 +4467,12 @@ function __logNaturalPriorityFromTerm(t) {
4467
4467
 
4468
4468
  const v = info.value;
4469
4469
  if (typeof v === 'bigint') {
4470
- if (v < 0n) return null;
4470
+ if (v < 1n) return null;
4471
4471
  if (v > BigInt(Number.MAX_SAFE_INTEGER)) return null;
4472
4472
  return Number(v);
4473
4473
  }
4474
4474
  if (typeof v === 'number') {
4475
- if (!Number.isInteger(v) || v < 0) return null;
4475
+ if (!Number.isInteger(v) || v < 1) return null;
4476
4476
  return v;
4477
4477
  }
4478
4478
  return null;
@@ -6129,9 +6129,7 @@ function evalBuiltin(goal, subst, facts, backRules, depth, varGen, maxResults) {
6129
6129
 
6130
6130
  // Priority / closure semantics:
6131
6131
  // - object = GraphTerm: explicit scope, run immediately (no closure gating)
6132
- // - object = natural number literal N: delay until saturated closure level >= N
6133
- // * N = 0 => run immediately (use the live fact store)
6134
- // * N >= 1 => run only when a scoped snapshot exists at closure level >= N
6132
+ // - object = positive integer literal N (>= 1): delay until saturated closure level >= N
6135
6133
  // - object = Var: treat as priority 1 (do not bind)
6136
6134
  // - any other object: backward-compatible default priority 1
6137
6135
 
@@ -6164,17 +6162,11 @@ function evalBuiltin(goal, subst, facts, backRules, depth, varGen, maxResults) {
6164
6162
  if (p0 !== null) prio = p0;
6165
6163
  }
6166
6164
 
6167
- if (prio === 0) {
6168
- // Immediate: use live closure during the current fixpoint phase.
6169
- scopeFacts = facts;
6170
- scopeBackRules = backRules;
6171
- } else {
6172
- const snap = facts.__scopedSnapshot || null;
6173
- const lvl = (facts && typeof facts.__scopedClosureLevel === 'number' && facts.__scopedClosureLevel) || 0;
6174
- if (!snap) return []; // DELAY until snapshot exists
6175
- if (lvl < prio) return []; // DELAY until saturated closure prio exists
6176
- scopeFacts = snap;
6177
- }
6165
+ const snap = facts.__scopedSnapshot || null;
6166
+ const lvl = (facts && typeof facts.__scopedClosureLevel === 'number' && facts.__scopedClosureLevel) || 0;
6167
+ if (!snap) return []; // DELAY until snapshot exists
6168
+ if (lvl < prio) return []; // DELAY until saturated closure prio exists
6169
+ scopeFacts = snap;
6178
6170
  }
6179
6171
 
6180
6172
  // If sols is a blank node succeed without collecting/binding.
@@ -6237,16 +6229,11 @@ function evalBuiltin(goal, subst, facts, backRules, depth, varGen, maxResults) {
6237
6229
  if (p0 !== null) prio = p0;
6238
6230
  }
6239
6231
 
6240
- if (prio === 0) {
6241
- scopeFacts = facts;
6242
- scopeBackRules = backRules;
6243
- } else {
6244
- const snap = facts.__scopedSnapshot || null;
6245
- const lvl = (facts && typeof facts.__scopedClosureLevel === 'number' && facts.__scopedClosureLevel) || 0;
6246
- if (!snap) return []; // DELAY until snapshot exists
6247
- if (lvl < prio) return []; // DELAY until saturated closure prio exists
6248
- scopeFacts = snap;
6249
- }
6232
+ const snap = facts.__scopedSnapshot || null;
6233
+ const lvl = (facts && typeof facts.__scopedClosureLevel === 'number' && facts.__scopedClosureLevel) || 0;
6234
+ if (!snap) return []; // DELAY until snapshot exists
6235
+ if (lvl < prio) return []; // DELAY until saturated closure prio exists
6236
+ scopeFacts = snap;
6250
6237
  }
6251
6238
 
6252
6239
  const visited1 = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyeling",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
4
4
  "description": "A minimal Notation3 (N3) reasoner in JavaScript.",
5
5
  "main": "./index.js",
6
6
  "keywords": [