occam-verify-cli 1.0.382 → 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/prepare.js +25 -0
- 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/{configure.js → prepare.js} +1 -1
- 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/verify.js +2 -2
- package/lib/configure.js +0 -25
- 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/mixins/step/unify.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { arrayUtilities } from "necessary";
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import ontology from "../../ontology";
|
|
6
6
|
import Substitutions from "../../substitutions";
|
|
7
7
|
|
|
8
8
|
import { equalityFromStatement,
|
|
@@ -53,7 +53,7 @@ function unifyWithReference(statement, reference, satisfiesAssertion, substituti
|
|
|
53
53
|
|
|
54
54
|
context.trace(`Unifying the '${statementString}' statement with the '${referenceString}' reference...`);
|
|
55
55
|
|
|
56
|
-
const { StatementSubstitution } =
|
|
56
|
+
const { StatementSubstitution } = ontology,
|
|
57
57
|
metavariable = reference.getMetavariable(),
|
|
58
58
|
specificContext = context, ///
|
|
59
59
|
statementSubstitution = StatementSubstitution.fromStatementAndMetavariable(statement, metavariable, context),
|
|
@@ -156,7 +156,7 @@ function unifyWithAxiomLemmaTheoremOrConjecture(statement, reference, satisfiesA
|
|
|
156
156
|
const statementAndStepsUnify = axiomLemmaTheoremOrConjecture.unifyStatementAndStepsOrSubproofs(statement, stepsOrSubproofs, substitutions, context);
|
|
157
157
|
|
|
158
158
|
if (statementAndStepsUnify) {
|
|
159
|
-
const { StatementSubstitution } =
|
|
159
|
+
const { StatementSubstitution } = ontology,
|
|
160
160
|
metavariable = reference.getMetavariable(),
|
|
161
161
|
specificContext = context, ///
|
|
162
162
|
statementSubstitution = StatementSubstitution.fromStatementAndMetavariable(statement, metavariable, context),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../../ontology";
|
|
4
4
|
|
|
5
5
|
function unifyWithBracketedConstructor(term, context, verifyAhead) {
|
|
6
6
|
let unifiesWithBracketedConstructor;
|
|
7
7
|
|
|
8
|
-
const { BracketedConstructor } =
|
|
8
|
+
const { BracketedConstructor } = ontology,
|
|
9
9
|
bracketedConstructor = BracketedConstructor.fromNothing();
|
|
10
10
|
|
|
11
11
|
unifiesWithBracketedConstructor = bracketedConstructor.unifyTerm(term, context, verifyAhead);
|
|
@@ -32,7 +32,7 @@ function unifyWithConstructors(term, context, verifyAhead) {
|
|
|
32
32
|
function verifyTermAsVariable(term, context, verifyAhead) {
|
|
33
33
|
let termVerifiesAsVariable = false;
|
|
34
34
|
|
|
35
|
-
const { Variable } =
|
|
35
|
+
const { Variable } = ontology,
|
|
36
36
|
termNode = term.getNode(),
|
|
37
37
|
singularVariableNode = termNode.getSingularVariableNode();
|
|
38
38
|
|
|
@@ -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
|
-
import {
|
|
6
|
+
import { define } from "../../ontology";
|
|
7
7
|
import { termFromTermAndSubstitutions, frameFromFrameAndSubstitutions, statementFromStatementAndSubstitutions } from "../../utilities/substitutions";
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default define(class ContainedAssertion {
|
|
10
10
|
constructor(string, node, tokens, term, frame, negated, statement) {
|
|
11
11
|
this.string = string;
|
|
12
12
|
this.node = node;
|
|
@@ -221,7 +221,7 @@ export default domAssigned(class ContainedAssertion {
|
|
|
221
221
|
const containedAssertionNode = statementNode.getContainedAssertionNode();
|
|
222
222
|
|
|
223
223
|
if (containedAssertionNode !== null) {
|
|
224
|
-
const { Term, Frame, Statement } =
|
|
224
|
+
const { Term, Frame, Statement } = ontology,
|
|
225
225
|
node = containedAssertionNode, ///
|
|
226
226
|
string = context.nodeAsString(node),
|
|
227
227
|
tokens = context.nodeAsTokens(node),
|
|
@@ -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
|
-
import {
|
|
6
|
+
import { define } from "../../ontology";
|
|
7
7
|
import { termFromTermAndSubstitutions, frameFromFrameAndSubstitutions } from "../../utilities/substitutions";
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default define(class DefinedAssertion {
|
|
10
10
|
constructor(string, node, tokens, term, frame, negated) {
|
|
11
11
|
this.string = string;
|
|
12
12
|
this.node = node;
|
|
@@ -192,7 +192,7 @@ export default domAssigned(class DefinedAssertion {
|
|
|
192
192
|
const definedAssertionNode = statementNode.getDefinedAssertionNode();
|
|
193
193
|
|
|
194
194
|
if (definedAssertionNode !== null) {
|
|
195
|
-
const { Term, Frame } =
|
|
195
|
+
const { Term, Frame } = ontology,
|
|
196
196
|
node = definedAssertionNode, ///
|
|
197
197
|
string = context.nodeAsString(node),
|
|
198
198
|
tokens = context.nodeAsTokens(node),
|
|
@@ -211,7 +211,7 @@ function verifyWhenDerived(term, frame, negated, context) {
|
|
|
211
211
|
let verifiesWhenDerived = false;
|
|
212
212
|
|
|
213
213
|
if (term !== null) {
|
|
214
|
-
const { Variable } =
|
|
214
|
+
const { Variable } = ontology,
|
|
215
215
|
termNode = term.getNode(),
|
|
216
216
|
variable = Variable.fromTermNode(termNode, context),
|
|
217
217
|
generalContext = context, ///
|
|
@@ -227,7 +227,7 @@ function verifyWhenDerived(term, frame, negated, context) {
|
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
if (frame!== null) {
|
|
230
|
-
const { Metavariable } =
|
|
230
|
+
const { Metavariable } = ontology,
|
|
231
231
|
frameNode = frame.getNode(),
|
|
232
232
|
metavariable = Metavariable.fromFrameNode(frameNode, context),
|
|
233
233
|
metavariableDefined = context.isMetavariableDefined(metavariable);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../../ontology";
|
|
4
4
|
|
|
5
5
|
import VariableAssignment from "../../assignment/variable";
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { define } from "../../ontology";
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default define(class PropertyAssertion {
|
|
10
10
|
constructor(string, node, tokens, term, propertyRelation) {
|
|
11
11
|
this.string = string;
|
|
12
12
|
this.node = node;
|
|
@@ -177,7 +177,7 @@ export default domAssigned(class PropertyAssertion {
|
|
|
177
177
|
|
|
178
178
|
let variable;
|
|
179
179
|
|
|
180
|
-
const { Variable } =
|
|
180
|
+
const { Variable } = ontology,
|
|
181
181
|
termNode = this.term.getNode();
|
|
182
182
|
|
|
183
183
|
variable = Variable.fromTermNode(termNode, context);
|
|
@@ -204,7 +204,7 @@ export default domAssigned(class PropertyAssertion {
|
|
|
204
204
|
const propertyAssertionNode = statementNode.getPropertyAssertionNode();
|
|
205
205
|
|
|
206
206
|
if (propertyAssertionNode !== null) {
|
|
207
|
-
const { Term, PropertyRelation } =
|
|
207
|
+
const { Term, PropertyRelation } = ontology,
|
|
208
208
|
node = propertyAssertionNode, ///
|
|
209
209
|
string = context.nodeAsString(node),
|
|
210
210
|
tokens = context.nodeAsTokens(node),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../../ontology";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { define } from "../../ontology";
|
|
6
6
|
|
|
7
7
|
import Substitutions from "../../substitutions";
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default define(class SatisfiesAssertion {
|
|
10
10
|
constructor(string, node, tokens, signature, reference) {
|
|
11
11
|
this.string = string;
|
|
12
12
|
this.node = node;
|
|
@@ -169,7 +169,7 @@ export default domAssigned(class SatisfiesAssertion {
|
|
|
169
169
|
});
|
|
170
170
|
|
|
171
171
|
function signatureFromSatisfiesAssertionNode(satisfiesAssertionNode, context) {
|
|
172
|
-
const { Signature } =
|
|
172
|
+
const { Signature } = ontology,
|
|
173
173
|
signatureNode = satisfiesAssertionNode.getSignatureNode(),
|
|
174
174
|
signature = Signature.fromSignatureNode(signatureNode, context);
|
|
175
175
|
|
|
@@ -177,7 +177,7 @@ function signatureFromSatisfiesAssertionNode(satisfiesAssertionNode, context) {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
function satisfiesAssertionFromSatisfiesAssertionNode(satisfiesAssertionNode, context) {
|
|
180
|
-
const { Reference, SatisfiesAssertion } =
|
|
180
|
+
const { Reference, SatisfiesAssertion } = ontology,
|
|
181
181
|
node = satisfiesAssertionNode, ///
|
|
182
182
|
string = context.nodeAsString(node),
|
|
183
183
|
tokens = context.nodeAsTokens(node),
|
|
@@ -2,14 +2,14 @@
|
|
|
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 { unifyStatement } from "../../utilities/unification";
|
|
9
9
|
|
|
10
10
|
const { match } = arrayUtilities;
|
|
11
11
|
|
|
12
|
-
export default
|
|
12
|
+
export default define(class SubproofAssertion {
|
|
13
13
|
constructor(string, node, statements) {
|
|
14
14
|
this.string = string;
|
|
15
15
|
this.node = node;
|
|
@@ -110,7 +110,7 @@ export default domAssigned(class SubproofAssertion {
|
|
|
110
110
|
});
|
|
111
111
|
|
|
112
112
|
function statementsFromSubproofAssertionNode(subproofAssertionNode, context) {
|
|
113
|
-
const { Statement } =
|
|
113
|
+
const { Statement } = ontology,
|
|
114
114
|
statementNodes = subproofAssertionNode.getStatementNodes(),
|
|
115
115
|
statements = statementNodes.map((statementNode) => {
|
|
116
116
|
const statement = Statement.fromStatementNode(statementNode, context);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../../ontology";
|
|
4
4
|
import VariableAssignment from "../../assignment/variable";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { define } from "../../ontology";
|
|
7
7
|
|
|
8
|
-
export default
|
|
8
|
+
export default define(class TypeAssertion {
|
|
9
9
|
constructor(string, term, type) {
|
|
10
10
|
this.string = string;
|
|
11
11
|
this.term = term;
|
|
@@ -153,7 +153,7 @@ export default domAssigned(class TypeAssertion {
|
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
const { Type, Variable } =
|
|
156
|
+
const { Type, Variable } = ontology,
|
|
157
157
|
termNode = this.term.getNode();
|
|
158
158
|
|
|
159
159
|
let type,
|
|
@@ -189,7 +189,7 @@ export default domAssigned(class TypeAssertion {
|
|
|
189
189
|
const typeAssertionNode = statementNode.getTypeAssertionNode();
|
|
190
190
|
|
|
191
191
|
if (typeAssertionNode !== null) {
|
|
192
|
-
const { Term, Type } =
|
|
192
|
+
const { Term, Type } = ontology,
|
|
193
193
|
node = typeAssertionNode, ///
|
|
194
194
|
string = context.nodeAsString(node),
|
|
195
195
|
term = Term.fromTypeAssertionNode(typeAssertionNode, context),
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import TopLevelAssertion from "./topLevelAssertion";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { define } from "../ontology";
|
|
6
6
|
|
|
7
|
-
export default
|
|
7
|
+
export default define(class Axiom extends TopLevelAssertion {
|
|
8
8
|
isSatisfiable() {
|
|
9
9
|
const signature = this.getSignature(),
|
|
10
10
|
satisfiable = (signature !== null);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../../ontology";
|
|
4
4
|
import Combinator from "../combinator";
|
|
5
5
|
import combinatorBracketedContext from "../../context/bracketed/combinator";
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { define } from "../../ontology";
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default define(class BracketedCombinator extends Combinator {
|
|
10
10
|
unifyStatement(statement, assignments, stated, context) {
|
|
11
11
|
let statementUnifies;
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ export default domAssigned(class BracketedCombinator extends Combinator {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
static fromNothing() {
|
|
27
|
-
const { Statement } =
|
|
27
|
+
const { Statement } = ontology,
|
|
28
28
|
bracketedStatementNode = combinatorBracketedContext.getBracketedStatementNode(),
|
|
29
29
|
statementNode = bracketedStatementNode, ///
|
|
30
30
|
context = combinatorBracketedContext, ///
|
|
@@ -1,12 +1,12 @@
|
|
|
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 { unifyStatementWithCombinator } from "../utilities/unification";
|
|
7
7
|
import { statementFromJSON, statementToStatementJSON } from "../utilities/json";
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default define(class Combinator {
|
|
10
10
|
constructor(statement) {
|
|
11
11
|
this.statement = statement;
|
|
12
12
|
}
|
|
@@ -61,7 +61,7 @@ export default domAssigned(class Combinator {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
static fromCombinatorDeclarationNode(combinatorDeclarationNode, context) {
|
|
64
|
-
const { Statement } =
|
|
64
|
+
const { Statement } = ontology,
|
|
65
65
|
statement = Statement.fromCombinatorDeclarationNode(combinatorDeclarationNode, context),
|
|
66
66
|
combinator = new Combinator(statement);
|
|
67
67
|
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { statementFromJSON, statementToStatementJSON } from "../utilities/json";
|
|
7
7
|
|
|
8
|
-
export default
|
|
8
|
+
export default define(class Conclusion {
|
|
9
9
|
constructor(node, string, statement) {
|
|
10
10
|
this.node = node;
|
|
11
11
|
this.string = string;
|
|
@@ -89,7 +89,7 @@ export default domAssigned(class Conclusion {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
static fromConclusionNode(conclusionNode, context) {
|
|
92
|
-
const { Statement } =
|
|
92
|
+
const { Statement } = ontology,
|
|
93
93
|
node = conclusionNode, ///
|
|
94
94
|
string = context.nodeAsString(node),
|
|
95
95
|
statement = Statement.fromConclusionNode(conclusionNode, context),
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import TopLevelAssertion from "./topLevelAssertion";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { define } from "../ontology";
|
|
6
6
|
|
|
7
|
-
export default
|
|
7
|
+
export default define(class Conjecture extends TopLevelAssertion {
|
|
8
8
|
verify() {
|
|
9
9
|
let verifies;
|
|
10
10
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../../ontology";
|
|
4
4
|
import Constructor from "../constructor";
|
|
5
5
|
import constructorBracketedContext from "../../context/bracketed/constructor";
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { define } from "../../ontology";
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default define(class BracketedConstructor extends Constructor {
|
|
10
10
|
unifyTerm(term, context, verifyAhead) {
|
|
11
11
|
let termUnifies;
|
|
12
12
|
|
|
@@ -17,7 +17,7 @@ export default domAssigned(class BracketedConstructor extends Constructor {
|
|
|
17
17
|
termUnifies = super.unifyTerm(term, context, () => {
|
|
18
18
|
let verifiesAhead = false;
|
|
19
19
|
|
|
20
|
-
const { Term } =
|
|
20
|
+
const { Term } = ontology,
|
|
21
21
|
bracketedTerm = term, ///
|
|
22
22
|
bracketedTermNode = bracketedTerm.getNode(),
|
|
23
23
|
singularTermNode = bracketedTermNode.getSingularTermNode();
|
|
@@ -53,7 +53,7 @@ export default domAssigned(class BracketedConstructor extends Constructor {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
static fromNothing() {
|
|
56
|
-
const { Term } =
|
|
56
|
+
const { Term } = ontology,
|
|
57
57
|
bracketedTermNode = constructorBracketedContext.getBracketedTermNode(),
|
|
58
58
|
termNode = bracketedTermNode, ///
|
|
59
59
|
context = constructorBracketedContext, ///
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { define } from "../ontology";
|
|
6
|
+
import { baseType } from ".//type";
|
|
7
7
|
import { unifyTermWithConstructor } from "../utilities/unification";
|
|
8
8
|
import { termFromJSON, termToTermJSON } from "../utilities/json";
|
|
9
9
|
|
|
10
|
-
export default
|
|
10
|
+
export default define(class Constructor {
|
|
11
11
|
constructor(string, term) {
|
|
12
12
|
this.string = string;
|
|
13
13
|
this.term = term;
|
|
@@ -76,7 +76,7 @@ export default domAssigned(class Constructor {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
static fromConstructorDeclarationNode(constructorDeclarationNode, context) {
|
|
79
|
-
const { Term } =
|
|
79
|
+
const { Term } = ontology,
|
|
80
80
|
term = Term.fromConstructorDeclarationNode(constructorDeclarationNode, context),
|
|
81
81
|
string = stringFromTerm(term),
|
|
82
82
|
constructor = new Constructor(string, term);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../../ontology";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { define } from "../../ontology";
|
|
6
6
|
|
|
7
7
|
import combinatorVerifier from "../../verifier/combinator";
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default define(class CombinatorDeclaration {
|
|
10
10
|
constructor(context, node, string, combinator) {
|
|
11
11
|
this.context = context;
|
|
12
12
|
this.node = node;
|
|
@@ -74,7 +74,7 @@ export default domAssigned(class CombinatorDeclaration {
|
|
|
74
74
|
static name = "CombinatorDeclaration";
|
|
75
75
|
|
|
76
76
|
static fromCombinatorDeclarationNode(combinatorDeclarationNode, context) {
|
|
77
|
-
const { Combinator } =
|
|
77
|
+
const { Combinator } = ontology,
|
|
78
78
|
node = combinatorDeclarationNode, ///
|
|
79
79
|
string = context.nodeAsString(node),
|
|
80
80
|
combinator = Combinator.fromCombinatorDeclarationNode(combinatorDeclarationNode, context),
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { stringFromTypeNameTypePrefixNameAndSuperTypes } from "../../utilities/type";
|
|
7
7
|
|
|
8
|
-
export default
|
|
8
|
+
export default define(class ComplexTypeDeclaration {
|
|
9
9
|
constructor(context, node, string, type, prefixed) {
|
|
10
10
|
this.context = context;
|
|
11
11
|
this.node = node;
|
|
@@ -311,7 +311,7 @@ export default domAssigned(class ComplexTypeDeclaration {
|
|
|
311
311
|
static name = "ComplexTypeDeclaration";
|
|
312
312
|
|
|
313
313
|
static fromComplexTypeDeclarationNode(complexTypeDeclarationNode, context) {
|
|
314
|
-
const { Type } =
|
|
314
|
+
const { Type } = ontology,
|
|
315
315
|
type = Type.fromComplexTypeDeclarationNode(complexTypeDeclarationNode, context),
|
|
316
316
|
node = complexTypeDeclarationNode, ///
|
|
317
317
|
prefixed = complexTypeDeclarationNode.isPrefixed(),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../../ontology";
|
|
4
4
|
|
|
5
5
|
import constructorVerifier from "../../verifier/constructor";
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { define } from "../../ontology";
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default define(class ConstructorDeclaration {
|
|
10
10
|
constructor(context, node, string, constructor) {
|
|
11
11
|
this.context = context;
|
|
12
12
|
this.node = node;
|
|
@@ -120,7 +120,7 @@ export default domAssigned(class ConstructorDeclaration {
|
|
|
120
120
|
static name = "ConstructorDeclaration";
|
|
121
121
|
|
|
122
122
|
static fromConstructorDeclarationNode(constructorDeclarationNode, context) {
|
|
123
|
-
const { Constructor } =
|
|
123
|
+
const { Constructor } = ontology,
|
|
124
124
|
node = constructorDeclarationNode, ///
|
|
125
125
|
string = context.nodeAsString(node),
|
|
126
126
|
constructor = Constructor.fromConstructorDeclarationNode(constructorDeclarationNode, context),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../../ontology";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { define } from "../../ontology";
|
|
6
6
|
|
|
7
|
-
export default
|
|
7
|
+
export default define(class MetavariableDeclaration {
|
|
8
8
|
constructor(context, node, string, metavariable) {
|
|
9
9
|
this.context = context;
|
|
10
10
|
this.node = node;
|
|
@@ -113,7 +113,7 @@ export default domAssigned(class MetavariableDeclaration {
|
|
|
113
113
|
static name = "MetavariableDeclaration";
|
|
114
114
|
|
|
115
115
|
static fromMetavariableDeclarationNode(metavariableDeclarationNode, context) {
|
|
116
|
-
const { Metavariable } =
|
|
116
|
+
const { Metavariable } = ontology,
|
|
117
117
|
node = metavariableDeclarationNode, ///
|
|
118
118
|
metaType = metaTypeFromMetavariableDeclarationNode(metavariableDeclarationNode, context),
|
|
119
119
|
metavariable = Metavariable.fromMetavariableDeclarationNode(metavariableDeclarationNode, context),
|
|
@@ -141,7 +141,7 @@ function stringFromMetavariableAndMetaType(metavariable, metaType) {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
function metaTypeFromMetavariableDeclarationNode(metavariableDeclarationNode, context) {
|
|
144
|
-
const { MetaType } =
|
|
144
|
+
const { MetaType } = ontology,
|
|
145
145
|
metaTypeNode = metavariableDeclarationNode.getMetaTypeNode(),
|
|
146
146
|
metaType = MetaType.fromMetaTypeNode(metaTypeNode, context);
|
|
147
147
|
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { stringFromTypeNameTypePrefixNameAndSuperTypes } from "../../utilities/type";
|
|
7
7
|
|
|
8
|
-
export default
|
|
8
|
+
export default define(class SimpleTypeDeclaration {
|
|
9
9
|
constructor(context, node, string, type, prefixed) {
|
|
10
10
|
this.context = context;
|
|
11
11
|
this.node = node;
|
|
@@ -178,7 +178,7 @@ export default domAssigned(class SimpleTypeDeclaration {
|
|
|
178
178
|
static name = "SimpleTypeDeclaration";
|
|
179
179
|
|
|
180
180
|
static fromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context) {
|
|
181
|
-
const { Type } =
|
|
181
|
+
const { Type } = ontology,
|
|
182
182
|
type = Type.fromSimpleTypeDeclarationNode(simpleTypeDeclarationNode, context),
|
|
183
183
|
node = simpleTypeDeclarationNode, ///
|
|
184
184
|
prefixed = simpleTypeDeclarationNode.isPrefixed(),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../../ontology";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { define } from "../../ontology";
|
|
6
6
|
|
|
7
|
-
export default
|
|
7
|
+
export default define(class TypePrefixDeclaration {
|
|
8
8
|
constructor(context, node, string, typePrefix) {
|
|
9
9
|
this.context = context;
|
|
10
10
|
this.node = node;
|
|
@@ -99,7 +99,7 @@ export default domAssigned(class TypePrefixDeclaration {
|
|
|
99
99
|
static name = "TypePrefixDeclaration";
|
|
100
100
|
|
|
101
101
|
static fromTypePrefixDeclarationNode(typePrefixDeclarationNode, context) {
|
|
102
|
-
const { TypePrefix } =
|
|
102
|
+
const { TypePrefix } = ontology,
|
|
103
103
|
node = typePrefixDeclarationNode, ///
|
|
104
104
|
typePrefix = TypePrefix.fromTypePrefixDeclarationNode(typePrefixDeclarationNode, context),
|
|
105
105
|
typePrefixName = typePrefix.getName(),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../../ontology";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { define } from "../../ontology";
|
|
6
6
|
|
|
7
|
-
export default
|
|
7
|
+
export default define(class VariableDeclaration {
|
|
8
8
|
constructor(context, node, string, variable) {
|
|
9
9
|
this.context = context;
|
|
10
10
|
this.node = node;
|
|
@@ -122,7 +122,7 @@ export default domAssigned(class VariableDeclaration {
|
|
|
122
122
|
static name = "VariableDeclaration";
|
|
123
123
|
|
|
124
124
|
static fromVariableDeclarationNode(variableDeclarationNode, context) {
|
|
125
|
-
const { Variable } =
|
|
125
|
+
const { Variable } = ontology,
|
|
126
126
|
node = variableDeclarationNode, ///
|
|
127
127
|
string = context.nodeAsString(node),
|
|
128
128
|
variable = Variable.fromVariableDeclarationNode(variableDeclarationNode, context),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ontology from "../ontology";
|
|
4
4
|
import Substitutions from "../substitutions";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { define } from "../ontology";
|
|
7
7
|
import { unifyStatementIntrinsically } from "../utilities/unification";
|
|
8
8
|
|
|
9
|
-
export default
|
|
9
|
+
export default define(class Declaration {
|
|
10
10
|
constructor(string, node, statement, metavariable) {
|
|
11
11
|
this.string = string;
|
|
12
12
|
this.node = node;
|
|
@@ -333,7 +333,7 @@ export default domAssigned(class Declaration {
|
|
|
333
333
|
});
|
|
334
334
|
|
|
335
335
|
function referenceFromMetavariable(metavariable, context) {
|
|
336
|
-
const { Reference } =
|
|
336
|
+
const { Reference } = ontology,
|
|
337
337
|
metavariableNode = metavariable.getNode(),
|
|
338
338
|
reference = Reference.fromMetavariableNode(metavariableNode, context);
|
|
339
339
|
|
|
@@ -341,7 +341,7 @@ function referenceFromMetavariable(metavariable, context) {
|
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
function declarationFromDeclarationNode(declarationNode, context) {
|
|
344
|
-
const { Metavariable, Declaration, Statement } =
|
|
344
|
+
const { Metavariable, Declaration, Statement } = ontology,
|
|
345
345
|
node = declarationNode, ///
|
|
346
346
|
string = context.nodeAsString(node),
|
|
347
347
|
metavariable = Metavariable.fromDeclarationNode(declarationNode, context),
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { statementFromJSON, statementToStatementJSON } from "../utilities/json";
|
|
7
7
|
|
|
8
|
-
export default
|
|
8
|
+
export default define(class Deduction {
|
|
9
9
|
constructor(node, string, statement) {
|
|
10
10
|
this.node = node;
|
|
11
11
|
this.string = string;
|
|
@@ -110,7 +110,7 @@ export default domAssigned(class Deduction {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
static fromDeductionNode(deductionNode, context) {
|
|
113
|
-
const { Statement } =
|
|
113
|
+
const { Statement } = ontology,
|
|
114
114
|
node = deductionNode, ///
|
|
115
115
|
string = context.nodeAsString(node),
|
|
116
116
|
statement = Statement.fromDeductionNode(deductionNode, context),
|