occam-verify-cli 1.0.768 → 1.0.781

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 (108) hide show
  1. package/lib/context/file/nominal.js +11 -11
  2. package/lib/context/illative.js +28 -0
  3. package/lib/context/nested.js +31 -0
  4. package/lib/context/proof.js +242 -0
  5. package/lib/context/thetic.js +28 -0
  6. package/lib/context.js +19 -21
  7. package/lib/element/assertion/contained.js +32 -24
  8. package/lib/element/assertion/defined.js +47 -40
  9. package/lib/element/assertion/property.js +18 -13
  10. package/lib/element/assertion/satisfies.js +12 -9
  11. package/lib/element/assertion/subproof.js +28 -26
  12. package/lib/element/assertion/type.js +14 -12
  13. package/lib/element/assumption.js +40 -50
  14. package/lib/element/combinator/bracketed.js +3 -3
  15. package/lib/element/combinator.js +20 -20
  16. package/lib/element/conclusion.js +33 -29
  17. package/lib/element/constructor.js +19 -18
  18. package/lib/element/deduction.js +33 -29
  19. package/lib/element/equality.js +13 -15
  20. package/lib/element/equivalence.js +59 -52
  21. package/lib/element/equivalences.js +4 -2
  22. package/lib/element/frame.js +74 -53
  23. package/lib/element/hypothesis.js +7 -5
  24. package/lib/element/judgement.js +41 -74
  25. package/lib/element/label.js +22 -22
  26. package/lib/element/metavariable.js +31 -11
  27. package/lib/element/proofAssertion/premise.js +48 -35
  28. package/lib/element/proofAssertion/step.js +77 -22
  29. package/lib/element/proofAssertion/supposition.js +48 -34
  30. package/lib/element/proofAssertion.js +1 -14
  31. package/lib/element/reference.js +80 -53
  32. package/lib/element/signature.js +44 -3
  33. package/lib/element/statement.js +28 -29
  34. package/lib/element/subproof.js +2 -2
  35. package/lib/element/substitution/frame.js +24 -19
  36. package/lib/element/substitution/metaLevel.js +31 -27
  37. package/lib/element/substitution/reference.js +11 -10
  38. package/lib/element/substitution/statement.js +30 -23
  39. package/lib/element/substitution/term.js +11 -10
  40. package/lib/element/term.js +24 -20
  41. package/lib/element/topLevelMetaAssertion.js +2 -2
  42. package/lib/element/variable.js +6 -2
  43. package/lib/process/assign.js +10 -4
  44. package/lib/process/unify.js +8 -8
  45. package/lib/process/validate.js +10 -8
  46. package/lib/utilities/context.js +68 -23
  47. package/lib/utilities/element.js +55 -27
  48. package/lib/utilities/json.js +8 -8
  49. package/lib/utilities/string.js +12 -1
  50. package/lib/utilities/unification.js +14 -12
  51. package/lib/utilities/validation.js +55 -40
  52. package/package.json +4 -4
  53. package/src/context/file/nominal.js +14 -16
  54. package/src/context/illative.js +17 -0
  55. package/src/context/nested.js +21 -0
  56. package/src/context/{scoped.js → proof.js} +65 -51
  57. package/src/context/thetic.js +17 -0
  58. package/src/context.js +30 -36
  59. package/src/element/assertion/contained.js +44 -31
  60. package/src/element/assertion/defined.js +55 -46
  61. package/src/element/assertion/property.js +23 -15
  62. package/src/element/assertion/satisfies.js +15 -10
  63. package/src/element/assertion/subproof.js +34 -31
  64. package/src/element/assertion/type.js +18 -13
  65. package/src/element/assumption.js +40 -69
  66. package/src/element/combinator/bracketed.js +2 -2
  67. package/src/element/combinator.js +23 -29
  68. package/src/element/conclusion.js +37 -40
  69. package/src/element/constructor.js +29 -34
  70. package/src/element/deduction.js +36 -39
  71. package/src/element/equality.js +16 -18
  72. package/src/element/equivalence.js +76 -67
  73. package/src/element/equivalences.js +5 -2
  74. package/src/element/frame.js +96 -65
  75. package/src/element/hypothesis.js +7 -6
  76. package/src/element/judgement.js +45 -45
  77. package/src/element/label.js +25 -31
  78. package/src/element/metavariable.js +48 -21
  79. package/src/element/proofAssertion/premise.js +63 -49
  80. package/src/element/proofAssertion/step.js +47 -26
  81. package/src/element/proofAssertion/supposition.js +64 -50
  82. package/src/element/proofAssertion.js +0 -22
  83. package/src/element/reference.js +119 -80
  84. package/src/element/signature.js +5 -2
  85. package/src/element/statement.js +30 -35
  86. package/src/element/subproof.js +1 -1
  87. package/src/element/substitution/frame.js +27 -26
  88. package/src/element/substitution/metaLevel.js +38 -42
  89. package/src/element/substitution/reference.js +13 -14
  90. package/src/element/substitution/statement.js +35 -33
  91. package/src/element/substitution/term.js +13 -14
  92. package/src/element/term.js +42 -34
  93. package/src/element/topLevelMetaAssertion.js +1 -1
  94. package/src/element/variable.js +8 -1
  95. package/src/process/assign.js +9 -3
  96. package/src/process/unify.js +7 -7
  97. package/src/process/validate.js +9 -8
  98. package/src/utilities/context.js +82 -31
  99. package/src/utilities/element.js +68 -31
  100. package/src/utilities/json.js +13 -13
  101. package/src/utilities/string.js +16 -2
  102. package/src/utilities/unification.js +18 -16
  103. package/src/utilities/validation.js +73 -53
  104. package/lib/context/scoped.js +0 -232
  105. package/lib/utilities/statement.js +0 -78
  106. package/lib/utilities/term.js +0 -17
  107. package/src/utilities/statement.js +0 -74
  108. package/src/utilities/term.js +0 -10
