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/HANDBOOK.md +69 -3
- package/dist/browser/eyeling.browser.js +5 -5
- package/examples/deck/rdf-message-window-repair.md +175 -0
- package/examples/input/rdf-message-window-repair.trig +79 -0
- package/examples/output/rdf-message-window-repair.md +13 -0
- package/examples/proof/derived-backward-rule-2.n3 +80 -0
- package/examples/proof/derived-backward-rule.n3 +53 -0
- package/examples/proof/derived-rule.n3 +43 -0
- package/examples/proof/dog.n3 +41 -0
- package/examples/proof/equals.n3 +14 -0
- package/examples/proof/list-iterate.n3 +142 -0
- package/examples/proof/list-map.n3 +44 -0
- package/examples/proof/log-conclusion.n3 +118 -0
- package/examples/proof/log-for-all-in.n3 +33 -0
- package/examples/proof/log-not-includes.n3 +55 -0
- package/examples/proof/log-uri.n3 +34 -0
- package/examples/proof/rule-matching.n3 +34 -0
- package/examples/rdf-message-window-repair.n3 +163 -0
- package/eyeling.js +5 -5
- package/lib/engine.js +5 -5
- package/package.json +1 -1
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,
|