occam-verify-cli 1.0.715 → 1.0.721

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 (55) hide show
  1. package/lib/context/file/nominal.js +3 -3
  2. package/lib/context.js +10 -8
  3. package/lib/element/assertion/contained.js +1 -8
  4. package/lib/element/assertion/defined.js +1 -8
  5. package/lib/element/assertion/property.js +1 -8
  6. package/lib/element/assertion/satisfies.js +1 -8
  7. package/lib/element/assertion/subproof.js +1 -8
  8. package/lib/element/assertion.js +8 -1
  9. package/lib/element/assumption.js +1 -11
  10. package/lib/element/declaration/metavariable.js +21 -37
  11. package/lib/element/equality.js +2 -2
  12. package/lib/element/frame.js +24 -45
  13. package/lib/element/metavariable.js +91 -36
  14. package/lib/element/proofAssertion/step.js +4 -4
  15. package/lib/element/proofAssertion.js +2 -2
  16. package/lib/element/reference.js +33 -32
  17. package/lib/element/statement.js +1 -18
  18. package/lib/element/substitution/frame.js +1 -8
  19. package/lib/element/substitution/reference.js +1 -8
  20. package/lib/element/substitution/statement.js +1 -8
  21. package/lib/element/substitution/term.js +1 -8
  22. package/lib/element/substitution.js +8 -1
  23. package/lib/element/variable.js +1 -17
  24. package/lib/process/equate.js +5 -5
  25. package/lib/process/unify.js +20 -17
  26. package/lib/process/validate.js +2 -120
  27. package/lib/utilities/element.js +36 -3
  28. package/package.json +1 -1
  29. package/src/context/file/nominal.js +8 -9
  30. package/src/context.js +14 -10
  31. package/src/element/assertion/contained.js +0 -11
  32. package/src/element/assertion/defined.js +0 -11
  33. package/src/element/assertion/property.js +0 -11
  34. package/src/element/assertion/satisfies.js +0 -11
  35. package/src/element/assertion/subproof.js +0 -11
  36. package/src/element/assertion.js +11 -0
  37. package/src/element/assumption.js +1 -18
  38. package/src/element/declaration/metavariable.js +30 -53
  39. package/src/element/equality.js +1 -3
  40. package/src/element/frame.js +31 -62
  41. package/src/element/metavariable.js +129 -43
  42. package/src/element/proofAssertion/step.js +3 -3
  43. package/src/element/proofAssertion.js +1 -3
  44. package/src/element/reference.js +46 -47
  45. package/src/element/statement.js +1 -27
  46. package/src/element/substitution/frame.js +0 -11
  47. package/src/element/substitution/reference.js +0 -11
  48. package/src/element/substitution/statement.js +0 -11
  49. package/src/element/substitution/term.js +0 -11
  50. package/src/element/substitution.js +11 -0
  51. package/src/element/variable.js +0 -25
  52. package/src/process/equate.js +8 -4
  53. package/src/process/unify.js +23 -22
  54. package/src/process/validate.js +2 -168
  55. package/src/utilities/element.js +46 -6
@@ -7,17 +7,17 @@ import elements from "../elements";
7
7
  import { define } from "../elements";
8
8
  import { literally } from "../utilities/context";
9
9
  import { EMPTY_STRING } from "../constants";
10
- import { metaTypeToMetaTypeJSON } from "../utilities/json";
11
10
  import { instantiateMetavariable } from "../process/instantiate";
12
- import { nameFromMetavariableNode } from "../utilities/element";
13
- import { typeFromJSON, metaTypeFromJSON, typeToTypeJSON } from "../utilities/json";
11
+ import { metaTypeFromJSON, metaTypeToMetaTypeJSON } from "../utilities/json";
14
12
  import { unifyMetavariable, unifyMetavariableIntrinsically } from "../process/unify";
13
+ import { nameFromMetavariableNode, termFromMetavariableNode, typeFromMetavariableNode } from "../utilities/element";
15
14
 
