occam-verify-cli 1.0.521 → 1.0.524
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/action/verify.js +2 -2
- package/lib/context/release.js +3 -3
- package/lib/element/combinator.js +4 -4
- package/lib/element/conclusion.js +5 -5
- package/lib/element/declaration/combinator.js +5 -5
- package/lib/element/declaration/complexType.js +17 -17
- package/lib/element/declaration/constructor.js +13 -13
- package/lib/element/declaration/metavariable.js +14 -14
- package/lib/element/declaration/simpleType.js +14 -14
- package/lib/element/declaration/typePrefix.js +12 -12
- package/lib/element/declaration/variable.js +10 -10
- package/lib/element/deduction.js +5 -5
- package/lib/element/hypothesis.js +4 -4
- package/lib/element/proofAssertion/premise.js +7 -7
- package/lib/element/proofAssertion/step.js +5 -5
- package/lib/element/proofAssertion/supposition.js +11 -11
- package/lib/element/rule.js +5 -5
- package/lib/element/topLevelAssertion/axiom.js +9 -9
- package/lib/element/topLevelAssertion/conjecture.js +5 -5
- package/lib/element/topLevelAssertion/lemma.js +5 -5
- package/lib/element/topLevelAssertion/theorem.js +5 -5
- package/lib/element/topLevelMetaAssertion/metaLemma.js +5 -5
- package/lib/element/topLevelMetaAssertion/metatheorem.js +5 -5
- package/lib/utilities/customGrammar.js +5 -5
- package/lib/utilities/nominal.js +3 -3
- package/package.json +3 -3
- package/src/action/verify.js +1 -1
- package/src/context/release.js +1 -1
- package/src/element/combinator.js +3 -4
- package/src/element/conclusion.js +4 -5
- package/src/element/declaration/combinator.js +3 -4
- package/src/element/declaration/complexType.js +16 -20
- package/src/element/declaration/constructor.js +12 -15
- package/src/element/declaration/metavariable.js +12 -15
- package/src/element/declaration/simpleType.js +13 -16
- package/src/element/declaration/typePrefix.js +10 -12
- package/src/element/declaration/variable.js +10 -12
- package/src/element/deduction.js +4 -5
- package/src/element/hypothesis.js +3 -4
- package/src/element/proofAssertion/premise.js +6 -7
- package/src/element/proofAssertion/step.js +4 -5
- package/src/element/proofAssertion/supposition.js +10 -13
- package/src/element/rule.js +3 -4
- package/src/element/topLevelAssertion/axiom.js +8 -10
- package/src/element/topLevelAssertion/conjecture.js +3 -4
- package/src/element/topLevelAssertion/lemma.js +5 -6
- package/src/element/topLevelAssertion/theorem.js +3 -4
- package/src/element/topLevelMetaAssertion/metaLemma.js +3 -4
- package/src/element/topLevelMetaAssertion/metatheorem.js +3 -4
- package/src/utilities/customGrammar.js +1 -1
- package/src/utilities/nominal.js +1 -1
|
@@ -18,29 +18,28 @@ export default define(class TypePrefixDeclaration extends Declaration {
|
|
|
18
18
|
verifyTypePrefix() {
|
|
19
19
|
let typePrefixVerifies = false;
|
|
20
20
|
|
|
21
|
-
const
|
|
22
|
-
context = this.getContext(),
|
|
21
|
+
const context = this.getContext(),
|
|
23
22
|
typePrefixString = this.typePrefix.getString();
|
|
24
23
|
|
|
25
|
-
context.trace(`Verifying the '${typePrefixString}' type prefix
|
|
24
|
+
context.trace(`Verifying the '${typePrefixString}' type prefix...`);
|
|
26
25
|
|
|
27
26
|
const typePrefix = context.getTypePrefix();
|
|
28
27
|
|
|
29
28
|
if (typePrefix !== null) {
|
|
30
|
-
context.trace(`The package already has a '${typePrefixString}' type prefix
|
|
29
|
+
context.trace(`The package already has a '${typePrefixString}' type prefix.`);
|
|
31
30
|
} else {
|
|
32
31
|
|
|
33
32
|
const typePrefixName = this.typePrefix.getName(),
|
|
34
33
|
typePrefixPresent = context.isTypePrefixPresentByTypePrefixName(typePrefixName);
|
|
35
34
|
|
|
36
35
|
if (typePrefixPresent) {
|
|
37
|
-
context.trace(`The '${typePrefixString}' type prefix is already present
|
|
36
|
+
context.trace(`The '${typePrefixString}' type prefix is already present.`);
|
|
38
37
|
} else {
|
|
39
38
|
const nominalTypeName = typePrefixName, ///
|
|
40
39
|
typePresent = context.isTypePresentByNominalTypeName(nominalTypeName);
|
|
41
40
|
|
|
42
41
|
if (typePresent) {
|
|
43
|
-
context.trace(`The '${typePrefixString}' type is already present
|
|
42
|
+
context.trace(`The '${typePrefixString}' type is already present.`);
|
|
44
43
|
} else {
|
|
45
44
|
typePrefixVerifies = true;
|
|
46
45
|
}
|
|
@@ -48,7 +47,7 @@ export default define(class TypePrefixDeclaration extends Declaration {
|
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
if (typePrefixVerifies) {
|
|
51
|
-
context.debug(`...verified the '${typePrefixString}' type prefix
|
|
50
|
+
context.debug(`...verified the '${typePrefixString}' type prefix.`);
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
return typePrefixVerifies;
|
|
@@ -57,11 +56,10 @@ export default define(class TypePrefixDeclaration extends Declaration {
|
|
|
57
56
|
async verify() {
|
|
58
57
|
let verifies = false;
|
|
59
58
|
|
|
60
|
-
const
|
|
61
|
-
context = this.getContext(),
|
|
59
|
+
const context = this.getContext(),
|
|
62
60
|
typePrefixDeclarationString = this.getString(); ///
|
|
63
61
|
|
|
64
|
-
context.trace(`Verifying the '${typePrefixDeclarationString}' type prefix declaration
|
|
62
|
+
context.trace(`Verifying the '${typePrefixDeclarationString}' type prefix declaration...`);
|
|
65
63
|
|
|
66
64
|
const includeRelease = true,
|
|
67
65
|
includeDependencies = false,
|
|
@@ -69,7 +67,7 @@ export default define(class TypePrefixDeclaration extends Declaration {
|
|
|
69
67
|
typesLength = types.length;
|
|
70
68
|
|
|
71
69
|
if (typesLength > 0) {
|
|
72
|
-
context.debug(`Unable to verify the '${typePrefixDeclarationString}' type prefix declaration because types have already been declared
|
|
70
|
+
context.debug(`Unable to verify the '${typePrefixDeclarationString}' type prefix declaration because types have already been declared.`);
|
|
73
71
|
} else {
|
|
74
72
|
const typePrefixVerifies = this.verifyTypePrefix();
|
|
75
73
|
|
|
@@ -81,7 +79,7 @@ export default define(class TypePrefixDeclaration extends Declaration {
|
|
|
81
79
|
}
|
|
82
80
|
|
|
83
81
|
if (verifies) {
|
|
84
|
-
context.debug(`...verified the '${typePrefixDeclarationString}' type prefix declaration
|
|
82
|
+
context.debug(`...verified the '${typePrefixDeclarationString}' type prefix declaration.`);
|
|
85
83
|
}
|
|
86
84
|
|
|
87
85
|
return verifies;
|
|
@@ -18,23 +18,22 @@ export default define(class VariableDeclaration extends Declaration {
|
|
|
18
18
|
verifyVariable() {
|
|
19
19
|
let variableVerifies = false;
|
|
20
20
|
|
|
21
|
-
const
|
|
22
|
-
context = this.getContext(),
|
|
21
|
+
const context = this.getContext(),
|
|
23
22
|
variableString = this.variable.getString();
|
|
24
23
|
|
|
25
|
-
context.trace(`Verifying the '${variableString}' variable
|
|
24
|
+
context.trace(`Verifying the '${variableString}' variable...`);
|
|
26
25
|
|
|
27
26
|
const variableIdentifier = this.variable.getIdentifier(),
|
|
28
27
|
variablePresent = context.isVariablePresentByVariableIdentifier(variableIdentifier);
|
|
29
28
|
|
|
30
29
|
if (variablePresent) {
|
|
31
|
-
context.debug(`The '${variableName}' variable is already present
|
|
30
|
+
context.debug(`The '${variableName}' variable is already present.`);
|
|
32
31
|
} else {
|
|
33
32
|
variableVerifies = true;
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
if ( variableVerifies) {
|
|
37
|
-
context.debug(`...verified the '${variableString}' variable
|
|
36
|
+
context.debug(`...verified the '${variableString}' variable.`);
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
return variableVerifies;
|
|
@@ -43,8 +42,7 @@ export default define(class VariableDeclaration extends Declaration {
|
|
|
43
42
|
verifyVariableType() {
|
|
44
43
|
let variableTypeVerifies = false;
|
|
45
44
|
|
|
46
|
-
const
|
|
47
|
-
context = this.getContext();
|
|
45
|
+
const context = this.getContext();
|
|
48
46
|
|
|
49
47
|
let type;
|
|
50
48
|
|
|
@@ -52,7 +50,7 @@ export default define(class VariableDeclaration extends Declaration {
|
|
|
52
50
|
|
|
53
51
|
const typeString = type.getString();
|
|
54
52
|
|
|
55
|
-
context.trace(`Verifying the '${typeString}' type
|
|
53
|
+
context.trace(`Verifying the '${typeString}' type...`);
|
|
56
54
|
|
|
57
55
|
const includeSupertypes = false,
|
|
58
56
|
provisional = type.isProvisional(includeSupertypes),
|
|
@@ -63,14 +61,14 @@ export default define(class VariableDeclaration extends Declaration {
|
|
|
63
61
|
const typePresent = (type !== null)
|
|
64
62
|
|
|
65
63
|
if (!typePresent) {
|
|
66
|
-
context.debug(`The '${typeString}' type is not present
|
|
64
|
+
context.debug(`The '${typeString}' type is not present.`);
|
|
67
65
|
} else {
|
|
68
66
|
const typeComparesToProvisional = type.compareProvisional(provisional);
|
|
69
67
|
|
|
70
68
|
if (!typeComparesToProvisional) {
|
|
71
69
|
provisional ?
|
|
72
|
-
context.debug(`The '${typeString}' type is present but not provisional
|
|
73
|
-
context.debug(`The '${typeString}' type is present but provisional
|
|
70
|
+
context.debug(`The '${typeString}' type is present but not provisional.`) :
|
|
71
|
+
context.debug(`The '${typeString}' type is present but provisional.`);
|
|
74
72
|
} else {
|
|
75
73
|
this.variable.setType(type);
|
|
76
74
|
|
|
@@ -79,7 +77,7 @@ export default define(class VariableDeclaration extends Declaration {
|
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
if (variableTypeVerifies) {
|
|
82
|
-
context.debug(`...verified the '${typeString}' type
|
|
80
|
+
context.debug(`...verified the '${typeString}' type.`);
|
|
83
81
|
}
|
|
84
82
|
|
|
85
83
|
return variableTypeVerifies;
|
package/src/element/deduction.js
CHANGED
|
@@ -20,10 +20,9 @@ export default define(class Deduction extends Element {
|
|
|
20
20
|
verify(context) {
|
|
21
21
|
let verifies = false;
|
|
22
22
|
|
|
23
|
-
const
|
|
24
|
-
deductionString = this.getString(); ///
|
|
23
|
+
const deductionString = this.getString(); ///
|
|
25
24
|
|
|
26
|
-
context.trace(`Verifying the '${deductionString}' deduction
|
|
25
|
+
context.trace(`Verifying the '${deductionString}' deduction...`);
|
|
27
26
|
|
|
28
27
|
if (this.statement !== null) {
|
|
29
28
|
attempt((context) => {
|
|
@@ -38,11 +37,11 @@ export default define(class Deduction extends Element {
|
|
|
38
37
|
}
|
|
39
38
|
}, context);
|
|
40
39
|
} else {
|
|
41
|
-
context.debug(`Unable to verify the '${deductionString}' deduction because it is nonsense
|
|
40
|
+
context.debug(`Unable to verify the '${deductionString}' deduction because it is nonsense.`);
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
if (verifies) {
|
|
45
|
-
context.debug(`...verified the '${deductionString}' deduction
|
|
44
|
+
context.debug(`...verified the '${deductionString}' deduction.`);
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
return verifies;
|
|
@@ -57,11 +57,10 @@ export default define(class Hypothesis extends Element {
|
|
|
57
57
|
compareProofAssertion(proofAssertion, context) {
|
|
58
58
|
let comparesToProofAssertion = false;
|
|
59
59
|
|
|
60
|
-
const
|
|
61
|
-
hypothesisString = this.getString(), ///
|
|
60
|
+
const hypothesisString = this.getString(), ///
|
|
62
61
|
proofAssertionString = proofAssertion.getString();
|
|
63
62
|
|
|
64
|
-
context.trace(`Is the '${hypothesisString}' hypothesis equal to the '${proofAssertionString}' proof assertion
|
|
63
|
+
context.trace(`Is the '${hypothesisString}' hypothesis equal to the '${proofAssertionString}' proof assertion...`);
|
|
65
64
|
|
|
66
65
|
const proofAssertionStatement = proofAssertion.getStatement(),
|
|
67
66
|
statementEqualToStepStatement = this.statement.isEqualTo(proofAssertionStatement);
|
|
@@ -71,7 +70,7 @@ export default define(class Hypothesis extends Element {
|
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
if (comparesToProofAssertion) {
|
|
74
|
-
context.trace(`...the '${hypothesisString}' hypothesis is equal to the '${proofAssertionString}' proof assertion
|
|
73
|
+
context.trace(`...the '${hypothesisString}' hypothesis is equal to the '${proofAssertionString}' proof assertion.`);
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
return comparesToProofAssertion;
|
|
@@ -37,7 +37,7 @@ export default define(class Premise extends ProofAssertion {
|
|
|
37
37
|
const node = this.getNode(),
|
|
38
38
|
premiseString = this.getString(); ///
|
|
39
39
|
|
|
40
|
-
context.trace(`Verifying the '${premiseString}' premise
|
|
40
|
+
context.trace(`Verifying the '${premiseString}' premise...`);
|
|
41
41
|
|
|
42
42
|
const statement = this.getStatement(),
|
|
43
43
|
procedureCall = this.getProcedureCall();
|
|
@@ -74,11 +74,11 @@ export default define(class Premise extends ProofAssertion {
|
|
|
74
74
|
}
|
|
75
75
|
}, context);
|
|
76
76
|
} else {
|
|
77
|
-
context.debug(`Unable to verify the '${premiseString}' premise because it is nonsense
|
|
77
|
+
context.debug(`Unable to verify the '${premiseString}' premise because it is nonsense.`);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
if (verifies) {
|
|
81
|
-
context.debug(`...verified the '${premiseString}' premise
|
|
81
|
+
context.debug(`...verified the '${premiseString}' premise.`);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
return verifies;
|
|
@@ -202,11 +202,10 @@ export default define(class Premise extends ProofAssertion {
|
|
|
202
202
|
unifySubproof(subproof, substitutions, context) {
|
|
203
203
|
let subproofUnifies = false;
|
|
204
204
|
|
|
205
|
-
const
|
|
206
|
-
premiseString = this.getString(),
|
|
205
|
+
const premiseString = this.getString(),
|
|
207
206
|
subproofString = subproof.getString();
|
|
208
207
|
|
|
209
|
-
context.trace(`Unifying the '${subproofString}' subproof with the '${premiseString}' premise
|
|
208
|
+
context.trace(`Unifying the '${subproofString}' subproof with the '${premiseString}' premise...`);
|
|
210
209
|
|
|
211
210
|
const specificContext = context; ///
|
|
212
211
|
|
|
@@ -236,7 +235,7 @@ export default define(class Premise extends ProofAssertion {
|
|
|
236
235
|
}
|
|
237
236
|
|
|
238
237
|
if (subproofUnifies) {
|
|
239
|
-
context.debug(`...unified the '${subproofString}' subproof with the '${premiseString}' premise
|
|
238
|
+
context.debug(`...unified the '${subproofString}' subproof with the '${premiseString}' premise.`);
|
|
240
239
|
}
|
|
241
240
|
|
|
242
241
|
return subproofUnifies;
|
|
@@ -59,10 +59,9 @@ export default define(class Step extends ProofAssertion {
|
|
|
59
59
|
verify(assignments, context) {
|
|
60
60
|
let verifies = false;
|
|
61
61
|
|
|
62
|
-
const
|
|
63
|
-
stepString = this.getString(); ///
|
|
62
|
+
const stepString = this.getString(); ///
|
|
64
63
|
|
|
65
|
-
context.trace(`Verifying the '${stepString}' step
|
|
64
|
+
context.trace(`Verifying the '${stepString}' step...`);
|
|
66
65
|
|
|
67
66
|
const statement = this.getStatement();
|
|
68
67
|
|
|
@@ -103,11 +102,11 @@ export default define(class Step extends ProofAssertion {
|
|
|
103
102
|
return verifies;
|
|
104
103
|
}, context);
|
|
105
104
|
} else {
|
|
106
|
-
context.debug(`Unable to verify the '${stepString}' step because it is nonsense
|
|
105
|
+
context.debug(`Unable to verify the '${stepString}' step because it is nonsense.`);
|
|
107
106
|
}
|
|
108
107
|
|
|
109
108
|
if (verifies) {
|
|
110
|
-
context.debug(`...verified the '${stepString}' step
|
|
109
|
+
context.debug(`...verified the '${stepString}' step.`);
|
|
111
110
|
}
|
|
112
111
|
|
|
113
112
|
return verifies;
|
|
@@ -34,10 +34,9 @@ export default define(class Supposition extends ProofAssertion {
|
|
|
34
34
|
verify(context) {
|
|
35
35
|
let verifies = false;
|
|
36
36
|
|
|
37
|
-
const
|
|
38
|
-
suppositionString = this.getString(); ///
|
|
37
|
+
const suppositionString = this.getString(); ///
|
|
39
38
|
|
|
40
|
-
context.trace(`Verifying the '${suppositionString}' supposition
|
|
39
|
+
context.trace(`Verifying the '${suppositionString}' supposition...`);
|
|
41
40
|
|
|
42
41
|
const statement = this.getStatement(),
|
|
43
42
|
procedureCall = this.getProcedureCall();
|
|
@@ -74,11 +73,11 @@ export default define(class Supposition extends ProofAssertion {
|
|
|
74
73
|
}
|
|
75
74
|
}, context);
|
|
76
75
|
} else {
|
|
77
|
-
context.debug(`Unable to verify the '${suppositionString}' supposition because it is nonsense
|
|
76
|
+
context.debug(`Unable to verify the '${suppositionString}' supposition because it is nonsense.`);
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
if (verifies) {
|
|
81
|
-
context.debug(`...verified the '${suppositionString}' supposition
|
|
80
|
+
context.debug(`...verified the '${suppositionString}' supposition.`);
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
return verifies;
|
|
@@ -202,11 +201,10 @@ export default define(class Supposition extends ProofAssertion {
|
|
|
202
201
|
unifySubproof(subproof, substitutions, context) {
|
|
203
202
|
let subproofUnifies = false;
|
|
204
203
|
|
|
205
|
-
const
|
|
206
|
-
subproofString = subproof.getString(),
|
|
204
|
+
const subproofString = subproof.getString(),
|
|
207
205
|
suppositionString = this.getString(); ///
|
|
208
206
|
|
|
209
|
-
context.trace(`Unifying the '${subproofString}' subproof with the '${suppositionString}' supposition
|
|
207
|
+
context.trace(`Unifying the '${subproofString}' subproof with the '${suppositionString}' supposition...`);
|
|
210
208
|
|
|
211
209
|
const specificContext = context; ///
|
|
212
210
|
|
|
@@ -236,7 +234,7 @@ export default define(class Supposition extends ProofAssertion {
|
|
|
236
234
|
}
|
|
237
235
|
|
|
238
236
|
if (subproofUnifies) {
|
|
239
|
-
context.debug(`...unified the '${subproofString}' subproof with the '${suppositionString}' supposition
|
|
237
|
+
context.debug(`...unified the '${subproofString}' subproof with the '${suppositionString}' supposition.`);
|
|
240
238
|
}
|
|
241
239
|
|
|
242
240
|
return subproofUnifies;
|
|
@@ -245,13 +243,12 @@ export default define(class Supposition extends ProofAssertion {
|
|
|
245
243
|
unifySupposition(supposition, substitutions, generalContext, specificContext) {
|
|
246
244
|
let suppositionUnifies;
|
|
247
245
|
|
|
248
|
-
const
|
|
249
|
-
context = specificContext, ///
|
|
246
|
+
const context = specificContext, ///
|
|
250
247
|
specificSupposition = supposition, ///
|
|
251
248
|
generalSuppositionString = this.getString(), ///
|
|
252
249
|
specificSuppositionString = specificSupposition.getString();
|
|
253
250
|
|
|
254
|
-
context.trace(`Unifying the '${specificSuppositionString}' supposition with the '${generalSuppositionString}' supposition
|
|
251
|
+
context.trace(`Unifying the '${specificSuppositionString}' supposition with the '${generalSuppositionString}' supposition...`);
|
|
255
252
|
|
|
256
253
|
const statement = specificSupposition.getStatement(),
|
|
257
254
|
statementUnifies = this.unifyStatement(statement, substitutions, generalContext, specificContext);
|
|
@@ -259,7 +256,7 @@ export default define(class Supposition extends ProofAssertion {
|
|
|
259
256
|
suppositionUnifies = statementUnifies; ///
|
|
260
257
|
|
|
261
258
|
if (suppositionUnifies) {
|
|
262
|
-
context.debug(`...unified the '${specificSuppositionString}' supposition with the '${generalSuppositionString}' supposition
|
|
259
|
+
context.debug(`...unified the '${specificSuppositionString}' supposition with the '${generalSuppositionString}' supposition.`);
|
|
263
260
|
}
|
|
264
261
|
|
|
265
262
|
return suppositionUnifies;
|
package/src/element/rule.js
CHANGED
|
@@ -185,11 +185,10 @@ export default define(class Rule extends Element {
|
|
|
185
185
|
async verify() {
|
|
186
186
|
let verifies = false;
|
|
187
187
|
|
|
188
|
-
const
|
|
189
|
-
context = this.getContext(),
|
|
188
|
+
const context = this.getContext(),
|
|
190
189
|
ruleString = this.getString(); ///
|
|
191
190
|
|
|
192
|
-
context.trace(`Verifying the '${ruleString}' rule
|
|
191
|
+
context.trace(`Verifying the '${ruleString}' rule...`);
|
|
193
192
|
|
|
194
193
|
scope((context) => {
|
|
195
194
|
const labelsVerify = this.verifyLabels();
|
|
@@ -216,7 +215,7 @@ export default define(class Rule extends Element {
|
|
|
216
215
|
|
|
217
216
|
context.addRule(rule);
|
|
218
217
|
|
|
219
|
-
context.debug(`...verified the '${ruleString}' rule
|
|
218
|
+
context.debug(`...verified the '${ruleString}' rule.`);
|
|
220
219
|
}
|
|
221
220
|
|
|
222
221
|
return verifies;
|
|
@@ -57,16 +57,15 @@ export default define(class Axiom extends TopLevelAssertion {
|
|
|
57
57
|
|
|
58
58
|
context = step.getContext();
|
|
59
59
|
|
|
60
|
-
const
|
|
61
|
-
stepString = step.getString(),
|
|
60
|
+
const stepString = step.getString(),
|
|
62
61
|
axiomString = this.getString();
|
|
63
62
|
|
|
64
|
-
context.trace(`Unifying the '${stepString}' step with the '${axiomString}' axiom
|
|
63
|
+
context.trace(`Unifying the '${stepString}' step with the '${axiomString}' axiom...`);
|
|
65
64
|
|
|
66
65
|
const unconditional = this.isUnconditional();
|
|
67
66
|
|
|
68
67
|
if (!unconditional) {
|
|
69
|
-
context.trace(`Unable to unify the '${stepString}' step with the '${axiomString}' axiom because the axiom is not unconditional
|
|
68
|
+
context.trace(`Unable to unify the '${stepString}' step with the '${axiomString}' axiom because the axiom is not unconditional.`);
|
|
70
69
|
} else {
|
|
71
70
|
const statement = step.getStatement(),
|
|
72
71
|
statementUnifiesWithDeduction = this.unifyStatementWithDeduction(statement, substitutions, context);
|
|
@@ -77,7 +76,7 @@ export default define(class Axiom extends TopLevelAssertion {
|
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
if (stepUnifies) {
|
|
80
|
-
context.debug(`...unified the '${stepString}' step with the '${axiomString}' axiom
|
|
79
|
+
context.debug(`...unified the '${stepString}' step with the '${axiomString}' axiom.`);
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
return stepUnifies;
|
|
@@ -86,16 +85,15 @@ export default define(class Axiom extends TopLevelAssertion {
|
|
|
86
85
|
unifySubproof(subproof, substitutions, context) {
|
|
87
86
|
let subproofUnifies = false;
|
|
88
87
|
|
|
89
|
-
const
|
|
90
|
-
axiomString = this.getString(),
|
|
88
|
+
const axiomString = this.getString(),
|
|
91
89
|
subproofString = subproof.getString();
|
|
92
90
|
|
|
93
|
-
context.trace(`Unifying the '${subproofString}' subproof with the '${axiomString}' axiom
|
|
91
|
+
context.trace(`Unifying the '${subproofString}' subproof with the '${axiomString}' axiom...`);
|
|
94
92
|
|
|
95
93
|
const unconditional = this.isUnconditional();
|
|
96
94
|
|
|
97
95
|
if (unconditional) {
|
|
98
|
-
context.trace(`Unable to unify the '${subproofString}' subproof with the '${axiomString}' axiom because the axiom is unconditional
|
|
96
|
+
context.trace(`Unable to unify the '${subproofString}' subproof with the '${axiomString}' axiom because the axiom is unconditional.`);
|
|
99
97
|
} else {
|
|
100
98
|
const lastProofAssertion = subproof.getLastProofAssertion(),
|
|
101
99
|
lastProofAssertionUnifies = this.unifyLastProofAssertion(lastProofAssertion, substitutions, context);
|
|
@@ -111,7 +109,7 @@ export default define(class Axiom extends TopLevelAssertion {
|
|
|
111
109
|
}
|
|
112
110
|
|
|
113
111
|
if (subproofUnifies) {
|
|
114
|
-
context.debug(`...unified the '${subproofString}' subproof with the '${axiomString}' axiom
|
|
112
|
+
context.debug(`...unified the '${subproofString}' subproof with the '${axiomString}' axiom.`);
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
return subproofUnifies;
|
|
@@ -8,11 +8,10 @@ export default define(class Conjecture extends TopLevelAssertion {
|
|
|
8
8
|
async verify() {
|
|
9
9
|
let verifies;
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
context = this.getContext(),
|
|
11
|
+
const context = this.getContext(),
|
|
13
12
|
conjectureString = this.getString(); ///
|
|
14
13
|
|
|
15
|
-
context.trace(`Verifying the '${conjectureString}' conjecture
|
|
14
|
+
context.trace(`Verifying the '${conjectureString}' conjecture...`);
|
|
16
15
|
|
|
17
16
|
verifies = super.verify();
|
|
18
17
|
|
|
@@ -21,7 +20,7 @@ export default define(class Conjecture extends TopLevelAssertion {
|
|
|
21
20
|
|
|
22
21
|
context.addConjecture(conjecture);
|
|
23
22
|
|
|
24
|
-
context.debug(`...verified the '${conjectureString}' conjecture
|
|
23
|
+
context.debug(`...verified the '${conjectureString}' conjecture.`);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
return verifies;
|
|
@@ -8,13 +8,12 @@ export default define(class Lemma extends TopLevelAssertion {
|
|
|
8
8
|
async verify() {
|
|
9
9
|
let verifies;
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
context = this.getContext(),
|
|
11
|
+
const context = this.getContext(),
|
|
13
12
|
lemmaString = this.getString(); ///
|
|
14
13
|
|
|
15
14
|
(lemmaString === null) ?
|
|
16
|
-
context.trace(`Verifying a lemma
|
|
17
|
-
context.trace(`Verifying the '${lemmaString}' lemma
|
|
15
|
+
context.trace(`Verifying a lemma...`) :
|
|
16
|
+
context.trace(`Verifying the '${lemmaString}' lemma...`);
|
|
18
17
|
|
|
19
18
|
verifies = super.verify();
|
|
20
19
|
|
|
@@ -24,8 +23,8 @@ export default define(class Lemma extends TopLevelAssertion {
|
|
|
24
23
|
context.addLemma(lemma);
|
|
25
24
|
|
|
26
25
|
(lemmaString === null) ?
|
|
27
|
-
context.debug(`...verified a lemma
|
|
28
|
-
context.debug(`...verified the '${lemmaString}' lemma
|
|
26
|
+
context.debug(`...verified a lemma.`) :
|
|
27
|
+
context.debug(`...verified the '${lemmaString}' lemma.`);
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
return verifies;
|
|
@@ -8,11 +8,10 @@ export default define(class Theorem extends TopLevelAssertion {
|
|
|
8
8
|
async verify() {
|
|
9
9
|
let verifies;
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
context = this.getContext(),
|
|
11
|
+
const context = this.getContext(),
|
|
13
12
|
theoremString = this.getString(); ///
|
|
14
13
|
|
|
15
|
-
context.trace(`Verifying the '${theoremString}' theorem
|
|
14
|
+
context.trace(`Verifying the '${theoremString}' theorem...`);
|
|
16
15
|
|
|
17
16
|
verifies = super.verify();
|
|
18
17
|
|
|
@@ -21,7 +20,7 @@ export default define(class Theorem extends TopLevelAssertion {
|
|
|
21
20
|
|
|
22
21
|
context.addTheorem(theorem);
|
|
23
22
|
|
|
24
|
-
context.debug(`...verified the '${theoremString}' theorem
|
|
23
|
+
context.debug(`...verified the '${theoremString}' theorem.`);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
return verifies;
|
|
@@ -8,11 +8,10 @@ export default define(class MetaLemma extends TopLevelMetaAssertion {
|
|
|
8
8
|
async verify() {
|
|
9
9
|
let verifies;
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
context = this.getContext(),
|
|
11
|
+
const context = this.getContext(),
|
|
13
12
|
metaLemmaString = this.getString(); ///
|
|
14
13
|
|
|
15
|
-
context.trace(`Verifying the '${metaLemmaString}' meta-lemma
|
|
14
|
+
context.trace(`Verifying the '${metaLemmaString}' meta-lemma...`);
|
|
16
15
|
|
|
17
16
|
verifies = super.verify();
|
|
18
17
|
|
|
@@ -21,7 +20,7 @@ export default define(class MetaLemma extends TopLevelMetaAssertion {
|
|
|
21
20
|
|
|
22
21
|
context.addMetatheorem(metaTheorem);
|
|
23
22
|
|
|
24
|
-
context.debug(`...verified the '${metaLemmaString}' meta-lemma
|
|
23
|
+
context.debug(`...verified the '${metaLemmaString}' meta-lemma.`);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
return verifies;
|
|
@@ -8,11 +8,10 @@ export default define(class Metatheorem extends TopLevelMetaAssertion {
|
|
|
8
8
|
async verify() {
|
|
9
9
|
let verifies;
|
|
10
10
|
|
|
11
|
-
const
|
|
12
|
-
context = this.getContext(),
|
|
11
|
+
const context = this.getContext(),
|
|
13
12
|
metaLemmaString = this.getString(); ///
|
|
14
13
|
|
|
15
|
-
context.trace(`Verifying the '${metaLemmaString}' metatheorem
|
|
14
|
+
context.trace(`Verifying the '${metaLemmaString}' metatheorem...`);
|
|
16
15
|
|
|
17
16
|
verifies = super.verify();
|
|
18
17
|
|
|
@@ -21,7 +20,7 @@ export default define(class Metatheorem extends TopLevelMetaAssertion {
|
|
|
21
20
|
|
|
22
21
|
context.addMetatheorem(metaTheorem);
|
|
23
22
|
|
|
24
|
-
context.debug(`...verified the '${metaLemmaString}' metatheorem
|
|
23
|
+
context.debug(`...verified the '${metaLemmaString}' metatheorem.`);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
return verifies;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { CustomGrammar, CombinedCustomGrammar } from "occam-
|
|
3
|
+
import { CustomGrammar, CombinedCustomGrammar } from "occam-nominal";
|
|
4
4
|
|
|
5
5
|
export function customGrammarFromNameAndEntries(name, entries) {
|
|
6
6
|
const termBNF = entries.getTermBNF(),
|
package/src/utilities/nominal.js
CHANGED