occam-verify-cli 1.0.220 → 1.0.224

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 (161) hide show
  1. package/lib/context/file.js +19 -19
  2. package/lib/context/local.js +5 -43
  3. package/lib/context/release.js +11 -11
  4. package/lib/dom/assertion/contained.js +44 -44
  5. package/lib/dom/assertion/defined.js +40 -40
  6. package/lib/dom/assertion/property.js +37 -35
  7. package/lib/dom/assertion/satisfies.js +26 -25
  8. package/lib/dom/assertion/subproof.js +16 -16
  9. package/lib/dom/assertion/type.js +34 -32
  10. package/lib/dom/axiom.js +52 -52
  11. package/lib/dom/combinator/bracketed.js +5 -5
  12. package/lib/dom/combinator.js +6 -6
  13. package/lib/dom/conclusion.js +10 -10
  14. package/lib/dom/conjecture.js +5 -5
  15. package/lib/dom/constructor/bracketed.js +12 -12
  16. package/lib/dom/constructor.js +9 -9
  17. package/lib/dom/declaration/combinator.js +11 -11
  18. package/lib/dom/declaration/complexType.js +133 -63
  19. package/lib/dom/declaration/constructor.js +17 -17
  20. package/lib/dom/declaration/metavariable.js +17 -17
  21. package/lib/dom/declaration/simpleType.js +229 -0
  22. package/lib/dom/declaration/variable.js +17 -17
  23. package/lib/dom/declaration.js +54 -52
  24. package/lib/dom/deduction.js +15 -15
  25. package/lib/dom/derivation.js +8 -8
  26. package/lib/dom/equality.js +49 -34
  27. package/lib/dom/error.js +3 -3
  28. package/lib/dom/frame.js +38 -38
  29. package/lib/dom/judgement.js +31 -29
  30. package/lib/dom/label.js +5 -5
  31. package/lib/dom/lemma.js +5 -5
  32. package/lib/dom/metaLemma.js +5 -5
  33. package/lib/dom/metatheorem.js +5 -5
  34. package/lib/dom/metavariable.js +55 -55
  35. package/lib/dom/premise.js +36 -34
  36. package/lib/dom/procedureCall.js +9 -9
  37. package/lib/dom/proof.js +6 -6
  38. package/lib/dom/propertyRelation.js +18 -18
  39. package/lib/dom/reference.js +28 -28
  40. package/lib/dom/rule.js +63 -48
  41. package/lib/dom/signature.js +17 -17
  42. package/lib/dom/statement.js +36 -36
  43. package/lib/dom/step.js +32 -35
  44. package/lib/dom/subDerivation.js +8 -8
  45. package/lib/dom/subproof.js +27 -30
  46. package/lib/dom/substitution/statement.js +7 -7
  47. package/lib/dom/substitution/term.js +2 -16
  48. package/lib/dom/substitution.js +1 -15
  49. package/lib/dom/supposition.js +39 -39
  50. package/lib/dom/term.js +15 -15
  51. package/lib/dom/theorem.js +5 -5
  52. package/lib/dom/topLevelAssertion.js +60 -71
  53. package/lib/dom/topLevelMetaAssertion.js +28 -20
  54. package/lib/dom/type.js +18 -24
  55. package/lib/dom/variable.js +16 -16
  56. package/lib/equivalence.js +54 -33
  57. package/lib/equivalences.js +57 -101
  58. package/lib/index.js +2 -2
  59. package/lib/mixins/statement/verify.js +52 -52
  60. package/lib/mixins/step/unify.js +79 -61
  61. package/lib/mixins/term/verify.js +17 -17
  62. package/lib/substitutions.js +7 -7
  63. package/lib/unifier/equantional.js +170 -0
  64. package/lib/unifier/intrinsicLevel.js +8 -8
  65. package/lib/unifier/metaLevel.js +21 -21
  66. package/lib/unifier/metavariable.js +9 -9
  67. package/lib/unifier/statementWithCombinator.js +18 -18
  68. package/lib/unifier/termWithConstructor.js +10 -10
  69. package/lib/unifier.js +41 -41
  70. package/lib/utilities/brackets.js +2 -2
  71. package/lib/utilities/release.js +18 -17
  72. package/lib/utilities/subproof.js +2 -2
  73. package/lib/utilities/type.js +2 -2
  74. package/lib/utilities/unification.js +28 -34
  75. package/lib/verifier/combinator.js +14 -14
  76. package/lib/verifier/constructor.js +18 -18
  77. package/lib/verifier/topLevel.js +38 -38
  78. package/lib/verifier.js +30 -30
  79. package/package.json +1 -1
  80. package/src/context/file.js +18 -18
  81. package/src/context/local.js +5 -48
  82. package/src/context/release.js +11 -11
  83. package/src/dom/assertion/contained.js +46 -46
  84. package/src/dom/assertion/defined.js +41 -41
  85. package/src/dom/assertion/property.js +37 -35
  86. package/src/dom/assertion/satisfies.js +26 -25
  87. package/src/dom/assertion/subproof.js +15 -15
  88. package/src/dom/assertion/type.js +34 -32
  89. package/src/dom/axiom.js +56 -54
  90. package/src/dom/combinator/bracketed.js +4 -4
  91. package/src/dom/combinator.js +5 -5
  92. package/src/dom/conclusion.js +9 -9
  93. package/src/dom/conjecture.js +4 -4
  94. package/src/dom/constructor/bracketed.js +11 -11
  95. package/src/dom/constructor.js +8 -8
  96. package/src/dom/declaration/combinator.js +10 -10
  97. package/src/dom/declaration/complexType.js +129 -64
  98. package/src/dom/declaration/constructor.js +16 -16
  99. package/src/dom/declaration/metavariable.js +16 -16
  100. package/src/dom/declaration/simpleType.js +179 -0
  101. package/src/dom/declaration/variable.js +16 -16
  102. package/src/dom/declaration.js +54 -52
  103. package/src/dom/deduction.js +14 -14
  104. package/src/dom/derivation.js +7 -7
  105. package/src/dom/equality.js +55 -38
  106. package/src/dom/error.js +2 -2
  107. package/src/dom/frame.js +38 -38
  108. package/src/dom/judgement.js +31 -29
  109. package/src/dom/label.js +4 -4
  110. package/src/dom/lemma.js +4 -4
  111. package/src/dom/metaLemma.js +4 -4
  112. package/src/dom/metatheorem.js +4 -4
  113. package/src/dom/metavariable.js +54 -54
  114. package/src/dom/premise.js +35 -33
  115. package/src/dom/procedureCall.js +8 -8
  116. package/src/dom/proof.js +5 -5
  117. package/src/dom/propertyRelation.js +17 -17
  118. package/src/dom/reference.js +27 -27
  119. package/src/dom/rule.js +72 -49
  120. package/src/dom/signature.js +15 -15
  121. package/src/dom/statement.js +34 -34
  122. package/src/dom/step.js +42 -48
  123. package/src/dom/subDerivation.js +7 -7
  124. package/src/dom/subproof.js +30 -40
  125. package/src/dom/substitution/statement.js +6 -6
  126. package/src/dom/substitution/term.js +1 -19
  127. package/src/dom/substitution.js +0 -13
  128. package/src/dom/supposition.js +38 -38
  129. package/src/dom/term.js +14 -14
  130. package/src/dom/theorem.js +4 -4
  131. package/src/dom/topLevelAssertion.js +62 -81
  132. package/src/dom/topLevelMetaAssertion.js +35 -20
  133. package/src/dom/type.js +23 -33
  134. package/src/dom/variable.js +16 -15
  135. package/src/equivalence.js +69 -46
  136. package/src/equivalences.js +53 -115
  137. package/src/index.js +1 -1
  138. package/src/mixins/statement/verify.js +51 -51
  139. package/src/mixins/step/unify.js +88 -67
  140. package/src/mixins/term/verify.js +16 -16
  141. package/src/substitutions.js +5 -6
  142. package/src/unifier/equantional.js +90 -0
  143. package/src/unifier/intrinsicLevel.js +7 -7
  144. package/src/unifier/metaLevel.js +20 -21
  145. package/src/unifier/metavariable.js +8 -8
  146. package/src/unifier/statementWithCombinator.js +17 -17
  147. package/src/unifier/termWithConstructor.js +9 -9
  148. package/src/unifier.js +40 -40
  149. package/src/utilities/brackets.js +1 -1
  150. package/src/utilities/release.js +18 -18
  151. package/src/utilities/subproof.js +1 -1
  152. package/src/utilities/type.js +1 -1
  153. package/src/utilities/unification.js +27 -37
  154. package/src/verifier/combinator.js +13 -13
  155. package/src/verifier/constructor.js +17 -17
  156. package/src/verifier/topLevel.js +41 -41
  157. package/src/verifier.js +29 -29
  158. package/lib/dom/declaration/type.js +0 -209
  159. package/lib/unifier/equality.js +0 -155
  160. package/src/dom/declaration/type.js +0 -150
  161. package/src/unifier/equality.js +0 -70
