occam-verify-cli 1.0.843 → 1.0.847
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/bounded.js +18 -18
- package/lib/context/branching.js +8 -3
- package/lib/context/ephemeral.js +44 -71
- package/lib/context/file/nominal.js +18 -24
- package/lib/context/synoptic.js +135 -128
- package/lib/context.js +49 -31
- package/lib/element/assertion/contained.js +6 -3
- package/lib/element/assertion/defined.js +11 -4
- package/lib/element/assertion/property.js +6 -3
- package/lib/element/assertion/satisfies.js +6 -3
- package/lib/element/assertion/subproof.js +6 -3
- package/lib/element/assertion/type.js +5 -5
- package/lib/element/assumption/metaLevel.js +12 -10
- package/lib/element/assumption.js +2 -2
- package/lib/element/derivation.js +1 -8
- package/lib/element/equality.js +3 -3
- package/lib/element/equivalence.js +1 -8
- package/lib/element/error.js +1 -8
- package/lib/element/hypothesis.js +2 -2
- package/lib/element/judgement.js +15 -11
- package/lib/element/metaType.js +2 -2
- package/lib/element/metavariable.js +30 -35
- package/lib/element/parameter.js +2 -2
- package/lib/element/procedureCall.js +2 -2
- package/lib/element/procedureReference.js +2 -2
- package/lib/element/proof.js +1 -8
- package/lib/element/proofAssertion/premise.js +4 -3
- package/lib/element/proofAssertion/supposition.js +4 -3
- package/lib/element/section.js +1 -8
- package/lib/element/signature.js +2 -2
- package/lib/element/statement.js +2 -2
- package/lib/element/subDerivation.js +1 -8
- package/lib/element/subproof.js +1 -8
- package/lib/element/substitution/frame.js +20 -6
- package/lib/element/substitution/reference.js +20 -6
- package/lib/element/substitution/statement.js +19 -5
- package/lib/element/substitution/term.js +19 -5
- package/lib/element/substitution.js +12 -7
- package/lib/element/typePrefix.js +2 -2
- package/lib/process/unify.js +7 -2
- package/lib/utilities/element.js +3 -5
- package/lib/utilities/json.js +1 -15
- package/lib/utilities/synoptic.js +126 -0
- package/package.json +1 -1
- package/src/context/bounded.js +23 -23
- package/src/context/branching.js +12 -2
- package/src/context/ephemeral.js +94 -110
- package/src/context/file/nominal.js +18 -34
- package/src/context/synoptic.js +195 -150
- package/src/context.js +66 -42
- package/src/element/assertion/contained.js +8 -3
- package/src/element/assertion/defined.js +15 -4
- package/src/element/assertion/property.js +8 -3
- package/src/element/assertion/satisfies.js +10 -4
- package/src/element/assertion/subproof.js +8 -3
- package/src/element/assertion/type.js +10 -8
- package/src/element/assumption/metaLevel.js +13 -8
- package/src/element/assumption.js +2 -2
- package/src/element/derivation.js +0 -11
- package/src/element/equality.js +3 -3
- package/src/element/equivalence.js +0 -11
- package/src/element/error.js +0 -11
- package/src/element/hypothesis.js +2 -2
- package/src/element/judgement.js +22 -14
- package/src/element/metaType.js +2 -2
- package/src/element/metavariable.js +5 -13
- package/src/element/parameter.js +2 -2
- package/src/element/procedureCall.js +2 -2
- package/src/element/procedureReference.js +2 -2
- package/src/element/proof.js +0 -11
- package/src/element/proofAssertion/premise.js +3 -1
- package/src/element/proofAssertion/supposition.js +3 -1
- package/src/element/section.js +0 -11
- package/src/element/signature.js +2 -2
- package/src/element/statement.js +2 -2
- package/src/element/subDerivation.js +0 -11
- package/src/element/subproof.js +0 -11
- package/src/element/substitution/frame.js +31 -11
- package/src/element/substitution/reference.js +31 -11
- package/src/element/substitution/statement.js +33 -13
- package/src/element/substitution/term.js +31 -11
- package/src/element/substitution.js +16 -11
- package/src/element/typePrefix.js +2 -2
- package/src/process/unify.js +11 -4
- package/src/utilities/element.js +3 -6
- package/src/utilities/json.js +0 -12
- package/src/utilities/synoptic.js +105 -0
|
@@ -203,14 +203,19 @@ export default define(class PropertyAssertion extends Assertion {
|
|
|
203
203
|
context.addAssignment(variableAssigment);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
static name = "PropertyAssertion";
|
|
207
|
+
|
|
206
208
|
toJSON() {
|
|
207
|
-
const
|
|
209
|
+
const string = this.getString(),
|
|
210
|
+
lineIndex = this.getLineIndex(),
|
|
211
|
+
json = {
|
|
212
|
+
string,
|
|
213
|
+
lineIndex
|
|
214
|
+
};
|
|
208
215
|
|
|
209
216
|
return json;
|
|
210
217
|
}
|
|
211
218
|
|
|
212
|
-
static name = "PropertyAssertion";
|
|
213
|
-
|
|
214
219
|
static fromJSON(json, context) {
|
|
215
220
|
let propertyAssertion = null;
|
|
216
221
|
|
|
@@ -157,21 +157,27 @@ export default define(class SatisfiesAssertion extends Assertion {
|
|
|
157
157
|
return stepAndSubproofOrProofAssertionsUnify;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
static name = "SatisfiesAssertion";
|
|
161
|
+
|
|
160
162
|
toJSON() {
|
|
161
|
-
const
|
|
163
|
+
const string = this.getString(),
|
|
164
|
+
lineIndex = this.getLineIndex(),
|
|
165
|
+
json = {
|
|
166
|
+
string,
|
|
167
|
+
lineIndex
|
|
168
|
+
};
|
|
162
169
|
|
|
163
170
|
return json;
|
|
164
171
|
}
|
|
165
172
|
|
|
166
|
-
static name = "SatisfiesAssertion";
|
|
167
|
-
|
|
168
173
|
static fromJSON(json, context) {
|
|
169
174
|
let satisfiesAssertion = null;
|
|
170
175
|
|
|
171
176
|
const { name } = json;
|
|
172
177
|
|
|
173
178
|
if (this.name === name) {
|
|
174
|
-
instantiate((context) => {
|
|
179
|
+
instantiate((context) => {
|
|
180
|
+
const { string, lineIndex } = json,
|
|
175
181
|
definedAssertionNode = instantiateSatisfiesAssertion(string, context),
|
|
176
182
|
node = definedAssertionNode, ///
|
|
177
183
|
signature = signatureFromJSatisfiesAssertionNode(definedAssertionNode, context),
|
|
@@ -289,14 +289,19 @@ export default define(class SubproofAssertion extends Assertion {
|
|
|
289
289
|
return topLevelMetaAssertionUnifies;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
+
static name = "SubproofAssertion";
|
|
293
|
+
|
|
292
294
|
toJSON() {
|
|
293
|
-
const
|
|
295
|
+
const string = this.getString(),
|
|
296
|
+
lineIndex = this.getLineIndex(),
|
|
297
|
+
json = {
|
|
298
|
+
string,
|
|
299
|
+
lineIndex
|
|
300
|
+
};
|
|
294
301
|
|
|
295
302
|
return json;
|
|
296
303
|
}
|
|
297
304
|
|
|
298
|
-
static name = "SubproofAssertion";
|
|
299
|
-
|
|
300
305
|
static fromJSON(json, context) {
|
|
301
306
|
let subproorAssertion = null;
|
|
302
307
|
|
|
@@ -193,15 +193,17 @@ export default define(class TypeAssertion extends Assertion {
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
toJSON() {
|
|
196
|
-
const json = super.toJSON();
|
|
197
|
-
|
|
198
196
|
const typeJSON = typeToTypeJSON(this.type),
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
197
|
+
string = this.getString(),
|
|
198
|
+
lineIndex = this.getLineIndex(),
|
|
199
|
+
type = typeJSON,
|
|
200
|
+
json = {
|
|
201
|
+
string,
|
|
202
|
+
lineIndex,
|
|
203
|
+
type
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
return json;
|
|
205
207
|
}
|
|
206
208
|
|
|
207
209
|
static name = "TypeAssertion";
|
|
@@ -122,21 +122,24 @@ export default define(class MetaLevelAssumption extends Element {
|
|
|
122
122
|
const referenceString = this.reference.getString(),
|
|
123
123
|
metaLevelAssumptionString = this.getString(); ///
|
|
124
124
|
|
|
125
|
-
context.trace(`Validating the '${metaLevelAssumptionString}'
|
|
125
|
+
context.trace(`Validating the '${metaLevelAssumptionString}' meta-level assumption's '${referenceString}' reference...`);
|
|
126
126
|
|
|
127
127
|
const reference = this.reference.validate(context);
|
|
128
128
|
|
|
129
129
|
if (reference !== null) {
|
|
130
|
-
const
|
|
130
|
+
const context = reference.getContext(),
|
|
131
|
+
metavariable = this.reference.getMetavariable(),
|
|
131
132
|
metavariablePresent = context.isMetavariablePresent(metavariable, context);
|
|
132
133
|
|
|
133
134
|
if (metavariablePresent) {
|
|
135
|
+
this.reference = reference;
|
|
136
|
+
|
|
134
137
|
referenceValidates = true;
|
|
135
138
|
}
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
if (referenceValidates) {
|
|
139
|
-
context.debug(`...validated the '${metaLevelAssumptionString}'
|
|
142
|
+
context.debug(`...validated the '${metaLevelAssumptionString}' meta-level assumption's '${referenceString}' reference.`);
|
|
140
143
|
}
|
|
141
144
|
|
|
142
145
|
return referenceValidates;
|
|
@@ -148,7 +151,7 @@ export default define(class MetaLevelAssumption extends Element {
|
|
|
148
151
|
const metaLevelAssumptionString = this.getString(), ///
|
|
149
152
|
statementString = this.statement.getString();
|
|
150
153
|
|
|
151
|
-
context.trace(`Validating the '${metaLevelAssumptionString}'
|
|
154
|
+
context.trace(`Validating the '${metaLevelAssumptionString}' meta-level assumption's '${statementString}' statement...`);
|
|
152
155
|
|
|
153
156
|
descend((context) => {
|
|
154
157
|
const statement = this.statement.validate(context);
|
|
@@ -159,7 +162,7 @@ export default define(class MetaLevelAssumption extends Element {
|
|
|
159
162
|
}, context);
|
|
160
163
|
|
|
161
164
|
if (statementValidates) {
|
|
162
|
-
context.debug(`...validated the '${metaLevelAssumptionString}'
|
|
165
|
+
context.debug(`...validated the '${metaLevelAssumptionString}' meta-level assumption's '${statementString}' statement.`);
|
|
163
166
|
}
|
|
164
167
|
|
|
165
168
|
return statementValidates;
|
|
@@ -202,9 +205,11 @@ export default define(class MetaLevelAssumption extends Element {
|
|
|
202
205
|
|
|
203
206
|
return serialise((context) => {
|
|
204
207
|
const string = this.getString(),
|
|
208
|
+
lineIndex = this.getLineIndex(),
|
|
205
209
|
json = {
|
|
206
210
|
context,
|
|
207
|
-
string
|
|
211
|
+
string,
|
|
212
|
+
lineIndex
|
|
208
213
|
};
|
|
209
214
|
|
|
210
215
|
return json;
|
|
@@ -218,13 +223,13 @@ export default define(class MetaLevelAssumption extends Element {
|
|
|
218
223
|
|
|
219
224
|
unserialise((json, context) => {
|
|
220
225
|
instantiate((context) => {
|
|
221
|
-
const { string } = json,
|
|
226
|
+
const { string, lineIndex } = json,
|
|
222
227
|
metaLevelAssumptionNode = instantiateMetaLevelAssumption(string, context),
|
|
223
228
|
node = metaLevelAssumptionNode, ///
|
|
224
229
|
reference = referenceFromMetaLevelAssumptionNode(metaLevelAssumptionNode, context),
|
|
225
230
|
statement = statementFromMetaLevelAssumptionNode(metaLevelAssumptionNode, context);
|
|
226
231
|
|
|
227
|
-
metaLevelAssumption = new MetaLevelAssumption(context, string, node, reference, statement);
|
|
232
|
+
metaLevelAssumption = new MetaLevelAssumption(context, string, node, lineIndex, reference, statement);
|
|
228
233
|
}, context);
|
|
229
234
|
}, json, context);
|
|
230
235
|
|
|
@@ -267,6 +267,8 @@ export default define(class Assumption extends Element {
|
|
|
267
267
|
return topLevelMetaAssertionUnifies;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
+
static name = "Assumption";
|
|
271
|
+
|
|
270
272
|
toJSON() {
|
|
271
273
|
const string = this.getString(),
|
|
272
274
|
lineIndex = this.getLineIndex(),
|
|
@@ -278,8 +280,6 @@ export default define(class Assumption extends Element {
|
|
|
278
280
|
return json;
|
|
279
281
|
}
|
|
280
282
|
|
|
281
|
-
static name = "Assumption";
|
|
282
|
-
|
|
283
283
|
static fromJSON(json, context) {
|
|
284
284
|
const assumption = instantiate((context) => {
|
|
285
285
|
const { string, lineIndex } = json,
|
|
@@ -52,17 +52,6 @@ export default define(class Derivation extends Element {
|
|
|
52
52
|
return verifies;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
toJSON() {
|
|
56
|
-
const string = this.getString(),
|
|
57
|
-
lineIndex = this.getLineIndex(),
|
|
58
|
-
json = {
|
|
59
|
-
string,
|
|
60
|
-
lineIndex
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
return json;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
55
|
static name = "Derivation";
|
|
67
56
|
});
|
|
68
57
|
|
package/src/element/equality.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { Element } from "occam-languages";
|
|
4
4
|
|
|
5
5
|
import { define } from "../elements";
|
|
6
|
-
import { instantiate } from "../utilities/context";
|
|
7
6
|
import { equateTerms } from "../process/equate";
|
|
7
|
+
import { instantiate } from "../utilities/context";
|
|
8
8
|
import { instantiateEquality } from "../process/instantiate";
|
|
9
9
|
import { equalityFromStatementNode } from "../utilities/element";
|
|
10
10
|
import { equalityAssignmentFromEquality, leftVariableAssignmentFromEquality, rightVariableAssignmentFromEquality } from "../process/assign";
|
|
@@ -259,8 +259,6 @@ export default define(class Equality extends Element {
|
|
|
259
259
|
context.addAssignment(rightVariableAssignment);
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
static name = "Equality";
|
|
263
|
-
|
|
264
262
|
toJSON() {
|
|
265
263
|
const string = this.getString(),
|
|
266
264
|
lineIndex = this.getLineIndex(),
|
|
@@ -272,6 +270,8 @@ export default define(class Equality extends Element {
|
|
|
272
270
|
return json;
|
|
273
271
|
}
|
|
274
272
|
|
|
273
|
+
static name = "Equality";
|
|
274
|
+
|
|
275
275
|
static fromJSON(json, context) {
|
|
276
276
|
return instantiate((context) => {
|
|
277
277
|
const { string, lineIndex } = json,
|
|
@@ -231,17 +231,6 @@ export default define(class Equivalence extends Element {
|
|
|
231
231
|
return equivalence;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
toJSON() {
|
|
235
|
-
const string = this.getString(),
|
|
236
|
-
lineIndex = this.getLineIndex(),
|
|
237
|
-
json = {
|
|
238
|
-
string,
|
|
239
|
-
lineIndex
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
return json;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
234
|
static name = "Equivalence";
|
|
246
235
|
|
|
247
236
|
static fromEquality(equality, context) {
|
package/src/element/error.js
CHANGED
|
@@ -22,16 +22,5 @@ export default define(class Error extends Element {
|
|
|
22
22
|
return verifies;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
toJSON() {
|
|
26
|
-
const string = this.getString(),
|
|
27
|
-
lineIndex = this.getLineIndex(),
|
|
28
|
-
json = {
|
|
29
|
-
string,
|
|
30
|
-
lineIndex
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return json;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
25
|
static name = "Error";
|
|
37
26
|
});
|
|
@@ -89,6 +89,8 @@ export default define(class Hypothesis extends Element {
|
|
|
89
89
|
return verifies;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
static name = "Hypothesis";
|
|
93
|
+
|
|
92
94
|
toJSON() {
|
|
93
95
|
const string = this.getString(),
|
|
94
96
|
lineIndex = this.getLineIndex(),
|
|
@@ -100,8 +102,6 @@ export default define(class Hypothesis extends Element {
|
|
|
100
102
|
return json;
|
|
101
103
|
}
|
|
102
104
|
|
|
103
|
-
static name = "Hypothesis";
|
|
104
|
-
|
|
105
105
|
static fromJSON(json, context) {
|
|
106
106
|
return instantiate((context) => {
|
|
107
107
|
const { string, lineIndex } = json,
|
package/src/element/judgement.js
CHANGED
|
@@ -38,6 +38,14 @@ export default define(class Judgement extends Element {
|
|
|
38
38
|
return singular;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
isEqualTo(judgement) {
|
|
42
|
+
const judgementNode = judgement.getNode(),
|
|
43
|
+
judgementNodeMatches = this.matchJudgementNode(judgementNode),
|
|
44
|
+
equalTo = judgementNodeMatches; ///
|
|
45
|
+
|
|
46
|
+
return equalTo;
|
|
47
|
+
}
|
|
48
|
+
|
|
41
49
|
getAssumptions() { return this.frame.getAssumptions(); }
|
|
42
50
|
|
|
43
51
|
getMetavariable() { return this.frame.getMetavariable(); }
|
|
@@ -193,13 +201,13 @@ export default define(class Judgement extends Element {
|
|
|
193
201
|
const metavariableNode = this.getMetavariableNode(),
|
|
194
202
|
topLevelMetaAssertion = this.getTopLevelMetaAssertion(),
|
|
195
203
|
metaLevelAssumptions = topLevelMetaAssertion.getMetaLevelAssumptions(),
|
|
196
|
-
|
|
204
|
+
declaredJudgements = context.findDeclaredJudgementsByMetavariableNode(metavariableNode);
|
|
197
205
|
|
|
198
206
|
let assumptions;
|
|
199
207
|
|
|
200
208
|
assumptions = this.getAssumptions();
|
|
201
209
|
|
|
202
|
-
assumptions =
|
|
210
|
+
assumptions = assumptionsFromDeclaredJudgements(declaredJudgements, assumptions);
|
|
203
211
|
|
|
204
212
|
reconcile((context) => {
|
|
205
213
|
const metaLevelAssumptionsUnify = metaLevelAssumptions.every((metaLevelAssumption) => {
|
|
@@ -241,6 +249,8 @@ export default define(class Judgement extends Element {
|
|
|
241
249
|
context.addAssignment(judgementAssignment);
|
|
242
250
|
}
|
|
243
251
|
|
|
252
|
+
static name = "Judgement";
|
|
253
|
+
|
|
244
254
|
toJSON() {
|
|
245
255
|
const string = this.getString(),
|
|
246
256
|
lineIndex = this.getLineIndex(),
|
|
@@ -252,8 +262,6 @@ export default define(class Judgement extends Element {
|
|
|
252
262
|
return json;
|
|
253
263
|
}
|
|
254
264
|
|
|
255
|
-
static name = "Judgement";
|
|
256
|
-
|
|
257
265
|
static fromJSON(json, context) {
|
|
258
266
|
return instantiate((context) => {
|
|
259
267
|
const { string, lineIndex } = json,
|
|
@@ -285,19 +293,19 @@ function frameFromJudgementNode(judgementNode, context) {
|
|
|
285
293
|
return frame;
|
|
286
294
|
}
|
|
287
295
|
|
|
288
|
-
function assumptionsFromJudgements(judgements, assumptions = []) {
|
|
289
|
-
judgements.map((judgement) => {
|
|
290
|
-
const assumption = judgement.getAssumption();
|
|
291
|
-
|
|
292
|
-
assumptions.push(assumption);
|
|
293
|
-
});
|
|
294
|
-
|
|
295
|
-
return assumptions;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
296
|
function assumptionFromJudgementNode(judgementNode, context) {
|
|
299
297
|
const assumptionNode = judgementNode.getAssumptionNode(),
|
|
300
298
|
assumption = context.findAssumptionByAssumptionNode(assumptionNode);
|
|
301
299
|
|
|
302
300
|
return assumption;
|
|
303
301
|
}
|
|
302
|
+
|
|
303
|
+
function assumptionsFromDeclaredJudgements(declaredJudgements, assumptions = []) {
|
|
304
|
+
declaredJudgements.map((declaredJudgement) => {
|
|
305
|
+
const assumption = declaredJudgement.getAssumption();
|
|
306
|
+
|
|
307
|
+
assumptions.push(assumption);
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
return assumptions;
|
|
311
|
+
}
|
package/src/element/metaType.js
CHANGED
|
@@ -34,6 +34,8 @@ export default define(class MetaType extends Element {
|
|
|
34
34
|
return comparesToMetaTypeName;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
static name = "MetaType";
|
|
38
|
+
|
|
37
39
|
toJSON() {
|
|
38
40
|
const string = this.getString(),
|
|
39
41
|
lineIndex = this.getLineIndex(),
|
|
@@ -45,8 +47,6 @@ export default define(class MetaType extends Element {
|
|
|
45
47
|
return json;
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
static name = "MetaType";
|
|
49
|
-
|
|
50
50
|
static fromJSON(json, context) {
|
|
51
51
|
const { string } = json,
|
|
52
52
|
metaTypeName = string, ///
|
|
@@ -160,8 +160,6 @@ export default define(class Metavariable extends Element {
|
|
|
160
160
|
this.type = type;
|
|
161
161
|
|
|
162
162
|
typeVerifies = true;
|
|
163
|
-
|
|
164
|
-
context.error(`Type '${typeName}' is not present.`);
|
|
165
163
|
}
|
|
166
164
|
|
|
167
165
|
if (typeVerifies) {
|
|
@@ -264,7 +262,7 @@ export default define(class Metavariable extends Element {
|
|
|
264
262
|
let term = null;
|
|
265
263
|
|
|
266
264
|
if (declaredMetavaraible !== null) {
|
|
267
|
-
const type =
|
|
265
|
+
const type = declaredMetavaraible.getType();
|
|
268
266
|
|
|
269
267
|
if (type !== null) {
|
|
270
268
|
term = this.term.validateGivenType(type, context);
|
|
@@ -475,15 +473,9 @@ export default define(class Metavariable extends Element {
|
|
|
475
473
|
unifyMetavariable(metavariable, context) {
|
|
476
474
|
let metavariableUnifies;
|
|
477
475
|
|
|
478
|
-
const
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
const generalContext = context; ///
|
|
483
|
-
|
|
484
|
-
context = specificContext; ///
|
|
485
|
-
|
|
486
|
-
const generalMetavariable = this, ///
|
|
476
|
+
const generalContext = context, ///
|
|
477
|
+
specificContext = context, ///
|
|
478
|
+
generalMetavariable = this, ///
|
|
487
479
|
specificMetavariable = metavariable, ///
|
|
488
480
|
generalMetavariableString = generalMetavariable.getString(),
|
|
489
481
|
specificMetavariableString = specificMetavariable.getString();
|
|
@@ -637,7 +629,7 @@ export default define(class Metavariable extends Element {
|
|
|
637
629
|
toJSON() {
|
|
638
630
|
const metaTypeJSON = metaTypeToMetaTypeJSON(this.metaType),
|
|
639
631
|
metaType = metaTypeJSON, ///
|
|
640
|
-
string = this.getString(),
|
|
632
|
+
string = this.getString(),
|
|
641
633
|
lineIndex = this.getLineIndex(),
|
|
642
634
|
json = {
|
|
643
635
|
string,
|
package/src/element/parameter.js
CHANGED
|
@@ -49,6 +49,8 @@ export default define(class Parameter extends Element {
|
|
|
49
49
|
return primitive;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
static name = "Parameter";
|
|
53
|
+
|
|
52
54
|
toJSON() {
|
|
53
55
|
const string = this.getString(),
|
|
54
56
|
lineIndex = this.getLineIndex(),
|
|
@@ -60,8 +62,6 @@ export default define(class Parameter extends Element {
|
|
|
60
62
|
return json;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
static name = "Parameter";
|
|
64
|
-
|
|
65
65
|
static fromJSON(json, context) {
|
|
66
66
|
return instantiate((context) => {
|
|
67
67
|
const { string, lineIndex } = json,
|
|
@@ -118,6 +118,8 @@ export default define(class ProcedureCall extends Element {
|
|
|
118
118
|
return unifiesIndependently;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
static name = "ProcedureCall";
|
|
122
|
+
|
|
121
123
|
toJSON() {
|
|
122
124
|
const string = this.getString(),
|
|
123
125
|
lineIndex = this.getLineIndex(),
|
|
@@ -129,8 +131,6 @@ export default define(class ProcedureCall extends Element {
|
|
|
129
131
|
return json;
|
|
130
132
|
}
|
|
131
133
|
|
|
132
|
-
static name = "ProcedureCall";
|
|
133
|
-
|
|
134
134
|
static fromJSON(json, context) {
|
|
135
135
|
return instantiate((context) => {
|
|
136
136
|
const { string, lineIndex } = json,
|
|
@@ -31,6 +31,8 @@ export default define(class ProcedureReference extends Element {
|
|
|
31
31
|
return procedureName;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
static name = "ProcedureReference";
|
|
35
|
+
|
|
34
36
|
toJSON() {
|
|
35
37
|
const string = this.getString(),
|
|
36
38
|
lineIndex = this.getLineIndex(),
|
|
@@ -42,8 +44,6 @@ export default define(class ProcedureReference extends Element {
|
|
|
42
44
|
return json;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
|
-
static name = "ProcedureReference";
|
|
46
|
-
|
|
47
47
|
static fromJSON(json, context) {
|
|
48
48
|
return instantiate((context) => {
|
|
49
49
|
const { string, lineIndex } = json,
|
package/src/element/proof.js
CHANGED
|
@@ -57,16 +57,5 @@ export default define(class Proof extends Element {
|
|
|
57
57
|
return verifies;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
toJSON() {
|
|
61
|
-
const string = this.getString(),
|
|
62
|
-
lineIndex = this.getLineIndex(),
|
|
63
|
-
json = {
|
|
64
|
-
string,
|
|
65
|
-
lineIndex
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
return json;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
60
|
static name = "Proof";
|
|
72
61
|
});
|
|
@@ -289,9 +289,11 @@ export default define(class Premise extends ProofAssertion {
|
|
|
289
289
|
|
|
290
290
|
return serialise((context) => {
|
|
291
291
|
const string = this.getString(),
|
|
292
|
+
lineIndex = this.getLineIndex(),
|
|
292
293
|
json = {
|
|
293
294
|
context,
|
|
294
|
-
string
|
|
295
|
+
string,
|
|
296
|
+
lineIndex
|
|
295
297
|
};
|
|
296
298
|
|
|
297
299
|
return json;
|
|
@@ -311,9 +311,11 @@ export default define(class Supposition extends ProofAssertion {
|
|
|
311
311
|
|
|
312
312
|
return serialise((context) => {
|
|
313
313
|
const string = this.getString(),
|
|
314
|
+
lineIndex = this.getLineIndex(),
|
|
314
315
|
json = {
|
|
315
316
|
context,
|
|
316
|
-
string
|
|
317
|
+
string,
|
|
318
|
+
lineIndex
|
|
317
319
|
};
|
|
318
320
|
|
|
319
321
|
return json;
|
package/src/element/section.js
CHANGED
|
@@ -81,16 +81,5 @@ export default define(class Section extends Element {
|
|
|
81
81
|
return hypothesesVerify;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
toJSON() {
|
|
85
|
-
const string = this.getString(),
|
|
86
|
-
lineIndex = this.getLineIndex(),
|
|
87
|
-
json = {
|
|
88
|
-
string,
|
|
89
|
-
lineIndex
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
return json;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
84
|
static name = "Section";
|
|
96
85
|
});
|
package/src/element/signature.js
CHANGED
|
@@ -216,6 +216,8 @@ export default define(class Signature extends Element {
|
|
|
216
216
|
return substitutionsCorrelates;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
static name = "Signature";
|
|
220
|
+
|
|
219
221
|
toJSON() {
|
|
220
222
|
const string = this.getString(),
|
|
221
223
|
lineIndex = this.getLineIndex(),
|
|
@@ -227,8 +229,6 @@ export default define(class Signature extends Element {
|
|
|
227
229
|
return json;
|
|
228
230
|
}
|
|
229
231
|
|
|
230
|
-
static name = "Signature";
|
|
231
|
-
|
|
232
232
|
static fromJSON(json, context) {
|
|
233
233
|
return instantiate((context) => {
|
|
234
234
|
const { string, lineIndex } = json,
|
package/src/element/statement.js
CHANGED
|
@@ -370,6 +370,8 @@ export default define(class Statement extends Element {
|
|
|
370
370
|
return topLevelAssertionUnifies;
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
+
static name = "Statement";
|
|
374
|
+
|
|
373
375
|
toJSON() {
|
|
374
376
|
const string = this.getString(),
|
|
375
377
|
lineIndex = this.getLineIndex(),
|
|
@@ -381,8 +383,6 @@ export default define(class Statement extends Element {
|
|
|
381
383
|
return json;
|
|
382
384
|
}
|
|
383
385
|
|
|
384
|
-
static name = "Statement";
|
|
385
|
-
|
|
386
386
|
static fromJSON(json, context) {
|
|
387
387
|
return instantiate((context) => {
|
|
388
388
|
const { string, lineIndex } = json,
|
|
@@ -52,16 +52,5 @@ export default define(class SubDerivation extends Element {
|
|
|
52
52
|
return verifies;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
toJSON() {
|
|
56
|
-
const string = this.getString(),
|
|
57
|
-
lineIndex = this.getLineIndex(),
|
|
58
|
-
json = {
|
|
59
|
-
string,
|
|
60
|
-
lineIndex
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
return json;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
55
|
static name = "SubDerivation";
|
|
67
56
|
});
|
package/src/element/subproof.js
CHANGED
|
@@ -147,16 +147,5 @@ export default define(class Subproof extends Element {
|
|
|
147
147
|
return unifiesWithSatisfiesAssertion;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
toJSON() {
|
|
151
|
-
const string = this.getString(),
|
|
152
|
-
lineIndex = this.getLineIndex(),
|
|
153
|
-
json = {
|
|
154
|
-
string,
|
|
155
|
-
lineIndex
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
return json;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
150
|
static name = "Subproof";
|
|
162
151
|
});
|