eyeling 1.26.5 → 1.26.7

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/lib/engine.js CHANGED
@@ -717,16 +717,16 @@ function __computeConclusionFromFormula(formula) {
717
717
  for (const tr of formula.triples) {
718
718
  // Treat {A} => {B} as a forward rule.
719
719
  if (isLogImplies(tr.p)) {
720
- fw.push(__makeRuleFromTerms(tr.s, tr.o, true));
720
+ fw.push(__copyProofSource(tr, __makeRuleFromTerms(tr.s, tr.o, true)));
721
721
  continue;
722
722
  }
723
723
 
724
724
  // Treat {A} <= {B} as the same rule in the other direction, i.e., {B} => {A},
725
725
  // so it participates in deductive closure even if only <= is used.
726
726
  if (isLogImpliedBy(tr.p)) {
727
- fw.push(__makeRuleFromTerms(tr.o, tr.s, true));
727
+ fw.push(__copyProofSource(tr, __makeRuleFromTerms(tr.o, tr.s, true)));
728
728
  // Also index it as a backward rule for completeness (helps proveGoals in some cases).
729
- bw.push(__makeRuleFromTerms(tr.s, tr.o, false));
729
+ bw.push(__copyProofSource(tr, __makeRuleFromTerms(tr.s, tr.o, false)));
730
730
  continue;
731
731
  }
732
732
  }
@@ -3240,7 +3240,7 @@ function forwardChain(facts, forwardRules, backRules, onDerived /* optional */,
3240
3240
  // Promote rule-producing triples to live rules, treating literal true as {}
3241
3241
  // and literal false as a fuse head.
3242
3242
  if (isFwRuleTriple) {
3243
- const newRule = __makeRuleFromTerms(subj, obj, true);
3243
+ const newRule = __copyProofSource(r, __makeRuleFromTerms(subj, obj, true));
3244
3244
  __prepareForwardRule(newRule);
3245
3245
 
3246
3246
  const key = __ruleKey(
@@ -3257,7 +3257,7 @@ function forwardChain(facts, forwardRules, backRules, onDerived /* optional */,
3257
3257
  rulesChanged = true;
3258
3258
  }
3259
3259
  } else if (isBwRuleTriple) {
3260
- const newRule = __makeRuleFromTerms(subj, obj, false);
3260
+ const newRule = __copyProofSource(r, __makeRuleFromTerms(subj, obj, false));
3261
3261
 
3262
3262
  const key = __ruleKey(
3263
3263
  newRule.isForward,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyeling",
3
- "version": "1.26.5",
3
+ "version": "1.26.7",
4
4
  "description": "A minimal Notation3 (N3) reasoner in JavaScript.",
5
5
  "main": "./index.js",
6
6
  "keywords": [