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.
Files changed (227) hide show
  1. package/lib/action/verify.js +2 -1
  2. package/lib/context/file.js +2 -2
  3. package/lib/context/release.js +2 -2
  4. package/lib/mixins/statement/verify.js +3 -3
  5. package/lib/mixins/step/unify.js +4 -4
  6. package/lib/mixins/term/verify.js +4 -4
  7. package/lib/ontology/assertion/contained.js +316 -0
  8. package/lib/ontology/assertion/defined.js +290 -0
  9. package/lib/ontology/assertion/property.js +271 -0
  10. package/lib/ontology/assertion/satisfies.js +254 -0
  11. package/lib/ontology/assertion/subproof.js +186 -0
  12. package/lib/ontology/assertion/type.js +252 -0
  13. package/lib/{dom → ontology}/axiom.js +3 -3
  14. package/lib/{dom → ontology}/combinator/bracketed.js +4 -4
  15. package/lib/ontology/combinator.js +141 -0
  16. package/lib/ontology/conclusion.js +172 -0
  17. package/lib/{dom → ontology}/conjecture.js +3 -3
  18. package/lib/{dom → ontology}/constructor/bracketed.js +5 -5
  19. package/lib/ontology/constructor.js +171 -0
  20. package/lib/ontology/declaration/combinator.js +168 -0
  21. package/lib/ontology/declaration/complexType.js +346 -0
  22. package/lib/ontology/declaration/constructor.js +199 -0
  23. package/lib/ontology/declaration/metavariable.js +209 -0
  24. package/lib/ontology/declaration/simpleType.js +243 -0
  25. package/lib/ontology/declaration/typePrefix.js +181 -0
  26. package/lib/ontology/declaration/variable.js +197 -0
  27. package/lib/ontology/declaration.js +360 -0
  28. package/lib/ontology/deduction.js +186 -0
  29. package/lib/ontology/derivation.js +155 -0
  30. package/lib/ontology/equality.js +288 -0
  31. package/lib/{dom → ontology}/error.js +3 -3
  32. package/lib/ontology/frame.js +362 -0
  33. package/lib/ontology/hypothesis.js +190 -0
  34. package/lib/ontology/judgement.js +241 -0
  35. package/lib/ontology/label.js +199 -0
  36. package/lib/{dom → ontology}/lemma.js +3 -3
  37. package/lib/{dom → ontology}/metaLemma.js +3 -3
  38. package/lib/{dom → ontology}/metaType.js +3 -3
  39. package/lib/{dom → ontology}/metatheorem.js +3 -3
  40. package/lib/ontology/metavariable.js +504 -0
  41. package/lib/{dom → ontology}/parameter.js +3 -3
  42. package/lib/ontology/premise.js +271 -0
  43. package/lib/ontology/procedureCall.js +243 -0
  44. package/lib/{dom → ontology}/procedureReference.js +3 -3
  45. package/lib/{dom → ontology}/proof.js +4 -4
  46. package/lib/ontology/property.js +166 -0
  47. package/lib/ontology/propertyRelation.js +202 -0
  48. package/lib/ontology/reference.js +293 -0
  49. package/lib/ontology/rule.js +375 -0
  50. package/lib/ontology/section.js +255 -0
  51. package/lib/ontology/signature.js +220 -0
  52. package/lib/{dom → ontology}/statement.js +3 -3
  53. package/lib/ontology/step.js +283 -0
  54. package/lib/ontology/subDerivation.js +147 -0
  55. package/lib/ontology/subproof.js +266 -0
  56. package/lib/ontology/substitution/frame.js +216 -0
  57. package/lib/{dom → ontology}/substitution/reference.js +3 -3
  58. package/lib/{dom → ontology}/substitution/statement.js +3 -3
  59. package/lib/ontology/substitution/term.js +230 -0
  60. package/lib/ontology/substitution.js +207 -0
  61. package/lib/ontology/supposition.js +283 -0
  62. package/lib/ontology/term.js +339 -0
  63. package/lib/{dom → ontology}/theorem.js +3 -3
  64. package/lib/ontology/topLevelAssertion.js +432 -0
  65. package/lib/ontology/topLevelMetaAssertion.js +235 -0
  66. package/lib/ontology/type.js +556 -0
  67. package/lib/ontology/typePrefix.js +99 -0
  68. package/lib/ontology/variable.js +331 -0
  69. package/lib/ontology.js +27 -0
  70. package/lib/preamble.js +60 -60
  71. package/lib/prepare.js +25 -0
  72. package/lib/unifier/intrinsicLevel.js +3 -3
  73. package/lib/unifier/metaLevel.js +7 -7
  74. package/lib/unifier/metavariable.js +3 -3
  75. package/lib/unifier/statementWithCombinator.js +5 -5
  76. package/lib/unifier/termWithConstructor.js +3 -3
  77. package/lib/utilities/brackets.js +5 -5
  78. package/lib/utilities/context.js +12 -12
  79. package/lib/utilities/fileSystem.js +2 -2
  80. package/lib/utilities/json.js +30 -30
  81. package/lib/utilities/node.js +7 -7
  82. package/lib/utilities/release.js +12 -4
  83. package/lib/utilities/releaseContext.js +1 -1
  84. package/lib/utilities/substitutions.js +6 -6
  85. package/lib/utilities/type.js +2 -2
  86. package/lib/verifier/combinator.js +4 -4
  87. package/lib/verifier/constructor.js +3 -3
  88. package/lib/verifier/topLevel.js +18 -18
  89. package/package.json +1 -1
  90. package/src/action/verify.js +2 -0
  91. package/src/context/file.js +1 -1
  92. package/src/context/release.js +1 -1
  93. package/src/mixins/statement/verify.js +2 -2
  94. package/src/mixins/step/unify.js +3 -3
  95. package/src/mixins/term/verify.js +3 -3
  96. package/src/{dom → ontology}/assertion/contained.js +4 -4
  97. package/src/{dom → ontology}/assertion/defined.js +6 -6
  98. package/src/{dom → ontology}/assertion/property.js +5 -5
  99. package/src/{dom → ontology}/assertion/satisfies.js +5 -5
  100. package/src/{dom → ontology}/assertion/subproof.js +4 -4
  101. package/src/{dom → ontology}/assertion/type.js +5 -5
  102. package/src/{dom → ontology}/axiom.js +2 -2
  103. package/src/{dom → ontology}/combinator/bracketed.js +4 -4
  104. package/src/{dom → ontology}/combinator.js +4 -4
  105. package/src/{dom → ontology}/conclusion.js +4 -4
  106. package/src/{dom → ontology}/conjecture.js +2 -2
  107. package/src/{dom → ontology}/constructor/bracketed.js +5 -5
  108. package/src/{dom → ontology}/constructor.js +5 -5
  109. package/src/{dom → ontology}/declaration/combinator.js +4 -4
  110. package/src/{dom → ontology}/declaration/complexType.js +4 -4
  111. package/src/{dom → ontology}/declaration/constructor.js +4 -4
  112. package/src/{dom → ontology}/declaration/metavariable.js +5 -5
  113. package/src/{dom → ontology}/declaration/simpleType.js +4 -4
  114. package/src/{dom → ontology}/declaration/typePrefix.js +4 -4
  115. package/src/{dom → ontology}/declaration/variable.js +4 -4
  116. package/src/{dom → ontology}/declaration.js +5 -5
  117. package/src/{dom → ontology}/deduction.js +4 -4
  118. package/src/{dom → ontology}/derivation.js +4 -4
  119. package/src/{dom → ontology}/equality.js +6 -6
  120. package/src/{dom → ontology}/error.js +2 -2
  121. package/src/{dom → ontology}/frame.js +6 -6
  122. package/src/{dom → ontology}/hypothesis.js +5 -6
  123. package/src/{dom → ontology}/judgement.js +5 -5
  124. package/src/{dom → ontology}/label.js +4 -4
  125. package/src/{dom → ontology}/lemma.js +2 -2
  126. package/src/{dom → ontology}/metaLemma.js +2 -2
  127. package/src/{dom → ontology}/metaType.js +2 -2
  128. package/src/{dom → ontology}/metatheorem.js +2 -2
  129. package/src/{dom → ontology}/metavariable.js +8 -8
  130. package/src/{dom → ontology}/parameter.js +2 -2
  131. package/src/{dom → ontology}/premise.js +5 -5
  132. package/src/{dom → ontology}/procedureCall.js +5 -5
  133. package/src/{dom → ontology}/procedureReference.js +2 -2
  134. package/src/{dom → ontology}/proof.js +4 -4
  135. package/src/{dom → ontology}/property.js +4 -4
  136. package/src/{dom → ontology}/propertyRelation.js +4 -4
  137. package/src/{dom → ontology}/reference.js +6 -6
  138. package/src/{dom → ontology}/rule.js +7 -7
  139. package/src/{dom → ontology}/section.js +8 -8
  140. package/src/{dom → ontology}/signature.js +4 -4
  141. package/src/{dom → ontology}/statement.js +2 -2
  142. package/src/{dom → ontology}/step.js +4 -4
  143. package/src/{dom → ontology}/subDerivation.js +4 -4
  144. package/src/{dom → ontology}/subproof.js +5 -5
  145. package/src/{dom → ontology}/substitution/frame.js +4 -4
  146. package/src/{dom → ontology}/substitution/reference.js +2 -2
  147. package/src/{dom → ontology}/substitution/statement.js +2 -2
  148. package/src/{dom → ontology}/substitution/term.js +5 -5
  149. package/src/{dom → ontology}/supposition.js +5 -5
  150. package/src/{dom → ontology}/term.js +6 -6
  151. package/src/{dom → ontology}/theorem.js +2 -2
  152. package/src/{dom → ontology}/topLevelAssertion.js +6 -6
  153. package/src/{dom → ontology}/topLevelMetaAssertion.js +2 -2
  154. package/src/{dom → ontology}/type.js +4 -4
  155. package/src/{dom → ontology}/typePrefix.js +3 -5
  156. package/src/{dom → ontology}/variable.js +6 -6
  157. package/src/ontology.js +13 -0
  158. package/src/preamble.js +59 -59
  159. package/src/{configure.js → prepare.js} +1 -1
  160. package/src/unifier/intrinsicLevel.js +2 -2
  161. package/src/unifier/metaLevel.js +6 -6
  162. package/src/unifier/metavariable.js +2 -2
  163. package/src/unifier/statementWithCombinator.js +4 -4
  164. package/src/unifier/termWithConstructor.js +2 -2
  165. package/src/utilities/brackets.js +4 -4
  166. package/src/utilities/context.js +11 -11
  167. package/src/utilities/fileSystem.js +1 -1
  168. package/src/utilities/json.js +29 -29
  169. package/src/utilities/node.js +6 -6
  170. package/src/utilities/release.js +1 -1
  171. package/src/utilities/releaseContext.js +3 -3
  172. package/src/utilities/substitutions.js +5 -5
  173. package/src/utilities/type.js +1 -1
  174. package/src/verifier/combinator.js +3 -3
  175. package/src/verifier/constructor.js +2 -2
  176. package/src/verifier/topLevel.js +17 -17
  177. package/verify.js +2 -2
  178. package/lib/configure.js +0 -25
  179. package/lib/dom/assertion/contained.js +0 -316
  180. package/lib/dom/assertion/defined.js +0 -290
  181. package/lib/dom/assertion/property.js +0 -271
  182. package/lib/dom/assertion/satisfies.js +0 -254
  183. package/lib/dom/assertion/subproof.js +0 -186
  184. package/lib/dom/assertion/type.js +0 -252
  185. package/lib/dom/combinator.js +0 -141
  186. package/lib/dom/conclusion.js +0 -172
  187. package/lib/dom/constructor.js +0 -171
  188. package/lib/dom/declaration/combinator.js +0 -168
  189. package/lib/dom/declaration/complexType.js +0 -346
  190. package/lib/dom/declaration/constructor.js +0 -199
  191. package/lib/dom/declaration/metavariable.js +0 -209
  192. package/lib/dom/declaration/simpleType.js +0 -243
  193. package/lib/dom/declaration/typePrefix.js +0 -181
  194. package/lib/dom/declaration/variable.js +0 -197
  195. package/lib/dom/declaration.js +0 -360
  196. package/lib/dom/deduction.js +0 -186
  197. package/lib/dom/derivation.js +0 -155
  198. package/lib/dom/equality.js +0 -288
  199. package/lib/dom/frame.js +0 -362
  200. package/lib/dom/hypothesis.js +0 -191
  201. package/lib/dom/judgement.js +0 -241
  202. package/lib/dom/label.js +0 -199
  203. package/lib/dom/metavariable.js +0 -504
  204. package/lib/dom/premise.js +0 -271
  205. package/lib/dom/procedureCall.js +0 -243
  206. package/lib/dom/property.js +0 -166
  207. package/lib/dom/propertyRelation.js +0 -202
  208. package/lib/dom/reference.js +0 -293
  209. package/lib/dom/rule.js +0 -375
  210. package/lib/dom/section.js +0 -255
  211. package/lib/dom/signature.js +0 -220
  212. package/lib/dom/step.js +0 -283
  213. package/lib/dom/subDerivation.js +0 -147
  214. package/lib/dom/subproof.js +0 -266
  215. package/lib/dom/substitution/frame.js +0 -216
  216. package/lib/dom/substitution/term.js +0 -230
  217. package/lib/dom/substitution.js +0 -207
  218. package/lib/dom/supposition.js +0 -283
  219. package/lib/dom/term.js +0 -339
  220. package/lib/dom/topLevelAssertion.js +0 -432
  221. package/lib/dom/topLevelMetaAssertion.js +0 -235
  222. package/lib/dom/type.js +0 -556
  223. package/lib/dom/typePrefix.js +0 -100
  224. package/lib/dom/variable.js +0 -331
  225. package/lib/dom.js +0 -27
  226. package/src/dom.js +0 -13
  227. /package/src/{dom → ontology}/substitution.js +0 -0
