occam-verify-cli 1.0.448 → 1.0.472
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/constants.js +13 -5
- package/lib/context/ephemeral.js +270 -0
- package/lib/context/file.js +136 -128
- package/lib/context/liminal.js +120 -0
- package/lib/context/literal.js +92 -0
- package/lib/context/nominal.js +15 -1
- package/lib/context/release.js +68 -9
- package/lib/context/scoped.js +322 -0
- package/lib/context/synthetic.js +133 -0
- package/lib/element/assertion/contained.js +66 -66
- package/lib/element/assertion/defined.js +32 -32
- package/lib/element/assertion/property.js +39 -39
- package/lib/element/assertion/satisfies.js +22 -22
- package/lib/element/assumption.js +71 -87
- package/lib/element/combinator/bracketed.js +1 -10
- package/lib/element/conclusion.js +19 -15
- package/lib/element/constructor/bracketed.js +1 -10
- package/lib/element/constructor.js +2 -2
- package/lib/element/declaration/combinator.js +1 -2
- package/lib/element/declaration/metavariable.js +3 -3
- package/lib/element/declaration/variable.js +3 -3
- package/lib/element/deduction.js +26 -20
- package/lib/element/derivation.js +3 -3
- package/lib/element/equality.js +5 -5
- package/lib/element/equivalence.js +112 -107
- package/lib/element/equivalences.js +24 -10
- package/lib/element/error.js +3 -3
- package/lib/element/frame.js +73 -62
- package/lib/element/hypothesis.js +2 -2
- package/lib/element/judgement.js +40 -60
- package/lib/element/metaType.js +4 -4
- package/lib/element/metavariable.js +49 -38
- package/lib/element/parameter.js +13 -5
- package/lib/element/procedureCall.js +16 -16
- package/lib/element/proof.js +14 -13
- package/lib/element/proofAssertion/premise.js +319 -0
- package/lib/element/proofAssertion/step.js +309 -0
- package/lib/element/proofAssertion/supposition.js +333 -0
- package/lib/element/proofAssertion.js +20 -10
- package/lib/element/propertyRelation.js +2 -2
- package/lib/element/reference.js +72 -30
- package/lib/element/rule.js +26 -28
- package/lib/element/section.js +5 -5
- package/lib/element/signature.js +9 -6
- package/lib/element/statement.js +44 -36
- package/lib/element/subproof.js +18 -17
- package/lib/element/substitution/frame.js +86 -49
- package/lib/element/substitution/reference.js +101 -19
- package/lib/element/substitution/statement.js +128 -105
- package/lib/element/substitution/term.js +93 -57
- package/lib/element/substitution.js +20 -69
- package/lib/element/substitutions.js +49 -34
- package/lib/element/term.js +41 -30
- package/lib/element/topLevelAssertion/axiom.js +331 -0
- package/lib/element/{conjecture.js → topLevelAssertion/conjecture.js} +10 -10
- package/lib/element/{lemma.js → topLevelAssertion/lemma.js} +9 -9
- package/lib/element/{theorem.js → topLevelAssertion/theorem.js} +8 -8
- package/lib/element/topLevelAssertion.js +434 -0
- package/lib/element/{metaLemma.js → topLevelMetaAssertion/metaLemma.js} +8 -8
- package/lib/element/{metatheorem.js → topLevelMetaAssertion/metatheorem.js} +8 -8
- package/lib/element/topLevelMetaAssertion.js +293 -0
- package/lib/element/type.js +4 -4
- package/lib/element/variable.js +48 -40
- package/lib/index.js +3 -3
- package/lib/main.js +3 -3
- package/lib/metaTypes.js +18 -15
- package/lib/node/frame.js +2 -2
- package/lib/node/metavariable.js +4 -4
- package/lib/node/parameter.js +28 -7
- package/lib/node/proofAssertion/premise.js +116 -0
- package/lib/node/proofAssertion/step.js +152 -0
- package/lib/node/proofAssertion/supposition.js +116 -0
- package/lib/node/{premise.js → proofAssertion.js} +11 -18
- package/lib/node/statement.js +2 -2
- package/lib/node/substitution/frame.js +9 -31
- package/lib/node/substitution/reference.js +137 -0
- package/lib/node/substitution/statement.js +9 -31
- package/lib/node/substitution/term.js +9 -23
- package/lib/node/{axiom.js → topLevelAssertion/axiom.js} +7 -7
- package/lib/node/{conjecture.js → topLevelAssertion/conjecture.js} +7 -7
- package/lib/node/{lemma.js → topLevelAssertion/lemma.js} +7 -7
- package/lib/node/{theorem.js → topLevelAssertion/theorem.js} +7 -7
- package/lib/node/{axiomLemmaTheoremConjecture.js → topLevelAssertion.js} +9 -9
- package/lib/node/{metaLemma.js → topLevelMetaAssertion/metaLemma.js} +7 -7
- package/lib/node/{metatheorem.js → topLevelMetaAssertion/metatheorem.js} +7 -7
- package/lib/node/{metaLemmaMetaTheorem.js → topLevelMetaAssertion.js} +9 -9
- package/lib/nonTerminalNodeMap.js +15 -14
- package/lib/preamble.js +10 -10
- package/lib/process/instantiate.js +6 -21
- package/lib/process/unify.js +11 -10
- package/lib/tokenTypes.js +22 -0
- package/lib/types.js +3 -3
- package/lib/utilities/bnf.js +5 -5
- package/lib/utilities/context.js +63 -0
- package/lib/utilities/element.js +235 -408
- package/lib/utilities/instance.js +12 -34
- package/lib/utilities/json.js +3 -2
- package/lib/utilities/string.js +56 -21
- package/lib/utilities/unification.js +38 -32
- package/lib/utilities/validation.js +47 -50
- package/package.json +2 -2
- package/src/constants.js +12 -1
- package/src/context/ephemeral.js +257 -0
- package/src/context/file.js +108 -116
- package/src/context/liminal.js +67 -0
- package/src/context/literal.js +51 -0
- package/src/context/nominal.js +12 -0
- package/src/context/release.js +48 -8
- package/src/context/{local.js → scoped.js} +43 -125
- package/src/context/synthetic.js +60 -0
- package/src/element/assertion/contained.js +49 -47
- package/src/element/assertion/defined.js +29 -27
- package/src/element/assertion/property.js +35 -35
- package/src/element/assertion/satisfies.js +19 -18
- package/src/element/assumption.js +71 -93
- package/src/element/combinator/bracketed.js +0 -7
- package/src/element/conclusion.js +25 -24
- package/src/element/constructor/bracketed.js +0 -7
- package/src/element/constructor.js +1 -1
- package/src/element/declaration/combinator.js +0 -1
- package/src/element/declaration/metavariable.js +2 -2
- package/src/element/declaration/variable.js +5 -5
- package/src/element/deduction.js +33 -31
- package/src/element/derivation.js +2 -2
- package/src/element/equality.js +4 -4
- package/src/element/equivalence.js +115 -135
- package/src/element/equivalences.js +9 -7
- package/src/element/error.js +4 -2
- package/src/element/frame.js +80 -65
- package/src/element/hypothesis.js +1 -1
- package/src/element/judgement.js +42 -62
- package/src/element/metaType.js +3 -4
- package/src/element/metavariable.js +59 -56
- package/src/element/parameter.js +10 -5
- package/src/element/procedureCall.js +20 -18
- package/src/element/proof.js +14 -16
- package/src/element/{premise.js → proofAssertion/premise.js} +57 -53
- package/src/element/{step.js → proofAssertion/step.js} +59 -62
- package/src/element/{supposition.js → proofAssertion/supposition.js} +67 -56
- package/src/element/proofAssertion.js +24 -13
- package/src/element/propertyRelation.js +1 -1
- package/src/element/reference.js +87 -37
- package/src/element/rule.js +31 -37
- package/src/element/section.js +5 -5
- package/src/element/signature.js +8 -8
- package/src/element/statement.js +52 -48
- package/src/element/subproof.js +16 -18
- package/src/element/substitution/frame.js +104 -50
- package/src/element/substitution/reference.js +120 -20
- package/src/element/substitution/statement.js +169 -130
- package/src/element/substitution/term.js +104 -63
- package/src/element/substitution.js +16 -58
- package/src/element/substitutions.js +43 -41
- package/src/element/term.js +47 -41
- package/src/element/{axiom.js → topLevelAssertion/axiom.js} +22 -20
- package/src/element/{conjecture.js → topLevelAssertion/conjecture.js} +5 -6
- package/src/element/{lemma.js → topLevelAssertion/lemma.js} +5 -6
- package/src/element/{theorem.js → topLevelAssertion/theorem.js} +5 -5
- package/src/element/{axiomLemmaTheoremConjecture.js → topLevelAssertion.js} +37 -33
- package/src/element/{metaLemma.js → topLevelMetaAssertion/metaLemma.js} +5 -6
- package/src/element/{metatheorem.js → topLevelMetaAssertion/metatheorem.js} +5 -6
- package/src/element/{metaLemmaMetatheorem.js → topLevelMetaAssertion.js} +19 -17
- package/src/element/type.js +2 -4
- package/src/element/variable.js +47 -48
- package/src/index.js +2 -1
- package/src/main.js +2 -1
- package/src/metaTypes.js +25 -9
- package/src/node/frame.js +1 -1
- package/src/node/metavariable.js +3 -3
- package/src/node/parameter.js +32 -5
- package/src/node/proofAssertion/premise.js +16 -0
- package/src/node/{step.js → proofAssertion/step.js} +4 -18
- package/src/node/proofAssertion/supposition.js +16 -0
- package/src/node/proofAssertion.js +23 -0
- package/src/node/statement.js +1 -1
- package/src/node/substitution/frame.js +6 -32
- package/src/node/substitution/reference.js +38 -0
- package/src/node/substitution/statement.js +6 -32
- package/src/node/substitution/term.js +6 -22
- package/src/node/topLevelAssertion/axiom.js +13 -0
- package/src/node/topLevelAssertion/conjecture.js +13 -0
- package/src/node/topLevelAssertion/lemma.js +13 -0
- package/src/node/topLevelAssertion/theorem.js +13 -0
- package/src/node/{axiomLemmaTheoremConjecture.js → topLevelAssertion.js} +1 -1
- package/src/node/topLevelMetaAssertion/metaLemma.js +13 -0
- package/src/node/topLevelMetaAssertion/metatheorem.js +13 -0
- package/src/node/{metaLemmaMetaTheorem.js → topLevelMetaAssertion.js} +1 -1
- package/src/nonTerminalNodeMap.js +15 -12
- package/src/preamble.js +9 -9
- package/src/process/instantiate.js +27 -36
- package/src/process/unify.js +10 -9
- package/src/tokenTypes.js +4 -0
- package/src/types.js +4 -2
- package/src/utilities/bnf.js +3 -2
- package/src/utilities/context.js +46 -0
- package/src/utilities/element.js +302 -509
- package/src/utilities/instance.js +19 -42
- package/src/utilities/json.js +3 -1
- package/src/utilities/string.js +69 -28
- package/src/utilities/unification.js +41 -38
- package/src/utilities/validation.js +66 -75
- package/lib/context/local.js +0 -605
- package/lib/context/temporary.js +0 -752
- package/lib/element/axiom.js +0 -329
- package/lib/element/axiomLemmaTheoremConjecture.js +0 -427
- package/lib/element/metaLemmaMetatheorem.js +0 -289
- package/lib/element/premise.js +0 -307
- package/lib/element/step.js +0 -311
- package/lib/element/supposition.js +0 -320
- package/lib/log.js +0 -150
- package/lib/node/step.js +0 -166
- package/lib/node/supposition.js +0 -130
- package/src/context/temporary.js +0 -476
- package/src/log.js +0 -118
- package/src/node/axiom.js +0 -13
- package/src/node/conjecture.js +0 -13
- package/src/node/lemma.js +0 -13
- package/src/node/metaLemma.js +0 -13
- package/src/node/metatheorem.js +0 -13
- package/src/node/premise.js +0 -30
- package/src/node/supposition.js +0 -30
- package/src/node/theorem.js +0 -13
|
@@ -27,45 +27,46 @@ export default define(class DefinedAssertion extends Assertion {
|
|
|
27
27
|
return this.negated;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
let
|
|
30
|
+
validate(assignments, stated, context) {
|
|
31
|
+
let validated = false;
|
|
32
32
|
|
|
33
33
|
const definedAssertionString = this.getString(); ///
|
|
34
34
|
|
|
35
|
-
context.trace(`
|
|
35
|
+
context.trace(`Validating the '${definedAssertionString}' defined assertion...`);
|
|
36
36
|
|
|
37
37
|
const termValidates = this.validateTerm(assignments, stated, context),
|
|
38
|
-
frameVerifies = this.
|
|
38
|
+
frameVerifies = this.validateFrame(assignments, stated, context);
|
|
39
39
|
|
|
40
40
|
if (termValidates || frameVerifies) {
|
|
41
41
|
let verifiesWhenStated = false,
|
|
42
42
|
verifiesWhenDerived = false;
|
|
43
43
|
|
|
44
44
|
if (stated) {
|
|
45
|
-
verifiesWhenStated = this.
|
|
45
|
+
verifiesWhenStated = this.validateWhenStated(assignments, context);
|
|
46
46
|
} else {
|
|
47
|
-
verifiesWhenDerived = this.
|
|
47
|
+
verifiesWhenDerived = this.validateWhenDerived(context);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
if (verifiesWhenStated || verifiesWhenDerived) {
|
|
51
|
-
|
|
51
|
+
validated = true;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
if (
|
|
56
|
-
context.debug(`...
|
|
55
|
+
if (validated) {
|
|
56
|
+
context.debug(`...validated the '${definedAssertionString}' defined assertion.`);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
return
|
|
59
|
+
return validated;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
validateTerm(assignments, stated, context) {
|
|
63
63
|
let termValidates = false;
|
|
64
64
|
|
|
65
65
|
if (this.term !== null) {
|
|
66
|
-
const termString = this.term.getString()
|
|
66
|
+
const termString = this.term.getString(), ///
|
|
67
|
+
definedAssertionString = this.getString(); ///
|
|
67
68
|
|
|
68
|
-
context.trace(`Validating the '${termString}' term...`);
|
|
69
|
+
context.trace(`Validating the '${definedAssertionString}' defined assertino's '${termString}' term...`);
|
|
69
70
|
|
|
70
71
|
const termSingular = this.term.isSingular();
|
|
71
72
|
|
|
@@ -79,7 +80,7 @@ export default define(class DefinedAssertion extends Assertion {
|
|
|
79
80
|
});
|
|
80
81
|
|
|
81
82
|
if (termValidates) {
|
|
82
|
-
context.debug(`...validated the '${termString}' term.`);
|
|
83
|
+
context.debug(`...validated the'${definedAssertionString}' defined assertino's '${termString}' term.`);
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
}
|
|
@@ -87,13 +88,14 @@ export default define(class DefinedAssertion extends Assertion {
|
|
|
87
88
|
return termValidates;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
|
|
91
|
+
validateFrame(assignments, stated, context) {
|
|
91
92
|
let frameVerifies = false;
|
|
92
93
|
|
|
93
94
|
if (this.frame !== null) {
|
|
94
|
-
const frameString = this.frame.getString()
|
|
95
|
+
const frameString = this.frame.getString(), ///
|
|
96
|
+
definedAssertionString = this.getString(); ///
|
|
95
97
|
|
|
96
|
-
context.trace(`
|
|
98
|
+
context.trace(`Validating the'${definedAssertionString}' defined assertino's '${frameString}' frame...`);
|
|
97
99
|
|
|
98
100
|
const frameSingular = this.frame.isSingular();
|
|
99
101
|
|
|
@@ -104,10 +106,10 @@ export default define(class DefinedAssertion extends Assertion {
|
|
|
104
106
|
|
|
105
107
|
assignments = null; ///
|
|
106
108
|
|
|
107
|
-
frameVerifies = this.frame.
|
|
109
|
+
frameVerifies = this.frame.validate(assignments, stated, context);
|
|
108
110
|
|
|
109
111
|
if (frameVerifies) {
|
|
110
|
-
context.debug(`...
|
|
112
|
+
context.debug(`...validated the'${definedAssertionString}' defined assertino's '${frameString}' frame.`);
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
115
|
}
|
|
@@ -115,36 +117,36 @@ export default define(class DefinedAssertion extends Assertion {
|
|
|
115
117
|
return frameVerifies;
|
|
116
118
|
}
|
|
117
119
|
|
|
118
|
-
|
|
120
|
+
validateWhenStated(assignments, context) {
|
|
119
121
|
let verifiesWhenStated;
|
|
120
122
|
|
|
121
123
|
const definedAssertionString = this.getString(); ///
|
|
122
124
|
|
|
123
|
-
context.trace(`
|
|
125
|
+
context.trace(`Validating the '${definedAssertionString}' stated defined assertion...`);
|
|
124
126
|
|
|
125
127
|
verifiesWhenStated = true;
|
|
126
128
|
|
|
127
129
|
if (verifiesWhenStated) {
|
|
128
|
-
context.debug(`...
|
|
130
|
+
context.debug(`...validated the '${definedAssertionString}' stated defined assertion.`);
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
return verifiesWhenStated;
|
|
132
134
|
}
|
|
133
135
|
|
|
134
|
-
|
|
136
|
+
validateWhenDerived(context) {
|
|
135
137
|
let verifiesWhenDerived;
|
|
136
138
|
|
|
137
139
|
const definedAssertionString = this.getString(); ///
|
|
138
140
|
|
|
139
|
-
context.trace(`
|
|
141
|
+
context.trace(`Validating the '${definedAssertionString}' derived defined assertion...`);
|
|
140
142
|
|
|
141
143
|
const generalContext = null,
|
|
142
144
|
specificContext = context; ///
|
|
143
145
|
|
|
144
|
-
verifiesWhenDerived =
|
|
146
|
+
verifiesWhenDerived = validateWhenDerived(this.term, this.frame, this.negated, generalContext, specificContext);
|
|
145
147
|
|
|
146
148
|
if (verifiesWhenDerived) {
|
|
147
|
-
context.debug(`...
|
|
149
|
+
context.debug(`...validated the '${definedAssertionString}' derived defined assertion.`);
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
return verifiesWhenDerived;
|
|
@@ -160,7 +162,7 @@ export default define(class DefinedAssertion extends Assertion {
|
|
|
160
162
|
|
|
161
163
|
const term = termFromTermAndSubstitutions(this.term, substitutions, generalContext, specificContext),
|
|
162
164
|
frame = frameFromFrameAndSubstitutions(this.frame, substitutions, generalContext, specificContext),
|
|
163
|
-
verifiesWhenDerived =
|
|
165
|
+
verifiesWhenDerived = validateWhenDerived(term, frame, this.negated, generalContext, specificContext);
|
|
164
166
|
|
|
165
167
|
unifiesIndependently = verifiesWhenDerived; ///
|
|
166
168
|
|
|
@@ -174,7 +176,7 @@ export default define(class DefinedAssertion extends Assertion {
|
|
|
174
176
|
static name = "DefinedAssertion";
|
|
175
177
|
});
|
|
176
178
|
|
|
177
|
-
function
|
|
179
|
+
function validateWhenDerived(term, frame, negated, generalContext, specificContext) {
|
|
178
180
|
let verifiesWhenDerived = false;
|
|
179
181
|
|
|
180
182
|
const context = specificContext; ///
|
|
@@ -48,45 +48,45 @@ export default define(class PropertyAssertion extends Assertion {
|
|
|
48
48
|
return comparesToTermAndPropertyRelation;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
let
|
|
51
|
+
validate(assignments, stated, context) {
|
|
52
|
+
let validates = false;
|
|
53
53
|
|
|
54
54
|
const propertyAssertionString = this.getString(); ///
|
|
55
55
|
|
|
56
|
-
context.trace(`
|
|
56
|
+
context.trace(`Validating the '${propertyAssertionString}' property assertion...`);
|
|
57
57
|
|
|
58
58
|
const termValidates = this.validateTerm(assignments, stated, context);
|
|
59
59
|
|
|
60
60
|
if (termValidates) {
|
|
61
|
-
const propertyRelationVerifies = this.
|
|
61
|
+
const propertyRelationVerifies = this.validatePropertyRelation(assignments, stated, context);
|
|
62
62
|
|
|
63
63
|
if (propertyRelationVerifies) {
|
|
64
|
-
let
|
|
65
|
-
|
|
64
|
+
let validatesWhenStated = false,
|
|
65
|
+
validatesWhenDerived = false;
|
|
66
66
|
|
|
67
67
|
if (stated) {
|
|
68
|
-
|
|
68
|
+
validatesWhenStated = this.validateWhenStated(assignments, context);
|
|
69
69
|
} else {
|
|
70
|
-
|
|
70
|
+
validatesWhenDerived = this.validateWhenDerived(context);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
if (
|
|
74
|
-
|
|
73
|
+
if (validatesWhenStated || validatesWhenDerived) {
|
|
74
|
+
validates = true;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
if (
|
|
79
|
+
if (validates) {
|
|
80
80
|
if (stated) {
|
|
81
81
|
this.assign(assignments, context);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
if (
|
|
86
|
-
context.debug(`...
|
|
85
|
+
if (validates) {
|
|
86
|
+
context.debug(`...validated the '${propertyAssertionString}' property assertion.`);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
return
|
|
89
|
+
return validates;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
validateTerm(assignments, stated, context) {
|
|
@@ -96,10 +96,10 @@ export default define(class PropertyAssertion extends Assertion {
|
|
|
96
96
|
|
|
97
97
|
context.trace(`Validating the '${termString}' term...`);
|
|
98
98
|
|
|
99
|
-
termValidates = this.term.
|
|
100
|
-
const
|
|
99
|
+
termValidates = this.term.validate(context, () => {
|
|
100
|
+
const validatesAhead = true;
|
|
101
101
|
|
|
102
|
-
return
|
|
102
|
+
return validatesAhead;
|
|
103
103
|
});
|
|
104
104
|
|
|
105
105
|
if (termValidates) {
|
|
@@ -109,52 +109,52 @@ export default define(class PropertyAssertion extends Assertion {
|
|
|
109
109
|
return termValidates;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
validatePropertyRelation(assignments, stated, context) {
|
|
113
113
|
let propertyRelationVerifies;
|
|
114
114
|
|
|
115
115
|
const propertyRelationString = this.propertyRelation.getString();
|
|
116
116
|
|
|
117
|
-
context.trace(`
|
|
117
|
+
context.trace(`Validating the '${propertyRelationString}' property relation...`);
|
|
118
118
|
|
|
119
|
-
propertyRelationVerifies = this.propertyRelation.
|
|
119
|
+
propertyRelationVerifies = this.propertyRelation.validate(context);
|
|
120
120
|
|
|
121
121
|
if (propertyRelationVerifies) {
|
|
122
|
-
context.debug(`...
|
|
122
|
+
context.debug(`...validated the '${propertyRelationString}' property relation.`);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
return propertyRelationVerifies;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
let
|
|
128
|
+
validateWhenStated(assignments, context) {
|
|
129
|
+
let validatesWhenStated;
|
|
130
130
|
|
|
131
131
|
const propertyAssertionString = this.getString(); ///
|
|
132
132
|
|
|
133
|
-
context.trace(`
|
|
133
|
+
context.trace(`Validating the '${propertyAssertionString}' stated property assertion...`);
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
validatesWhenStated = true;
|
|
136
136
|
|
|
137
|
-
if (
|
|
138
|
-
context.debug(`...
|
|
137
|
+
if (validatesWhenStated) {
|
|
138
|
+
context.debug(`...validated the '${propertyAssertionString}' stated property assertion.`);
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
return
|
|
141
|
+
return validatesWhenStated;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
let
|
|
144
|
+
validateWhenDerived(context) {
|
|
145
|
+
let validatesWhenDerived;
|
|
146
146
|
|
|
147
147
|
const propertyAssertionString = this.getString(); ///
|
|
148
148
|
|
|
149
|
-
context.trace(`
|
|
149
|
+
context.trace(`Validating the '${propertyAssertionString}' derived property assertion...`);
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
validatesWhenDerived = true;
|
|
152
152
|
|
|
153
|
-
if (
|
|
154
|
-
context.debug(`...
|
|
153
|
+
if (validatesWhenDerived) {
|
|
154
|
+
context.debug(`...validated the '${propertyAssertionString}' derived property assertion.`);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
return
|
|
157
|
+
return validatesWhenDerived;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
assign(assignments, context) {
|
|
@@ -25,40 +25,41 @@ export default define(class SatisfiesAssertion extends Assertion {
|
|
|
25
25
|
|
|
26
26
|
correlateSubstitutions(substitutions, context) { return this.signature.correlateSubstitutions(substitutions, context); }
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
let
|
|
28
|
+
validate(assignments, stated, context) {
|
|
29
|
+
let validates = false;
|
|
30
30
|
|
|
31
31
|
const satisfiesAssertionString = this.getString(); ///
|
|
32
32
|
|
|
33
|
-
context.trace(`
|
|
33
|
+
context.trace(`Validating the '${satisfiesAssertionString}' satisfies assertion...`);
|
|
34
34
|
|
|
35
|
-
const signatureVerifies = this.
|
|
35
|
+
const signatureVerifies = this.validateSignature(assignments, stated, context);
|
|
36
36
|
|
|
37
37
|
if (signatureVerifies) {
|
|
38
|
-
const referenceVerifies = this.
|
|
38
|
+
const referenceVerifies = this.validateReference(assignments, stated, context);
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
validates = referenceVerifies; ///
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
if (
|
|
44
|
-
context.debug(`...
|
|
43
|
+
if (validates) {
|
|
44
|
+
context.debug(`...validated the '${satisfiesAssertionString}' satisfies assertion.`);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
return
|
|
47
|
+
return validates;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
const signatureVerifies = this.signature.
|
|
50
|
+
validateSignature(assignments, stated, context) {
|
|
51
|
+
const signatureVerifies = this.signature.validate(context);
|
|
52
52
|
|
|
53
53
|
return signatureVerifies;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
validateReference(assignments, stated, context) {
|
|
57
57
|
let referenceVerifies = false;
|
|
58
58
|
|
|
59
|
-
const referenceString = this.reference.getString()
|
|
59
|
+
const referenceString = this.reference.getString(),
|
|
60
|
+
satisfiesAssertionString = this.getString(); ///
|
|
60
61
|
|
|
61
|
-
context.trace(`
|
|
62
|
+
context.trace(`Validating the '${satisfiesAssertionString}' satisfies assertino's '${referenceString}' reference...`);
|
|
62
63
|
|
|
63
64
|
const axiom = context.findAxiomByReference(this.reference, context);
|
|
64
65
|
|
|
@@ -71,7 +72,7 @@ export default define(class SatisfiesAssertion extends Assertion {
|
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
if (referenceVerifies) {
|
|
74
|
-
context.debug(`...
|
|
75
|
+
context.debug(`...validated the '${satisfiesAssertionString}' satisfies assertino's '${referenceString}' reference.`);
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
return referenceVerifies;
|
|
@@ -85,7 +86,7 @@ export default define(class SatisfiesAssertion extends Assertion {
|
|
|
85
86
|
|
|
86
87
|
context.trace(`Unifying the '${statementString}' statement with the '${satisfiesAssertionString}' satisfies assertion...`);
|
|
87
88
|
|
|
88
|
-
this.signature.
|
|
89
|
+
this.signature.validate(context);
|
|
89
90
|
|
|
90
91
|
const axiom = context.findAxiomByReference(this.reference),
|
|
91
92
|
satisfiable = axiom.isSatisfiable();
|
|
@@ -95,14 +96,14 @@ export default define(class SatisfiesAssertion extends Assertion {
|
|
|
95
96
|
|
|
96
97
|
const { Substitutions } = elements;
|
|
97
98
|
|
|
98
|
-
substitutions = Substitutions.fromNothing();
|
|
99
|
+
substitutions = Substitutions.fromNothing(context);
|
|
99
100
|
|
|
100
101
|
const axiomComparesToSignature = axiom.compareSignature(this.signature, substitutions, context);
|
|
101
102
|
|
|
102
103
|
if (axiomComparesToSignature) {
|
|
103
104
|
const substitutionsB = substitutions; ///
|
|
104
105
|
|
|
105
|
-
substitutions = Substitutions.fromNothing();
|
|
106
|
+
substitutions = Substitutions.fromNothing(context);
|
|
106
107
|
|
|
107
108
|
statementUnifies = axiom.unifyStatementAndStepsOrSubproofs(statement, stepsOrSubproofs, substitutions, context);
|
|
108
109
|
|