occam-verify-cli 1.0.776 → 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.
- package/lib/context/nested.js +5 -1
- package/lib/context/proof.js +31 -21
- package/lib/context.js +5 -1
- package/lib/element/assertion/contained.js +9 -3
- package/lib/element/assertion/defined.js +28 -22
- package/lib/element/assertion/property.js +5 -1
- package/lib/element/assertion/satisfies.js +5 -1
- package/lib/element/assertion/subproof.js +6 -1
- package/lib/element/assertion/type.js +6 -2
- package/lib/element/assumption.js +9 -12
- package/lib/element/equivalences.js +4 -2
- package/lib/element/frame.js +47 -33
- package/lib/element/judgement.js +10 -2
- package/lib/element/metavariable.js +9 -5
- package/lib/element/proofAssertion/step.js +44 -4
- package/lib/utilities/unification.js +6 -6
- package/lib/utilities/validation.js +17 -10
- package/package.json +4 -4
- package/src/context/nested.js +6 -0
- package/src/context/proof.js +50 -36
- package/src/context.js +7 -0
- package/src/element/assertion/contained.js +16 -3
- package/src/element/assertion/defined.js +32 -23
- package/src/element/assertion/property.js +8 -1
- package/src/element/assertion/satisfies.js +8 -1
- package/src/element/assertion/subproof.js +8 -0
- package/src/element/assertion/type.js +8 -1
- package/src/element/assumption.js +8 -16
- package/src/element/equivalences.js +5 -2
- package/src/element/frame.js +67 -44
- package/src/element/judgement.js +11 -1
- package/src/element/metavariable.js +16 -9
- package/src/element/proofAssertion/step.js +4 -3
- package/src/utilities/unification.js +9 -8
- package/src/utilities/validation.js +24 -16
- package/lib/utilities/statement.js +0 -71
- package/src/utilities/statement.js +0 -66
|
@@ -5,9 +5,9 @@ import Assertion from "../assertion";
|
|
|
5
5
|
import { define } from "../../elements";
|
|
6
6
|
import { instantiate } from "../../utilities/context";
|
|
7
7
|
import { instantiateTypeAssertion } from "../../process/instantiate";
|
|
8
|
-
import { termFromTypeAssertionNode } from "../../utilities/element";
|
|
9
8
|
import { typeFromJSON, typeToTypeJSON } from "../../utilities/json";
|
|
10
9
|
import { variableAssignmentFromTypeAssertion } from "../../process/assign";
|
|
10
|
+
import { termFromTypeAssertionNode, typeAssertionFromStatementNode } from "../../utilities/element";
|
|
11
11
|
|
|
12
12
|
export default define(class TypeAssertion extends Assertion {
|
|
13
13
|
constructor(context, string, node, term, type) {
|
|
@@ -229,4 +229,11 @@ export default define(class TypeAssertion extends Assertion {
|
|
|
229
229
|
|
|
230
230
|
return typeAssertion;
|
|
231
231
|
}
|
|
232
|
+
|
|
233
|
+
static fromStatement(statement, context) {
|
|
234
|
+
const statementNode = statement.getNode(),
|
|
235
|
+
typeAssertion = typeAssertionFromStatementNode(statementNode, context);
|
|
236
|
+
|
|
237
|
+
return typeAssertion;
|
|
238
|
+
}
|
|
232
239
|
});
|
|
@@ -41,28 +41,21 @@ export default define(class Assumption extends Element {
|
|
|
41
41
|
return assumptionNodeMatches;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
let
|
|
44
|
+
compareMetaLevelSubstitution(metaLevelSubstitution, context) {
|
|
45
|
+
let comparesToMetaLevelSubstitution = false;
|
|
46
46
|
|
|
47
47
|
const assumptionString = this.getString(), ///
|
|
48
|
-
|
|
48
|
+
metaLevelSubstitutionString = metaLevelSubstitution.getString();
|
|
49
49
|
|
|
50
|
-
context.trace(`Comparing the '${assumptionString}' assumption to the '${
|
|
50
|
+
context.trace(`Comparing the '${assumptionString}' assumption to the '${metaLevelSubstitutionString}' meta-level substitution...`);
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
metavariableName = substitution.getMetavariableName(),
|
|
54
|
-
statementEqualToStatement = this.statement.isEqualTo(statement),
|
|
55
|
-
referenceMetavariableComparesToMetavariable = this.reference.compareMetavariableName(metavariableName);
|
|
52
|
+
debugger
|
|
56
53
|
|
|
57
|
-
if (
|
|
58
|
-
|
|
54
|
+
if (comparesToMetaLevelSubstitution) {
|
|
55
|
+
context.debug(`...compared the '${assumptionString}' assumption to the '${metaLevelSubstitutionString}' meta-level substitution.`);
|
|
59
56
|
}
|
|
60
57
|
|
|
61
|
-
|
|
62
|
-
context.debug(`...compared the '${substitutionString}' assumption to the '${assumptionString}' substitution.`);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return comparesToSubstituion;
|
|
58
|
+
return comparesToMetaLevelSubstitution;
|
|
66
59
|
}
|
|
67
60
|
|
|
68
61
|
findValidAssumption(context) {
|
|
@@ -208,7 +201,6 @@ export default define(class Assumption extends Element {
|
|
|
208
201
|
const assumptionString = this.getString(); ///
|
|
209
202
|
|
|
210
203
|
context.trace(`Validating the '${assumptionString}' derived assumption...`);
|
|
211
|
-
|
|
212
204
|
const topLevelMetaAssertion = this.getTopLevelMetaAssertion();
|
|
213
205
|
|
|
214
206
|
if (topLevelMetaAssertion !== null) {
|
|
@@ -203,8 +203,11 @@ export default define(class Equivalences extends Element {
|
|
|
203
203
|
static fromNothing(context) {
|
|
204
204
|
const string = EMPTY_STRING,
|
|
205
205
|
node = null,
|
|
206
|
-
array = []
|
|
207
|
-
|
|
206
|
+
array = [];
|
|
207
|
+
|
|
208
|
+
context = null;
|
|
209
|
+
|
|
210
|
+
const equivalences = new Equivalences(context, string, node, array);
|
|
208
211
|
|
|
209
212
|
return equivalences;
|
|
210
213
|
}
|
package/src/element/frame.js
CHANGED
|
@@ -46,22 +46,6 @@ export default define(class Frame extends Element {
|
|
|
46
46
|
return metavariableName;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
matchFrameNode(frameNode) {
|
|
50
|
-
const node = frameNode, ///
|
|
51
|
-
nodeMatches = this.matchNode(node),
|
|
52
|
-
frameNodeMatches = nodeMatches; ///
|
|
53
|
-
|
|
54
|
-
return frameNodeMatches;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
findValidFrame(context) {
|
|
58
|
-
const frameNode = this.getFrameNode(),
|
|
59
|
-
frame = context.findFrameByFrameNode(frameNode),
|
|
60
|
-
validFrame = frame; ///
|
|
61
|
-
|
|
62
|
-
return validFrame;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
49
|
isEqualTo(frame) {
|
|
66
50
|
const frameNode = frame.getNode(),
|
|
67
51
|
frameNodeMatches = this.matchFrameNode(frameNode),
|
|
@@ -77,6 +61,26 @@ export default define(class Frame extends Element {
|
|
|
77
61
|
return singular;
|
|
78
62
|
}
|
|
79
63
|
|
|
64
|
+
matchFrameNode(frameNode) {
|
|
65
|
+
const node = frameNode, ///
|
|
66
|
+
nodeMatches = this.matchNode(node),
|
|
67
|
+
frameNodeMatches = nodeMatches; ///
|
|
68
|
+
|
|
69
|
+
return frameNodeMatches;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
matchMetavariableNode(metavariableNode) {
|
|
73
|
+
let metavariableNodeMatches = false;
|
|
74
|
+
|
|
75
|
+
const singular = this.isSingular();
|
|
76
|
+
|
|
77
|
+
if (singular) {
|
|
78
|
+
metavariableNodeMatches = this.metavariable.matchMetavariableNode(metavariableNode);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return metavariableNodeMatches;
|
|
82
|
+
}
|
|
83
|
+
|
|
80
84
|
compareParameter(parameter) {
|
|
81
85
|
let comparesToParamter = false;
|
|
82
86
|
|
|
@@ -97,26 +101,46 @@ export default define(class Frame extends Element {
|
|
|
97
101
|
return comparesToParamter;
|
|
98
102
|
}
|
|
99
103
|
|
|
104
|
+
compareMetavariableName(metavariableName) {
|
|
105
|
+
let comparesToMetavariableName = false;
|
|
106
|
+
|
|
107
|
+
const singular = this.isSingular();
|
|
108
|
+
|
|
109
|
+
if (singular) {
|
|
110
|
+
const metavariableNameA = metavariableName ///
|
|
111
|
+
|
|
112
|
+
metavariableName = this.getMetavariableName();
|
|
113
|
+
|
|
114
|
+
const metavariableNameB = metavariableName; ///
|
|
115
|
+
|
|
116
|
+
comparesToMetavariableName = (metavariableNameA === metavariableNameB);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return comparesToMetavariableName;
|
|
120
|
+
}
|
|
121
|
+
|
|
100
122
|
compareMetaLevelSubstitution(metaLevelSubstitution, context) {
|
|
101
|
-
let comparesToMetaLevelSubstitution
|
|
123
|
+
let comparesToMetaLevelSubstitution;
|
|
102
124
|
|
|
103
125
|
const frameString = this.getString(), ///
|
|
104
|
-
|
|
126
|
+
metaLevelSubstitutionString = metaLevelSubstitution.getString();
|
|
105
127
|
|
|
106
|
-
context.trace(`Comparing the '${frameString}' frame to the '${
|
|
128
|
+
context.trace(`Comparing the '${frameString}' frame to the '${metaLevelSubstitutionString}' meta-level substitution...`);
|
|
107
129
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
130
|
+
const metavariableNode = this.metavariable.getNode(),
|
|
131
|
+
judgements = context.findJudgementsByMetavariableNode(metavariableNode),
|
|
132
|
+
assumptions = assumptionsFromJudgements(judgements);
|
|
111
133
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
134
|
+
comparesToMetaLevelSubstitution = assumptions.some((assumption) => {
|
|
135
|
+
const assumptionComparesToSubstitution = assumption.compareMetaLevelSubstitution(metaLevelSubstitution, context);
|
|
136
|
+
|
|
137
|
+
if (assumptionComparesToSubstitution) {
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
117
141
|
|
|
118
142
|
if (comparesToMetaLevelSubstitution) {
|
|
119
|
-
context.debug(`...compared the
|
|
143
|
+
context.debug(`...compared the '${frameString}' frame to the '${metaLevelSubstitutionString}' meta-level substitution.`);
|
|
120
144
|
}
|
|
121
145
|
|
|
122
146
|
return comparesToMetaLevelSubstitution;
|
|
@@ -128,7 +152,7 @@ export default define(class Frame extends Element {
|
|
|
128
152
|
const frameString = this.getString(), ///
|
|
129
153
|
metaLevelSubstitutionsString = metaLevelSubstitutionsStringFromMetaLevelSubstitutions(metaLevelSubstitutions);
|
|
130
154
|
|
|
131
|
-
context.trace(`Comparing the '${frameString}' frame to the '${metaLevelSubstitutionsString}' meta-level
|
|
155
|
+
context.trace(`Comparing the '${frameString}' frame to the '${metaLevelSubstitutionsString}' meta-level substitution...`);
|
|
132
156
|
|
|
133
157
|
comparesToMetaLevelSubstitutions = metaLevelSubstitutions.every((metaLevelSubstitution) => {
|
|
134
158
|
const compaaresToMetaLevelSubstitution = this.compareMetaLevelSubstitution(metaLevelSubstitution, context);
|
|
@@ -145,22 +169,12 @@ export default define(class Frame extends Element {
|
|
|
145
169
|
return comparesToMetaLevelSubstitutions;
|
|
146
170
|
}
|
|
147
171
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
if (singular) {
|
|
154
|
-
const metavariableNameA = metavariableName ///
|
|
155
|
-
|
|
156
|
-
metavariableName = this.getMetavariableName();
|
|
157
|
-
|
|
158
|
-
const metavariableNameB = metavariableName; ///
|
|
159
|
-
|
|
160
|
-
comparesToMetavariableName = (metavariableNameA === metavariableNameB);
|
|
161
|
-
}
|
|
172
|
+
findValidFrame(context) {
|
|
173
|
+
const frameNode = this.getFrameNode(),
|
|
174
|
+
frame = context.findFrameByFrameNode(frameNode),
|
|
175
|
+
validFrame = frame; ///
|
|
162
176
|
|
|
163
|
-
return
|
|
177
|
+
return validFrame;
|
|
164
178
|
}
|
|
165
179
|
|
|
166
180
|
validate(context) {
|
|
@@ -378,3 +392,12 @@ function assumptionsFromFrameNode(frameNode, context) {
|
|
|
378
392
|
return assumptions;
|
|
379
393
|
}
|
|
380
394
|
|
|
395
|
+
function assumptionsFromJudgements(judgements) {
|
|
396
|
+
const assumptions = judgements.map((judgement) => {
|
|
397
|
+
const assumption = judgement.getAssumption();
|
|
398
|
+
|
|
399
|
+
return assumption;
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
return assumptions;
|
|
403
|
+
}
|
package/src/element/judgement.js
CHANGED
|
@@ -5,6 +5,7 @@ import { Element } from "occam-languages";
|
|
|
5
5
|
import { define } from "../elements";
|
|
6
6
|
import { instantiateJudgement } from "../process/instantiate";
|
|
7
7
|
import { reconcile, instantiate } from "../utilities/context";
|
|
8
|
+
import { judgementFromStatementNode } from "../utilities/element";
|
|
8
9
|
import { judgementAssignmentFromJudgement } from "../process/assign";
|
|
9
10
|
|
|
10
11
|
export default define(class Judgement extends Element {
|
|
@@ -19,7 +20,7 @@ export default define(class Judgement extends Element {
|
|
|
19
20
|
return this.frame;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
getAssumption() {
|
|
23
24
|
return this.assumption;
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -47,6 +48,8 @@ export default define(class Judgement extends Element {
|
|
|
47
48
|
return judgementNodeMatches;
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
matchMetavariableNode(metavariableNode) { return this.frame.matchMetavariableNode(metavariableNode); }
|
|
52
|
+
|
|
50
53
|
compareMetavariableName(metavariableName) { return this.frame.compareMetavariableName(metavariableName); }
|
|
51
54
|
|
|
52
55
|
findValidJudgement(context) {
|
|
@@ -235,6 +238,13 @@ export default define(class Judgement extends Element {
|
|
|
235
238
|
return judgement;
|
|
236
239
|
}, context);
|
|
237
240
|
}
|
|
241
|
+
|
|
242
|
+
static fromStatement(statement, context) {
|
|
243
|
+
const statementNode = statement.getNode(),
|
|
244
|
+
judgement = judgementFromStatementNode(statementNode, context);
|
|
245
|
+
|
|
246
|
+
return judgement;
|
|
247
|
+
}
|
|
238
248
|
});
|
|
239
249
|
|
|
240
250
|
function frameFromJudgementNode(judgementNode, context) {
|
|
@@ -10,7 +10,7 @@ import { EMPTY_STRING } from "../constants";
|
|
|
10
10
|
import { instantiateMetavariable } from "../process/instantiate";
|
|
11
11
|
import { metaTypeFromJSON, metaTypeToMetaTypeJSON } from "../utilities/json";
|
|
12
12
|
import { unifyMetavariable, unifyMetavariableIntrinsically } from "../process/unify";
|
|
13
|
-
import { nameFromMetavariableNode, termFromMetavariableNode, typeFromMetavariableNode } from "../utilities/element";
|
|
13
|
+
import { nameFromMetavariableNode, termFromMetavariableNode, typeFromMetavariableNode, metavariableFromStatementNode } from "../utilities/element";
|
|
14
14
|
|
|
15
15
|
export default define(class Metavariable extends Element {
|
|
16
16
|
constructor(context, string, node, name, term, type, metaType) {
|
|
@@ -58,6 +58,14 @@ export default define(class Metavariable extends Element {
|
|
|
58
58
|
|
|
59
59
|
isMetaTypeEqualTo(metaType) { return this.metaType.isEqualTo(metaType); }
|
|
60
60
|
|
|
61
|
+
matchMetavariableNode(metavariableNode) {
|
|
62
|
+
const node = metavariableNode, ///
|
|
63
|
+
nodeMatches = this.matchNode(node),
|
|
64
|
+
metavariableNodeMatches = nodeMatches; ///
|
|
65
|
+
|
|
66
|
+
return metavariableNodeMatches;
|
|
67
|
+
}
|
|
68
|
+
|
|
61
69
|
compare(metavariable) {
|
|
62
70
|
const metavariableName = metavariable.getName(),
|
|
63
71
|
comparesToMetavariableName = this.compareMetavariableName(metavariableName),
|
|
@@ -73,14 +81,6 @@ export default define(class Metavariable extends Element {
|
|
|
73
81
|
return comparesToMetavariableName;
|
|
74
82
|
}
|
|
75
83
|
|
|
76
|
-
matchMetavariableNode(metavariableNode) {
|
|
77
|
-
const node = metavariableNode, ///
|
|
78
|
-
nodeMatches = this.matchNode(node),
|
|
79
|
-
metavariableNodeMatches = nodeMatches; ///
|
|
80
|
-
|
|
81
|
-
return metavariableNodeMatches;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
84
|
verify(context) {
|
|
85
85
|
let verifies = false;
|
|
86
86
|
|
|
@@ -625,4 +625,11 @@ export default define(class Metavariable extends Element {
|
|
|
625
625
|
return metavariable;
|
|
626
626
|
}, context);
|
|
627
627
|
}
|
|
628
|
+
|
|
629
|
+
static fromStatement(statement, context) {
|
|
630
|
+
const statementNode = statement.getNode(),
|
|
631
|
+
metavariable = metavariableFromStatementNode(statementNode, context);
|
|
632
|
+
|
|
633
|
+
return metavariable;
|
|
634
|
+
}
|
|
628
635
|
});
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { asynchronousUtilities } from "occam-languages";
|
|
4
4
|
|
|
5
|
+
import elements from "../../elements";
|
|
5
6
|
import ProofAssertion from "../proofAssertion";
|
|
6
7
|
|
|
7
8
|
import { define } from "../../elements";
|
|
8
9
|
import { unifyStatements } from "../../utilities/unification";
|
|
9
|
-
import { propertyAssertionFromStatement } from "../../utilities/statement";
|
|
10
10
|
import { derive, attempt, descend, asyncReconcile } from "../../utilities/context";
|
|
11
11
|
|
|
12
12
|
const { asyncSome } = asynchronousUtilities;
|
|
@@ -49,8 +49,9 @@ export default define(class Step extends ProofAssertion {
|
|
|
49
49
|
compareTermAndPropertyRelation(term, propertyRelation, context) {
|
|
50
50
|
let comparesToTermAndPropertyRelation = false;
|
|
51
51
|
|
|
52
|
-
const
|
|
53
|
-
|
|
52
|
+
const { PropertyAssertion } = elements,
|
|
53
|
+
statement = this.getStatement(),
|
|
54
|
+
propertyAssertion = PropertyAssertion.fromStatement(statement, context);
|
|
54
55
|
|
|
55
56
|
if (propertyAssertion !== null) {
|
|
56
57
|
comparesToTermAndPropertyRelation = propertyAssertion.compareTermAndPropertyRelation(term, propertyRelation, context);
|
|
@@ -5,10 +5,6 @@ import { arrayUtilities } from "necessary";
|
|
|
5
5
|
import elements from "../elements";
|
|
6
6
|
|
|
7
7
|
import { descend } from "./context";
|
|
8
|
-
import { judgementFromStatement,
|
|
9
|
-
typeAssertionFromStatement,
|
|
10
|
-
propertyAssertionFromStatement,
|
|
11
|
-
satisfiesAssertionFromStatement } from "../utilities/statement";
|
|
12
8
|
|
|
13
9
|
const { backwardsSome } = arrayUtilities;
|
|
14
10
|
|
|
@@ -84,7 +80,9 @@ async function unifyStatementWithReference(statement, reference, satisfiesAssert
|
|
|
84
80
|
async function unifyStatementAsSatisfiesAssertion(statement, reference, satisfiesAssertion, context) {
|
|
85
81
|
let statementUnifiesAsSatisfiesAssertion = false;
|
|
86
82
|
|
|
87
|
-
|
|
83
|
+
const { SatisfiesAssertion } = elements;
|
|
84
|
+
|
|
85
|
+
satisfiesAssertion = SatisfiesAssertion.fromStatement(statement, context);
|
|
88
86
|
|
|
89
87
|
if (satisfiesAssertion !== null) {
|
|
90
88
|
const statementString = statement.getString();
|
|
@@ -202,7 +200,8 @@ async function unifyStatementAsJudgement(statement, reference, satisfiesAssertio
|
|
|
202
200
|
let statementUnifiesAsJudgement = false;
|
|
203
201
|
|
|
204
202
|
if (reference === null) {
|
|
205
|
-
const
|
|
203
|
+
const { Judgement } = elements,
|
|
204
|
+
judgement = Judgement.fromStatement(statement, context);
|
|
206
205
|
|
|
207
206
|
if (judgement !== null) {
|
|
208
207
|
const statementString = statement.getString();
|
|
@@ -224,7 +223,8 @@ async function unifyStatementAsTypeAssertion(statement, reference, satisfiesAsse
|
|
|
224
223
|
let statementUnifiesAsTypeAssertion = false;
|
|
225
224
|
|
|
226
225
|
if (reference === null) {
|
|
227
|
-
const
|
|
226
|
+
const { TypeAssertion } = elements,
|
|
227
|
+
typeAssertion = TypeAssertion.fromStatement(statement, context);
|
|
228
228
|
|
|
229
229
|
if (typeAssertion !== null) {
|
|
230
230
|
const statementString = statement.getString();
|
|
@@ -244,7 +244,8 @@ async function unifyStatementAsPropertyAssertion(statement, reference, satisfies
|
|
|
244
244
|
let statementUnifiesAsPropertyAssertion = false;
|
|
245
245
|
|
|
246
246
|
if (reference === null) {
|
|
247
|
-
const
|
|
247
|
+
const { PropertyAssertion } = elements,
|
|
248
|
+
propertyAssertion = PropertyAssertion.fromStatement(statement, context);
|
|
248
249
|
|
|
249
250
|
if (propertyAssertion !== null) {
|
|
250
251
|
const statementString = statement.getString();
|
|
@@ -4,14 +4,6 @@ import elements from "../elements";
|
|
|
4
4
|
|
|
5
5
|
import { choose, descend } from "./context";
|
|
6
6
|
import { bracketedConstructorFromNothing, bracketedCombinatorFromNothing } from "../utilities/instance";
|
|
7
|
-
import { judgementFromStatement,
|
|
8
|
-
metavariableFromStatement,
|
|
9
|
-
typeAssertionFromStatement,
|
|
10
|
-
definedAssertionFromStatement,
|
|
11
|
-
propertyAssertionFromStatement,
|
|
12
|
-
subproofAssertionFromStatement,
|
|
13
|
-
containedAssertionFromStatement,
|
|
14
|
-
satisfiesAssertionFromStatement } from "../utilities/statement";
|
|
15
7
|
|
|
16
8
|
function validateTermAsVariable(term, context, validateForwards) {
|
|
17
9
|
let termValidatesAsVariable = false;
|
|
@@ -91,9 +83,11 @@ function unifyTermWithBracketedConstructor(term, context, validateForwards) {
|
|
|
91
83
|
function validateStatementAsMetavariable(statement, context) {
|
|
92
84
|
let statementValidatesAsMetavariable = false;
|
|
93
85
|
|
|
86
|
+
const { Metavariable } = elements;
|
|
87
|
+
|
|
94
88
|
let metavariable;
|
|
95
89
|
|
|
96
|
-
metavariable =
|
|
90
|
+
metavariable = Metavariable.fromStatement(statement, context);
|
|
97
91
|
|
|
98
92
|
if (metavariable !== null) {
|
|
99
93
|
const statementString = statement.getString();
|
|
@@ -206,7 +200,9 @@ function validateStatementAsJudgement(statement, context) {
|
|
|
206
200
|
|
|
207
201
|
let judgement;
|
|
208
202
|
|
|
209
|
-
|
|
203
|
+
const { Judgement } = elements;
|
|
204
|
+
|
|
205
|
+
judgement = Judgement.fromStatement(statement, context);
|
|
210
206
|
|
|
211
207
|
if (judgement !== null) {
|
|
212
208
|
const statementString = statement.getString();
|
|
@@ -230,9 +226,11 @@ function validateStatementAsJudgement(statement, context) {
|
|
|
230
226
|
function validateStatementAsTypeAssertion(statement, context) {
|
|
231
227
|
let validatesStatementAsTypeAssertion = false;
|
|
232
228
|
|
|
229
|
+
const { TypeAssertion } = elements;
|
|
230
|
+
|
|
233
231
|
let typeAssertion;
|
|
234
232
|
|
|
235
|
-
typeAssertion =
|
|
233
|
+
typeAssertion = TypeAssertion.fromStatement(statement, context);
|
|
236
234
|
|
|
237
235
|
if (typeAssertion !== null) {
|
|
238
236
|
const statementString = statement.getString();
|
|
@@ -256,9 +254,11 @@ function validateStatementAsTypeAssertion(statement, context) {
|
|
|
256
254
|
function validateStatementAsDefinedAssertion(statement, context) {
|
|
257
255
|
let validatesStatementAsDefinedAssertion = false;
|
|
258
256
|
|
|
257
|
+
const { DefinedAssertion } = elements;
|
|
258
|
+
|
|
259
259
|
let definedAssertion;
|
|
260
260
|
|
|
261
|
-
definedAssertion =
|
|
261
|
+
definedAssertion = DefinedAssertion.fromStatement(statement, context);
|
|
262
262
|
|
|
263
263
|
if (definedAssertion !== null) {
|
|
264
264
|
const statementString = statement.getString();
|
|
@@ -282,9 +282,11 @@ function validateStatementAsDefinedAssertion(statement, context) {
|
|
|
282
282
|
function validateStatementAsPropertyAssertion(statement, context) {
|
|
283
283
|
let statementValidatesAsPropertyAssertion = false;
|
|
284
284
|
|
|
285
|
+
const { PropertyAssertion } = elements;
|
|
286
|
+
|
|
285
287
|
let propertyAssertion;
|
|
286
288
|
|
|
287
|
-
propertyAssertion =
|
|
289
|
+
propertyAssertion = PropertyAssertion.fromStatement(statement, context);
|
|
288
290
|
|
|
289
291
|
if (propertyAssertion !== null) {
|
|
290
292
|
const statementString = statement.getString();
|
|
@@ -308,9 +310,11 @@ function validateStatementAsPropertyAssertion(statement, context) {
|
|
|
308
310
|
function validateStatementAsSubproofAssertion(statement, context) {
|
|
309
311
|
let statementValidatesAsSubproofAssertion = false;
|
|
310
312
|
|
|
313
|
+
const { SubproofAssertion } = elements;
|
|
314
|
+
|
|
311
315
|
let subproofAssertion;
|
|
312
316
|
|
|
313
|
-
subproofAssertion =
|
|
317
|
+
subproofAssertion = SubproofAssertion.fromStatement(statement, context);
|
|
314
318
|
|
|
315
319
|
if (subproofAssertion !== null) {
|
|
316
320
|
const statementString = statement.getString();
|
|
@@ -334,9 +338,11 @@ function validateStatementAsSubproofAssertion(statement, context) {
|
|
|
334
338
|
function validateStatementAsContainedAssertion(statement, context) {
|
|
335
339
|
let validatesStatementAsContainedAssertion = false;
|
|
336
340
|
|
|
341
|
+
const { ContainedAssertion } = elements;
|
|
342
|
+
|
|
337
343
|
let containedAssertion;
|
|
338
344
|
|
|
339
|
-
containedAssertion =
|
|
345
|
+
containedAssertion = ContainedAssertion.fromStatement(statement, context);
|
|
340
346
|
|
|
341
347
|
if (containedAssertion !== null) {
|
|
342
348
|
const statementString = statement.getString();
|
|
@@ -360,9 +366,11 @@ function validateStatementAsContainedAssertion(statement, context) {
|
|
|
360
366
|
function validateStatementAsSatisfiesAssertion(statement, context) {
|
|
361
367
|
let validatesAStatementsSatisfiesAssertion = false;
|
|
362
368
|
|
|
369
|
+
const { SatisfiesAssertion } = elements;
|
|
370
|
+
|
|
363
371
|
let satisfiesAssertion;
|
|
364
372
|
|
|
365
|
-
satisfiesAssertion =
|
|
373
|
+
satisfiesAssertion = SatisfiesAssertion.fromStatement(statement, context);
|
|
366
374
|
|
|
367
375
|
if (satisfiesAssertion !== null) {
|
|
368
376
|
const statementString = statement.getString();
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
get containedAssertionFromStatement () {
|
|
13
|
-
return containedAssertionFromStatement;
|
|
14
|
-
},
|
|
15
|
-
get definedAssertionFromStatement () {
|
|
16
|
-
return definedAssertionFromStatement;
|
|
17
|
-
},
|
|
18
|
-
get judgementFromStatement () {
|
|
19
|
-
return judgementFromStatement;
|
|
20
|
-
},
|
|
21
|
-
get metavariableFromStatement () {
|
|
22
|
-
return metavariableFromStatement;
|
|
23
|
-
},
|
|
24
|
-
get propertyAssertionFromStatement () {
|
|
25
|
-
return propertyAssertionFromStatement;
|
|
26
|
-
},
|
|
27
|
-
get satisfiesAssertionFromStatement () {
|
|
28
|
-
return satisfiesAssertionFromStatement;
|
|
29
|
-
},
|
|
30
|
-
get subproofAssertionFromStatement () {
|
|
31
|
-
return subproofAssertionFromStatement;
|
|
32
|
-
},
|
|
33
|
-
get typeAssertionFromStatement () {
|
|
34
|
-
return typeAssertionFromStatement;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const _element = require("../utilities/element");
|
|
38
|
-
function judgementFromStatement(statement, context) {
|
|
39
|
-
const statementNode = statement.getNode(), judgement = (0, _element.judgementFromStatementNode)(statementNode, context);
|
|
40
|
-
return judgement;
|
|
41
|
-
}
|
|
42
|
-
function metavariableFromStatement(statement, context) {
|
|
43
|
-
const statementNode = statement.getNode(), metavariable = (0, _element.metavariableFromStatementNode)(statementNode, context);
|
|
44
|
-
return metavariable;
|
|
45
|
-
}
|
|
46
|
-
function typeAssertionFromStatement(statement, context) {
|
|
47
|
-
const statementNode = statement.getNode(), typeAssertion = (0, _element.typeAssertionFromStatementNode)(statementNode, context);
|
|
48
|
-
return typeAssertion;
|
|
49
|
-
}
|
|
50
|
-
function definedAssertionFromStatement(statement, context) {
|
|
51
|
-
const statementNode = statement.getNode(), definedAssertion = (0, _element.definedAssertionFromStatementNode)(statementNode, context);
|
|
52
|
-
return definedAssertion;
|
|
53
|
-
}
|
|
54
|
-
function propertyAssertionFromStatement(statement, context) {
|
|
55
|
-
const statementNode = statement.getNode(), propertyAssertion = (0, _element.propertyAssertionFromStatementNode)(statementNode, context);
|
|
56
|
-
return propertyAssertion;
|
|
57
|
-
}
|
|
58
|
-
function subproofAssertionFromStatement(statement, context) {
|
|
59
|
-
const statementNode = statement.getNode(), subproofAssertion = (0, _element.subproofAssertionFromStatementNode)(statementNode, context);
|
|
60
|
-
return subproofAssertion;
|
|
61
|
-
}
|
|
62
|
-
function containedAssertionFromStatement(statement, context) {
|
|
63
|
-
const statementNode = statement.getNode(), containedAssertion = (0, _element.containedAssertionFromStatementNode)(statementNode, context);
|
|
64
|
-
return containedAssertion;
|
|
65
|
-
}
|
|
66
|
-
function satisfiesAssertionFromStatement(statement, context) {
|
|
67
|
-
const statementNode = statement.getNode(), satisfiesAssertion = (0, _element.satisfiesAssertionFromStatementNode)(statementNode, context);
|
|
68
|
-
return satisfiesAssertion;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvc3RhdGVtZW50LmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgeyBqdWRnZW1lbnRGcm9tU3RhdGVtZW50Tm9kZSxcbiAgICAgICAgIG1ldGF2YXJpYWJsZUZyb21TdGF0ZW1lbnROb2RlLFxuICAgICAgICAgdHlwZUFzc2VydGlvbkZyb21TdGF0ZW1lbnROb2RlLFxuICAgICAgICAgZGVmaW5lZEFzc2VydGlvbkZyb21TdGF0ZW1lbnROb2RlLFxuICAgICAgICAgcHJvcGVydHlBc3NlcnRpb25Gcm9tU3RhdGVtZW50Tm9kZSxcbiAgICAgICAgIHN1YnByb29mQXNzZXJ0aW9uRnJvbVN0YXRlbWVudE5vZGUsXG4gICAgICAgICBjb250YWluZWRBc3NlcnRpb25Gcm9tU3RhdGVtZW50Tm9kZSxcbiAgICAgICAgIHNhdGlzZmllc0Fzc2VydGlvbkZyb21TdGF0ZW1lbnROb2RlIH0gZnJvbSBcIi4uL3V0aWxpdGllcy9lbGVtZW50XCI7XG5cbmV4cG9ydCBmdW5jdGlvbiBqdWRnZW1lbnRGcm9tU3RhdGVtZW50KHN0YXRlbWVudCwgY29udGV4dCkge1xuICBjb25zdCBzdGF0ZW1lbnROb2RlID0gc3RhdGVtZW50LmdldE5vZGUoKSxcbiAgICAgICAganVkZ2VtZW50ID0ganVkZ2VtZW50RnJvbVN0YXRlbWVudE5vZGUoc3RhdGVtZW50Tm9kZSwgY29udGV4dCk7XG5cbiAgcmV0dXJuIGp1ZGdlbWVudDtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG1ldGF2YXJpYWJ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2pDVyxvQkFBb0JDLElBQUFBLDJDQUFrQyxFQUFDYixlQUFlRDtJQUU1RSxPQUFPYTtBQUNUO0FBRU8sU0FBU3RCLGdDQUFnQ1EsU0FBUyxFQUFFQyxPQUFPO0lBQ2hFLE1BQU1DLGdCQUFnQkYsVUFBVUcsT0FBTyxJQUNqQ2EscUJBQXFCQyxJQUFBQSw0Q0FBbUMsRUFBQ2YsZUFBZUQ7SUFFOUUsT0FBT2U7QUFDVDtBQUVPLFNBQVNuQixnQ0FBZ0NHLFNBQVMsRUFBRUMsT0FBTztJQUNoRSxNQUFNQyxnQkFBZ0JGLFVBQVVHLE9BQU8sSUFDakNlLHFCQUFxQkMsSUFBQUEsNENBQW1DLEVBQUNqQixlQUFlRDtJQUU5RSxPQUFPaUI7QUFDVCJ9
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { judgementFromStatementNode,
|
|
4
|
-
metavariableFromStatementNode,
|
|
5
|
-
typeAssertionFromStatementNode,
|
|
6
|
-
definedAssertionFromStatementNode,
|
|
7
|
-
propertyAssertionFromStatementNode,
|
|
8
|
-
subproofAssertionFromStatementNode,
|
|
9
|
-
containedAssertionFromStatementNode,
|
|
10
|
-
satisfiesAssertionFromStatementNode } from "../utilities/element";
|
|
11
|
-
|
|
12
|
-
export function judgementFromStatement(statement, context) {
|
|
13
|
-
const statementNode = statement.getNode(),
|
|
14
|
-
judgement = judgementFromStatementNode(statementNode, context);
|
|
15
|
-
|
|
16
|
-
return judgement;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function metavariableFromStatement(statement, context) {
|
|
20
|
-
const statementNode = statement.getNode(),
|
|
21
|
-
metavariable = metavariableFromStatementNode(statementNode, context);
|
|
22
|
-
|
|
23
|
-
return metavariable;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function typeAssertionFromStatement(statement, context) {
|
|
27
|
-
const statementNode = statement.getNode(),
|
|
28
|
-
typeAssertion = typeAssertionFromStatementNode(statementNode, context);
|
|
29
|
-
|
|
30
|
-
return typeAssertion;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function definedAssertionFromStatement(statement, context) {
|
|
34
|
-
const statementNode = statement.getNode(),
|
|
35
|
-
definedAssertion = definedAssertionFromStatementNode(statementNode, context);
|
|
36
|
-
|
|
37
|
-
return definedAssertion;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function propertyAssertionFromStatement(statement, context) {
|
|
41
|
-
const statementNode = statement.getNode(),
|
|
42
|
-
propertyAssertion = propertyAssertionFromStatementNode(statementNode, context);
|
|
43
|
-
|
|
44
|
-
return propertyAssertion;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function subproofAssertionFromStatement(statement, context) {
|
|
48
|
-
const statementNode = statement.getNode(),
|
|
49
|
-
subproofAssertion = subproofAssertionFromStatementNode(statementNode, context);
|
|
50
|
-
|
|
51
|
-
return subproofAssertion;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function containedAssertionFromStatement(statement, context) {
|
|
55
|
-
const statementNode = statement.getNode(),
|
|
56
|
-
containedAssertion = containedAssertionFromStatementNode(statementNode, context);
|
|
57
|
-
|
|
58
|
-
return containedAssertion;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function satisfiesAssertionFromStatement(statement, context) {
|
|
62
|
-
const statementNode = statement.getNode(),
|
|
63
|
-
satisfiesAssertion = satisfiesAssertionFromStatementNode(statementNode, context);
|
|
64
|
-
|
|
65
|
-
return satisfiesAssertion;
|
|
66
|
-
}
|