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.
Files changed (81) hide show
  1. package/lib/context/bounded.js +11 -7
  2. package/lib/context.js +17 -5
  3. package/lib/element/assertion/signature.js +17 -19
  4. package/lib/element/assertion/subproof.js +36 -39
  5. package/lib/element/assertion/type.js +20 -1
  6. package/lib/element/assumption/metaLevel.js +18 -17
  7. package/lib/element/assumption.js +52 -3
  8. package/lib/element/combinator.js +10 -12
  9. package/lib/element/conclusion.js +33 -33
  10. package/lib/element/constructor.js +7 -11
  11. package/lib/element/deduction.js +33 -33
  12. package/lib/element/equivalence.js +11 -7
  13. package/lib/element/hypothesis.js +45 -19
  14. package/lib/element/judgement.js +1 -1
  15. package/lib/element/label.js +9 -11
  16. package/lib/element/proofAssertion/premise.js +98 -87
  17. package/lib/element/proofAssertion/step.js +27 -27
  18. package/lib/element/proofAssertion/supposition.js +99 -88
  19. package/lib/element/proofAssertion.js +3 -3
  20. package/lib/element/reference.js +30 -38
  21. package/lib/element/signature.js +38 -47
  22. package/lib/element/statement.js +18 -58
  23. package/lib/element/substitution/frame.js +34 -42
  24. package/lib/element/substitution/reference.js +12 -13
  25. package/lib/element/substitution/statement.js +26 -31
  26. package/lib/element/substitution/term.js +32 -37
  27. package/lib/element/term.js +2 -2
  28. package/lib/element/topLevelAssertion/axiom.js +33 -34
  29. package/lib/element/topLevelAssertion.js +30 -7
  30. package/lib/element/topLevelMetaAssertion.js +2 -2
  31. package/lib/process/discharge.js +38 -0
  32. package/lib/process/unification.js +228 -0
  33. package/lib/process/unify.js +9 -5
  34. package/lib/process/validation.js +291 -0
  35. package/lib/utilities/context.js +69 -105
  36. package/lib/utilities/element.js +2 -4
  37. package/lib/utilities/string.js +4 -4
  38. package/package.json +1 -1
  39. package/src/context/bounded.js +19 -7
  40. package/src/context.js +26 -6
  41. package/src/element/assertion/signature.js +21 -26
  42. package/src/element/assertion/subproof.js +43 -45
  43. package/src/element/assertion/type.js +30 -1
  44. package/src/element/assumption/metaLevel.js +26 -22
  45. package/src/element/assumption.js +80 -2
  46. package/src/element/combinator.js +11 -14
  47. package/src/element/conclusion.js +38 -37
  48. package/src/element/constructor.js +8 -13
  49. package/src/element/deduction.js +38 -37
  50. package/src/element/equivalence.js +17 -13
  51. package/src/element/hypothesis.js +59 -19
  52. package/src/element/judgement.js +1 -1
  53. package/src/element/label.js +10 -12
  54. package/src/element/proofAssertion/premise.js +123 -107
  55. package/src/element/proofAssertion/step.js +29 -29
  56. package/src/element/proofAssertion/supposition.js +124 -108
  57. package/src/element/proofAssertion.js +2 -2
  58. package/src/element/reference.js +36 -47
  59. package/src/element/signature.js +42 -53
  60. package/src/element/statement.js +18 -89
  61. package/src/element/substitution/frame.js +45 -58
  62. package/src/element/substitution/reference.js +13 -16
  63. package/src/element/substitution/statement.js +27 -34
  64. package/src/element/substitution/term.js +37 -46
  65. package/src/element/term.js +1 -1
  66. package/src/element/topLevelAssertion/axiom.js +43 -45
  67. package/src/element/topLevelAssertion.js +42 -6
  68. package/src/element/topLevelMetaAssertion.js +2 -2
  69. package/src/process/discharge.js +33 -0
  70. package/src/{utilities → process}/unification.js +21 -27
  71. package/src/process/unify.js +9 -5
  72. package/src/{utilities → process}/validation.js +2 -2
  73. package/src/utilities/context.js +77 -128
  74. package/src/utilities/element.js +2 -5
  75. package/src/utilities/string.js +6 -6
  76. package/lib/context/ephemeral.js +0 -28
  77. package/lib/context/synoptic.js +0 -255
  78. package/lib/utilities/unification.js +0 -233
  79. package/lib/utilities/validation.js +0 -291
  80. package/src/context/ephemeral.js +0 -17
  81. package/src/context/synoptic.js +0 -361
