occam-verify-cli 1.0.609 → 1.0.612

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 (79) hide show
  1. package/lib/context/ephemeral.js +2 -2
  2. package/lib/context/file/nominal.js +17 -47
  3. package/lib/context/liminal.js +36 -39
  4. package/lib/context/scoped.js +8 -8
  5. package/lib/context.js +76 -48
  6. package/lib/element/assertion/contained.js +8 -1
  7. package/lib/element/assertion/defined.js +11 -4
  8. package/lib/element/assertion/property.js +8 -1
  9. package/lib/element/assertion/satisfies.js +8 -1
  10. package/lib/element/assertion/subproof.js +8 -1
  11. package/lib/element/assertion/type.js +8 -1
  12. package/lib/element/assumption.js +11 -11
  13. package/lib/element/combinator/bracketed.js +8 -1
  14. package/lib/element/constructor/bracketed.js +8 -1
  15. package/lib/element/declaration/combinator.js +8 -1
  16. package/lib/element/declaration/complexType.js +8 -1
  17. package/lib/element/declaration/constructor.js +32 -25
  18. package/lib/element/declaration/metavariable.js +9 -9
  19. package/lib/element/declaration/simpleType.js +8 -1
  20. package/lib/element/declaration/typePrefix.js +8 -1
  21. package/lib/element/declaration/variable.js +16 -9
  22. package/lib/element/frame.js +28 -23
  23. package/lib/element/judgement.js +4 -4
  24. package/lib/element/metavariable.js +25 -11
  25. package/lib/element/proofAssertion/premise.js +8 -1
  26. package/lib/element/proofAssertion/step.js +8 -1
  27. package/lib/element/proofAssertion/supposition.js +8 -1
  28. package/lib/element/reference.js +13 -1
  29. package/lib/element/statement.js +16 -1
  30. package/lib/element/substitution/frame.js +18 -11
  31. package/lib/element/substitution/reference.js +18 -11
  32. package/lib/element/substitution/statement.js +26 -13
  33. package/lib/element/substitution/term.js +11 -10
  34. package/lib/element/substitution.js +15 -8
  35. package/lib/element/variable.js +6 -5
  36. package/lib/process/unify.js +2 -2
  37. package/lib/utilities/element.js +3 -3
  38. package/lib/utilities/substitutions.js +15 -16
  39. package/lib/utilities/unification.js +30 -15
  40. package/package.json +2 -2
  41. package/src/context/ephemeral.js +1 -1
  42. package/src/context/file/nominal.js +15 -25
  43. package/src/context/liminal.js +31 -35
  44. package/src/context/scoped.js +6 -5
  45. package/src/context.js +68 -40
  46. package/src/element/assertion/contained.js +7 -0
  47. package/src/element/assertion/defined.js +13 -3
  48. package/src/element/assertion/property.js +7 -0
  49. package/src/element/assertion/satisfies.js +7 -0
  50. package/src/element/assertion/subproof.js +7 -0
  51. package/src/element/assertion/type.js +7 -0
  52. package/src/element/assumption.js +2 -2
  53. package/src/element/combinator/bracketed.js +7 -0
  54. package/src/element/constructor/bracketed.js +7 -0
  55. package/src/element/declaration/combinator.js +7 -0
  56. package/src/element/declaration/complexType.js +7 -0
  57. package/src/element/declaration/constructor.js +31 -24
  58. package/src/element/declaration/metavariable.js +6 -6
  59. package/src/element/declaration/simpleType.js +7 -0
  60. package/src/element/declaration/typePrefix.js +7 -0
  61. package/src/element/declaration/variable.js +13 -6
  62. package/src/element/frame.js +28 -26
  63. package/src/element/judgement.js +1 -1
  64. package/src/element/metavariable.js +28 -11
  65. package/src/element/proofAssertion/premise.js +7 -0
  66. package/src/element/proofAssertion/step.js +7 -0
  67. package/src/element/proofAssertion/supposition.js +7 -0
  68. package/src/element/reference.js +14 -0
  69. package/src/element/statement.js +18 -0
  70. package/src/element/substitution/frame.js +10 -14
  71. package/src/element/substitution/reference.js +10 -14
  72. package/src/element/substitution/statement.js +13 -15
  73. package/src/element/substitution/term.js +8 -13
  74. package/src/element/substitution.js +12 -6
  75. package/src/element/variable.js +4 -2
  76. package/src/process/unify.js +1 -1
  77. package/src/utilities/element.js +2 -2
  78. package/src/utilities/substitutions.js +13 -16
  79. package/src/utilities/unification.js +2 -4
