occam-verify-cli 1.0.388 → 1.0.404
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/action/verify.js +3 -3
- package/lib/assignment/equality.js +2 -2
- package/lib/context/file.js +11 -11
- package/lib/context/local.js +38 -61
- package/lib/context/partial.js +10 -10
- package/lib/context/temporary.js +755 -0
- package/lib/mixins/statement/verify.js +38 -16
- package/lib/mixins/step/unify.js +7 -8
- package/lib/node/argument.js +4 -4
- package/lib/node/assertion/contained.js +6 -6
- package/lib/node/assertion/defined.js +6 -6
- package/lib/node/assertion/property.js +6 -6
- package/lib/node/assertion/satisfies.js +6 -6
- package/lib/node/assertion/subproof.js +6 -6
- package/lib/node/assertion/type.js +6 -6
- package/lib/node/assertion.js +107 -0
- package/lib/node/assumption.js +134 -0
- package/lib/node/axiom.js +6 -6
- package/lib/node/{topLevelAssertion.js → axiomLemmaTheoremConjecture.js} +12 -12
- package/lib/node/body.js +4 -5
- package/lib/node/combinator.js +4 -4
- package/lib/node/conclusion.js +4 -4
- package/lib/node/conjecture.js +6 -6
- package/lib/node/constructor.js +4 -4
- package/lib/node/declaration/combinator.js +6 -6
- package/lib/node/declaration/complexType.js +6 -6
- package/lib/node/declaration/constructor.js +6 -6
- package/lib/node/declaration/metavariable.js +6 -6
- package/lib/node/declaration/property.js +6 -6
- package/lib/node/declaration/simpleType.js +6 -6
- package/lib/node/declaration/typePrefix.js +6 -6
- package/lib/node/declaration/variable.js +6 -6
- package/lib/node/declaration.js +6 -22
- package/lib/node/deduction.js +4 -4
- package/lib/node/derivation.js +4 -4
- package/lib/node/document.js +107 -0
- package/lib/node/equality.js +4 -4
- package/lib/node/error.js +4 -4
- package/lib/node/frame.js +25 -14
- package/lib/node/header.js +4 -4
- package/lib/node/hypothesis.js +4 -4
- package/lib/node/judgement.js +8 -8
- package/lib/node/label.js +4 -4
- package/lib/node/labels.js +4 -4
- package/lib/node/lemma.js +6 -6
- package/lib/node/metaArgument.js +4 -4
- package/lib/node/metaLemma.js +6 -6
- package/lib/node/{topLevelMetaAssertion.js → metaLemmaMetaTheorem.js} +12 -12
- package/lib/node/metaType.js +4 -4
- package/lib/node/metatheorem.js +6 -6
- package/lib/node/metavariable.js +4 -4
- package/lib/node/nonsense.js +4 -4
- package/lib/node/parameter.js +4 -4
- package/lib/node/parenthesisedLabel.js +4 -4
- package/lib/node/parenthesisedLabels.js +4 -4
- package/lib/node/placeholder.js +107 -0
- package/lib/node/premise.js +4 -4
- package/lib/node/procedureCall.js +4 -4
- package/lib/node/procedureReference.js +4 -4
- package/lib/node/proof.js +4 -4
- package/lib/node/property.js +4 -4
- package/lib/node/propertyRelation.js +4 -4
- package/lib/node/qualification.js +4 -4
- package/lib/node/reference.js +4 -4
- package/lib/node/rule.js +4 -4
- package/lib/node/section.js +4 -4
- package/lib/node/signature.js +4 -4
- package/lib/node/statement.js +15 -4
- package/lib/node/step.js +4 -4
- package/lib/node/subDerivation.js +4 -4
- package/lib/node/subproof.js +4 -4
- package/lib/node/substitution/frame.js +28 -6
- package/lib/node/substitution/statement.js +6 -6
- package/lib/node/substitution/term.js +28 -6
- package/lib/node/substitution.js +107 -0
- package/lib/node/supposition.js +4 -4
- package/lib/node/term.js +27 -4
- package/lib/node/theorem.js +6 -6
- package/lib/node/type.js +4 -4
- package/lib/node/typePrefix.js +4 -4
- package/lib/node/types.js +4 -4
- package/lib/node/variable.js +4 -4
- package/lib/nominal/parser.js +3 -3
- package/lib/nonTerminalNode.js +222 -0
- package/lib/nonTerminalNodeMap.js +5 -3
- package/lib/ontology/assertion/contained.js +80 -39
- package/lib/ontology/assertion/defined.js +80 -39
- package/lib/ontology/assertion/property.js +71 -29
- package/lib/ontology/assertion/satisfies.js +73 -25
- package/lib/ontology/assertion/subproof.js +95 -41
- package/lib/ontology/assertion/type.js +74 -18
- package/lib/ontology/assertion.js +66 -0
- package/lib/ontology/assumption.js +379 -0
- package/lib/ontology/axiom.js +8 -11
- package/lib/ontology/combinator/bracketed.js +17 -3
- package/lib/ontology/combinator.js +17 -3
- package/lib/ontology/conclusion.js +38 -9
- package/lib/ontology/constructor/bracketed.js +17 -3
- package/lib/ontology/constructor.js +17 -3
- package/lib/ontology/declaration/combinator.js +75 -33
- package/lib/ontology/declaration/complexType.js +110 -63
- package/lib/ontology/declaration/constructor.js +81 -38
- package/lib/ontology/declaration/metavariable.js +87 -39
- package/lib/ontology/declaration/simpleType.js +95 -48
- package/lib/ontology/declaration/typePrefix.js +87 -40
- package/lib/ontology/declaration/variable.js +87 -39
- package/lib/ontology/declaration.js +13 -313
- package/lib/ontology/deduction.js +38 -9
- package/lib/ontology/equivalence.js +295 -0
- package/lib/ontology/equivalences.js +264 -0
- package/lib/ontology/frame.js +83 -51
- package/lib/ontology/hypothesis.js +11 -11
- package/lib/ontology/judgement.js +8 -8
- package/lib/ontology/label.js +5 -6
- package/lib/ontology/metavariable.js +14 -15
- package/lib/ontology/premise.js +60 -21
- package/lib/ontology/procedureCall.js +15 -15
- package/lib/ontology/procedureReference.js +1 -1
- package/lib/ontology/proof.js +2 -2
- package/lib/ontology/reference.js +6 -13
- package/lib/ontology/rule.js +69 -71
- package/lib/ontology/section.js +2 -2
- package/lib/ontology/signature.js +2 -2
- package/lib/ontology/statement.js +36 -24
- package/lib/ontology/step.js +38 -26
- package/lib/ontology/subproof.js +12 -13
- package/lib/ontology/substitution/frame.js +69 -21
- package/lib/ontology/substitution/reference.js +24 -9
- package/lib/ontology/substitution/statement.js +137 -76
- package/lib/ontology/substitution/term.js +75 -35
- package/lib/ontology/substitution.js +50 -44
- package/lib/ontology/substitutions.js +425 -0
- package/lib/ontology/supposition.js +69 -29
- package/lib/ontology/term.js +35 -37
- package/lib/ontology/topLevelAssertion.js +16 -17
- package/lib/ontology/topLevelMetaAssertion.js +3 -4
- package/lib/ontology/variable.js +9 -14
- package/lib/preamble.js +7 -4
- package/lib/ruleNames.js +20 -12
- package/lib/unifier/intrinsicLevel.js +4 -5
- package/lib/unifier/metaLevel.js +24 -24
- package/lib/utilities/brackets.js +4 -21
- package/lib/utilities/context.js +6 -6
- package/lib/utilities/frame.js +18 -0
- package/lib/utilities/json.js +24 -1
- package/lib/utilities/metavariable.js +18 -0
- package/lib/utilities/statement.js +18 -0
- package/lib/utilities/substitutions.js +43 -30
- package/lib/utilities/unification.js +10 -16
- package/lib/utilities/variable.js +18 -0
- package/package.json +10 -10
- package/src/action/verify.js +2 -2
- package/src/assignment/equality.js +1 -1
- package/src/context/file.js +13 -11
- package/src/context/local.js +40 -65
- package/src/context/partial.js +9 -14
- package/src/context/temporary.js +463 -0
- package/src/mixins/statement/verify.js +60 -23
- package/src/mixins/step/unify.js +6 -6
- package/src/node/argument.js +1 -1
- package/src/node/assertion/contained.js +3 -3
- package/src/node/assertion/defined.js +3 -3
- package/src/node/assertion/property.js +3 -3
- package/src/node/assertion/satisfies.js +3 -3
- package/src/node/assertion/subproof.js +3 -3
- package/src/node/assertion/type.js +3 -3
- package/src/node/assertion.js +7 -0
- package/src/node/assumption.js +35 -0
- package/src/node/axiom.js +3 -3
- package/src/node/{topLevelAssertion.js → axiomLemmaTheoremConjecture.js} +2 -2
- package/src/node/body.js +1 -3
- package/src/node/combinator.js +1 -1
- package/src/node/conclusion.js +1 -1
- package/src/node/conjecture.js +3 -3
- package/src/node/constructor.js +1 -1
- package/src/node/declaration/combinator.js +3 -3
- package/src/node/declaration/complexType.js +3 -3
- package/src/node/declaration/constructor.js +3 -3
- package/src/node/declaration/metavariable.js +3 -3
- package/src/node/declaration/property.js +3 -3
- package/src/node/declaration/simpleType.js +3 -3
- package/src/node/declaration/typePrefix.js +3 -3
- package/src/node/declaration/variable.js +3 -3
- package/src/node/declaration.js +2 -18
- package/src/node/deduction.js +1 -1
- package/src/node/derivation.js +1 -1
- package/src/node/document.js +7 -0
- package/src/node/equality.js +1 -1
- package/src/node/error.js +1 -1
- package/src/node/frame.js +23 -11
- package/src/node/header.js +1 -1
- package/src/node/hypothesis.js +1 -1
- package/src/node/judgement.js +6 -6
- package/src/node/label.js +1 -1
- package/src/node/labels.js +1 -1
- package/src/node/lemma.js +3 -3
- package/src/node/metaArgument.js +1 -1
- package/src/node/metaLemma.js +3 -3
- package/src/node/{topLevelMetaAssertion.js → metaLemmaMetaTheorem.js} +2 -2
- package/src/node/metaType.js +1 -1
- package/src/node/metatheorem.js +3 -3
- package/src/node/metavariable.js +1 -1
- package/src/node/nonsense.js +1 -1
- package/src/node/parameter.js +1 -1
- package/src/node/parenthesisedLabel.js +1 -1
- package/src/node/parenthesisedLabels.js +1 -1
- package/src/node/placeholder.js +7 -0
- package/src/node/premise.js +1 -1
- package/src/node/procedureCall.js +1 -1
- package/src/node/procedureReference.js +1 -1
- package/src/node/proof.js +1 -1
- package/src/node/property.js +1 -1
- package/src/node/propertyRelation.js +1 -1
- package/src/node/qualification.js +1 -1
- package/src/node/reference.js +1 -1
- package/src/node/rule.js +2 -2
- package/src/node/section.js +1 -1
- package/src/node/signature.js +1 -1
- package/src/node/statement.js +13 -1
- package/src/node/step.js +1 -1
- package/src/node/subDerivation.js +1 -1
- package/src/node/subproof.js +1 -1
- package/src/node/substitution/frame.js +29 -3
- package/src/node/substitution/statement.js +3 -3
- package/src/node/substitution/term.js +29 -3
- package/src/node/substitution.js +7 -0
- package/src/node/supposition.js +1 -1
- package/src/node/term.js +27 -1
- package/src/node/theorem.js +3 -3
- package/src/node/type.js +1 -1
- package/src/node/typePrefix.js +1 -1
- package/src/node/types.js +1 -1
- package/src/node/variable.js +1 -1
- package/src/nominal/parser.js +2 -2
- package/src/{node/nonTerminal.js → nonTerminalNode.js} +31 -25
- package/src/nonTerminalNodeMap.js +10 -5
- package/src/ontology/assertion/contained.js +21 -32
- package/src/ontology/assertion/defined.js +20 -31
- package/src/ontology/assertion/property.js +7 -20
- package/src/ontology/assertion/satisfies.js +8 -16
- package/src/ontology/assertion/subproof.js +36 -42
- package/src/ontology/assertion/type.js +10 -11
- package/src/ontology/assertion.js +23 -0
- package/src/ontology/assumption.js +385 -0
- package/src/ontology/axiom.js +7 -16
- package/src/ontology/combinator/bracketed.js +2 -0
- package/src/ontology/combinator.js +2 -0
- package/src/ontology/conclusion.js +51 -10
- package/src/ontology/constructor/bracketed.js +2 -0
- package/src/ontology/constructor.js +2 -0
- package/src/ontology/declaration/combinator.js +15 -24
- package/src/ontology/declaration/complexType.js +57 -53
- package/src/ontology/declaration/constructor.js +25 -31
- package/src/ontology/declaration/metavariable.js +25 -30
- package/src/ontology/declaration/simpleType.js +34 -38
- package/src/ontology/declaration/typePrefix.js +23 -31
- package/src/ontology/declaration/variable.js +26 -31
- package/src/ontology/declaration.js +8 -339
- package/src/ontology/deduction.js +51 -10
- package/src/{equivalence.js → ontology/equivalence.js} +4 -3
- package/src/{equivalences.js → ontology/equivalences.js} +14 -12
- package/src/ontology/frame.js +93 -66
- package/src/ontology/hypothesis.js +8 -8
- package/src/ontology/judgement.js +8 -8
- package/src/ontology/label.js +2 -7
- package/src/ontology/metavariable.js +14 -17
- package/src/ontology/premise.js +82 -25
- package/src/ontology/procedureCall.js +14 -14
- package/src/ontology/procedureReference.js +2 -2
- package/src/ontology/proof.js +1 -1
- package/src/ontology/reference.js +5 -9
- package/src/ontology/rule.js +79 -82
- package/src/ontology/section.js +1 -1
- package/src/ontology/signature.js +1 -1
- package/src/ontology/statement.js +37 -27
- package/src/ontology/step.js +45 -28
- package/src/ontology/subproof.js +10 -10
- package/src/ontology/substitution/frame.js +72 -26
- package/src/ontology/substitution/reference.js +8 -6
- package/src/ontology/substitution/statement.js +95 -76
- package/src/ontology/substitution/term.js +81 -41
- package/src/ontology/substitution.js +35 -34
- package/src/{substitutions.js → ontology/substitutions.js} +29 -28
- package/src/ontology/supposition.js +88 -28
- package/src/ontology/term.js +31 -43
- package/src/ontology/topLevelAssertion.js +16 -18
- package/src/ontology/topLevelMetaAssertion.js +3 -3
- package/src/ontology/variable.js +10 -17
- package/src/preamble.js +6 -3
- package/src/ruleNames.js +10 -8
- package/src/unifier/intrinsicLevel.js +5 -6
- package/src/unifier/metaLevel.js +32 -29
- package/src/utilities/brackets.js +3 -29
- package/src/utilities/context.js +5 -5
- package/src/utilities/frame.js +13 -0
- package/src/utilities/json.js +28 -0
- package/src/utilities/metavariable.js +13 -0
- package/src/utilities/statement.js +13 -0
- package/src/utilities/substitutions.js +59 -33
- package/src/utilities/unification.js +8 -24
- package/src/utilities/variable.js +13 -0
- package/lib/equivalence.js +0 -294
- package/lib/equivalences.js +0 -263
- package/lib/node/nonTerminal.js +0 -218
- package/lib/substitutions.js +0 -424
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { arrayUtilities } from "necessary";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { define } from "../ontology";
|
|
6
|
+
import { EMPTY_STRING } from "../constants";
|
|
6
7
|
|
|
7
8
|
const { find, first, clear, prune, filter, compress, correlate } = arrayUtilities;
|
|
8
9
|
|
|
9
|
-
export default class Substitutions {
|
|
10
|
+
export default define(class Substitutions {
|
|
10
11
|
constructor(array, savedArray) {
|
|
11
12
|
this.array = array;
|
|
12
13
|
this.savedArray = savedArray;
|
|
@@ -22,18 +23,6 @@ export default class Substitutions {
|
|
|
22
23
|
|
|
23
24
|
getLength() { return this.array.length; }
|
|
24
25
|
|
|
25
|
-
getFirstSubstitution() {
|
|
26
|
-
let firstSubstitution = null;
|
|
27
|
-
|
|
28
|
-
const length = this.getLength();
|
|
29
|
-
|
|
30
|
-
if (length > 0) {
|
|
31
|
-
firstSubstitution = first(this.array);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return firstSubstitution;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
26
|
getMetavariables() {
|
|
38
27
|
const metavariables = [];
|
|
39
28
|
|
|
@@ -70,6 +59,18 @@ export default class Substitutions {
|
|
|
70
59
|
return nonTrivialLength;
|
|
71
60
|
}
|
|
72
61
|
|
|
62
|
+
getFirstSubstitution() {
|
|
63
|
+
let firstSubstitution = null;
|
|
64
|
+
|
|
65
|
+
const length = this.getLength();
|
|
66
|
+
|
|
67
|
+
if (length > 0) {
|
|
68
|
+
firstSubstitution = first(this.array);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return firstSubstitution;
|
|
72
|
+
}
|
|
73
|
+
|
|
73
74
|
mapSubstitution(callback) { return this.array.map(callback); }
|
|
74
75
|
|
|
75
76
|
findSubstitution(callback) { return this.array.find(callback) || null; } ///
|
|
@@ -107,7 +108,7 @@ export default class Substitutions {
|
|
|
107
108
|
|
|
108
109
|
findSubstitutionsByMetavariable(metavariable) {
|
|
109
110
|
const substitutions = this.findSubstitutions((substitution) => {
|
|
110
|
-
const substitutionMetavariableEqualToMetavariable = substitution.
|
|
111
|
+
const substitutionMetavariableEqualToMetavariable = substitution.isMetavariableEqualToMetavariable(metavariable);
|
|
111
112
|
|
|
112
113
|
if (substitutionMetavariableEqualToMetavariable) {
|
|
113
114
|
return true;
|
|
@@ -123,7 +124,7 @@ export default class Substitutions {
|
|
|
123
124
|
|
|
124
125
|
if (substitutionSimple) {
|
|
125
126
|
const simpleSubstitution = substitution, ///
|
|
126
|
-
simpleSubstitutionMetavariableEqualToMetavariable = simpleSubstitution.
|
|
127
|
+
simpleSubstitutionMetavariableEqualToMetavariable = simpleSubstitution.isMetavariableEqualToMetavariable(metavariable);
|
|
127
128
|
|
|
128
129
|
if (simpleSubstitutionMetavariableEqualToMetavariable) {
|
|
129
130
|
return true;
|
|
@@ -140,7 +141,7 @@ export default class Substitutions {
|
|
|
140
141
|
|
|
141
142
|
if (substitutionComplex) {
|
|
142
143
|
const complexSubstitution = substitution, ///
|
|
143
|
-
complexSubstitutionMetavariableEqualToMetavariable = complexSubstitution.
|
|
144
|
+
complexSubstitutionMetavariableEqualToMetavariable = complexSubstitution.isMetavariableEqualToMetavariable(metavariable);
|
|
144
145
|
|
|
145
146
|
if (complexSubstitutionMetavariableEqualToMetavariable) {
|
|
146
147
|
return true;
|
|
@@ -155,11 +156,11 @@ export default class Substitutions {
|
|
|
155
156
|
const substitutionA = substitution; ///
|
|
156
157
|
|
|
157
158
|
substitution = this.findSubstitution((substitution) => { ///
|
|
158
|
-
const substitutionMetavariableEqualToMetavariable = substitution.
|
|
159
|
+
const substitutionMetavariableEqualToMetavariable = substitution.isMetavariableEqualToMetavariable(metavariable);
|
|
159
160
|
|
|
160
161
|
if (substitutionMetavariableEqualToMetavariable) {
|
|
161
162
|
const substitutionB = substitution, ///
|
|
162
|
-
substitutionBSubstitutionEqualToSubstitutionA = substitutionB.
|
|
163
|
+
substitutionBSubstitutionEqualToSubstitutionA = substitutionB.isSubstitutionEqualToSubstitution(substitutionA);
|
|
163
164
|
|
|
164
165
|
if (substitutionBSubstitutionEqualToSubstitutionA) {
|
|
165
166
|
return true;
|
|
@@ -192,15 +193,15 @@ export default class Substitutions {
|
|
|
192
193
|
return substitutionPresent;
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
addSubstitution(substitution,
|
|
196
|
+
addSubstitution(substitution, context) {
|
|
196
197
|
this.array.push(substitution);
|
|
197
198
|
|
|
198
199
|
const substitutionString = substitution.getString();
|
|
199
200
|
|
|
200
|
-
|
|
201
|
+
context.trace(`Added the ${substitutionString} substitution.`);
|
|
201
202
|
}
|
|
202
203
|
|
|
203
|
-
removeSubstitution(substitution,
|
|
204
|
+
removeSubstitution(substitution, context) {
|
|
204
205
|
const substitutionA = substitution; ///
|
|
205
206
|
|
|
206
207
|
prune(this.array, (substitution) => {
|
|
@@ -213,7 +214,7 @@ export default class Substitutions {
|
|
|
213
214
|
|
|
214
215
|
const substitutionString = substitution.getString();
|
|
215
216
|
|
|
216
|
-
|
|
217
|
+
context.trace(`Removed the ${substitutionString} substitution.`);
|
|
217
218
|
}
|
|
218
219
|
|
|
219
220
|
correlateSubstitutions(substitutions) {
|
|
@@ -247,7 +248,7 @@ export default class Substitutions {
|
|
|
247
248
|
this.savedArray = null;
|
|
248
249
|
}
|
|
249
250
|
|
|
250
|
-
resolve(
|
|
251
|
+
resolve(context) {
|
|
251
252
|
const metavariables = this.getMetavariables();
|
|
252
253
|
|
|
253
254
|
metavariables.forEach((metavariable) => {
|
|
@@ -261,7 +262,7 @@ export default class Substitutions {
|
|
|
261
262
|
resolved = substitution.isResolved();
|
|
262
263
|
|
|
263
264
|
if (!resolved) {
|
|
264
|
-
substitution.resolve(substitutions,
|
|
265
|
+
substitution.resolve(substitutions, context);
|
|
265
266
|
}
|
|
266
267
|
});
|
|
267
268
|
|
|
@@ -297,7 +298,7 @@ export default class Substitutions {
|
|
|
297
298
|
];
|
|
298
299
|
}
|
|
299
300
|
|
|
300
|
-
rollback(
|
|
301
|
+
rollback(context) {
|
|
301
302
|
const array = [
|
|
302
303
|
...this.array
|
|
303
304
|
];
|
|
@@ -305,7 +306,7 @@ export default class Substitutions {
|
|
|
305
306
|
leftDifference(array, this.savedArray);
|
|
306
307
|
|
|
307
308
|
array.forEach((substitution) => {
|
|
308
|
-
this.removeSubstitution(substitution,
|
|
309
|
+
this.removeSubstitution(substitution, context);
|
|
309
310
|
});
|
|
310
311
|
|
|
311
312
|
this.array = [
|
|
@@ -357,7 +358,7 @@ export default class Substitutions {
|
|
|
357
358
|
|
|
358
359
|
return substitutions;
|
|
359
360
|
}
|
|
360
|
-
}
|
|
361
|
+
});
|
|
361
362
|
|
|
362
363
|
function leftDifference(arrayA, arrayB) {
|
|
363
364
|
filter(arrayA, (elementA) => {
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import ontology from "../ontology";
|
|
4
|
+
import TemporaryContext from "../context/temporary";
|
|
4
5
|
|
|
5
6
|
import { define } from "../ontology";
|
|
6
7
|
import { assignAssignments } from "../utilities/assignments";
|
|
7
8
|
import { subproofAssertionFromStatement } from "../utilities/context";
|
|
8
|
-
import { statementFromJSON, procedureCallFromJSON, statementToStatementJSON, procedureCallToProcedureCallJSON } from "../utilities/json";
|
|
9
|
+
import { termsFromJSON, framesFromJSON, statementFromJSON, procedureCallFromJSON, termsToTermsJSON, framesToFramesJSON, statementToStatementJSON, procedureCallToProcedureCallJSON } from "../utilities/json";
|
|
9
10
|
|
|
10
11
|
export default define(class Supposition {
|
|
11
|
-
constructor(node, string, statement, procedureCall) {
|
|
12
|
+
constructor(context, node, string, statement, procedureCall) {
|
|
13
|
+
this.context = context;
|
|
12
14
|
this.node = node;
|
|
13
15
|
this.string = string;
|
|
14
16
|
this.statement = statement;
|
|
15
17
|
this.procedureCall = procedureCall;
|
|
16
18
|
}
|
|
17
19
|
|
|
20
|
+
getContext() {
|
|
21
|
+
return this.context;
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
getNode() {
|
|
19
25
|
return this.node;
|
|
20
26
|
}
|
|
@@ -34,6 +40,10 @@ export default define(class Supposition {
|
|
|
34
40
|
verify(context) {
|
|
35
41
|
let verifies = false;
|
|
36
42
|
|
|
43
|
+
const temporaryContext = TemporaryContext.fromNothing(context);
|
|
44
|
+
|
|
45
|
+
context = temporaryContext; ///
|
|
46
|
+
|
|
37
47
|
const suppositionString = this.string; ///
|
|
38
48
|
|
|
39
49
|
context.trace(`Verifying the '${suppositionString}' supposition...`, this.node);
|
|
@@ -71,6 +81,8 @@ export default define(class Supposition {
|
|
|
71
81
|
}
|
|
72
82
|
|
|
73
83
|
if (verifies) {
|
|
84
|
+
this.context = context;
|
|
85
|
+
|
|
74
86
|
context.debug(`...verified the '${suppositionString}' supposition.`, this.node);
|
|
75
87
|
}
|
|
76
88
|
|
|
@@ -100,24 +112,38 @@ export default define(class Supposition {
|
|
|
100
112
|
}
|
|
101
113
|
|
|
102
114
|
unifyIndependently(substitutions, context) {
|
|
103
|
-
let unifiesIndependently;
|
|
115
|
+
let unifiesIndependently = false;
|
|
116
|
+
|
|
117
|
+
const suppositionString = this.string, ///
|
|
118
|
+
generalContext = this.context, ///
|
|
119
|
+
specificContext = context; ///
|
|
120
|
+
|
|
121
|
+
context.trace(`Unifying the '${suppositionString}' supposition independently...`, this.node);
|
|
104
122
|
|
|
105
123
|
if (this.statement !== null) {
|
|
106
|
-
const
|
|
124
|
+
const statementUnifiesIndependently = this.statement.unifyIndependently(substitutions, generalContext, specificContext);
|
|
107
125
|
|
|
108
|
-
|
|
126
|
+
if (statementUnifiesIndependently) {
|
|
127
|
+
unifiesIndependently = true;
|
|
128
|
+
}
|
|
109
129
|
}
|
|
110
130
|
|
|
111
131
|
if (this.procedureCall !== null) {
|
|
112
132
|
const procedureCallResolvedIndependently = this.procedureCall.unifyIndependently(substitutions, context);
|
|
113
133
|
|
|
114
|
-
|
|
134
|
+
if (procedureCallResolvedIndependently) {
|
|
135
|
+
unifiesIndependently = true;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (unifiesIndependently) {
|
|
140
|
+
context.debug(`...unified the '${suppositionString}' supposition independenly.`, this.node);
|
|
115
141
|
}
|
|
116
142
|
|
|
117
143
|
return unifiesIndependently;
|
|
118
144
|
}
|
|
119
145
|
|
|
120
|
-
unifyStepOrSubproof(stepOrSubproof, substitutions,
|
|
146
|
+
unifyStepOrSubproof(stepOrSubproof, substitutions, context) {
|
|
121
147
|
let stepOrSubproofUnifies = false;
|
|
122
148
|
|
|
123
149
|
const stepOrSubProofStep = stepOrSubproof.isStep(),
|
|
@@ -131,40 +157,42 @@ export default define(class Supposition {
|
|
|
131
157
|
substitutions.snapshot();
|
|
132
158
|
|
|
133
159
|
if (subproof !== null) {
|
|
134
|
-
const subproofUnifies = this.unifySubproof(subproof, substitutions,
|
|
160
|
+
const subproofUnifies = this.unifySubproof(subproof, substitutions, context);
|
|
135
161
|
|
|
136
162
|
stepOrSubproofUnifies = subproofUnifies; ///
|
|
137
163
|
}
|
|
138
164
|
|
|
139
165
|
if (step !== null) {
|
|
140
|
-
const statementUnifies = this.unifyStep(step, substitutions,
|
|
166
|
+
const statementUnifies = this.unifyStep(step, substitutions, context);
|
|
141
167
|
|
|
142
168
|
stepOrSubproofUnifies = statementUnifies; ///
|
|
143
169
|
}
|
|
144
170
|
|
|
145
171
|
if (stepOrSubproofUnifies) {
|
|
146
|
-
substitutions.resolve(
|
|
172
|
+
substitutions.resolve(context);
|
|
147
173
|
}
|
|
148
174
|
|
|
149
175
|
stepOrSubproofUnifies ?
|
|
150
176
|
substitutions.continue() :
|
|
151
|
-
substitutions.rollback(
|
|
177
|
+
substitutions.rollback(context);
|
|
152
178
|
|
|
153
179
|
return stepOrSubproofUnifies;
|
|
154
180
|
}
|
|
155
181
|
|
|
156
|
-
unifyStep(step, substitutions,
|
|
182
|
+
unifyStep(step, substitutions, context) {
|
|
157
183
|
let stepUnifies;
|
|
158
184
|
|
|
185
|
+
context = step.getContext();
|
|
186
|
+
|
|
159
187
|
const statement = step.getStatement(),
|
|
160
|
-
statementUnifies = this.unifyStatement(statement, substitutions,
|
|
188
|
+
statementUnifies = this.unifyStatement(statement, substitutions, context);
|
|
161
189
|
|
|
162
190
|
stepUnifies = statementUnifies; ///
|
|
163
191
|
|
|
164
192
|
return stepUnifies;
|
|
165
193
|
}
|
|
166
194
|
|
|
167
|
-
unifySubproof(subproof, substitutions,
|
|
195
|
+
unifySubproof(subproof, substitutions, context) {
|
|
168
196
|
let subproofUnifies = false;
|
|
169
197
|
|
|
170
198
|
const supposition = this, ///
|
|
@@ -172,52 +200,74 @@ export default define(class Supposition {
|
|
|
172
200
|
suppositionStatement = supposition.getStatement(),
|
|
173
201
|
suppositionStatementString = suppositionStatement.getString();
|
|
174
202
|
|
|
175
|
-
|
|
203
|
+
context.trace(`Unifying the '${subproofString}' subproof with the supposition's '${suppositionStatementString}' statement...`);
|
|
176
204
|
|
|
177
205
|
if (this.statement !== null) {
|
|
178
206
|
const context = generalContext, ///
|
|
179
207
|
subproofAssertion = subproofAssertionFromStatement(this.statement, context);
|
|
180
208
|
|
|
181
209
|
if (subproofAssertion !== null) {
|
|
210
|
+
const generalContext = this.context, ///
|
|
211
|
+
specificContext = context; ///
|
|
212
|
+
|
|
182
213
|
subproofUnifies = subproofAssertion.unifySubproof(subproof, substitutions, generalContext, specificContext);
|
|
183
214
|
}
|
|
184
215
|
}
|
|
185
216
|
|
|
186
217
|
if (subproofUnifies) {
|
|
187
|
-
|
|
218
|
+
context.debug(`...unified the '${subproofString}' subproof with the supposition's '${suppositionStatementString}' statement.`);
|
|
188
219
|
}
|
|
189
220
|
|
|
190
221
|
return subproofUnifies;
|
|
191
222
|
}
|
|
192
223
|
|
|
193
|
-
unifyStatement(statement, substitutions,
|
|
224
|
+
unifyStatement(statement, substitutions, context) {
|
|
194
225
|
let statementUnifies;
|
|
195
226
|
|
|
196
227
|
const supposition = this, ///
|
|
197
228
|
statementString = statement.getString(),
|
|
198
229
|
suppositionString = supposition.getString();
|
|
199
230
|
|
|
200
|
-
|
|
231
|
+
context.trace(`Unifying the '${statementString}' statement with the '${suppositionString}' supposition...`);
|
|
201
232
|
|
|
202
233
|
if (this.statement !== null) {
|
|
234
|
+
const generalContext = this.context, ///
|
|
235
|
+
specificContext = context; ///
|
|
236
|
+
|
|
203
237
|
statementUnifies = this.statement.unifyStatement(statement, substitutions, generalContext, specificContext);
|
|
204
238
|
}
|
|
205
239
|
|
|
206
240
|
if (statementUnifies) {
|
|
207
|
-
|
|
241
|
+
context.debug(`...unified the '${statementString}' statement with the '${suppositionString}' supposition.`);
|
|
208
242
|
}
|
|
209
243
|
|
|
210
244
|
return statementUnifies;
|
|
211
245
|
}
|
|
212
246
|
|
|
213
247
|
toJSON() {
|
|
214
|
-
|
|
215
|
-
|
|
248
|
+
let frames,
|
|
249
|
+
terms;
|
|
250
|
+
|
|
251
|
+
frames = this.context.getFrames();
|
|
252
|
+
|
|
253
|
+
terms = this.context.getTerms();
|
|
254
|
+
|
|
255
|
+
const procedureCallJSON = procedureCallToProcedureCallJSON(this.procedureCall),
|
|
256
|
+
statementJSON = statementToStatementJSON(this.statement),
|
|
257
|
+
framesJSON = framesToFramesJSON(frames),
|
|
258
|
+
termsJSON = termsToTermsJSON(terms);
|
|
259
|
+
|
|
260
|
+
frames = framesJSON; ///
|
|
261
|
+
|
|
262
|
+
terms = termsJSON; ///
|
|
263
|
+
|
|
264
|
+
const procedureCall = procedureCallJSON, ///
|
|
216
265
|
statement = statementJSON, ///
|
|
217
|
-
procedureCall = procedureCallJSON, ///
|
|
218
266
|
json = {
|
|
267
|
+
procedureCall,
|
|
219
268
|
statement,
|
|
220
|
-
|
|
269
|
+
frames,
|
|
270
|
+
terms
|
|
221
271
|
};
|
|
222
272
|
|
|
223
273
|
return json;
|
|
@@ -226,8 +276,11 @@ export default define(class Supposition {
|
|
|
226
276
|
static name = "Supposition";
|
|
227
277
|
|
|
228
278
|
static fromJSON(json, context) {
|
|
229
|
-
const
|
|
230
|
-
|
|
279
|
+
const terms = termsFromJSON(json, context),
|
|
280
|
+
frames = framesFromJSON(json, context),
|
|
281
|
+
statement = statementFromJSON(json, context),
|
|
282
|
+
procedureCall = procedureCallFromJSON(json, context),
|
|
283
|
+
temporaryContext = TemporaryContext.fromTermsAndFrames(terms, frames, context);
|
|
231
284
|
|
|
232
285
|
let string;
|
|
233
286
|
|
|
@@ -239,8 +292,11 @@ export default define(class Supposition {
|
|
|
239
292
|
string = procedureCall.getString();
|
|
240
293
|
}
|
|
241
294
|
|
|
242
|
-
const node = null
|
|
243
|
-
|
|
295
|
+
const node = null;
|
|
296
|
+
|
|
297
|
+
context = temporaryContext; ///
|
|
298
|
+
|
|
299
|
+
const supposition = new Supposition(context, node, string, statement, procedureCall);
|
|
244
300
|
|
|
245
301
|
return supposition;
|
|
246
302
|
}
|
|
@@ -251,7 +307,11 @@ export default define(class Supposition {
|
|
|
251
307
|
string = context.nodeAsString(node),
|
|
252
308
|
statement = Statement.fromSuppositionNode(suppositionNode, context),
|
|
253
309
|
procedureCall = ProcedureCall.fromSuppositionNode(suppositionNode, context),
|
|
254
|
-
|
|
310
|
+
temporaryContext = null;
|
|
311
|
+
|
|
312
|
+
context = temporaryContext; ///
|
|
313
|
+
|
|
314
|
+
const supposition = new Supposition(context, node, string, statement, procedureCall);
|
|
255
315
|
|
|
256
316
|
return supposition
|
|
257
317
|
}
|
package/src/ontology/term.js
CHANGED
|
@@ -35,40 +35,9 @@ export default define(class Term {
|
|
|
35
35
|
this.type = type;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
const { Variable } = ontology,
|
|
40
|
-
termNode = this.node, ///
|
|
41
|
-
variable = Variable.fromTermNode(termNode, context);
|
|
38
|
+
matchTermNode(termNode) { return this.node.match(termNode); }
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
getVariables(context) {
|
|
47
|
-
const termNode = this.node,
|
|
48
|
-
variableNodes = termNode.getVariableNodes(),
|
|
49
|
-
variables = variableNodes.map((variableNode) => {
|
|
50
|
-
const { Variable } = ontology,
|
|
51
|
-
variable = Variable.fromVariableNode(variableNode, context);
|
|
52
|
-
|
|
53
|
-
return variable;
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
compress(variables, (variableA, variableB) => {
|
|
57
|
-
const variableAEqualToVariableB = variableA.isEqualTo(variableB);
|
|
58
|
-
|
|
59
|
-
if (variableAEqualToVariableB) {
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
return variables;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
matchTermNode(termNode) {
|
|
68
|
-
const termNodeMatches = this.node.match(termNode);
|
|
69
|
-
|
|
70
|
-
return termNodeMatches;
|
|
71
|
-
}
|
|
40
|
+
isSimple() { return this.node.isSimple();}
|
|
72
41
|
|
|
73
42
|
isProvisional() { return this.type.isProvisional(); }
|
|
74
43
|
|
|
@@ -79,16 +48,9 @@ export default define(class Term {
|
|
|
79
48
|
return equalTo;
|
|
80
49
|
}
|
|
81
50
|
|
|
82
|
-
isSimple() {
|
|
83
|
-
const termNode = this.node,
|
|
84
|
-
singularVariableNode = termNode.getSingularVariableNode(),
|
|
85
|
-
simple = (singularVariableNode !== null);
|
|
86
|
-
|
|
87
|
-
return simple;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
51
|
isGrounded(definedVariables, context) {
|
|
91
|
-
const
|
|
52
|
+
const term = this, ///
|
|
53
|
+
variables = variablesFromTerm(term, context);
|
|
92
54
|
|
|
93
55
|
filter(variables, (variable) => {
|
|
94
56
|
const definedVariablesIncludesVariable = definedVariables.includes(variable);
|
|
@@ -106,7 +68,8 @@ export default define(class Term {
|
|
|
106
68
|
}
|
|
107
69
|
|
|
108
70
|
isInitiallyGrounded(context) {
|
|
109
|
-
const
|
|
71
|
+
const term = this, ///
|
|
72
|
+
variables = variablesFromTerm(term, context),
|
|
110
73
|
variablesLength = variables.length,
|
|
111
74
|
initiallyGrounded = (variablesLength === 0);
|
|
112
75
|
|
|
@@ -137,6 +100,10 @@ export default define(class Term {
|
|
|
137
100
|
});
|
|
138
101
|
|
|
139
102
|
if (verifies) {
|
|
103
|
+
const term = this; ///
|
|
104
|
+
|
|
105
|
+
context.addTerm(term);
|
|
106
|
+
|
|
140
107
|
context.debug(`...verified the '${termString}' term.`);
|
|
141
108
|
}
|
|
142
109
|
|
|
@@ -274,3 +241,24 @@ export default define(class Term {
|
|
|
274
241
|
}
|
|
275
242
|
});
|
|
276
243
|
|
|
244
|
+
export function variablesFromTerm(term, context) {
|
|
245
|
+
const termNode = term.getNode(),
|
|
246
|
+
variableNodes = termNode.getVariableNodes(),
|
|
247
|
+
variables = variableNodes.map((variableNode) => {
|
|
248
|
+
const variableIdentifier = variableNode.getVariableIdentifier(),
|
|
249
|
+
variable = context.findVariableByVariableIdentifier(variableIdentifier);
|
|
250
|
+
|
|
251
|
+
return variable;
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
compress(variables, (variableA, variableB) => {
|
|
255
|
+
const variableAEqualToVariableB = variableA.isEqualTo(variableB);
|
|
256
|
+
|
|
257
|
+
if (variableAEqualToVariableB) {
|
|
258
|
+
return true;
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
return variables;
|
|
263
|
+
}
|
|
264
|
+
|
|
@@ -4,7 +4,6 @@ import { arrayUtilities } from "necessary";
|
|
|
4
4
|
|
|
5
5
|
import ontology from "../ontology";
|
|
6
6
|
import LocalContext from "../context/local";
|
|
7
|
-
import Substitutions from "../substitutions";
|
|
8
7
|
|
|
9
8
|
import { labelsFromJSON,
|
|
10
9
|
deductionFromJSON,
|
|
@@ -112,7 +111,7 @@ export default class TopLevelAssertion {
|
|
|
112
111
|
const labelsVerify = this.verifyLabels();
|
|
113
112
|
|
|
114
113
|
if (labelsVerify) {
|
|
115
|
-
const localContext = LocalContext.
|
|
114
|
+
const localContext = LocalContext.fromNothing(this.context),
|
|
116
115
|
context = localContext, ///
|
|
117
116
|
suppositionsVerify = this.verifySuppositions(context);
|
|
118
117
|
|
|
@@ -175,7 +174,8 @@ export default class TopLevelAssertion {
|
|
|
175
174
|
if (this.proof === null) {
|
|
176
175
|
proofVerifies = true;
|
|
177
176
|
} else {
|
|
178
|
-
const
|
|
177
|
+
const { Substitutions } = ontology,
|
|
178
|
+
substitutions = Substitutions.fromNothing();
|
|
179
179
|
|
|
180
180
|
proofVerifies = this.proof.verify(substitutions, this.deduction, context);
|
|
181
181
|
}
|
|
@@ -212,10 +212,10 @@ export default class TopLevelAssertion {
|
|
|
212
212
|
return hypothesesCorrelate;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
unifyStatementWithDeduction(statement, substitutions,
|
|
215
|
+
unifyStatementWithDeduction(statement, substitutions, context) {
|
|
216
216
|
let statementUnifiesWithDeduction = false;
|
|
217
217
|
|
|
218
|
-
const statementUnifies = this.deduction.unifyStatement(statement, substitutions,
|
|
218
|
+
const statementUnifies = this.deduction.unifyStatement(statement, substitutions, context); ///
|
|
219
219
|
|
|
220
220
|
if (statementUnifies) {
|
|
221
221
|
statementUnifiesWithDeduction = true;
|
|
@@ -225,39 +225,37 @@ export default class TopLevelAssertion {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
unifyStatementAndStepsOrSubproofs(statement, stepsOrSubproofs, substitutions, context) {
|
|
228
|
-
let
|
|
228
|
+
let statementAndStepsOrSubproofsUnifies = false;
|
|
229
229
|
|
|
230
230
|
const hypothesesCorrelate = this.correlateHypotheses(context);
|
|
231
231
|
|
|
232
232
|
if (hypothesesCorrelate) {
|
|
233
|
-
const
|
|
234
|
-
specificContext = context, ///
|
|
235
|
-
statementUnifiesWithDeduction = this.unifyStatementWithDeduction(statement, substitutions, generalContext, specificContext);
|
|
233
|
+
const statementUnifiesWithDeduction = this.unifyStatementWithDeduction(statement, substitutions, context);
|
|
236
234
|
|
|
237
235
|
if (statementUnifiesWithDeduction) {
|
|
238
|
-
const stepsOrSubproofsUnifyWithSuppositions = this.unifyStepsOrSubproofsWithSuppositions(stepsOrSubproofs, substitutions,
|
|
236
|
+
const stepsOrSubproofsUnifyWithSuppositions = this.unifyStepsOrSubproofsWithSuppositions(stepsOrSubproofs, substitutions, context);
|
|
239
237
|
|
|
240
238
|
if (stepsOrSubproofsUnifyWithSuppositions) {
|
|
241
239
|
const substitutionsResolved = substitutions.areResolved();
|
|
242
240
|
|
|
243
241
|
if (substitutionsResolved) {
|
|
244
|
-
|
|
242
|
+
statementAndStepsOrSubproofsUnifies = true;
|
|
245
243
|
}
|
|
246
244
|
}
|
|
247
245
|
}
|
|
248
246
|
}
|
|
249
247
|
|
|
250
|
-
return
|
|
248
|
+
return statementAndStepsOrSubproofsUnifies;
|
|
251
249
|
}
|
|
252
250
|
|
|
253
251
|
unifyStepsOrSubproofsWithSupposition(stepsOrSubproofs, supposition, substitutions, generalContext, specificContext) {
|
|
254
|
-
let
|
|
252
|
+
let stepsOrSubproofsUnifiesWithSupposition = false;
|
|
255
253
|
|
|
256
254
|
const context = specificContext, ///
|
|
257
255
|
suppositionUnifiesIndependently = supposition.unifyIndependently(substitutions, context);
|
|
258
256
|
|
|
259
257
|
if (suppositionUnifiesIndependently) {
|
|
260
|
-
|
|
258
|
+
stepsOrSubproofsUnifiesWithSupposition = true;
|
|
261
259
|
} else {
|
|
262
260
|
const stepOrSubproof = extract(stepsOrSubproofs, (stepOrSubproof) => {
|
|
263
261
|
const stepOrSubproofUnifies = supposition.unifyStepOrSubproof(stepOrSubproof, substitutions, generalContext, specificContext);
|
|
@@ -268,20 +266,20 @@ export default class TopLevelAssertion {
|
|
|
268
266
|
}) || null;
|
|
269
267
|
|
|
270
268
|
if (stepOrSubproof !== null) {
|
|
271
|
-
|
|
269
|
+
stepsOrSubproofsUnifiesWithSupposition = true;
|
|
272
270
|
}
|
|
273
271
|
}
|
|
274
272
|
|
|
275
|
-
return
|
|
273
|
+
return stepsOrSubproofsUnifiesWithSupposition;
|
|
276
274
|
}
|
|
277
275
|
|
|
278
276
|
unifyStepsOrSubproofsWithSuppositions(stepsOrSubproofs, substitutions, generalContext, specificContext) {
|
|
279
277
|
stepsOrSubproofs = reverse(stepsOrSubproofs); ///
|
|
280
278
|
|
|
281
279
|
const stepsOrSubproofsUnifyWithSuppositions = backwardsEvery(this.suppositions, (supposition) => {
|
|
282
|
-
const
|
|
280
|
+
const stepsOrSubproofsUnifiesWithSupposition = this.unifyStepsOrSubproofsWithSupposition(stepsOrSubproofs, supposition, substitutions, generalContext, specificContext);
|
|
283
281
|
|
|
284
|
-
if (
|
|
282
|
+
if (stepsOrSubproofsUnifiesWithSupposition) {
|
|
285
283
|
return true;
|
|
286
284
|
}
|
|
287
285
|
});
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import ontology from "../ontology";
|
|
4
4
|
import LocalContext from "../context/local";
|
|
5
|
-
import Substitutions from "../substitutions";
|
|
6
5
|
|
|
7
6
|
import { proofFromProofNode, deductionFromDeductionNode, suppositionsFromSuppositionNodes } from "./topLevelAssertion";
|
|
8
7
|
import { labelFromJSON,
|
|
@@ -73,7 +72,7 @@ export default class TopLevelMetaAssertion {
|
|
|
73
72
|
const labelVerifies = this.verifyLabel();
|
|
74
73
|
|
|
75
74
|
if (labelVerifies) {
|
|
76
|
-
const localContext = LocalContext.
|
|
75
|
+
const localContext = LocalContext.fromNothing(this.context),
|
|
77
76
|
context = localContext, ///
|
|
78
77
|
suppositionsVerify = this.verifySuppositions(context);
|
|
79
78
|
|
|
@@ -169,7 +168,8 @@ export default class TopLevelMetaAssertion {
|
|
|
169
168
|
}
|
|
170
169
|
|
|
171
170
|
static fromNode(Class, node, context) {
|
|
172
|
-
const
|
|
171
|
+
const { Substitutions } = ontology,
|
|
172
|
+
topLevelAssertionNode = node, ///
|
|
173
173
|
proofNode = topLevelAssertionNode.getProofNode(),
|
|
174
174
|
labelNode = topLevelAssertionNode.getLabelNode(),
|
|
175
175
|
deductionNode = topLevelAssertionNode.getDeductionNode(),
|