occam-verify-cli 1.0.956 → 1.0.973
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 +11 -7
- package/lib/context.js +17 -5
- package/lib/element/assertion/signature.js +17 -19
- package/lib/element/assertion/subproof.js +36 -39
- package/lib/element/assertion/type.js +20 -1
- package/lib/element/assumption/metaLevel.js +18 -17
- package/lib/element/assumption.js +52 -3
- package/lib/element/combinator.js +10 -12
- package/lib/element/conclusion.js +33 -33
- package/lib/element/constructor.js +7 -11
- package/lib/element/deduction.js +33 -33
- package/lib/element/equivalence.js +11 -7
- package/lib/element/hypothesis.js +45 -19
- package/lib/element/judgement.js +1 -1
- package/lib/element/label.js +9 -11
- package/lib/element/proofAssertion/premise.js +98 -87
- package/lib/element/proofAssertion/step.js +27 -27
- package/lib/element/proofAssertion/supposition.js +99 -88
- package/lib/element/proofAssertion.js +3 -3
- package/lib/element/reference.js +30 -38
- package/lib/element/signature.js +38 -47
- package/lib/element/statement.js +18 -58
- package/lib/element/substitution/frame.js +34 -42
- package/lib/element/substitution/reference.js +12 -13
- package/lib/element/substitution/statement.js +26 -31
- package/lib/element/substitution/term.js +32 -37
- package/lib/element/term.js +2 -2
- package/lib/element/topLevelAssertion/axiom.js +33 -34
- package/lib/element/topLevelAssertion.js +30 -7
- package/lib/element/topLevelMetaAssertion.js +2 -2
- package/lib/process/discharge.js +38 -0
- package/lib/process/unification.js +228 -0
- package/lib/process/unify.js +9 -5
- package/lib/process/validation.js +291 -0
- package/lib/utilities/context.js +69 -105
- package/lib/utilities/element.js +2 -4
- package/lib/utilities/string.js +4 -4
- package/package.json +1 -1
- package/src/context/bounded.js +19 -7
- package/src/context.js +26 -6
- package/src/element/assertion/signature.js +21 -26
- package/src/element/assertion/subproof.js +43 -45
- package/src/element/assertion/type.js +30 -1
- package/src/element/assumption/metaLevel.js +26 -22
- package/src/element/assumption.js +80 -2
- package/src/element/combinator.js +11 -14
- package/src/element/conclusion.js +38 -37
- package/src/element/constructor.js +8 -13
- package/src/element/deduction.js +38 -37
- package/src/element/equivalence.js +17 -13
- package/src/element/hypothesis.js +59 -19
- package/src/element/judgement.js +1 -1
- package/src/element/label.js +10 -12
- package/src/element/proofAssertion/premise.js +123 -107
- package/src/element/proofAssertion/step.js +29 -29
- package/src/element/proofAssertion/supposition.js +124 -108
- package/src/element/proofAssertion.js +2 -2
- package/src/element/reference.js +36 -47
- package/src/element/signature.js +42 -53
- package/src/element/statement.js +18 -89
- package/src/element/substitution/frame.js +45 -58
- package/src/element/substitution/reference.js +13 -16
- package/src/element/substitution/statement.js +27 -34
- package/src/element/substitution/term.js +37 -46
- package/src/element/term.js +1 -1
- package/src/element/topLevelAssertion/axiom.js +43 -45
- package/src/element/topLevelAssertion.js +42 -6
- package/src/element/topLevelMetaAssertion.js +2 -2
- package/src/process/discharge.js +33 -0
- package/src/{utilities → process}/unification.js +21 -27
- package/src/process/unify.js +9 -5
- package/src/{utilities → process}/validation.js +2 -2
- package/src/utilities/context.js +77 -128
- package/src/utilities/element.js +2 -5
- package/src/utilities/string.js +6 -6
- package/lib/context/ephemeral.js +0 -28
- package/lib/context/synoptic.js +0 -255
- package/lib/utilities/unification.js +0 -233
- package/lib/utilities/validation.js +0 -291
- package/src/context/ephemeral.js +0 -17
- package/src/context/synoptic.js +0 -361
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import elements from "../elements";
|
|
4
4
|
|
|
5
|
-
import { descend } from "./context";
|
|
6
|
-
|
|
7
5
|
async function unifyStepWithRule(step, context) {
|
|
8
6
|
let stepUnifiesWithRule = false;
|
|
9
7
|
|
|
@@ -224,8 +222,8 @@ async function unifyStepAsUnqualifiedSignatureAssertion(step, context) {
|
|
|
224
222
|
return stepUnifiesAsUnqualifiedSignatureAssertion;
|
|
225
223
|
}
|
|
226
224
|
|
|
227
|
-
async function
|
|
228
|
-
let
|
|
225
|
+
async function unifyStepAsQualifiedMetaLevelAssumption(step, context) {
|
|
226
|
+
let stepUnifiesAsQualifiedMetaLevelAssumption = false;
|
|
229
227
|
|
|
230
228
|
const metaLevel = context.isMetaLevel();
|
|
231
229
|
|
|
@@ -234,37 +232,33 @@ async function validateStepAsMetaLevelAssumption(step, context) {
|
|
|
234
232
|
|
|
235
233
|
if (reference !== null) {
|
|
236
234
|
const stepString = step.getString(),
|
|
237
|
-
|
|
235
|
+
referenceString = reference.getString();
|
|
238
236
|
|
|
239
|
-
|
|
240
|
-
context.trace(`Validating the '${stepString}' step as a meta-level assumption...`);
|
|
237
|
+
context.trace(`Unifying the '${stepString}' step as a meta-level assumption with the '${referenceString}' reference...`);
|
|
241
238
|
|
|
242
|
-
|
|
243
|
-
let metaLevelAssumption;
|
|
239
|
+
let metaLevelAssumption;
|
|
244
240
|
|
|
245
|
-
|
|
241
|
+
const { MetaLevelAssumption } = elements;
|
|
246
242
|
|
|
247
|
-
|
|
243
|
+
metaLevelAssumption = MetaLevelAssumption.fromStep(step, context);
|
|
248
244
|
|
|
249
|
-
|
|
245
|
+
metaLevelAssumption = metaLevelAssumption.validate(context); ///
|
|
250
246
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}, context);
|
|
247
|
+
if (metaLevelAssumption !== null) {
|
|
248
|
+
stepUnifiesAsQualifiedMetaLevelAssumption = true;
|
|
249
|
+
}
|
|
255
250
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
251
|
+
if (stepUnifiesAsQualifiedMetaLevelAssumption) {
|
|
252
|
+
context.debug(`...unified the '${stepString}' step as a meta-level assumption with the '${referenceString}' reference.`);
|
|
259
253
|
}
|
|
260
254
|
}
|
|
261
255
|
}
|
|
262
256
|
|
|
263
|
-
return
|
|
257
|
+
return stepUnifiesAsQualifiedMetaLevelAssumption;
|
|
264
258
|
}
|
|
265
259
|
|
|
266
|
-
async function
|
|
267
|
-
let
|
|
260
|
+
async function unifyStepAsQualifiedSignatureAssertion(step, context) {
|
|
261
|
+
let stepUnifiesAsQualifiedSignatureAssertion = false;
|
|
268
262
|
|
|
269
263
|
const reference = step.getReference();
|
|
270
264
|
|
|
@@ -285,17 +279,17 @@ async function unifyStepAsSignatureAssertion(step, context) {
|
|
|
285
279
|
const unifyTopLevelAssertion = await signatureAssertion.unifyTopLevelAssertion(topLevelAssertion, context);
|
|
286
280
|
|
|
287
281
|
if (unifyTopLevelAssertion) {
|
|
288
|
-
|
|
282
|
+
stepUnifiesAsQualifiedSignatureAssertion = true;
|
|
289
283
|
}
|
|
290
284
|
|
|
291
|
-
if (
|
|
285
|
+
if (stepUnifiesAsQualifiedSignatureAssertion) {
|
|
292
286
|
context.debug(`...unified the '${stepString}' step as a signature assertion with the '${referenceString}' reference.`);
|
|
293
287
|
}
|
|
294
288
|
}
|
|
295
289
|
}
|
|
296
290
|
}
|
|
297
291
|
|
|
298
|
-
return
|
|
292
|
+
return stepUnifiesAsQualifiedSignatureAssertion;
|
|
299
293
|
}
|
|
300
294
|
|
|
301
295
|
async function compareStepWithSubproofOrProofAssertions(step, context) {
|
|
@@ -332,7 +326,7 @@ export const unifySteps = [
|
|
|
332
326
|
unifyStepAsUnqualifiedTypeAssertion,
|
|
333
327
|
unifyStepAsUnqualifiedPropertyAssertion,
|
|
334
328
|
unifyStepAsUnqualifiedSignatureAssertion,
|
|
335
|
-
|
|
336
|
-
|
|
329
|
+
unifyStepAsQualifiedMetaLevelAssumption,
|
|
330
|
+
unifyStepAsQualifiedSignatureAssertion,
|
|
337
331
|
compareStepWithSubproofOrProofAssertions
|
|
338
332
|
];
|
package/src/process/unify.js
CHANGED
|
@@ -4,6 +4,7 @@ import { queryUtilities, ZipPass as ZipPassBase } from "occam-languages";
|
|
|
4
4
|
|
|
5
5
|
import ZipPass from "../pass/zip";
|
|
6
6
|
|
|
7
|
+
import { reconcile } from "../utilities/context";
|
|
7
8
|
import { FRAME_META_TYPE_NAME, STATEMENT_META_TYPE_NAME } from "../metaTypeNames";
|
|
8
9
|
import { termFromTermNode, frameFromFrameNode, statementFromStatementNode } from "../utilities/element";
|
|
9
10
|
|
|
@@ -159,12 +160,15 @@ class MetaLevelPass extends ZipPassBase {
|
|
|
159
160
|
|
|
160
161
|
context = specificContext; ///
|
|
161
162
|
|
|
162
|
-
const specificSignature = context.findSignatureBySignatureNode(specificSignatureNode)
|
|
163
|
-
signatureUnifies = generalSignature.unifySignature(specificSignature, generalContext, specificContext);
|
|
163
|
+
const specificSignature = context.findSignatureBySignatureNode(specificSignatureNode);
|
|
164
164
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
reconcile((context) => {
|
|
166
|
+
const signatureUnifies = generalSignature.unifySignature(specificSignature, context);
|
|
167
|
+
|
|
168
|
+
if (signatureUnifies) {
|
|
169
|
+
success = true;
|
|
170
|
+
}
|
|
171
|
+
}, context)
|
|
168
172
|
|
|
169
173
|
return success;
|
|
170
174
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import elements from "../elements";
|
|
4
4
|
|
|
5
|
-
import { choose, descend } from "
|
|
6
|
-
import { provisionallyStringFromProvisional } from "
|
|
5
|
+
import { choose, descend } from "../utilities/context";
|
|
6
|
+
import { provisionallyStringFromProvisional } from "../utilities/string";
|
|
7
7
|
import { bracketedConstructorFromNothing, bracketedCombinatorFromNothing } from "../utilities/instance";
|
|
8
8
|
|
|
9
9
|
function validateTermAsVariable(term, context, validateForwards) {
|
package/src/utilities/context.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import MnemicContext from "../context/mnemic";
|
|
4
4
|
import NestedContext from "../context/nested";
|
|
5
5
|
import TheticContext from "../context/thetic";
|
|
6
6
|
import AphasicContext from "../context/aphasic";
|
|
@@ -9,33 +9,16 @@ import NominalContext from "../context/nominal";
|
|
|
9
9
|
import LiteralContext from "../context/literal";
|
|
10
10
|
import LiminalContext from "../context/liminal";
|
|
11
11
|
import PhanericContext from "../context/phaneric";
|
|
12
|
-
import SynopticContext from "../context/synoptic";
|
|
13
12
|
import IllativeContext from "../context/illative";
|
|
14
|
-
import EphemeralContext from "../context/ephemeral";
|
|
15
13
|
import BranchingContext from "../context/branching";
|
|
16
14
|
import NominalFileContext from "../context/file/nominal";
|
|
17
15
|
|
|
18
16
|
import { mnemicContextFromJSON, mnemicContextsFromJSON, mnemicContextToMnemicContextJSON, mnemicContextsToMnemicContextsJSON } from "../utilities/json";
|
|
19
17
|
|
|
20
|
-
export function
|
|
21
|
-
|
|
22
|
-
if (context !== null) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const synopticContext = SynopticContext.fromContexts(contexts),
|
|
28
|
-
context = synopticContext; ///
|
|
29
|
-
|
|
30
|
-
return innerFunction(context);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function posit(innerFunction, context) {
|
|
34
|
-
const ephemeralContext = EphemeralContext.fromNothing(context);
|
|
35
|
-
|
|
36
|
-
context = ephemeralContext; ///
|
|
18
|
+
export function evaluate(procedure, terms) {
|
|
19
|
+
const context = procedure.getContext();
|
|
37
20
|
|
|
38
|
-
return
|
|
21
|
+
return procedure.call(terms, context);
|
|
39
22
|
}
|
|
40
23
|
|
|
41
24
|
export function ground(innerFunction) {
|
|
@@ -52,83 +35,80 @@ export function ground(innerFunction) {
|
|
|
52
35
|
return innerFunction(context);
|
|
53
36
|
}
|
|
54
37
|
|
|
55
|
-
export function
|
|
56
|
-
|
|
57
|
-
context = forced; ///
|
|
38
|
+
export function declare(innerFunction, context) {
|
|
39
|
+
const theticContext = TheticContext.fromNothing(context);
|
|
58
40
|
|
|
59
|
-
|
|
60
|
-
}
|
|
41
|
+
context = theticContext; ///
|
|
61
42
|
|
|
62
|
-
|
|
43
|
+
return innerFunction(context);
|
|
44
|
+
}
|
|
63
45
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
46
|
+
export function derive(innerFunction, context) {
|
|
47
|
+
const illativeContext = IllativeContext.fromNothing(context);
|
|
48
|
+
|
|
49
|
+
context = illativeContext; ///
|
|
67
50
|
|
|
68
51
|
return innerFunction(context);
|
|
69
52
|
}
|
|
70
53
|
|
|
71
|
-
export function
|
|
72
|
-
const
|
|
54
|
+
export function elide(innerFunction, context) {
|
|
55
|
+
const aphasicContext = AphasicContext.fromNothing(context);
|
|
73
56
|
|
|
74
|
-
context =
|
|
57
|
+
context = aphasicContext; ///
|
|
75
58
|
|
|
76
59
|
return innerFunction(context);
|
|
77
60
|
}
|
|
78
61
|
|
|
79
|
-
export function
|
|
80
|
-
const
|
|
62
|
+
export function enclose(innerFunction, context) {
|
|
63
|
+
const boundedContext = BoundedContext.fromNothing(context);
|
|
81
64
|
|
|
82
|
-
context =
|
|
65
|
+
context = boundedContext; ///
|
|
83
66
|
|
|
84
67
|
return innerFunction(context);
|
|
85
68
|
}
|
|
86
69
|
|
|
87
|
-
export function
|
|
88
|
-
const
|
|
70
|
+
export function encapsulate(innerFunction, metaLevelAssumptions, context) {
|
|
71
|
+
const boundedContext = BoundedContext.fromMetaLevelAssumptions(metaLevelAssumptions, context);
|
|
89
72
|
|
|
90
|
-
context =
|
|
73
|
+
context = boundedContext; ///
|
|
91
74
|
|
|
92
75
|
return innerFunction(context);
|
|
93
76
|
}
|
|
94
77
|
|
|
95
|
-
export function
|
|
96
|
-
const
|
|
78
|
+
export function choose(innerFunction, context) {
|
|
79
|
+
const branchingContext = BranchingContext.fromNothing(context);
|
|
97
80
|
|
|
98
|
-
context =
|
|
81
|
+
context = branchingContext; ///
|
|
99
82
|
|
|
100
83
|
return innerFunction(context);
|
|
101
84
|
}
|
|
102
85
|
|
|
103
|
-
export function
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
if (!released) {
|
|
107
|
-
const mnemicContext = MenmicContext.fromNothing(context);
|
|
86
|
+
export function descend(innerFunction, context) {
|
|
87
|
+
const nestedContext = NestedContext.fromNothing(context);
|
|
108
88
|
|
|
109
|
-
|
|
110
|
-
}
|
|
89
|
+
context = nestedContext; ///
|
|
111
90
|
|
|
112
91
|
return innerFunction(context);
|
|
113
92
|
}
|
|
114
93
|
|
|
115
|
-
export function
|
|
116
|
-
|
|
117
|
-
context = metaLevelAssumptions; ///
|
|
94
|
+
export function ablate(innerFunction, context) {
|
|
95
|
+
const unreleased = context.isUnreleased();
|
|
118
96
|
|
|
119
|
-
|
|
97
|
+
if (unreleased) {
|
|
98
|
+
context = ablateContext(context); ///
|
|
120
99
|
}
|
|
121
100
|
|
|
122
|
-
const boundedContext = BoundedContext.fromMetaLevelAssumptions(metaLevelAssumptions, context);
|
|
123
|
-
|
|
124
|
-
context = boundedContext; ///
|
|
125
|
-
|
|
126
101
|
return innerFunction(context);
|
|
127
102
|
}
|
|
128
103
|
|
|
129
|
-
export function
|
|
130
|
-
const
|
|
131
|
-
|
|
104
|
+
export function attempt(innerFunction, context) {
|
|
105
|
+
const unreleased = context.isUnreleased();
|
|
106
|
+
|
|
107
|
+
if (unreleased) {
|
|
108
|
+
const mnemicContext = MnemicContext.fromNothing(context);
|
|
109
|
+
|
|
110
|
+
context = mnemicContext; ///
|
|
111
|
+
}
|
|
132
112
|
|
|
133
113
|
return innerFunction(context);
|
|
134
114
|
}
|
|
@@ -141,14 +121,6 @@ export function reconcile(innerFunction, context) {
|
|
|
141
121
|
return innerFunction(context);
|
|
142
122
|
}
|
|
143
123
|
|
|
144
|
-
export function sequester(innerFunction, context) {
|
|
145
|
-
const aphasicContext = AphasicContext.fromNothing(context);
|
|
146
|
-
|
|
147
|
-
context = aphasicContext; ///
|
|
148
|
-
|
|
149
|
-
return innerFunction(context);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
124
|
export function serialise(innerFunction, context) {
|
|
153
125
|
const mnemicContext = context, ///
|
|
154
126
|
mnemicContextJSON = mnemicContextToMnemicContextJSON(mnemicContext),
|
|
@@ -159,14 +131,6 @@ export function serialise(innerFunction, context) {
|
|
|
159
131
|
return innerFunction(context);
|
|
160
132
|
}
|
|
161
133
|
|
|
162
|
-
export function instantiate(innerFunction, context) {
|
|
163
|
-
const literalContext = LiteralContext.fromNothing(context);
|
|
164
|
-
|
|
165
|
-
context = literalContext; ///
|
|
166
|
-
|
|
167
|
-
return innerFunction(context);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
134
|
export function unserialise(innerFunction, json, context) {
|
|
171
135
|
const mnemicContext = mnemicContextFromJSON(json, context);
|
|
172
136
|
|
|
@@ -175,26 +139,34 @@ export function unserialise(innerFunction, json, context) {
|
|
|
175
139
|
return innerFunction(json, context);
|
|
176
140
|
}
|
|
177
141
|
|
|
178
|
-
export function
|
|
179
|
-
|
|
180
|
-
|
|
142
|
+
export function unserialises(innerFunction, json, context) {
|
|
143
|
+
const mnemicContexts = mnemicContextsFromJSON(json, context),
|
|
144
|
+
contexts = mnemicContexts; ///
|
|
181
145
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
146
|
+
return innerFunction(json, ...contexts);
|
|
147
|
+
}
|
|
185
148
|
|
|
186
|
-
|
|
187
|
-
|
|
149
|
+
export function instantiate(innerFunction, context) {
|
|
150
|
+
const literalContext = LiteralContext.fromNothing(context);
|
|
188
151
|
|
|
189
|
-
|
|
152
|
+
context = literalContext; ///
|
|
153
|
+
|
|
154
|
+
return innerFunction(context);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function manifest(innerFunction, ...contexts) {
|
|
158
|
+
const phanericContext = PhanericContext.fromContexts(contexts),
|
|
159
|
+
context = phanericContext; ///
|
|
160
|
+
|
|
161
|
+
return innerFunction(context);
|
|
190
162
|
}
|
|
191
163
|
|
|
192
164
|
export function attempts(innerFunction, ...contexts) {
|
|
193
165
|
contexts = contexts.map((context) => { ///
|
|
194
|
-
const
|
|
166
|
+
const unreleased = context.isUnreleased();
|
|
195
167
|
|
|
196
|
-
if (
|
|
197
|
-
const mnemicContext =
|
|
168
|
+
if (unreleased) {
|
|
169
|
+
const mnemicContext = MnemicContext.fromNothing(context);
|
|
198
170
|
|
|
199
171
|
context = mnemicContext; ///
|
|
200
172
|
}
|
|
@@ -215,60 +187,37 @@ export function serialises(innerFunction, ...contexts) {
|
|
|
215
187
|
return innerFunction(...contexts);
|
|
216
188
|
}
|
|
217
189
|
|
|
218
|
-
export function
|
|
219
|
-
|
|
220
|
-
|
|
190
|
+
export function ablates(innerFunction, ...contexts) {
|
|
191
|
+
contexts = contexts.map((context) => { ///
|
|
192
|
+
const unreleased = context.isUnreleased();
|
|
221
193
|
|
|
222
|
-
|
|
223
|
-
|
|
194
|
+
if (unreleased) {
|
|
195
|
+
context = ablateContext(context); ///
|
|
196
|
+
}
|
|
224
197
|
|
|
225
|
-
|
|
226
|
-
|
|
198
|
+
return context;
|
|
199
|
+
});
|
|
227
200
|
|
|
228
|
-
return
|
|
201
|
+
return innerFunction(...contexts);
|
|
229
202
|
}
|
|
230
203
|
|
|
231
204
|
function ablateContext(context) {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
let contextExtraneousContext = isContextExtraneousContext(context);
|
|
235
|
-
|
|
236
|
-
while (contextExtraneousContext) {
|
|
237
|
-
context = context.getContext();
|
|
238
|
-
|
|
239
|
-
contextExtraneousContext = isContextExtraneousContext(context);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
const Context = stated ? TheticContext : IllativeContext;
|
|
243
|
-
|
|
244
|
-
context = augmentContext(context, Context);
|
|
205
|
+
let contextGroundedContext = isContextGroundedContext(context);
|
|
245
206
|
|
|
246
|
-
|
|
247
|
-
|
|
207
|
+
while (!contextGroundedContext) {
|
|
208
|
+
context = context.getContext();
|
|
248
209
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
if (!contextContext) {
|
|
253
|
-
context = Context.fromNothing(context);
|
|
254
|
-
}
|
|
210
|
+
contextGroundedContext = isContextGroundedContext(context);
|
|
211
|
+
}
|
|
255
212
|
|
|
256
213
|
return context;
|
|
257
214
|
}
|
|
258
215
|
|
|
259
|
-
function
|
|
260
|
-
const contextSubstantiveContext = isContextSubstantiveContext(context),
|
|
261
|
-
contextExtraneousContext = !contextSubstantiveContext;
|
|
262
|
-
|
|
263
|
-
return contextExtraneousContext;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
function isContextSubstantiveContext(context) {
|
|
216
|
+
function isContextGroundedContext(context) {
|
|
267
217
|
const contextTheticContext = (context instanceof TheticContext),
|
|
268
218
|
contextIllativeContext = (context instanceof IllativeContext),
|
|
269
|
-
contextBoundedContext = (context instanceof BoundedContext),
|
|
270
219
|
contextNominalFileContext = (context instanceof NominalFileContext),
|
|
271
|
-
|
|
220
|
+
contextGroundedContext = (contextTheticContext || contextIllativeContext || contextNominalFileContext);
|
|
272
221
|
|
|
273
|
-
return
|
|
222
|
+
return contextGroundedContext;
|
|
274
223
|
}
|
package/src/utilities/element.js
CHANGED
|
@@ -808,11 +808,8 @@ export function metaLevelAssumptionFromMetaLevelAssumptionNode(metaLevelAssumpti
|
|
|
808
808
|
string = context.nodeAsString(node),
|
|
809
809
|
breakPoint = null,
|
|
810
810
|
reference = referenceFromMetaLevelAssumptionNode(metaLevelAssumptionNode, context),
|
|
811
|
-
statement = statementFromMetaLevelAssumptionNode(metaLevelAssumptionNode, context)
|
|
812
|
-
|
|
813
|
-
context = null;
|
|
814
|
-
|
|
815
|
-
const metaLevelAssumption = new MetaLevelAssumption(context, string, node, breakPoint, reference, statement);
|
|
811
|
+
statement = statementFromMetaLevelAssumptionNode(metaLevelAssumptionNode, context),
|
|
812
|
+
metaLevelAssumption = new MetaLevelAssumption(context, string, node, breakPoint, reference, statement);
|
|
816
813
|
|
|
817
814
|
return metaLevelAssumption;
|
|
818
815
|
}
|
package/src/utilities/string.js
CHANGED
|
@@ -258,16 +258,16 @@ export function topLevelAssertionStringFromLabelsSignatureSuppositionsAndDeducti
|
|
|
258
258
|
suppositionsString = suppositionsStringFromSuppositions(suppositions);
|
|
259
259
|
|
|
260
260
|
topLevelAssertionString = (labelsString !== null) ?
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
`${topLevelAssertionString}${labelsString}` :
|
|
262
|
+
`${topLevelAssertionString}`;
|
|
264
263
|
topLevelAssertionString = (signatureString !== null) ?
|
|
265
|
-
`${topLevelAssertionString}
|
|
264
|
+
`${topLevelAssertionString}${signatureString}` :
|
|
266
265
|
`${topLevelAssertionString}`;
|
|
267
266
|
|
|
267
|
+
|
|
268
268
|
topLevelAssertionString = (suppositionsString !== null) ?
|
|
269
|
-
`${topLevelAssertionString}[${suppositionsString}]...${deductionString}` :
|
|
270
|
-
`${topLevelAssertionString}${deductionString}`;
|
|
269
|
+
`${topLevelAssertionString} :: [${suppositionsString}]...${deductionString}` :
|
|
270
|
+
`${topLevelAssertionString} :: ${deductionString}`;
|
|
271
271
|
|
|
272
272
|
return topLevelAssertionString;
|
|
273
273
|
}
|
package/lib/context/ephemeral.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return EphemeralContext;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _context = /*#__PURE__*/ _interop_require_default(require("../context"));
|
|
12
|
-
function _interop_require_default(obj) {
|
|
13
|
-
return obj && obj.__esModule ? obj : {
|
|
14
|
-
default: obj
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
class EphemeralContext extends _context.default {
|
|
18
|
-
isStated() {
|
|
19
|
-
const stated = true;
|
|
20
|
-
return stated;
|
|
21
|
-
}
|
|
22
|
-
static fromNothing(context) {
|
|
23
|
-
const ephemeralContext = new EphemeralContext(context);
|
|
24
|
-
return ephemeralContext;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250ZXh0L2VwaGVtZXJhbC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IENvbnRleHQgZnJvbSBcIi4uL2NvbnRleHRcIjtcblxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgRXBoZW1lcmFsQ29udGV4dCBleHRlbmRzIENvbnRleHQge1xuICBpc1N0YXRlZCgpIHtcbiAgICBjb25zdCBzdGF0ZWQgPSB0cnVlO1xuXG4gICAgcmV0dXJuIHN0YXRlZDtcbiAgfVxuXG4gIHN0YXRpYyBmcm9tTm90aGluZyhjb250ZXh0KSB7XG4gICAgY29uc3QgZXBoZW1lcmFsQ29udGV4dCA9IG5ldyBFcGhlbWVyYWxDb250ZXh0KGNvbnRleHQpO1xuXG4gICAgcmV0dXJuIGVwaGVtZXJhbENvbnRleHQ7XG4gIH1cbn0iXSwibmFtZXMiOlsiRXBoZW1lcmFsQ29udGV4dCIsIkNvbnRleHQiLCJpc1N0YXRlZCIsInN0YXRlZCIsImZyb21Ob3RoaW5nIiwiY29udGV4dCIsImVwaGVtZXJhbENvbnRleHQiXSwibWFwcGluZ3MiOiJBQUFBOzs7OytCQUlBOzs7ZUFBcUJBOzs7Z0VBRkQ7Ozs7OztBQUVMLE1BQU1BLHlCQUF5QkMsZ0JBQU87SUFDbkRDLFdBQVc7UUFDVCxNQUFNQyxTQUFTO1FBRWYsT0FBT0E7SUFDVDtJQUVBLE9BQU9DLFlBQVlDLE9BQU8sRUFBRTtRQUMxQixNQUFNQyxtQkFBbUIsSUFBSU4saUJBQWlCSztRQUU5QyxPQUFPQztJQUNUO0FBQ0YifQ==
|