@@ -159,7 +159,8 @@ class ScopedContext extends Context {
159
159
  let judgementAdded = false;
160
160
 
161
161
  const metavariable = judgement.getMetavariable(),
162
- judgementPresent = this.isJudgementPresentByMetavariable(metavariable);
162
+ metavariableName = metavariable.getMetavariableName(),
163
+ judgementPresent = this.isJudgementPresentByMetavariableName(metavariableName);
163
164
 
164
165
  if (!judgementPresent) {
165
166
  this.judgements.push(judgement);
@@ -183,10 +184,10 @@ class ScopedContext extends Context {
183
184
 
184
185
  findEquivalenceByTerm(term) { return this.equivalences.findEquivalenceByTerm(term); }
185
186
 
186
- findJudgementByMetavariable(metavariable) {
187
+ findJudgementByMetavariableName(metavariableName) {
187
188
  const judgements = this.getJudgements(),
188
189
  judgement = judgements.find((judgement) => {
189
- const judgementMetavariableComparesToMetavariable = judgement.compareMetavariable(metavariable);
190
+ const judgementMetavariableComparesToMetavariable = judgement.matchMetavariableName(metavariableName);
190
191
 
191
192
  if (judgementMetavariableComparesToMetavariable) {
192
193
  return true;
@@ -230,8 +231,8 @@ class ScopedContext extends Context {
230
231
  return termGrounded;
231
232
  }
232
233
 
233
- isJudgementPresentByMetavariable(metavariable) {
234
- const judgement = this.findJudgementByMetavariable(metavariable),
234
+ isJudgementPresentByMetavariableName(metavariableName) {
235
+ const judgement = this.findJudgementByMetavariableName(metavariableName),
235
236
  judgementPresent = (judgement !== null);
236
237
 
237
238
  return judgementPresent;
package/src/context.js CHANGED
@@ -33,11 +33,25 @@ export default class Context extends ContextBase {
33
33
 
34
34
  getFrames() {
35
35
  const context = this.getContext(),
36
- frames = context.getFrames();
36
+ frames = context.getFrames();
37
37
 
38
38
  return frames;
39
39
  }
40
40
 
41
+ getStatements() {
42
+ const context = this.getContext(),
43
+ statements = context.getStatements();
44
+
45
+ return statements;
46
+ }
47
+
48
+ getReferences() {
49
+ const context = this.getContext(),
50
+ references = context.getReferences();
51
+
52
+ return references;
53
+ }
54
+
41
55
  getSubstitutions() {
42
56
  const context = this.getContext(),
43
57
  substitutions = context.getSubstitutions();
@@ -47,7 +61,7 @@ export default class Context extends ContextBase {
47
61
 
48
62
  getVariables(includeRelease) {
49
63
  const context = this.getContext(),
50
- variables = context.getVariables(includeRelease);
64
+ variables = context.getVariables(includeRelease);
51
65
 
52
66
  return variables;
53
67
  }
@@ -59,6 +73,13 @@ export default class Context extends ContextBase {
59
73
  return combinators;
60
74
  }
61
75
 
76
+ getConstrustors(includeRelease) {
77
+ const context = this.getContext(),
78
+ constructors = context.getConstrustors(includeRelease);
79
+
80
+ return constructors;
81
+ }
82
+
62
83
  getMetavariables(includeRelease) {
63
84
  const context = this.getContext(),
64
85
  metavariables = context.getMetavariables(includeRelease);
@@ -88,13 +109,6 @@ export default class Context extends ContextBase {
88
109
  return procedure;
89
110
  }
90
111
 
91
- findRuleByReference(reference) {
92
- const context = this.getContext(),
93
- rule = context.findRuleByReference(reference);
94
-
95
- return rule;
96
- }
97
-
98
112
  findFrameByFrameNode(frameNode) {
99
113
  const context = this.getContext(),
100
114
  frame = context.findFrameByFrameNode(frameNode);
@@ -116,56 +130,70 @@ export default class Context extends ContextBase {
116
130
  return reference;
117
131
  }
118
132
 
119
- findTopLevelAssertionByReference(reference) {
133
+ findVariableByVariableIdentifier(variableIdentifier) {
120
134
  const context = this.getContext(),
121
- topLevelAssertion = context.findTopLevelAssertionByReference(reference);
135
+ variable = context.findVariableByVariableIdentifier(variableIdentifier);
122
136
 
123
- return topLevelAssertion;
137
+ return variable;
124
138
  }
125
139
 
126
- findSubstitutionByVariable(variable, generalContext, specificContext) {
140
+ findSubstitutionByMetavariableName(metavariableName) {
127
141
  const context = this.getContext(),
128
- substitution = context.findSubstitutionByVariable(variable, generalContext, specificContext);
142
+ substitution = context.findSubstitutionByMetavariableName(metavariableName);
129
143
 
130
144
  return substitution;
131
145
  }
132
146
 
133
- findSubstitutionByMetavariable(metavariable, generalContet, specificContext) {
147
+ findMetavariableByMetavariableName(metavariableName) {
134
148
  const context = this.getContext(),
135
- substitution = context.findSubstitutionByMetavariable(metavariable, generalContet, specificContext);
149
+ metavariable = context.findMetavariableByMetavariableName(metavariableName);
136
150
 
137
- return substitution;
151
+ return metavariable;
138
152
  }
139
153
 
140
- findVariableByVariableIdentifier(variableIdentifier) {
154
+ findSubstitutionByVariableIdentifier(variableIdentifier) {
141
155
  const context = this.getContext(),
142
- variable = context.findVariableByVariableIdentifier(variableIdentifier);
156
+ substitution = context.findSubstitutionByVariableIdentifier(variableIdentifier);
143
157
 
144
- return variable;
158
+ return substitution;
145
159
  }
146
160
 
147
- findMetavariableByMetavariableName(metavariableName) {
161
+ findSimpleSubstitutionByMetavariableName(metavariableName) {
148
162
  const context = this.getContext(),
149
- metavariable = context.findMetavariableByMetavariableName(metavariableName);
163
+ simpleSubstitution = context.findSimpleSubstitutionByMetavariableName(metavariableName);
150
164
 
151
- return metavariable;
165
+ return simpleSubstitution;
152
166
  }
153
167
 
154
- findSimpleSubstitutionByMetavariable(metavariable) {
168
+ findComplexSubstitutionsByMetavariableName(metavariableName) {
155
169
  const context = this.getContext(),
156
- simpleSubstitution = context.findSimpleSubstitutionByMetavariable(metavariable);
170
+ complexSubstitution = context.findComplexSubstitutionsByMetavariableName(metavariableName);
157
171
 
158
- return simpleSubstitution;
172
+ return complexSubstitution;
159
173
  }
160
174
 
161
- findSubstitutionByMetavariableAndSubstitution(metavariable, substitution, generalContet, specificContext) {
175
+ findSubstitutionByMetavariableNameAndSubstitution(metavariableName, substitution) {
162
176
  const context = this.getContext();
163
177
 
164
- substitution = context.findSubstitutionByMetavariableAndSubstitution(metavariable, substitution, generalContet, specificContext); ///
178
+ substitution = context.findSubstitutionByMetavariableNameAndSubstitution(metavariableName, substitution); ///
165
179
 
166
180
  return substitution;
167
181
  }
168
182
 
183
+ findRuleByReference(reference) {
184
+ const context = this.getContext(),
185
+ rule = context.findRuleByReference(reference);
186
+
187
+ return rule;
188
+ }
189
+
190
+ findTopLevelAssertionByReference(reference) {
191
+ const context = this.getContext(),
192
+ topLevelAssertion = context.findTopLevelAssertionByReference(reference);
193
+
194
+ return topLevelAssertion;
195
+ }
196
+
169
197
  isTermPresentByTermNode(termNode) {
170
198
  const context = this.getContext(),
171
199
  termPresent = context.isTermPresentByTermNode(termNode);
@@ -173,18 +201,18 @@ export default class Context extends ContextBase {
173
201
  return termPresent;
174
202
  }
175
203
 
176
- isFramePresentByFrameNode(frameNode) {
204
+ isProcedurePresentByName(name) {
177
205
  const context = this.getContext(),
178
- framePresent = context.isFramePresentByFrameNode(frameNode);
206
+ procedurePresent = context.isProcedurePresentByName(name);
179
207
 
180
- return framePresent;
208
+ return procedurePresent;
181
209
  }
182
210
 
183
- isJudgementPresentByMetavariable(metavariable) {
211
+ isFramePresentByFrameNode(frameNode) {
184
212
  const context = this.getContext(),
185
- judgementPresent = context.isJudgementPresentByMetavariable(metavariable);
213
+ framePresent = context.isFramePresentByFrameNode(frameNode);
186
214
 
187
- return judgementPresent;
215
+ return framePresent;
188
216
  }
189
217
 
190
218
  isStatementPresentByStatementNode(statementNode) {
@@ -208,18 +236,18 @@ export default class Context extends ContextBase {
208
236
  return referencePresent;
209
237
  }
210
238
 
211
- isSubstitutionPresentBySubstitutionNode(substitutionNode) {
239
+ isJudgementPresentByMetavariableName(metavariableName) {
212
240
  const context = this.getContext(),
213
- substitutionPresent = context.isSubstitutionPresentBySubstitutionNode(substitutionNode);
241
+ judgementPresent = context.isJudgementPresentByMetavariableName(metavariableName);
214
242
 
215
- return substitutionPresent;
243
+ return judgementPresent;
216
244
  }
217
245
 
218
- isProcedurePresentByName(name) {
246
+ isSubstitutionPresentBySubstitutionNode(substitutionNode) {
219
247
  const context = this.getContext(),
220
- procedurePresent = context.isProcedurePresentByName(name);
248
+ substitutionPresent = context.isSubstitutionPresentBySubstitutionNode(substitutionNode);
221
249
 
222
- return procedurePresent;
250
+ return substitutionPresent;
223
251
  }
224
252
 
225
253
  isLabelPresentByReference(reference) {
@@ -31,6 +31,13 @@ export default define(class ContainedAssertion extends Assertion {
31
31
  return this.statement;
32
32
  }
33
33
 
34
+ getContainedAssertionNode() {
35
+ const node = this.getNode(),
36
+ containedAssertionNode = node; ///
37
+
38
+ return containedAssertionNode;
39
+ }
40
+
34
41
  validate(assignments, stated, context) {
35
42
  let validates = false;
36
43
 
@@ -26,6 +26,13 @@ export default define(class DefinedAssertion extends Assertion {
26
26
  return this.negated;
27
27
  }
28
28
 
29
+ getDefinedAssertionNode() {
30
+ const node = this.getNode(),
31
+ definedAssertionNode = node; ///
32
+
33
+ return definedAssertionNode;
34
+ }
35
+
29
36
  validate(assignments, stated, context) {
30
37
  let validates = false;
31
38
 
@@ -189,7 +196,8 @@ function validateWhenDerived(term, frame, negated, generalContext, specificConte
189
196
  const context = specificContext; ///
190
197
 
191
198
  if (term !== null) {
192
- const variable = term.getVariable(generalContext, specificContext),
199
+ const variableIdentifier = term.getVariableIdentifier(),
200
+ variable = context.findVariableByVariableIdentifier(variableIdentifier),
193
201
  variableDefined = isVariableDefined(variable, context);
194
202
 
195
203
  if (!negated && variableDefined) {
@@ -202,7 +210,8 @@ function validateWhenDerived(term, frame, negated, generalContext, specificConte
202
210
  }
203
211
 
204
212
  if (frame!== null) {
205
- const metavariable = frame.getMetavariable(generalContext, specificContext),
213
+ const metavariableName = frame.getMetavariableName(),
214
+ metavariable = context.findMetavariableByMetavariableName(metavariableName),
206
215
  metavariableDefined = isMetavariableDefined(metavariable, context);
207
216
 
208
217
  if (!negated && metavariableDefined) {
@@ -237,7 +246,8 @@ function isVariableDefined(variable, context) {
237
246
  }
238
247
 
239
248
  function isMetavariableDefined(metavariable, context) {
240
- const judgementPresent = context.isJudgementPresentByMetavariable(metavariable),
249
+ const metavariableName = metavariable.getNode(),
250
+ judgementPresent = context.isJudgementPresentByMetavariableName(metavariableName),
241
251
  metavariableDefined = judgementPresent; ///
242
252
 
243
253
  return metavariableDefined
@@ -22,6 +22,13 @@ export default define(class PropertyAssertion extends Assertion {
22
22
  return this.propertyRelation;
23
23
  }
24
24
 
25
+ getPropertyAssertionNode() {
26
+ const node = this.getNode(),
27
+ propertyAssertionNode = node; ///
28
+
29
+ return propertyAssertionNode;
30
+ }
31
+
25
32
  compareTermAndPropertyRelation(term, propertyRelation, context) {
26
33
  let comparesToTermAndPropertyRelation = false;
27
34
 
@@ -20,6 +20,13 @@ export default define(class SatisfiesAssertion extends Assertion {
20
20
  return this.reference;
21
21
  }
22
22
 
23
+ getSatisfiesAssertionNode() {
24
+ const node = this.getNode(),
25
+ satisfiesAssertionNode = node; ///
26
+
27
+ return satisfiesAssertionNode;
28
+ }
29
+
23
30
  compareSubstitutions(substitutions, context) { return this.signature.compareSubstitutions(substitutions, context); }
24
31
 
25
32
  correlateSubstitutions(substitutions, context) { return this.signature.correlateSubstitutions(substitutions, context); }
@@ -20,6 +20,13 @@ export default define(class SubproofAssertion extends Assertion {
20
20
  return this.statements;
21
21
  }
22
22
 
23
+ getSubproofAssertionNode() {
24
+ const node = this.getNode(),
25
+ subproofAssertionNode = node; ///
26
+
27
+ return subproofAssertionNode;
28
+ }
29
+
23
30
  validate(assignments, stated, context) {
24
31
  let validates = false;
25
32
 
@@ -22,6 +22,13 @@ export default define(class TypeAssertion extends Assertion {
22
22
  return this.type;
23
23
  }
24
24
 
25
+ getTypeAssertionNBode() {
26
+ const node = this.getNode(),
27
+ typeAssertionNode = node; ///
28
+
29
+ return typeAssertionNode;
30
+ }
31
+
25
32
  verify(assignments, stated, context) {
26
33
  let verifies = false;
27
34
 
@@ -33,9 +33,9 @@ export default define(class Assumption extends Element {
33
33
  context.trace(`Comparing the '${assumptionString}' assumption to the '${substitutionString}' substitution...`);
34
34
 
35
35
  const statement = substitution.getStatement(),
36
- metavariable = substitution.getMetavariable(generalContext, specificContext),
36
+ metavariableName = substitution.getMetavariableName(),
37
37
  statementEqualToStatement = this.statement.isEqualTo(statement),
38
- referenceMetavariableComparesToMetavariable = this.reference.compareMetavariable(metavariable);
38
+ referenceMetavariableComparesToMetavariable = this.reference.compareMetavariableName(metavariableName);
39
39
 
40
40
  if (statementEqualToStatement && referenceMetavariableComparesToMetavariable) {
41
41
  comparesToSubstituion = true;
@@ -5,6 +5,13 @@ import Combinator from "../combinator";
5
5
  import { define } from "../../elements";
6
6
 
7
7
  export default define(class BracketedCombinator extends Combinator {
8
+ getBracketedCombinatorNode() {
9
+ const node = this.getNode(),
10
+ bracketedCombinatorNode = node; ///
11
+
12
+ return bracketedCombinatorNode;
13
+ }
14
+
8
15
  unifyStatement(statement, assignments, stated, context) {
9
16
  let statementUnifies;
10
17
 
@@ -6,6 +6,13 @@ import Constructor from "../constructor";
6
6
  import { define } from "../../elements";
7
7
 
8
8
  export default define(class BracketedConstructor extends Constructor {
9
+ getBracketedConstructorNode() {
10
+ const node = this.getNode(),
11
+ bracketedConstructorNode = node; ///
12
+
13
+ return bracketedConstructorNode;
14
+ }
15
+
9
16
  unifyTerm(term, context, verifyForwards) {
10
17
  let termUnifies;
11
18
 
@@ -15,6 +15,13 @@ export default define(class CombinatorDeclaration extends Declaration {
15
15
  return this.combinator;
16
16
  }
17
17
 
18
+ getCombinatorDeclarationNode() {
19
+ const node = this.getNode(),
20
+ combinatorDeclarationNode = node; ///
21
+
22
+ return combinatorDeclarationNode;
23
+ }
24
+
18
25
  async verify() {
19
26
  let verifies = false;
20
27
 
@@ -20,6 +20,13 @@ export default define(class ComplexTypeDeclaration extends Declaration {
20
20
  return this.prefixed;
21
21
  }
22
22
 
23
+ getComplexTypeDeclarationNode() {
24
+ const node = this.getNode(),
25
+ complexTypeDeclarationNode = node; ///
26
+
27
+ return complexTypeDeclarationNode;
28
+ }
29
+
23
30
  verifyType() {
24
31
  let typeVerifies = false;
25
32
 
@@ -16,31 +16,11 @@ export default define(class ConstructorDeclaration extends Declaration {
16
16
  return this.constructor;
17
17
  }
18
18
 
19
- async verify() {
20
- let verifies;
21
-
22
- const context = this.getContext(),
23
- constructorDeclarationString = this.getString(); ///
24
-
25
- context.trace(`Verifying the '${constructorDeclarationString}' constructor declaration...`);
26
-
27
- const constructorTypeVerifies = this.verifyConstructorType();
28
-
29
- if (constructorTypeVerifies) {
30
- const constructorValidates = this.verifyConstructor();
31
-
32
- if (constructorValidates) {
33
- context.addConstructor(this.constructor);
19
+ getConstructorDeclarationNode() {
20
+ const node = this.getNode(),
21
+ constructorDeclarationNode = node; ///
34
22
 
35
- verifies = true;
36
- }
37
- }
38
-
39
- if (verifies) {
40
- context.debug(`...verified the '${constructorDeclarationString}' constructor declaration.`);
41
- }
42
-
43
- return verifies;
23
+ return constructorDeclarationNode;
44
24
  }
45
25
 
46
26
  verifyConstructor() {
@@ -110,5 +90,32 @@ export default define(class ConstructorDeclaration extends Declaration {
110
90
  return constructorTypeVerifies;
111
91
  }
112
92
 
93
+ async verify() {
94
+ let verifies;
95
+
96
+ const context = this.getContext(),
97
+ constructorDeclarationString = this.getString(); ///
98
+
99
+ context.trace(`Verifying the '${constructorDeclarationString}' constructor declaration...`);
100
+
101
+ const constructorTypeVerifies = this.verifyConstructorType();
102
+
103
+ if (constructorTypeVerifies) {
104
+ const constructorValidates = this.verifyConstructor();
105
+
106
+ if (constructorValidates) {
107
+ context.addConstructor(this.constructor);
108
+
109
+ verifies = true;
110
+ }
111
+ }
112
+
113
+ if (verifies) {
114
+ context.debug(`...verified the '${constructorDeclarationString}' constructor declaration.`);
115
+ }
116
+
117
+ return verifies;
118
+ }
119
+
113
120
  static name = "ConstructorDeclaration";
114
121
  });
@@ -5,21 +5,21 @@ import Declaration from "../declaration";
5
5
  import { define } from "../../elements";
6
6
 
7
7
  export default define(class MetavariableDeclaration extends Declaration {
8
- constructor(context, string, node, metavariable, metaType) {
8
+ constructor(context, string, node, metaType, metavariable) {
9
9
  super(context, string, node);
10
10
 
11
- this.metavariable = metavariable;
12
11
  this.metaType = metaType;
13
- }
14
-
15
- getMetavariable() {
16
- return this.metavariable;
12
+ this.metavariable = metavariable;
17
13
  }
18
14
 
19
15
  getMetaType() {
20
16
  return this.metaType;
21
17
  }
22
18
 
19
+ getMetavariable() {
20
+ return this.metavariable;
21
+ }
22
+
23
23
  verifyMetavariable() {
24
24
  let metavariableVerifies = false;
25
25
 
@@ -16,6 +16,13 @@ export default define(class SimpleTypeDeclaration extends Declaration {
16
16
  return this.type;
17
17
  }
18
18
 
19
+ getSimpleTypeDeclarationNode() {
20
+ const node = this.getNode(),
21
+ simpleTypeDeclarationNode = node; ///
22
+
23
+ return simpleTypeDeclarationNode;
24
+ }
25
+
19
26
  isPrefixed() {
20
27
  return this.prefixed;
21
28
  }
@@ -15,6 +15,13 @@ export default define(class TypePrefixDeclaration extends Declaration {
15
15
  return this.typePrefix;
16
16
  }
17
17
 
18
+ getTypePrefixDeclarationNode() {
19
+ const node = this.getNode(),
20
+ typePrefixDeclarationNode = node; ///
21
+
22
+ return typePrefixDeclarationNode;
23
+ }
24
+
18
25
  verifyTypePrefix() {
19
26
  let typePrefixVerifies = false;
20
27
 
@@ -5,26 +5,33 @@ import Declaration from "../declaration";
5
5
  import { define } from "../../elements";
6
6
 
7
7
  export default define(class VariableDeclaration extends Declaration {
8
- constructor(context, string, node, variable, type, provisional) {
8
+ constructor(context, string, node, type, variable, provisional) {
9
9
  super(context, string, node);
10
10
 
11
- this.variable = variable;
12
11
  this.type = type;
12
+ this.variable = variable;
13
13
  this.provisional = provisional;
14
14
  }
15
15
 
16
- getVariable() {
17
- return this.variable;
18
- }
19
-
20
16
  getType() {
21
17
  return this.type;
22
18
  }
23
19
 
20
+ getVariable() {
21
+ return this.variable;
22
+ }
23
+
24
24
  isProvisional() {
25
25
  return this.provisional;
26
26
  }
27
27
 
28
+ getVariableDeclarationNode() {
29
+ const node = this.getNode(),
30
+ typePrefixDeclarationNode = node; ///
31
+
32
+ return typePrefixDeclarationNode;
33
+ }
34
+
28
35
  verifyType() {
29
36
  let typeVerifies = false;
30
37
 
@@ -23,13 +23,6 @@ export default define(class Frame extends Element {
23
23
  return this.metavariable;
24
24
  }
25
25
 
26
- getMetavariableName() {
27
- const node = this.getNode(),
28
- metavariableName = node.getMetavariableName();
29
-
30
- return metavariableName;
31
- }
32
-
33
26
  getFrameNode() {
34
27
  const node = this.getNode(),
35
28
  frameNode = node; ///
@@ -37,26 +30,18 @@ export default define(class Frame extends Element {
37
30
  return frameNode;
38
31
  }
39
32
 
40
- compareMetavariable(metavariable) {
41
- let metavaraibleComparseTo = false;
42
-
43
- const singular = this.isSingular();
44
-
45
- if (singular) {
46
- let metavariableName;
47
-
48
- metavariableName = this.metavariable.getName();
49
-
50
- const metavariableNameA = metavariableName ///
51
-
52
- metavariableName = metavariable.getName();
33
+ getMetavariableName() {
34
+ const frameNode = this.getFrameNode(),
35
+ metavariableName = frameNode.getMetavariableName();
53
36
 
54
- const metavariableNameB = metavariableName; ///
37
+ return metavariableName;
38
+ }
55
39
 
56
- metavaraibleComparseTo = (metavariableNameA === metavariableNameB);
57
- }
40
+ getMetavariableNode() {
41
+ const frameNode = this.getFrameNode(),
42
+ metavariableNode = frameNode.getMetavariableNode();
58
43
 
59
- return metavaraibleComparseTo;
44
+ return metavariableNode;
60
45
  }
61
46
 
62
47
  matchFrameNode(frameNode) {
@@ -88,13 +73,30 @@ export default define(class Frame extends Element {
88
73
  }
89
74
 
90
75
  isSingular() {
91
- const node = this.getNode(),
92
- frameNode = node, ///
76
+ const frameNode = this.getFrameNode(),
93
77
  singular = frameNode.isSingular();
94
78
 
95
79
  return singular;
96
80
  }
97
81
 
82
+ matchMetavariableName(metavariableName) {
83
+ let metavariableNameMatches = false;
84
+
85
+ const singular = this.isSingular();
86
+
87
+ if (singular) {
88
+ const metavariableNameA = metavariableName ///
89
+
90
+ metavariableName = this.getMetavariableName();
91
+
92
+ const metavariableNameB = metavariableName; ///
93
+
94
+ metavariableNameMatches = (metavariableNameA === metavariableNameB);
95
+ }
96
+
97
+ return metavariableNameMatches;
98
+ }
99
+
98
100
  compareParameter(parameter) {
99
101
  let comparesToParamter = false;
100
102