occam-verify-cli 0.0.1089 → 0.0.1091
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/bin/action/verify.js +2 -2
- package/lib/assertion/contained.js +35 -41
- package/lib/assertion/defined.js +24 -24
- package/lib/assertion/subproof.js +24 -24
- package/lib/assertion/type.js +23 -23
- package/lib/assignment/equality.js +4 -10
- package/lib/assignment/judgement.js +4 -4
- package/lib/assignment/variable.js +4 -4
- package/lib/combinator/bracketed.js +3 -3
- package/lib/conclusion.js +11 -13
- package/lib/consequent.js +11 -13
- package/lib/constructor/bracketed.js +3 -3
- package/lib/constructor.js +2 -2
- package/lib/context/file.js +28 -27
- package/lib/context/local.js +31 -32
- package/lib/context/release.js +6 -3
- package/lib/declaration.js +18 -18
- package/lib/derivation.js +3 -3
- package/lib/equality.js +24 -24
- package/lib/equivalence.js +13 -13
- package/lib/frame.js +43 -43
- package/lib/index.js +2 -1
- package/lib/judgement.js +20 -20
- package/lib/label.js +9 -1
- package/lib/metaType.js +2 -2
- package/lib/metavariable.js +40 -39
- package/lib/mixins/statement/qualified/unify.js +19 -19
- package/lib/mixins/statement/resolve.js +11 -11
- package/lib/mixins/statement/unify.js +12 -12
- package/lib/mixins/statement/verify.js +36 -36
- package/lib/mixins/term/verify.js +2 -2
- package/lib/premise.js +31 -40
- package/lib/proof.js +6 -5
- package/lib/proofStep.js +17 -17
- package/lib/reference.js +8 -8
- package/lib/rule.js +21 -21
- package/lib/statement/qualified.js +17 -17
- package/lib/statement/unqualified.js +19 -19
- package/lib/statement.js +52 -54
- package/lib/subDerivation.js +3 -3
- package/lib/subproof.js +6 -5
- package/lib/substitution/frameForMetavariable.js +16 -39
- package/lib/substitution/statementForMetavariable.js +88 -74
- package/lib/substitution/termForVariable.js +15 -41
- package/lib/substitution.js +20 -6
- package/lib/substitutions.js +13 -13
- package/lib/supposition.js +31 -40
- package/lib/term.js +28 -28
- package/lib/topLevelAssertion.js +33 -21
- package/lib/unifier/equality.js +8 -8
- package/lib/unifier/intrinsicLevel.js +149 -0
- package/lib/unifier/metaLevel.js +41 -31
- package/lib/unifier/metavariable.js +14 -8
- package/lib/unifier/statementWithCombinator.js +16 -16
- package/lib/unifier/termWithConstructor.js +6 -6
- package/lib/unifier.js +47 -47
- package/lib/utilities/assignments.js +3 -3
- package/lib/utilities/equivalences.js +14 -14
- package/lib/utilities/json.js +22 -21
- package/lib/utilities/unifier.js +7 -8
- package/lib/variable.js +33 -33
- package/lib/verifier/statementAsCombinator.js +2 -2
- package/lib/verifier/termAsConstructor.js +2 -2
- package/package.json +2 -2
- package/src/assertion/contained.js +37 -45
- package/src/assertion/defined.js +25 -25
- package/src/assertion/subproof.js +25 -28
- package/src/assertion/type.js +23 -23
- package/src/assignment/equality.js +4 -6
- package/src/assignment/judgement.js +4 -4
- package/src/assignment/variable.js +4 -4
- package/src/combinator/bracketed.js +2 -2
- package/src/conclusion.js +14 -15
- package/src/consequent.js +14 -15
- package/src/constructor/bracketed.js +2 -2
- package/src/constructor.js +3 -2
- package/src/context/file.js +26 -25
- package/src/context/local.js +21 -23
- package/src/context/release.js +5 -3
- package/src/declaration.js +20 -20
- package/src/derivation.js +2 -2
- package/src/equality.js +26 -26
- package/src/equivalence.js +12 -12
- package/src/frame.js +42 -42
- package/src/index.js +1 -0
- package/src/judgement.js +25 -25
- package/src/label.js +14 -0
- package/src/metaType.js +1 -1
- package/src/metavariable.js +51 -43
- package/src/mixins/statement/qualified/unify.js +21 -21
- package/src/mixins/statement/resolve.js +12 -12
- package/src/mixins/statement/unify.js +11 -11
- package/src/mixins/statement/verify.js +35 -35
- package/src/mixins/term/verify.js +1 -1
- package/src/premise.js +42 -53
- package/src/proof.js +6 -4
- package/src/proofStep.js +21 -21
- package/src/reference.js +12 -11
- package/src/rule.js +20 -20
- package/src/statement/qualified.js +18 -17
- package/src/statement/unqualified.js +19 -18
- package/src/statement.js +63 -66
- package/src/subDerivation.js +2 -3
- package/src/subproof.js +6 -4
- package/src/substitution/frameForMetavariable.js +29 -45
- package/src/substitution/statementForMetavariable.js +136 -86
- package/src/substitution/termForVariable.js +28 -49
- package/src/substitution.js +15 -5
- package/src/substitutions.js +12 -12
- package/src/supposition.js +41 -53
- package/src/term.js +27 -27
- package/src/topLevelAssertion.js +32 -19
- package/src/unifier/equality.js +7 -7
- package/src/unifier/intrinsicLevel.js +61 -0
- package/src/unifier/metaLevel.js +60 -46
- package/src/unifier/metavariable.js +22 -13
- package/src/unifier/statementWithCombinator.js +28 -28
- package/src/unifier/termWithConstructor.js +8 -8
- package/src/unifier.js +55 -55
- package/src/utilities/assignments.js +2 -2
- package/src/utilities/equivalences.js +13 -13
- package/src/utilities/json.js +76 -66
- package/src/utilities/unifier.js +10 -12
- package/src/variable.js +43 -40
- package/src/verifier/statementAsCombinator.js +2 -1
- package/src/verifier/termAsConstructor.js +2 -1
package/src/reference.js
CHANGED
|
@@ -29,40 +29,40 @@ export default class Reference {
|
|
|
29
29
|
return metavariableNode;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
verify(
|
|
32
|
+
verify(context) {
|
|
33
33
|
let verified = false;
|
|
34
34
|
|
|
35
35
|
const referenceString = this.getString(); ///
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
context.trace(`Verifying the '${referenceString}' reference...`);
|
|
38
38
|
|
|
39
39
|
if (!verified) {
|
|
40
40
|
const metaType = referenceMetaType, ///
|
|
41
|
-
metavariableVerifiedGivenMetaType = this.metavariable.verifyGivenMetaType(metaType,
|
|
41
|
+
metavariableVerifiedGivenMetaType = this.metavariable.verifyGivenMetaType(metaType, context);
|
|
42
42
|
|
|
43
43
|
verified = metavariableVerifiedGivenMetaType; ///
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
if (!verified) {
|
|
47
47
|
const reference = this, ///
|
|
48
|
-
metaLemmaPresent =
|
|
49
|
-
metatheoremPresent =
|
|
48
|
+
metaLemmaPresent = context.isMetaLemmaPresentByReference(reference),
|
|
49
|
+
metatheoremPresent = context.isMetatheoremPresentByReference(reference);
|
|
50
50
|
|
|
51
51
|
verified = (metaLemmaPresent || metatheoremPresent);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
if (!verified) {
|
|
55
55
|
const reference = this, ///
|
|
56
|
-
axiomPresent =
|
|
57
|
-
lemmaPresent =
|
|
58
|
-
theoremPresent =
|
|
59
|
-
conjecturePresent =
|
|
56
|
+
axiomPresent = context.isAxiomPresentByReference(reference),
|
|
57
|
+
lemmaPresent = context.isLemmaPresentByReference(reference),
|
|
58
|
+
theoremPresent = context.isTheoremPresentByReference(reference),
|
|
59
|
+
conjecturePresent = context.isConjecturePresentByReference(reference);
|
|
60
60
|
|
|
61
61
|
verified = (axiomPresent || lemmaPresent || theoremPresent || conjecturePresent);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
if (verified) {
|
|
65
|
-
|
|
65
|
+
context.debug(`...verified the '${referenceString}' reference.`);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
return verified;
|
|
@@ -91,7 +91,8 @@ export default class Reference {
|
|
|
91
91
|
const { Metavariable } = shim,
|
|
92
92
|
metavariableNode = metavariableNodeQuery(referenceNode),
|
|
93
93
|
localContext = LocalContext.fromFileContext(fileContext),
|
|
94
|
-
|
|
94
|
+
context = localContext, ///
|
|
95
|
+
metavariable = Metavariable.fromMetavariableNode(metavariableNode, context),
|
|
95
96
|
reference = new Reference(metavariable);
|
|
96
97
|
|
|
97
98
|
return reference;
|
package/src/rule.js
CHANGED
|
@@ -67,15 +67,15 @@ class Rule {
|
|
|
67
67
|
return metavariableNodeMatches;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
unifyStatement(statement,
|
|
70
|
+
unifyStatement(statement, context) {
|
|
71
71
|
let statementUnified;
|
|
72
72
|
|
|
73
73
|
const { Substitutions } = shim,
|
|
74
74
|
substitutions = Substitutions.fromNothing(),
|
|
75
|
-
conclusionUnified = this.unifyConclusion(statement, substitutions,
|
|
75
|
+
conclusionUnified = this.unifyConclusion(statement, substitutions, context);
|
|
76
76
|
|
|
77
77
|
if (conclusionUnified) {
|
|
78
|
-
const premisesUnified = this.unifyPremises(substitutions,
|
|
78
|
+
const premisesUnified = this.unifyPremises(substitutions, context);
|
|
79
79
|
|
|
80
80
|
if (premisesUnified) {
|
|
81
81
|
const substitutionsResolved = substitutions.areResolved();
|
|
@@ -87,31 +87,31 @@ class Rule {
|
|
|
87
87
|
return statementUnified;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
unifyConclusion(statement, substitutions,
|
|
90
|
+
unifyConclusion(statement, substitutions, context) {
|
|
91
91
|
let conclusionUnified;
|
|
92
92
|
|
|
93
93
|
const conclusionString = this.conclusion.getString();
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
context.trace(`Unifying the '${conclusionString}' conclusion...`);
|
|
96
96
|
|
|
97
|
-
const statementUnified = this.conclusion.unifyStatement(statement, substitutions,
|
|
97
|
+
const statementUnified = this.conclusion.unifyStatement(statement, substitutions, context); ///
|
|
98
98
|
|
|
99
99
|
conclusionUnified = statementUnified; ///
|
|
100
100
|
|
|
101
101
|
if (conclusionUnified) {
|
|
102
|
-
|
|
102
|
+
context.debug(`...unified the '${conclusionString}' conclusion`);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
return conclusionUnified;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
unifyPremises(substitutions,
|
|
109
|
-
let proofSteps =
|
|
108
|
+
unifyPremises(substitutions, context) {
|
|
109
|
+
let proofSteps = context.getProofSteps();
|
|
110
110
|
|
|
111
111
|
proofSteps = reverse(proofSteps); ///
|
|
112
112
|
|
|
113
113
|
const premisesUnified = backwardsEvery(this.premises, (premise) => {
|
|
114
|
-
const premiseUnified = this.unifyPremise(premise, proofSteps, substitutions,
|
|
114
|
+
const premiseUnified = this.unifyPremise(premise, proofSteps, substitutions, context);
|
|
115
115
|
|
|
116
116
|
if (premiseUnified) {
|
|
117
117
|
return true;
|
|
@@ -121,25 +121,25 @@ class Rule {
|
|
|
121
121
|
return premisesUnified;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
unifyPremise(premise, proofSteps, substitutions,
|
|
124
|
+
unifyPremise(premise, proofSteps, substitutions, context) {
|
|
125
125
|
let premiseUnified =false;
|
|
126
126
|
|
|
127
127
|
const premiseString = premise.getString();
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
context.trace(`Unifying the '${premiseString}' premise...`);
|
|
130
130
|
|
|
131
|
-
const premiseResolvedIndependently = premise.resolveIndependently(substitutions,
|
|
131
|
+
const premiseResolvedIndependently = premise.resolveIndependently(substitutions, context);
|
|
132
132
|
|
|
133
133
|
if (premiseResolvedIndependently) {
|
|
134
134
|
premiseUnified = true;
|
|
135
135
|
} else {
|
|
136
136
|
const proofStep = extract(proofSteps, (proofStep) => {
|
|
137
|
-
const proofStepUnified = premise.unifyProofStep(proofStep, substitutions,
|
|
137
|
+
const proofStepUnified = premise.unifyProofStep(proofStep, substitutions, context);
|
|
138
138
|
|
|
139
139
|
if (proofStepUnified) {
|
|
140
140
|
return true;
|
|
141
141
|
}
|
|
142
|
-
});
|
|
142
|
+
}) || null;
|
|
143
143
|
|
|
144
144
|
if (proofStep !== null) {
|
|
145
145
|
premiseUnified = true;
|
|
@@ -147,7 +147,7 @@ class Rule {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
if (premiseUnified) {
|
|
150
|
-
|
|
150
|
+
context.debug(`...unified the '${premiseString}' premise.`);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
return premiseUnified;
|
|
@@ -169,9 +169,9 @@ class Rule {
|
|
|
169
169
|
});
|
|
170
170
|
|
|
171
171
|
if (labelsVerifiedWhenDeclared) {
|
|
172
|
-
const
|
|
172
|
+
const context = LocalContext.fromFileContext(this.fileContext),
|
|
173
173
|
premisesVerified = this.premises.every((premise) => {
|
|
174
|
-
const premiseVerified = premise.verify(
|
|
174
|
+
const premiseVerified = premise.verify(context);
|
|
175
175
|
|
|
176
176
|
if (premiseVerified) {
|
|
177
177
|
return true;
|
|
@@ -179,7 +179,7 @@ class Rule {
|
|
|
179
179
|
});
|
|
180
180
|
|
|
181
181
|
if (premisesVerified) {
|
|
182
|
-
const conclusionVerified = this.conclusion.verify(
|
|
182
|
+
const conclusionVerified = this.conclusion.verify(context);
|
|
183
183
|
|
|
184
184
|
if (conclusionVerified) {
|
|
185
185
|
let proofVerified = true; ///
|
|
@@ -188,7 +188,7 @@ class Rule {
|
|
|
188
188
|
const { Substitutions } = shim,
|
|
189
189
|
substitutions = Substitutions.fromNothing();
|
|
190
190
|
|
|
191
|
-
proofVerified = this.proof.verify(substitutions, this.conclusion,
|
|
191
|
+
proofVerified = this.proof.verify(substitutions, this.conclusion, context);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
if (proofVerified) {
|
|
@@ -33,69 +33,69 @@ class QualifiedStatement {
|
|
|
33
33
|
|
|
34
34
|
getMetavariableNode() { return this.reference.getMetavariableNode(); }
|
|
35
35
|
|
|
36
|
-
unify(substitutions,
|
|
36
|
+
unify(substitutions, context) {
|
|
37
37
|
let unified;
|
|
38
38
|
|
|
39
39
|
const qualifiedStatement = this, ///
|
|
40
40
|
qualifiedStatementString = this.string; ///
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
context.trace(`Unifying the '${qualifiedStatementString}' qualified statement...`);
|
|
43
43
|
|
|
44
44
|
unified = unifyMixins.some((unifyMixin) => {
|
|
45
|
-
const unified = unifyMixin(qualifiedStatement, substitutions,
|
|
45
|
+
const unified = unifyMixin(qualifiedStatement, substitutions, context);
|
|
46
46
|
|
|
47
47
|
return unified;
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
if (unified) {
|
|
51
|
-
|
|
51
|
+
context.debug(`...unified the '${qualifiedStatementString}' qualified statement.`);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
return unified;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
unifyStatement(statement, substitutions,
|
|
57
|
+
unifyStatement(statement, substitutions, generalContext, specificContext) {
|
|
58
58
|
let statementUnified;
|
|
59
59
|
|
|
60
60
|
const statementString = statement.getString(),
|
|
61
61
|
unqualifiedStatementString = this.getString(); ///
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
specificContext.trace(`Unifying the '${statementString}' statement with the '${unqualifiedStatementString}' qualified statement...`);
|
|
64
64
|
|
|
65
|
-
statementUnified = this.statement.unifyStatement(statement, substitutions,
|
|
65
|
+
statementUnified = this.statement.unifyStatement(statement, substitutions, generalContext, specificContext);
|
|
66
66
|
|
|
67
67
|
if (statementUnified) {
|
|
68
|
-
|
|
68
|
+
specificContext.debug(`...unified the '${statementString}' statement with the '${unqualifiedStatementString}' qualified statement.`);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
return statementUnified;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
verify(substitutions, assignments, stated,
|
|
74
|
+
verify(substitutions, assignments, stated, context) {
|
|
75
75
|
let verified;
|
|
76
76
|
|
|
77
77
|
const qualifiedStatementString = this.string; ///
|
|
78
78
|
|
|
79
79
|
if (this.statement !== null) {
|
|
80
|
-
|
|
80
|
+
context.trace(`Verifying the '${qualifiedStatementString}' qualified statement...`);
|
|
81
81
|
|
|
82
|
-
const statementVerified = this.statement.verify(assignments, stated,
|
|
82
|
+
const statementVerified = this.statement.verify(assignments, stated, context);
|
|
83
83
|
|
|
84
84
|
if (statementVerified) {
|
|
85
|
-
const unified = this.unify(substitutions,
|
|
85
|
+
const unified = this.unify(substitutions, context);
|
|
86
86
|
|
|
87
87
|
if (unified) {
|
|
88
|
-
const assignmentsAssigned = assignAssignments(assignments,
|
|
88
|
+
const assignmentsAssigned = assignAssignments(assignments, context);
|
|
89
89
|
|
|
90
90
|
verified = assignmentsAssigned; ///
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
if (verified) {
|
|
95
|
-
|
|
95
|
+
context.debug(`...verified the '${qualifiedStatementString}' qualified statement.`);
|
|
96
96
|
}
|
|
97
97
|
} else {
|
|
98
|
-
|
|
98
|
+
context.debug(`Cannot verify the '${qualifiedStatementString}' qualified statement because it is nonsense.`);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
return verified;
|
|
@@ -111,8 +111,9 @@ class QualifiedStatement {
|
|
|
111
111
|
statementNode = statementNodeQuery(qualifiedStatementNode),
|
|
112
112
|
referenceNode = referenceNodeQuery(qualifiedStatementNode),
|
|
113
113
|
localContext = LocalContext.fromFileContext(fileContext),
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
context = localContext, ///
|
|
115
|
+
statement = Statement.fromStatementNode(statementNode, context),
|
|
116
|
+
reference = Reference.fromReferenceNode(referenceNode, context),
|
|
116
117
|
node = qualifiedStatementNode; ///
|
|
117
118
|
|
|
118
119
|
string = fileContext.nodeAsString(node);
|
|
@@ -27,20 +27,20 @@ class UnqualifiedStatement {
|
|
|
27
27
|
return this.statement;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
verify(assignments, stated,
|
|
30
|
+
verify(assignments, stated, context) {
|
|
31
31
|
let verified;
|
|
32
32
|
|
|
33
33
|
const unqualifiedStatementString = this.getString(); ///
|
|
34
34
|
|
|
35
35
|
if (this.statement !== null) {
|
|
36
|
-
|
|
36
|
+
context.trace(`Verifying the '${unqualifiedStatementString}' unqualified statement...`);
|
|
37
37
|
|
|
38
|
-
const statementVerified = this.statement.verify(assignments, stated,
|
|
38
|
+
const statementVerified = this.statement.verify(assignments, stated, context);
|
|
39
39
|
|
|
40
40
|
if (statementVerified) {
|
|
41
41
|
verified = true;
|
|
42
42
|
} else {
|
|
43
|
-
const statementUnifiedWithProofSteps = this.unifyStatementWithProofSteps(this.statement, assignments, stated,
|
|
43
|
+
const statementUnifiedWithProofSteps = this.unifyStatementWithProofSteps(this.statement, assignments, stated, context);
|
|
44
44
|
|
|
45
45
|
if (statementUnifiedWithProofSteps) {
|
|
46
46
|
verified = true;
|
|
@@ -48,59 +48,59 @@ class UnqualifiedStatement {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
if (verified) {
|
|
51
|
-
|
|
51
|
+
context.debug(`...verified the '${unqualifiedStatementString}' unqualified statement.`);
|
|
52
52
|
}
|
|
53
53
|
} else {
|
|
54
|
-
|
|
54
|
+
context.debug(`Cannot verify the '${unqualifiedStatementString}' unqualified statement because it is nonsense.`);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
return verified;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
unifyStatement(statement, substitutions,
|
|
60
|
+
unifyStatement(statement, substitutions, generalContext, specificContext) {
|
|
61
61
|
let statementUnified;
|
|
62
62
|
|
|
63
63
|
const statementString = statement.getString(),
|
|
64
64
|
unqualifiedStatementString = this.getString(); ///
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
specificContext.trace(`Unifying the '${statementString}' statement with the '${unqualifiedStatementString}' unqualified statement...`);
|
|
67
67
|
|
|
68
|
-
statementUnified = this.statement.unifyStatement(statement, substitutions,
|
|
68
|
+
statementUnified = this.statement.unifyStatement(statement, substitutions, generalContext, specificContext);
|
|
69
69
|
|
|
70
70
|
if (statementUnified) {
|
|
71
|
-
|
|
71
|
+
specificContext.debug(`...unified the '${statementString}' statement with the '${unqualifiedStatementString}' unqualified statement.`);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
return statementUnified;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
resolveIndependently(substitutions,
|
|
77
|
+
resolveIndependently(substitutions, generalContext, specificContext) {
|
|
78
78
|
let resolveIndependently;
|
|
79
79
|
|
|
80
80
|
const unqualifiedStatementString = this.getString(); ///
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
specificContext.trace(`Resolving the '${unqualifiedStatementString}' unqualified statement independently...`);
|
|
83
83
|
|
|
84
|
-
const statementResolvedIndependently = this.statement.resolveIndependently(substitutions,
|
|
84
|
+
const statementResolvedIndependently = this.statement.resolveIndependently(substitutions, generalContext, specificContext);
|
|
85
85
|
|
|
86
86
|
resolveIndependently = statementResolvedIndependently; ///
|
|
87
87
|
|
|
88
88
|
if (resolveIndependently) {
|
|
89
|
-
|
|
89
|
+
specificContext.debug(`...resolved the '${unqualifiedStatementString}' unqualified statement independently.`);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
return resolveIndependently;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
unifyStatementWithProofSteps(statement, assignments, stated,
|
|
95
|
+
unifyStatementWithProofSteps(statement, assignments, stated, context) {
|
|
96
96
|
let statementUnifiedWithProofSteps;
|
|
97
97
|
|
|
98
|
-
let proofSteps =
|
|
98
|
+
let proofSteps = context.getProofSteps();
|
|
99
99
|
|
|
100
100
|
proofSteps = reverse(proofSteps); ///
|
|
101
101
|
|
|
102
102
|
statementUnifiedWithProofSteps = proofSteps.some((proofStep) => {
|
|
103
|
-
const statementUnified = proofStep.unifyStatement(statement,
|
|
103
|
+
const statementUnified = proofStep.unifyStatement(statement, context);
|
|
104
104
|
|
|
105
105
|
if (statementUnified) {
|
|
106
106
|
return true;
|
|
@@ -139,7 +139,8 @@ class UnqualifiedStatement {
|
|
|
139
139
|
const { Statement } = shim,
|
|
140
140
|
statementNode = statementNodeQuery(unqualifiedStatementNode),
|
|
141
141
|
localContext = LocalContext.fromFileContext(fileContext),
|
|
142
|
-
|
|
142
|
+
context = localContext, ///
|
|
143
|
+
statement = Statement.fromStatementNode(statementNode, context),
|
|
143
144
|
node = unqualifiedStatementNode; ///
|
|
144
145
|
|
|
145
146
|
string = fileContext.nodeAsString(node);
|