occam-verify-cli 1.0.230 → 1.0.234

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 (121) hide show
  1. package/lib/assignment/variable.js +4 -2
  2. package/lib/context/file.js +5 -5
  3. package/lib/context/local.js +19 -14
  4. package/lib/dom/axiom.js +36 -27
  5. package/lib/dom/combinator.js +5 -5
  6. package/lib/dom/conclusion.js +5 -5
  7. package/lib/dom/conjecture.js +9 -9
  8. package/lib/dom/constructor.js +5 -5
  9. package/lib/dom/declaration/combinator.js +14 -14
  10. package/lib/dom/declaration/complexType.js +35 -35
  11. package/lib/dom/declaration/constructor.js +19 -19
  12. package/lib/dom/declaration/metavariable.js +22 -22
  13. package/lib/dom/declaration/simpleType.js +23 -23
  14. package/lib/dom/declaration/variable.js +20 -20
  15. package/lib/dom/declaration.js +4 -2
  16. package/lib/dom/deduction.js +5 -5
  17. package/lib/dom/derivation.js +5 -5
  18. package/lib/dom/error.js +9 -9
  19. package/lib/dom/hypothesis.js +184 -0
  20. package/lib/dom/label.js +18 -24
  21. package/lib/dom/lemma.js +7 -7
  22. package/lib/dom/metaLemma.js +9 -9
  23. package/lib/dom/metaType.js +4 -10
  24. package/lib/dom/metatheorem.js +9 -9
  25. package/lib/dom/metavariable.js +7 -8
  26. package/lib/dom/parameter.js +2 -2
  27. package/lib/dom/premise.js +5 -5
  28. package/lib/dom/procedureCall.js +3 -3
  29. package/lib/dom/proof.js +3 -3
  30. package/lib/dom/property.js +9 -9
  31. package/lib/dom/reference.js +23 -22
  32. package/lib/dom/rule.js +24 -24
  33. package/lib/dom/section.js +248 -0
  34. package/lib/dom/signature.js +5 -5
  35. package/lib/dom/statement.js +25 -20
  36. package/lib/dom/step.js +3 -3
  37. package/lib/dom/subDerivation.js +5 -5
  38. package/lib/dom/subproof.js +7 -7
  39. package/lib/dom/substitution/statement.js +3 -3
  40. package/lib/dom/supposition.js +5 -5
  41. package/lib/dom/term.js +5 -6
  42. package/lib/dom/theorem.js +9 -9
  43. package/lib/dom/topLevelAssertion.js +123 -31
  44. package/lib/dom/topLevelMetaAssertion.js +13 -13
  45. package/lib/dom/type.js +21 -21
  46. package/lib/dom/variable.js +9 -15
  47. package/lib/index.js +3 -1
  48. package/lib/mixins/step/unify.js +11 -11
  49. package/lib/mixins/term/verify.js +6 -6
  50. package/lib/node/hypothesis.js +123 -0
  51. package/lib/node/section.js +144 -0
  52. package/lib/nonTerminalNodeMap.js +5 -3
  53. package/lib/ruleNames.js +9 -1
  54. package/lib/utilities/context.js +1 -1
  55. package/lib/utilities/json.js +82 -59
  56. package/lib/utilities/releaseContext.js +3 -3
  57. package/lib/utilities/subproof.js +10 -10
  58. package/lib/verifier/combinator.js +9 -10
  59. package/lib/verifier/constructor.js +10 -11
  60. package/lib/verifier/topLevel.js +38 -31
  61. package/package.json +2 -2
  62. package/src/assignment/variable.js +6 -4
  63. package/src/context/file.js +3 -3
  64. package/src/context/local.js +6 -14
  65. package/src/dom/axiom.js +47 -42
  66. package/src/dom/combinator.js +4 -4
  67. package/src/dom/conclusion.js +5 -5
  68. package/src/dom/conjecture.js +8 -8
  69. package/src/dom/constructor.js +4 -4
  70. package/src/dom/declaration/combinator.js +14 -14
  71. package/src/dom/declaration/complexType.js +35 -35
  72. package/src/dom/declaration/constructor.js +20 -20
  73. package/src/dom/declaration/metavariable.js +22 -22
  74. package/src/dom/declaration/simpleType.js +22 -22
  75. package/src/dom/declaration/variable.js +21 -21
  76. package/src/dom/declaration.js +5 -3
  77. package/src/dom/deduction.js +5 -5
  78. package/src/dom/derivation.js +5 -5
  79. package/src/dom/error.js +8 -8
  80. package/src/dom/hypothesis.js +119 -0
  81. package/src/dom/label.js +17 -19
  82. package/src/dom/lemma.js +8 -8
  83. package/src/dom/metaLemma.js +8 -8
  84. package/src/dom/metaType.js +2 -6
  85. package/src/dom/metatheorem.js +8 -8
  86. package/src/dom/metavariable.js +9 -12
  87. package/src/dom/parameter.js +1 -1
  88. package/src/dom/premise.js +8 -8
  89. package/src/dom/procedureCall.js +3 -3
  90. package/src/dom/proof.js +2 -2
  91. package/src/dom/property.js +8 -8
  92. package/src/dom/reference.js +23 -27
  93. package/src/dom/rule.js +29 -29
  94. package/src/dom/section.js +197 -0
  95. package/src/dom/signature.js +4 -5
  96. package/src/dom/statement.js +24 -32
  97. package/src/dom/step.js +4 -4
  98. package/src/dom/subDerivation.js +5 -5
  99. package/src/dom/subproof.js +8 -8
  100. package/src/dom/substitution/statement.js +5 -5
  101. package/src/dom/supposition.js +7 -7
  102. package/src/dom/term.js +3 -8
  103. package/src/dom/theorem.js +7 -7
  104. package/src/dom/topLevelAssertion.js +113 -40
  105. package/src/dom/topLevelMetaAssertion.js +19 -19
  106. package/src/dom/type.js +22 -22
  107. package/src/dom/variable.js +8 -11
  108. package/src/index.js +2 -0
  109. package/src/mixins/step/unify.js +10 -10
  110. package/src/mixins/term/verify.js +4 -5
  111. package/src/node/hypothesis.js +23 -0
  112. package/src/node/section.js +44 -0
  113. package/src/nonTerminalNodeMap.js +7 -1
  114. package/src/ruleNames.js +2 -0
  115. package/src/utilities/context.js +2 -2
  116. package/src/utilities/json.js +86 -58
  117. package/src/utilities/releaseContext.js +2 -2
  118. package/src/utilities/subproof.js +10 -10
  119. package/src/verifier/combinator.js +6 -11
  120. package/src/verifier/constructor.js +9 -12
  121. package/src/verifier/topLevel.js +42 -30
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "occam-verify-cli",
3
3
  "author": "James Smith",
