occam-verify-cli 1.0.383 → 1.0.386
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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { arrayUtilities } from "necessary";
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import ontology from "../ontology";
|
|
6
6
|
import LocalContext from "../context/local";
|
|
7
7
|
import Substitutions from "../substitutions";
|
|
8
8
|
|
|
@@ -346,14 +346,14 @@ export default class TopLevelAssertion {
|
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
export function proofFromProofNode(proofNode, context) {
|
|
349
|
-
const { Proof } =
|
|
349
|
+
const { Proof } = ontology,
|
|
350
350
|
proof = Proof.fromProofNode(proofNode, context);
|
|
351
351
|
|
|
352
352
|
return proof;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
export function labelsFromLabelNodes(labelNodes, context) {
|
|
356
|
-
const { Label } =
|
|
356
|
+
const { Label } = ontology,
|
|
357
357
|
labels = labelNodes.map((labelNode) => {
|
|
358
358
|
const label = Label.fromLabelNode(labelNode, context);
|
|
359
359
|
|
|
@@ -367,7 +367,7 @@ export function signatureFromSignatureNode(signatureNode, context) {
|
|
|
367
367
|
let signature = null;
|
|
368
368
|
|
|
369
369
|
if (signatureNode !== null) {
|
|
370
|
-
const { Signature } =
|
|
370
|
+
const { Signature } = ontology;
|
|
371
371
|
|
|
372
372
|
signature = Signature.fromSignatureNode(signatureNode, context);
|
|
373
373
|
}
|
|
@@ -376,14 +376,14 @@ export function signatureFromSignatureNode(signatureNode, context) {
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
export function deductionFromDeductionNode(deductionNode, context) {
|
|
379
|
-
const { Deduction } =
|
|
379
|
+
const { Deduction } = ontology,
|
|
380
380
|
deduction = Deduction.fromDeductionNode(deductionNode, context);
|
|
381
381
|
|
|
382
382
|
return deduction;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
export function suppositionsFromSuppositionNodes(suppositionNodes, context) {
|
|
386
|
-
const { Supposition } =
|
|
386
|
+
const { Supposition } = ontology,
|
|
387
387
|
suppositions = suppositionNodes.map((suppositionNode) => {
|
|
388
388
|
const supposition = Supposition.fromSuppositionNode(suppositionNode, context);
|
|
389
389
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
import LocalContext from "../context/local";
|
|
5
5
|
import Substitutions from "../substitutions";
|
|
6
6
|
|
|
@@ -189,7 +189,7 @@ export default class TopLevelMetaAssertion {
|
|
|
189
189
|
function labelFromLabelNode(labelNode, context) {
|
|
190
190
|
let label = null;
|
|
191
191
|
|
|
192
|
-
const { Label } =
|
|
192
|
+
const { Label } = ontology;
|
|
193
193
|
|
|
194
194
|
if (labelNode !== null) {
|
|
195
195
|
label = Label.fromLabelNode(labelNode, context);
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { arrayUtilities } from "necessary";
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import ontology from "../ontology";
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { define } from "../ontology";
|
|
8
8
|
import { BASE_TYPE_SYMBOL } from "../constants";
|
|
9
9
|
import { typeFromTypeNode } from "../utilities/node";
|
|
10
10
|
import { stringFromTypeNameTypePrefixNameAndSuperTypes } from "../utilities/type";
|
|
@@ -405,7 +405,7 @@ class Type {
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
-
export default
|
|
408
|
+
export default define(Type);
|
|
409
409
|
|
|
410
410
|
function superTypesFromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context) {
|
|
411
411
|
const superTypeNodes = simpleTypeDeclarationNode.getSuperTypeNodes(),
|
|
@@ -444,7 +444,7 @@ function superTypesFromComplexTypeDeclarationNode(complexTypeDeclarationNode, co
|
|
|
444
444
|
}
|
|
445
445
|
|
|
446
446
|
function propertiesFromComplexTypeDeclarationNode(complexTypeDeclarationNode, context) {
|
|
447
|
-
const { Property } =
|
|
447
|
+
const { Property } = ontology,
|
|
448
448
|
propertyDeclarationNodes = complexTypeDeclarationNode.getPropertyDeclarationNodes(),
|
|
449
449
|
properties = propertyDeclarationNodes.map((propertyDeclarationNode) => {
|
|
450
450
|
const property = Property.fromPropertyDeclarationNode(propertyDeclarationNode, context);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { define } from "../ontology";
|
|
4
4
|
|
|
5
|
-
class TypePrefix {
|
|
5
|
+
export default define (class TypePrefix {
|
|
6
6
|
constructor(string, name) {
|
|
7
7
|
this.string = string;
|
|
8
8
|
this.name = name;
|
|
@@ -49,6 +49,4 @@ class TypePrefix {
|
|
|
49
49
|
|
|
50
50
|
return type;
|
|
51
51
|
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export default domAssigned(TypePrefix);
|
|
52
|
+
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { define } from "../ontology";
|
|
6
6
|
import { EMPTY_STRING } from "../constants";
|
|
7
7
|
import { typeFromTypeNode } from "../utilities/node";
|
|
8
8
|
import { typeFromJSON, typeToTypeJSON } from "../utilities/json";
|
|
9
9
|
import { variableNodeFromVariableString } from "../context/partial/variable";
|
|
10
10
|
|
|
11
|
-
export default
|
|
11
|
+
export default define(class Variable {
|
|
12
12
|
constructor(string, node, type, identifier, propertyRelations) {
|
|
13
13
|
this.string = string;
|
|
14
14
|
this.node = node;
|
|
@@ -134,7 +134,7 @@ export default domAssigned(class Variable {
|
|
|
134
134
|
termUnifies = true;
|
|
135
135
|
}
|
|
136
136
|
} else {
|
|
137
|
-
const { TermSubstitution } =
|
|
137
|
+
const { TermSubstitution } = ontology,
|
|
138
138
|
context = specificContext, ///
|
|
139
139
|
variable = this, ///
|
|
140
140
|
termSubstitution = TermSubstitution.fromTernAndVariable(term, variable, context),
|
|
@@ -214,7 +214,7 @@ export default domAssigned(class Variable {
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
static fromVariableDeclarationNode(variableDeclarationNode, context) {
|
|
217
|
-
const { Variable } =
|
|
217
|
+
const { Variable } = ontology,
|
|
218
218
|
provisional = variableDeclarationNode.isProvisional(),
|
|
219
219
|
typeNode = variableDeclarationNode.getTypeNode(),
|
|
220
220
|
type = typeFromTypeNode(typeNode, context);
|
|
@@ -255,7 +255,7 @@ export default domAssigned(class Variable {
|
|
|
255
255
|
});
|
|
256
256
|
|
|
257
257
|
function variableFromVariableNodeAndType(variableNode, type) {
|
|
258
|
-
const { Variable } =
|
|
258
|
+
const { Variable } = ontology,
|
|
259
259
|
node = variableNode, ///
|
|
260
260
|
variableIdentifier = variableNode.getVariableIdentifier(),
|
|
261
261
|
string = variableIdentifier, ///,
|
package/src/ontology.js
ADDED
package/src/preamble.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import Type from "./
|
|
4
|
-
import Term from "./
|
|
5
|
-
import Rule from "./
|
|
6
|
-
import Step from "./
|
|
7
|
-
import Label from "./
|
|
8
|
-
import Axiom from "./
|
|
9
|
-
import Lemma from "./
|
|
10
|
-
import Frame from "./
|
|
11
|
-
import Proof from "./
|
|
12
|
-
import Error from "./
|
|
13
|
-
import Premise from "./
|
|
14
|
-
import Theorem from "./
|
|
15
|
-
import Section from "./
|
|
16
|
-
import Equality from "./
|
|
17
|
-
import MetaType from "./
|
|
18
|
-
import Subproof from "./
|
|
19
|
-
import Variable from "./
|
|
20
|
-
import Property from "./
|
|
21
|
-
import Parameter from "./
|
|
22
|
-
import Reference from "./
|
|
23
|
-
import Statement from "./
|
|
24
|
-
import Judgement from "./
|
|
25
|
-
import MetaLemma from "./
|
|
26
|
-
import Deduction from "./
|
|
27
|
-
import Signature from "./
|
|
28
|
-
import TypePrefix from "./
|
|
29
|
-
import Conjecture from "./
|
|
30
|
-
import Conclusion from "./
|
|
31
|
-
import Derivation from "./
|
|
32
|
-
import Combinator from "./
|
|
33
|
-
import Hypothesis from "./
|
|
34
|
-
import Constructor from "./
|
|
35
|
-
import Declaration from "./
|
|
36
|
-
import Supposition from "./
|
|
37
|
-
import Metatheorem from "./
|
|
38
|
-
import Metavariable from "./
|
|
39
|
-
import ProcedureCall from "./
|
|
40
|
-
import SubDerivation from "./
|
|
41
|
-
import TypeAssertion from "./
|
|
42
|
-
import DefinedAssertion from "./
|
|
43
|
-
import PropertyRelation from "./
|
|
44
|
-
import TermSubstitution from "./
|
|
45
|
-
import FrameSubstitution from "./
|
|
46
|
-
import SubproofAssertion from "./
|
|
47
|
-
import PropertyAssertion from "./
|
|
48
|
-
import ContainedAssertion from "./
|
|
49
|
-
import SatisfiesAssertion from "./
|
|
50
|
-
import ProcedureReference from "./
|
|
51
|
-
import VariableDeclaration from "./
|
|
52
|
-
import BracketedCombinator from "./
|
|
53
|
-
import BracketedConstructor from "./
|
|
54
|
-
import SimpleTypeDeclaration from "./
|
|
55
|
-
import StatementSubstitution from "./
|
|
56
|
-
import ReferenceSubstitution from "./
|
|
57
|
-
import CombinatorDeclaration from "./
|
|
58
|
-
import TypePrefixDeclaration from "./
|
|
59
|
-
import ConstructorDeclaration from "./
|
|
60
|
-
import ComplexTypeDeclaration from "./
|
|
61
|
-
import MetavariableDeclaration from "./
|
|
3
|
+
import Type from "./ontology/type";
|
|
4
|
+
import Term from "./ontology/term";
|
|
5
|
+
import Rule from "./ontology/rule";
|
|
6
|
+
import Step from "./ontology/step";
|
|
7
|
+
import Label from "./ontology/label";
|
|
8
|
+
import Axiom from "./ontology/axiom";
|
|
9
|
+
import Lemma from "./ontology/lemma";
|
|
10
|
+
import Frame from "./ontology/frame";
|
|
11
|
+
import Proof from "./ontology/proof";
|
|
12
|
+
import Error from "./ontology/error";
|
|
13
|
+
import Premise from "./ontology/premise";
|
|
14
|
+
import Theorem from "./ontology/theorem";
|
|
15
|
+
import Section from "./ontology/section";
|
|
16
|
+
import Equality from "./ontology/equality";
|
|
17
|
+
import MetaType from "./ontology/metaType";
|
|
18
|
+
import Subproof from "./ontology/subproof";
|
|
19
|
+
import Variable from "./ontology/variable";
|
|
20
|
+
import Property from "./ontology/property";
|
|
21
|
+
import Parameter from "./ontology/parameter";
|
|
22
|
+
import Reference from "./ontology/reference";
|
|
23
|
+
import Statement from "./ontology/statement";
|
|
24
|
+
import Judgement from "./ontology/judgement";
|
|
25
|
+
import MetaLemma from "./ontology/metaLemma";
|
|
26
|
+
import Deduction from "./ontology/deduction";
|
|
27
|
+
import Signature from "./ontology/signature";
|
|
28
|
+
import TypePrefix from "./ontology/typePrefix";
|
|
29
|
+
import Conjecture from "./ontology/conjecture";
|
|
30
|
+
import Conclusion from "./ontology/conclusion";
|
|
31
|
+
import Derivation from "./ontology/derivation";
|
|
32
|
+
import Combinator from "./ontology/combinator";
|
|
33
|
+
import Hypothesis from "./ontology/hypothesis";
|
|
34
|
+
import Constructor from "./ontology/constructor";
|
|
35
|
+
import Declaration from "./ontology/declaration";
|
|
36
|
+
import Supposition from "./ontology/supposition";
|
|
37
|
+
import Metatheorem from "./ontology/metatheorem";
|
|
38
|
+
import Metavariable from "./ontology/metavariable";
|
|
39
|
+
import ProcedureCall from "./ontology/procedureCall";
|
|
40
|
+
import SubDerivation from "./ontology/subDerivation";
|
|
41
|
+
import TypeAssertion from "./ontology/assertion/type";
|
|
42
|
+
import DefinedAssertion from "./ontology/assertion/defined";
|
|
43
|
+
import PropertyRelation from "./ontology/propertyRelation";
|
|
44
|
+
import TermSubstitution from "./ontology/substitution/term";
|
|
45
|
+
import FrameSubstitution from "./ontology/substitution/frame";
|
|
46
|
+
import SubproofAssertion from "./ontology/assertion/subproof";
|
|
47
|
+
import PropertyAssertion from "./ontology/assertion/property";
|
|
48
|
+
import ContainedAssertion from "./ontology/assertion/contained";
|
|
49
|
+
import SatisfiesAssertion from "./ontology/assertion/satisfies";
|
|
50
|
+
import ProcedureReference from "./ontology/procedureReference";
|
|
51
|
+
import VariableDeclaration from "./ontology/declaration/variable";
|
|
52
|
+
import BracketedCombinator from "./ontology/combinator/bracketed";
|
|
53
|
+
import BracketedConstructor from "./ontology/constructor/bracketed";
|
|
54
|
+
import SimpleTypeDeclaration from "./ontology/declaration/simpleType";
|
|
55
|
+
import StatementSubstitution from "./ontology/substitution/statement";
|
|
56
|
+
import ReferenceSubstitution from "./ontology/substitution/reference";
|
|
57
|
+
import CombinatorDeclaration from "./ontology/declaration/combinator";
|
|
58
|
+
import TypePrefixDeclaration from "./ontology/declaration/typePrefix";
|
|
59
|
+
import ConstructorDeclaration from "./ontology/declaration/constructor";
|
|
60
|
+
import ComplexTypeDeclaration from "./ontology/declaration/complexType";
|
|
61
|
+
import MetavariableDeclaration from "./ontology/declaration/metavariable";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
import Unifier from "../unifier";
|
|
5
5
|
|
|
6
6
|
import { nodeQuery } from "../utilities/query";
|
|
@@ -26,7 +26,7 @@ class IntrinsicLevelUnifier extends Unifier {
|
|
|
26
26
|
unify: (generalTermVariableNode, specificTermNode, substitutions, generalContext, specificContext) => {
|
|
27
27
|
let termUnifies;
|
|
28
28
|
|
|
29
|
-
const { Term, Variable } =
|
|
29
|
+
const { Term, Variable } = ontology,
|
|
30
30
|
termNode = specificTermNode, ///
|
|
31
31
|
variableNode = generalTermVariableNode; ///
|
|
32
32
|
|
package/src/unifier/metaLevel.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
import Unifier from "../unifier";
|
|
5
5
|
|
|
6
6
|
import { nodeQuery } from "../utilities/query";
|
|
@@ -32,7 +32,7 @@ class MetaLevelUnifier extends Unifier {
|
|
|
32
32
|
unify: (generalStatementMetavariableNode, specificStatementNode, substitutions, generalContext, specificContext) => {
|
|
33
33
|
let statementUnifies;
|
|
34
34
|
|
|
35
|
-
const { Metavariable, Statement } =
|
|
35
|
+
const { Metavariable, Statement } = ontology; ///
|
|
36
36
|
|
|
37
37
|
let context,
|
|
38
38
|
statementNode;
|
|
@@ -46,7 +46,7 @@ class MetaLevelUnifier extends Unifier {
|
|
|
46
46
|
|
|
47
47
|
statementNode = metavariableNodeParentNode; ///
|
|
48
48
|
|
|
49
|
-
const { TermSubstitution, FrameSubstitution } =
|
|
49
|
+
const { TermSubstitution, FrameSubstitution } = ontology,
|
|
50
50
|
frameSubstitution = FrameSubstitution.fromStatementNode(statementNode, context),
|
|
51
51
|
termSubstitution = TermSubstitution.fromStatementNode(statementNode, context),
|
|
52
52
|
substitution = (frameSubstitution || termSubstitution);
|
|
@@ -68,7 +68,7 @@ class MetaLevelUnifier extends Unifier {
|
|
|
68
68
|
unify: (generalFrameDeclarationMetavariableNode, specificFrameNode, substitutions, generalContext, specificContext) => {
|
|
69
69
|
let frameUnifies;
|
|
70
70
|
|
|
71
|
-
const { Frame, Metavariable } =
|
|
71
|
+
const { Frame, Metavariable } = ontology,
|
|
72
72
|
frameNode = specificFrameNode, ///
|
|
73
73
|
metavariableNode = generalFrameDeclarationMetavariableNode; ///
|
|
74
74
|
|
|
@@ -93,7 +93,7 @@ class MetaLevelUnifier extends Unifier {
|
|
|
93
93
|
unify: (generalTermVariableNode, specificTermNode, substitutions, generalContext, specificContext) => {
|
|
94
94
|
let termUnifies;
|
|
95
95
|
|
|
96
|
-
const { Term, Variable } =
|
|
96
|
+
const { Term, Variable } = ontology,
|
|
97
97
|
termNode = specificTermNode, ///
|
|
98
98
|
variableNode = generalTermVariableNode; ///
|
|
99
99
|
|
|
@@ -118,7 +118,7 @@ class MetaLevelUnifier extends Unifier {
|
|
|
118
118
|
unify: (generalDeclarationMetavariableNode, specificDeclarationMetavariableNode, substitutions, generalContext, specificContext) => {
|
|
119
119
|
let referenceUnifies;
|
|
120
120
|
|
|
121
|
-
const { Metavariable, Reference } =
|
|
121
|
+
const { Metavariable, Reference } = ontology;
|
|
122
122
|
|
|
123
123
|
let context,
|
|
124
124
|
metavariableNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
import Unifier from "../unifier";
|
|
5
5
|
|
|
6
6
|
import { nodeQuery } from "../utilities/query";
|
|
@@ -28,7 +28,7 @@ class MetavariableUnifier extends Unifier {
|
|
|
28
28
|
unify: (generalTypeNode, specificTermNode, generalContext, specificContext) => {
|
|
29
29
|
let termUnifies;
|
|
30
30
|
|
|
31
|
-
const { Term } =
|
|
31
|
+
const { Term } = ontology,
|
|
32
32
|
typeNode = generalTypeNode, ///
|
|
33
33
|
termNode = specificTermNode, ///
|
|
34
34
|
nominalTypeName = typeNode.getNominalTypeName(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
import Unifier from "../unifier";
|
|
5
5
|
|
|
6
6
|
import { nodeQuery } from "../utilities/query";
|
|
@@ -31,7 +31,7 @@ class StatementWithCombinatorUnifier extends Unifier {
|
|
|
31
31
|
unify: (generalMetaTypeNode, specificStatementNode, assignments, stated, generalContext, specificContext) => {
|
|
32
32
|
let unifies;
|
|
33
33
|
|
|
34
|
-
const { Statement, MetaType } =
|
|
34
|
+
const { Statement, MetaType } = ontology,
|
|
35
35
|
metaTypeNode = generalMetaTypeNode, ///
|
|
36
36
|
statementNode = specificStatementNode; ///
|
|
37
37
|
|
|
@@ -57,7 +57,7 @@ class StatementWithCombinatorUnifier extends Unifier {
|
|
|
57
57
|
unify: (generalMetaTypeNode, specificFrameNode, assignments, stated, generalContext, specificContext) => {
|
|
58
58
|
let unifies;
|
|
59
59
|
|
|
60
|
-
const { Frame, MetaType } =
|
|
60
|
+
const { Frame, MetaType } = ontology,
|
|
61
61
|
metaTypeNode = generalMetaTypeNode, ///
|
|
62
62
|
frameNode = specificFrameNode; ///
|
|
63
63
|
|
|
@@ -83,7 +83,7 @@ class StatementWithCombinatorUnifier extends Unifier {
|
|
|
83
83
|
unify: (generalTypeNode, specificTermNode, assignments, stated, generalContext, specificContext) => {
|
|
84
84
|
let unifies = false;
|
|
85
85
|
|
|
86
|
-
const { Term } =
|
|
86
|
+
const { Term } = ontology,
|
|
87
87
|
typeNode = generalTypeNode, ///
|
|
88
88
|
termNode = specificTermNode, ///
|
|
89
89
|
nominalTypeName = typeNode.getNominalTypeName();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
import Unifier from "../unifier";
|
|
5
5
|
|
|
6
6
|
import { nodeQuery } from "../utilities/query";
|
|
@@ -28,7 +28,7 @@ class TermWithConstructorUnifier extends Unifier {
|
|
|
28
28
|
unify: (generalTypeNode, specificTermNode, context) => {
|
|
29
29
|
let unifies = false;
|
|
30
30
|
|
|
31
|
-
const { Term } =
|
|
31
|
+
const { Term } = ontology,
|
|
32
32
|
typeNode = generalTypeNode, ///
|
|
33
33
|
nominalTypeName = typeNode.getNominalTypeName(),
|
|
34
34
|
type = context.findTypeByNominalTypeName(nominalTypeName);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
import LocalContext from "../context/local";
|
|
5
5
|
import combinatorBracketedContext from "../context/bracketed/combinator";
|
|
6
6
|
import constructorBracketedContext from "../context/bracketed/constructor";
|
|
@@ -12,7 +12,7 @@ export function stripBracketsFromTerm(term, context) {
|
|
|
12
12
|
bracketedTermChildNode = bracketedTermChildNodeFromTermNode(termNode);
|
|
13
13
|
|
|
14
14
|
if (bracketedTermChildNode !== null) {
|
|
15
|
-
const { Term } =
|
|
15
|
+
const { Term } = ontology,
|
|
16
16
|
termNode = bracketedTermChildNode; ///
|
|
17
17
|
|
|
18
18
|
term = Term.fromTermNode(termNode, context);
|
|
@@ -28,7 +28,7 @@ export function stripBracketsFromReference(reference, context) {
|
|
|
28
28
|
if (bracketedReferenceChildNode !== null) {
|
|
29
29
|
context = contextFromReference(reference, context); ///
|
|
30
30
|
|
|
31
|
-
const { Reference } =
|
|
31
|
+
const { Reference } = ontology,
|
|
32
32
|
referenceNode = bracketedReferenceChildNode; ///
|
|
33
33
|
|
|
34
34
|
reference = Reference.fromReferenceNode(referenceNode, context);
|
|
@@ -44,7 +44,7 @@ export function stripBracketsFromStatement(statement, context) {
|
|
|
44
44
|
if (bracketedStatementChildNode !== null) {
|
|
45
45
|
context = contextFromStatement(statement, context); ///
|
|
46
46
|
|
|
47
|
-
const { Statement } =
|
|
47
|
+
const { Statement } = ontology,
|
|
48
48
|
statementNode = bracketedStatementChildNode; ///
|
|
49
49
|
|
|
50
50
|
statement = Statement.fromStatementNode(statementNode, context);
|
package/src/utilities/context.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
import LocalContext from "../context/local";
|
|
5
5
|
|
|
6
6
|
export function metavariableFromFrame(frame, context) {
|
|
7
7
|
context = contextFromFrame(frame, context); ///
|
|
8
8
|
|
|
9
|
-
const { Metavariable } =
|
|
9
|
+
const { Metavariable } = ontology,
|
|
10
10
|
frameNode = frame.getNode(),
|
|
11
11
|
metavariable = Metavariable.fromFrameNode(frameNode, context);
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ export function metavariableFromFrame(frame, context) {
|
|
|
16
16
|
export function equalityFromStatement(statement, context) {
|
|
17
17
|
context = contextFromStatement(statement, context); ///
|
|
18
18
|
|
|
19
|
-
const { Equality } =
|
|
19
|
+
const { Equality } = ontology,
|
|
20
20
|
statementNode = statement.getNode(),
|
|
21
21
|
equality = Equality.fromStatementNode(statementNode, context);
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ export function equalityFromStatement(statement, context) {
|
|
|
26
26
|
export function judgementFromStatement(statement, context) {
|
|
27
27
|
context = contextFromStatement(statement, context); ///
|
|
28
28
|
|
|
29
|
-
const { Judgement } =
|
|
29
|
+
const { Judgement } = ontology,
|
|
30
30
|
statementNode = statement.getNode(),
|
|
31
31
|
judgement = Judgement.fromStatementNode(statementNode, context);
|
|
32
32
|
|
|
@@ -36,7 +36,7 @@ export function judgementFromStatement(statement, context) {
|
|
|
36
36
|
export function metavariableFromStatement(statement, context) {
|
|
37
37
|
context = contextFromStatement(statement, context); ///
|
|
38
38
|
|
|
39
|
-
const { Metavariable } =
|
|
39
|
+
const { Metavariable } = ontology,
|
|
40
40
|
statementNode = statement.getNode(),
|
|
41
41
|
metavariable = Metavariable.fromStatementNode(statementNode, context);
|
|
42
42
|
|
|
@@ -46,7 +46,7 @@ export function metavariableFromStatement(statement, context) {
|
|
|
46
46
|
export function typeAssertionFromStatement(statement, context) {
|
|
47
47
|
context = contextFromStatement(statement, context); ///
|
|
48
48
|
|
|
49
|
-
const { TypeAssertion } =
|
|
49
|
+
const { TypeAssertion } = ontology,
|
|
50
50
|
statementNode = statement.getNode(),
|
|
51
51
|
typeAssertion = TypeAssertion.fromStatementNode(statementNode, context);
|
|
52
52
|
|
|
@@ -56,7 +56,7 @@ export function typeAssertionFromStatement(statement, context) {
|
|
|
56
56
|
export function definedAssertionFromStatement(statement, context) {
|
|
57
57
|
context = contextFromStatement(statement, context); ///
|
|
58
58
|
|
|
59
|
-
const { DefinedAssertion } =
|
|
59
|
+
const { DefinedAssertion } = ontology,
|
|
60
60
|
statementNode = statement.getNode(),
|
|
61
61
|
definedAssertion = DefinedAssertion.fromStatementNode(statementNode, context);
|
|
62
62
|
|
|
@@ -66,7 +66,7 @@ export function definedAssertionFromStatement(statement, context) {
|
|
|
66
66
|
export function propertyAssertionFromStatement(statement, context) {
|
|
67
67
|
context = contextFromStatement(statement, context); ///
|
|
68
68
|
|
|
69
|
-
const { PropertyAssertion } =
|
|
69
|
+
const { PropertyAssertion } = ontology,
|
|
70
70
|
statementNode = statement.getNode(),
|
|
71
71
|
propertyAssertion = PropertyAssertion.fromStatementNode(statementNode, context);
|
|
72
72
|
|
|
@@ -76,7 +76,7 @@ export function propertyAssertionFromStatement(statement, context) {
|
|
|
76
76
|
export function subproofAssertionFromStatement(statement, context) {
|
|
77
77
|
context = contextFromStatement(statement, context); ///
|
|
78
78
|
|
|
79
|
-
const { SubproofAssertion } =
|
|
79
|
+
const { SubproofAssertion } = ontology,
|
|
80
80
|
statementNode = statement.getNode(),
|
|
81
81
|
subproofAssertion = SubproofAssertion.fromStatementNode(statementNode, context);
|
|
82
82
|
|
|
@@ -86,7 +86,7 @@ export function subproofAssertionFromStatement(statement, context) {
|
|
|
86
86
|
export function containedAssertionFromStatement(statement, context) {
|
|
87
87
|
context = contextFromStatement(statement, context); ///
|
|
88
88
|
|
|
89
|
-
const { ContainedAssertion } =
|
|
89
|
+
const { ContainedAssertion } = ontology,
|
|
90
90
|
statementNode = statement.getNode(),
|
|
91
91
|
containedAssertion = ContainedAssertion.fromStatementNode(statementNode, context);
|
|
92
92
|
|
|
@@ -96,7 +96,7 @@ export function containedAssertionFromStatement(statement, context) {
|
|
|
96
96
|
export function satisfiesAssertionFromStatement(statement, context) {
|
|
97
97
|
context = contextFromStatement(statement, context); ///
|
|
98
98
|
|
|
99
|
-
const { SatisfiesAssertion } =
|
|
99
|
+
const { SatisfiesAssertion } = ontology,
|
|
100
100
|
statementNode = statement.getNode(),
|
|
101
101
|
satisfiesAssertion = SatisfiesAssertion.fromStatementNode(statementNode, context);
|
|
102
102
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { fileSystemUtilities as occamFileSystemUtilities } from "occam-file-system";
|
|
4
4
|
import { pathUtilities, fileSystemUtilities as necessaryFileSystemUtilities } from "necessary";
|
|
5
5
|
|
|
6
|
-
import { releaseContextFromJSON } from "../utilities/releaseContext";
|
|
6
|
+
import { releaseContextFromJSON, releaseContextFromProject } from "../utilities/releaseContext";
|
|
7
7
|
|
|
8
8
|
const { loadProject } = occamFileSystemUtilities,
|
|
9
9
|
{ concatenatePaths } = pathUtilities,
|