occam-verify-cli 1.0.824 → 1.0.826
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/file/nominal.js +26 -22
- package/lib/element/assertion/contained.js +9 -5
- package/lib/element/assertion/property.js +9 -5
- package/lib/element/assertion/satisfies.js +9 -5
- package/lib/element/assertion/subproof.js +9 -5
- package/lib/element/assertion/type.js +9 -9
- package/lib/element/assertion.js +4 -3
- package/lib/element/assumption.js +7 -6
- package/lib/element/combinator.js +8 -7
- package/lib/element/conclusion.js +8 -7
- package/lib/element/constructor.js +7 -6
- package/lib/element/declaration/combinator.js +3 -3
- package/lib/element/declaration/complexType.js +3 -3
- package/lib/element/declaration/constructor.js +3 -3
- package/lib/element/declaration/metavariable.js +3 -3
- package/lib/element/declaration/simpleType.js +3 -3
- package/lib/element/declaration/typePrefix.js +3 -3
- package/lib/element/declaration/variable.js +3 -3
- package/lib/element/deduction.js +8 -7
- package/lib/element/derivation.js +10 -3
- package/lib/element/equality.js +8 -7
- package/lib/element/equivalence.js +10 -3
- package/lib/element/error.js +8 -1
- package/lib/element/frame.js +8 -7
- package/lib/element/hypothesis.js +8 -7
- package/lib/element/judgement.js +8 -7
- package/lib/element/label.js +8 -7
- package/lib/element/metaType.js +7 -6
- package/lib/element/metavariable.js +6 -5
- package/lib/element/parameter.js +8 -7
- package/lib/element/procedureCall.js +8 -7
- package/lib/element/procedureReference.js +8 -7
- package/lib/element/proof.js +10 -3
- package/lib/element/proofAssertion.js +3 -3
- package/lib/element/property.js +7 -6
- package/lib/element/propertyRelation.js +8 -7
- package/lib/element/reference.js +8 -7
- package/lib/element/rule.js +6 -6
- package/lib/element/section.js +10 -3
- package/lib/element/signature.js +7 -6
- package/lib/element/statement.js +6 -5
- package/lib/element/subDerivation.js +10 -3
- package/lib/element/subproof.js +10 -3
- package/lib/element/substitution/frame.js +5 -5
- package/lib/element/substitution/reference.js +5 -5
- package/lib/element/substitution/statement.js +5 -5
- package/lib/element/substitution/term.js +5 -5
- package/lib/element/substitution.js +6 -5
- package/lib/element/term.js +7 -6
- package/lib/element/topLevelAssertion.js +7 -5
- package/lib/element/topLevelMetaAssertion.js +7 -5
- package/lib/element/type.js +9 -8
- package/lib/element/typePrefix.js +8 -7
- package/lib/element/variable.js +7 -6
- package/lib/utilities/element.js +101 -113
- package/lib/utilities/json.js +89 -1
- package/package.json +4 -4
- package/src/context/file/nominal.js +39 -24
- package/src/element/assertion/contained.js +10 -4
- package/src/element/assertion/property.js +10 -4
- package/src/element/assertion/satisfies.js +10 -4
- package/src/element/assertion/subproof.js +10 -4
- package/src/element/assertion/type.js +13 -15
- package/src/element/assertion.js +3 -1
- package/src/element/assumption.js +7 -5
- package/src/element/combinator.js +7 -5
- package/src/element/conclusion.js +7 -5
- package/src/element/constructor.js +6 -4
- package/src/element/declaration/combinator.js +2 -2
- package/src/element/declaration/complexType.js +2 -2
- package/src/element/declaration/constructor.js +2 -2
- package/src/element/declaration/metavariable.js +2 -2
- package/src/element/declaration/simpleType.js +2 -2
- package/src/element/declaration/typePrefix.js +2 -2
- package/src/element/declaration/variable.js +2 -2
- package/src/element/deduction.js +7 -5
- package/src/element/derivation.js +13 -2
- package/src/element/equality.js +7 -5
- package/src/element/equivalence.js +13 -2
- package/src/element/error.js +11 -0
- package/src/element/frame.js +7 -5
- package/src/element/hypothesis.js +7 -5
- package/src/element/judgement.js +7 -5
- package/src/element/label.js +7 -5
- package/src/element/metaType.js +7 -4
- package/src/element/metavariable.js +6 -4
- package/src/element/parameter.js +7 -5
- package/src/element/procedureCall.js +7 -5
- package/src/element/procedureReference.js +7 -5
- package/src/element/proof.js +13 -2
- package/src/element/proofAssertion.js +2 -2
- package/src/element/property.js +6 -4
- package/src/element/propertyRelation.js +7 -5
- package/src/element/reference.js +7 -5
- package/src/element/rule.js +8 -8
- package/src/element/section.js +13 -2
- package/src/element/signature.js +7 -5
- package/src/element/statement.js +5 -3
- package/src/element/subDerivation.js +13 -2
- package/src/element/subproof.js +13 -2
- package/src/element/substitution/frame.js +4 -4
- package/src/element/substitution/reference.js +4 -4
- package/src/element/substitution/statement.js +4 -4
- package/src/element/substitution/term.js +4 -4
- package/src/element/substitution.js +5 -3
- package/src/element/term.js +6 -4
- package/src/element/topLevelAssertion.js +9 -4
- package/src/element/topLevelMetaAssertion.js +9 -4
- package/src/element/type.js +8 -5
- package/src/element/typePrefix.js +7 -5
- package/src/element/variable.js +6 -4
- package/src/utilities/element.js +195 -154
- package/src/utilities/json.js +104 -0
- package/lib/process/initialise.js +0 -57
- package/src/process/initialise.js +0 -72
package/src/utilities/element.js
CHANGED
|
@@ -29,11 +29,12 @@ export function typeFromTypeNode(typeNode, context) {
|
|
|
29
29
|
provisional = provisionalFromTypeNode(typeNode, context),
|
|
30
30
|
nominalTypeName = nominalTypeNameFromTypeNode(typeNode, context),
|
|
31
31
|
typeString = typeStringFromNominalTypeName(nominalTypeName),
|
|
32
|
-
string = typeString
|
|
32
|
+
string = typeString, ///
|
|
33
|
+
lineIndex = null;
|
|
33
34
|
|
|
34
35
|
context = null;
|
|
35
36
|
|
|
36
|
-
type = new Type(context, string, node,
|
|
37
|
+
type = new Type(context, string, node, lineIndex, prefixName, superTypes, properties, provisional);
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
return type;
|
|
@@ -43,11 +44,12 @@ export function termFromTermNode(termNode, context) {
|
|
|
43
44
|
const { Term } = elements,
|
|
44
45
|
node = termNode, ///
|
|
45
46
|
string = context.nodeAsString(node),
|
|
47
|
+
lineIndex = null,
|
|
46
48
|
type = typeFromTermNode(termNode, context);
|
|
47
49
|
|
|
48
50
|
context = null;
|
|
49
51
|
|
|
50
|
-
const term = new Term(context, string, node, type);
|
|
52
|
+
const term = new Term(context, string, node, lineIndex, type);
|
|
51
53
|
|
|
52
54
|
return term;
|
|
53
55
|
}
|
|
@@ -56,13 +58,14 @@ export function stepFromStepNode(stepNode, context) {
|
|
|
56
58
|
const { Step } = elements,
|
|
57
59
|
node = stepNode, ///
|
|
58
60
|
string = context.nodeAsString(node),
|
|
61
|
+
lineIndex = null,
|
|
59
62
|
statement = statementFromStepNode(stepNode, context),
|
|
60
63
|
reference = referenceFromStepNode(stepNode, context),
|
|
61
64
|
satisfiesAssertion = satisfiesAssertionFromStepNode(stepNode, context);
|
|
62
65
|
|
|
63
66
|
context = null;
|
|
64
67
|
|
|
65
|
-
const step = new Step(context, string, node, statement, reference, satisfiesAssertion);
|
|
68
|
+
const step = new Step(context, string, node, lineIndex, statement, reference, satisfiesAssertion);
|
|
66
69
|
|
|
67
70
|
return step;
|
|
68
71
|
}
|
|
@@ -76,7 +79,8 @@ export function ruleFromRuleNode(ruleNode, context) {
|
|
|
76
79
|
ruleString = rulsStringFromLabelsPremisesAndConclusion(labels, premises, conclusion),
|
|
77
80
|
node = ruleNode, ///
|
|
78
81
|
string = ruleString, ///
|
|
79
|
-
|
|
82
|
+
lineIndex = null,
|
|
83
|
+
rule = new Rule(context, string, node, lineIndex, proof, labels, premises, conclusion);
|
|
80
84
|
|
|
81
85
|
return rule;
|
|
82
86
|
}
|
|
@@ -85,8 +89,9 @@ export function labelFromLabelNode(labelNode, context) {
|
|
|
85
89
|
const { Label } = elements,
|
|
86
90
|
node = labelNode, ///
|
|
87
91
|
string = context.nodeAsString(node),
|
|
92
|
+
lineIndex = null,
|
|
88
93
|
metavariable = metavariableFromLabelNode(labelNode, context),
|
|
89
|
-
label = new Label(context, string, node, metavariable);
|
|
94
|
+
label = new Label(context, string, node, lineIndex, metavariable);
|
|
90
95
|
|
|
91
96
|
return label;
|
|
92
97
|
}
|
|
@@ -95,7 +100,8 @@ export function errorFromErrorNode(errorNode, context) {
|
|
|
95
100
|
const { Error } = elements,
|
|
96
101
|
node = errorNode, ///
|
|
97
102
|
string = context.nodeAsString(node),
|
|
98
|
-
|
|
103
|
+
lineIndex = null,
|
|
104
|
+
error = new Error(context, string, node, lineIndex);
|
|
99
105
|
|
|
100
106
|
return error;
|
|
101
107
|
}
|
|
@@ -112,7 +118,8 @@ export function lemmaFromLemmaNode(lemmaNode, context) {
|
|
|
112
118
|
topLevelAsssertionString = topLevelAssertionStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
113
119
|
node = lemmaNode, ///
|
|
114
120
|
string = topLevelAsssertionString, ///
|
|
115
|
-
|
|
121
|
+
lineIndex = null,
|
|
122
|
+
lemma = new Lemma(context, string, node, lineIndex, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
116
123
|
|
|
117
124
|
return lemma;
|
|
118
125
|
}
|
|
@@ -121,12 +128,10 @@ export function frameFromFrameNode(frameNode, context) {
|
|
|
121
128
|
const { Frame } = elements,
|
|
122
129
|
node = frameNode, ///
|
|
123
130
|
string = context.nodeAsString(node),
|
|
131
|
+
lineIndex = null,
|
|
124
132
|
assumptions = assumptionsFromFrameNode(frameNode, context),
|
|
125
|
-
metavariable = metavariableFromFrameNode(frameNode, context)
|
|
126
|
-
|
|
127
|
-
context = null;
|
|
128
|
-
|
|
129
|
-
const frame = new Frame(context, string, node, assumptions, metavariable);
|
|
133
|
+
metavariable = metavariableFromFrameNode(frameNode, context),
|
|
134
|
+
frame = new Frame(context, string, node, lineIndex, assumptions, metavariable);
|
|
130
135
|
|
|
131
136
|
return frame;
|
|
132
137
|
}
|
|
@@ -135,11 +140,9 @@ export function proofFromProofNode(proofNode, context) {
|
|
|
135
140
|
const { Proof } = elements,
|
|
136
141
|
node = proofNode, ///
|
|
137
142
|
string = null,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const proof = new Proof(context, string, node, derivation);
|
|
143
|
+
lineIndex = null,
|
|
144
|
+
derivation = derivationFromProofNode(proofNode, context),
|
|
145
|
+
proof = new Proof(context, string, node, lineIndex, derivation);
|
|
143
146
|
|
|
144
147
|
return proof;
|
|
145
148
|
}
|
|
@@ -156,7 +159,8 @@ export function axiomFromAxiomNode(axiomNode, context) {
|
|
|
156
159
|
topLevelAsssertionString = topLevelAssertionStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
157
160
|
node = axiomNode, ///
|
|
158
161
|
string = topLevelAsssertionString, ///
|
|
159
|
-
|
|
162
|
+
lineIndex = null,
|
|
163
|
+
axiom = new Axiom(context, string, node, lineIndex, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
160
164
|
|
|
161
165
|
return axiom;
|
|
162
166
|
}
|
|
@@ -170,11 +174,9 @@ export function sectionFromSectionNode(sectionNode, context) {
|
|
|
170
174
|
conjecture = conjectureFromSectionNode(sectionNode, context),
|
|
171
175
|
sectionString = sectionStringFromHypothesesTopLevelAssertion(hypotheses, axiom, lemma, theorem, conjecture),
|
|
172
176
|
node = sectionNode, ///
|
|
173
|
-
string = sectionString
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
const section = new Section(context, string, node, hypotheses, axiom, lemma, theorem, conjecture);
|
|
177
|
+
string = sectionString, ///
|
|
178
|
+
lineIndex = null,
|
|
179
|
+
section = new Section(context, string, node, lineIndex, hypotheses, axiom, lemma, theorem, conjecture);
|
|
178
180
|
|
|
179
181
|
return section;
|
|
180
182
|
}
|
|
@@ -183,12 +185,10 @@ export function premiseFromPremiseNode(premiseNode, context) {
|
|
|
183
185
|
const { Premise } = elements,
|
|
184
186
|
node = premiseNode, ///
|
|
185
187
|
string = context.nodeAsString(node),
|
|
188
|
+
lineIndex = null,
|
|
186
189
|
statement = statementFromPremiseNode(premiseNode, context),
|
|
187
|
-
procedureCall = procedureCallFromPremiseNode(premiseNode, context)
|
|
188
|
-
|
|
189
|
-
context = null;
|
|
190
|
-
|
|
191
|
-
const premise = new Premise(context, string, node, statement, procedureCall);
|
|
190
|
+
procedureCall = procedureCallFromPremiseNode(premiseNode, context),
|
|
191
|
+
premise = new Premise(context, string, node, lineIndex, statement, procedureCall);
|
|
192
192
|
|
|
193
193
|
return premise
|
|
194
194
|
}
|
|
@@ -205,7 +205,8 @@ export function theoremFromTheoremNode(theoremNode, context) {
|
|
|
205
205
|
topLevelAsssertionString = topLevelAssertionStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
206
206
|
node = theoremNode, ///
|
|
207
207
|
string = topLevelAsssertionString, ///
|
|
208
|
-
|
|
208
|
+
lineIndex = null,
|
|
209
|
+
theorem = new Theorem(context, string, node, lineIndex, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
209
210
|
|
|
210
211
|
return theorem;
|
|
211
212
|
}
|
|
@@ -214,13 +215,11 @@ export function propertyFromPropertyNode(propertyNode, context) {
|
|
|
214
215
|
const { Property } = elements,
|
|
215
216
|
node = propertyNode, ///
|
|
216
217
|
string = context.nodeAsString(node),
|
|
218
|
+
lineIndex = null,
|
|
217
219
|
propertyName = propertyNode.getPropertyName(),
|
|
218
220
|
nominalTypeName = null,
|
|
219
|
-
name = propertyName
|
|
220
|
-
|
|
221
|
-
context = null;
|
|
222
|
-
|
|
223
|
-
const property = new Property(context, string, node, name, nominalTypeName);
|
|
221
|
+
name = propertyName, ///
|
|
222
|
+
property = new Property(context, string, node, lineIndex, name, nominalTypeName);
|
|
224
223
|
|
|
225
224
|
return property;
|
|
226
225
|
}
|
|
@@ -229,13 +228,11 @@ export function variableFromVariableNode(variableNode, context) {
|
|
|
229
228
|
const { Variable } = elements,
|
|
230
229
|
node = variableNode, ///
|
|
231
230
|
string = context.nodeAsString(node),
|
|
231
|
+
lineIndex = null,
|
|
232
232
|
type = null,
|
|
233
233
|
identifier = identifierFromVarialbeNode(variableNode, context),
|
|
234
|
-
propertyRelations = []
|
|
235
|
-
|
|
236
|
-
context = null;
|
|
237
|
-
|
|
238
|
-
const variable = new Variable(context, string, node, type, identifier, propertyRelations);
|
|
234
|
+
propertyRelations = [],
|
|
235
|
+
variable = new Variable(context, string, node, lineIndex, type, identifier, propertyRelations);
|
|
239
236
|
|
|
240
237
|
return variable;
|
|
241
238
|
}
|
|
@@ -246,11 +243,9 @@ export function subproofFromSubproofNode(subproofNode, context) {
|
|
|
246
243
|
suppositions = suppositionsFromSubproofNode(subproofNode, context),
|
|
247
244
|
subDerivation = subDerivationFromSubproofNode(subproofNode, context),
|
|
248
245
|
subproofString = subproofStringFromSuppositionsAndSubDerivation(suppositions, subDerivation, context),
|
|
249
|
-
string = subproofString
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
const subproof = new Subproof(context, string, node, suppositions, subDerivation);
|
|
246
|
+
string = subproofString, ///
|
|
247
|
+
lineIndex = null,
|
|
248
|
+
subproof = new Subproof(context, string, node, lineIndex, suppositions, subDerivation);
|
|
254
249
|
|
|
255
250
|
return subproof;
|
|
256
251
|
}
|
|
@@ -259,12 +254,10 @@ export function equalityFromEqualityNode(equalityNode, context) {
|
|
|
259
254
|
const { Equality } = elements,
|
|
260
255
|
node = equalityNode, ///
|
|
261
256
|
string = context.nodeAsString(node),
|
|
257
|
+
lineIndex = null,
|
|
262
258
|
leftTerm = leftTermFromEqualityNode(equalityNode, context),
|
|
263
|
-
rightTerm = rightTermFromEqualityNode(equalityNode, context)
|
|
264
|
-
|
|
265
|
-
context = null;
|
|
266
|
-
|
|
267
|
-
const equality = new Equality(context, string, node, leftTerm, rightTerm);
|
|
259
|
+
rightTerm = rightTermFromEqualityNode(equalityNode, context),
|
|
260
|
+
equality = new Equality(context, string, node, lineIndex, leftTerm, rightTerm);
|
|
268
261
|
|
|
269
262
|
return equality;
|
|
270
263
|
}
|
|
@@ -273,11 +266,9 @@ export function deductionFromDeductionNode(deductionNode, context) {
|
|
|
273
266
|
const { Deduction } = elements,
|
|
274
267
|
node = deductionNode, ///
|
|
275
268
|
string = context.nodeAsString(node),
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
const deduction = new Deduction(context, string, node, statement);
|
|
269
|
+
lineIndex = null,
|
|
270
|
+
statement = statementFromDeductionNode(deductionNode, context),
|
|
271
|
+
deduction = new Deduction(context, string, node, lineIndex, statement);
|
|
281
272
|
|
|
282
273
|
return deduction;
|
|
283
274
|
}
|
|
@@ -285,11 +276,9 @@ export function deductionFromDeductionNode(deductionNode, context) {
|
|
|
285
276
|
export function statementFromStatementNode(statementNode, context) {
|
|
286
277
|
const { Statement } = elements,
|
|
287
278
|
node = statementNode, ///
|
|
288
|
-
string = context.nodeAsString(node)
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
const statement = new Statement(context, string, node);
|
|
279
|
+
string = context.nodeAsString(node),
|
|
280
|
+
lineIndex = null,
|
|
281
|
+
statement = new Statement(context, string, node, lineIndex);
|
|
293
282
|
|
|
294
283
|
return statement;
|
|
295
284
|
}
|
|
@@ -298,11 +287,9 @@ export function signatureFromSignatureNode(signatureNode, context) {
|
|
|
298
287
|
const { Signature } = elements,
|
|
299
288
|
node = signatureNode, ///
|
|
300
289
|
string = context.nodeAsString(node),
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
const signature = new Signature(context, string, node, terms);
|
|
290
|
+
lineIndex = null,
|
|
291
|
+
terms = termsFromSignatureNode(signatureNode, context),
|
|
292
|
+
signature = new Signature(context, string, node, lineIndex, terms);
|
|
306
293
|
|
|
307
294
|
return signature;
|
|
308
295
|
}
|
|
@@ -311,9 +298,10 @@ export function referenceFromReferenceNode(referenceNode, context) {
|
|
|
311
298
|
const { Reference } = elements,
|
|
312
299
|
node = referenceNode, ///
|
|
313
300
|
string = context.nodeAsString(node),
|
|
301
|
+
lineIndex = null,
|
|
314
302
|
metavariable = metavariableFromReferenceNode(referenceNode, context),
|
|
315
303
|
topLevelMetaAssertion = topLevelMetaAssertionFromReferenceNode(referenceNode, context),
|
|
316
|
-
reference = new Reference(context, string, node, metavariable, topLevelMetaAssertion);
|
|
304
|
+
reference = new Reference(context, string, node, lineIndex, metavariable, topLevelMetaAssertion);
|
|
317
305
|
|
|
318
306
|
return reference;
|
|
319
307
|
}
|
|
@@ -322,12 +310,10 @@ export function judgementFromJudgementNode(judgementNode, context) {
|
|
|
322
310
|
const { Judgement } = elements,
|
|
323
311
|
node = judgementNode, ///
|
|
324
312
|
string = context.nodeAsString(node),
|
|
313
|
+
lineIndex = null,
|
|
325
314
|
frame = frameFromJudgementNode(judgementNode, context),
|
|
326
|
-
assumption = assumptionFromJudgementNode(judgementNode, context)
|
|
327
|
-
|
|
328
|
-
context = null;
|
|
329
|
-
|
|
330
|
-
const judgement = new Judgement(context, string, node, frame, assumption);
|
|
315
|
+
assumption = assumptionFromJudgementNode(judgementNode, context),
|
|
316
|
+
judgement = new Judgement(context, string, node, lineIndex, frame, assumption);
|
|
331
317
|
|
|
332
318
|
return judgement;
|
|
333
319
|
}
|
|
@@ -343,7 +329,8 @@ export function metaLemmaFromMetaLemmaNode(metaLemmaNode, context) {
|
|
|
343
329
|
topLevelMetaAssertionString = topLevelMetaAssertionStringFromLabelSuppositionsDeductionAndMetaLevelAssumptions(label, suppositions, deduction, metaLevelAssumptions),
|
|
344
330
|
node = metaLemmaMetathoremNode, ///
|
|
345
331
|
string = topLevelMetaAssertionString, ///
|
|
346
|
-
|
|
332
|
+
lineIndex = null,
|
|
333
|
+
metaLemma = new MetaLemma(context, string, node, lineIndex, label, suppositions, deduction, proof, metaLevelAssumptions);
|
|
347
334
|
|
|
348
335
|
return metaLemma;
|
|
349
336
|
}
|
|
@@ -352,12 +339,10 @@ export function parameterFromParameterNode(parameterNode, context) {
|
|
|
352
339
|
const { Parameter } = elements,
|
|
353
340
|
node = parameterNode, ///
|
|
354
341
|
string = context.nodeAsString(node),
|
|
342
|
+
lineIndex = null,
|
|
355
343
|
name = parameterNode.getName(),
|
|
356
|
-
identifier = parameterNode.getIdentifier()
|
|
357
|
-
|
|
358
|
-
context = null;
|
|
359
|
-
|
|
360
|
-
const parameter = new Parameter(context, string, node, name, identifier);
|
|
344
|
+
identifier = parameterNode.getIdentifier(),
|
|
345
|
+
parameter = new Parameter(context, string, node, lineIndex, name, identifier);
|
|
361
346
|
|
|
362
347
|
return parameter;
|
|
363
348
|
}
|
|
@@ -366,11 +351,9 @@ export function signatureFromJSignatureNode(signatureNode, context) {
|
|
|
366
351
|
const { Signature } = elements,
|
|
367
352
|
node = signatureNode,
|
|
368
353
|
string = context.nodeAsString(node),
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
const signature = new Signature(context, string, node, terms);
|
|
354
|
+
lineIndex = null,
|
|
355
|
+
terms = termsFromSignatureNode(signatureNode, context),
|
|
356
|
+
signature = new Signature(context, string, node, lineIndex, terms);
|
|
374
357
|
|
|
375
358
|
return signature;
|
|
376
359
|
}
|
|
@@ -379,11 +362,9 @@ export function hypothesisFromHypothesisNode(hypotheseNode, context) {
|
|
|
379
362
|
const { Hypothsis } = elements,
|
|
380
363
|
node = hypotheseNode, ///
|
|
381
364
|
string = context.nodeAsString(node),
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
const hypohtesis = new Hypothsis(context, string, node, statement);
|
|
365
|
+
lineIndex = null,
|
|
366
|
+
statement = statementFromHypothesisNode(hypotheseNode, context),
|
|
367
|
+
hypohtesis = new Hypothsis(context, string, node, lineIndex, statement);
|
|
387
368
|
|
|
388
369
|
return hypohtesis;
|
|
389
370
|
}
|
|
@@ -400,7 +381,8 @@ export function conjectureFromConjectureNode(conjectureNode, context) {
|
|
|
400
381
|
topLevelAsssertionString = topLevelAssertionStringFromLabelsSuppositionsAndDeduction(labels, suppositions, deduction),
|
|
401
382
|
node = conjectureNode, ///
|
|
402
383
|
string = topLevelAsssertionString, ///
|
|
403
|
-
|
|
384
|
+
lineIndex = null,
|
|
385
|
+
conjecture = new Conjecture(context, string, node, lineIndex, labels, suppositions, deduction, proof, signature, hypotheses);
|
|
404
386
|
|
|
405
387
|
return conjecture;
|
|
406
388
|
}
|
|
@@ -409,8 +391,9 @@ export function combinatorFromCombinatorNode(combinatorNode, context) {
|
|
|
409
391
|
const { Combinator } = elements,
|
|
410
392
|
node = combinatorNode, ///
|
|
411
393
|
string = context.nodeAsString(node),
|
|
394
|
+
lineIndex = null,
|
|
412
395
|
statement = statementFromCombinatorNode(combinatorNode, context),
|
|
413
|
-
combinator = new Combinator(context, string, node, statement);
|
|
396
|
+
combinator = new Combinator(context, string, node, lineIndex, statement);
|
|
414
397
|
|
|
415
398
|
return combinator;
|
|
416
399
|
}
|
|
@@ -419,11 +402,9 @@ export function conclusionFromConclusionNode(conclusionNode, context) {
|
|
|
419
402
|
const { Conclusion } = elements,
|
|
420
403
|
node = conclusionNode, ///
|
|
421
404
|
string = context.nodeAsString(node),
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
const conclusion = new Conclusion(context, string, node, statement);
|
|
405
|
+
lineIndex = null,
|
|
406
|
+
statement = statementFromConclusionNode(conclusionNode, context),
|
|
407
|
+
conclusion = new Conclusion(context, string, node, lineIndex, statement);
|
|
427
408
|
|
|
428
409
|
return conclusion;
|
|
429
410
|
}
|
|
@@ -432,11 +413,9 @@ export function derivationFromDerivationNode(derivationNode, context) {
|
|
|
432
413
|
const { Derivation } = elements,
|
|
433
414
|
node = derivationNode, ///
|
|
434
415
|
string = null,
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
const derivation = new Derivation(context, string, node, stepsOrSubproofs);
|
|
416
|
+
lineIndex = null,
|
|
417
|
+
stepsOrSubproofs = stepsOrSubproofsFromDerivationNode(derivationNode, context),
|
|
418
|
+
derivation = new Derivation(context, string, node, lineIndex, stepsOrSubproofs);
|
|
440
419
|
|
|
441
420
|
return derivation;
|
|
442
421
|
}
|
|
@@ -445,12 +424,10 @@ export function typePrefixFromTypePrefixNode(typePrefixNode, context) {
|
|
|
445
424
|
const { TypePrefix } = elements,
|
|
446
425
|
node = typePrefixNode, ///
|
|
447
426
|
string = context.nodeAsString(node),
|
|
427
|
+
lineIndex = null,
|
|
448
428
|
term = termFromTypePrefixNode(typePrefixNode, context),
|
|
449
|
-
type = typeFromTypePrefixNode(typePrefixNode, context)
|
|
450
|
-
|
|
451
|
-
context = null;
|
|
452
|
-
|
|
453
|
-
const typePrefix = new TypePrefix(context, string, node, term, type);
|
|
429
|
+
type = typeFromTypePrefixNode(typePrefixNode, context),
|
|
430
|
+
typePrefix = new TypePrefix(context, string, node, lineIndex, term, type);
|
|
454
431
|
|
|
455
432
|
return typePrefix;
|
|
456
433
|
}
|
|
@@ -459,9 +436,10 @@ export function assumptionFromAssumptionNode(assumptionNode, context) {
|
|
|
459
436
|
const { Assumption } = elements,
|
|
460
437
|
node = assumptionNode, ///
|
|
461
438
|
string = context.nodeAsString(node),
|
|
439
|
+
lineIndex = null,
|
|
462
440
|
reference = referenceFromAssumptionNode(assumptionNode, context),
|
|
463
441
|
statement = statementFromAssumptionNode(assumptionNode, context),
|
|
464
|
-
assumption = new Assumption(context, string, node, reference, statement);
|
|
442
|
+
assumption = new Assumption(context, string, node, lineIndex, reference, statement);
|
|
465
443
|
|
|
466
444
|
return assumption;
|
|
467
445
|
}
|
|
@@ -470,9 +448,10 @@ export function constructorFromConstructorNode(constructorNode, context) {
|
|
|
470
448
|
const { Constructor } = elements,
|
|
471
449
|
node = constructorNode, ///
|
|
472
450
|
string = context.nodeAsString(node),
|
|
451
|
+
lineIndex = null,
|
|
473
452
|
term = termFromConstructorNode(constructorNode, context),
|
|
474
453
|
type = typeFromConstructorNode(constructorNode, context),
|
|
475
|
-
constructor = new Constructor(context, string, node, term, type);
|
|
454
|
+
constructor = new Constructor(context, string, node, lineIndex, term, type);
|
|
476
455
|
|
|
477
456
|
return constructor;
|
|
478
457
|
}
|
|
@@ -481,12 +460,10 @@ export function suppositionFromSuppositionNode(suppositionNode, context) {
|
|
|
481
460
|
const { Supposition } = elements,
|
|
482
461
|
node = suppositionNode, ///
|
|
483
462
|
string = context.nodeAsString(node),
|
|
463
|
+
lineIndex = null,
|
|
484
464
|
statement = statementFromSuppositionNode(suppositionNode, context),
|
|
485
|
-
procedureCall = procedureCallFromSuppositionNode(suppositionNode, context)
|
|
486
|
-
|
|
487
|
-
context = null;
|
|
488
|
-
|
|
489
|
-
const supposition = new Supposition(context, string, node, statement, procedureCall);
|
|
465
|
+
procedureCall = procedureCallFromSuppositionNode(suppositionNode, context),
|
|
466
|
+
supposition = new Supposition(context, string, node, lineIndex, statement, procedureCall);
|
|
490
467
|
|
|
491
468
|
return supposition
|
|
492
469
|
}
|
|
@@ -494,14 +471,12 @@ export function suppositionFromSuppositionNode(suppositionNode, context) {
|
|
|
494
471
|
export function equivalenceFromEquivalenceNode(equivalenceNode, context) {
|
|
495
472
|
const { Equivalence } = elements,
|
|
496
473
|
node = equivalenceNode, ///
|
|
474
|
+
lineIndex = null,
|
|
497
475
|
type = typeFromEquivalenceNode(equivalenceNode, context),
|
|
498
476
|
terms = termsFromEquivalenceNode(equivalenceNode, context),
|
|
499
477
|
equivalenceString = equivalenceStringFromTerms(terms),
|
|
500
|
-
string = equivalenceString
|
|
501
|
-
|
|
502
|
-
context = null;
|
|
503
|
-
|
|
504
|
-
const equivalence = new Equivalence(context, string, node, type, terms);
|
|
478
|
+
string = equivalenceString, ///
|
|
479
|
+
equivalence = new Equivalence(context, string, node, lineIndex, type, terms);
|
|
505
480
|
|
|
506
481
|
return equivalence;
|
|
507
482
|
}
|
|
@@ -517,7 +492,11 @@ export function metatheoremFromMetatheoremNode(metatheoremNode, context) {
|
|
|
517
492
|
topLevelMetaAssertionString = topLevelMetaAssertionStringFromLabelSuppositionsDeductionAndMetaLevelAssumptions(label, suppositions, deduction, metaLevelAssumptions),
|
|
518
493
|
node = metaLemmaMetathoremNode, ///
|
|
519
494
|
string = topLevelMetaAssertionString, ///
|
|
520
|
-
|
|
495
|
+
lineIndex = null;
|
|
496
|
+
|
|
497
|
+
context = null;
|
|
498
|
+
|
|
499
|
+
const metatheorem = new Metatheorem(context, string, node, lineIndex, label, suppositions, deduction, proof, metaLevelAssumptions);
|
|
521
500
|
|
|
522
501
|
return metatheorem;
|
|
523
502
|
}
|
|
@@ -526,11 +505,15 @@ export function metavariableFromMetavariableNode(metavariableNode, context) {
|
|
|
526
505
|
const { Metavariable } = elements,
|
|
527
506
|
node = metavariableNode, ///
|
|
528
507
|
string = context.nodeAsString(node),
|
|
508
|
+
lineIndex = null,
|
|
529
509
|
name = nameFromMetavariableNode(metavariableNode, context),
|
|
530
510
|
term = termFromMetavariableNode(metavariableNode, context),
|
|
531
511
|
type = typeFromMetavariableNode(metavariableNode, context),
|
|
532
|
-
metaType = null
|
|
533
|
-
|
|
512
|
+
metaType = null;
|
|
513
|
+
|
|
514
|
+
context = null;
|
|
515
|
+
|
|
516
|
+
const metavariable = new Metavariable(context, string, node, lineIndex, name, term, type, metaType);
|
|
534
517
|
|
|
535
518
|
return metavariable;
|
|
536
519
|
}
|
|
@@ -539,11 +522,12 @@ export function subDerivationFromSubDerivationNode(subDerivationNode, context) {
|
|
|
539
522
|
const { SubDerivation } = elements,
|
|
540
523
|
node = subDerivationNode, ///
|
|
541
524
|
string = null,
|
|
525
|
+
lineIndex = null,
|
|
542
526
|
stepsOrSubproofs = stepsOrSubproofsFromSubDerivationNode(subDerivationNode, context);
|
|
543
527
|
|
|
544
528
|
context = null;
|
|
545
529
|
|
|
546
|
-
const subDerivation = new SubDerivation(context, string, node, stepsOrSubproofs);
|
|
530
|
+
const subDerivation = new SubDerivation(context, string, node, lineIndex, stepsOrSubproofs);
|
|
547
531
|
|
|
548
532
|
return subDerivation;
|
|
549
533
|
}
|
|
@@ -552,12 +536,13 @@ export function typeAssertionFromTypeAssertionNode(typeAssertionNode, context) {
|
|
|
552
536
|
const { TypeAssertion } = elements,
|
|
553
537
|
node = typeAssertionNode, ///
|
|
554
538
|
string = context.nodeAsString(node),
|
|
539
|
+
lineIndex = null,
|
|
555
540
|
term = termFromTypeAssertionNode(typeAssertionNode, context),
|
|
556
541
|
type = typeFromTypeAssertionNode(typeAssertionNode, context);
|
|
557
542
|
|
|
558
543
|
context = null;
|
|
559
544
|
|
|
560
|
-
const typeAssertion = new TypeAssertion(context, string, node, term, type);
|
|
545
|
+
const typeAssertion = new TypeAssertion(context, string, node, lineIndex, term, type);
|
|
561
546
|
|
|
562
547
|
return typeAssertion;
|
|
563
548
|
}
|
|
@@ -568,11 +553,12 @@ export function procedureCallFromProcedureCallNode(procedureCallNode, context) {
|
|
|
568
553
|
procedureReference = procedureReferenceFromProcedureCallNode(procedureCallNode, context),
|
|
569
554
|
procedureCallString = procedureCallStringFromProcedureReferenceAndParameters(procedureReference, parameters),
|
|
570
555
|
node = procedureCallNode, ///
|
|
571
|
-
string = procedureCallString
|
|
556
|
+
string = procedureCallString, ///
|
|
557
|
+
lineIndex = null;
|
|
572
558
|
|
|
573
559
|
context = null;
|
|
574
560
|
|
|
575
|
-
const procedureCall = new ProcedureCall(context, string, node, parameters, procedureReference);
|
|
561
|
+
const procedureCall = new ProcedureCall(context, string, node, lineIndex, parameters, procedureReference);
|
|
576
562
|
|
|
577
563
|
return procedureCall;
|
|
578
564
|
}
|
|
@@ -589,13 +575,14 @@ export function definedAssertionFromDefinedAssertionNode(definedAssertionNode, c
|
|
|
589
575
|
const { DefinedAssertion } = elements,
|
|
590
576
|
node = definedAssertionNode, ///
|
|
591
577
|
string = context.nodeAsString(node),
|
|
578
|
+
lineIndex = null,
|
|
592
579
|
negated = definedAssertionNode.isNegated(),
|
|
593
580
|
term = termFromDefinedAssertionNode(definedAssertionNode, context),
|
|
594
581
|
frame = frameFromDefinedAssertionNode(definedAssertionNode, context);
|
|
595
582
|
|
|
596
583
|
context = null;
|
|
597
584
|
|
|
598
|
-
const definedAssertion = new DefinedAssertion(context, string, node, term, frame, negated);
|
|
585
|
+
const definedAssertion = new DefinedAssertion(context, string, node, lineIndex, term, frame, negated);
|
|
599
586
|
|
|
600
587
|
return definedAssertion;
|
|
601
588
|
}
|
|
@@ -604,12 +591,13 @@ export function propertyRelationFromPropertyRelationNode(propertyRelationNode, c
|
|
|
604
591
|
const { PropertyRelation } = elements,
|
|
605
592
|
node = propertyRelationNode, ///
|
|
606
593
|
string = context.nodeAsString(node),
|
|
594
|
+
lineIndex = null,
|
|
607
595
|
term = termFromPropertyRelationNode(propertyRelationNode, context),
|
|
608
596
|
property = propertyFromPropertyRelationNode(propertyRelationNode, context);
|
|
609
597
|
|
|
610
598
|
context = null;
|
|
611
599
|
|
|
612
|
-
const propertyRelation = new PropertyRelation(context, string, node, term, property);
|
|
600
|
+
const propertyRelation = new PropertyRelation(context, string, node, lineIndex, term, property);
|
|
613
601
|
|
|
614
602
|
return propertyRelation;
|
|
615
603
|
}
|
|
@@ -618,10 +606,14 @@ export function termSubstitutionFromTermSubstitutionNode(termSubstitutionNode, c
|
|
|
618
606
|
const { TermSubstitution } = elements,
|
|
619
607
|
node = termSubstitutionNode, ///
|
|
620
608
|
string = context.nodeAsString(node),
|
|
609
|
+
lineIndex = null,
|
|
621
610
|
generalContext = generalContextFromTermSubstitutionNode(termSubstitutionNode, context),
|
|
622
611
|
targetTerm = targetTermFromTermSubstitutionNode(termSubstitutionNode, context),
|
|
623
|
-
replacementTerm = replacementTermFromTermSubstitutionNode(termSubstitutionNode, context)
|
|
624
|
-
|
|
612
|
+
replacementTerm = replacementTermFromTermSubstitutionNode(termSubstitutionNode, context);
|
|
613
|
+
|
|
614
|
+
context = null;
|
|
615
|
+
|
|
616
|
+
const termSubstitution = new TermSubstitution(context, string, node, lineIndex, generalContext, targetTerm, replacementTerm);
|
|
625
617
|
|
|
626
618
|
return termSubstitution;
|
|
627
619
|
}
|
|
@@ -630,10 +622,14 @@ export function frameSubstitutionFromFrameSubstitutionNode(frameSubstitutionNode
|
|
|
630
622
|
const { FrameSubstitution } = elements,
|
|
631
623
|
node = frameSubstitutionNode, ///
|
|
632
624
|
string = context.nodeAsString(node),
|
|
625
|
+
lineIndex = null,
|
|
633
626
|
generalContext = generalContextFromFrameSubstitutionNode(frameSubstitutionNode, context),
|
|
634
627
|
targetFrame = targetFrameFromFrameSubstitutionNode(frameSubstitutionNode, context),
|
|
635
|
-
replacementFrame = replacementFrameFromFrameSubstitutionNode(frameSubstitutionNode, context)
|
|
636
|
-
|
|
628
|
+
replacementFrame = replacementFrameFromFrameSubstitutionNode(frameSubstitutionNode, context);
|
|
629
|
+
|
|
630
|
+
context = null;
|
|
631
|
+
|
|
632
|
+
const frameSubstitution = new FrameSubstitution(context, string, node, lineIndex, generalContext, targetFrame, replacementFrame);
|
|
637
633
|
|
|
638
634
|
return frameSubstitution;
|
|
639
635
|
}
|
|
@@ -642,12 +638,13 @@ export function propertyAssertionFromPropertyAssertionNode(propertyAssertionNode
|
|
|
642
638
|
const { PropertyAssertion } = elements,
|
|
643
639
|
node = propertyAssertionNode, ///
|
|
644
640
|
string = context.nodeAsString(node),
|
|
641
|
+
lineIndex = null,
|
|
645
642
|
term = termFromPropertyAssertionNode(propertyAssertionNode, context),
|
|
646
643
|
propertyRelation = propertyRelationFromPropertyAssertionNode(propertyAssertionNode, context);
|
|
647
644
|
|
|
648
645
|
context = null;
|
|
649
646
|
|
|
650
|
-
const propertyAssertion = new PropertyAssertion(context, string, node, term, propertyRelation);
|
|
647
|
+
const propertyAssertion = new PropertyAssertion(context, string, node, lineIndex, term, propertyRelation);
|
|
651
648
|
|
|
652
649
|
return propertyAssertion;
|
|
653
650
|
}
|
|
@@ -656,11 +653,12 @@ export function subproofAssertionFromSubproofAssertionNode(subproofAssertionNode
|
|
|
656
653
|
const { SubproofAssertion } = elements,
|
|
657
654
|
node = subproofAssertionNode, ///
|
|
658
655
|
string = context.nodeAsString(node),
|
|
656
|
+
lineIndex = null,
|
|
659
657
|
statements = statementsFromSubproofAssertionNode(subproofAssertionNode, context);
|
|
660
658
|
|
|
661
659
|
context = null;
|
|
662
660
|
|
|
663
|
-
const subproofAssertion = new SubproofAssertion(context, string, node, statements);
|
|
661
|
+
const subproofAssertion = new SubproofAssertion(context, string, node, lineIndex, statements);
|
|
664
662
|
|
|
665
663
|
return subproofAssertion;
|
|
666
664
|
}
|
|
@@ -669,6 +667,7 @@ export function containedAssertionFromContainedAssertionNode(containedAssertionN
|
|
|
669
667
|
const { ContainedAssertion } = elements,
|
|
670
668
|
node = containedAssertionNode, ///
|
|
671
669
|
string = context.nodeAsString(node),
|
|
670
|
+
lineIndex = null,
|
|
672
671
|
negated = containedAssertionNode.isNegated(),
|
|
673
672
|
term = termFromContainedAssertionNode(containedAssertionNode, context),
|
|
674
673
|
frame = frameFromContainedAssertionNode(containedAssertionNode, context),
|
|
@@ -676,7 +675,7 @@ export function containedAssertionFromContainedAssertionNode(containedAssertionN
|
|
|
676
675
|
|
|
677
676
|
context = null;
|
|
678
677
|
|
|
679
|
-
const containedAssertion = new ContainedAssertion(context, string, node, term, frame, negated, statement);
|
|
678
|
+
const containedAssertion = new ContainedAssertion(context, string, node, lineIndex, term, frame, negated, statement);
|
|
680
679
|
|
|
681
680
|
return containedAssertion;
|
|
682
681
|
}
|
|
@@ -685,12 +684,13 @@ export function satisfiesAssertionFromSatisfiesAssertionNode(satisfiesAssertionN
|
|
|
685
684
|
const { SatisfiesAssertion } = elements,
|
|
686
685
|
node = satisfiesAssertionNode, ///
|
|
687
686
|
string = context.nodeAsString(node),
|
|
687
|
+
lineIndex = null,
|
|
688
688
|
signature = signatureFromSatisfiesAssertionNode(satisfiesAssertionNode, context),
|
|
689
689
|
reference = referenceFromSatisfiesAssertionNode(satisfiesAssertionNode, context);
|
|
690
690
|
|
|
691
691
|
context = null;
|
|
692
692
|
|
|
693
|
-
const satisfiesAssertion = new SatisfiesAssertion(context, string, node, signature, reference);
|
|
693
|
+
const satisfiesAssertion = new SatisfiesAssertion(context, string, node, lineIndex, signature, reference);
|
|
694
694
|
|
|
695
695
|
return satisfiesAssertion;
|
|
696
696
|
}
|
|
@@ -699,11 +699,12 @@ export function procedureReferenceFromProcedureReferenceNode(procedureReferenceN
|
|
|
699
699
|
const { ProcedureReference } = elements,
|
|
700
700
|
node = procedureReferenceNode, ///
|
|
701
701
|
string = context.nodeAsString(node),
|
|
702
|
+
lineIndex = null,
|
|
702
703
|
name = nameFromProcedureReferenceNode(procedureReferenceNode, context);
|
|
703
704
|
|
|
704
705
|
context = null;
|
|
705
706
|
|
|
706
|
-
const procedureRefereence = new ProcedureReference(context, string, node, name);
|
|
707
|
+
const procedureRefereence = new ProcedureReference(context, string, node, lineIndex, name);
|
|
707
708
|
|
|
708
709
|
return procedureRefereence;
|
|
709
710
|
}
|
|
@@ -712,12 +713,16 @@ export function variableDeclarationFromVariableDeclarationNode(variableDeclarati
|
|
|
712
713
|
const { VariableDeclaration } = elements,
|
|
713
714
|
node = variableDeclarationNode, ///
|
|
714
715
|
string = context.nodeAsString(node),
|
|
716
|
+
lineIndex = null,
|
|
715
717
|
typeNode = variableDeclarationNode.getTypeNode(),
|
|
716
718
|
provisional = variableDeclarationNode.isProvisional(),
|
|
717
719
|
variableNode = variableDeclarationNode.getVariableNode(),
|
|
718
720
|
type = typeFromTypeNode(typeNode, context),
|
|
719
|
-
variable = variableFromVariableNode(variableNode, context)
|
|
720
|
-
|
|
721
|
+
variable = variableFromVariableNode(variableNode, context);
|
|
722
|
+
|
|
723
|
+
context = null;
|
|
724
|
+
|
|
725
|
+
const variableDeclaration = new VariableDeclaration(context, string, node, lineIndex, type, variable, provisional);
|
|
721
726
|
|
|
722
727
|
return variableDeclaration;
|
|
723
728
|
}
|
|
@@ -726,9 +731,13 @@ export function metaLevelAssumptionFromMetaLevelAssumptionNode(metaLevelAssumpti
|
|
|
726
731
|
const { MetaLevelAssumption } = elements,
|
|
727
732
|
node = metaLevelAssumptionNode, ///
|
|
728
733
|
string = context.nodeAsString(node),
|
|
734
|
+
lineIndex = null,
|
|
729
735
|
reference = referenceFromMetaLevelAssumptionNode(metaLevelAssumptionNode, context),
|
|
730
|
-
statement = statementFromMetaLevelAssumptionNode(metaLevelAssumptionNode, context)
|
|
731
|
-
|
|
736
|
+
statement = statementFromMetaLevelAssumptionNode(metaLevelAssumptionNode, context);
|
|
737
|
+
|
|
738
|
+
context = null;
|
|
739
|
+
|
|
740
|
+
const metaLevelAssumption = new MetaLevelAssumption(context, string, node, lineIndex, reference, statement);
|
|
732
741
|
|
|
733
742
|
return metaLevelAssumption;
|
|
734
743
|
}
|
|
@@ -737,8 +746,12 @@ export function typePrefixDeclarationFromTypePrefixDeclarationNode(typePrefixDec
|
|
|
737
746
|
const { TypePrefixDeclaration } = elements,
|
|
738
747
|
node = typePrefixDeclarationNode, ///
|
|
739
748
|
string = context.nodeAsString(node), ///
|
|
740
|
-
|
|
741
|
-
|
|
749
|
+
lineIndex = null,
|
|
750
|
+
typePrefix = typePrefixFromTypePrefixDeclarationNode(typePrefixDeclarationNode, context);
|
|
751
|
+
|
|
752
|
+
context = null;
|
|
753
|
+
|
|
754
|
+
const typePrefixDeclaration = new TypePrefixDeclaration(context, string, node, lineIndex, typePrefix);
|
|
742
755
|
|
|
743
756
|
return typePrefixDeclaration;
|
|
744
757
|
}
|
|
@@ -747,8 +760,12 @@ export function combinatorDeclarationFromCombinatorDeclarationNode(combinatorDec
|
|
|
747
760
|
const { CombinatorDeclaration } = elements,
|
|
748
761
|
node = combinatorDeclarationNode, ///
|
|
749
762
|
string = context.nodeAsString(node),
|
|
750
|
-
|
|
751
|
-
|
|
763
|
+
lineIndex = null,
|
|
764
|
+
combinator = combinatorFromCombinatorDeclarationNode(combinatorDeclarationNode, context);
|
|
765
|
+
|
|
766
|
+
context = null;
|
|
767
|
+
|
|
768
|
+
const combinatorDeclaration = new CombinatorDeclaration(context, string, node, lineIndex, combinator);
|
|
752
769
|
|
|
753
770
|
return combinatorDeclaration;
|
|
754
771
|
}
|
|
@@ -757,10 +774,14 @@ export function simpleTypeDeclarationFromSimpleTypeDeclarationNode(simpleTypeDec
|
|
|
757
774
|
const { SimpleTypeDeclaration } = elements,
|
|
758
775
|
node = simpleTypeDeclarationNode, ///
|
|
759
776
|
string = context.nodeAsString(node),
|
|
777
|
+
lineIndex = null,
|
|
760
778
|
type = typeFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context),
|
|
761
779
|
superTypes = superTypesFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context),
|
|
762
|
-
provisional = provisionalFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context)
|
|
763
|
-
|
|
780
|
+
provisional = provisionalFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context);
|
|
781
|
+
|
|
782
|
+
context = null;
|
|
783
|
+
|
|
784
|
+
const simpleTypeDeclaration = new SimpleTypeDeclaration(context, string, node, lineIndex, type, superTypes, provisional);
|
|
764
785
|
|
|
765
786
|
return simpleTypeDeclaration;
|
|
766
787
|
}
|
|
@@ -769,10 +790,14 @@ export function referenceSubstitutionFromReferenceSubstitutionNode(referenceSubs
|
|
|
769
790
|
const { ReferenceSubstitution } = elements,
|
|
770
791
|
node = referenceSubstitutionNode, ///
|
|
771
792
|
string = context.nodeAsString(node),
|
|
793
|
+
lineIndex = null,
|
|
772
794
|
generalContext = generalContextFromReferenceSubstitutionNode(referenceSubstitutionNode, context),
|
|
773
795
|
targetReference = targetReferenceFromReferenceSubstitutionNode(referenceSubstitutionNode, context),
|
|
774
|
-
replacementReference = replacementReferenceFromReferenceSubstitutionNode(referenceSubstitutionNode, context)
|
|
775
|
-
|
|
796
|
+
replacementReference = replacementReferenceFromReferenceSubstitutionNode(referenceSubstitutionNode, context);
|
|
797
|
+
|
|
798
|
+
context = null;
|
|
799
|
+
|
|
800
|
+
const referenceSubstitution = new ReferenceSubstitution(context, string, node, lineIndex, generalContext, targetReference, replacementReference);
|
|
776
801
|
|
|
777
802
|
return referenceSubstitution;
|
|
778
803
|
}
|
|
@@ -782,12 +807,16 @@ export function statementSubstitutionFromStatementSubstitutionNode(statementSubs
|
|
|
782
807
|
const { StatementSubstitution } = elements,
|
|
783
808
|
node = statementSubstitutionNode, ///
|
|
784
809
|
string = context.nodeAsString(node),
|
|
810
|
+
lineIndex = null,
|
|
785
811
|
generalContext = generalContextFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
786
812
|
resolved = resolvedFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
787
813
|
substitution = substitutionFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
788
814
|
targetStatement = targetStatementFromStatementSubstitutionNode(statementSubstitutionNode, context),
|
|
789
|
-
replacementStatement = replacementStatementFromStatementSubstitutionNode(statementSubstitutionNode, context)
|
|
790
|
-
|
|
815
|
+
replacementStatement = replacementStatementFromStatementSubstitutionNode(statementSubstitutionNode, context);
|
|
816
|
+
|
|
817
|
+
context = null;
|
|
818
|
+
|
|
819
|
+
const statementSubstitution = new StatementSubstitution(context, string, node, lineIndex, generalContext, resolved, substitution, targetStatement, replacementStatement);
|
|
791
820
|
|
|
792
821
|
return statementSubstitution;
|
|
793
822
|
}
|
|
@@ -796,10 +825,14 @@ export function constructorDeclarationFromConstructorDeclarationNode(constructor
|
|
|
796
825
|
const { ConstructorDeclaration } = elements,
|
|
797
826
|
node = constructorDeclarationNode, ///
|
|
798
827
|
string = context.nodeAsString(node),
|
|
828
|
+
lineIndex = null,
|
|
799
829
|
type = typeFromConstructorDeclarationNode(constructorDeclarationNode, context),
|
|
800
830
|
provisional = provisionalFromConstructorDeclarationNode(constructorDeclarationNode, context),
|
|
801
|
-
constructor = constructorFromConstructorDeclarationNode(constructorDeclarationNode, context)
|
|
802
|
-
|
|
831
|
+
constructor = constructorFromConstructorDeclarationNode(constructorDeclarationNode, context);
|
|
832
|
+
|
|
833
|
+
context = null;
|
|
834
|
+
|
|
835
|
+
const constructorDeclaration = new ConstructorDeclaration(context, string, node, lineIndex, type, provisional, constructor);
|
|
803
836
|
|
|
804
837
|
return constructorDeclaration;
|
|
805
838
|
}
|
|
@@ -808,10 +841,14 @@ export function complexTypeDeclarationFromComplexTypeDeclarationNode(complexType
|
|
|
808
841
|
const { ComplexTypeDeclaration } = elements,
|
|
809
842
|
node = complexTypeDeclarationNode, ///
|
|
810
843
|
string = context.nodeAsString(node),
|
|
844
|
+
lineIndex = null,
|
|
811
845
|
type = typeFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context),
|
|
812
846
|
superTypes = superTypesFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context),
|
|
813
|
-
provisional = provisionalFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context)
|
|
814
|
-
|
|
847
|
+
provisional = provisionalFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context);
|
|
848
|
+
|
|
849
|
+
context = null;
|
|
850
|
+
|
|
851
|
+
const complexTypeDeclaration = new ComplexTypeDeclaration(context, string, node, lineIndex, type, superTypes, provisional);
|
|
815
852
|
|
|
816
853
|
return complexTypeDeclaration;
|
|
817
854
|
}
|
|
@@ -820,9 +857,13 @@ export function metavariableDeclarationFromMetavariableDeclarationNode(metavaria
|
|
|
820
857
|
const { MetavariableDeclaration } = elements,
|
|
821
858
|
node = metavariableDeclarationNode, ///
|
|
822
859
|
string = context.nodeAsString(node),
|
|
860
|
+
lineIndex = null,
|
|
823
861
|
metaType = metaTypeFromMetavariableDeclarationNode(metavariableDeclarationNode, context),
|
|
824
|
-
metavariable = metavariableFromMetavariableDeclarationNode(metavariableDeclarationNode, context)
|
|
825
|
-
|
|
862
|
+
metavariable = metavariableFromMetavariableDeclarationNode(metavariableDeclarationNode, context);
|
|
863
|
+
|
|
864
|
+
context = null;
|
|
865
|
+
|
|
866
|
+
const metavariableDeclaration = new MetavariableDeclaration(context, string, node, lineIndex, metaType, metavariable);
|
|
826
867
|
|
|
827
868
|
return metavariableDeclaration;
|
|
828
869
|
}
|