@@ -108,8 +108,8 @@ export function suppositionsStringFromSuppositions(suppositions) {
108
108
  const suppositionString = supposition.getString();
109
109
 
110
110
  suppositionsString = (suppositionsString === null) ?
111
- suppositionString: ///
112
- `${suppositionsString}, ${suppositionString}`;
111
+ suppositionString: ///
112
+ `${suppositionsString}, ${suppositionString}`;
113
113
 
114
114
  return suppositionsString;
115
115
  }, null);
@@ -117,6 +117,20 @@ export function suppositionsStringFromSuppositions(suppositions) {
117
117
  return suppositionsString;
118
118
  }
119
119
 
120
+ export function metaLevelSubstitutionsStringFromMetaLevelSubstitutions(metaLevelSubstitutions) {
121
+ const metaLevelSubstitutionsString = metaLevelSubstitutions.reduce((metaLevelSubstitutionsString, metaLevelSubstitution) => {
122
+ const metaLevelSubstitutionString = metaLevelSubstitution.getString();
123
+
124
+ metaLevelSubstitutionsString = (metaLevelSubstitutionsString === null) ?
125
+ metaLevelSubstitutionString: ///
126
+ `${metaLevelSubstitutionsString}, ${metaLevelSubstitutionString}`;
127
+
128
+ return metaLevelSubstitutionsString;
129
+ }, null);
130
+
131
+ return metaLevelSubstitutionsString;
132
+ }
133
+
120
134
  export function signatureStringFromTerms(terms) {
121
135
  const termsString = termsStringFromTerms(terms),
122
136
  signatureString = `[${termsString}]`;
@@ -4,11 +4,7 @@ import { arrayUtilities } from "necessary";
4
4
 
5
5
  import elements from "../elements";
6
6
 
7
- import { equalityFromStatement,
8
- judgementFromStatement,
9
- typeAssertionFromStatement,
10
- propertyAssertionFromStatement,
11
- satisfiesAssertionFromStatement } from "../utilities/statement";
7
+ import { descend } from "./context";
12
8
 
13
9
  const { backwardsSome } = arrayUtilities;
14
10
 
@@ -49,7 +45,7 @@ async function unifyStatementWithReference(statement, reference, satisfiesAssert
49
45
 
50
46
  context.trace(`Unifying the '${statementString}' statement with the '${referenceString}' reference...`);
51
47
 
52
- const topLevelAssertion = context.findTopLevelAssertionByReference(reference, context);
48
+ const topLevelAssertion = context.findTopLevelAssertionByReference(reference);
53
49
 
54
50
  if (topLevelAssertion !== null) {
55
51
  const subproofOrProofAssertions = context.getSubproofOrProofAssertions(),
@@ -84,16 +80,18 @@ async function unifyStatementWithReference(statement, reference, satisfiesAssert
84
80
  async function unifyStatementAsSatisfiesAssertion(statement, reference, satisfiesAssertion, context) {
85
81
  let statementUnifiesAsSatisfiesAssertion = false;
86
82
 
87
- satisfiesAssertion = satisfiesAssertionFromStatement(statement, context);
83
+ const { SatisfiesAssertion } = elements;
84
+
85
+ satisfiesAssertion = SatisfiesAssertion.fromStatement(statement, context);
88
86
 
89
87
  if (satisfiesAssertion !== null) {
90
88
  const statementString = statement.getString();
91
89
 
92
90
  context.trace(`Unifying the '${statementString}' statement as a satisfies assertion...`);
93
91
 
94
- const stated = true;
95
-
96
- satisfiesAssertion.verifySignature(stated, context);
92
+ descend((context) => {
93
+ satisfiesAssertion.verifySignature(context);
94
+ }, context);
97
95
 
98
96
  if (reference === null) {
99
97
  const subproofOrProofAssertions = context.getSubproofOrProofAssertions();
@@ -106,7 +104,7 @@ async function unifyStatementAsSatisfiesAssertion(statement, reference, satisfie
106
104
  }
107
105
  });
108
106
  } else {
109
- const topLevelAssertion = context.findTopLevelAssertionByReference(reference, context);
107
+ const topLevelAssertion = context.findTopLevelAssertionByReference(reference);
110
108
 
111
109
  if (topLevelAssertion !== null) {
112
110
  reference = satisfiesAssertion.getReference();
@@ -147,7 +145,7 @@ async function unifyStatementWithTopLevelAssertion(statement, reference, satisfi
147
145
  let statementUnifiesWithTopLevelAssertion = false;
148
146
 
149
147
  if (reference !== null) {
150
- const topLevelAssertion = context.findTopLevelAssertionByReference(reference, context);
148
+ const topLevelAssertion = context.findTopLevelAssertionByReference(reference);
151
149
 
152
150
  if (topLevelAssertion !== null) {
153
151
  const statementString = statement.getString(),
@@ -175,7 +173,8 @@ async function unifyStatementAsEquality(statement, reference, satisfiesAssertion
175
173
  let statementUnifiesAEquality = false;
176
174
 
177
175
  if (reference === null) {
178
- const equality = equalityFromStatement(statement, context);
176
+ const { Equality } = elements,
177
+ equality = Equality.fromStatement(statement, context);
179
178
 
180
179
  if (equality !== null) {
181
180
  const statementString = statement.getString();
@@ -201,7 +200,8 @@ async function unifyStatementAsJudgement(statement, reference, satisfiesAssertio
201
200
  let statementUnifiesAsJudgement = false;
202
201
 
203
202
  if (reference === null) {
204
- const judgement = judgementFromStatement(statement, context);
203
+ const { Judgement } = elements,
204
+ judgement = Judgement.fromStatement(statement, context);
205
205
 
206
206
  if (judgement !== null) {
207
207
  const statementString = statement.getString();
@@ -223,7 +223,8 @@ async function unifyStatementAsTypeAssertion(statement, reference, satisfiesAsse
223
223
  let statementUnifiesAsTypeAssertion = false;
224
224
 
225
225
  if (reference === null) {
226
- const typeAssertion = typeAssertionFromStatement(statement, context);
226
+ const { TypeAssertion } = elements,
227
+ typeAssertion = TypeAssertion.fromStatement(statement, context);
227
228
 
228
229
  if (typeAssertion !== null) {
229
230
  const statementString = statement.getString();
@@ -243,7 +244,8 @@ async function unifyStatementAsPropertyAssertion(statement, reference, satisfies
243
244
  let statementUnifiesAsPropertyAssertion = false;
244
245
 
245
246
  if (reference === null) {
246
- const propertyAssertion = propertyAssertionFromStatement(statement, context);
247
+ const { PropertyAssertion } = elements,
248
+ propertyAssertion = PropertyAssertion.fromStatement(statement, context);
247
249
 
248
250
  if (propertyAssertion !== null) {
249
251
  const statementString = statement.getString();
@@ -2,25 +2,17 @@
2
2
 
3
3
  import elements from "../elements";
4
4
 
5
- import { choose } from "./context";
6
- import { variableFromTerm } from "../utilities/term";
5
+ import { choose, descend } from "./context";
7
6
  import { bracketedConstructorFromNothing, bracketedCombinatorFromNothing } from "../utilities/instance";
8
- import { equalityFromStatement,
9
- judgementFromStatement,
10
- metavariableFromStatement,
11
- typeAssertionFromStatement,
12
- definedAssertionFromStatement,
13
- propertyAssertionFromStatement,
14
- subproofAssertionFromStatement,
15
- containedAssertionFromStatement,
16
- satisfiesAssertionFromStatement } from "../utilities/statement";
17
7
 
18
8
  function validateTermAsVariable(term, context, validateForwards) {
19
9
  let termValidatesAsVariable = false;
20
10
 
11
+ const { Variable } = elements;
12
+
21
13
  let variable;
22
14
 
23
- variable = variableFromTerm(term, context);
15
+ variable = Variable.fromTerm(term, context);
24
16
 
25
17
  if (variable !== null) {
26
18
  const termString = term.getString();
@@ -53,11 +45,11 @@ function validateTermAsVariable(term, context, validateForwards) {
53
45
  }
54
46
 
55
47
  function unifyTermWithConstructors(term, context, validateForwards) {
56
- let termUnifiesWithConstructors;
48
+ let termUnifiesWithConstructors = false;
57
49
 
58
50
  const constructors = context.getConstructors();
59
51
 
60
- termUnifiesWithConstructors = constructors.some((constructor) => {
52
+ constructors.some((constructor) => {
61
53
  let termUnifies;
62
54
 
63
55
  choose((context) => {
@@ -69,6 +61,8 @@ function unifyTermWithConstructors(term, context, validateForwards) {
69
61
  }, context);
70
62
 
71
63
  if (termUnifies) {
64
+ termUnifiesWithConstructors = true;
65
+
72
66
  return true;
73
67
  }
74
68
  });
@@ -86,12 +80,14 @@ function unifyTermWithBracketedConstructor(term, context, validateForwards) {
86
80
  return termUnifiesWithBracketedConstructor;
87
81
  }
88
82
 
89
- function validateStatementAsMetavariable(statement, stated, context) {
83
+ function validateStatementAsMetavariable(statement, context) {
90
84
  let statementValidatesAsMetavariable = false;
91
85
 
86
+ const { Metavariable } = elements;
87
+
92
88
  let metavariable;
93
89
 
94
- metavariable = metavariableFromStatement(statement, context);
90
+ metavariable = Metavariable.fromStatement(statement, context);
95
91
 
96
92
  if (metavariable !== null) {
97
93
  const statementString = statement.getString();
@@ -139,43 +135,53 @@ function validateStatementAsMetavariable(statement, stated, context) {
139
135
  return statementValidatesAsMetavariable;
140
136
  }
141
137
 
142
- function unifyStatementWithCombinators(statement, stated, context) {
143
- stated = true; ///
138
+ function unifyStatementWithCombinators(statement, context) {
139
+ let statementUnifiesWithCombinators = false;
140
+
141
+ const combinators = context.getCombinators();
142
+
143
+ combinators.some((combinator) => {
144
+ let statementUnifies;
144
145
 
145
- const combinators = context.getCombinators(),
146
- statementUnifiesWithCombinators = combinators.some((combinator) => {
147
- const unifiesWithCombinator = combinator.unifyStatement(statement, stated, context);
146
+ descend((context) => {
147
+ statementUnifies = combinator.unifyStatement(statement, context);
148
+ }, context);
149
+
150
+ if (statementUnifies) {
151
+ statementUnifiesWithCombinators = true;
148
152
 
149
- if (unifiesWithCombinator) {
150
- return true;
151
- }
152
- });
153
+ return true;
154
+ }
155
+ });
153
156
 
154
157
  return statementUnifiesWithCombinators;
155
158
  }
156
159
 
157
- function unifyStatementWithBracketedCombinator(statement, stated, context) {
158
- stated = true; ///
160
+ function unifyStatementWithBracketedCombinator(statement, context) {
161
+ let statementUnifiesWithBracketedCombinator;
159
162
 
160
- const bracketedCombinator = bracketedCombinatorFromNothing(),
161
- statementUnifiesWithBracketedCombinator = bracketedCombinator.unifyStatement(statement, stated, context);
163
+ const bracketedCombinator = bracketedCombinatorFromNothing();
164
+
165
+ statementUnifiesWithBracketedCombinator = bracketedCombinator.unifyStatement(statement, context);
162
166
 
163
167
  return statementUnifiesWithBracketedCombinator;
164
168
  }
165
169
 
166
- function validateStatementAsEquality(statement, stated, context) {
170
+ function validateStatementAsEquality(statement, context) {
167
171
  let statementValidatesAsEquality = false;
168
172
 
173
+ const { Equality } = elements;
174
+
169
175
  let equality;
170
176
 
171
- equality = equalityFromStatement(statement, context);
177
+ equality = Equality.fromStatement(statement, context);
172
178
 
173
179
  if (equality !== null) {
174
180
  const statementString = statement.getString();
175
181
 
176
182
  context.trace(`Validating the '${statementString}' statement as an equality...`);
177
183
 
178
- equality = equality.validate(stated, context); ///
184
+ equality = equality.validate(context); ///
179
185
 
180
186
  if (equality !== null) {
181
187
  statementValidatesAsEquality = true;
@@ -189,19 +195,21 @@ function validateStatementAsEquality(statement, stated, context) {
189
195
  return statementValidatesAsEquality;
190
196
  }
191
197
 
192
- function validateStatementAsJudgement(statement, stated, context) {
198
+ function validateStatementAsJudgement(statement, context) {
193
199
  let validatesStatementAsJudgement = false;
194
200
 
195
201
  let judgement;
196
202
 
197
- judgement = judgementFromStatement(statement, context);
203
+ const { Judgement } = elements;
204
+
205
+ judgement = Judgement.fromStatement(statement, context);
198
206
 
199
207
  if (judgement !== null) {
200
208
  const statementString = statement.getString();
201
209
 
202
210
  context.trace(`Validating the '${statementString}' statement as a judgement...`);
203
211
 
204
- judgement = judgement.validate(stated, context); ///
212
+ judgement = judgement.validate(context); ///
205
213
 
206
214
  if (judgement !== null) {
207
215
  validatesStatementAsJudgement = true;
@@ -215,19 +223,21 @@ function validateStatementAsJudgement(statement, stated, context) {
215
223
  return validatesStatementAsJudgement;
216
224
  }
217
225
 
218
- function validateStatementAsTypeAssertion(statement, stated, context) {
226
+ function validateStatementAsTypeAssertion(statement, context) {
219
227
  let validatesStatementAsTypeAssertion = false;
220
228
 
229
+ const { TypeAssertion } = elements;
230
+
221
231
  let typeAssertion;
222
232
 
223
- typeAssertion = typeAssertionFromStatement(statement, context);
233
+ typeAssertion = TypeAssertion.fromStatement(statement, context);
224
234
 
225
235
  if (typeAssertion !== null) {
226
236
  const statementString = statement.getString();
227
237
 
228
238
  context.trace(`Validating the '${statementString}' statement as a type assertion...`);
229
239
 
230
- typeAssertion = typeAssertion.validate(stated, context); ///
240
+ typeAssertion = typeAssertion.validate(context); ///
231
241
 
232
242
  if (typeAssertion !== null) {
233
243
  validatesStatementAsTypeAssertion = true;
@@ -241,19 +251,21 @@ function validateStatementAsTypeAssertion(statement, stated, context) {
241
251
  return validatesStatementAsTypeAssertion;
242
252
  }
243
253
 
244
- function validateStatementAsDefinedAssertion(statement, stated, context) {
254
+ function validateStatementAsDefinedAssertion(statement, context) {
245
255
  let validatesStatementAsDefinedAssertion = false;
246
256
 
257
+ const { DefinedAssertion } = elements;
258
+
247
259
  let definedAssertion;
248
260
 
249
- definedAssertion = definedAssertionFromStatement(statement, context);
261
+ definedAssertion = DefinedAssertion.fromStatement(statement, context);
250
262
 
251
263
  if (definedAssertion !== null) {
252
264
  const statementString = statement.getString();
253
265
 
254
266
  context.trace(`Validating the '${statementString}' statement as a defined assertion...`);
255
267
 
256
- definedAssertion = definedAssertion.validate(stated, context); ///
268
+ definedAssertion = definedAssertion.validate(context); ///
257
269
 
258
270
  if (definedAssertion !== null) {
259
271
  validatesStatementAsDefinedAssertion = true;
@@ -267,19 +279,21 @@ function validateStatementAsDefinedAssertion(statement, stated, context) {
267
279
  return validatesStatementAsDefinedAssertion;
268
280
  }
269
281
 
270
- function validateStatementAsPropertyAssertion(statement, stated, context) {
282
+ function validateStatementAsPropertyAssertion(statement, context) {
271
283
  let statementValidatesAsPropertyAssertion = false;
272
284
 
285
+ const { PropertyAssertion } = elements;
286
+
273
287
  let propertyAssertion;
274
288
 
275
- propertyAssertion = propertyAssertionFromStatement(statement, context);
289
+ propertyAssertion = PropertyAssertion.fromStatement(statement, context);
276
290
 
277
291
  if (propertyAssertion !== null) {
278
292
  const statementString = statement.getString();
279
293
 
280
294
  context.trace(`Validating the '${statementString}' statement as a property assertion...`);
281
295
 
282
- propertyAssertion = propertyAssertion.validate(stated, context); ///
296
+ propertyAssertion = propertyAssertion.validate(context); ///
283
297
 
284
298
  if (propertyAssertion !== null) {
285
299
  statementValidatesAsPropertyAssertion = true;
@@ -293,19 +307,21 @@ function validateStatementAsPropertyAssertion(statement, stated, context) {
293
307
  return statementValidatesAsPropertyAssertion;
294
308
  }
295
309
 
296
- function validateStatementAsSubproofAssertion(statement, stated, context) {
310
+ function validateStatementAsSubproofAssertion(statement, context) {
297
311
  let statementValidatesAsSubproofAssertion = false;
298
312
 
313
+ const { SubproofAssertion } = elements;
314
+
299
315
  let subproofAssertion;
300
316
 
301
- subproofAssertion = subproofAssertionFromStatement(statement, context);
317
+ subproofAssertion = SubproofAssertion.fromStatement(statement, context);
302
318
 
303
319
  if (subproofAssertion !== null) {
304
320
  const statementString = statement.getString();
305
321
 
306
322
  context.trace(`Validating the '${statementString}' statement as a subproof assertion...`);
307
323
 
308
- subproofAssertion = subproofAssertion.validate(stated, context); ///
324
+ subproofAssertion = subproofAssertion.validate(context); ///
309
325
 
310
326
  if (subproofAssertion !== null) {
311
327
  statementValidatesAsSubproofAssertion = true;
@@ -319,19 +335,21 @@ function validateStatementAsSubproofAssertion(statement, stated, context) {
319
335
  return statementValidatesAsSubproofAssertion;
320
336
  }
321
337
 
322
- function validateStatementAsContainedAssertion(statement, stated, context) {
338
+ function validateStatementAsContainedAssertion(statement, context) {
323
339
  let validatesStatementAsContainedAssertion = false;
324
340
 
341
+ const { ContainedAssertion } = elements;
342
+
325
343
  let containedAssertion;
326
344
 
327
- containedAssertion = containedAssertionFromStatement(statement, context);
345
+ containedAssertion = ContainedAssertion.fromStatement(statement, context);
328
346
 
329
347
  if (containedAssertion !== null) {
330
348
  const statementString = statement.getString();
331
349
 
332
350
  context.trace(`Validating the '${statementString}' statement as a contained assertion...`);
333
351
 
334
- containedAssertion = containedAssertion.validate(stated, context); ///
352
+ containedAssertion = containedAssertion.validate(context); ///
335
353
 
336
354
  if (containedAssertion !== null) {
337
355
  validatesStatementAsContainedAssertion = true;
@@ -345,19 +363,21 @@ function validateStatementAsContainedAssertion(statement, stated, context) {
345
363
  return validatesStatementAsContainedAssertion;
346
364
  }
347
365
 
348
- function validateStatementAsSatisfiesAssertion(statement, stated, context) {
366
+ function validateStatementAsSatisfiesAssertion(statement, context) {
349
367
  let validatesAStatementsSatisfiesAssertion = false;
350
368
 
369
+ const { SatisfiesAssertion } = elements;
370
+
351
371
  let satisfiesAssertion;
352
372
 
353
- satisfiesAssertion = satisfiesAssertionFromStatement(statement, context);
373
+ satisfiesAssertion = SatisfiesAssertion.fromStatement(statement, context);
354
374
 
355
375
  if (satisfiesAssertion !== null) {
356
376
  const statementString = statement.getString();
357
377
 
358
378
  context.trace(`Validating the '${statementString}' statement as a satisfies assertion...`);
359
379
 
360
- satisfiesAssertion = satisfiesAssertion.validate(stated, context); ///
380
+ satisfiesAssertion = satisfiesAssertion.validate(context); ///
361
381
 
362
382
  if (satisfiesAssertion !== null) {
363
383
  validatesAStatementsSatisfiesAssertion = true;