occam-verify-cli 1.0.826 → 1.0.828
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/element/declaration/combinator.js +5 -6
- package/lib/element/declaration/complexType.js +23 -24
- package/lib/element/declaration/constructor.js +8 -9
- package/lib/element/declaration/metavariable.js +8 -9
- package/lib/element/declaration/simpleType.js +17 -18
- package/lib/element/declaration/typePrefix.js +5 -6
- package/lib/element/declaration/variable.js +8 -9
- package/lib/element/error.js +3 -3
- package/lib/element/proofAssertion/premise.js +5 -5
- package/lib/element/proofAssertion/step.js +3 -3
- package/lib/element/proofAssertion/supposition.js +5 -5
- package/lib/element/rule.js +8 -9
- package/lib/element/section.js +3 -3
- package/lib/element/topLevelAssertion/axiom.js +3 -4
- package/lib/element/topLevelAssertion/conjecture.js +3 -4
- package/lib/element/topLevelAssertion/lemma.js +3 -4
- package/lib/element/topLevelAssertion/theorem.js +3 -4
- package/lib/element/topLevelAssertion.js +3 -3
- package/lib/element/topLevelMetaAssertion/metaLemma.js +3 -4
- package/lib/element/topLevelMetaAssertion/metatheorem.js +3 -4
- package/lib/element/topLevelMetaAssertion.js +6 -6
- package/lib/process/verify.js +17 -17
- package/lib/utilities/element.js +80 -38
- package/package.json +1 -1
- package/src/element/declaration/combinator.js +4 -7
- package/src/element/declaration/complexType.js +22 -31
- package/src/element/declaration/constructor.js +7 -11
- package/src/element/declaration/metavariable.js +7 -11
- package/src/element/declaration/simpleType.js +17 -24
- package/src/element/declaration/typePrefix.js +4 -7
- package/src/element/declaration/variable.js +7 -11
- package/src/element/error.js +2 -3
- package/src/element/proofAssertion/premise.js +4 -4
- package/src/element/proofAssertion/step.js +2 -2
- package/src/element/proofAssertion/supposition.js +4 -4
- package/src/element/rule.js +7 -11
- package/src/element/section.js +2 -3
- package/src/element/topLevelAssertion/axiom.js +2 -4
- package/src/element/topLevelAssertion/conjecture.js +2 -4
- package/src/element/topLevelAssertion/lemma.js +2 -4
- package/src/element/topLevelAssertion/theorem.js +2 -4
- package/src/element/topLevelAssertion.js +2 -3
- package/src/element/topLevelMetaAssertion/metaLemma.js +2 -4
- package/src/element/topLevelMetaAssertion/metatheorem.js +2 -4
- package/src/element/topLevelMetaAssertion.js +5 -7
- package/src/process/verify.js +16 -16
- package/src/utilities/element.js +133 -70
|
@@ -49,11 +49,9 @@ export default define(class Axiom extends TopLevelAssertion {
|
|
|
49
49
|
return comparesToSignature;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
async verify() {
|
|
52
|
+
async verify(context) {
|
|
53
53
|
let verifies;
|
|
54
54
|
|
|
55
|
-
const context = this.getContext();
|
|
56
|
-
|
|
57
55
|
await this.break(context);
|
|
58
56
|
|
|
59
57
|
const axiomString = this.getString(); ///
|
|
@@ -63,7 +61,7 @@ export default define(class Axiom extends TopLevelAssertion {
|
|
|
63
61
|
const signatureVerifies = this.verifySignature();
|
|
64
62
|
|
|
65
63
|
if (signatureVerifies) {
|
|
66
|
-
verifies = await super.verify();
|
|
64
|
+
verifies = await super.verify(context);
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
if (verifies) {
|
|
@@ -12,18 +12,16 @@ export default define(class Conjecture extends TopLevelAssertion {
|
|
|
12
12
|
return conjectureNode;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
async verify() {
|
|
15
|
+
async verify(context) {
|
|
16
16
|
let verifies;
|
|
17
17
|
|
|
18
|
-
const context = this.getContext();
|
|
19
|
-
|
|
20
18
|
await this.break(context);
|
|
21
19
|
|
|
22
20
|
const conjectureString = this.getString(); ///
|
|
23
21
|
|
|
24
22
|
context.trace(`Verifying the '${conjectureString}' conjecture...`);
|
|
25
23
|
|
|
26
|
-
verifies = await super.verify();
|
|
24
|
+
verifies = await super.verify(context);
|
|
27
25
|
|
|
28
26
|
if (verifies) {
|
|
29
27
|
const conjecture = this; ///
|
|
@@ -12,11 +12,9 @@ export default define(class Lemma extends TopLevelAssertion {
|
|
|
12
12
|
return lemmaNode;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
async verify() {
|
|
15
|
+
async verify(context) {
|
|
16
16
|
let verifies;
|
|
17
17
|
|
|
18
|
-
const context = this.getContext();
|
|
19
|
-
|
|
20
18
|
await this.break(context);
|
|
21
19
|
|
|
22
20
|
const lemmaString = this.getString(); ///
|
|
@@ -25,7 +23,7 @@ export default define(class Lemma extends TopLevelAssertion {
|
|
|
25
23
|
context.trace(`Verifying a lemma...`) :
|
|
26
24
|
context.trace(`Verifying the '${lemmaString}' lemma...`);
|
|
27
25
|
|
|
28
|
-
verifies = await super.verify();
|
|
26
|
+
verifies = await super.verify(context);
|
|
29
27
|
|
|
30
28
|
if (verifies) {
|
|
31
29
|
const lemma = this; ///
|
|
@@ -12,18 +12,16 @@ export default define(class Theorem extends TopLevelAssertion {
|
|
|
12
12
|
return theoremNode;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
async verify() {
|
|
15
|
+
async verify(context) {
|
|
16
16
|
let verifies;
|
|
17
17
|
|
|
18
|
-
const context = this.getContext();
|
|
19
|
-
|
|
20
18
|
await this.break(context);
|
|
21
19
|
|
|
22
20
|
const theoremString = this.getString(); ///
|
|
23
21
|
|
|
24
22
|
context.trace(`Verifying the '${theoremString}' theorem...`);
|
|
25
23
|
|
|
26
|
-
verifies = await super.verify();
|
|
24
|
+
verifies = await super.verify(context);
|
|
27
25
|
|
|
28
26
|
if (verifies) {
|
|
29
27
|
const theorem = this; ///
|
|
@@ -120,11 +120,10 @@ export default class TopLevelAssertion extends Element {
|
|
|
120
120
|
return correlatesToHypotheses;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
async verify() {
|
|
123
|
+
async verify(context) {
|
|
124
124
|
let verifies = false;
|
|
125
125
|
|
|
126
|
-
const
|
|
127
|
-
topLevelAssertionString = this.getString(); ///
|
|
126
|
+
const topLevelAssertionString = this.getString(); ///
|
|
128
127
|
|
|
129
128
|
context.trace(`Verifying the '${topLevelAssertionString}' top level assertion...`);
|
|
130
129
|
|
|
@@ -12,18 +12,16 @@ export default define(class MetaLemma extends TopLevelMetaAssertion {
|
|
|
12
12
|
return metaLemmaNode;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
async verify() {
|
|
15
|
+
async verify(context) {
|
|
16
16
|
let verifies;
|
|
17
17
|
|
|
18
|
-
const context = this.getContext();
|
|
19
|
-
|
|
20
18
|
await this.break(context);
|
|
21
19
|
|
|
22
20
|
const metaLemmaString = this.getString(); ///
|
|
23
21
|
|
|
24
22
|
context.trace(`Verifying the '${metaLemmaString}' meta-lemma...`);
|
|
25
23
|
|
|
26
|
-
verifies = super.verify();
|
|
24
|
+
verifies = super.verify(context);
|
|
27
25
|
|
|
28
26
|
if (verifies) {
|
|
29
27
|
const metaTheorem = this; ///
|
|
@@ -12,18 +12,16 @@ export default define(class Metatheorem extends TopLevelMetaAssertion {
|
|
|
12
12
|
return metatheoremNode;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
async verify() {
|
|
15
|
+
async verify(context) {
|
|
16
16
|
let verifies;
|
|
17
17
|
|
|
18
|
-
const context = this.getContext();
|
|
19
|
-
|
|
20
18
|
await this.break(context);
|
|
21
19
|
|
|
22
20
|
const metaLemmaString = this.getString(); ///
|
|
23
21
|
|
|
24
22
|
context.trace(`Verifying the '${metaLemmaString}' metatheorem...`);
|
|
25
23
|
|
|
26
|
-
verifies = super.verify();
|
|
24
|
+
verifies = super.verify(context);
|
|
27
25
|
|
|
28
26
|
if (verifies) {
|
|
29
27
|
const metaTheorem = this; ///
|
|
@@ -95,16 +95,15 @@ export default class TopLevelMetaAssertion extends Element {
|
|
|
95
95
|
return comparesToReference;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
async verify() {
|
|
98
|
+
async verify(context) {
|
|
99
99
|
let verifies = false;
|
|
100
100
|
|
|
101
|
-
const
|
|
102
|
-
topLevelMetaAssertionString = this.getString(); ///
|
|
101
|
+
const topLevelMetaAssertionString = this.getString(); ///
|
|
103
102
|
|
|
104
103
|
context.trace(`Verifying the '${topLevelMetaAssertionString}' top level meta assertion...`);
|
|
105
104
|
|
|
106
105
|
await enclose(async (context) => {
|
|
107
|
-
const labelVerifies = this.verifyLabel();
|
|
106
|
+
const labelVerifies = this.verifyLabel(context);
|
|
108
107
|
|
|
109
108
|
if (labelVerifies) {
|
|
110
109
|
const suppositionsVerify = await this.verifySuppositions(context);
|
|
@@ -130,11 +129,10 @@ export default class TopLevelMetaAssertion extends Element {
|
|
|
130
129
|
return verifies;
|
|
131
130
|
}
|
|
132
131
|
|
|
133
|
-
verifyLabel() {
|
|
132
|
+
verifyLabel(context) {
|
|
134
133
|
let labelVerifies;
|
|
135
134
|
|
|
136
|
-
const
|
|
137
|
-
topLevelMetaAssertionString = this.getString(), ///
|
|
135
|
+
const topLevelMetaAssertionString = this.getString(), ///
|
|
138
136
|
labelString = this.label.getString();
|
|
139
137
|
|
|
140
138
|
context.trace(`Verifying the '${topLevelMetaAssertionString}' top level meta-assertion's '${labelString}' label...`);
|
package/src/process/verify.js
CHANGED
|
@@ -46,7 +46,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
46
46
|
let success = false;
|
|
47
47
|
|
|
48
48
|
const error = errorFromErrorNode(errorNode, context),
|
|
49
|
-
errorVerifies = await error.verify();
|
|
49
|
+
errorVerifies = await error.verify(context);
|
|
50
50
|
|
|
51
51
|
if (errorVerifies) {
|
|
52
52
|
success = true;
|
|
@@ -61,7 +61,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
61
61
|
let success = false;
|
|
62
62
|
|
|
63
63
|
const rule = ruleFromRuleNode(ruleNode, context),
|
|
64
|
-
ruleVerifies = await rule.verify();
|
|
64
|
+
ruleVerifies = await rule.verify(context);
|
|
65
65
|
|
|
66
66
|
if (ruleVerifies) {
|
|
67
67
|
success = true;
|
|
@@ -76,7 +76,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
76
76
|
let success = false;
|
|
77
77
|
|
|
78
78
|
const axiom = axiomFromAxiomNode(axiomNode, context),
|
|
79
|
-
axiomVerifies = await axiom.verify();
|
|
79
|
+
axiomVerifies = await axiom.verify(context);
|
|
80
80
|
|
|
81
81
|
if (axiomVerifies) {
|
|
82
82
|
success = true;
|
|
@@ -91,7 +91,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
91
91
|
let success = false;
|
|
92
92
|
|
|
93
93
|
const lemma = lemmaFromLemmaNode(lemmaNode, context),
|
|
94
|
-
lemmaVerifies = await lemma.verify();
|
|
94
|
+
lemmaVerifies = await lemma.verify(context);
|
|
95
95
|
|
|
96
96
|
if (lemmaVerifies) {
|
|
97
97
|
success = true;
|
|
@@ -106,7 +106,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
106
106
|
let success = false;
|
|
107
107
|
|
|
108
108
|
const section = sectionFromSectionNode(sectionNode, context),
|
|
109
|
-
sectionVerifies = await section.verify();
|
|
109
|
+
sectionVerifies = await section.verify(context);
|
|
110
110
|
|
|
111
111
|
if (sectionVerifies) {
|
|
112
112
|
success = true;
|
|
@@ -121,7 +121,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
121
121
|
let success = false;
|
|
122
122
|
|
|
123
123
|
const theorem = theoremFromTheoremNode(theoremNode, context),
|
|
124
|
-
theoremVerifies = await theorem.verify();
|
|
124
|
+
theoremVerifies = await theorem.verify(context);
|
|
125
125
|
|
|
126
126
|
if (theoremVerifies) {
|
|
127
127
|
success = true;
|
|
@@ -136,7 +136,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
136
136
|
let success = false;
|
|
137
137
|
|
|
138
138
|
const metaLemma = metaLemmaFromMetaLemmaNode(metaLemmaNode, context),
|
|
139
|
-
metaLemmaVerifies = await metaLemma.verify();
|
|
139
|
+
metaLemmaVerifies = await metaLemma.verify(context);
|
|
140
140
|
|
|
141
141
|
if (metaLemmaVerifies) {
|
|
142
142
|
success = true;
|
|
@@ -151,7 +151,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
151
151
|
let success = false;
|
|
152
152
|
|
|
153
153
|
const conjecture = conjectureFromConjectureNode(conjectureNode, context),
|
|
154
|
-
conjectureVerifies = await conjecture.verify();
|
|
154
|
+
conjectureVerifies = await conjecture.verify(context);
|
|
155
155
|
|
|
156
156
|
if (conjectureVerifies) {
|
|
157
157
|
success = true;
|
|
@@ -166,7 +166,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
166
166
|
let success = false;
|
|
167
167
|
|
|
168
168
|
const metatheorem = metatheoremFromMetatheoremNode(metatheoremNode, context),
|
|
169
|
-
metatheoremVerifies = await metatheorem.verify();
|
|
169
|
+
metatheoremVerifies = await metatheorem.verify(context);
|
|
170
170
|
|
|
171
171
|
if (metatheoremVerifies) {
|
|
172
172
|
success = true;
|
|
@@ -181,7 +181,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
181
181
|
let success = false;
|
|
182
182
|
|
|
183
183
|
const variableDeclaration = variableDeclarationFromVariableDeclarationNode(variableDeclarationNode, context),
|
|
184
|
-
variableDeclarationVerifies = await variableDeclaration.verify();
|
|
184
|
+
variableDeclarationVerifies = await variableDeclaration.verify(context);
|
|
185
185
|
|
|
186
186
|
if (variableDeclarationVerifies) {
|
|
187
187
|
success = true;
|
|
@@ -196,7 +196,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
196
196
|
let success = false;
|
|
197
197
|
|
|
198
198
|
const simpleTypeDeclaration = simpleTypeDeclarationFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context),
|
|
199
|
-
simpleTypeDeclarationVerifies = await simpleTypeDeclaration.verify();
|
|
199
|
+
simpleTypeDeclarationVerifies = await simpleTypeDeclaration.verify(context);
|
|
200
200
|
|
|
201
201
|
if (simpleTypeDeclarationVerifies) {
|
|
202
202
|
success = true;
|
|
@@ -211,7 +211,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
211
211
|
let success = false;
|
|
212
212
|
|
|
213
213
|
const typePrefixDeclaration = typePrefixDeclarationFromTypePrefixDeclarationNode(typePrefixDeclarationNode, context),
|
|
214
|
-
typePrefixDeclarationVerifies = await typePrefixDeclaration.verify();
|
|
214
|
+
typePrefixDeclarationVerifies = await typePrefixDeclaration.verify(context);
|
|
215
215
|
|
|
216
216
|
if (typePrefixDeclarationVerifies) {
|
|
217
217
|
success = true;
|
|
@@ -226,7 +226,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
226
226
|
let success = false;
|
|
227
227
|
|
|
228
228
|
const combinatorDeclaration = combinatorDeclarationFromCombinatorDeclarationNode(combinatorDeclarationNode, context),
|
|
229
|
-
combinatorDeclarationVerifies = await combinatorDeclaration.verify();
|
|
229
|
+
combinatorDeclarationVerifies = await combinatorDeclaration.verify(context);
|
|
230
230
|
|
|
231
231
|
if (combinatorDeclarationVerifies) {
|
|
232
232
|
success = true;
|
|
@@ -241,7 +241,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
241
241
|
let success = false;
|
|
242
242
|
|
|
243
243
|
const constructorDeclaration = constructorDeclarationFromConstructorDeclarationNode(constructorDeclarationNode, context),
|
|
244
|
-
constructorDeclarationVerifies = await constructorDeclaration.verify();
|
|
244
|
+
constructorDeclarationVerifies = await constructorDeclaration.verify(context);
|
|
245
245
|
|
|
246
246
|
if (constructorDeclarationVerifies) {
|
|
247
247
|
success = true;
|
|
@@ -256,7 +256,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
256
256
|
let success = false;
|
|
257
257
|
|
|
258
258
|
const complexTypeDeclaration = complexTypeDeclarationFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context),
|
|
259
|
-
complexTypeDeclarationVerifies = await complexTypeDeclaration.verify();
|
|
259
|
+
complexTypeDeclarationVerifies = await complexTypeDeclaration.verify(context);
|
|
260
260
|
|
|
261
261
|
if (complexTypeDeclarationVerifies) {
|
|
262
262
|
success = true;
|
|
@@ -271,7 +271,7 @@ class TopLevelPass extends AsyncPass {
|
|
|
271
271
|
let success = false;
|
|
272
272
|
|
|
273
273
|
const metavariableDeclaration = metavariableDeclarationFromMetavariableDeclarationNode(metavariableDeclarationNode, context),
|
|
274
|
-
metavariableDeclarationVerifies = await metavariableDeclaration.verify();
|
|
274
|
+
metavariableDeclarationVerifies = await metavariableDeclaration.verify(context);
|
|
275
275
|
|
|
276
276
|
if (metavariableDeclarationVerifies) {
|
|
277
277
|
success = true;
|