occam-verify-cli 1.0.383 → 1.0.385
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/action/verify.js +2 -1
- package/lib/context/file.js +2 -2
- package/lib/context/release.js +2 -2
- package/lib/mixins/statement/verify.js +3 -3
- package/lib/mixins/step/unify.js +4 -4
- package/lib/mixins/term/verify.js +4 -4
- package/lib/ontology/assertion/contained.js +316 -0
- package/lib/ontology/assertion/defined.js +290 -0
- package/lib/ontology/assertion/property.js +271 -0
- package/lib/ontology/assertion/satisfies.js +254 -0
- package/lib/ontology/assertion/subproof.js +186 -0
- package/lib/ontology/assertion/type.js +252 -0
- package/lib/{dom → ontology}/axiom.js +3 -3
- package/lib/{dom → ontology}/combinator/bracketed.js +4 -4
- package/lib/ontology/combinator.js +141 -0
- package/lib/ontology/conclusion.js +172 -0
- package/lib/{dom → ontology}/conjecture.js +3 -3
- package/lib/{dom → ontology}/constructor/bracketed.js +5 -5
- package/lib/ontology/constructor.js +171 -0
- package/lib/ontology/declaration/combinator.js +168 -0
- package/lib/ontology/declaration/complexType.js +346 -0
- package/lib/ontology/declaration/constructor.js +199 -0
- package/lib/ontology/declaration/metavariable.js +209 -0
- package/lib/ontology/declaration/simpleType.js +243 -0
- package/lib/ontology/declaration/typePrefix.js +181 -0
- package/lib/ontology/declaration/variable.js +197 -0
- package/lib/ontology/declaration.js +360 -0
- package/lib/ontology/deduction.js +186 -0
- package/lib/ontology/derivation.js +155 -0
- package/lib/ontology/equality.js +288 -0
- package/lib/{dom → ontology}/error.js +3 -3
- package/lib/ontology/frame.js +362 -0
- package/lib/ontology/hypothesis.js +190 -0
- package/lib/ontology/judgement.js +241 -0
- package/lib/ontology/label.js +199 -0
- package/lib/{dom → ontology}/lemma.js +3 -3
- package/lib/{dom → ontology}/metaLemma.js +3 -3
- package/lib/{dom → ontology}/metaType.js +3 -3
- package/lib/{dom → ontology}/metatheorem.js +3 -3
- package/lib/ontology/metavariable.js +504 -0
- package/lib/{dom → ontology}/parameter.js +3 -3
- package/lib/ontology/premise.js +271 -0
- package/lib/ontology/procedureCall.js +243 -0
- package/lib/{dom → ontology}/procedureReference.js +3 -3
- package/lib/{dom → ontology}/proof.js +4 -4
- package/lib/ontology/property.js +166 -0
- package/lib/ontology/propertyRelation.js +202 -0
- package/lib/ontology/reference.js +293 -0
- package/lib/ontology/rule.js +375 -0
- package/lib/ontology/section.js +255 -0
- package/lib/ontology/signature.js +220 -0
- package/lib/{dom → ontology}/statement.js +3 -3
- package/lib/ontology/step.js +283 -0
- package/lib/ontology/subDerivation.js +147 -0
- package/lib/ontology/subproof.js +266 -0
- package/lib/ontology/substitution/frame.js +216 -0
- package/lib/{dom → ontology}/substitution/reference.js +3 -3
- package/lib/{dom → ontology}/substitution/statement.js +3 -3
- package/lib/ontology/substitution/term.js +230 -0
- package/lib/ontology/substitution.js +207 -0
- package/lib/ontology/supposition.js +283 -0
- package/lib/ontology/term.js +339 -0
- package/lib/{dom → ontology}/theorem.js +3 -3
- package/lib/ontology/topLevelAssertion.js +432 -0
- package/lib/ontology/topLevelMetaAssertion.js +235 -0
- package/lib/ontology/type.js +556 -0
- package/lib/ontology/typePrefix.js +99 -0
- package/lib/ontology/variable.js +331 -0
- package/lib/ontology.js +27 -0
- package/lib/preamble.js +60 -60
- package/lib/unifier/intrinsicLevel.js +3 -3
- package/lib/unifier/metaLevel.js +7 -7
- package/lib/unifier/metavariable.js +3 -3
- package/lib/unifier/statementWithCombinator.js +5 -5
- package/lib/unifier/termWithConstructor.js +3 -3
- package/lib/utilities/brackets.js +5 -5
- package/lib/utilities/context.js +12 -12
- package/lib/utilities/fileSystem.js +2 -2
- package/lib/utilities/json.js +30 -30
- package/lib/utilities/node.js +7 -7
- package/lib/utilities/release.js +12 -4
- package/lib/utilities/releaseContext.js +1 -1
- package/lib/utilities/substitutions.js +6 -6
- package/lib/utilities/type.js +2 -2
- package/lib/verifier/combinator.js +4 -4
- package/lib/verifier/constructor.js +3 -3
- package/lib/verifier/topLevel.js +18 -18
- package/package.json +1 -1
- package/src/action/verify.js +2 -0
- package/src/context/file.js +1 -1
- package/src/context/release.js +1 -1
- package/src/mixins/statement/verify.js +2 -2
- package/src/mixins/step/unify.js +3 -3
- package/src/mixins/term/verify.js +3 -3
- package/src/{dom → ontology}/assertion/contained.js +4 -4
- package/src/{dom → ontology}/assertion/defined.js +6 -6
- package/src/{dom → ontology}/assertion/property.js +5 -5
- package/src/{dom → ontology}/assertion/satisfies.js +5 -5
- package/src/{dom → ontology}/assertion/subproof.js +4 -4
- package/src/{dom → ontology}/assertion/type.js +5 -5
- package/src/{dom → ontology}/axiom.js +2 -2
- package/src/{dom → ontology}/combinator/bracketed.js +4 -4
- package/src/{dom → ontology}/combinator.js +4 -4
- package/src/{dom → ontology}/conclusion.js +4 -4
- package/src/{dom → ontology}/conjecture.js +2 -2
- package/src/{dom → ontology}/constructor/bracketed.js +5 -5
- package/src/{dom → ontology}/constructor.js +5 -5
- package/src/{dom → ontology}/declaration/combinator.js +4 -4
- package/src/{dom → ontology}/declaration/complexType.js +4 -4
- package/src/{dom → ontology}/declaration/constructor.js +4 -4
- package/src/{dom → ontology}/declaration/metavariable.js +5 -5
- package/src/{dom → ontology}/declaration/simpleType.js +4 -4
- package/src/{dom → ontology}/declaration/typePrefix.js +4 -4
- package/src/{dom → ontology}/declaration/variable.js +4 -4
- package/src/{dom → ontology}/declaration.js +5 -5
- package/src/{dom → ontology}/deduction.js +4 -4
- package/src/{dom → ontology}/derivation.js +4 -4
- package/src/{dom → ontology}/equality.js +6 -6
- package/src/{dom → ontology}/error.js +2 -2
- package/src/{dom → ontology}/frame.js +6 -6
- package/src/{dom → ontology}/hypothesis.js +5 -6
- package/src/{dom → ontology}/judgement.js +5 -5
- package/src/{dom → ontology}/label.js +4 -4
- package/src/{dom → ontology}/lemma.js +2 -2
- package/src/{dom → ontology}/metaLemma.js +2 -2
- package/src/{dom → ontology}/metaType.js +2 -2
- package/src/{dom → ontology}/metatheorem.js +2 -2
- package/src/{dom → ontology}/metavariable.js +8 -8
- package/src/{dom → ontology}/parameter.js +2 -2
- package/src/{dom → ontology}/premise.js +5 -5
- package/src/{dom → ontology}/procedureCall.js +5 -5
- package/src/{dom → ontology}/procedureReference.js +2 -2
- package/src/{dom → ontology}/proof.js +4 -4
- package/src/{dom → ontology}/property.js +4 -4
- package/src/{dom → ontology}/propertyRelation.js +4 -4
- package/src/{dom → ontology}/reference.js +6 -6
- package/src/{dom → ontology}/rule.js +7 -7
- package/src/{dom → ontology}/section.js +8 -8
- package/src/{dom → ontology}/signature.js +4 -4
- package/src/{dom → ontology}/statement.js +2 -2
- package/src/{dom → ontology}/step.js +4 -4
- package/src/{dom → ontology}/subDerivation.js +4 -4
- package/src/{dom → ontology}/subproof.js +5 -5
- package/src/{dom → ontology}/substitution/frame.js +4 -4
- package/src/{dom → ontology}/substitution/reference.js +2 -2
- package/src/{dom → ontology}/substitution/statement.js +2 -2
- package/src/{dom → ontology}/substitution/term.js +5 -5
- package/src/{dom → ontology}/supposition.js +5 -5
- package/src/{dom → ontology}/term.js +6 -6
- package/src/{dom → ontology}/theorem.js +2 -2
- package/src/{dom → ontology}/topLevelAssertion.js +6 -6
- package/src/{dom → ontology}/topLevelMetaAssertion.js +2 -2
- package/src/{dom → ontology}/type.js +4 -4
- package/src/{dom → ontology}/typePrefix.js +3 -5
- package/src/{dom → ontology}/variable.js +6 -6
- package/src/ontology.js +13 -0
- package/src/preamble.js +59 -59
- package/src/unifier/intrinsicLevel.js +2 -2
- package/src/unifier/metaLevel.js +6 -6
- package/src/unifier/metavariable.js +2 -2
- package/src/unifier/statementWithCombinator.js +4 -4
- package/src/unifier/termWithConstructor.js +2 -2
- package/src/utilities/brackets.js +4 -4
- package/src/utilities/context.js +11 -11
- package/src/utilities/fileSystem.js +1 -1
- package/src/utilities/json.js +29 -29
- package/src/utilities/node.js +6 -6
- package/src/utilities/release.js +1 -1
- package/src/utilities/releaseContext.js +3 -3
- package/src/utilities/substitutions.js +5 -5
- package/src/utilities/type.js +1 -1
- package/src/verifier/combinator.js +3 -3
- package/src/verifier/constructor.js +2 -2
- package/src/verifier/topLevel.js +17 -17
- package/lib/dom/assertion/contained.js +0 -316
- package/lib/dom/assertion/defined.js +0 -290
- package/lib/dom/assertion/property.js +0 -271
- package/lib/dom/assertion/satisfies.js +0 -254
- package/lib/dom/assertion/subproof.js +0 -186
- package/lib/dom/assertion/type.js +0 -252
- package/lib/dom/combinator.js +0 -141
- package/lib/dom/conclusion.js +0 -172
- package/lib/dom/constructor.js +0 -171
- package/lib/dom/declaration/combinator.js +0 -168
- package/lib/dom/declaration/complexType.js +0 -346
- package/lib/dom/declaration/constructor.js +0 -199
- package/lib/dom/declaration/metavariable.js +0 -209
- package/lib/dom/declaration/simpleType.js +0 -243
- package/lib/dom/declaration/typePrefix.js +0 -181
- package/lib/dom/declaration/variable.js +0 -197
- package/lib/dom/declaration.js +0 -360
- package/lib/dom/deduction.js +0 -186
- package/lib/dom/derivation.js +0 -155
- package/lib/dom/equality.js +0 -288
- package/lib/dom/frame.js +0 -362
- package/lib/dom/hypothesis.js +0 -191
- package/lib/dom/judgement.js +0 -241
- package/lib/dom/label.js +0 -199
- package/lib/dom/metavariable.js +0 -504
- package/lib/dom/premise.js +0 -271
- package/lib/dom/procedureCall.js +0 -243
- package/lib/dom/property.js +0 -166
- package/lib/dom/propertyRelation.js +0 -202
- package/lib/dom/reference.js +0 -293
- package/lib/dom/rule.js +0 -375
- package/lib/dom/section.js +0 -255
- package/lib/dom/signature.js +0 -220
- package/lib/dom/step.js +0 -283
- package/lib/dom/subDerivation.js +0 -147
- package/lib/dom/subproof.js +0 -266
- package/lib/dom/substitution/frame.js +0 -216
- package/lib/dom/substitution/term.js +0 -230
- package/lib/dom/substitution.js +0 -207
- package/lib/dom/supposition.js +0 -283
- package/lib/dom/term.js +0 -339
- package/lib/dom/topLevelAssertion.js +0 -432
- package/lib/dom/topLevelMetaAssertion.js +0 -235
- package/lib/dom/type.js +0 -556
- package/lib/dom/typePrefix.js +0 -100
- package/lib/dom/variable.js +0 -331
- package/lib/dom.js +0 -27
- package/src/dom.js +0 -13
- /package/src/{dom → ontology}/substitution.js +0 -0
package/src/utilities/json.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
|
|
5
5
|
export function termFromJSON(json, context) {
|
|
6
6
|
let { term } = json;
|
|
@@ -9,7 +9,7 @@ export function termFromJSON(json, context) {
|
|
|
9
9
|
|
|
10
10
|
json = termJSON; ///
|
|
11
11
|
|
|
12
|
-
const { Term } =
|
|
12
|
+
const { Term } = ontology;
|
|
13
13
|
|
|
14
14
|
term = Term.fromJSON(json, context);
|
|
15
15
|
|
|
@@ -52,7 +52,7 @@ export function statementFromJSON(json, context) {
|
|
|
52
52
|
let { statement = null } = json;
|
|
53
53
|
|
|
54
54
|
if (statement !== null) {
|
|
55
|
-
const { Statement } =
|
|
55
|
+
const { Statement } = ontology,
|
|
56
56
|
statementJSON = statement; ///
|
|
57
57
|
|
|
58
58
|
json = statementJSON; ///
|
|
@@ -66,7 +66,7 @@ export function statementFromJSON(json, context) {
|
|
|
66
66
|
export function deductionFromJSON(json, context) {
|
|
67
67
|
let { deduction } = json;
|
|
68
68
|
|
|
69
|
-
const { Deduction } =
|
|
69
|
+
const { Deduction } = ontology,
|
|
70
70
|
deductionJSON = deduction; ///
|
|
71
71
|
|
|
72
72
|
json = deductionJSON; ///
|
|
@@ -80,7 +80,7 @@ export function signatureFromJSON(json, context) {
|
|
|
80
80
|
let { signature = null } = json;
|
|
81
81
|
|
|
82
82
|
if (signature !== null) {
|
|
83
|
-
const { Signature } =
|
|
83
|
+
const { Signature } = ontology,
|
|
84
84
|
signatureJSON = signature; ///
|
|
85
85
|
|
|
86
86
|
json = signatureJSON; ///
|
|
@@ -94,7 +94,7 @@ export function signatureFromJSON(json, context) {
|
|
|
94
94
|
export function conclusionFromJSON(json, context) {
|
|
95
95
|
let { conclusion } = json;
|
|
96
96
|
|
|
97
|
-
const { Conclusion } =
|
|
97
|
+
const { Conclusion } = ontology,
|
|
98
98
|
conclusionJSON = conclusion; ///
|
|
99
99
|
|
|
100
100
|
json = conclusionJSON; ///
|
|
@@ -107,7 +107,7 @@ export function conclusionFromJSON(json, context) {
|
|
|
107
107
|
export function metavariableFromJSON(json, context) {
|
|
108
108
|
let { metavariable } = json;
|
|
109
109
|
|
|
110
|
-
const { Metavariable } =
|
|
110
|
+
const { Metavariable } = ontology,
|
|
111
111
|
metavariableJSON = metavariable; ///
|
|
112
112
|
|
|
113
113
|
json = metavariableJSON; ///
|
|
@@ -121,7 +121,7 @@ export function procedureCallFromJSON(json, context) {
|
|
|
121
121
|
let { procedureCall = null } = json;
|
|
122
122
|
|
|
123
123
|
if (procedureCall !== null) {
|
|
124
|
-
const { ProcedureCall } =
|
|
124
|
+
const { ProcedureCall } = ontology,
|
|
125
125
|
procedureCallJSON = procedureCall; ///
|
|
126
126
|
|
|
127
127
|
json = procedureCallJSON; ///
|
|
@@ -135,7 +135,7 @@ export function procedureCallFromJSON(json, context) {
|
|
|
135
135
|
export function procedureReferenceFromJSON(json, context) {
|
|
136
136
|
let { procedureReference } = json;
|
|
137
137
|
|
|
138
|
-
const { ProcedureReference } =
|
|
138
|
+
const { ProcedureReference } = ontology,
|
|
139
139
|
procedureReferenceJSON = procedureReference; ///
|
|
140
140
|
|
|
141
141
|
json = procedureReferenceJSON; ///
|
|
@@ -148,7 +148,7 @@ export function procedureReferenceFromJSON(json, context) {
|
|
|
148
148
|
export function typesFromJSON(json, types, context) {
|
|
149
149
|
const { types: typesJSON } = json;
|
|
150
150
|
|
|
151
|
-
const { Type } =
|
|
151
|
+
const { Type } = ontology;
|
|
152
152
|
|
|
153
153
|
typesJSON.forEach((typeJSON) => {
|
|
154
154
|
const json = typeJSON, ///
|
|
@@ -161,7 +161,7 @@ export function typesFromJSON(json, types, context) {
|
|
|
161
161
|
export function termsFromJSON(json, context) {
|
|
162
162
|
let { terms } = json;
|
|
163
163
|
|
|
164
|
-
const { Term } =
|
|
164
|
+
const { Term } = ontology,
|
|
165
165
|
termsJSON = terms; ///
|
|
166
166
|
|
|
167
167
|
terms = termsJSON.map((termJSON) => {
|
|
@@ -177,7 +177,7 @@ export function termsFromJSON(json, context) {
|
|
|
177
177
|
export function rulesFromJSON(json, context) {
|
|
178
178
|
let { rules } = json;
|
|
179
179
|
|
|
180
|
-
const { Rule } =
|
|
180
|
+
const { Rule } = ontology,
|
|
181
181
|
rulesJSON = rules; ///
|
|
182
182
|
|
|
183
183
|
rules = rulesJSON.map((ruleJSON) => {
|
|
@@ -193,7 +193,7 @@ export function rulesFromJSON(json, context) {
|
|
|
193
193
|
export function labelFromJSON(json, context) {
|
|
194
194
|
let { label } = json;
|
|
195
195
|
|
|
196
|
-
const { Label } =
|
|
196
|
+
const { Label } = ontology,
|
|
197
197
|
labelJSON = label; ///
|
|
198
198
|
|
|
199
199
|
json = labelJSON; ///
|
|
@@ -206,7 +206,7 @@ export function labelFromJSON(json, context) {
|
|
|
206
206
|
export function labelsFromJSON(json, context) {
|
|
207
207
|
let { labels } = json;
|
|
208
208
|
|
|
209
|
-
const { Label } =
|
|
209
|
+
const { Label } = ontology,
|
|
210
210
|
labelsJSON = labels; ///
|
|
211
211
|
|
|
212
212
|
labels = labelsJSON.map((labelJSON) => {
|
|
@@ -222,7 +222,7 @@ export function labelsFromJSON(json, context) {
|
|
|
222
222
|
export function axiomsFromJSON(json, context) {
|
|
223
223
|
let { axioms } = json;
|
|
224
224
|
|
|
225
|
-
const { Axiom } =
|
|
225
|
+
const { Axiom } = ontology,
|
|
226
226
|
axiomsJSON = axioms; ///
|
|
227
227
|
|
|
228
228
|
axioms = axiomsJSON.map((axiomJSON) => {
|
|
@@ -238,7 +238,7 @@ export function axiomsFromJSON(json, context) {
|
|
|
238
238
|
export function premisesFromJSON(json, context) {
|
|
239
239
|
let { premises } = json;
|
|
240
240
|
|
|
241
|
-
const { Premise } =
|
|
241
|
+
const { Premise } = ontology,
|
|
242
242
|
premisesJSON = premises; ///
|
|
243
243
|
|
|
244
244
|
premises = premisesJSON.map((premiseJSON) => {
|
|
@@ -254,7 +254,7 @@ export function premisesFromJSON(json, context) {
|
|
|
254
254
|
export function theoremsFromJSON(json, context) {
|
|
255
255
|
let { theorems } = json;
|
|
256
256
|
|
|
257
|
-
const { Theorem } =
|
|
257
|
+
const { Theorem } = ontology,
|
|
258
258
|
theoremsJSON = theorems; ///
|
|
259
259
|
|
|
260
260
|
theorems = theoremsJSON.map((theoremJSON) => {
|
|
@@ -270,7 +270,7 @@ export function theoremsFromJSON(json, context) {
|
|
|
270
270
|
export function variablesFromJSON(json, context) {
|
|
271
271
|
let { variables } = json;
|
|
272
272
|
|
|
273
|
-
const { Variable } =
|
|
273
|
+
const { Variable } = ontology,
|
|
274
274
|
variablesJSON = variables; ///
|
|
275
275
|
|
|
276
276
|
variables = variablesJSON.map((variableJSON) => {
|
|
@@ -286,7 +286,7 @@ export function variablesFromJSON(json, context) {
|
|
|
286
286
|
export function propertiesFromJSON(json, context) {
|
|
287
287
|
let { properties } = json;
|
|
288
288
|
|
|
289
|
-
const { Property } =
|
|
289
|
+
const { Property } = ontology,
|
|
290
290
|
propertiesJSON = properties; ///
|
|
291
291
|
|
|
292
292
|
properties = propertiesJSON.map((propertyJSON) => {
|
|
@@ -319,7 +319,7 @@ export function superTypesFromJSON(json, context) {
|
|
|
319
319
|
export function hypothesesFromJSON(json, context) {
|
|
320
320
|
let { hypotheses } = json;
|
|
321
321
|
|
|
322
|
-
const { Hypothesis } =
|
|
322
|
+
const { Hypothesis } = ontology,
|
|
323
323
|
hypothesesJSON = hypotheses; ///
|
|
324
324
|
|
|
325
325
|
hypotheses = hypothesesJSON.map((hypothesisJSON) => {
|
|
@@ -335,7 +335,7 @@ export function hypothesesFromJSON(json, context) {
|
|
|
335
335
|
export function parametersFromJSON(json, context) {
|
|
336
336
|
let { parameters } = json;
|
|
337
337
|
|
|
338
|
-
const { Parameter } =
|
|
338
|
+
const { Parameter } = ontology,
|
|
339
339
|
parametersJSON = parameters; ///
|
|
340
340
|
|
|
341
341
|
parameters = parametersJSON.map((parameterJSON) => {
|
|
@@ -351,7 +351,7 @@ export function parametersFromJSON(json, context) {
|
|
|
351
351
|
export function conjecturesFromJSON(json, context) {
|
|
352
352
|
let { conjectures } = json;
|
|
353
353
|
|
|
354
|
-
const { Conjecture } =
|
|
354
|
+
const { Conjecture } = ontology,
|
|
355
355
|
conjecturesJSON = conjectures; ///
|
|
356
356
|
|
|
357
357
|
conjectures = conjecturesJSON.map((conjectureJSON) => {
|
|
@@ -367,7 +367,7 @@ export function conjecturesFromJSON(json, context) {
|
|
|
367
367
|
export function combinatorsFromJSON(json, context) {
|
|
368
368
|
let { combinators } = json;
|
|
369
369
|
|
|
370
|
-
const { Combinator } =
|
|
370
|
+
const { Combinator } = ontology,
|
|
371
371
|
combinatorsJSON = combinators; ///
|
|
372
372
|
|
|
373
373
|
combinators = combinatorsJSON.map((combinatorJSON) => {
|
|
@@ -383,7 +383,7 @@ export function combinatorsFromJSON(json, context) {
|
|
|
383
383
|
export function typePrefixesFromJSON(json, context) {
|
|
384
384
|
let { typePrefixes } = json;
|
|
385
385
|
|
|
386
|
-
const { TypePrefix } =
|
|
386
|
+
const { TypePrefix } = ontology,
|
|
387
387
|
typePrefixesJSON = typePrefixes; ///
|
|
388
388
|
|
|
389
389
|
typePrefixes = typePrefixesJSON.map((typePrefixJSON) => {
|
|
@@ -399,7 +399,7 @@ export function typePrefixesFromJSON(json, context) {
|
|
|
399
399
|
export function constructorsFromJSON(json, context) {
|
|
400
400
|
let { constructors } = json;
|
|
401
401
|
|
|
402
|
-
const { Constructor } =
|
|
402
|
+
const { Constructor } = ontology,
|
|
403
403
|
constructorsJSON = constructors; ///
|
|
404
404
|
|
|
405
405
|
constructors = constructorsJSON.map((constructorJSON) => {
|
|
@@ -415,7 +415,7 @@ export function constructorsFromJSON(json, context) {
|
|
|
415
415
|
export function metatheoremsFromJSON(json, context) {
|
|
416
416
|
let { metatheorems } = json;
|
|
417
417
|
|
|
418
|
-
const { Metatheorem } =
|
|
418
|
+
const { Metatheorem } = ontology,
|
|
419
419
|
metatheoremsJSON = metatheorems; ///
|
|
420
420
|
|
|
421
421
|
metatheorems = metatheoremsJSON.map((metatheoremJSON) => {
|
|
@@ -431,7 +431,7 @@ export function metatheoremsFromJSON(json, context) {
|
|
|
431
431
|
export function suppositionsFromJSON(json, context) {
|
|
432
432
|
let { suppositions } = json;
|
|
433
433
|
|
|
434
|
-
const { Supposition } =
|
|
434
|
+
const { Supposition } = ontology,
|
|
435
435
|
suppositionsJSON = suppositions; ///
|
|
436
436
|
|
|
437
437
|
suppositions = suppositionsJSON.map((suppositionJSON) => {
|
|
@@ -447,7 +447,7 @@ export function suppositionsFromJSON(json, context) {
|
|
|
447
447
|
export function substitutionsFromJSON(json, context) {
|
|
448
448
|
let { substitutions = [] } = json; ///
|
|
449
449
|
|
|
450
|
-
const { StatementSubstitution } =
|
|
450
|
+
const { StatementSubstitution } = ontology,
|
|
451
451
|
substitutionsJSON = substitutions, ///
|
|
452
452
|
Substitution = StatementSubstitution; ///
|
|
453
453
|
|
|
@@ -464,7 +464,7 @@ export function substitutionsFromJSON(json, context) {
|
|
|
464
464
|
export function metavariablesFromJSON(json, context) {
|
|
465
465
|
let { metavariables } = json;
|
|
466
466
|
|
|
467
|
-
const { Metavariable } =
|
|
467
|
+
const { Metavariable } = ontology,
|
|
468
468
|
metavariablesJSON = metavariables; ///
|
|
469
469
|
|
|
470
470
|
metavariables = metavariablesJSON.map((metavariableJSON) => {
|
package/src/utilities/node.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
|
|
5
|
-
import { baseType } from "../
|
|
5
|
+
import { baseType } from "../ontology/type";
|
|
6
6
|
|
|
7
7
|
export function typeFromTypeNode(typeNode, context) {
|
|
8
8
|
let type;
|
|
@@ -10,7 +10,7 @@ export function typeFromTypeNode(typeNode, context) {
|
|
|
10
10
|
if (typeNode === null) {
|
|
11
11
|
type = baseType;
|
|
12
12
|
} else {
|
|
13
|
-
const { Type } =
|
|
13
|
+
const { Type } = ontology,
|
|
14
14
|
typeName = typeNode.getTypeName(),
|
|
15
15
|
typePrefixName = typeNode.getTypePrefixName(),
|
|
16
16
|
nominalTypeName = typeNode.getNominalTypeName(),
|
|
@@ -28,7 +28,7 @@ export function typeFromTypeNode(typeNode, context) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export function termFromTermNode(termNode, context) {
|
|
31
|
-
const { Term } =
|
|
31
|
+
const { Term } = ontology,
|
|
32
32
|
node = termNode, ///
|
|
33
33
|
string = context.nodeAsString(node),
|
|
34
34
|
type = null,
|
|
@@ -38,7 +38,7 @@ export function termFromTermNode(termNode, context) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export function statementFromStatementNode(statementNode, context) {
|
|
41
|
-
const { Statement } =
|
|
41
|
+
const { Statement } = ontology,
|
|
42
42
|
node = statementNode, ///
|
|
43
43
|
tokens = context.nodeAsTokens(node),
|
|
44
44
|
string = context.tokensAsString(tokens),
|
|
@@ -64,7 +64,7 @@ export function variableFromTerm(term, context) {
|
|
|
64
64
|
singularVariableNode = termNode.getSingularVariableNode();
|
|
65
65
|
|
|
66
66
|
if (singularVariableNode !== null) {
|
|
67
|
-
const { Variable } =
|
|
67
|
+
const { Variable } = ontology,
|
|
68
68
|
variableNode = singularVariableNode; ///
|
|
69
69
|
|
|
70
70
|
variable = Variable.fromVariableNode(variableNode, context);
|
package/src/utilities/release.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function verifyRelease(releaseName, dependentName, dependentReleased, releaseContextMap) {
|
|
3
|
+
export function verifyRelease(releaseName, dependentName, dependentReleased, releaseContextMap) {
|
|
4
4
|
let releaseVerifies = false;
|
|
5
5
|
|
|
6
6
|
const releaseContext = releaseContextMap[releaseName];
|
|
@@ -57,7 +57,7 @@ export function createReleaseContext(dependency, dependentNames, context, callba
|
|
|
57
57
|
|
|
58
58
|
if (!releaseContextCreated) {
|
|
59
59
|
const error = null,
|
|
60
|
-
|
|
60
|
+
success = false;
|
|
61
61
|
|
|
62
62
|
callback(error, success);
|
|
63
63
|
|
|
@@ -68,7 +68,7 @@ export function createReleaseContext(dependency, dependentNames, context, callba
|
|
|
68
68
|
|
|
69
69
|
if (!releaseMatchesDependency) {
|
|
70
70
|
const error = null,
|
|
71
|
-
|
|
71
|
+
success = false;
|
|
72
72
|
|
|
73
73
|
callback(error, success);
|
|
74
74
|
|
|
@@ -137,7 +137,7 @@ export function initialiseReleaseContext(dependency, context) {
|
|
|
137
137
|
initialiseDependencyReleaseContexts(dependency, releaseContext, context);
|
|
138
138
|
|
|
139
139
|
const { log } = context,
|
|
140
|
-
|
|
140
|
+
releaseContexts = retrieveReleaseContexts(releaseContext, releaseContextMap);
|
|
141
141
|
|
|
142
142
|
log.info(`Initialising the '${dependencyName}' context...`);
|
|
143
143
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
|
|
5
5
|
export function termFromTermAndSubstitutions(term, substitutions, context) {
|
|
6
6
|
if (term !== null) {
|
|
7
|
-
const { Variable } =
|
|
7
|
+
const { Variable } = ontology,
|
|
8
8
|
termNode = term.getNode(),
|
|
9
9
|
variable = Variable.fromTermNode(termNode, context);
|
|
10
10
|
|
|
@@ -24,7 +24,7 @@ export function termFromTermAndSubstitutions(term, substitutions, context) {
|
|
|
24
24
|
|
|
25
25
|
export function frameFromFrameAndSubstitutions(frame, substitutions, context) {
|
|
26
26
|
if (frame !== null) {
|
|
27
|
-
const { Metavariable } =
|
|
27
|
+
const { Metavariable } = ontology,
|
|
28
28
|
frameNode = frame.getNode(),
|
|
29
29
|
metavariable = Metavariable.fromFrameNode(frameNode, context);
|
|
30
30
|
|
|
@@ -46,7 +46,7 @@ export function frameFromFrameAndSubstitutions(frame, substitutions, context) {
|
|
|
46
46
|
|
|
47
47
|
export function statementFromStatementAndSubstitutions(statement, substitutions, context) {
|
|
48
48
|
if (statement !== null) {
|
|
49
|
-
const { Metavariable } =
|
|
49
|
+
const { Metavariable } = ontology,
|
|
50
50
|
statementNode = statement.getNode(),
|
|
51
51
|
metavariable = Metavariable.fromStatementNode(statementNode, context);
|
|
52
52
|
|
|
@@ -55,7 +55,7 @@ export function statementFromStatementAndSubstitutions(statement, substitutions,
|
|
|
55
55
|
if (metavariable !== null) {
|
|
56
56
|
let substitution;
|
|
57
57
|
|
|
58
|
-
const { TermSubstitution, FrameSubstitution } =
|
|
58
|
+
const { TermSubstitution, FrameSubstitution } = ontology,
|
|
59
59
|
termSubstitution = TermSubstitution.fromStatementNode(statementNode, context),
|
|
60
60
|
frameSubstitution = FrameSubstitution.fromStatementNode(statementNode, context);
|
|
61
61
|
|
package/src/utilities/type.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
import Verifier from "../verifier";
|
|
5
5
|
|
|
6
6
|
import { nodeQuery } from "../utilities/query";
|
|
@@ -26,7 +26,7 @@ class CombinatorVerifier extends Verifier {
|
|
|
26
26
|
{
|
|
27
27
|
nodeQuery: statementNodeQuery,
|
|
28
28
|
verify: (statementNode, context) => {
|
|
29
|
-
const { Statement } =
|
|
29
|
+
const { Statement } = ontology,
|
|
30
30
|
statement = Statement.fromStatementNode(statementNode, context),
|
|
31
31
|
assignments = null,
|
|
32
32
|
stated = false,
|
|
@@ -38,7 +38,7 @@ class CombinatorVerifier extends Verifier {
|
|
|
38
38
|
{
|
|
39
39
|
nodeQuery: termNodeQuery,
|
|
40
40
|
verify: (termNode, context) => {
|
|
41
|
-
const { Term } =
|
|
41
|
+
const { Term } = ontology,
|
|
42
42
|
term = Term.fromTermNode(termNode, context),
|
|
43
43
|
termVerifies = term.verify(context, () => {
|
|
44
44
|
const verifiesAhead = true;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { arrayUtilities } from "necessary";
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import ontology from "../ontology";
|
|
6
6
|
import Verifier from "../verifier";
|
|
7
7
|
|
|
8
8
|
import { nodeQuery } from "../utilities/query";
|
|
@@ -58,7 +58,7 @@ class ConstructorVerifier extends Verifier {
|
|
|
58
58
|
{
|
|
59
59
|
nodeQuery: termNodeQuery,
|
|
60
60
|
verify: (termNode, context, verifyAhead) => {
|
|
61
|
-
const { Term } =
|
|
61
|
+
const { Term } = ontology,
|
|
62
62
|
term = Term.fromTermNode(termNode, context),
|
|
63
63
|
termVerifies = term.verify(context, verifyAhead);
|
|
64
64
|
|
package/src/verifier/topLevel.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
import Verifier from "../verifier";
|
|
5
5
|
|
|
6
6
|
import { nodeQuery } from "../utilities/query";
|
|
@@ -39,7 +39,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
39
39
|
{
|
|
40
40
|
nodeQuery: errorNodeQuery,
|
|
41
41
|
verify: (errorNode, context) => {
|
|
42
|
-
const { Error } =
|
|
42
|
+
const { Error } = ontology,
|
|
43
43
|
error = Error.fromErrorNode(errorNode, context),
|
|
44
44
|
errorVerifies = error.verify();
|
|
45
45
|
|
|
@@ -49,7 +49,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
49
49
|
{
|
|
50
50
|
nodeQuery: ruleNodeQuery,
|
|
51
51
|
verify: (ruleNode, context) => {
|
|
52
|
-
const { Rule } =
|
|
52
|
+
const { Rule } = ontology,
|
|
53
53
|
rule = Rule.fromRuleNode(ruleNode, context),
|
|
54
54
|
ruleVerifies = rule.verify();
|
|
55
55
|
|
|
@@ -59,7 +59,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
59
59
|
{
|
|
60
60
|
nodeQuery: axiomNodeQuery,
|
|
61
61
|
verify: (axiomNode, context) => {
|
|
62
|
-
const { Axiom } =
|
|
62
|
+
const { Axiom } = ontology,
|
|
63
63
|
axiom = Axiom.fromAxiomNode(axiomNode, context),
|
|
64
64
|
axiomVerifies = axiom.verify();
|
|
65
65
|
|
|
@@ -69,7 +69,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
69
69
|
{
|
|
70
70
|
nodeQuery: lemmaNodeQuery,
|
|
71
71
|
verify: (lemmaNode, context) => {
|
|
72
|
-
const { Lemma } =
|
|
72
|
+
const { Lemma } = ontology,
|
|
73
73
|
lemma = Lemma.fromLemmaNode(lemmaNode, context),
|
|
74
74
|
lemmaVerifies = lemma.verify();
|
|
75
75
|
|
|
@@ -79,7 +79,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
79
79
|
{
|
|
80
80
|
nodeQuery: sectionNodeQuery,
|
|
81
81
|
verify: (sectionNode, context) => {
|
|
82
|
-
const { Section } =
|
|
82
|
+
const { Section } = ontology,
|
|
83
83
|
section = Section.fromSectionNode(sectionNode, context),
|
|
84
84
|
sectionVerifies = section.verify();
|
|
85
85
|
|
|
@@ -89,7 +89,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
89
89
|
{
|
|
90
90
|
nodeQuery: theoremNodeQuery,
|
|
91
91
|
verify: (theoremNode, context) => {
|
|
92
|
-
const { Theorem } =
|
|
92
|
+
const { Theorem } = ontology,
|
|
93
93
|
theorem = Theorem.fromTheoremNode(theoremNode, context),
|
|
94
94
|
theoremVerifies = theorem.verify();
|
|
95
95
|
|
|
@@ -99,7 +99,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
99
99
|
{
|
|
100
100
|
nodeQuery: metaLemmaNodeQuery,
|
|
101
101
|
verify: (metaLemmaNode, context) => {
|
|
102
|
-
const { MetaLemma } =
|
|
102
|
+
const { MetaLemma } = ontology,
|
|
103
103
|
metaLemma = MetaLemma.fromMetaLemmaNode(metaLemmaNode, context),
|
|
104
104
|
metaLemmaVerifies = metaLemma.verify();
|
|
105
105
|
|
|
@@ -109,7 +109,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
109
109
|
{
|
|
110
110
|
nodeQuery: conjectureNodeQuery,
|
|
111
111
|
verify: (conjectureNode, context) => {
|
|
112
|
-
const { Conjecture } =
|
|
112
|
+
const { Conjecture } = ontology,
|
|
113
113
|
conjecture = Conjecture.fromConjectureNode(conjectureNode, context),
|
|
114
114
|
conjectureVerifies = conjecture.verify();
|
|
115
115
|
|
|
@@ -119,7 +119,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
119
119
|
{
|
|
120
120
|
nodeQuery: metatheoremNodeQuery,
|
|
121
121
|
verify: (metatheoremNode, context) => {
|
|
122
|
-
const { Metatheorem } =
|
|
122
|
+
const { Metatheorem } = ontology,
|
|
123
123
|
metatheorem = Metatheorem.fromMetatheoremNode(metatheoremNode, context),
|
|
124
124
|
metatheoremVerifies = metatheorem.verify();
|
|
125
125
|
|
|
@@ -129,7 +129,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
129
129
|
{
|
|
130
130
|
nodeQuery: variableDeclarationNodeQuery,
|
|
131
131
|
verify: (variableDeclarationNode, context) => {
|
|
132
|
-
const { VariableDeclaration } =
|
|
132
|
+
const { VariableDeclaration } = ontology,
|
|
133
133
|
variableDeclaration = VariableDeclaration.fromVariableDeclarationNode(variableDeclarationNode, context),
|
|
134
134
|
variableDeclarationVerifies = variableDeclaration.verify();
|
|
135
135
|
|
|
@@ -139,7 +139,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
139
139
|
{
|
|
140
140
|
nodeQuery: simpleTypeDeclarationNodeQuery,
|
|
141
141
|
verify: (simpleTypeDeclarationNode, context) => {
|
|
142
|
-
const { SimpleTypeDeclaration } =
|
|
142
|
+
const { SimpleTypeDeclaration } = ontology,
|
|
143
143
|
simpleTypeDeclaration = SimpleTypeDeclaration.fromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context),
|
|
144
144
|
simpleTypeDeclarationVerifies = simpleTypeDeclaration.verify();
|
|
145
145
|
|
|
@@ -149,7 +149,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
149
149
|
{
|
|
150
150
|
nodeQuery: typePrefixDeclarationNodeQuery,
|
|
151
151
|
verify: (typePrefixDeclarationNode, context) => {
|
|
152
|
-
const { TypePrefixDeclaration } =
|
|
152
|
+
const { TypePrefixDeclaration } = ontology,
|
|
153
153
|
typePrefixDeclaration = TypePrefixDeclaration.fromTypePrefixDeclarationNode(typePrefixDeclarationNode, context),
|
|
154
154
|
typePrefixDeclarationVerifies = typePrefixDeclaration.verify();
|
|
155
155
|
|
|
@@ -159,7 +159,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
159
159
|
{
|
|
160
160
|
nodeQuery: combinatorDeclarationNodeQuery,
|
|
161
161
|
verify: (combinatorDeclarationNode, context) => {
|
|
162
|
-
const { CombinatorDeclaration } =
|
|
162
|
+
const { CombinatorDeclaration } = ontology,
|
|
163
163
|
combinatorDeclaration = CombinatorDeclaration.fromCombinatorDeclarationNode(combinatorDeclarationNode, context),
|
|
164
164
|
combinatorDeclarationVerifies = combinatorDeclaration.verify();
|
|
165
165
|
|
|
@@ -169,7 +169,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
169
169
|
{
|
|
170
170
|
nodeQuery: constructorDeclarationNodeQuery,
|
|
171
171
|
verify: (constructorDeclarationNode, context) => {
|
|
172
|
-
const { ConstructorDeclaration } =
|
|
172
|
+
const { ConstructorDeclaration } = ontology,
|
|
173
173
|
constructorDeclaration = ConstructorDeclaration.fromConstructorDeclarationNode(constructorDeclarationNode, context),
|
|
174
174
|
constructorDeclarationVerifies = constructorDeclaration.verify();
|
|
175
175
|
|
|
@@ -179,7 +179,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
179
179
|
{
|
|
180
180
|
nodeQuery: complexTypeDeclarationNodeQuery,
|
|
181
181
|
verify: (complexTypeDeclarationNode, context) => {
|
|
182
|
-
const { ComplexTypeDeclaration } =
|
|
182
|
+
const { ComplexTypeDeclaration } = ontology,
|
|
183
183
|
complexTypeDeclaration = ComplexTypeDeclaration.fromComplexTypeDeclarationNode(complexTypeDeclarationNode, context),
|
|
184
184
|
complexTypeDeclarationVerifies = complexTypeDeclaration.verify();
|
|
185
185
|
|
|
@@ -189,7 +189,7 @@ class TopLevelVerifier extends Verifier {
|
|
|
189
189
|
{
|
|
190
190
|
nodeQuery: metavariableDeclarationNodeQuery,
|
|
191
191
|
verify: (metavariableDeclarationNode, context) => {
|
|
192
|
-
const { MetavariableDeclaration } =
|
|
192
|
+
const { MetavariableDeclaration } = ontology,
|
|
193
193
|
metavariableDeclaration = MetavariableDeclaration.fromMetavariableDeclarationNode(metavariableDeclarationNode, context),
|
|
194
194
|
metavariableDeclarationVerifies = metavariableDeclaration.verify();
|
|
195
195
|
|