occam-verify-cli 1.0.956 → 1.0.973
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/context/bounded.js +11 -7
- package/lib/context.js +17 -5
- package/lib/element/assertion/signature.js +17 -19
- package/lib/element/assertion/subproof.js +36 -39
- package/lib/element/assertion/type.js +20 -1
- package/lib/element/assumption/metaLevel.js +18 -17
- package/lib/element/assumption.js +52 -3
- package/lib/element/combinator.js +10 -12
- package/lib/element/conclusion.js +33 -33
- package/lib/element/constructor.js +7 -11
- package/lib/element/deduction.js +33 -33
- package/lib/element/equivalence.js +11 -7
- package/lib/element/hypothesis.js +45 -19
- package/lib/element/judgement.js +1 -1
- package/lib/element/label.js +9 -11
- package/lib/element/proofAssertion/premise.js +98 -87
- package/lib/element/proofAssertion/step.js +27 -27
- package/lib/element/proofAssertion/supposition.js +99 -88
- package/lib/element/proofAssertion.js +3 -3
- package/lib/element/reference.js +30 -38
- package/lib/element/signature.js +38 -47
- package/lib/element/statement.js +18 -58
- package/lib/element/substitution/frame.js +34 -42
- package/lib/element/substitution/reference.js +12 -13
- package/lib/element/substitution/statement.js +26 -31
- package/lib/element/substitution/term.js +32 -37
- package/lib/element/term.js +2 -2
- package/lib/element/topLevelAssertion/axiom.js +33 -34
- package/lib/element/topLevelAssertion.js +30 -7
- package/lib/element/topLevelMetaAssertion.js +2 -2
- package/lib/process/discharge.js +38 -0
- package/lib/process/unification.js +228 -0
- package/lib/process/unify.js +9 -5
- package/lib/process/validation.js +291 -0
- package/lib/utilities/context.js +69 -105
- package/lib/utilities/element.js +2 -4
- package/lib/utilities/string.js +4 -4
- package/package.json +1 -1
- package/src/context/bounded.js +19 -7
- package/src/context.js +26 -6
- package/src/element/assertion/signature.js +21 -26
- package/src/element/assertion/subproof.js +43 -45
- package/src/element/assertion/type.js +30 -1
- package/src/element/assumption/metaLevel.js +26 -22
- package/src/element/assumption.js +80 -2
- package/src/element/combinator.js +11 -14
- package/src/element/conclusion.js +38 -37
- package/src/element/constructor.js +8 -13
- package/src/element/deduction.js +38 -37
- package/src/element/equivalence.js +17 -13
- package/src/element/hypothesis.js +59 -19
- package/src/element/judgement.js +1 -1
- package/src/element/label.js +10 -12
- package/src/element/proofAssertion/premise.js +123 -107
- package/src/element/proofAssertion/step.js +29 -29
- package/src/element/proofAssertion/supposition.js +124 -108
- package/src/element/proofAssertion.js +2 -2
- package/src/element/reference.js +36 -47
- package/src/element/signature.js +42 -53
- package/src/element/statement.js +18 -89
- package/src/element/substitution/frame.js +45 -58
- package/src/element/substitution/reference.js +13 -16
- package/src/element/substitution/statement.js +27 -34
- package/src/element/substitution/term.js +37 -46
- package/src/element/term.js +1 -1
- package/src/element/topLevelAssertion/axiom.js +43 -45
- package/src/element/topLevelAssertion.js +42 -6
- package/src/element/topLevelMetaAssertion.js +2 -2
- package/src/process/discharge.js +33 -0
- package/src/{utilities → process}/unification.js +21 -27
- package/src/process/unify.js +9 -5
- package/src/{utilities → process}/validation.js +2 -2
- package/src/utilities/context.js +77 -128
- package/src/utilities/element.js +2 -5
- package/src/utilities/string.js +6 -6
- package/lib/context/ephemeral.js +0 -28
- package/lib/context/synoptic.js +0 -255
- package/lib/utilities/unification.js +0 -233
- package/lib/utilities/validation.js +0 -291
- package/src/context/ephemeral.js +0 -17
- package/src/context/synoptic.js +0 -361
package/src/element/label.js
CHANGED
|
@@ -6,7 +6,7 @@ import { define } from "../elements";
|
|
|
6
6
|
import { instantiateLabel } from "../process/instantiate";
|
|
7
7
|
import { labelFromLabelNode, metavariableFromLabelNode } from "../utilities/element";
|
|
8
8
|
import { breakPointFromJSON, breakPointToBreakPointJSON } from "../utilities/breakPoint";
|
|
9
|
-
import {
|
|
9
|
+
import { attempt, ablate, serialise, unserialise, instantiate } from "../utilities/context";
|
|
10
10
|
|
|
11
11
|
export default define(class Label extends Element {
|
|
12
12
|
constructor(context, string, node, breakPoint, metavariable) {
|
|
@@ -154,8 +154,8 @@ export default define(class Label extends Element {
|
|
|
154
154
|
static fromJSON(json, context) {
|
|
155
155
|
let label;
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
instantiate((context) => {
|
|
158
|
+
unserialise((json, context) => {
|
|
159
159
|
const { string } = json,
|
|
160
160
|
labelNode = instantiateLabel(string, context),
|
|
161
161
|
node = labelNode, ///
|
|
@@ -163,8 +163,8 @@ export default define(class Label extends Element {
|
|
|
163
163
|
metavariable = metavariableFromLabelNode(labelNode, context);
|
|
164
164
|
|
|
165
165
|
label = new Label(context, string, node, breakPoint, metavariable);
|
|
166
|
-
}, context);
|
|
167
|
-
},
|
|
166
|
+
}, json, context);
|
|
167
|
+
}, context);
|
|
168
168
|
|
|
169
169
|
return label;
|
|
170
170
|
}
|
|
@@ -172,14 +172,12 @@ export default define(class Label extends Element {
|
|
|
172
172
|
static fromLabelString(labelString, context) {
|
|
173
173
|
let label;
|
|
174
174
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
labelNode = instantiateLabel(string, context);
|
|
175
|
+
ablate((context) => {
|
|
176
|
+
instantiate((context) => {
|
|
177
|
+
const string = labelString, ///
|
|
178
|
+
labelNode = instantiateLabel(string, context);
|
|
180
179
|
|
|
181
|
-
|
|
182
|
-
}, context);
|
|
180
|
+
label = labelFromLabelNode(labelNode, context);
|
|
183
181
|
}, context);
|
|
184
182
|
}, context);
|
|
185
183
|
|
|
@@ -6,7 +6,7 @@ import { define } from "../../elements";
|
|
|
6
6
|
import { instantiatePremise } from "../../process/instantiate";
|
|
7
7
|
import { procedureCallFromPremiseNode } from "../../utilities/element";
|
|
8
8
|
import { breakPointFromJSON, breakPointToBreakPointJSON } from "../../utilities/breakPoint";
|
|
9
|
-
import {
|
|
9
|
+
import { declare, attempt, reconcile, serialise, unserialise, instantiate } from "../../utilities/context";
|
|
10
10
|
|
|
11
11
|
export default define(class Premise extends ProofAssertion {
|
|
12
12
|
constructor(context, string, node, breakPoint, statement, procedureCall) {
|
|
@@ -26,6 +26,31 @@ export default define(class Premise extends ProofAssertion {
|
|
|
26
26
|
return premiseNode;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
getStatementNode() {
|
|
30
|
+
const premiseNode = this.getPremiseNode(),
|
|
31
|
+
statementNode = premiseNode.getStatementNode();
|
|
32
|
+
|
|
33
|
+
return statementNode;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
findSubproofAssertion() {
|
|
37
|
+
let subproofAssertion = null;
|
|
38
|
+
|
|
39
|
+
const statementNode = this.getStatementNode();
|
|
40
|
+
|
|
41
|
+
if (statementNode !== null) {
|
|
42
|
+
const subproofAssertionNode = statementNode.getSubproofAssertionNode();
|
|
43
|
+
|
|
44
|
+
if (subproofAssertionNode !== null) {
|
|
45
|
+
const context = this.getContext();
|
|
46
|
+
|
|
47
|
+
subproofAssertion = context.findAssertionByAssertionNode(subproofAssertionNode);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return subproofAssertion;
|
|
52
|
+
}
|
|
53
|
+
|
|
29
54
|
async verify(context) {
|
|
30
55
|
let verifies = false;
|
|
31
56
|
|
|
@@ -39,11 +64,13 @@ export default define(class Premise extends ProofAssertion {
|
|
|
39
64
|
procedureCall = this.getProcedureCall();
|
|
40
65
|
|
|
41
66
|
if ((statement !== null) || (procedureCall !== null)) {
|
|
42
|
-
|
|
67
|
+
declare((context) => {
|
|
68
|
+
const validates = this.validate(context);
|
|
43
69
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
70
|
+
if (validates) {
|
|
71
|
+
verifies = true;
|
|
72
|
+
}
|
|
73
|
+
}, context);
|
|
47
74
|
} else {
|
|
48
75
|
context.debug(`Unable to validate the '${premiseString}' premise because it is nonsense.`);
|
|
49
76
|
}
|
|
@@ -58,31 +85,29 @@ export default define(class Premise extends ProofAssertion {
|
|
|
58
85
|
|
|
59
86
|
context.trace(`Validatting the '${premiseString}' premise...`);
|
|
60
87
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
procedureCall = this.getProcedureCall();
|
|
88
|
+
attempt((context) => {
|
|
89
|
+
const statement = this.getStatement(),
|
|
90
|
+
procedureCall = this.getProcedureCall();
|
|
65
91
|
|
|
66
|
-
|
|
67
|
-
|
|
92
|
+
if (statement !== null) {
|
|
93
|
+
const statementValidates = this.validateStatement(context);
|
|
68
94
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
95
|
+
if (statementValidates) {
|
|
96
|
+
validates = true;
|
|
72
97
|
}
|
|
98
|
+
}
|
|
73
99
|
|
|
74
|
-
|
|
75
|
-
|
|
100
|
+
if (procedureCall !== null) {
|
|
101
|
+
const procedureCallValidates = this.validateProcedureCall(context);
|
|
76
102
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
103
|
+
if (procedureCallValidates) {
|
|
104
|
+
validates = true;
|
|
80
105
|
}
|
|
106
|
+
}
|
|
81
107
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, context);
|
|
108
|
+
if (validates) {
|
|
109
|
+
this.commit(context);
|
|
110
|
+
}
|
|
86
111
|
}, context);
|
|
87
112
|
|
|
88
113
|
if (validates) {
|
|
@@ -143,77 +168,60 @@ export default define(class Premise extends ProofAssertion {
|
|
|
143
168
|
|
|
144
169
|
context.trace(`Unifying the '${premiseString}' premise independently...`);
|
|
145
170
|
|
|
146
|
-
|
|
147
|
-
|
|
171
|
+
await reconcile(async (context) => {
|
|
172
|
+
const statement = this.getStatement(),
|
|
173
|
+
procedureCall = this.getProcedureCall();
|
|
148
174
|
|
|
149
|
-
|
|
150
|
-
|
|
175
|
+
if (statement !== null) {
|
|
176
|
+
const premiseContext = this.getContext(),
|
|
177
|
+
generalContext = premiseContext, ///
|
|
178
|
+
specificContext = context, ///
|
|
179
|
+
statementUnifiesIndependently = statement.unifyIndependently(generalContext, specificContext);
|
|
151
180
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
context = specificContext; ///
|
|
157
|
-
|
|
158
|
-
const statementUnifiesIndependently = statement.unifyIndependently(generalContext, specificContext);
|
|
159
|
-
|
|
160
|
-
if (statementUnifiesIndependently) {
|
|
161
|
-
unifiesIndependently = true;
|
|
181
|
+
if (statementUnifiesIndependently) {
|
|
182
|
+
unifiesIndependently = true;
|
|
183
|
+
}
|
|
162
184
|
}
|
|
163
|
-
}
|
|
164
185
|
|
|
165
|
-
|
|
166
|
-
|
|
186
|
+
if (procedureCall !== null) {
|
|
187
|
+
const procedureCallResolvedIndependently = await procedureCall.unifyIndependently(context);
|
|
167
188
|
|
|
168
|
-
|
|
169
|
-
|
|
189
|
+
if (procedureCallResolvedIndependently) {
|
|
190
|
+
unifiesIndependently = true;
|
|
191
|
+
}
|
|
170
192
|
}
|
|
171
|
-
}
|
|
193
|
+
}, context);
|
|
172
194
|
|
|
173
195
|
if (unifiesIndependently) {
|
|
174
|
-
context.debug(`...unified the '${premiseString}' premise
|
|
196
|
+
context.debug(`...unified the '${premiseString}' premise independently.`);
|
|
175
197
|
}
|
|
176
198
|
|
|
177
199
|
return unifiesIndependently;
|
|
178
200
|
}
|
|
179
201
|
|
|
180
|
-
|
|
181
|
-
let
|
|
202
|
+
unifySubproof(subproof, context) {
|
|
203
|
+
let subproofUnifies = false;
|
|
182
204
|
|
|
183
205
|
const premiseString = this.getString(), ///
|
|
184
|
-
|
|
206
|
+
subproofString = subproof.getString();
|
|
185
207
|
|
|
186
|
-
context.trace(`Unifying the '${
|
|
208
|
+
context.trace(`Unifying the '${subproofString}' subproof with the '${premiseString}' premise...`);
|
|
187
209
|
|
|
188
|
-
const
|
|
189
|
-
proofAssertion = subproofOrProofAssertionProofAssertion ?
|
|
190
|
-
subproofOrProofAssertion :
|
|
191
|
-
null,
|
|
192
|
-
subproof = subproofOrProofAssertionProofAssertion ?
|
|
193
|
-
null :
|
|
194
|
-
subproofOrProofAssertion;
|
|
195
|
-
|
|
196
|
-
if (proofAssertion !== null) {
|
|
197
|
-
const proofAssertionUnifies = this.unifyProofAssertion(proofAssertion, context);
|
|
198
|
-
|
|
199
|
-
if (proofAssertionUnifies) {
|
|
200
|
-
subproofOrProofAssertionUnifies = true;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
210
|
+
const subproofAssertion = this.findSubproofAssertion();
|
|
203
211
|
|
|
204
|
-
if (
|
|
205
|
-
const
|
|
212
|
+
if (subproofAssertion !== null) {
|
|
213
|
+
const premiseContext = this.getContext(),
|
|
214
|
+
generalContext = premiseContext, ///
|
|
215
|
+
spsecfiicContext = context; ///
|
|
206
216
|
|
|
207
|
-
|
|
208
|
-
subproofOrProofAssertionUnifies = true;
|
|
209
|
-
}
|
|
217
|
+
subproofUnifies = subproofAssertion.unifySubproof(subproof, generalContext, spsecfiicContext);
|
|
210
218
|
}
|
|
211
219
|
|
|
212
|
-
if (
|
|
213
|
-
context.debug(`...unified the '${
|
|
220
|
+
if (subproofUnifies) {
|
|
221
|
+
context.debug(`...unified the '${subproofString}' subproof with the '${premiseString}' premise.`);
|
|
214
222
|
}
|
|
215
223
|
|
|
216
|
-
return
|
|
224
|
+
return subproofUnifies;
|
|
217
225
|
}
|
|
218
226
|
|
|
219
227
|
unifyProofAssertion(proofAssertion, context) {
|
|
@@ -229,18 +237,16 @@ export default define(class Premise extends ProofAssertion {
|
|
|
229
237
|
generalContext = premiseContext, ///
|
|
230
238
|
specificContext = proofAssertionContext; ///
|
|
231
239
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
statementUnifies = this.unifyStatement(statement, generalContext, specificContext);
|
|
240
|
+
reconcile((specificContext) => {
|
|
241
|
+
const statement = proofAssertion.getStatement(),
|
|
242
|
+
statementUnifies = this.unifyStatement(statement, generalContext, specificContext);
|
|
236
243
|
|
|
237
|
-
|
|
238
|
-
|
|
244
|
+
if (statementUnifies) {
|
|
245
|
+
specificContext.commit(context);
|
|
239
246
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}, specificContext, context);
|
|
247
|
+
proofAssertionUnifies = true;
|
|
248
|
+
}
|
|
249
|
+
}, specificContext);
|
|
244
250
|
|
|
245
251
|
if (proofAssertionUnifies) {
|
|
246
252
|
context.debug(`...unified the '${proofAssertionString}' proof assertion with the '${premiseString}' premise.`);
|
|
@@ -249,39 +255,49 @@ export default define(class Premise extends ProofAssertion {
|
|
|
249
255
|
return proofAssertionUnifies;
|
|
250
256
|
}
|
|
251
257
|
|
|
252
|
-
|
|
253
|
-
let
|
|
258
|
+
unifySubproofOrProofAssertion(subproofOrProofAssertion, context) {
|
|
259
|
+
let subproofOrProofAssertionUnifies;
|
|
254
260
|
|
|
255
261
|
const premiseString = this.getString(), ///
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
context.trace(`Unifying the '${subproofString}' subproof with the '${premiseString}' premise...`);
|
|
259
|
-
|
|
260
|
-
const statement = this.getStatement();
|
|
261
|
-
|
|
262
|
-
if (statement !== null) {
|
|
263
|
-
const statementNode = statement.getNode(),
|
|
264
|
-
subproofAssertionNode = statementNode.getSubproofAssertionNode();
|
|
262
|
+
subproofOrProofAssertionString = subproofOrProofAssertion.getString();
|
|
265
263
|
|
|
266
|
-
|
|
267
|
-
const specificContext = context; ///
|
|
264
|
+
context.trace(`Unifying the '${subproofOrProofAssertionString}' subproof or proof assertion with the '${premiseString}' premise...`);
|
|
268
265
|
|
|
269
|
-
|
|
266
|
+
const subproofOrProofAssertionProofAssertion = subproofOrProofAssertion.isProofAssertion(),
|
|
267
|
+
proofAssertion = subproofOrProofAssertionProofAssertion ?
|
|
268
|
+
subproofOrProofAssertion :
|
|
269
|
+
null,
|
|
270
|
+
subproof = subproofOrProofAssertionProofAssertion ?
|
|
271
|
+
null :
|
|
272
|
+
subproofOrProofAssertion;
|
|
273
|
+
|
|
274
|
+
reconcile((context) => {
|
|
275
|
+
if (proofAssertion !== null) {
|
|
276
|
+
const proofAssertionUnifies = this.unifyProofAssertion(proofAssertion, context);
|
|
277
|
+
|
|
278
|
+
if (proofAssertionUnifies) {
|
|
279
|
+
subproofOrProofAssertionUnifies = true;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
270
282
|
|
|
271
|
-
|
|
272
|
-
|
|
283
|
+
if (subproof !== null) {
|
|
284
|
+
const subproofUnifies = this.unifySubproof(subproof, context);
|
|
273
285
|
|
|
274
|
-
|
|
286
|
+
if (subproofUnifies) {
|
|
287
|
+
subproofOrProofAssertionUnifies = true;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
275
290
|
|
|
276
|
-
|
|
291
|
+
if (subproofOrProofAssertionUnifies) {
|
|
292
|
+
context.commit();
|
|
277
293
|
}
|
|
278
|
-
}
|
|
294
|
+
}, context);
|
|
279
295
|
|
|
280
|
-
if (
|
|
281
|
-
context.debug(`...unified the '${
|
|
296
|
+
if (subproofOrProofAssertionUnifies) {
|
|
297
|
+
context.debug(`...unified the '${subproofOrProofAssertionString}' subproof or proof assertion with the '${premiseString}' premise.`);
|
|
282
298
|
}
|
|
283
299
|
|
|
284
|
-
return
|
|
300
|
+
return subproofOrProofAssertionUnifies;
|
|
285
301
|
}
|
|
286
302
|
|
|
287
303
|
toJSON() {
|
|
@@ -313,8 +329,8 @@ export default define(class Premise extends ProofAssertion {
|
|
|
313
329
|
static fromJSON(json, context) {
|
|
314
330
|
let premise;
|
|
315
331
|
|
|
316
|
-
|
|
317
|
-
|
|
332
|
+
instantiate((context) => {
|
|
333
|
+
unserialise((json, context) => {
|
|
318
334
|
const { string } = json,
|
|
319
335
|
premiseNode = instantiatePremise(string, context),
|
|
320
336
|
node = premiseNode, ///
|
|
@@ -323,8 +339,8 @@ export default define(class Premise extends ProofAssertion {
|
|
|
323
339
|
procedureCall = procedureCallFromPremiseNode(premiseNode, context);
|
|
324
340
|
|
|
325
341
|
premise = new Premise(context, string, node, breakPoint, statement, procedureCall);
|
|
326
|
-
}, context);
|
|
327
|
-
},
|
|
342
|
+
}, json, context);
|
|
343
|
+
}, context);
|
|
328
344
|
|
|
329
345
|
return premise;
|
|
330
346
|
}
|
|
@@ -7,7 +7,7 @@ import elements from "../../elements";
|
|
|
7
7
|
import ProofAssertion from "../proofAssertion";
|
|
8
8
|
|
|
9
9
|
import { define } from "../../elements";
|
|
10
|
-
import { unifySteps } from "../../
|
|
10
|
+
import { unifySteps } from "../../process/unification";
|
|
11
11
|
import { derive, declare, attempt, reconcile } from "../../utilities/context";
|
|
12
12
|
|
|
13
13
|
const { asyncSome } = asynchronousUtilities,
|
|
@@ -98,17 +98,22 @@ export default define(class Step extends ProofAssertion {
|
|
|
98
98
|
const statement = this.getStatement();
|
|
99
99
|
|
|
100
100
|
if (statement !== null) {
|
|
101
|
-
const
|
|
101
|
+
const qualified = this.isQualified(),
|
|
102
|
+
stated = qualified; ///
|
|
102
103
|
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
await (stated ? declare : derive)(async (context) => {
|
|
105
|
+
const validates = this.validate(context);
|
|
106
|
+
|
|
107
|
+
if (validates) {
|
|
108
|
+
context = this.getContext();
|
|
105
109
|
|
|
106
|
-
|
|
110
|
+
const unifiies = await this.unify(context);
|
|
107
111
|
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
if (unifiies) {
|
|
113
|
+
verifies = true;
|
|
114
|
+
}
|
|
110
115
|
}
|
|
111
|
-
}
|
|
116
|
+
}, context)
|
|
112
117
|
} else {
|
|
113
118
|
context.debug(`Unable to verify the '${stepString}' step because it is nonsense.`);
|
|
114
119
|
}
|
|
@@ -127,30 +132,25 @@ export default define(class Step extends ProofAssertion {
|
|
|
127
132
|
|
|
128
133
|
context.trace(`Validating the '${stepString}' step...`);
|
|
129
134
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
(stated ? declare : derive)((context) => {
|
|
134
|
-
attempt((context) => {
|
|
135
|
-
const statementValidates = this.validateStatement(context);
|
|
135
|
+
attempt((context) => {
|
|
136
|
+
const statementValidates = this.validateStatement(context);
|
|
136
137
|
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
if (statementValidates) {
|
|
139
|
+
const referenceValidates = this.validateReference(context);
|
|
139
140
|
|
|
140
|
-
|
|
141
|
-
|
|
141
|
+
if (referenceValidates) {
|
|
142
|
+
const signatureAssertionValidates = this.validateSignatureAssertion(context);
|
|
142
143
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
144
|
+
if (signatureAssertionValidates) {
|
|
145
|
+
validates = true;
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
+
}
|
|
148
149
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}, context)
|
|
150
|
+
if (validates) {
|
|
151
|
+
this.commit(context);
|
|
152
|
+
}
|
|
153
|
+
}, context);
|
|
154
154
|
|
|
155
155
|
if (validates) {
|
|
156
156
|
context.debug(`...validated the '${stepString}' step.`);
|
|
@@ -247,13 +247,13 @@ export default define(class Step extends ProofAssertion {
|
|
|
247
247
|
const step = this; ///
|
|
248
248
|
|
|
249
249
|
await asyncSome(unifySteps, async (unifyStep) => {
|
|
250
|
-
let
|
|
250
|
+
let stepUnifies;
|
|
251
251
|
|
|
252
252
|
await reconcile(async (context) => {
|
|
253
|
-
|
|
253
|
+
stepUnifies = await unifyStep(step, context);
|
|
254
254
|
}, context);
|
|
255
255
|
|
|
256
|
-
if (
|
|
256
|
+
if (stepUnifies) {
|
|
257
257
|
unifies = true;
|
|
258
258
|
|
|
259
259
|
return true;
|