4
- "version": "1.0.230",
4
+ "version": "1.0.234",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/occam-verify-cli",
7
7
  "description": "Occam's Verifier",
@@ -15,7 +15,7 @@
15
15
  "occam-custom-grammars": "^5.0.1222",
16
16
  "occam-entities": "^1.0.366",
17
17
  "occam-file-system": "^6.0.384",
18
- "occam-furtle": "^2.0.173",
18
+ "occam-furtle": "^2.0.175",
19
19
  "occam-grammars": "^1.3.298",
20
20
  "occam-lexers": "^23.0.47",
21
21
  "occam-parsers": "^23.0.160",
@@ -10,11 +10,13 @@ export default class VariableAssignment {
10
10
  }
11
11
 
12
12
  assign(context) {
13
- const nested = false,
14
- variableAdded = context.addVariable(this.variable, nested),
15
- variableType = this.variable.getType(),
13
+ const nested = false;
14
+
15
+ context.addVariable(this.variable, nested);
16
+
17
+ const variableType = this.variable.getType(),
16
18
  variableString = this.variable.getString(),
17
- variableAssigned = variableAdded, ///
19
+ variableAssigned = true, ///
18
20
  variableTypeString = variableType.getString();
19
21
 
20
22
  variableAssigned ?
@@ -529,14 +529,14 @@ export default class FileContext {
529
529
  return metaLemmaMetatheorems;
530
530
  }
531
531
 
532
- findAxiomLemmaTheoremConjectureByReference(reference) {
532
+ findAxiomLemmaTheoremOrConjectureByReference(reference) {
533
533
  const axiom = this.findAxiomByReference(reference),
534
534
  lemma = this.findLemmaByReference(reference),
535
535
  theorem = this.findTheoremByReference(reference),
536
536
  conjecture = this.findConjectureByReference(reference),
537
- axiomLemmaTheoremConjecture = (axiom || lemma || theorem || conjecture);
537
+ axiomLemmaTheoremOrConjecture = (axiom || lemma || theorem || conjecture);
538
538
 
539
- return axiomLemmaTheoremConjecture;
539
+ return axiomLemmaTheoremOrConjecture;
540
540
  }
541
541
 
542
542
  findMetavariable(metavariable, generalContext, specificContext) {
@@ -116,7 +116,11 @@ class LocalContext {
116
116
 
117
117
  getConstructors() { return this.context.getConstructors(); }
118
118
 
119
- getFileContext() { return this.context.getFileContext(); }
119
+ addAxiom(axiom) { this.context.addAxiom(axiom); }
120
+
121
+ addLemma(lemma) { this.context.addLemma(lemma); }
122
+
123
+ addTheorem(theorem) { this.context.addTheorem(theorem); }
120
124
 
121
125
  addEquality(equality, context) {
122
126
  let equalityAdded;
@@ -241,7 +245,7 @@ class LocalContext {
241
245
 
242
246
  isMetaLemmaMetatheoremPresentByReference(reference) { return this.context.isMetaLemmaMetatheoremPresentByReference(reference); }
243
247
 
244
- findAxiomLemmaTheoremConjectureByReference(reference) { return this.context.findAxiomLemmaTheoremConjectureByReference(reference); }
248
+ findAxiomLemmaTheoremOrConjectureByReference(reference) { return this.context.findAxiomLemmaTheoremOrConjectureByReference(reference); }
245
249
 
246
250
  isMetavariablePresent(metavariable, generalContext, specificContext) { return this.context.isMetavariablePresent(metavariable, generalContext, specificContext); }
247
251
 
@@ -392,18 +396,6 @@ class LocalContext {
392
396
  return localContext;
393
397
  }
394
398
 
395
- static fromFileContext(fileContext) {
396
- const context = fileContext, ///
397
- tokens = null,
398
- variables = [],
399
- judgements = [],
400
- equivalences = Equivalences.fromNothing(),
401
- stepsOrSubproofs = [],
402
- localContext = new LocalContext(context, tokens, variables, judgements, equivalences, stepsOrSubproofs);
403
-
404
- return localContext;
405
- }
406
-
407
399
  static fromContextAndTokens(context, tokens) {
408
400
  const variables = [],
409
401
  judgements = [],
package/src/dom/axiom.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- import LocalContext from "../context/local";
4
3
  import TopLevelAssertion from "./topLevelAssertion";
5
4
 
6
5
  import { domAssigned } from "../dom";
@@ -17,10 +16,10 @@ export default domAssigned(class Axiom extends TopLevelAssertion {
17
16
  let verifies;
18
17
 
19
18
  const axiom = this, ///
20
- axiomString = axiom.getString(),
21
- fileContext = this.getFileContext();
19
+ context = this.getContext(),
20
+ axiomString = axiom.getString();
22
21
 
23
- fileContext.trace(`Verifying the '${axiomString}' axiom...`);
22
+ context.trace(`Verifying the '${axiomString}' axiom...`);
24
23
 
25
24
  const signatureVerifies = this.verifySignature();
26
25
 
@@ -31,9 +30,9 @@ export default domAssigned(class Axiom extends TopLevelAssertion {
31
30
  if (verifies) {
32
31
  const axiom = this; ///
33
32
 
34
- fileContext.addAxiom(axiom);
33
+ context.addAxiom(axiom);
35
34
 
36
- fileContext.debug(`...verified the '${axiomString}' axiom.`);
35
+ context.debug(`...verified the '${axiomString}' axiom.`);
37
36
  }
38
37
 
39
38
  return verifies;
@@ -45,10 +44,8 @@ export default domAssigned(class Axiom extends TopLevelAssertion {
45
44
  const satisfiable = this.isSatisfiable();
46
45
 
47
46
  if (satisfiable) {
48
- const signature = this.getSignature(),
49
- fileContext = this.getFileContext(),
50
- localContext = LocalContext.fromFileContext(fileContext),
51
- context = localContext; ///
47
+ const context = this.getContext(),
48
+ signature = this.getSignature();
52
49
 
53
50
  signatureVerifies = signature.verify(context);
54
51
  } else {
@@ -68,13 +65,13 @@ export default domAssigned(class Axiom extends TopLevelAssertion {
68
65
 
69
66
  signature = this.getSignature()
70
67
 
71
- const signatureB = signature; ///
72
-
73
- const fileContext = this.getFileContext(),
74
- localContext = LocalContext.fromFileContext(fileContext),
75
- generalContext = localContext, ///
68
+ const signatureB = signature, ///
76
69
  specificContext = context; ///
77
70
 
71
+ context = this.getContext();
72
+
73
+ const generalContext = context; ///
74
+
78
75
  signatureMatches = signatureA.match(signatureB, substitutions, generalContext, specificContext);
79
76
  }
80
77
 
@@ -95,10 +92,11 @@ export default domAssigned(class Axiom extends TopLevelAssertion {
95
92
  context.trace(`Cannot unify the '${stepString}' step with the '${axiomString}' axiom because the axiom is not unconditional.`);
96
93
  } else {
97
94
  const statement = step.getStatement(),
98
- fileContext = this.getFileContext(),
99
- localContext = LocalContext.fromFileContext(fileContext),
100
- generalContext = localContext, ///
101
- specificContext = context, ///
95
+ specificContext = context; ///
96
+
97
+ context = this.getContext();
98
+
99
+ const generalContext = context, ///
102
100
  statementUnifiesWithDeduction = this.unifyStatementWithDeduction(statement, substitutions, generalContext, specificContext);
103
101
 
104
102
  if (statementUnifiesWithDeduction) {
@@ -150,10 +148,11 @@ export default domAssigned(class Axiom extends TopLevelAssertion {
150
148
  context.trace(`Cannot unify the '${subproofString}' subproof with the '${axiomString}' axiom because the axiom is unconditional.`);
151
149
  } else {
152
150
  const lastStep = subproof.getLastStep(),
153
- fileContext = this.getFileContext(),
154
- localContext = LocalContext.fromFileContext(fileContext),
155
- generalContext = localContext, ///
156
- specificContext = context, ///
151
+ specificContext = context; ///
152
+
153
+ context = this.getContext();
154
+
155
+ const generalContext = context, ///
157
156
  lastStepUnifies = this.unifyLastStep(lastStep, substitutions, generalContext, specificContext);
158
157
 
159
158
  if (lastStepUnifies) {
@@ -235,41 +234,47 @@ export default domAssigned(class Axiom extends TopLevelAssertion {
235
234
  return suppositionsUnify;
236
235
  }
237
236
 
238
- unifyAxiomLemmaTheoremConjecture(axiomLemmaTheoremConjecture, substitutions, context) {
239
- let axiomLemmaTheoremConjectureUnifies = false;
237
+ unifyAxiomLemmaTheoremOrConjecture(axiomLemmaTheoremOrConjecture, substitutions, context) {
238
+ let axiomLemmaTheoremOrConjectureUnifies = false;
240
239
 
241
240
  const axiomString = this.getString(),
242
- axiomLemmaTheoremConjectureString = axiomLemmaTheoremConjecture.getString();
241
+ axiomLemmaTheoremOrConjectureString = axiomLemmaTheoremOrConjecture.getString();
242
+
243
+ context.trace(`Unifying the '${axiomLemmaTheoremOrConjectureString}' axiom, lemma, theorem or conjecture with the '${axiomString}' axiom...`);
243
244
 
244
- context.trace(`Unifying the '${axiomLemmaTheoremConjectureString}' axiom, lemma, theorem or conjecture with the '${axiomString}' axiom...`);
245
+ const hypothesesCorrelate = axiomLemmaTheoremOrConjecture.correlateHypotheses(context);
246
+
247
+ if (hypothesesCorrelate) {
248
+ const deduction = axiomLemmaTheoremOrConjecture.getDeduction(), ///
249
+ specificContext = context; ///
245
250
 
246
- const deduction = axiomLemmaTheoremConjecture.getDeduction(), ///
247
- fileContext = this.getFileContext(),
248
- generalContext = fileContext, ///
249
- specificContext = context, ///
250
- deductionUnifies = this.unifyDeduction(deduction, substitutions, generalContext, specificContext);
251
+ context = this.getContext();
251
252
 
252
- if (deductionUnifies) {
253
- const suppositions = axiomLemmaTheoremConjecture.getSuppositions(),
254
- suppositionsUnify = this.unifySuppositions(suppositions, substitutions, generalContext, specificContext);
253
+ const generalContext = context, ///
254
+ deductionUnifies = this.unifyDeduction(deduction, substitutions, generalContext, specificContext);
255
255
 
256
- axiomLemmaTheoremConjectureUnifies = suppositionsUnify; ///
256
+ if (deductionUnifies) {
257
+ const suppositions = axiomLemmaTheoremOrConjecture.getSuppositions(),
258
+ suppositionsUnify = this.unifySuppositions(suppositions, substitutions, generalContext, specificContext);
259
+
260
+ axiomLemmaTheoremOrConjectureUnifies = suppositionsUnify; ///
261
+ }
257
262
  }
258
263
 
259
- if (axiomLemmaTheoremConjectureUnifies) {
260
- context.debug(`...unified the '${axiomLemmaTheoremConjectureString}' axiom, lemma, theorem or conjecture with the '${axiomString}' axiom.`);
264
+ if (axiomLemmaTheoremOrConjectureUnifies) {
265
+ context.debug(`...unified the '${axiomLemmaTheoremOrConjectureString}' axiom, lemma, theorem or conjecture with the '${axiomString}' axiom.`);
261
266
  }
262
267
 
263
- return axiomLemmaTheoremConjectureUnifies;
268
+ return axiomLemmaTheoremOrConjectureUnifies;
264
269
  }
265
270
 
266
271
  static name = "Axiom";
267
272
 
268
- static fromJSON(json, fileContext) { return TopLevelAssertion.fromJSON(Axiom, json, fileContext); }
273
+ static fromJSON(json, context) { return TopLevelAssertion.fromJSON(Axiom, json, context); }
269
274
 
270
- static fromAxiomNode(axiomNode, fileContext) {
275
+ static fromAxiomNode(axiomNode, context) {
271
276
  const node = axiomNode, ///
272
- axiom = TopLevelAssertion.fromNode(Axiom, node, fileContext);
277
+ axiom = TopLevelAssertion.fromNode(Axiom, node, context);
273
278
 
274
279
  return axiom;
275
280
  }
@@ -53,16 +53,16 @@ export default domAssigned(class Combinator {
53
53
  return json;
54
54
  }
55
55
 
56
- static fromJSON(json, fileContext) {
57
- const statement = statementFromJSON(json, fileContext),
56
+ static fromJSON(json, context) {
57
+ const statement = statementFromJSON(json, context),
58
58
  combinator = new Combinator(statement);
59
59
 
60
60
  return combinator;
61
61
  }
62
62
 
63
- static fromCombinatorDeclarationNode(combinatorDeclarationNode, fileContext) {
63
+ static fromCombinatorDeclarationNode(combinatorDeclarationNode, context) {
64
64
  const { Statement } = dom,
65
- statement = Statement.fromCombinatorDeclarationNode(combinatorDeclarationNode, fileContext),
65
+ statement = Statement.fromCombinatorDeclarationNode(combinatorDeclarationNode, context),
66
66
  combinator = new Combinator(statement);
67
67
 
68
68
  return combinator;
@@ -74,19 +74,19 @@ export default domAssigned(class Conclusion {
74
74
 
75
75
  static name = "Conclusion";
76
76
 
77
- static fromJSON(json, fileContext) {
78
- const statement = statementFromJSON(json, fileContext),
77
+ static fromJSON(json, context) {
78
+ const statement = statementFromJSON(json, context),
79
79
  string = statement.getString(),
80
80
  conclusion = new Conclusion(string, statement);
81
81
 
82
82
  return conclusion;
83
83
  }
84
84
 
85
- static fromConclusionNode(conclusionNode, fileContext) {
85
+ static fromConclusionNode(conclusionNode, context) {
86
86
  const { Statement } = dom,
87
87
  node = conclusionNode, ///
88
- string = fileContext.nodeAsString(node),
89
- statement = Statement.fromConclusionNode(conclusionNode, fileContext),
88
+ string = context.nodeAsString(node),
89
+ statement = Statement.fromConclusionNode(conclusionNode, context),
90
90
  conclusion = new Conclusion(string, statement);
91
91
 
92
92
  return conclusion;
@@ -8,20 +8,20 @@ export default domAssigned(class Conjecture extends TopLevelAssertion {
8
8
  verify() {
9
9
  let verifies;
10
10
 
11
- const conjecture = this, ///
12
- fileContext = this.getFileContext(),
11
+ const context = this.getContext(),
12
+ conjecture = this, ///
13
13
  conjectureString = conjecture.getString();
14
14
 
15
- fileContext.trace(`Verifying the '${conjectureString}' conjecture...`);
15
+ context.trace(`Verifying the '${conjectureString}' conjecture...`);
16
16
 
17
17
  verifies = super.verify();
18
18
 
19
19
  if (verifies) {
20
20
  const conjecture = this; ///
21
21
 
22
- fileContext.addConjecture(conjecture);
22
+ context.addConjecture(conjecture);
23
23
 
24
- fileContext.debug(`...verified the '${conjectureString}' conjecture.`);
24
+ context.debug(`...verified the '${conjectureString}' conjecture.`);
25
25
  }
26
26
 
27
27
  return verifies;
@@ -29,11 +29,11 @@ export default domAssigned(class Conjecture extends TopLevelAssertion {
29
29
 
30
30
  static name = "Conjecture";
31
31
 
32
- static fromJSON(json, fileContext) { return TopLevelAssertion.fromJSON(Conjecture, json, fileContext); }
32
+ static fromJSON(json, context) { return TopLevelAssertion.fromJSON(Conjecture, json, context); }
33
33
 
34
- static fromConjectureNode(conjectureNode, fileContext) {
34
+ static fromConjectureNode(conjectureNode, context) {
35
35
  const node = conjectureNode, ///
36
- conjecture = TopLevelAssertion.fromNode(Conjecture, node, fileContext);
36
+ conjecture = TopLevelAssertion.fromNode(Conjecture, node, context);
37
37
 
38
38
  return conjecture;
39
39
  }
@@ -67,17 +67,17 @@ export default domAssigned(class Constructor {
67
67
  return json;
68
68
  }
69
69
 
70
- static fromJSON(json, fileContext) {
71
- const term = termFromJSON(json, fileContext),
70
+ static fromJSON(json, context) {
71
+ const term = termFromJSON(json, context),
72
72
  string = stringFromTerm(term),
73
73
  constructor = new Constructor(string, term);
74
74
 
75
75
  return constructor;
76
76
  }
77
77
 
78
- static fromConstructorDeclarationNode(constructorDeclarationNode, fileContext) {
78
+ static fromConstructorDeclarationNode(constructorDeclarationNode, context) {
79
79
  const { Term } = dom,
80
- term = Term.fromConstructorDeclarationNode(constructorDeclarationNode, fileContext),
80
+ term = Term.fromConstructorDeclarationNode(constructorDeclarationNode, context),
81
81
  string = stringFromTerm(term),
82
82
  constructor = new Constructor(string, term);
83
83
 
@@ -7,14 +7,14 @@ import { domAssigned } from "../../dom";
7
7
  import combinatorVerifier from "../../verifier/combinator";
8
8
 
9
9
  export default domAssigned(class CombinatorDeclaration {
10
- constructor(fileContext, string, combinator) {
11
- this.fileContext = fileContext;
10
+ constructor(context, string, combinator) {
11
+ this.context = context;
12
12
  this.string = string;
13
13
  this.combinator = combinator;
14
14
  }
15
15
 
16
- getFileContext() {
17
- return this.fileContext;
16
+ getContext() {
17
+ return this.context;
18
18
  }
19
19
 
20
20
  getString() {
@@ -30,18 +30,18 @@ export default domAssigned(class CombinatorDeclaration {
30
30
 
31
31
  const combinatorDeclarationString = this.getString(); ///
32
32
 
33
- this.fileContext.trace(`Verifying the '${combinatorDeclarationString}' combinator declaration...`);
33
+ this.context.trace(`Verifying the '${combinatorDeclarationString}' combinator declaration...`);
34
34
 
35
35
  const combinatorVerifies = this.verifyCombinator();
36
36
 
37
37
  if (combinatorVerifies) {
38
- this.fileContext.addCombinator(this.combinator);
38
+ this.context.addCombinator(this.combinator);
39
39
 
40
40
  verifies = true;
41
41
  }
42
42
 
43
43
  if (verifies) {
44
- this.fileContext.debug(`...verified the '${combinatorDeclarationString}' combinator declaration.`);
44
+ this.context.debug(`...verified the '${combinatorDeclarationString}' combinator declaration.`);
45
45
  }
46
46
 
47
47
  return verifies;
@@ -52,15 +52,15 @@ export default domAssigned(class CombinatorDeclaration {
52
52
 
53
53
  const combinatorString = this.combinator.getString();
54
54
 
55
- this.fileContext.trace(`Verifying the '${combinatorString}' combinator...`);
55
+ this.context.trace(`Verifying the '${combinatorString}' combinator...`);
56
56
 
57
57
  const statement = this.combinator.getStatement(),
58
58
  statementNode = statement.getNode();
59
59
 
60
- statementVerifies = combinatorVerifier.verifyStatement(statementNode, this.fileContext);
60
+ statementVerifies = combinatorVerifier.verifyStatement(statementNode, this.context);
61
61
 
62
62
  if (statementVerifies) {
63
- this.fileContext.debug(`...verified the '${combinatorString}' combinator.`);
63
+ this.context.debug(`...verified the '${combinatorString}' combinator.`);
64
64
  }
65
65
 
66
66
  return statementVerifies;
@@ -68,12 +68,12 @@ export default domAssigned(class CombinatorDeclaration {
68
68
 
69
69
  static name = "CombinatorDeclaration";
70
70
 
71
- static fromCombinatorDeclarationNode(combinatorDeclarationNode, fileContext) {
71
+ static fromCombinatorDeclarationNode(combinatorDeclarationNode, context) {
72
72
  const { Combinator } = dom,
73
73
  node = combinatorDeclarationNode, ///
74
- string = fileContext.nodeAsString(node),
75
- combinator = Combinator.fromCombinatorDeclarationNode(combinatorDeclarationNode, fileContext),
76
- combinatorDeclaration = new CombinatorDeclaration(fileContext, string, combinator);
74
+ string = context.nodeAsString(node),
75
+ combinator = Combinator.fromCombinatorDeclarationNode(combinatorDeclarationNode, context),
76
+ combinatorDeclaration = new CombinatorDeclaration(context, string, combinator);
77
77
 
78
78
  return combinatorDeclaration;
79
79
  }