occam-verify-cli 1.0.383 → 1.0.385

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) 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/unifier/intrinsicLevel.js +3 -3
  72. package/lib/unifier/metaLevel.js +7 -7
  73. package/lib/unifier/metavariable.js +3 -3
  74. package/lib/unifier/statementWithCombinator.js +5 -5
  75. package/lib/unifier/termWithConstructor.js +3 -3
  76. package/lib/utilities/brackets.js +5 -5
  77. package/lib/utilities/context.js +12 -12
  78. package/lib/utilities/fileSystem.js +2 -2
  79. package/lib/utilities/json.js +30 -30
  80. package/lib/utilities/node.js +7 -7
  81. package/lib/utilities/release.js +12 -4
  82. package/lib/utilities/releaseContext.js +1 -1
  83. package/lib/utilities/substitutions.js +6 -6
  84. package/lib/utilities/type.js +2 -2
  85. package/lib/verifier/combinator.js +4 -4
  86. package/lib/verifier/constructor.js +3 -3
  87. package/lib/verifier/topLevel.js +18 -18
  88. package/package.json +1 -1
  89. package/src/action/verify.js +2 -0
  90. package/src/context/file.js +1 -1
  91. package/src/context/release.js +1 -1
  92. package/src/mixins/statement/verify.js +2 -2
  93. package/src/mixins/step/unify.js +3 -3
  94. package/src/mixins/term/verify.js +3 -3
  95. package/src/{dom → ontology}/assertion/contained.js +4 -4
  96. package/src/{dom → ontology}/assertion/defined.js +6 -6
  97. package/src/{dom → ontology}/assertion/property.js +5 -5
  98. package/src/{dom → ontology}/assertion/satisfies.js +5 -5
  99. package/src/{dom → ontology}/assertion/subproof.js +4 -4
  100. package/src/{dom → ontology}/assertion/type.js +5 -5
  101. package/src/{dom → ontology}/axiom.js +2 -2
  102. package/src/{dom → ontology}/combinator/bracketed.js +4 -4
  103. package/src/{dom → ontology}/combinator.js +4 -4
  104. package/src/{dom → ontology}/conclusion.js +4 -4
  105. package/src/{dom → ontology}/conjecture.js +2 -2
  106. package/src/{dom → ontology}/constructor/bracketed.js +5 -5
  107. package/src/{dom → ontology}/constructor.js +5 -5
  108. package/src/{dom → ontology}/declaration/combinator.js +4 -4
  109. package/src/{dom → ontology}/declaration/complexType.js +4 -4
  110. package/src/{dom → ontology}/declaration/constructor.js +4 -4
  111. package/src/{dom → ontology}/declaration/metavariable.js +5 -5
  112. package/src/{dom → ontology}/declaration/simpleType.js +4 -4
  113. package/src/{dom → ontology}/declaration/typePrefix.js +4 -4
  114. package/src/{dom → ontology}/declaration/variable.js +4 -4
  115. package/src/{dom → ontology}/declaration.js +5 -5
  116. package/src/{dom → ontology}/deduction.js +4 -4
  117. package/src/{dom → ontology}/derivation.js +4 -4
  118. package/src/{dom → ontology}/equality.js +6 -6
  119. package/src/{dom → ontology}/error.js +2 -2
  120. package/src/{dom → ontology}/frame.js +6 -6
  121. package/src/{dom → ontology}/hypothesis.js +5 -6
  122. package/src/{dom → ontology}/judgement.js +5 -5
  123. package/src/{dom → ontology}/label.js +4 -4
  124. package/src/{dom → ontology}/lemma.js +2 -2
  125. package/src/{dom → ontology}/metaLemma.js +2 -2
  126. package/src/{dom → ontology}/metaType.js +2 -2
  127. package/src/{dom → ontology}/metatheorem.js +2 -2
  128. package/src/{dom → ontology}/metavariable.js +8 -8
  129. package/src/{dom → ontology}/parameter.js +2 -2
  130. package/src/{dom → ontology}/premise.js +5 -5
  131. package/src/{dom → ontology}/procedureCall.js +5 -5
  132. package/src/{dom → ontology}/procedureReference.js +2 -2
  133. package/src/{dom → ontology}/proof.js +4 -4
  134. package/src/{dom → ontology}/property.js +4 -4
  135. package/src/{dom → ontology}/propertyRelation.js +4 -4
  136. package/src/{dom → ontology}/reference.js +6 -6
  137. package/src/{dom → ontology}/rule.js +7 -7
  138. package/src/{dom → ontology}/section.js +8 -8
  139. package/src/{dom → ontology}/signature.js +4 -4
  140. package/src/{dom → ontology}/statement.js +2 -2
  141. package/src/{dom → ontology}/step.js +4 -4
  142. package/src/{dom → ontology}/subDerivation.js +4 -4
  143. package/src/{dom → ontology}/subproof.js +5 -5
  144. package/src/{dom → ontology}/substitution/frame.js +4 -4
  145. package/src/{dom → ontology}/substitution/reference.js +2 -2
  146. package/src/{dom → ontology}/substitution/statement.js +2 -2
  147. package/src/{dom → ontology}/substitution/term.js +5 -5
  148. package/src/{dom → ontology}/supposition.js +5 -5
  149. package/src/{dom → ontology}/term.js +6 -6
  150. package/src/{dom → ontology}/theorem.js +2 -2
  151. package/src/{dom → ontology}/topLevelAssertion.js +6 -6
  152. package/src/{dom → ontology}/topLevelMetaAssertion.js +2 -2
  153. package/src/{dom → ontology}/type.js +4 -4
  154. package/src/{dom → ontology}/typePrefix.js +3 -5
  155. package/src/{dom → ontology}/variable.js +6 -6
  156. package/src/ontology.js +13 -0
  157. package/src/preamble.js +59 -59
  158. package/src/unifier/intrinsicLevel.js +2 -2
  159. package/src/unifier/metaLevel.js +6 -6
  160. package/src/unifier/metavariable.js +2 -2
  161. package/src/unifier/statementWithCombinator.js +4 -4
  162. package/src/unifier/termWithConstructor.js +2 -2
  163. package/src/utilities/brackets.js +4 -4
  164. package/src/utilities/context.js +11 -11
  165. package/src/utilities/fileSystem.js +1 -1
  166. package/src/utilities/json.js +29 -29
  167. package/src/utilities/node.js +6 -6
  168. package/src/utilities/release.js +1 -1
  169. package/src/utilities/releaseContext.js +3 -3
  170. package/src/utilities/substitutions.js +5 -5
  171. package/src/utilities/type.js +1 -1
  172. package/src/verifier/combinator.js +3 -3
  173. package/src/verifier/constructor.js +2 -2
  174. package/src/verifier/topLevel.js +17 -17
  175. package/lib/dom/assertion/contained.js +0 -316
  176. package/lib/dom/assertion/defined.js +0 -290
  177. package/lib/dom/assertion/property.js +0 -271
  178. package/lib/dom/assertion/satisfies.js +0 -254
  179. package/lib/dom/assertion/subproof.js +0 -186
  180. package/lib/dom/assertion/type.js +0 -252
  181. package/lib/dom/combinator.js +0 -141
  182. package/lib/dom/conclusion.js +0 -172
  183. package/lib/dom/constructor.js +0 -171
  184. package/lib/dom/declaration/combinator.js +0 -168
  185. package/lib/dom/declaration/complexType.js +0 -346
  186. package/lib/dom/declaration/constructor.js +0 -199
  187. package/lib/dom/declaration/metavariable.js +0 -209
  188. package/lib/dom/declaration/simpleType.js +0 -243
  189. package/lib/dom/declaration/typePrefix.js +0 -181
  190. package/lib/dom/declaration/variable.js +0 -197
  191. package/lib/dom/declaration.js +0 -360
  192. package/lib/dom/deduction.js +0 -186
  193. package/lib/dom/derivation.js +0 -155
  194. package/lib/dom/equality.js +0 -288
  195. package/lib/dom/frame.js +0 -362
  196. package/lib/dom/hypothesis.js +0 -191
  197. package/lib/dom/judgement.js +0 -241
  198. package/lib/dom/label.js +0 -199
  199. package/lib/dom/metavariable.js +0 -504
  200. package/lib/dom/premise.js +0 -271
  201. package/lib/dom/procedureCall.js +0 -243
  202. package/lib/dom/property.js +0 -166
  203. package/lib/dom/propertyRelation.js +0 -202
  204. package/lib/dom/reference.js +0 -293
  205. package/lib/dom/rule.js +0 -375
  206. package/lib/dom/section.js +0 -255
  207. package/lib/dom/signature.js +0 -220
  208. package/lib/dom/step.js +0 -283
  209. package/lib/dom/subDerivation.js +0 -147
  210. package/lib/dom/subproof.js +0 -266
  211. package/lib/dom/substitution/frame.js +0 -216
  212. package/lib/dom/substitution/term.js +0 -230
  213. package/lib/dom/substitution.js +0 -207
  214. package/lib/dom/supposition.js +0 -283
  215. package/lib/dom/term.js +0 -339
  216. package/lib/dom/topLevelAssertion.js +0 -432
  217. package/lib/dom/topLevelMetaAssertion.js +0 -235
  218. package/lib/dom/type.js +0 -556
  219. package/lib/dom/typePrefix.js +0 -100
  220. package/lib/dom/variable.js +0 -331
  221. package/lib/dom.js +0 -27
  222. package/src/dom.js +0 -13
  223. /package/src/{dom → ontology}/substitution.js +0 -0
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
 