@@ -6,7 +6,7 @@ import { define } from "../../elements";
6
6
  import { instantiateSupposition} from "../../process/instantiate";
7
7
  import { procedureCallFromSuppositionNode } from "../../utilities/element";
8
8
  import { breakPointFromJSON, breakPointToBreakPointJSON } from "../../utilities/breakPoint";
9
- import { join, declare, attempt, reconcile, serialise, unserialise, instantiate } from "../../utilities/context";
9
+ import { declare, attempt, reconcile, serialise, unserialise, instantiate } from "../../utilities/context";
10
10
 
11
11
  export default define(class Supposition extends ProofAssertion {
12
12
  constructor(context, string, node, breakPoint, statement, procedureCall) {
@@ -26,6 +26,31 @@ export default define(class Supposition extends ProofAssertion {
26
26
  return suppositionNode;
27
27
  }
28
28
 
29
+ getStatementNode() {
30
+ const suppositionNode = this.getSuppositionNode(),
31
+ statementNode = suppositionNode.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 Supposition extends ProofAssertion {
39
64
  procedureCall = this.getProcedureCall();
40
65
 
41
66
  if ((statement !== null) || (procedureCall !== null)) {
42
- const validates = this.validate(context);
67
+ declare((context) => {
68
+ const validates = this.validate(context);
43
69
 
44
- if (validates) {
45
- verifies = true;
46
- }
70
+ if (validates) {
71
+ verifies = true;
72
+ }
73
+ }, context);
47
74
  } else {
48
75
  context.debug(`Unable to validate the '${suppositionString}' supposition because it is nonsense.`);
49
76
  }
@@ -58,31 +85,29 @@ export default define(class Supposition extends ProofAssertion {
58
85
 
59
86
  context.trace(`Validatting the '${suppositionString}' supposition...`);
60
87
 
61
- declare((context) => {
62
- attempt((context) => {
63
- const statement = this.getStatement(),
64
- procedureCall = this.getProcedureCall();
88
+ attempt((context) => {
89
+ const statement = this.getStatement(),
90
+ procedureCall = this.getProcedureCall();
65
91
 
66
- if (statement !== null) {
67
- const statementValidates = this.validateStatement(context);
92
+ if (statement !== null) {
93
+ const statementValidates = this.validateStatement(context);
68
94
 
69
- if (statementValidates) {
70
- validates = true;
71
- }
95
+ if (statementValidates) {
96
+ validates = true;
72
97
  }
98
+ }
73
99
 
74
- if (procedureCall !== null) {
75
- const procedureCallValidates = this.validateProcedureCall(context);
100
+ if (procedureCall !== null) {
101
+ const procedureCallValidates = this.validateProcedureCall(context);
76
102
 
77
- if (procedureCallValidates) {
78
- validates = true;
79
- }
103
+ if (procedureCallValidates) {
104
+ validates = true;
80
105
  }
106
+ }
81
107
 
82
- if (validates) {
83
- this.commit(context);
84
- }
85
- }, context);
108
+ if (validates) {
109
+ this.commit(context);
110
+ }
86
111
  }, context);
87
112
 
88
113
  if (validates) {
@@ -166,77 +191,60 @@ export default define(class Supposition extends ProofAssertion {
166
191
 
167
192
  context.trace(`Unifying the '${suppositionString}' supposition independently...`);
168
193
 
169
- const statement = this.getStatement(),
170
- procedureCall = this.getProcedureCall();
171
-
172
- if (statement !== null) {
173
- const specificContext = context; ///
174
-
175
- context = this.getContext();
194
+ await reconcile(async (context) => {
195
+ const statement = this.getStatement(),
196
+ procedureCall = this.getProcedureCall();
176
197
 
177
- const generalContext = context; ///
198
+ if (statement !== null) {
199
+ const suppositionContext = this.getContext(),
200
+ generalContext = suppositionContext, ///
201
+ specificContext = context, ///
202
+ statementUnifiesIndependently = statement.unifyIndependently(generalContext, specificContext);
178
203
 
179
- context = specificContext; ///
180
-
181
- const statementUnifiesIndependently = statement.unifyIndependently(generalContext, specificContext);
182
-
183
- if (statementUnifiesIndependently) {
184
- unifiesIndependently = true;
204
+ if (statementUnifiesIndependently) {
205
+ unifiesIndependently = true;
206
+ }
185
207
  }
186
- }
187
208
 
188
- if (procedureCall !== null) {
189
- const procedureCallResolvedIndependently = await procedureCall.unifyIndependently(context);
209
+ if (procedureCall !== null) {
210
+ const procedureCallResolvedIndependently = await procedureCall.unifyIndependently(context);
190
211
 
191
- if (procedureCallResolvedIndependently) {
192
- unifiesIndependently = true;
212
+ if (procedureCallResolvedIndependently) {
213
+ unifiesIndependently = true;
214
+ }
193
215
  }
194
- }
216
+ }, context);
195
217
 
196
218
  if (unifiesIndependently) {
197
- context.debug(`...unified the '${suppositionString}' supposition independenly.`);
219
+ context.debug(`...unified the '${suppositionString}' supposition independently.`);
198
220
  }
199
221
 
200
222
  return unifiesIndependently;
201
223
  }
202
224
 
203
- unifySubproofOrProofAssertion(subproofOrProofAssertion, context) {
204
- let subproofOrProofAssertionUnifies;
225
+ unifySubproof(subproof, context) {
226
+ let subproofUnifies = false;
205
227
 
206
228
  const suppositionString = this.getString(), ///
207
- subproofOrProofAssertionString = subproofOrProofAssertion.getString();
208
-
209
- context.trace(`Unifying the '${subproofOrProofAssertionString}' subproof or proof assertion with the '${suppositionString}' supposition...`);
229
+ subproofString = subproof.getString();
210
230
 
211
- const subproofOrProofAssertionProofAssertion = subproofOrProofAssertion.isProofAssertion(),
212
- proofAssertion = subproofOrProofAssertionProofAssertion ?
213
- subproofOrProofAssertion :
214
- null,
215
- subproof = subproofOrProofAssertionProofAssertion ?
216
- null :
217
- subproofOrProofAssertion;
218
-
219
- if (proofAssertion !== null) {
220
- const proofAssertionUnifies = this.unifyProofAssertion(proofAssertion, context);
231
+ context.trace(`Unifying the '${subproofString}' subproof with the '${suppositionString}' supposition...`);
221
232
 
222
- if (proofAssertionUnifies) {
223
- subproofOrProofAssertionUnifies = true;
224
- }
225
- }
233
+ const subproofAssertion = this.findSubproofAssertion();
226
234
 
227
- if (subproof !== null) {
228
- const subproofUnifies = this.unifySubproof(subproof, context);
235
+ if (subproofAssertion !== null) {
236
+ const suppositionContext = this.getContext(),
237
+ generalContext = suppositionContext, ///
238
+ spsecfiicContext = context; ///
229
239
 
230
- if (subproofUnifies) {
231
- subproofOrProofAssertionUnifies = true;
232
- }
240
+ subproofUnifies = subproofAssertion.unifySubproof(subproof, generalContext, spsecfiicContext);
233
241
  }
234
242
 
235
- if (subproofOrProofAssertionUnifies) {
236
- context.debug(`...unified the '${subproofOrProofAssertionString}' subproof or proof assertion with the '${suppositionString}' supposition.`);
243
+ if (subproofUnifies) {
244
+ context.debug(`...unified the '${subproofString}' subproof with the '${suppositionString}' supposition.`);
237
245
  }
238
246
 
239
- return subproofOrProofAssertionUnifies;
247
+ return subproofUnifies;
240
248
  }
241
249
 
242
250
  unifyProofAssertion(proofAssertion, context) {
@@ -248,22 +256,20 @@ export default define(class Supposition extends ProofAssertion {
248
256
  context.trace(`Unifying the '${proofAssertionString}' proof assertion with the '${suppositionString}' supposition...`);
249
257
 
250
258
  const proofAssertionContext = proofAssertion.getContext(),
251
- suppositionContext = this.getContext(),
259
+ suppositionContext = this.getContext(), ///
252
260
  generalContext = suppositionContext, ///
253
- specificContext = proofAssertionContext;
261
+ specificContext = proofAssertionContext; ///
254
262
 
255
- join((specificContext) => {
256
- reconcile((specificContext) => {
257
- const statement = proofAssertion.getStatement(),
258
- statementUnifies = this.unifyStatement(statement, generalContext, specificContext);
263
+ reconcile((specificContext) => {
264
+ const statement = proofAssertion.getStatement(),
265
+ statementUnifies = this.unifyStatement(statement, generalContext, specificContext);
259
266
 
260
- if (statementUnifies) {
261
- specificContext.commit(context);
267
+ if (statementUnifies) {
268
+ specificContext.commit(context);
262
269
 
263
- proofAssertionUnifies = true;
264
- }
265
- }, specificContext);
266
- }, specificContext, context);
270
+ proofAssertionUnifies = true;
271
+ }
272
+ }, specificContext);
267
273
 
268
274
  if (proofAssertionUnifies) {
269
275
  context.debug(`...unified the '${proofAssertionString}' proof assertion with the '${suppositionString}' supposition.`);
@@ -272,39 +278,49 @@ export default define(class Supposition extends ProofAssertion {
272
278
  return proofAssertionUnifies;
273
279
  }
274
280
 
275
- unifySubproof(subproof, context) {
276
- let subproofUnifies = false;
277
-
278
- const subproofString = subproof.getString(),
279
- suppositionString = this.getString();
281
+ unifySubproofOrProofAssertion(subproofOrProofAssertion, context) {
282
+ let subproofOrProofAssertionUnifies;
280
283
 
281
- context.trace(`Unifying the '${subproofString}' subproof with the '${suppositionString}' supposition...`);
284
+ const suppositionString = this.getString(), ///
285
+ subproofOrProofAssertionString = subproofOrProofAssertion.getString();
282
286
 
283
- const statement = this.getStatement();
287
+ context.trace(`Unifying the '${subproofOrProofAssertionString}' subproof or proof assertion with the '${suppositionString}' supposition...`);
284
288
 
285
- if (statement !== null) {
286
- const statementNode = statement.getNode(),
287
- subproofAssertionNode = statementNode.getSubproofAssertionNode();
289
+ const subproofOrProofAssertionProofAssertion = subproofOrProofAssertion.isProofAssertion(),
290
+ proofAssertion = subproofOrProofAssertionProofAssertion ?
291
+ subproofOrProofAssertion :
292
+ null,
293
+ subproof = subproofOrProofAssertionProofAssertion ?
294
+ null :
295
+ subproofOrProofAssertion;
288
296
 
289
- if (subproofAssertionNode !== null) {
290
- const specificContext = context; ///
297
+ reconcile((context) => {
298
+ if (proofAssertion !== null) {
299
+ const proofAssertionUnifies = this.unifyProofAssertion(proofAssertion, context);
291
300
 
292
- context = this.getContext();
301
+ if (proofAssertionUnifies) {
302
+ subproofOrProofAssertionUnifies = true;
303
+ }
304
+ }
293
305
 
294
- const generalContext = context, ///
295
- subproofAssertion = context.findAssertionByAssertionNode(subproofAssertionNode);
306
+ if (subproof !== null) {
307
+ const subproofUnifies = this.unifySubproof(subproof, context);
296
308
 
297
- context = specificContext; ///
309
+ if (subproofUnifies) {
310
+ subproofOrProofAssertionUnifies = true;
311
+ }
312
+ }
298
313
 
299
- subproofUnifies = subproofAssertion.unifySubproof(subproof, generalContext, specificContext);
314
+ if (subproofOrProofAssertionUnifies) {
315
+ context.commit();
300
316
  }
301
- }
317
+ }, context);
302
318
 
303
- if (subproofUnifies) {
304
- context.debug(`...unified the '${subproofString}' subproof with the '${suppositionString}' supposition.`);
319
+ if (subproofOrProofAssertionUnifies) {
320
+ context.debug(`...unified the '${subproofOrProofAssertionString}' subproof or proof assertion with the '${suppositionString}' supposition.`);
305
321
  }
306
322
 
307
- return subproofUnifies;
323
+ return subproofOrProofAssertionUnifies;
308
324
  }
309
325
 
310
326
  toJSON() {
@@ -336,8 +352,8 @@ export default define(class Supposition extends ProofAssertion {
336
352
  static fromJSON(json, context) {
337
353
  let supposition;
338
354
 
339
- unserialise((json, context) => {
340
- instantiate((context) => {
355
+ instantiate((context) => {
356
+ unserialise((json, context) => {
341
357
  const { string } = json,
342
358
  suppositionNode = instantiateSupposition(string, context),
343
359
  node = suppositionNode, ///
@@ -346,8 +362,8 @@ export default define(class Supposition extends ProofAssertion {
346
362
  procedureCall = procedureCallFromSuppositionNode(suppositionNode, context);
347
363
 
348
364
  supposition = new Supposition(context, string, node, breakPoint, statement, procedureCall);
349
- }, context);
350
- }, json, context);
365
+ }, json, context);
366
+ }, context);
351
367
 
352
368
  return supposition;
353
369
  }
@@ -60,12 +60,12 @@ export default class ProofAssertion extends Element {
60
60
  statementString = statement.getString(),
61
61
  proofAssertionString = this.getString(); ///
62
62
 
63
- context.trace(`Unifying the '${statementString}' statement with the '${proofAssertionString}' proof assertion...`);
63
+ context.trace(`Unifying the '${statementString}' statement with the '${proofAssertionString}' proof assertion's statement...`);
64
64
 
65
65
  statementUnifies = this.statement.unifyStatement(statement, generalContext, specificContext);
66
66
 
67
67
  if (statementUnifies) {
68
- context.debug(`...unified the '${statementString}' statement with the '${proofAssertionString}' proof assertion.`);
68
+ context.debug(`...unified the '${statementString}' statement with the '${proofAssertionString}' proof assertion's statement.`);
69
69
  }
70
70
  }
71
71
 
@@ -6,7 +6,7 @@ import { define } from "../elements";
6
6
  import { instantiateReference } from "../process/instantiate";
7
7
  import { REFERENCE_META_TYPE_NAME } from "../metaTypeNames";
8
8
  import { breakPointFromJSON, breakPointToBreakPointJSON } from "../utilities/breakPoint";
9
- import { join, posit, ablate, attempt, serialise, reconcile, unserialise, instantiate } from "../utilities/context";
9
+ import { ablate, attempt, serialise, reconcile, unserialise, instantiate } from "../utilities/context";
10
10
  import { referenceFromReferenceNode, metavariableFromReferenceNode, topLevelMetaAssertionFromReferenceNode } from "../utilities/element";
11
11
 
12
12
  export default define(class Reference extends Element {
@@ -38,6 +38,8 @@ export default define(class Reference extends Element {
38
38
  return metavariableNode;
39
39
  }
40
40
 
41
+ getMetaType() { return this.metavariable.getMetaType(); }
42
+
41
43
  isEqualTo(reference) {
42
44
  const referenceNode = reference.getNode(),
43
45
  referenceNodeMatches = this.matchReferenceNode(referenceNode),
@@ -125,7 +127,7 @@ export default define(class Reference extends Element {
125
127
 
126
128
  context.debug(`...the '${referenceString}' reference is already valid.`);
127
129
  } else {
128
- const specificContext = context; ///
130
+ const temporaryContext = context; ///
129
131
 
130
132
  context = this.getContext();
131
133
 
@@ -133,21 +135,14 @@ export default define(class Reference extends Element {
133
135
  const metavariableValidates = this.validateMetavariable(context);
134
136
 
135
137
  if (metavariableValidates) {
136
- const referenceMetaTypeName = REFERENCE_META_TYPE_NAME,
137
- referenceMetaType = context.findMetaTypeByMetaTypeName(referenceMetaTypeName),
138
- metaType = this.metavariable.getMetaType();
138
+ const metaType = this.metavariable.getMetaType();
139
139
 
140
140
  if (metaType === null) {
141
- const reference = this, ///
142
- labelPresent = context.isLabelPresentByReference(reference, context);
143
-
144
- if (labelPresent) {
145
- validates = true;
146
- } else {
147
- context.debug(`There is no label for the '${referenceString}' reference.`);
148
- }
141
+ validates = true;
149
142
  } else {
150
- const metavariableMetaTypeEqualToReferenceMetaType = this.metavariable.isMetaTypeEqualTo(referenceMetaType);
143
+ const referenceMetaTypeName = REFERENCE_META_TYPE_NAME,
144
+ referenceMetaType = context.findMetaTypeByMetaTypeName(referenceMetaTypeName),
145
+ metavariableMetaTypeEqualToReferenceMetaType = this.metavariable.isMetaTypeEqualTo(referenceMetaType);
151
146
 
152
147
  if (metavariableMetaTypeEqualToReferenceMetaType) {
153
148
  validates = true;
@@ -166,7 +161,7 @@ export default define(class Reference extends Element {
166
161
  }
167
162
  }, context);
168
163
 
169
- context = specificContext; ///
164
+ context = temporaryContext; ///
170
165
 
171
166
  if (validates) {
172
167
  reference = this; ///
@@ -212,11 +207,9 @@ export default define(class Reference extends Element {
212
207
 
213
208
  context.trace(`Unifying the '${labelString}' label with the '${referenceString}' reference...`);
214
209
 
215
- const generalContext = context; ///
216
-
217
- context = label.getContext();
218
-
219
- const specificContext = context; ///
210
+ const labelContext = label.getContext(),
211
+ generalContext = context, ///
212
+ specificContext = labelContext; ///
220
213
 
221
214
  reconcile((specificContext) => {
222
215
  const metavariable = label.getMetavariable(),
@@ -260,33 +253,31 @@ export default define(class Reference extends Element {
260
253
  let topLevelMetaAssertionUUnifies = false;
261
254
 
262
255
  const label = topLevelMetaAssertion.getLabel(),
263
- labelContext = label.getContext(),
264
256
  referenceString = this.getString(), ///
265
- referenceContext = this.getContext(), ///
266
257
  topLevelMetaAssertionString = topLevelMetaAssertion.getString();
267
258
 
268
- context.trace(`Unifying the '${topLevelMetaAssertionString}' top level meta-assertion with the '${referenceString}' reference...`);
259
+ context.trace(`Unifying the '${topLevelMetaAssertionString}' top level meta-assertion's label with the '${referenceString}' reference...`);
269
260
 
270
- const generalContext = referenceContext, ///
261
+ const labelContext = label.getContext(),
262
+ referenceContext = this.getContext(), ///
263
+ generalContext = referenceContext, ///
271
264
  specificContext = labelContext; ///
272
265
 
273
- join((specificContext) => {
274
- reconcile((specificContext) => {
275
- const metavariable = label.getMetavariable(),
276
- metavariableUnifies = this.unifyMetavariable(metavariable, generalContext, specificContext);
266
+ reconcile((specificContext) => {
267
+ const metavariable = label.getMetavariable(),
268
+ metavariableUnifies = this.unifyMetavariable(metavariable, generalContext, specificContext);
277
269
 
278
- if (metavariableUnifies) {
279
- this.topLevelMetaAssertion = topLevelMetaAssertion;
270
+ if (metavariableUnifies) {
271
+ this.topLevelMetaAssertion = topLevelMetaAssertion;
280
272
 
281
- specificContext.commit(context);
273
+ specificContext.commit(context);
282
274
 
283
- topLevelMetaAssertionUUnifies = true;
284
- }
285
- }, specificContext);
286
- }, specificContext, context);
275
+ topLevelMetaAssertionUUnifies = true;
276
+ }
277
+ }, specificContext);
287
278
 
288
279
  if (topLevelMetaAssertionUUnifies) {
289
- context.debug(`...unified the '${topLevelMetaAssertionString}' top level meta-assertion with the '${referenceString}' reference.`);
280
+ context.debug(`...unified the '${topLevelMetaAssertionString}' top level meta-assertion's label with the '${referenceString}' reference.`);
290
281
  }
291
282
 
292
283
  return topLevelMetaAssertionUUnifies;
@@ -321,8 +312,8 @@ export default define(class Reference extends Element {
321
312
  static fromJSON(json, context) {
322
313
  let reference;
323
314
 
324
- unserialise((json, context) => {
325
- instantiate((context) => {
315
+ instantiate((context) => {
316
+ unserialise((json, context) => {
326
317
  const { string } = json,
327
318
  referenceNode = instantiateReference(string, context),
328
319
  node = referenceNode, ///
@@ -331,8 +322,8 @@ export default define(class Reference extends Element {
331
322
  topLevelMetaAssertion = topLevelMetaAssertionFromReferenceNode(referenceNode, context);
332
323
 
333
324
  reference = new Reference(context, string, node, breakPoint, metavariable, topLevelMetaAssertion);
334
- }, context);
335
- }, json, context);
325
+ }, json, context);
326
+ }, context);
336
327
 
337
328
  return reference;
338
329
  }
@@ -340,14 +331,12 @@ export default define(class Reference extends Element {
340
331
  static fromReferenceString(referenceString, context) {
341
332
  let reference;
342
333
 
343
- posit((context) => {
344
- ablate((context) => {
345
- instantiate((context) => {
346
- const string = referenceString, ///
347
- referenceNode = instantiateReference(string, context);
334
+ ablate((context) => {
335
+ instantiate((context) => {
336
+ const string = referenceString, ///
337
+ referenceNode = instantiateReference(string, context);
348
338
 
349
- reference = referenceFromReferenceNode(referenceNode, context);
350
- }, context);
339
+ reference = referenceFromReferenceNode(referenceNode, context);
351
340
  }, context);
352
341
  }, context);
353
342