occam-verify-cli 1.0.708 → 1.0.714

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 (57) hide show
  1. package/lib/element/assertion/property.js +8 -5
  2. package/lib/element/assertion/satisfies.js +13 -12
  3. package/lib/element/assumption.js +3 -3
  4. package/lib/element/combinator.js +20 -20
  5. package/lib/element/conclusion.js +8 -8
  6. package/lib/element/constructor.js +21 -21
  7. package/lib/element/declaration/combinator.js +10 -10
  8. package/lib/element/declaration/constructor.js +10 -10
  9. package/lib/element/deduction.js +10 -10
  10. package/lib/element/frame.js +19 -7
  11. package/lib/element/metavariable.js +1 -1
  12. package/lib/element/proofAssertion/premise.js +29 -24
  13. package/lib/element/proofAssertion/step.js +15 -14
  14. package/lib/element/proofAssertion/supposition.js +30 -25
  15. package/lib/element/reference.js +4 -7
  16. package/lib/element/rule.js +2 -2
  17. package/lib/element/signature.js +7 -7
  18. package/lib/element/statement.js +5 -3
  19. package/lib/element/subproof.js +2 -2
  20. package/lib/element/term.js +8 -9
  21. package/lib/element/topLevelAssertion/axiom.js +19 -19
  22. package/lib/pass/zip.js +23 -0
  23. package/lib/process/unify.js +11 -21
  24. package/lib/process/validate.js +116 -2
  25. package/lib/process/verify.js +6 -125
  26. package/lib/utilities/context.js +1 -9
  27. package/lib/utilities/unification.js +2 -11
  28. package/lib/utilities/validation.js +6 -6
  29. package/package.json +1 -1
  30. package/src/element/assertion/property.js +8 -4
  31. package/src/element/assertion/satisfies.js +10 -10
  32. package/src/element/assumption.js +2 -2
  33. package/src/element/combinator.js +19 -19
  34. package/src/element/conclusion.js +8 -8
  35. package/src/element/constructor.js +21 -20
  36. package/src/element/declaration/combinator.js +9 -9
  37. package/src/element/declaration/constructor.js +9 -9
  38. package/src/element/deduction.js +10 -10
  39. package/src/element/frame.js +26 -7
  40. package/src/element/metavariable.js +0 -1
  41. package/src/element/proofAssertion/premise.js +43 -33
  42. package/src/element/proofAssertion/step.js +17 -16
  43. package/src/element/proofAssertion/supposition.js +44 -34
  44. package/src/element/reference.js +6 -11
  45. package/src/element/rule.js +1 -1
  46. package/src/element/signature.js +6 -6
  47. package/src/element/statement.js +4 -2
  48. package/src/element/subproof.js +1 -2
  49. package/src/element/term.js +9 -10
  50. package/src/element/topLevelAssertion/axiom.js +18 -18
  51. package/src/pass/zip.js +19 -0
  52. package/src/process/unify.js +4 -34
  53. package/src/process/validate.js +161 -1
  54. package/src/process/verify.js +2 -166
  55. package/src/utilities/context.js +0 -9
  56. package/src/utilities/unification.js +1 -15
  57. package/src/utilities/validation.js +5 -5