@@ -2,15 +2,15 @@
2
2
 
3
3
  import { arrayUtilities } from "necessary";
4
4
 
5
- import dom from "../dom";
5
+ import ontology from "../ontology";
6
6
 
7
- import { domAssigned } from "../dom";
7
+ import { define } from "../ontology";
8
8
  import { termsFromJSON, termsToTermsJSON } from "../utilities/json";
9
9
  import { stringFromTerms, variableFromTerm, termsFromTermNodes } from "../utilities/node";
10
10
 
11
11
  const { match, compare, correlate } = arrayUtilities;
12
12
 
13
- export default domAssigned(class Signature {
13
+ export default define(class Signature {
14
14
  constructor(string, terms) {
15
15
  this.string = string;
16
16
  this.terms = terms;
@@ -73,7 +73,7 @@ export default domAssigned(class Signature {
73
73
 
74
74
  term = termA; ///
75
75
 
76
- const { TermSubstitution } = dom,
76
+ const { TermSubstitution } = ontology,
77
77
  termSubstitution = TermSubstitution.fromTernAndVariable(term, variable, context),
78
78
  substitution = termSubstitution; ///
79
79
 
@@ -5,7 +5,7 @@ import { arrayUtilities } from "necessary";
5
5
  import verifyMixins from "../mixins/statement/verify";
6
6
  import StatementPartialContext from "../context/partial/statement";
7
7
 
8
- import { domAssigned } from "../dom";
8
+ import { define } from "../ontology";
9
9
  import { unifyStatement } from "../utilities/unification";
10
10
  import { STATEMENT_META_TYPE_NAME } from "../metaTypeNames";
11
11
  import { statementFromStatementNode } from "../utilities/node";
@@ -14,7 +14,7 @@ import { definedAssertionFromStatement, containedAssertionFromStatement, subproo
14
14
 
15
15
  const { match, backwardsSome } = arrayUtilities;
16
16
 
17
- export default domAssigned(class Statement {
17
+ export default define(class Statement {
18
18
  constructor(string, node, tokens) {
19
19
  this.string = string;
20
20
  this.node = node;
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
 
3
- import dom from "../dom";
3
+ import ontology from "../ontology";
4
4
  import unifyMixins from "../mixins/step/unify";
5
5
  import Substitutions from "../substitutions";
6
6
  import equationalUnifier from "../unifier/equantional";
7
7
 
8
- import { domAssigned } from "../dom";
8
+ import { define } from "../ontology";
9
9
  import { propertyAssertionFromStatement } from "../utilities/context";
10
10
 
11
- export default domAssigned(class Step {
11
+ export default define(class Step {
12
12
  constructor(node, string, statement, reference, satisfiesAssertion) {
13
13
  this.node = node;
14
14
  this.string = string;
@@ -207,7 +207,7 @@ export default domAssigned(class Step {
207
207
  const stepNode = stepOrSubproofNode.isStepNode();
208
208
 
209
209
  if (stepNode) {
210
- const { Statement, Reference, SatisfiesAssertion } = dom,
210
+ const { Statement, Reference, SatisfiesAssertion } = ontology,
211
211
  stepNode = stepOrSubproofNode, ///
212
212
  node = stepNode, ///
213
213
  string = context.nodeAsString(node),
@@ -2,14 +2,14 @@
2
2
 
3
3
  import { arrayUtilities } from "necessary";
4
4
 
5
- import dom from "../dom";
5
+ import ontology from "../ontology";
6
6
 
7
- import { domAssigned } from "../dom";
7
+ import { define } from "../ontology";
8
8
  import { assignAssignments } from "../utilities/assignments";
9
9
 
10
10
  const { last } = arrayUtilities;
11
11
 
12
- export default domAssigned(class SubDerivation {
12
+ export default define(class SubDerivation {
13
13
  constructor(stepsOrSubproofs) {
14
14
  this.stepsOrSubproofs = stepsOrSubproofs;
15
15
  }
@@ -61,7 +61,7 @@ export default domAssigned(class SubDerivation {
61
61
  });
62
62
 
63
63
  function stepOrSubproofFromSubDerivationNode(subDerivationNode, context) {
64
- const { Step, Subproof } = dom,
64
+ const { Step, Subproof } = ontology,
65
65
  stepOrSubproofNodes = subDerivationNode.getStepOrSubproofNodes(),
66
66
  stepsOrSubproofs = stepOrSubproofNodes.map((stepOrSubproofNode) => {
67
67
  const subproof = Subproof.fromStepOrSubproofNode(stepOrSubproofNode, context),
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- import dom from "../dom";
3
+ import ontology from "../ontology";
4
4
  import LocalContext from "../context/local";
5
5
  import Substitutions from "../substitutions";
6
6
 
7
- import { domAssigned } from "../dom";
7
+ import { define } from "../ontology";
8
8
  import { subproofStringFromSubproofNode } from "../utilities/subproof";
9
9
 
10
- export default domAssigned(class Subproof {
10
+ export default define(class Subproof {
11
11
  constructor(node, string, suppositions, subDerivation) {
12
12
  this.node = node;
13
13
  this.string = string;
@@ -154,7 +154,7 @@ export default domAssigned(class Subproof {
154
154
  });
155
155
 
156
156
  function suppositionsFromSubproofNode(subproofNode, context) {
157
- const { Supposition } = dom,
157
+ const { Supposition } = ontology,
158
158
  suppositionNodes = subproofNode.getSuppositionNodes(),
159
159
  suppositions = suppositionNodes.map((suppositionNode) => {
160
160
  const supposition = Supposition.fromSuppositionNode(suppositionNode, context);
@@ -166,7 +166,7 @@ function suppositionsFromSubproofNode(subproofNode, context) {
166
166
  }
167
167
 
168
168
  function subDerivationFromSubproofNode(subproofNode, context) {
169
- const { SubDerivation } = dom,
169
+ const { SubDerivation } = ontology,
170
170
  subDerivationNode = subproofNode.getSubDerivationNode(),
171
171
  subDerivation = SubDerivation.fromSubDerivationNode(subDerivationNode, context);
172
172
 
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
 
3
- import dom from "../../dom";
3
+ import ontology from "../../ontology";
4
4
  import Substitution from "../substitution";
5
5
  import FrameSubstitutionPartialContext from "../../context/partial/substitution/frame";
6
6
 
7
- import { domAssigned } from "../../dom";
7
+ import { define } from "../../ontology";
8
8
 
9
- export default domAssigned(class FrameSubstitution extends Substitution {
9
+ export default define(class FrameSubstitution extends Substitution {
10
10
  constructor(string, node, tokens, frame, metavariable) {
11
11
  super(string, node, tokens);
12
12
 
@@ -46,7 +46,7 @@ export default domAssigned(class FrameSubstitution extends Substitution {
46
46
  singularMetavariableNode = lastFrameNode.getSingularMetavariableNode();
47
47
 
48
48
  if (singularMetavariableNode !== null) {
49
- const { Frame, Metavariable } = dom,
49
+ const { Frame, Metavariable } = ontology,
50
50
  frameNode = firstFrameNode, ///
51
51
  metavariableNode = singularMetavariableNode, ///
52
52
  frame = Frame.fromFrameNode(frameNode, context),
@@ -3,9 +3,9 @@
3
3
  import Substitution from "../substitution";
4
4
  import ReferenceSubstitutionPartialContext from "../../context/partial/substitution/reference";
5
5
 
6
- import { domAssigned } from "../../dom";
6
+ import { define } from "../../ontology";
7
7
 
8
- export default domAssigned(class ReferenceSubstitution extends Substitution {
8
+ export default define(class ReferenceSubstitution extends Substitution {
9
9
  constructor(string, node, tokens, reference, metavariable) {
10
10
  super(string, node, tokens);
11
11
 
@@ -4,12 +4,12 @@ import Substitution from "../substitution";
4
4
  import Substitutions from "../../substitutions";
5
5
  import StatementSubstitutionPartialContext from "../../context/partial/substitution/statement";
6
6
 
7
- import { domAssigned } from "../../dom";
7
+ import { define } from "../../ontology";
8
8
  import { unifySubstitution } from "../../utilities/unification";
9
9
  import { stripBracketsFromStatement } from "../../utilities/brackets";
10
10
  import { statementFromJSON, statementToStatementJSON, metavariableFromJSON, metavariableToMetavariableJSON } from "../../utilities/json";
11
11
 
12
- export default domAssigned(class StatementSubstitution extends Substitution {
12
+ export default define(class StatementSubstitution extends Substitution {
13
13
  constructor(string, node, tokens, resolved, statement, metavariable, substitution) {
14
14
  super(string, node, tokens);
15
15
 
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
 
3
- import dom from "../../dom";
3
+ import ontology from "../../ontology";
4
4
  import Substitution from "../substitution";
5
5
  import TermSubstitutionPartialContext from "../../context/partial/substitution/term";
6
6
 
7
- import { domAssigned } from "../../dom";
7
+ import { define } from "../../ontology";
8
8
  import { stripBracketsFromTerm } from "../../utilities/brackets";
9
9
  import { stripBracketsFromTermNode } from "../../utilities/brackets";
10
10
 
11
- export default domAssigned(class TermSubstitution extends Substitution {
11
+ export default define(class TermSubstitution extends Substitution {
12
12
  constructor(string, node, tokens, term, variable) {
13
13
  super(string, node, tokens);
14
14
 
@@ -62,7 +62,7 @@ export default domAssigned(class TermSubstitution extends Substitution {
62
62
  singularVariableNode = lastTermNode.getSingularVariableNode(lastTermNode);
63
63
 
64
64
  if (singularVariableNode !== null) {
65
- const { Term, Variable } = dom,
65
+ const { Term, Variable } = ontology,
66
66
  termNode = firstTermNode, ///
67
67
  variableNode = singularVariableNode, ///
68
68
  term = Term.fromTermNode(termNode, context),
@@ -83,7 +83,7 @@ export default domAssigned(class TermSubstitution extends Substitution {
83
83
 
84
84
  termNode = stripBracketsFromTermNode(termNode); ///
85
85
 
86
- const { Term } = dom;
86
+ const { Term } = ontology;
87
87
 
88
88
  term = Term.fromTermNode(termNode, context);
89
89
 
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- import dom from "../dom";
3
+ import ontology from "../ontology";
4
4
 
5
- import { domAssigned } from "../dom";
5
+ import { define } from "../ontology";
6
6
  import { assignAssignments } from "../utilities/assignments";
7
7
  import { subproofAssertionFromStatement } from "../utilities/context";
8
8
  import { statementFromJSON, procedureCallFromJSON, statementToStatementJSON, procedureCallToProcedureCallJSON } from "../utilities/json";
9
9
 
10
- export default domAssigned(class Supposition {
10
+ export default define(class Supposition {
11
11
  constructor(node, string, statement, procedureCall) {
12
12
  this.node = node;
13
13
  this.string = string;
@@ -49,7 +49,7 @@ export default domAssigned(class Supposition {
49
49
  const assignmentsAssigned = assignAssignments(assignments, context);
50
50
 
51
51
  if (assignmentsAssigned) {
52
- const { Step } = dom,
52
+ const { Step } = ontology,
53
53
  step = Step.fromStatement(this.statement, context),
54
54
  stepOrSubproof = step; ///
55
55
 
@@ -246,7 +246,7 @@ export default domAssigned(class Supposition {
246
246
  }
247
247
 
248
248
  static fromSuppositionNode(suppositionNode, context) {
249
- const { Statement, ProcedureCall } = dom,
249
+ const { Statement, ProcedureCall } = ontology,
250
250
  node = suppositionNode, ///
251
251
  string = context.nodeAsString(node),
252
252
  statement = Statement.fromSuppositionNode(suppositionNode, context),
@@ -2,17 +2,17 @@
2
2
 
3
3
  import { arrayUtilities } from "necessary";
4
4
 
5
- import dom from "../dom";
5
+ import ontology from "../ontology";
6
6
  import verifyMixins from "../mixins/term/verify";
7
7
 
8
- import { domAssigned } from "../dom";
8
+ import { define } from "../ontology";
9
9
  import { termFromTermNode } from "../utilities/node";
10
10
  import { termNodeFromTermString } from "../context/partial/term";
11
11
  import { typeFromJSON, typeToTypeJSON } from "../utilities/json";
12
12
 
13
13
  const { filter, compress } = arrayUtilities;
14
14
 
15
- export default domAssigned(class Term {
15
+ export default define(class Term {
16
16
  constructor(string, node, type) {
17
17
  this.string = string;
18
18
  this.node = node;
@@ -36,7 +36,7 @@ export default domAssigned(class Term {
36
36
  }
37
37
 
38
38
  getVariable(context) {
39
- const { Variable } = dom,
39
+ const { Variable } = ontology,
40
40
  termNode = this.node, ///
41
41
  variable = Variable.fromTermNode(termNode, context);
42
42
 
@@ -47,7 +47,7 @@ export default domAssigned(class Term {
47
47
  const termNode = this.node,
48
48
  variableNodes = termNode.getVariableNodes(),
49
49
  variables = variableNodes.map((variableNode) => {
50
- const { Variable } = dom,
50
+ const { Variable } = ontology,
51
51
  variable = Variable.fromVariableNode(variableNode, context);
52
52
 
53
53
  return variable;
@@ -263,7 +263,7 @@ export default domAssigned(class Term {
263
263
  }
264
264
 
265
265
  static fromConstructorDeclarationNode(constructorDeclarationNode, context) {
266
- const { Type } = dom,
266
+ const { Type } = ontology,
267
267
  termNode = constructorDeclarationNode.getTermNode(),
268
268
  term = termFromTermNode(termNode, context),
269
269
  type = Type.fromConstructorDeclarationNode(constructorDeclarationNode, context);
@@ -2,9 +2,9 @@
2
2
 
3
3
  import TopLevelAssertion from "./topLevelAssertion";
4
4
 
5
- import { domAssigned } from "../dom";
5
+ import { define } from "../ontology";
6
6
 
7
- export default domAssigned(class Theorem extends TopLevelAssertion {
7
+ export default define(class Theorem extends TopLevelAssertion {
8
8
  verify() {
9
9
  let verifies;
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { arrayUtilities } from "necessary";
4
4
 
5
- import dom from "../dom";
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 } = dom,
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 } = dom,
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 } = dom;
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 } = dom,
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 } = dom,
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 dom from "../dom";
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 } = dom;
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 dom from "../dom";
5
+ import ontology from "../ontology";
6
6
 
7
- import { domAssigned } from "../dom";
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 domAssigned(Type);
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 } = dom,
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 { domAssigned } from "../dom";
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 dom from "../dom";
3
+ import ontology from "../ontology";
4
4
 
5
- import { domAssigned } from "../dom";
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 domAssigned(class Variable {
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 } = dom,
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 } = dom,
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 } = dom,
258
+ const { Variable } = ontology,
259
259
  node = variableNode, ///
260
260
  variableIdentifier = variableNode.getVariableIdentifier(),
261
261
  string = variableIdentifier, ///,
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ const ontology = {};
4
+
5
+ export function define(Class) {
6
+ const { name } = Class;
7
+
8
+ ontology[name] = Class;
9
+
10
+ return Class;
11
+ }
12
+
13
+ export default ontology;
package/src/preamble.js CHANGED
@@ -1,61 +1,61 @@
1
1
  "use strict";
2
2
 
3
- import Type from "./dom/type";
4
- import Term from "./dom/term";
5
- import Rule from "./dom/rule";
6
- import Step from "./dom/step";
7
- import Label from "./dom/label";
8
- import Axiom from "./dom/axiom";
9
- import Lemma from "./dom/lemma";
10
- import Frame from "./dom/frame";
11
- import Proof from "./dom/proof";
12
- import Error from "./dom/error";
13
- import Premise from "./dom/premise";
14
- import Theorem from "./dom/theorem";
15
- import Section from "./dom/section";
16
- import Equality from "./dom/equality";
17
- import MetaType from "./dom/metaType";
18
- import Subproof from "./dom/subproof";
19
- import Variable from "./dom/variable";
20
- import Property from "./dom/property";
21
- import Parameter from "./dom/parameter";
22
- import Reference from "./dom/reference";
23
- import Statement from "./dom/statement";
24
- import Judgement from "./dom/judgement";
25
- import MetaLemma from "./dom/metaLemma";
26
- import Deduction from "./dom/deduction";
27
- import Signature from "./dom/signature";
28
- import TypePrefix from "./dom/typePrefix";
29
- import Conjecture from "./dom/conjecture";
30
- import Conclusion from "./dom/conclusion";
31
- import Derivation from "./dom/derivation";
32
- import Combinator from "./dom/combinator";
33
- import Hypothesis from "./dom/hypothesis";
34
- import Constructor from "./dom/constructor";
35
- import Declaration from "./dom/declaration";
36
- import Supposition from "./dom/supposition";
37
- import Metatheorem from "./dom/metatheorem";
38
- import Metavariable from "./dom/metavariable";
39
- import ProcedureCall from "./dom/procedureCall";
40
- import SubDerivation from "./dom/subDerivation";
41
- import TypeAssertion from "./dom/assertion/type";
42
- import DefinedAssertion from "./dom/assertion/defined";
43
- import PropertyRelation from "./dom/propertyRelation";
44
- import TermSubstitution from "./dom/substitution/term";
45
- import FrameSubstitution from "./dom/substitution/frame";
46
- import SubproofAssertion from "./dom/assertion/subproof";
47
- import PropertyAssertion from "./dom/assertion/property";
48
- import ContainedAssertion from "./dom/assertion/contained";
49
- import SatisfiesAssertion from "./dom/assertion/satisfies";
50
- import ProcedureReference from "./dom/procedureReference";
51
- import VariableDeclaration from "./dom/declaration/variable";
52
- import BracketedCombinator from "./dom/combinator/bracketed";
53
- import BracketedConstructor from "./dom/constructor/bracketed";
54
- import SimpleTypeDeclaration from "./dom/declaration/simpleType";
55
- import StatementSubstitution from "./dom/substitution/statement";
56
- import ReferenceSubstitution from "./dom/substitution/reference";
57
- import CombinatorDeclaration from "./dom/declaration/combinator";
58
- import TypePrefixDeclaration from "./dom/declaration/typePrefix";
59
- import ConstructorDeclaration from "./dom/declaration/constructor";
60
- import ComplexTypeDeclaration from "./dom/declaration/complexType";
61
- import MetavariableDeclaration from "./dom/declaration/metavariable";
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";
@@ -3,7 +3,7 @@
3
3
  import { DEFAULT_HELP, DEFAULT_VERSION } from "./defaults";
4
4
  import { HELP_COMMAND, VERSION_COMMAND } from "./commands";
5
5
 
6
- export default function configure(command, argument, options, main) {
6
+ export default function prepare(command, argument, options, main) {
7
7
  const { help = DEFAULT_HELP, version = DEFAULT_VERSION } = options;
8
8
 
9
9
  if (false) {