16
15
  export default define(class Metavariable extends Element {
17
- constructor(context, string, node, name, type, metaType) {
16
+ constructor(context, string, node, name, term, type, metaType) {
18
17
  super(context, string, node);
19
18
 
20
19
  this.name = name;
20
+ this.term = term;
21
21
  this.type = type;
22
22
  this.metaType = metaType;
23
23
  }
@@ -26,6 +26,10 @@ export default define(class Metavariable extends Element {
26
26
  return this.name;
27
27
  }
28
28
 
29
+ getTerm() {
30
+ return this.term;
31
+ }
32
+
29
33
  getType() {
30
34
  return this.type;
31
35
  }
@@ -34,28 +38,26 @@ export default define(class Metavariable extends Element {
34
38
  return this.metaType;
35
39
  }
36
40
 
37
- setType(type) {
38
- this.type = type;
39
- }
40
-
41
41
  setMetaType(metaType) {
42
42
  this.metaType = metaType;
43
43
  }
44
44
 
45
45
  getMetavariableNode() {
46
46
  const node = this.getNode(),
47
- metavarialbeNode = node; ///
47
+ metavariableNode = node; ///
48
48
 
49
- return metavarialbeNode;
49
+ return metavariableNode;
50
50
  }
51
51
 
52
52
  getMetavariableName() {
53
- const metavarialbeNode = this.getMetavariableNode(),
54
- metavariableName = metavarialbeNode.getMetavariableName();
53
+ const metavariableNode = this.getMetavariableNode(),
54
+ metavariableName = metavariableNode.getMetavariableName();
55
55
 
56
56
  return metavariableName;
57
57
  }
58
58
 
59
+ isMetaTypeEqualTo(metaType) { return this.metaType.isEqualTo(metaType); }
60
+
59
61
  compare(metavariable) {
60
62
  const metavariableName = metavariable.getName(),
61
63
  comparesToMetavariableName = this.compareMetavariableName(metavariableName),
@@ -64,8 +66,6 @@ export default define(class Metavariable extends Element {
64
66
  return comparesToMetavariable;
65
67
  }
66
68
 
67
- isMetaTypeEqualTo(metaType) { return this.metaType.isEqualTo(metaType); }
68
-
69
69
  compareMetavariableName(metavariableName) {
70
70
  const nameMetavariableName = (this.name === metavariableName),
71
71
  comparesToMetavariableName = nameMetavariableName; ///
@@ -85,52 +85,140 @@ export default define(class Metavariable extends Element {
85
85
  return metavariableNodeMatches;
86
86
  }
87
87
 
88
+ verify(context) {
89
+ let verifies = false;
90
+
91
+ const metavariableString = this.getString();
92
+
93
+ context.trace(`Verifying the '${metavariableString}' metavariable...`);
94
+
95
+ const termVerifies = this.verifyTerm(context);
96
+
97
+ if (termVerifies) {
98
+ const typeVerifies = this.verifyType(context);
99
+
100
+ if (typeVerifies) {
101
+ verifies = true;
102
+ }
103
+ }
104
+
105
+ if (verifies) {
106
+ context.debug(`...verified the '${metavariableString}' metavariable.`);
107
+ }
108
+
109
+ return verifies;
110
+ }
111
+
112
+ verifyTerm(context) {
113
+ let termVerifies = true; ///
114
+
115
+ if (this.term !== null) {
116
+ const termString = this.term.getString(),
117
+ metavariableString = this.getString();
118
+
119
+ termVerifies = false;
120
+
121
+ context.trace(`A '${termString}' term is present in the '${metavariableString}' metavariable.`);
122
+ }
123
+
124
+ return termVerifies;
125
+ }
126
+
127
+ verifyType(context) {
128
+ let typeVerifies = true; ///
129
+
130
+ if (this.type !== null) {
131
+ const typeString = this.type.getString(),
132
+ metavariableString = this.getString();
133
+
134
+ context.trace(`Verifying the '${metavariableString}' metavariable's '${typeString}' type...`);
135
+
136
+ const typeName = this.type.getName(),
137
+ typePresent = context.isTypePresentByTypeName(typeName);
138
+
139
+ if (!typePresent) {
140
+ typeVerifies = false;
141
+
142
+ context.error(`Type '${typeName}' is not present.`);
143
+ }
144
+
145
+ if (typeVerifies) {
146
+ context.debug(`...verifieds the '${metavariableString}' metavariable's '${typeString}' type.`);
147
+ }
148
+ }
149
+
150
+ return typeVerifies;
151
+ }
152
+
88
153
  validate(context) {
89
- let validates = false;
154
+ let metavariable = null;
90
155
 
91
156
  const metavariableString = this.getString(); ///
92
157
 
93
158
  context.trace(`Validating the '${metavariableString}' metavariable...`);
94
159
 
95
- const metavariable = this, ///
96
- metavariablePresent = context.isMetavariablePresent(metavariable);
160
+ let validates = false;
161
+
162
+ const termValidates = this.validateTerm(context);
163
+
164
+ if (termValidates) {
165
+ const typeValidates = this.validateType(context);
97
166
 
98
- if (metavariablePresent) {
99
- validates = true;
167
+ if (typeValidates) {
168
+ const metavariableName = this.name, ///
169
+ metavariable = context.findMetavariableByMetavariableName(metavariableName);
170
+
171
+ if (metavariable !== null) {
172
+ const metaType = metavariable.getMetaType();
173
+
174
+ this.metaType = metaType;
175
+ }
176
+
177
+ validates = true;
178
+ }
100
179
  }
101
180
 
102
181
  if (validates) {
103
- context.debug(`...va;idated the '${metavariableString}' metavariable.`);
182
+ metavariable = this; ///
183
+
184
+ context.debug(`...validated the '${metavariableString}' metavariable.`);
104
185
  }
105
186
 
106
- return validates;
187
+ return metavariable;
107
188
  }
108
189
 
109
- validateGivenMetaType(metaType, context) {
110
- let validatesGivenMetaType = false;
190
+ validateTerm(context) {
191
+ let termValidates = true;
111
192
 
112
- const metaTypeString = metaType.getString(),
113
- metavariableString = this.getString(); ///
193
+ if (this.term !== null) {
194
+ const termString = this.term.getString(),
195
+ metavariableString = this.getString();
114
196
 
115
- context.trace(`Validating the '${metavariableString}' metavariable given the '${metaTypeString}' meta-type...`);
197
+ context.trace(`Validating the '${metavariableString}' metavariable's '${termString}' term...`);
116
198
 
117
- let metavariable = this; ///
199
+ termValidates = this.term.validate(context);
118
200
 
119
- metavariable = context.findMetavariable(metavariable);
120
-
121
- if (metavariable !== null) {
122
- const metavariableMetaTypeEqualToMetaType = metavariable.isMetaTypeEqualTo(metaType);
123
-
124
- if (metavariableMetaTypeEqualToMetaType) {
125
- validatesGivenMetaType = true;
201
+ if (termValidates) {
202
+ context.debug(`...validated the '${metavariableString}' metavariable's '${termString}' term.`);
126
203
  }
127
204
  }
128
205
 
129
- if (validatesGivenMetaType) {
130
- context.debug(`...validated the '${metavariableString}' metavariable given the '${metaTypeString}' meta-type.`);
206
+ return termValidates;
207
+ }
208
+
209
+ validateType(context) {
210
+ let typeValidates = true; ///
211
+
212
+ if (this.type !== null) {
213
+ const typeString = this.type.getString(),
214
+ metavariableString = this.getString();
215
+
216
+ typeValidates = false;
217
+
218
+ context.trace(`A '${typeString}' type is present in the '${metavariableString}' metavariable.`);
131
219
  }
132
220
 
133
- return validatesGivenMetaType;
221
+ return typeValidates;
134
222
  }
135
223
 
136
224
  unifyFrame(frame, generalContext, specificContext) {
@@ -438,14 +526,11 @@ export default define(class Metavariable extends Element {
438
526
  }
439
527
 
440
528
  toJSON() {
441
- const typeJSON = typeToTypeJSON(this.type),
442
- metaTypeJSON = metaTypeToMetaTypeJSON(this.metaType),
443
- type = typeJSON, ///
529
+ const metaTypeJSON = metaTypeToMetaTypeJSON(this.metaType),
444
530
  metaType = metaTypeJSON, ///
445
531
  string = this.getString(), ///
446
532
  json = {
447
533
  string,
448
- type,
449
534
  metaType
450
535
  };
451
536
 
@@ -460,9 +545,10 @@ export default define(class Metavariable extends Element {
460
545
  metavariableNode = instantiateMetavariable(string, context),
461
546
  node = metavariableNode, ///
462
547
  name = nameFromMetavariableNode(metavariableNode, context),
463
- type = typeFromJSON(json, context),
548
+ term = termFromMetavariableNode(metavariableNode, context),
549
+ type = typeFromMetavariableNode(metavariableNode, context),
464
550
  metaType = metaTypeFromJSON(json, context),
465
- metavariable = new Metavariable(context, string, node, name, type, metaType);
551
+ metavariable = new Metavariable(context, string, node, name, term, type, metaType);
466
552
 
467
553
  return metavariable;
468
554
  }, context);
@@ -133,7 +133,7 @@ export default define(class Step extends ProofAssertion {
133
133
  }
134
134
 
135
135
  validateReference(context) {
136
- let referenceValidates = true;
136
+ let referenceValidates = true; ///
137
137
 
138
138
  if (this.reference !== null) {
139
139
  const stepString = this.getString(), ///
@@ -167,8 +167,8 @@ export default define(class Step extends ProofAssertion {
167
167
  const stated = true,
168
168
  satisfiesAssertion = this.satisfiesAssertion.validate(stated, context);
169
169
 
170
- if (satisfiesAssertion !== null) {
171
- satisfiesAssertionValidates = true;
170
+ if (satisfiesAssertion === null) {
171
+ satisfiesAssertionValidates = false;
172
172
  }
173
173
 
174
174
  if (satisfiesAssertionValidates) {
@@ -38,9 +38,7 @@ export default class ProofAssertion extends Element {
38
38
 
39
39
  const leftStatement = statement, ///
40
40
  rightStatement = this.statement, ///
41
- leftStatementNode = leftStatement.getNode(),
42
- rightStatementNode = rightStatement.getNode(),
43
- statementsEquate = equateStatements(leftStatementNode, rightStatementNode, context);
41
+ statementsEquate = equateStatements(leftStatement, rightStatement, context);
44
42
 
45
43
  if (statementsEquate) {
46
44
  comparesToStatement = true;
@@ -125,20 +125,41 @@ export default define(class Reference extends Element {
125
125
  } else {
126
126
  let validates = false;
127
127
 
128
- if (!validates) {
129
- const metavariableValidates = this.validateMetavariable(context);
130
-
131
- if (metavariableValidates) {
132
- validates = true;
133
- }
134
- }
135
-
136
- if (!validates) {
137
- const reference = this, ///
138
- labelPresent = context.isLabelPresentByReference(reference);
139
-
140
- if (labelPresent) {
141
- validates = true;
128
+ const metavariableValidates = this.validateMetavariable(context);
129
+
130
+ if (metavariableValidates) {
131
+ const referenceMetaTypeName = REFERENCE_META_TYPE_NAME,
132
+ referenceMetaType = context.findMetaTypeByMetaTypeName(referenceMetaTypeName),
133
+ metaType = this.metavariable.getMetaType();
134
+
135
+ if (metaType === null) {
136
+ const reference = this, ///
137
+ labelPresent = context.isLabelPresentByReference(reference);
138
+
139
+ if (labelPresent) {
140
+ validates = true;
141
+ } else {
142
+ context.debug(`There is no label for the '${referenceString}' reference.`);
143
+ }
144
+ } else {
145
+ const metavariableMetaTypeEqualToReferenceMetaType = this.metavariable.isMetaTypeEqualTo(referenceMetaType);
146
+
147
+ if (metavariableMetaTypeEqualToReferenceMetaType) {
148
+ const reference = this, ///
149
+ metavariablePresent = context.isMetavariablePresentByReference(reference);
150
+
151
+ if (metavariablePresent) {
152
+ validates = true;
153
+ } else {
154
+ context.debug(`There is no metavariable for the '${referenceString}' reference.`);
155
+ }
156
+ } else {
157
+ const metaTypeString = metaType.getString(),
158
+ metavariableString = this.metavariable.getString(),
159
+ reerenceMetaTypeString = referenceMetaType.getString();
160
+
161
+ context.debug(`The '${referenceString}' reference's '${metavariableString}' metavariable's '${metaTypeString}' meta-type should be the '${reerenceMetaTypeString}' meta-type.`);
162
+ }
142
163
  }
143
164
  }
144
165
 
@@ -162,44 +183,19 @@ export default define(class Reference extends Element {
162
183
 
163
184
  context.trace(`Validating the '${referenceString}' reference's '${metavariableString}' metavariable...'`);
164
185
 
165
- const metaTypeName = REFERENCE_META_TYPE_NAME,
166
- referenceMetaType = context.findMetaTypeByMetaTypeName(metaTypeName),
167
- metaType = referenceMetaType, ///
168
- metavariable = context.findMetavariable(this.metavariable);
186
+ const metavariable = this.metavariable.validate(context);
169
187
 
170
188
  if (metavariable !== null) {
171
- const metavariableValidatesGivenMetaType = metavariable.validateGivenMetaType(metaType, context);
172
-
173
- if (metavariableValidatesGivenMetaType) {
174
- metavariableValidates = true;
175
- }
176
- } else {
177
- context.debug(`The '${metavariableString}' metavariable is not present.`);
178
- }
179
-
180
- return metavariableValidates;
181
- }
182
-
183
- validateAsMetavariable(context) {
184
- let validatesAsMetavariable = false;
185
-
186
- const referenceString = this.getString(); ///
189
+ this.metavariable = metavariable;
187
190
 
188
- context.trace(`Validating the '${referenceString}' reference as a metavaraible...`);
189
-
190
- const metavariable = this.getMetavariable(),
191
- metavariableName = metavariable.getName(),
192
- metavariablePresent = context.isMetavariablePresentByMetavariableName(metavariableName);
193
-
194
- if (metavariablePresent) {
195
- validatesAsMetavariable = true;
191
+ metavariableValidates = true;
196
192
  }
197
193
 
198
- if (validatesAsMetavariable) {
199
- context.debug(`...validated the '${referenceString}' reference as a metavaraible.`);
194
+ if (metavariableValidates) {
195
+ context.debug(`...validated the '${referenceString}' reference's '${metavariableString}' metavariable.'`);
200
196
  }
201
197
 
202
- return validatesAsMetavariable;
198
+ return metavariableValidates;
203
199
  }
204
200
 
205
201
  unifyLabel(label, context) {
@@ -301,8 +297,11 @@ export default define(class Reference extends Element {
301
297
  const { string } = json,
302
298
  referenceNode = instantiateReference(string, context),
303
299
  node = referenceNode, ///
304
- metavariable = metavariableFromReferenceNode(referenceNode, context),
305
- reference = new Reference(context, string, node, metavariable);
300
+ metavariable = metavariableFromReferenceNode(referenceNode, context);
301
+
302
+ context = null;
303
+
304
+ const reference = new Reference(context, string, node, metavariable);
306
305
 
307
306
  return reference;
308
307
  }, context);
@@ -8,7 +8,6 @@ import { literally } from "../utilities/context";
8
8
  import { unifyStatement } from "../process/unify";
9
9
  import { validateStatements } from "../utilities/validation";
10
10
  import { instantiateStatement } from "../process/instantiate";
11
- import { STATEMENT_META_TYPE_NAME } from "../metaTypeNames";
12
11
 
13
12
  const { match, backwardsSome } = arrayUtilities;
14
13
 
@@ -209,31 +208,6 @@ export default define(class Statement extends Element {
209
208
  return statement;
210
209
  }
211
210
 
212
- validateGivenMetaType(metaType, stated, context) {
213
- let validatesGivenMetaType = false;
214
-
215
- const metaTypeString = metaType.getString(),
216
- statementString = this.getString(); ///
217
-
218
- context.trace(`Validating the '${statementString}' statement given the '${metaTypeString}' meta-type...`);
219
-
220
- const metaTypeName = metaType.getName();
221
-
222
- if (metaTypeName === STATEMENT_META_TYPE_NAME) {
223
- const statement = this.validate(stated, context)
224
-
225
- if (statement !== null) {
226
- validatesGivenMetaType = true;
227
- }
228
- }
229
-
230
- if (validatesGivenMetaType) {
231
- context.debug(`...validated the '${statementString}' statement given the '${metaTypeString}' meta-type.`);
232
- }
233
-
234
- return validatesGivenMetaType;
235
- }
236
-
237
211
  unifySubproof(subproof, generalContext, specificContext) {
238
212
  let subproofUnifies = false;
239
213
 
@@ -338,7 +312,7 @@ export default define(class Statement extends Element {
338
312
  }
339
313
 
340
314
  toJSON() {
341
- const string = this.getString(), ///
315
+ const string = this.getString(),
342
316
  json = {
343
317
  string
344
318
  };
@@ -170,17 +170,6 @@ export default define(class FrameSubstitution extends Substitution {
170
170
  return replacementFrameValidates;
171
171
  }
172
172
 
173
- toJSON() {
174
- const { name } = this.constructor,
175
- string = this.getString(),
176
- json = {
177
- name,
178
- string
179
- };
180
-
181
- return json;
182
- }
183
-
184
173
  static name = "FrameSubstitution";
185
174
 
186
175
  static fromJSON(json, context) {
@@ -164,17 +164,6 @@ export default define(class ReferenceSubstitution extends Substitution {
164
164
  return replacementReferenceValidates;
165
165
  }
166
166
 
167
- toJSON() {
168
- const { name } = this.constructor,
169
- string = this.getString(),
170
- json = {
171
- name,
172
- string
173
- };
174
-
175
- return json;
176
- }
177
-
178
167
  static name = "ReferenceSubstitution";
179
168
 
180
169
  static fromJSON(json, context) {
@@ -319,17 +319,6 @@ export default define(class StatementSubstitution extends Substitution {
319
319
  }
320
320
  }
321
321
 
322
- toJSON() {
323
- const { name } = this.constructor,
324
- string = this.getString(),
325
- json = {
326
- name,
327
- string
328
- };
329
-
330
- return json;
331
- }
332
-
333
322
  static name = "StatementSubstitution";
334
323
 
335
324
  static fromJSON(json, context) {
@@ -179,17 +179,6 @@ export default define(class TermSubstitution extends Substitution {
179
179
  return replacementTermValidates;
180
180
  }
181
181
 
182
- toJSON() {
183
- const { name } = this.constructor,
184
- string = this.getString(),
185
- json = {
186
- name,
187
- string
188
- };
189
-
190
- return json;
191
- }
192
-
193
182
  static name = "TermSubstitution";
194
183
 
195
184
  static fromJSON(json, context) {
@@ -165,4 +165,15 @@ export default class Substitution extends Element {
165
165
 
166
166
  return resolved;
167
167
  }
168
+
169
+ toJSON() {
170
+ const { name } = this.constructor,
171
+ string = this.getString(),
172
+ json = {
173
+ name,
174
+ string
175
+ };
176
+
177
+ return json;
178
+ }
168
179
  }
@@ -95,31 +95,6 @@ export default define(class Variable extends Element {
95
95
  return validates;
96
96
  }
97
97
 
98
- validateType(context) {
99
- let typeValidates = false;
100
-
101
- const typeString = this.type.getString();
102
-
103
- context.trace(`Validating the '${typeString}' type...`);
104
-
105
- const prefixedTypeName = this.type.getPrefixedName(),
106
- type = context.findTypeByPrefixedTypeName(prefixedTypeName);
107
-
108
- if (type === null) {
109
- context.debug(`The '${typeString}' type is not present.`);
110
- } else {
111
- this.type = type; ///
112
-
113
- typeValidates = true;
114
- }
115
-
116
- if (typeValidates) {
117
- context.debug(`...validated the '${typeString}' type.`);
118
- }
119
-
120
- return typeValidates;
121
- }
122
-
123
98
  unifyTerm(term, generalContext, specificContext) {
124
99
  let termUnifies = false;
125
100
 
@@ -63,10 +63,12 @@ class EquationalPass extends EquivalencePass {
63
63
 
64
64
  const equationalPass = new EquationalPass();
65
65
 
66
- export function equateTerms(leftTermNode, rightTermNode, context) {
66
+ export function equateTerms(leftTerm, rightTerm, context) {
67
67
  let termsEquate;
68
68
 
69
- const leftNode = leftTermNode, ///
69
+ const leftTermNode = leftTerm.getNode(),
70
+ rightTermNode = rightTerm.getNode(),
71
+ leftNode = leftTermNode, ///
70
72
  rightNode = rightTermNode, ///
71
73
  success = equationalPass.run(leftNode, rightNode, context);
72
74
 
@@ -75,10 +77,12 @@ export function equateTerms(leftTermNode, rightTermNode, context) {
75
77
  return termsEquate;
76
78
  }
77
79
 
78
- export function equateStatements(leftStatementNode, rightStatementNode, context) {
80
+ export function equateStatements(leftStatement, rightStatement, context) {
79
81
  let statementsEquate;
80
82
 
81
- const leftNode = leftStatementNode, ///
83
+ const leftStatementNode = leftStatement.getNode(),
84
+ rightStatementNode = rightStatement.getNode(),
85
+ leftNode = leftStatementNode, ///
82
86
  rightNode = rightStatementNode, ///
83
87
  success = equationalPass.run(leftNode, rightNode, context);
84
88