@@ -252,6 +252,25 @@ export default define(class Frame extends Element {
252
252
  return validatesWhenDerived;
253
253
  }
254
254
 
255
+ validateAssumption(assumption, context) {
256
+ let assumptionValidates;
257
+
258
+ const frameString = this.getString(), ///
259
+ assumptionstring = assumption.getString();
260
+
261
+ context.trace(`Validating the '${frameString}' frame's '${assumptionstring}' assumption.`);
262
+
263
+ const stated = true; ///
264
+
265
+ assumptionValidates = assumption.validate(stated, context);
266
+
267
+ if (assumptionValidates) {
268
+ context.debug(`...validated the '${frameString}' frame's '${assumptionstring}' assumption.`);
269
+ }
270
+
271
+ return assumptionValidates;
272
+ }
273
+
255
274
  validateAssumptions(stated, context) {
256
275
  let assumptionsValidate;
257
276
 
@@ -261,14 +280,12 @@ export default define(class Frame extends Element {
261
280
  const frameString = this.getString(), ///
262
281
  assumptionsString = assumptionsStringFromAssumptions(this.assumptions);
263
282
 
264
- context.trace(`Validating the '${assumptionsString}' assumptions of the '${frameString}' frame...`);
265
-
266
- stated = true; ///
283
+ context.trace(`Validating the '${frameString}' frame's '${assumptionsString}' assumptions...`);
267
284
 
268
285
  const assumptions = [];
269
286
 
270
287
  assumptionsValidate = this.assumptions.every((assumption) => {
271
- const assumptionValidates = assumption.validate(stated, context);
288
+ const assumptionValidates = this.validateAssumption(assumption, context);
272
289
 
273
290
  if (assumptionValidates) {
274
291
  assumptions.push(assumption);
@@ -280,7 +297,7 @@ export default define(class Frame extends Element {
280
297
  if (assumptionsValidate) {
281
298
  this.assumptions = assumptions;
282
299
 
283
- context.debug(`...validated the '${assumptionsString}' assumptions of the '${frameString}' frame.`);
300
+ context.debug(`...validated the '${frameString}' frame's '${assumptionsString}' assumptions.`);
284
301
  }
285
302
  } else {
286
303
  assumptionsValidate = true;
@@ -335,9 +352,11 @@ export default define(class Frame extends Element {
335
352
  const metaTypeName = metaType.getName();
336
353
 
337
354
  if (metaTypeName === FRAME_META_TYPE_NAME) {
338
- const validates = this.validate(stated, context)
355
+ const frame = this.validate(stated, context);
339
356
 
340
- validatesGivenMetaType = validates; ///
357
+ if (frame !== null) {
358
+ validatesGivenMetaType = true;
359
+ }
341
360
  }
342
361
 
343
362
  if (validatesGivenMetaType) {
@@ -284,7 +284,6 @@ export default define(class Metavariable extends Element {
284
284
 
285
285
  if (referenceSubstitution !== null) {
286
286
  referenceUnifies = true;
287
-
288
287
  }
289
288
  }
290
289
  }
@@ -41,18 +41,17 @@ export default define(class Premise extends ProofAssertion {
41
41
 
42
42
  context.trace(`Verifying the '${premiseString}' premise...`);
43
43
 
44
- attempt((context) => {
44
+ const statement = this.getStatement(),
45
+ procedureCall = this.getProcedureCall();
46
+
47
+ if ((statement !== null) || (procedureCall !== null)) {
45
48
  const validates = this.validate(context);
46
49
 
47
50
  if (validates) {
48
- this.setContext(context);
49
-
50
51
  verifies = true;
51
52
  }
52
- }, context);
53
-
54
- if (verifies) {
55
- context.debug(`...verified the '${premiseString}' premise.`);
53
+ } else {
54
+ context.debug(`Unable to validate the '${premiseString}' premise because it is nonsense.`);
56
55
  }
57
56
 
58
57
  return verifies;
@@ -65,26 +64,30 @@ export default define(class Premise extends ProofAssertion {
65
64
 
66
65
  context.trace(`Validatting the '${premiseString}' premise...`);
67
66
 
68
- const statement = this.getStatement(),
69
- procedureCall = this.getProcedureCall();
67
+ attempt((context) => {
68
+ const statement = this.getStatement(),
69
+ procedureCall = this.getProcedureCall();
70
+
71
+ if (statement !== null) {
72
+ const statementValidates = this.validateStatement(context);
70
73
 
71
- if (false) {
72
- ///
73
- } else if (statement !== null) {
74
- const statementValidates = this.validateStatement(context);
74
+ if (statementValidates) {
75
+ this.setContext(context);
75
76
 
76
- if (statementValidates) {
77
- validates = true;
77
+ validates = true;
78
+ }
78
79
  }
79
- } else if (procedureCall !== null) {
80
- const procedureCallValidates = this.validateProcedureCall(context);
81
80
 
82
- if (procedureCallValidates) {
83
- validates = true;
81
+ if (procedureCall !== null) {
82
+ const procedureCallValidates = this.validateProcedureCall(context);
83
+
84
+ if (procedureCallValidates) {
85
+ this.setContext(context);
86
+
87
+ validates = true;
88
+ }
84
89
  }
85
- } else {
86
- context.debug(`Unable to validate the '${premiseString}' premise because it is nonsense.`);
87
- }
90
+ }, context);
88
91
 
89
92
  if (validates) {
90
93
  context.debug(`...validated the '${premiseString}' premise.`);
@@ -101,7 +104,11 @@ export default define(class Premise extends ProofAssertion {
101
104
 
102
105
  context.trace(`Validatting the '${premiseString}' premise's '${procedureCallString}' procedure call...`);
103
106
 
104
- procedureCallValidates = this.procedureCall.validate(context);
107
+ const procedureCall = this.procedureCall.validate(context);
108
+
109
+ if (procedureCall !== null) {
110
+ procedureCallValidates = true;
111
+ }
105
112
 
106
113
  if (procedureCallValidates) {
107
114
  context.debug(`...validated the '${premiseString}' premise's '${procedureCallString}' procedure call.`);
@@ -150,7 +157,7 @@ export default define(class Premise extends ProofAssertion {
150
157
  }
151
158
 
152
159
  unifyProofAssertion(proofAssertion, context) {
153
- let proofAssertionUnifies;
160
+ let proofAssertionUnifies = false;
154
161
 
155
162
  const premiseString = this.getString(), ///
156
163
  proofAssertionString = proofAssertion.getString();
@@ -160,18 +167,21 @@ export default define(class Premise extends ProofAssertion {
160
167
  const proofAssertionContext = proofAssertion.getContext(),
161
168
  premiseContext = this.getContext(),
162
169
  generalContext = premiseContext, ///
163
- specificContext = proofAssertionContext; ///
170
+ specificContext = proofAssertionContext,
171
+ statementUnifies = liminally((specificContext) => {
172
+ const statement = proofAssertion.getStatement(),
173
+ statementUnifies = this.unifyStatement(statement, generalContext, specificContext);
164
174
 
165
- proofAssertionUnifies = liminally((specificContext) => {
166
- const statement = proofAssertion.getStatement(),
167
- statementUnifies = this.unifyStatement(statement, generalContext, specificContext);
175
+ if (statementUnifies) {
176
+ specificContext.commit(context);
168
177
 
169
- if (statementUnifies) {
170
- specificContext.commit(context);
178
+ return true;
179
+ }
180
+ }, specificContext);
171
181
 
172
- return true;
173
- }
174
- }, specificContext);
182
+ if (statementUnifies) {
183
+ proofAssertionUnifies = true;
184
+ }
175
185
 
176
186
  if (proofAssertionUnifies) {
177
187
  context.debug(`...unified the '${proofAssertionString}' proof assertion with the '${premiseString}' premise.`);
@@ -6,7 +6,7 @@ import ProofAssertion from "../proofAssertion";
6
6
 
7
7
  import { define } from "../../elements";
8
8
  import { unifyStatements } from "../../utilities/unification";
9
- import { asyncAttempt, asyncLiminally } from "../../utilities/context";
9
+ import { attempt, asyncLiminally } from "../../utilities/context";
10
10
  import { propertyAssertionFromStatement } from "../../utilities/statement";
11
11
 
12
12
  const { asyncSome } = asynchronousUtilities;
@@ -75,19 +75,23 @@ export default define(class Step extends ProofAssertion {
75
75
 
76
76
  context.trace(`Verifying the '${stepString}' step...`);
77
77
 
78
- await asyncAttempt(async (context) => {
78
+ const statement = this.getStatement();
79
+
80
+ if (statement !== null) {
79
81
  const validates = this.validate(context);
80
82
 
81
83
  if (validates) {
82
- const unifies = await this.unify(context);
84
+ context = this.getContext();
83
85
 
84
- if (unifies) {
85
- this.setContext(context);
86
+ const unifiies = await this.unify(context);
86
87
 
88
+ if (unifiies) {
87
89
  verifies = true;
88
90
  }
89
91
  }
90
- }, context);
92
+ } else {
93
+ context.debug(`Unable to verify the '${stepString}' step because it is nonsense.`);
94
+ }
91
95
 
92
96
  if (verifies) {
93
97
  context.debug(`...verified the '${stepString}' step.`);
@@ -103,9 +107,7 @@ export default define(class Step extends ProofAssertion {
103
107
 
104
108
  context.trace(`Validating the '${stepString}' step...`);
105
109
 
106
- const statement = this.getStatement();
107
-
108
- if (statement !== null) {
110
+ attempt((context) => {
109
111
  const referenceValidates = this.validateReference(context);
110
112
 
111
113
  if (referenceValidates) {
@@ -115,16 +117,16 @@ export default define(class Step extends ProofAssertion {
115
117
  const statementValidates = this.validateStatement(context);
116
118
 
117
119
  if (statementValidates) {
120
+ this.setContext(context);
121
+
118
122
  validates = true;
119
123
  }
120
124
  }
121
125
  }
122
- } else {
123
- context.debug(`Unable to validate the '${stepString}' step because it is nonsense.`);
124
- }
126
+ }, context);
125
127
 
126
128
  if (validates) {
127
- context.debug(`...validate the '${stepString}' step.`);
129
+ context.debug(`...validated the '${stepString}' step.`);
128
130
  }
129
131
 
130
132
  return validates;
@@ -223,11 +225,10 @@ export default define(class Step extends ProofAssertion {
223
225
 
224
226
  if (axiom !== null) {
225
227
  const step = this, ///
226
- substitutions = [],
227
- stepUnifies = axiom.unifyStep(step, substitutions, context);
228
+ stepUnifies = axiom.unifyStep(step, context);
228
229
 
229
230
  if (stepUnifies) {
230
- const substitutionsCompare = satisfiesAssertion.compareSubstitutions(substitutions, context);
231
+ const substitutionsCompare = satisfiesAssertion.compareSubstitutions(context);
231
232
 
232
233
  if (substitutionsCompare) {
233
234
  unifiesWithSatisfiesAssertion = true;
@@ -37,22 +37,21 @@ export default define(class Supposition extends ProofAssertion {
37
37
 
38
38
  await this.break(context);
39
39
 
40
- const suppositionString = this.getString(); ///
40
+ const suppositionString = this.getString();
41
41
 
42
42
  context.trace(`Verifying the '${suppositionString}' supposition...`);
43
43
 
44
- attempt((context) => {
44
+ const statement = this.getStatement(),
45
+ procedureCall = this.getProcedureCall();
46
+
47
+ if ((statement !== null) || (procedureCall !== null)) {
45
48
  const validates = this.validate(context);
46
49
 
47
50
  if (validates) {
48
- this.setContext(context);
49
-
50
51
  verifies = true;
51
52
  }
52
- }, context);
53
-
54
- if (verifies) {
55
- context.debug(`...verified the '${suppositionString}' supposition.`);
53
+ } else {
54
+ context.debug(`Unable to validate the '${suppositionString}' supposition because it is nonsense.`);
56
55
  }
57
56
 
58
57
  return verifies;
@@ -65,26 +64,30 @@ export default define(class Supposition extends ProofAssertion {
65
64
 
66
65
  context.trace(`Validatting the '${suppositionString}' supposition...`);
67
66
 
68
- const statement = this.getStatement(),
69
- procedureCall = this.getProcedureCall();
67
+ attempt((context) => {
68
+ const statement = this.getStatement(),
69
+ procedureCall = this.getProcedureCall();
70
+
71
+ if (statement !== null) {
72
+ const statementValidates = this.validateStatement(context);
70
73
 
71
- if (false) {
72
- ///
73
- } else if (statement !== null) {
74
- const statementValidates = this.validateStatement(context);
74
+ if (statementValidates) {
75
+ this.setContext(context);
75
76
 
76
- if (statementValidates) {
77
- validates = true;
77
+ validates = true;
78
+ }
78
79
  }
79
- } else if (procedureCall !== null) {
80
- const procedureCallValidates = this.validateProcedureCall(context);
81
80
 
82
- if (procedureCallValidates) {
83
- validates = true;
81
+ if (procedureCall !== null) {
82
+ const procedureCallValidates = this.validateProcedureCall(context);
83
+
84
+ if (procedureCallValidates) {
85
+ this.setContext(context);
86
+
87
+ validates = true;
88
+ }
84
89
  }
85
- } else {
86
- context.debug(`Unable to validate the '${suppositionString}' supposition because it is nonsense.`);
87
- }
90
+ }, context);
88
91
 
89
92
  if (validates) {
90
93
  context.debug(`...validated the '${suppositionString}' supposition.`);
@@ -101,7 +104,11 @@ export default define(class Supposition extends ProofAssertion {
101
104
 
102
105
  context.trace(`Validatting the '${suppositionString}' supposition's '${procedureCallString}' procedure call...`);
103
106
 
104
- procedureCallValidates = this.procedureCall.validate(context);
107
+ const procedureCall = this.procedureCall.validate(context);
108
+
109
+ if (procedureCall !== null) {
110
+ procedureCallValidates =true;
111
+ }
105
112
 
106
113
  if (procedureCallValidates) {
107
114
  context.debug(`...validated the '${suppositionString}' supposition's '${procedureCallString}' procedure call.`);
@@ -172,7 +179,7 @@ export default define(class Supposition extends ProofAssertion {
172
179
  }
173
180
 
174
181
  unifyProofAssertion(proofAssertion, context) {
175
- let proofAssertionUnifies;
182
+ let proofAssertionUnifies = false;
176
183
 
177
184
  const suppositionString = this.getString(), ///
178
185
  proofAssertionString = proofAssertion.getString();
@@ -182,18 +189,21 @@ export default define(class Supposition extends ProofAssertion {
182
189
  const proofAssertionContext = proofAssertion.getContext(),
183
190
  suppositionContext = this.getContext(),
184
191
  generalContext = suppositionContext, ///
185
- specificContext = proofAssertionContext; ///
192
+ specificContext = proofAssertionContext,
193
+ statementUnifies = liminally((specificContext) => {
194
+ const statement = proofAssertion.getStatement(),
195
+ statementUnifies = this.unifyStatement(statement, generalContext, specificContext);
186
196
 
187
- proofAssertionUnifies = liminally((specificContext) => {
188
- const statement = proofAssertion.getStatement(),
189
- statementUnifies = this.unifyStatement(statement, generalContext, specificContext);
197
+ if (statementUnifies) {
198
+ specificContext.commit(context);
190
199
 
191
- if (statementUnifies) {
192
- specificContext.commit(context);
200
+ return true;
201
+ }
202
+ }, specificContext);
193
203
 
194
- return true;
195
- }
196
- }, specificContext);
204
+ if (statementUnifies) {
205
+ proofAssertionUnifies = true;
206
+ }
197
207
 
198
208
  if (proofAssertionUnifies) {
199
209
  context.debug(`...unified the '${proofAssertionString}' proof assertion with the '${suppositionString}' supposition.`);
@@ -3,7 +3,7 @@
3
3
  import { Element } from "occam-languages";
4
4
 
5
5
  import { define } from "../elements";
6
- import { attempt, literally } from "../utilities/context";
6
+ import { literally } from "../utilities/context";
7
7
  import { instantiateReference } from "../process/instantiate";
8
8
  import { REFERENCE_META_TYPE_NAME } from "../metaTypeNames";
9
9
  import { metavariableFromReferenceNode } from "../utilities/element";
@@ -160,7 +160,7 @@ export default define(class Reference extends Element {
160
160
  const referenceString = this.getString(), ///
161
161
  metavariableString = this.metavariable.getString();
162
162
 
163
- context.trace(`Validating the '${referenceString}' reference's '${metavariableString}' metavariable....'`);
163
+ context.trace(`Validating the '${referenceString}' reference's '${metavariableString}' metavariable...'`);
164
164
 
165
165
  const metaTypeName = REFERENCE_META_TYPE_NAME,
166
166
  referenceMetaType = context.findMetaTypeByMetaTypeName(metaTypeName),
@@ -249,13 +249,9 @@ export default define(class Reference extends Element {
249
249
 
250
250
  context.trace(`Unifying the '${metavariableString}' metavariable with the '${referenceString}' reference...`);
251
251
 
252
- const metavariableUnifiesIntrinsically = attempt((specificContext) => {
253
- const generalMetavariable = this.metavariable, ///
254
- specificMetavariable = metavariable, ///
255
- metavariableUnifiesIntrinsically = unifyMetavariableIntrinsically(generalMetavariable, specificMetavariable, generalContext, specificContext);
256
-
257
- return metavariableUnifiesIntrinsically;
258
- }, specificContext);
252
+ const generalMetavariable = this.metavariable, ///
253
+ specificMetavariable = metavariable, ///
254
+ metavariableUnifiesIntrinsically = unifyMetavariableIntrinsically(generalMetavariable, specificMetavariable, generalContext, specificContext);
259
255
 
260
256
  if (metavariableUnifiesIntrinsically) {
261
257
  metavariableUnifies = true;
@@ -278,8 +274,7 @@ export default define(class Reference extends Element {
278
274
  context.trace(`Unifying the '${topLevelMetaAssertionString}' top level meta-assertion with the '${referenceString}' reference...`);
279
275
 
280
276
  const label = topLevelMetaAssertion.getLabel(),
281
- substitutions = [],
282
- labelUnifies = this.unifyLabel(label, substitutions, context);
277
+ labelUnifies = this.unifyLabel(label, context);
283
278
 
284
279
  topLevelMetaAssertionUnifies = labelUnifies; ///
285
280
 
@@ -109,7 +109,7 @@ export default define(class Rule extends Element {
109
109
  }, context);
110
110
 
111
111
  if (verifies) {
112
- const rule = this;
112
+ const rule = this; ///
113
113
 
114
114
  context.addRule(rule);
115
115
 
@@ -35,9 +35,9 @@ export default define(class Signature extends Element {
35
35
 
36
36
  context.trace(`Verifying the '${signatureString}' signature...`);
37
37
 
38
- const validates = this.validate(context);
38
+ const signature = this.validate(context);
39
39
 
40
- if (validates) {
40
+ if (signature !== null) {
41
41
  verifies = true;
42
42
  }
43
43
 
@@ -49,7 +49,7 @@ export default define(class Signature extends Element {
49
49
  }
50
50
 
51
51
  validate(context) {
52
- let validates = false;
52
+ let signature = null;
53
53
 
54
54
  const signatureString = this.getString(); ///
55
55
 
@@ -61,14 +61,14 @@ export default define(class Signature extends Element {
61
61
  if (termsValidate) {
62
62
  this.terms = terms;
63
63
 
64
- validates = true;
64
+ signature = this; ///
65
65
  }
66
66
 
67
- if (validates) {
67
+ if (signature) {
68
68
  context.debug(`...validated the '${signatureString}' signature.`);
69
69
  }
70
70
 
71
- return validates
71
+ return signature
72
72
  }
73
73
 
74
74
  validateTerm(term, terms, context) {
@@ -220,9 +220,11 @@ export default define(class Statement extends Element {
220
220
  const metaTypeName = metaType.getName();
221
221
 
222
222
  if (metaTypeName === STATEMENT_META_TYPE_NAME) {
223
- const validates = this.validate(stated, context)
223
+ const statement = this.validate(stated, context)
224
224
 
225
- validatesGivenMetaType = validates; ///
225
+ if (statement !== null) {
226
+ validatesGivenMetaType = true;
227
+ }
226
228
  }
227
229
 
228
230
  if (validatesGivenMetaType) {
@@ -106,8 +106,7 @@ export default define(class Subproof extends Element {
106
106
 
107
107
  if (axiomSatisfiable) {
108
108
  const subproof = this, ///
109
- substitutions = [],
110
- statementUnifies = axiom.unifySubproof(subproof, substitutions, context);
109
+ statementUnifies = axiom.unifySubproof(subproof, context);
111
110
 
112
111
  if (statementUnifies) {
113
112
  const substitutionsCompare = satisfiesAssertion.compareSubstitutions(substitutions, context);
@@ -199,20 +199,19 @@ export default define(class Term extends Element {
199
199
 
200
200
  context.trace(`Validating the '${termString}' term given the '${typeString}' type...`);
201
201
 
202
- const validates = this.validate(context, () => {
203
- let validatesForwards;
204
-
205
- const typeEqualToOrSubTypeOfGivenTypeType = this.type.isEqualToOrSubTypeOf(type);
206
-
207
- if (typeEqualToOrSubTypeOfGivenTypeType) {
208
- validatesForwards = true;
209
- }
202
+ const term = this.validate(context, () => {
203
+ const validatesForwards = true;
210
204
 
211
205
  return validatesForwards;
212
206
  });
213
207
 
214
- if (validates) {
215
- validatesGivenType = true;
208
+ if (term !== null) {
209
+ const termType = term.getType(),
210
+ termTypeEqualToOrSubTypeOfGivenTypeType = termType.isEqualToOrSubTypeOf(type);
211
+
212
+ if (termTypeEqualToOrSubTypeOfGivenTypeType) {
213
+ validatesGivenType = true;
214
+ }
216
215
  }
217
216
 
218
217
  if (validatesGivenType) {