@@ -20,7 +20,7 @@ export default domAssigned(class Conclusion {
20
20
  }
21
21
 
22
22
  verify(context) {
23
- let verified = false;
23
+ let verifies = false;
24
24
 
25
25
  const conclusionString = this.string; ///
26
26
 
@@ -29,23 +29,23 @@ export default domAssigned(class Conclusion {
29
29
  if (this.statement !== null) {
30
30
  const stated = true,
31
31
  assignments = null,
32
- statementVerified = this.statement.verify(assignments, stated, context);
32
+ statementVerifies = this.statement.verify(assignments, stated, context);
33
33
 
34
- verified = statementVerified; ///
34
+ verifies = statementVerifies; ///
35
35
 
36
36
  } else {
37
37
  context.debug(`Unable to verify the '${conclusionString}' conclusion because it is nonsense.`);
38
38
  }
39
39
 
40
- if (verified) {
40
+ if (verifies) {
41
41
  context.debug(`...verified the '${conclusionString}' conclusion.`);
42
42
  }
43
43
 
44
- return verified;
44
+ return verifies;
45
45
  }
46
46
 
47
47
  unifyStatement(statement, substitutions, generalContext, specificContext) {
48
- let statementUnified;
48
+ let statementUnifies;
49
49
 
50
50
  const conclusion = this, ///
51
51
  statementString = statement.getString(),
@@ -53,13 +53,13 @@ export default domAssigned(class Conclusion {
53
53
 
54
54
  specificContext.trace(`Unifying the '${statementString}' statement with the '${conclusionString}' conclusion...`);
55
55
 
56
- statementUnified = this.statement.unifyStatement(statement, substitutions, generalContext, specificContext);
56
+ statementUnifies = this.statement.unifyStatement(statement, substitutions, generalContext, specificContext);
57
57
 
58
- if (statementUnified) {
58
+ if (statementUnifies) {
59
59
  specificContext.debug(`...unified the '${statementString}' statement with the '${conclusionString}' conclusion.`);
60
60
  }
61
61
 
62
- return statementUnified;
62
+ return statementUnifies;
63
63
  }
64
64
 
65
65
  toJSON() {
@@ -6,7 +6,7 @@ import { domAssigned } from "../dom";
6
6
 
7
7
  export default domAssigned(class Conjecture extends TopLevelAssertion {
8
8
  verify() {
9
- let verified;
9
+ let verifies;
10
10
 
11
11
  const conjecture = this, ///
12
12
  fileContext = this.getFileContext(),
@@ -14,9 +14,9 @@ export default domAssigned(class Conjecture extends TopLevelAssertion {
14
14
 
15
15
  fileContext.trace(`Verifying the '${conjectureString}' conjecture...`);
16
16
 
17
- verified = super.verify();
17
+ verifies = super.verify();
18
18
 
19
- if (verified) {
19
+ if (verifies) {
20
20
  const conjecture = this; ///
21
21
 
22
22
  fileContext.addConjecture(conjecture);
@@ -24,7 +24,7 @@ export default domAssigned(class Conjecture extends TopLevelAssertion {
24
24
  fileContext.debug(`...verified the '${conjectureString}' conjecture.`);
25
25
  }
26
26
 
27
- return verified;
27
+ return verifies;
28
28
  }
29
29
 
30
30
  static name = "Conjecture";
@@ -8,14 +8,14 @@ import { domAssigned } from "../../dom";
8
8
 
9
9
  export default domAssigned(class BracketedConstructor extends Constructor {
10
10
  unifyTerm(term, context, verifyAhead) {
11
- let termUnified;
11
+ let termUnifies;
12
12
 
13
13
  const termString = term.getString();
14
14
 
15
15
  context.trace(`Unifying the '${termString}' term with the bracketed constructor...`, term);
16
16
 
17
- termUnified = super.unifyTerm(term, context, () => {
18
- let verifiedAhead = false;
17
+ termUnifies = super.unifyTerm(term, context, () => {
18
+ let verifiesAhead = false;
19
19
 
20
20
  const { Term } = dom,
21
21
  bracketedTerm = term, ///
@@ -27,29 +27,29 @@ export default domAssigned(class BracketedConstructor extends Constructor {
27
27
 
28
28
  term = Term.fromTermNode(termNode, context);
29
29
 
30
- const termVVerified = term.verify(context, () => {
31
- let verifiedAhead;
30
+ const termVVerifies = term.verify(context, () => {
31
+ let verifiesAhead;
32
32
 
33
33
  const type = term.getType();
34
34
 
35
35
  bracketedTerm.setType(type);
36
36
 
37
- verifiedAhead = verifyAhead();
37
+ verifiesAhead = verifyAhead();
38
38
 
39
- return verifiedAhead;
39
+ return verifiesAhead;
40
40
  });
41
41
 
42
- verifiedAhead = termVVerified; ///
42
+ verifiesAhead = termVVerifies; ///
43
43
  }
44
44
 
45
- return verifiedAhead;
45
+ return verifiesAhead;
46
46
  });
47
47
 
48
- if (termUnified) {
48
+ if (termUnifies) {
49
49
  context.debug(`...unified the '${termString}' term with the bracketed constructor.`, term);
50
50
  }
51
51
 
52
- return termUnified;
52
+ return termUnifies;
53
53
  }
54
54
 
55
55
  static fromNothing() {
@@ -28,7 +28,7 @@ export default domAssigned(class Constructor {
28
28
  setType(type) { this.term.setType(type); }
29
29
 
30
30
  unifyTerm(term, context, verifyAhead) {
31
- let termUnified = false;
31
+ let termUnifies = false;
32
32
 
33
33
  const constructor = this, ///
34
34
  termString = term.getString(),
@@ -36,25 +36,25 @@ export default domAssigned(class Constructor {
36
36
 
37
37
  context.trace(`Unifying the '${termString}' term with the '${constructorString}' constructor...`, term);
38
38
 
39
- const termUnifiedWithConstructor = unifyTermWithConstructor(term, constructor, context);
39
+ const termUnifiesWithConstructor = unifyTermWithConstructor(term, constructor, context);
40
40
 
41
- if (termUnifiedWithConstructor) {
42
- let verifiedAhead;
41
+ if (termUnifiesWithConstructor) {
42
+ let verifiesAhead;
43
43
 
44
44
  const type = constructor.getType();
45
45
 
46
46
  term.setType(type);
47
47
 
48
- verifiedAhead = verifyAhead();
48
+ verifiesAhead = verifyAhead();
49
49
 
50
- termUnified = verifiedAhead; ///
50
+ termUnifies = verifiesAhead; ///
51
51
  }
52
52
 
53
- if (termUnified) {
53
+ if (termUnifies) {
54
54
  context.debug(`...unified the '${termString}' term with the '${constructorString}' constructor.`, term);
55
55
  }
56
56
 
57
- return termUnified;
57
+ return termUnifies;
58
58
  }
59
59
 
60
60
  toJSON() {
@@ -26,29 +26,29 @@ export default domAssigned(class CombinatorDeclaration {
26
26
  }
27
27
 
28
28
  verify() {
29
- let verified = false;
29
+ let verifies = false;
30
30
 
31
31
  const combinatorDeclarationString = this.getString(); ///
32
32
 
33
33
  this.fileContext.trace(`Verifying the '${combinatorDeclarationString}' combinator declaration...`);
34
34
 
35
- const combinatorVerified = this.verifyCombinator();
35
+ const combinatorVerifies = this.verifyCombinator();
36
36
 
37
- if (combinatorVerified) {
37
+ if (combinatorVerifies) {
38
38
  this.fileContext.addCombinator(this.combinator);
39
39
 
40
- verified = true;
40
+ verifies = true;
41
41
  }
42
42
 
43
- if (verified) {
43
+ if (verifies) {
44
44
  this.fileContext.debug(`...verified the '${combinatorDeclarationString}' combinator declaration.`);
45
45
  }
46
46
 
47
- return verified;
47
+ return verifies;
48
48
  }
49
49
 
50
50
  verifyCombinator() {
51
- let statementVerified;
51
+ let statementVerifies;
52
52
 
53
53
  const combinatorString = this.combinator.getString();
54
54
 
@@ -57,13 +57,13 @@ export default domAssigned(class CombinatorDeclaration {
57
57
  const statement = this.combinator.getStatement(),
58
58
  statementNode = statement.getNode();
59
59
 
60
- statementVerified = combinatorVerifier.verifyStatement(statementNode, this.fileContext);
60
+ statementVerifies = combinatorVerifier.verifyStatement(statementNode, this.fileContext);
61
61
 
62
- if (statementVerified) {
62
+ if (statementVerifies) {
63
63
  this.fileContext.debug(`...verified the '${combinatorString}' combinator.`);
64
64
  }
65
65
 
66
- return statementVerified;
66
+ return statementVerifies;
67
67
  }
68
68
 
69
69
  static name = "CombinatorDeclaration";
@@ -2,8 +2,9 @@
2
2
 
3
3
  import dom from "../../dom";
4
4
 
5
+ import { objectType } from "../type";
5
6
  import { domAssigned } from "../../dom";
6
- import { superTypesStringFromSuperTypes, stringFromTypeNameNameAndSuperTypes } from "../../utilities/type";
7
+ import { stringFromTypeNameNameAndSuperTypes } from "../../utilities/type";
7
8
 
8
9
  export default domAssigned(class ComplexTypeDeclaration {
9
10
  constructor(fileContext, string, type) {
@@ -24,61 +25,84 @@ export default domAssigned(class ComplexTypeDeclaration {
24
25
  return this.type;
25
26
  }
26
27
 
28
+ getReleaseContext() { return this.fileContext.getReleaseContext(); }
29
+
30
+ getReleaseTypes() {
31
+ const includeDependencies = false,
32
+ includeRelease = false,
33
+ releaseContext = this.getReleaseContext(),
34
+ fileContextTypes = this.fileContext.getTypes(includeRelease),
35
+ releaseContextTypes = releaseContext.getTypes(includeDependencies),
36
+ releaseTypes = [
37
+ ...fileContextTypes,
38
+ ...releaseContextTypes
39
+ ];
40
+
41
+ return releaseTypes;
42
+ }
43
+
27
44
  verify() {
28
- let verified = false;
45
+ let verifies = false;
29
46
 
30
47
  const complexTypeDeclarationString = this.getString();
31
48
 
32
49
  this.fileContext.trace(`Verifying the '${complexTypeDeclarationString}' complex type declaration...`);
33
50
 
34
- const typeVerified = this.verifyType();
51
+ const typeVerifies = this.verifyType();
35
52
 
36
- if (typeVerified) {
37
- const superTypesVerified = this.verifySuperTypes();
53
+ if (typeVerifies) {
54
+ const superTypesVerify = this.verifySuperTypes();
38
55
 
39
- if (superTypesVerified) {
40
- const propertiesVerified = this.verifyProperties();
56
+ if (superTypesVerify) {
57
+ const propertiesVerify = this.verifyProperties();
41
58
 
42
- if (propertiesVerified) {
59
+ if (propertiesVerify) {
43
60
  this.fileContext.addType(this.type);
44
61
 
45
- verified = true;
62
+ verifies = true;
46
63
  }
47
64
  }
48
65
  }
49
66
 
50
- if (verified) {
67
+ if (verifies) {
51
68
  this.fileContext.debug(`...verified the '${complexTypeDeclarationString}' complex type declaration.`);
52
69
  }
53
70
 
54
- return verified;
71
+ return verifies;
55
72
  }
56
73
 
57
74
  verifyType() {
58
- let typeVerified = false;
75
+ let typeVerifies = false;
59
76
 
60
- const typeName = this.type.getName(),
61
- complexTypeString = this.type.getString();
77
+ const complexTypeString = this.type.getString();
62
78
 
63
79
  this.fileContext.trace(`Verifying the '${complexTypeString}' complex type...`);
64
80
 
65
- const typePresent = this.fileContext.isTypePresentByTypeName(typeName);
81
+ const typeName = this.type.getName(),
82
+ releaseTypes = this.getReleaseTypes(),
83
+ typePresent = releaseTypes.some((releaseType) => {
84
+ const releaseTypeNameMatches = releaseType.matchTypeName(typeName);
85
+
86
+ if (releaseTypeNameMatches) {
87
+ return true;
88
+ }
89
+ });
66
90
 
67
91
  if (typePresent) {
68
- this.fileContext.debug(`The type '${complexTypeString}' is already present.`);
92
+ this.fileContext.debug(`The type '${complexTypeString}' is already present in the package.`);
69
93
  } else {
70
- typeVerified = true;
94
+ typeVerifies = true;
71
95
  }
72
96
 
73
- if (typeVerified) {
97
+ if (typeVerifies) {
74
98
  this.fileContext.debug(`...verified the '${complexTypeString}' complex type.`);
75
99
  }
76
100
 
77
- return typeVerified;
101
+ return typeVerifies;
78
102
  }
79
103
 
80
104
  verifySuperType(superType) {
81
- let superTypeVerified;
105
+ let superTypeVerifies = false;
82
106
 
83
107
  const superTypeString = superType.getString();
84
108
 
@@ -87,59 +111,100 @@ export default domAssigned(class ComplexTypeDeclaration {
87
111
  const superTypeName = superType.getName(),
88
112
  superTypePresent = this.fileContext.isTypePresentByTypeName(superTypeName);
89
113
 
90
- superTypeVerified = superTypePresent; ///
114
+ if (superTypePresent) {
115
+ superTypeVerifies = true;
116
+ }
91
117
 
92
- if (superTypeVerified) {
118
+ if (superTypeVerifies) {
93
119
  this.fileContext.debug(`...verified the '${superTypeString}' super-type.`);
94
120
  }
95
121
 
96
- return superTypeVerified;
122
+ return superTypeVerifies;
97
123
  }
98
124
 
99
125
  verifySuperTypes() {
100
- let superTypesVerified;
126
+ let superTypesVerify = false;
127
+
128
+ this.fileContext.trace(`Verifying the super-types...`);
129
+
130
+ let superTypes;
131
+
132
+ superTypes = this.type.getSuperTypes();
133
+
134
+ const typeName = this.type.getName(),
135
+ superTypesLength = superTypes.length;
136
+
137
+ if (superTypesLength === 0) {
138
+ const type = this.fileContext.findTypeByTypeName(typeName);
101
139
 
102
- const typeBasic = this.type.isBasic();
140
+ if (type === null) {
141
+ const superType = objectType; ///
142
+
143
+ superTypes.push(superType);
144
+ }
145
+ }
146
+
147
+ const typeBasic = this.type.isBasic(),
148
+ typeString = this.type.getString();
103
149
 
104
150
  if (typeBasic) {
105
- superTypesVerified = true;
151
+ superTypesVerify = true;
152
+
153
+ this.fileContext.trace(`The '${typeString}' type is basic.`)
106
154
  } else {
107
- let superTypes;
155
+ const superTypeNames = superTypes.map((superType) => {
156
+ const superTypeName = superType.getName();
108
157
 
109
- superTypes = this.type.getSuperTypes();
158
+ return superTypeName;
159
+ }),
160
+ superTypeNamesIncludesTypeName = superTypeNames.includes(typeName);
110
161
 
111
- const superTypesString = superTypesStringFromSuperTypes(superTypes);
162
+ if (superTypeNamesIncludesTypeName) {
163
+ this.fileContext.trace(`The '${typeName}' type cannot be a super-type `);
164
+ } else {
165
+ if (superTypesLength === 0) {
166
+ const type = this.fileContext.findTypeByTypeName(typeName),
167
+ superType = type; ///
112
168
 
113
- this.fileContext.trace(`Verifying the '${superTypesString} super-types...`);
169
+ superTypes.push(superType);
170
+ }
114
171
 
115
- superTypesVerified = superTypes.every((superType) => {
116
- const superTypeVerified = this.verifySuperType(superType);
172
+ superTypesVerify = superTypes.every((superType) => {
173
+ const superTypeVerifies = this.verifySuperType(superType);
117
174
 
118
- if (superTypeVerified) {
119
- return true;
120
- }
121
- });
175
+ if (superTypeVerifies) {
176
+ return true;
177
+ }
178
+ });
122
179
 
123
- if (superTypesVerified) {
124
- superTypes = superTypes.map((superType) => {
125
- const superTypeName = superType.getName();
180
+ if (superTypesVerify) {
181
+ superTypes = superTypes.map((superType) => {
182
+ const superTypeName = superType.getName();
126
183
 
127
- superType = this.fileContext.findTypeByTypeName(superTypeName);
184
+ superType = this.fileContext.findTypeByTypeName(superTypeName);
128
185
 
129
- return superType;
130
- });
186
+ return superType;
187
+ });
188
+
189
+ const typeName = this.type.getName(),
190
+ string = stringFromTypeNameNameAndSuperTypes(typeName, superTypes);
131
191
 
132
- this.type.setSuperTypes(superTypes);
192
+ this.type.setString(string);
133
193
 
134
- this.fileContext.debug(`...verified the' '${superTypesString} super-types.`);
194
+ this.type.setSuperTypes(superTypes);
195
+ }
135
196
  }
136
197
  }
137
198
 
138
- return superTypesVerified;
199
+ if (superTypesVerify) {
200
+ this.fileContext.debug(`...verified the super-types.`);
201
+ }
202
+
203
+ return superTypesVerify;
139
204
  }
140
205
 
141
206
  verifyProperty(property, properties, superTypeProperties) {
142
- let propertyVerified = false;
207
+ let propertyVerifies = false;
143
208
 
144
209
  const propertyString = property.getString();
145
210
 
@@ -176,9 +241,9 @@ export default domAssigned(class ComplexTypeDeclaration {
176
241
 
177
242
  propertyType = property.getType();
178
243
 
179
- const propertyTypeVerified = this.verifyPropertyType(propertyType);
244
+ const propertyTypeVerifies = this.verifyPropertyType(propertyType);
180
245
 
181
- if (propertyTypeVerified) {
246
+ if (propertyTypeVerifies) {
182
247
  const propertyTypeName = propertyType.getName();
183
248
 
184
249
  propertyType = this.fileContext.findTypeByTypeName(propertyTypeName);
@@ -187,50 +252,50 @@ export default domAssigned(class ComplexTypeDeclaration {
187
252
 
188
253
  property.setType(type);
189
254
 
190
- propertyVerified = true;
255
+ propertyVerifies = true;
191
256
  }
192
257
  }
193
258
  }
194
259
 
195
- if (propertyVerified) {
196
- this.fileContext.debug(`verified the '${propertyString}' property.`);
260
+ if (propertyVerifies) {
261
+ this.fileContext.debug(`verifies the '${propertyString}' property.`);
197
262
  }
198
263
 
199
- return propertyVerified;
264
+ return propertyVerifies;
200
265
  }
201
266
 
202
267
  verifyProperties() {
203
- let propertiesVerified;
268
+ let propertiesVerify;
204
269
 
205
270
  const includeSuperTypes = false,
206
271
  properties = this.type.getProperties(includeSuperTypes),
207
272
  superTypes = this.type.getSuperTypes()
208
273
 
209
- propertiesVerified = superTypes.every((superType) => {
274
+ propertiesVerify = superTypes.every((superType) => {
210
275
  const superTypeProperties = superType.getProperties(),
211
- propertiesVerified = properties.every((property) => {
212
- const propertyVerified = this.verifyProperty(property, properties, superTypeProperties);
276
+ propertiesVerify = properties.every((property) => {
277
+ const propertyVerifies = this.verifyProperty(property, properties, superTypeProperties);
213
278
 
214
- if (propertyVerified) {
279
+ if (propertyVerifies) {
215
280
  return true;
216
281
  }
217
282
  });
218
283
 
219
- if (propertiesVerified) {
284
+ if (propertiesVerify) {
220
285
  return true;
221
286
  }
222
287
  });
223
288
 
224
- return propertiesVerified;
289
+ return propertiesVerify;
225
290
  }
226
291
 
227
292
  verifyPropertyType(propertyType) {
228
- let propertyTypeVerified = false;
293
+ let propertyTypeVerifies = false;
229
294
 
230
295
  const typeEqualToPropertyType = this.type.isEqualTo(propertyType);
231
296
 
232
297
  if (typeEqualToPropertyType) {
233
- propertyTypeVerified = true;
298
+ propertyTypeVerifies = true;
234
299
  } else {
235
300
  const propertyTypeString = propertyType.getString(); ///
236
301
 
@@ -244,15 +309,15 @@ export default domAssigned(class ComplexTypeDeclaration {
244
309
 
245
310
  this.fileContext.debug(`The '${propertyTypeString}' property type is not present.`);
246
311
  } else {
247
- propertyTypeVerified = true;
312
+ propertyTypeVerifies = true;
248
313
  }
249
314
 
250
- if (propertyTypeVerified) {
315
+ if (propertyTypeVerifies) {
251
316
  this.fileContext.debug(`...verified the '${propertyTypeString}' property type.`);
252
317
  }
253
318
  }
254
319
 
255
- return propertyTypeVerified;
320
+ return propertyTypeVerifies;
256
321
  }
257
322
 
258
323
  static name = "ComplexTypeDeclaration";
@@ -26,33 +26,33 @@ export default domAssigned(class ConstructorDeclaration {
26
26
  }
27
27
 
28
28
  verify() {
29
- let verified;
29
+ let verifies;
30
30
 
31
31
  const constructorDeclarationString = this.getString(); ///
32
32
 
33
33
  this.fileContext.trace(`Verifying the '${constructorDeclarationString}' constructor declaration...`);
34
34
 
35
- const constructorTypeVerified = this.verifyConstructorType();
35
+ const constructorTypeVerifies = this.verifyConstructorType();
36
36
 
37
- if (constructorTypeVerified) {
38
- const constructorVerified = this.verifyConstructor();
37
+ if (constructorTypeVerifies) {
38
+ const constructorVerifies = this.verifyConstructor();
39
39
 
40
- if (constructorVerified) {
40
+ if (constructorVerifies) {
41
41
  this.fileContext.addConstructor(this.constructor);
42
42
 
43
- verified = true;
43
+ verifies = true;
44
44
  }
45
45
  }
46
46
 
47
- if (verified) {
47
+ if (verifies) {
48
48
  this.fileContext.debug(`...verified the '${constructorDeclarationString}' constructor declaration.`);
49
49
  }
50
50
 
51
- return verified;
51
+ return verifies;
52
52
  }
53
53
 
54
54
  verifyConstructor() {
55
- let constructorVerified;
55
+ let constructorVerifies;
56
56
 
57
57
  const constructorString = this.constructor.getString();
58
58
 
@@ -61,17 +61,17 @@ export default domAssigned(class ConstructorDeclaration {
61
61
  const term = this.constructor.getTerm(),
62
62
  termNode = term.getNode();
63
63
 
64
- constructorVerified = constructorVerifier.verifyTerm(termNode, this.fileContext);
64
+ constructorVerifies = constructorVerifier.verifyTerm(termNode, this.fileContext);
65
65
 
66
- if (constructorVerified) {
66
+ if (constructorVerifies) {
67
67
  this.fileContext.debug(`...verified the '${constructorString}' constructor.`);
68
68
  }
69
69
 
70
- return constructorVerified;
70
+ return constructorVerifies;
71
71
  }
72
72
 
73
73
  verifyConstructorType() {
74
- let constructorTypeVerified = false;
74
+ let constructorTypeVerifies = false;
75
75
 
76
76
  let type;
77
77
 
@@ -101,15 +101,15 @@ export default domAssigned(class ConstructorDeclaration {
101
101
  } else {
102
102
  this.constructor.setType(type);
103
103
 
104
- constructorTypeVerified = true;
104
+ constructorTypeVerifies = true;
105
105
  }
106
106
  }
107
107
 
108
- if (constructorTypeVerified) {
108
+ if (constructorTypeVerifies) {
109
109
  this.fileContext.debug(`...verified the '${typeString}' type.`);
110
110
  }
111
111
 
112
- return constructorTypeVerified;
112
+ return constructorTypeVerifies;
113
113
  }
114
114
 
115
115
  static name = "ConstructorDeclaration";