3
- import dom from "../../dom";
3
+ import ontology from "../../ontology";
4
4
  import Constructor from "../constructor";
5
5
  import constructorBracketedContext from "../../context/bracketed/constructor";
6
6
 
7
- import { domAssigned } from "../../dom";
7
+ import { define } from "../../ontology";
8
8
 
9
- export default domAssigned(class BracketedConstructor extends Constructor {
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 } = dom,
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 } = dom,
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 dom from "../dom";
3
+ import ontology from "../ontology";
4
4
 
5
- import { baseType } from "../dom/type";
6
- import { domAssigned } from "../dom";
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 domAssigned(class Constructor {
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 } = dom,
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 dom from "../../dom";
3
+ import ontology from "../../ontology";
4
4
 
5
- import { domAssigned } from "../../dom";
5
+ import { define } from "../../ontology";
6
6
 
7
7
  import combinatorVerifier from "../../verifier/combinator";
8
8
 
9
- export default domAssigned(class CombinatorDeclaration {
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 } = dom,
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 dom from "../../dom";
3
+ import ontology from "../../ontology";
4
4
 
5
- import { domAssigned } from "../../dom";
5
+ import { define } from "../../ontology";
6
6
  import { stringFromTypeNameTypePrefixNameAndSuperTypes } from "../../utilities/type";
7
7
 
8
- export default domAssigned(class ComplexTypeDeclaration {
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 } = dom,
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 dom from "../../dom";
3
+ import ontology from "../../ontology";
4
4
 
5
5
  import constructorVerifier from "../../verifier/constructor";
6
6
 
7
- import { domAssigned } from "../../dom";
7
+ import { define } from "../../ontology";
8
8
 
9
- export default domAssigned(class ConstructorDeclaration {
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 } = dom,
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 dom from "../../dom";
3
+ import ontology from "../../ontology";
4
4
 
5
- import { domAssigned } from "../../dom";
5
+ import { define } from "../../ontology";
6
6
 
7
- export default domAssigned(class MetavariableDeclaration {
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 } = dom,
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 } = dom,
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 dom from "../../dom";
3
+ import ontology from "../../ontology";
4
4
 
5
- import { domAssigned } from "../../dom";
5
+ import { define } from "../../ontology";
6
6
  import { stringFromTypeNameTypePrefixNameAndSuperTypes } from "../../utilities/type";
7
7
 
8
- export default domAssigned(class SimpleTypeDeclaration {
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 } = dom,
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 dom from "../../dom";
3
+ import ontology from "../../ontology";
4
4
 
5
- import { domAssigned } from "../../dom";
5
+ import { define } from "../../ontology";
6
6
 
7
- export default domAssigned(class TypePrefixDeclaration {
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 } = dom,
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 dom from "../../dom";
3
+ import ontology from "../../ontology";
4
4
 
5
- import { domAssigned } from "../../dom";
5
+ import { define } from "../../ontology";
6
6
 
7
- export default domAssigned(class VariableDeclaration {
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 } = dom,
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 dom from "../dom";
3
+ import ontology from "../ontology";
4
4
  import Substitutions from "../substitutions";
5
5
 
6
- import { domAssigned } from "../dom";
6
+ import { define } from "../ontology";
7
7
  import { unifyStatementIntrinsically } from "../utilities/unification";
8
8
 
9
- export default domAssigned(class Declaration {
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 } = dom,
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 } = dom,
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 dom from "../dom";
3
+ import ontology from "../ontology";
4
4
 
5
- import { domAssigned } from "../dom";
5
+ import { define } from "../ontology";
6
6
  import { statementFromJSON, statementToStatementJSON } from "../utilities/json";
7
7
 
8
- export default domAssigned(class Deduction {
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 } = dom,
113
+ const { Statement } = ontology,
114
114
  node = deductionNode, ///
115
115
  string = context.nodeAsString(node),
116
116
  statement = Statement.fromDeductionNode(deductionNode, context),
@@ -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 Derivation {
12
+ export default define(class Derivation {
13
13
  constructor(stepsOrSubproofs) {
14
14
  this.stepsOrSubproofs = stepsOrSubproofs;
15
15
  }
@@ -61,7 +61,7 @@ export default domAssigned(class Derivation {
61
61
  });
62
62
 
63
63
  function stepsOrSubproofsFromDerivationNode(derivationNode, context) {
64
- const { Step, Subproof } = dom,
64
+ const { Step, Subproof } = ontology,
65
65
  stepOrSubproofNodes = derivationNode.getStepOrSubproofNodes(),
66
66
  stepsOrSubproofs = stepOrSubproofNodes.map((stepOrSubproofNode) => {
67
67
  let stepOrSubproof;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- import dom from "../dom";
3
+ import ontology from "../ontology";
4
4
  import equationalUnifier from "../unifier/equantional";
5
5
  import EqualityAssignment from "../assignment/equality";
6
6
  import VariableAssignment from "../assignment/variable";
7
7
 
8
- import { domAssigned } from "../dom";
8
+ import { define } from "../ontology";
9
9
 
10
- export default domAssigned(class Equality {
10
+ export default define(class Equality {
11
11
  constructor(string, leftTerm, rightTerm) {
12
12
  this.string = string;
13
13
  this.leftTerm = leftTerm;
@@ -186,7 +186,7 @@ export default domAssigned(class Equality {
186
186
  return;
187
187
  }
188
188
 
189
- const { Variable } = dom,
189
+ const { Variable } = ontology,
190
190
  type = this.getType(),
191
191
  leftTermNode = this.leftTerm.getNode(),
192
192
  rightTermNode = this.rightTerm.getNode(),
@@ -244,7 +244,7 @@ export default domAssigned(class Equality {
244
244
  });
245
245
 
246
246
  function leftTermFromEqualityNode(equalityNode, context) {
247
- const { Term } = dom,
247
+ const { Term } = ontology,
248
248
  leftTermNode = equalityNode.getLeftTermNode(),
249
249
  leftTerm = Term.fromTermNode(leftTermNode, context);
250
250
 
@@ -252,7 +252,7 @@ function leftTermFromEqualityNode(equalityNode, context) {
252
252
  }
253
253
 
254
254
  function rightTermFromEqualityNode(equalityNode, context) {
255
- const { Term } = dom,
255
+ const { Term } = ontology,
256
256
  rightTermNode = equalityNode.getRightTermNode(),
257
257
  rightTerm = Term.fromTermNode(rightTermNode, context);
258
258
 
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
- import { domAssigned } from "../dom";
3
+ import { define } from "../ontology";
4
4
 
5
- export default domAssigned(class Error {
5
+ export default define(class Error {
6
6
  constructor(context, node, string) {
7
7
  this.context = context;
8
8
  this.node = node;
@@ -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 { define } from "../ontology";
7
8
  import { S, NOTHING } from "../constants";
8
- import { domAssigned } from "../dom";
9
9
  import { FRAME_META_TYPE_NAME } from "../metaTypeNames";
10
10
 
11
11
  const { first } = arrayUtilities;
12
12
 
13
- export default domAssigned(class Frame {
13
+ export default define(class Frame {
14
14
  constructor(string, node, tokens, declarations) {
15
15
  this.string = string;
16
16
  this.node = node;
@@ -289,7 +289,7 @@ export default domAssigned(class Frame {
289
289
  });
290
290
 
291
291
  function frameFromFrameNode(frameNode, context) {
292
- const { Frame } = dom,
292
+ const { Frame } = ontology,
293
293
  node = frameNode, ///
294
294
  string = context.nodeAsString(node),
295
295
  tokens = context.nodeAsTokens(node),
@@ -301,7 +301,7 @@ function frameFromFrameNode(frameNode, context) {
301
301
  }
302
302
 
303
303
  function declarationsFromFrameNode(frameNode, context) {
304
- const { Declaration } = dom,
304
+ const { Declaration } = ontology,
305
305
  declarationNodes = frameNode.getDeclarationNodes(),
306
306
  declarations = declarationNodes.map((declarationNode) => {
307
307
  const declaration = Declaration.fromDeclarationNode(declarationNode, context);
@@ -313,7 +313,7 @@ function declarationsFromFrameNode(frameNode, context) {
313
313
  }
314
314
 
315
315
  function metavariablesFromFrameNode(frameNode, context) {
316
- const { Metavariable } = dom,
316
+ const { Metavariable } = ontology,
317
317
  metavariableNodes = frameNode.getMetavariableNodes(),
318
318
  metavariables = metavariableNodes.map((metavariableNode) => {
319
319
  const metavariable = Metavariable.fromMetavariableNode(metavariableNode, context);
@@ -1,13 +1,12 @@
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
- import { subproofAssertionFromStatement } from "../utilities/context";
8
7
  import { statementFromJSON, statementToStatementJSON } from "../utilities/json";
9
8
 
10
- export default domAssigned(class Hypothesis {
9
+ export default define(class Hypothesis {
11
10
  constructor(node, string, statement) {
12
11
  this.node = node;
13
12
  this.string = string;
@@ -44,7 +43,7 @@ export default domAssigned(class Hypothesis {
44
43
  const assignmentsAssigned = assignAssignments(assignments, context);
45
44
 
46
45
  if (assignmentsAssigned) {
47
- const { Step } = dom,
46
+ const { Step } = ontology,
48
47
  step = Step.fromStatement(this.statement, context),
49
48
  stepOrSubproof = step; ///
50
49
 
@@ -114,7 +113,7 @@ export default domAssigned(class Hypothesis {
114
113
  }
115
114
 
116
115
  static fromHypothesisNode(hypothesisNode, context) {
117
- const { Statement } = dom,
116
+ const { Statement } = ontology,
118
117
  node = hypothesisNode, ///
119
118
  string = context.nodeAsString(node),
120
119
  statement = Statement.fromHypothesisNode(hypothesisNode, context),
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
- import dom from "../dom";
3
+ import ontology from "../ontology";
4
4
  import JudgementAssignment from "../assignment/judgement";
5
5
 
6
- import { domAssigned } from "../dom";
6
+ import { define } from "../ontology";
7
7
 
8
- export default domAssigned(class Judgement {
8
+ export default define(class Judgement {
9
9
  constructor(string, frame, declaration) {
10
10
  this.string = string;
11
11
  this.frame = frame;
@@ -151,7 +151,7 @@ export default domAssigned(class Judgement {
151
151
  const judgementNode = statementNode.getJudgementNode();
152
152
 
153
153
  if (judgementNode !== null) {
154
- const { Frame, Declaration} = dom,
154
+ const { Frame, Declaration} = ontology,
155
155
  node = judgementNode, ///
156
156
  string = context.nodeAsString(node),
157
157
  frame = Frame.fromJudgementNode(judgementNode, context),
@@ -165,7 +165,7 @@ export default domAssigned(class Judgement {
165
165
  });
166
166
 
167
167
  function referenceFromMetavariable(metavariable, context) {
168
- const { Reference } = dom,
168
+ const { Reference } = ontology,
169
169
  metavariableNode = metavariable.getNode(),
170
170
  reference = Reference.fromMetavariableNode(metavariableNode, context);
171
171
 
@@ -1,11 +1,11 @@
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 { metavariableFromJSON, metavariableToMetavariableJSON } from "../utilities/json";
7
7
 
8
- export default domAssigned(class Label {
8
+ export default define(class Label {
9
9
  constructor(context, metavariable) {
10
10
  this.context = context;
11
11
  this.metavariable = metavariable;
@@ -102,7 +102,7 @@ export default domAssigned(class Label {
102
102
  }
103
103
 
104
104
  static fromLabelNode(labelNode, context) {
105
- const { Metavariable } = dom,
105
+ const { Metavariable } = ontology,
106
106
  metavariable = Metavariable.fromLabelNode(labelNode, context),
107
107
  label = new Label(context, metavariable);
108
108
 
@@ -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 Lemma extends TopLevelAssertion {
7
+ export default define(class Lemma extends TopLevelAssertion {
8
8
  verify() {
9
9
  let verifies;
10
10
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  import TopLevelMetaAssertion from "./topLevelMetaAssertion";
4
4
 
5
- import { domAssigned } from "../dom";
5
+ import { define } from "../ontology";
6
6
 
7
- export default domAssigned(class MetaLemma extends TopLevelMetaAssertion {
7
+ export default define(class MetaLemma extends TopLevelMetaAssertion {
8
8
  verify() {
9
9
  let verifies;
10
10
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import { domAssigned } from "../dom";
3
+ import { define } from "../ontology";
4
4
  import { FRAME_META_TYPE_NAME, REFERENCE_META_TYPE_NAME, STATEMENT_META_TYPE_NAME } from "../metaTypeNames";
5
5
 
6
6
  class MetaType {
@@ -70,7 +70,7 @@ function metaTypeFromMetaTypeNode(metaTypeNode, context) {
70
70
  return metaType;
71
71
  }
72
72
 
73
- export default domAssigned(MetaType);
73
+ export default define(MetaType);
74
74
 
75
75
  class FrameMetaType extends MetaType {
76
76
  static fromNothing() {
@@ -2,9 +2,9 @@
2
2
 
3
3
  import TopLevelMetaAssertion from "./topLevelMetaAssertion";
4
4
 
5
- import { domAssigned } from "../dom";
5
+ import { define } from "../ontology";
6
6
 
7
- export default domAssigned(class Metatheorem extends TopLevelMetaAssertion {
7
+ export default define(class Metatheorem extends TopLevelMetaAssertion {
8
8
  verify() {
9
9
  let verifies;
10
10
 
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
 
3
- import dom from "../dom";
3
+ import ontology from "../ontology";
4
4
  import MetavariablePartialContext from "../context/partial/metavariable";
5
5
 
6
- import { domAssigned } from "../dom";
6
+ import { define } from "../ontology";
7
7
  import { EMPTY_STRING } from "../constants";
8
8
  import { typeFromJSON, typeToTypeJSON } from "../utilities/json";
9
9
  import { metaTypeFromJSON, metaTypeToMetaTypeJSON } from "../utilities/json";
10
10
  import { metavariableFromFrame, metavariableFromStatement } from "../utilities/context";
11
11
  import { unifyMetavariable, unifyMetavariableIntrinsically } from "../utilities/unification";
12
12
 
13
- export default domAssigned(class Metavariable {
13
+ export default define(class Metavariable {
14
14
  constructor(string, node, tokens, name, type, metaType) {
15
15
  this.string = string;
16
16
  this.node = node;
@@ -161,7 +161,7 @@ export default domAssigned(class Metavariable {
161
161
  frameUnifies = true;
162
162
  }
163
163
  } else {
164
- const { FrameSubstitution } = dom,
164
+ const { FrameSubstitution } = ontology,
165
165
  context = specificContext, ///
166
166
  metavariable = this, ///
167
167
  frameSubstitution = FrameSubstitution.fromFrameAndMetavariable(frame, metavariable, context),
@@ -206,7 +206,7 @@ export default domAssigned(class Metavariable {
206
206
  referenceUnifies = true;
207
207
  }
208
208
  } else {
209
- const { ReferenceSubstitution } = dom,
209
+ const { ReferenceSubstitution } = ontology,
210
210
  metavariable = this,
211
211
  referenceSubstitution = ReferenceSubstitution.fromReferenceAndMetavariable(reference, metavariable, context),
212
212
  substitution = referenceSubstitution; ///
@@ -253,7 +253,7 @@ export default domAssigned(class Metavariable {
253
253
  statementUnifies = true;
254
254
  }
255
255
  } else {
256
- const { StatementSubstitution } = dom,
256
+ const { StatementSubstitution } = ontology,
257
257
  metavariable = this,
258
258
  statementSubstitution = StatementSubstitution.fromStatementMetavariableAndSubstitution(statement, metavariable, substitution, context);
259
259
 
@@ -495,7 +495,7 @@ export default domAssigned(class Metavariable {
495
495
  }
496
496
 
497
497
  static fromMetavariableDeclarationNode(metavariableDeclarationNode, context) {
498
- const { MetaType } = dom,
498
+ const { MetaType } = ontology,
499
499
  metavariableNode = metavariableDeclarationNode.getMetavariableNode(),
500
500
  type = typeFromMetavariableDeclarationNode(metavariableDeclarationNode, context),
501
501
  metaType = MetaType.fromMetavariableDeclarationNode(metavariableDeclarationNode, context),
@@ -510,7 +510,7 @@ export default domAssigned(class Metavariable {
510
510
  });
511
511
 
512
512
  function metavariableFromMetavariableNode(metavariableNode, context) {
513
- const { Metavariable } = dom,
513
+ const { Metavariable } = ontology,
514
514
  metavariableName = metavariableNode.getMetavariableName(),
515
515
  type = null,
516
516
  name = metavariableName, ///
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
- import { domAssigned } from "../dom";
3
+ import { define } from "../ontology";
4
4
 
5
- export default domAssigned(class Parameter {
5
+ export default define(class Parameter {
6
6
  constructor(name) {
7
7
  this.name = name;
8
8
  }