occam-verify-cli 1.0.31 → 1.0.33

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.
@@ -8,8 +8,9 @@ import { equalityFromStatement,
8
8
  typeAssertionFromStatement,
9
9
  definedAssertionFromStatement,
10
10
  propertyAssertionFromStatement,
11
+ subproofAssertionFromStatement,
11
12
  containedAssertionFromStatement,
12
- subproofAssertionFromStatement } from "../../utilities/context";
13
+ satisfyingAssertionFromStatement } from "../../utilities/context";
13
14
 
14
15
  function unifyWithBracketedCombinator(statement, assignments, stated, context) {
15
16
  stated = true; ///
@@ -172,6 +173,28 @@ function verifyAsPropertyAssertion(statement, assignments, stated, context) {
172
173
  return verifiedAsPropertyAssertion;
173
174
  }
174
175
 
176
+ function verifyAsSubproofAssertion(statement, assignments, stated, context) {
177
+ let verifiedAsSubproofAssertion = false;
178
+
179
+ const subproofAssertion = subproofAssertionFromStatement(statement, context);
180
+
181
+ if (subproofAssertion !== null) {
182
+ const statementString = statement.getString();
183
+
184
+ context.trace(`Verifying the '${statementString}' statement as a subproof assertion...`);
185
+
186
+ const subproofAssertionVerified = subproofAssertion.verify(assignments, stated, context);
187
+
188
+ verifiedAsSubproofAssertion = subproofAssertionVerified; ///
189
+
190
+ if (verifiedAsSubproofAssertion) {
191
+ context.debug(`...verified the '${statementString}' statement as a subproof assertion.`);
192
+ }
193
+ }
194
+
195
+ return verifiedAsSubproofAssertion;
196
+ }
197
+
175
198
  function verifyAsContainedAssertion(statement, assignments, stated, context) {
176
199
  let verifiedAsContainedAssertion = false;
177
200
 
@@ -187,33 +210,33 @@ function verifyAsContainedAssertion(statement, assignments, stated, context) {
187
210
  verifiedAsContainedAssertion = containedAssertionVerified; ///
188
211
 
189
212
  if (verifiedAsContainedAssertion) {
190
- context.debug(`...verified the '${statementString}' statement as a defined assertion.`);
213
+ context.debug(`...verified the '${statementString}' statement as a contained assertion.`);
191
214
  }
192
215
  }
193
216
 
194
217
  return verifiedAsContainedAssertion;
195
218
  }
196
219
 
197
- function verifyAsSubproofAssertion(statement, assignments, stated, context) {
198
- let verifiedAsSubproofAssertion = false;
220
+ function verifyAsSatisfyingAssertion(statement, assignments, stated, context) {
221
+ let verifiedAsSatisfyingAssertion = false;
199
222
 
200
- const subproofAssertion = subproofAssertionFromStatement(statement, context);
223
+ const satisfyingAssertion = satisfyingAssertionFromStatement(statement, context);
201
224
 
202
- if (subproofAssertion !== null) {
225
+ if (satisfyingAssertion !== null) {
203
226
  const statementString = statement.getString();
204
227
 
205
- context.trace(`Verifying the '${statementString}' statement as a subproof assertion...`);
228
+ context.trace(`Verifying the '${statementString}' statement as a satisfying assertion...`);
206
229
 
207
- const subproofAssertionVerified = subproofAssertion.verify(assignments, stated, context);
230
+ const satisfyingAssertionVerified = satisfyingAssertion.verify(assignments, stated, context);
208
231
 
209
- verifiedAsSubproofAssertion = subproofAssertionVerified; ///
232
+ verifiedAsSatisfyingAssertion = satisfyingAssertionVerified; ///
210
233
 
211
- if (verifiedAsSubproofAssertion) {
212
- context.debug(`...verified the '${statementString}' statement as a subproof assertion.`);
234
+ if (verifiedAsSatisfyingAssertion) {
235
+ context.debug(`...verified the '${statementString}' statement as a defined assertion.`);
213
236
  }
214
237
  }
215
238
 
216
- return verifiedAsSubproofAssertion;
239
+ return verifiedAsSatisfyingAssertion;
217
240
  }
218
241
 
219
242
  const verifyMixins = [
@@ -224,9 +247,10 @@ const verifyMixins = [
224
247
  verifyAsJudgement,
225
248
  verifyAsTypeAssertion,
226
249
  verifyAsDefinedAssertion,
227
- verifyAsContainedAssertion,
228
250
  verifyAsPropertyAssertion,
229
- verifyAsSubproofAssertion
251
+ verifyAsSubproofAssertion,
252
+ verifyAsContainedAssertion,
253
+ verifyAsSatisfyingAssertion
230
254
  ];
231
255
 
232
256
  export default verifyMixins;
@@ -73,6 +73,16 @@ export function propertyAssertionFromStatement(statement, context) {
73
73
  return propertyAssertion;
74
74
  }
75
75
 
76
+ export function subproofAssertionFromStatement(statement, context) {
77
+ context = contextFromStatement(statement, context); ///
78
+
79
+ const { SubproofAssertion } = dom,
80
+ statementNode = statement.getNode(),
81
+ subproofAssertion = SubproofAssertion.fromStatementNode(statementNode, context);
82
+
83
+ return subproofAssertion;
84
+ }
85
+
76
86
  export function containedAssertionFromStatement(statement, context) {
77
87
  context = contextFromStatement(statement, context); ///
78
88
 
@@ -83,14 +93,14 @@ export function containedAssertionFromStatement(statement, context) {
83
93
  return containedAssertion;
84
94
  }
85
95
 
86
- export function subproofAssertionFromStatement(statement, context) {
96
+ export function satisfyingAssertionFromStatement(statement, context) {
87
97
  context = contextFromStatement(statement, context); ///
88
98
 
89
- const { SubproofAssertion } = dom,
99
+ const { SatisfyingAssertion } = dom,
90
100
  statementNode = statement.getNode(),
91
- subproofAssertion = SubproofAssertion.fromStatementNode(statementNode, context);
101
+ satisfyingAssertion = SatisfyingAssertion.fromStatementNode(statementNode, context);
92
102
 
93
- return subproofAssertion;
103
+ return satisfyingAssertion;
94
104
  }
95
105
 
96
106
  function contextFromFrame(frame, context) {