occam-verify-cli 0.0.837 → 0.0.839

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 (50) hide show
  1. package/lib/constants.js +5 -1
  2. package/lib/context/file.js +24 -9
  3. package/lib/context/local.js +77 -39
  4. package/lib/context/localMeta.js +3 -3
  5. package/lib/context/release.js +4 -5
  6. package/lib/equality.js +2 -2
  7. package/lib/equivalence.js +244 -0
  8. package/lib/log.js +3 -3
  9. package/lib/term.js +40 -1
  10. package/lib/utilities/array.js +5 -5
  11. package/lib/utilities/equivalences.js +169 -0
  12. package/lib/verifier/node/metastatement.js +12 -31
  13. package/lib/verifier/node/statementAsCombinator.js +4 -4
  14. package/lib/verifier/node/termAsConstructor.js +7 -27
  15. package/lib/verifier/nodes/equality.js +8 -8
  16. package/lib/verifier/nodes/metaLevelToIntrinsicLevel.js +22 -6
  17. package/lib/verify/containment.js +22 -12
  18. package/lib/verify/defining.js +38 -0
  19. package/lib/verify/metavariable.js +26 -4
  20. package/lib/verify/statement.js +62 -45
  21. package/lib/verify/term.js +6 -6
  22. package/lib/verify/type.js +7 -7
  23. package/lib/verify/variable.js +26 -4
  24. package/package.json +1 -1
  25. package/src/constants.js +1 -0
  26. package/src/context/file.js +35 -8
  27. package/src/context/local.js +113 -44
  28. package/src/context/localMeta.js +3 -3
  29. package/src/context/release.js +6 -9
  30. package/src/equality.js +2 -2
  31. package/src/{collection.js → equivalence.js} +84 -28
  32. package/src/log.js +2 -2
  33. package/src/term.js +48 -0
  34. package/src/utilities/array.js +1 -1
  35. package/src/utilities/equivalences.js +152 -0
  36. package/src/verifier/node/metastatement.js +23 -51
  37. package/src/verifier/node/statementAsCombinator.js +9 -6
  38. package/src/verifier/node/termAsConstructor.js +13 -44
  39. package/src/verifier/nodes/equality.js +7 -7
  40. package/src/verifier/nodes/metaLevelToIntrinsicLevel.js +38 -12
  41. package/src/verify/containment.js +31 -20
  42. package/src/verify/defining.js +43 -0
  43. package/src/verify/metavariable.js +22 -0
  44. package/src/verify/statement.js +88 -54
  45. package/src/verify/term.js +4 -5
  46. package/src/verify/type.js +6 -7
  47. package/src/verify/variable.js +22 -0
  48. package/lib/collection.js +0 -192
  49. package/lib/utilities/collection.js +0 -121
  50. package/src/utilities/collection.js +0 -103
@@ -1,18 +1,23 @@
1
1
  "use strict";
2
2
 
3
3
  import Variable from "../variable";
4
- import Collection from "../collection";
4
+ import Equivalence from "../equivalence";
5
5
  import contextMixins from "../mixins/context";
6
6
 
7
7
  import { last } from "../utilities/array";
8
- import { mergeCollections, findCollectionByTerm } from "../utilities/collection";
8
+ import { mergeEquivalences,
9
+ separateEquivalences,
10
+ findEquivalenceByTerm,
11
+ compressDefinedVariables,
12
+ definedVariablesFromGroundedEquivalences,
13
+ implicitlyGroundedEquivalencesFromRemainingEquivalencesAndDefinedVariables } from "../utilities/equivalences";
9
14
 
10
15
  class LocalContext {
11
- constructor(context, variables, proofSteps, collections) {
16
+ constructor(context, variables, proofSteps, equivalences) {
12
17
  this.context = context;
13
18
  this.variables = variables;
14
19
  this.proofSteps = proofSteps;
15
- this.collections = collections;
20
+ this.equivalences = equivalences;
16
21
  }
17
22
 
18
23
  getContext() {
@@ -23,8 +28,8 @@ class LocalContext {
23
28
  let variables = this.context.getVariables();
24
29
 
25
30
  variables = [ ///
26
- ...this.variables,
27
- ...variables
31
+ ...variables,
32
+ ...this.variables
28
33
  ];
29
34
 
30
35
  return variables;
@@ -34,23 +39,23 @@ class LocalContext {
34
39
  let proofSteps = this.context.getProofSteps();
35
40
 
36
41
  proofSteps = [ ///
37
- ...this.proofSteps,
38
- ...proofSteps
42
+ ...proofSteps,
43
+ ...this.proofSteps
39
44
  ];
40
45
 
41
46
  return proofSteps;
42
47
  }
43
48
 
44
- getCollections() {
45
- let collections = this.context.getCollections();
49
+ getEquivalences() {
50
+ let equivalences = this.context.getEquivalences();
46
51
 
47
- const collectionsA = this.collections, ///
48
- collectionsB = collections,
52
+ const equivalencesA = this.equivalences, ///
53
+ equivalencesB = equivalences,
49
54
  localContext = this; ///
50
55
 
51
- collections = mergeCollections(collectionsA, collectionsB, localContext); ///
56
+ equivalences = mergeEquivalences(equivalencesA, equivalencesB, localContext); ///
52
57
 
53
- return collections;
58
+ return equivalences;
54
59
  }
55
60
 
56
61
  getLastProofStep() {
@@ -70,14 +75,14 @@ class LocalContext {
70
75
  getTermType(term) {
71
76
  let termType;
72
77
 
73
- const collections = this.getCollections(),
74
- collection = findCollectionByTerm(collections, term);
78
+ const equivalences = this.getEquivalences(),
79
+ equivalence = findEquivalenceByTerm(equivalences, term);
75
80
 
76
- if (collection !== null) {
81
+ if (equivalence !== null) {
77
82
  const localContext = this, ///
78
- collectionType = collection.getType(localContext);
83
+ equivalenceType = equivalence.getType(localContext);
79
84
 
80
- termType = collectionType; ///
85
+ termType = equivalenceType; ///
81
86
  } else {
82
87
  termType = term.getType();
83
88
  }
@@ -85,6 +90,53 @@ class LocalContext {
85
90
  return termType;
86
91
  }
87
92
 
93
+ isVariableDefined(variable) {
94
+ let variableDefined = false;
95
+
96
+ const equivalences = this.getEquivalences(),
97
+ remainingEquivalences = [],
98
+ initiallyGroundedEquivalences = [];
99
+
100
+ separateEquivalences(equivalences, remainingEquivalences, initiallyGroundedEquivalences);
101
+
102
+ const initiallyGroundedEquivalencesLength = initiallyGroundedEquivalences.length;
103
+
104
+ if (initiallyGroundedEquivalencesLength > 0) {
105
+ let groundedEquivalences,
106
+ implicitlyGroundedEquivalences,
107
+ implicitlyGroundedEquivalencesLength;
108
+
109
+ const context = this,
110
+ definedVariables = [];
111
+
112
+ groundedEquivalences = initiallyGroundedEquivalences; ///
113
+
114
+ definedVariablesFromGroundedEquivalences(groundedEquivalences, definedVariables, context);
115
+
116
+ implicitlyGroundedEquivalences = implicitlyGroundedEquivalencesFromRemainingEquivalencesAndDefinedVariables(remainingEquivalences, definedVariables);
117
+
118
+ implicitlyGroundedEquivalencesLength = implicitlyGroundedEquivalences.length;
119
+
120
+ while (implicitlyGroundedEquivalencesLength > 0) {
121
+ groundedEquivalences = implicitlyGroundedEquivalences; ///
122
+
123
+ definedVariablesFromGroundedEquivalences(groundedEquivalences, definedVariables, context);
124
+
125
+ implicitlyGroundedEquivalences = implicitlyGroundedEquivalencesFromRemainingEquivalencesAndDefinedVariables(remainingEquivalences, definedVariables);
126
+
127
+ implicitlyGroundedEquivalencesLength = implicitlyGroundedEquivalences.length;
128
+ }
129
+
130
+ compressDefinedVariables(definedVariables);
131
+
132
+ const definedVariablesIncludesVariable = definedVariables.includes(variable);
133
+
134
+ variableDefined = definedVariablesIncludesVariable; ///
135
+ }
136
+
137
+ return variableDefined;
138
+ }
139
+
88
140
  addEquality(equality) {
89
141
  let equalityAdded;
90
142
 
@@ -95,36 +147,45 @@ class LocalContext {
95
147
  } else {
96
148
  const leftTerm = equality.getLeftTerm(),
97
149
  rightTerm = equality.getRightTerm(),
98
- leftCollection = findCollectionByTerm(this.collections, leftTerm),
99
- rightCollection = findCollectionByTerm(this.collections, rightTerm);
150
+ leftEquivalence = findEquivalenceByTerm(this.equivalences, leftTerm),
151
+ rightEquivalence = findEquivalenceByTerm(this.equivalences, rightTerm);
100
152
 
101
153
  if (false) {
102
154
  ///
103
- } else if ((leftCollection === null) && (rightCollection === null)) {
104
- const collection = Collection.fromEquality(equality);
155
+ } else if ((leftEquivalence === null) && (rightEquivalence === null)) {
156
+ const equivalence = Equivalence.fromLeftTermAndRightTerm(leftTerm, rightTerm);
105
157
 
106
- this.addCollection(collection);
158
+ this.addEquivalence(equivalence);
107
159
 
108
160
  equalityAdded = true;
109
- } else if ((leftCollection !== null) && (rightCollection === null)) {
110
- leftCollection.addTerm(rightTerm);
161
+ } else if ((leftEquivalence !== null) && (rightEquivalence === null)) {
162
+ leftEquivalence.addTerm(rightTerm);
111
163
 
112
164
  equalityAdded = true;
113
- } else if ((leftCollection === null) && (rightCollection !== null)) {
114
- rightCollection.addTerm(leftTerm);
165
+ } else if ((leftEquivalence === null) && (rightEquivalence !== null)) {
166
+ rightEquivalence.addTerm(leftTerm);
115
167
 
116
168
  equalityAdded = true;
117
- } else if ((leftCollection !== null) && (rightCollection !== null)) {
118
- if (leftCollection === rightCollection) {
119
- const collection = leftCollection; ///
120
-
121
- collection.addTerm(leftTerm);
122
- collection.addTerm(rightTerm);
169
+ } else if ((leftEquivalence !== null) && (rightEquivalence !== null)) {
170
+ let equivalence;
123
171
 
124
- equalityAdded = true;
172
+ if (leftEquivalence === rightEquivalence) {
173
+ equivalence = leftEquivalence; ///
125
174
  } else {
126
- debugger
175
+ equivalence = Equivalence.merge(leftEquivalence, rightEquivalence);
176
+
177
+ this.removeEquivalence(leftEquivalence);
178
+
179
+ this.removeEquivalence(rightEquivalence);
180
+
181
+ this.addEquivalence(equivalence);
127
182
  }
183
+
184
+ equivalence.addTerm(leftTerm);
185
+
186
+ equivalence.addTerm(rightTerm);
187
+
188
+ equalityAdded = true;
128
189
  }
129
190
  }
130
191
 
@@ -156,8 +217,8 @@ class LocalContext {
156
217
  this.proofSteps.push(proofStep);
157
218
  }
158
219
 
159
- addCollection(collection) {
160
- this.collections.push(collection);
220
+ addEquivalence(equivalence) {
221
+ this.equivalences.push(equivalence);
161
222
  }
162
223
 
163
224
  matchStatement(statementNode) {
@@ -182,6 +243,14 @@ class LocalContext {
182
243
  return statementMatches;
183
244
  }
184
245
 
246
+ removeEquivalence(equivalence) {
247
+ const index = this.equivalences.indexOf(equivalence),
248
+ start = index, ///
249
+ deleteCount = 1;
250
+
251
+ this.equivalences.splice(start, deleteCount);
252
+ }
253
+
185
254
  findVariableByVariableNode(variableNode) {
186
255
  const node = variableNode, ///
187
256
  variables = this.getVariables(),
@@ -222,8 +291,8 @@ class LocalContext {
222
291
  const context = fileContext, ///
223
292
  variables = [],
224
293
  proofSteps = [],
225
- collections = [],
226
- localContext = new LocalContext(context, variables, proofSteps, collections);
294
+ equivalences = [],
295
+ localContext = new LocalContext(context, variables, proofSteps, equivalences);
227
296
 
228
297
  return localContext;
229
298
  }
@@ -232,9 +301,9 @@ class LocalContext {
232
301
  const context = localContext, ///
233
302
  variables = [],
234
303
  proofSteps = [],
235
- collections = [];
304
+ equivalences = [];
236
305
 
237
- localContext = new LocalContext(context, variables, proofSteps, collections);
306
+ localContext = new LocalContext(context, variables, proofSteps, equivalences);
238
307
 
239
308
  return localContext;
240
309
  }
@@ -253,8 +322,8 @@ class LocalContext {
253
322
 
254
323
  const context = fileContext, ///
255
324
  proofSteps = [],
256
- collections = [],
257
- localContext = new LocalContext(context, variables, proofSteps, collections);
325
+ equivalences = [],
326
+ localContext = new LocalContext(context, variables, proofSteps, equivalences);
258
327
 
259
328
  return localContext;
260
329
  }
@@ -25,8 +25,8 @@ class LocalMetaContext {
25
25
  let metavariables = this.context.getMetavariables();
26
26
 
27
27
  metavariables = [ ///
28
- ...this.metavariables,
29
28
  ...metavariables,
29
+ ...this.metavariables
30
30
  ]
31
31
 
32
32
  return metavariables;
@@ -36,8 +36,8 @@ class LocalMetaContext {
36
36
  let metaproofSteps = this.context.getMetaproofSteps();
37
37
 
38
38
  metaproofSteps = [ ///
39
- ...this.metaproofSteps,
40
- ...metaproofSteps
39
+ ...metaproofSteps,
40
+ ...this.metaproofSteps
41
41
  ];
42
42
 
43
43
  return metaproofSteps;
@@ -343,16 +343,16 @@ export default class ReleaseContext {
343
343
  releaseContexts = releaseContexts.slice(); ///
344
344
 
345
345
  const combinedCustomGrammar = combinedCustomGrammarFromReleaseContexts(releaseContexts),
346
- releaseContext = releaseContexts.shift(),
347
- dependencyReleaseContexts = releaseContexts; ///
348
-
349
- const florenceLexer = florenceLexerFromCombinedCustomGrammar(combinedCustomGrammar),
346
+ florenceLexer = florenceLexerFromCombinedCustomGrammar(combinedCustomGrammar),
350
347
  florenceParser = florenceParserFromCombinedCustomGrammar(combinedCustomGrammar);
351
348
 
352
349
  this.lexer = florenceLexer; ///
353
350
 
354
351
  this.parser = florenceParser; ///
355
352
 
353
+ const releaseContext = releaseContexts.shift(),
354
+ dependencyReleaseContexts = releaseContexts; ///
355
+
356
356
  this.dependencyReleaseContexts = dependencyReleaseContexts;
357
357
 
358
358
  if (this.json !== null) {
@@ -360,10 +360,7 @@ export default class ReleaseContext {
360
360
 
361
361
  fileContextsJSON.forEach((fileContextJSON) => {
362
362
  const json = fileContextJSON, ///
363
- { filePath } = json,
364
- fileContext = FileContext.fromFilePathAndReleaseContext(filePath, releaseContext);
365
-
366
- fileContext.initialise(json);
363
+ fileContext = FileContext.fromJSONAndReleaseContext(json, releaseContext);
367
364
 
368
365
  this.fileContexts.push(fileContext);
369
366
  });
@@ -394,4 +391,4 @@ export default class ReleaseContext {
394
391
 
395
392
  return releaseContext;
396
393
  }
397
- }
394
+ }
package/src/equality.js CHANGED
@@ -35,9 +35,9 @@ export default class Equality {
35
35
  rightTermNode = rightTerm.getNode(),
36
36
  nonTerminalNodeA = leftTermNode, ///
37
37
  nonTerminalNodeB = rightTermNode, ///
38
- collections = context.getCollections(),
38
+ equivalences = context.getEquivalences(),
39
39
  localContext = this, ///
40
- nonTerminalNodeVerified = equalityNodesVerifier.verifyNonTerminalNode(nonTerminalNodeA, nonTerminalNodeB, collections, localContext, () => {
40
+ nonTerminalNodeVerified = equalityNodesVerifier.verifyNonTerminalNode(nonTerminalNodeA, nonTerminalNodeB, equivalences, localContext, () => {
41
41
  const verifiedAhead = true;
42
42
 
43
43
  return verifiedAhead;
@@ -4,7 +4,7 @@ import { nodeQuery } from "./utilities/query";
4
4
 
5
5
  const variableNodeQuery = nodeQuery("/term/variable!");
6
6
 
7
- export default class Collection {
7
+ export default class Equivalence {
8
8
  constructor(terms) {
9
9
  this.terms = terms;
10
10
  }
@@ -68,6 +68,18 @@ export default class Collection {
68
68
  return termMatches;
69
69
  }
70
70
 
71
+ matchTerms(terms) {
72
+ const termsMatch = terms.every((term) => {
73
+ const termMatches = this.matchTerm(term);
74
+
75
+ if (termMatches) {
76
+ return true;
77
+ }
78
+ })
79
+
80
+ return termsMatch;
81
+ }
82
+
71
83
  matchTermNode(termNode) {
72
84
  const termNodeA = termNode, ///
73
85
  termNodeMatches = this.terms.some((term) => {
@@ -83,18 +95,6 @@ export default class Collection {
83
95
  return termNodeMatches;
84
96
  }
85
97
 
86
- matchTerms(terms) {
87
- const termsMatch = terms.every((term) => {
88
- const termMatches = this.matchTerm(term);
89
-
90
- if (termMatches) {
91
- return true;
92
- }
93
- })
94
-
95
- return termsMatch;
96
- }
97
-
98
98
  matchTermNodes(termNodes) {
99
99
  const termNodesMatch = termNodes.every((termNode) => {
100
100
  const termNodeMatches = this.matchTermNode(termNode);
@@ -107,28 +107,84 @@ export default class Collection {
107
107
  return termNodesMatch;
108
108
  }
109
109
 
110
- static fromEquality(equality) {
111
- const leftTerm = equality.getLeftTerm(),
112
- rightTerm = equality.getRightTerm(),
110
+ getVariables(context) {
111
+ const variables = [];
112
+
113
+ this.terms.forEach((term) => {
114
+ term.getVariables(variables, context);
115
+ });
116
+
117
+ return variables;
118
+ }
119
+
120
+ isInitiallyGrounded() {
121
+ const initiallyGroundedTerms = this.getInitiallyGroundedTerms(),
122
+ initiallyGroundedTermsLength = initiallyGroundedTerms.length,
123
+ initiallyGrounded = (initiallyGroundedTermsLength > 0);
124
+
125
+ return initiallyGrounded;
126
+ }
127
+
128
+ isImplicitlyGrounded(definedVariables) {
129
+ const implicitlyGroundedTerms = this.getImplicitlyGroundedTerms(definedVariables),
130
+ implicitlyGroundedTermsLength = implicitlyGroundedTerms.length,
131
+ implicitlyGrounded = (implicitlyGroundedTermsLength > 0);
132
+
133
+ return implicitlyGrounded;
134
+ }
135
+
136
+ getInitiallyGroundedTerms() {
137
+ const initiallyGroundedTerms = this.terms.reduce((initiallyGroundedTerms, term) => {
138
+ const termInitiallyGrounded = term.isInitiallyGrounded();
139
+
140
+ if (termInitiallyGrounded) {
141
+ const initiallyGroundedTerm = term; ///
142
+
143
+ initiallyGroundedTerms.push(initiallyGroundedTerm);
144
+ }
145
+
146
+ return initiallyGroundedTerms;
147
+ }, []);
148
+
149
+ return initiallyGroundedTerms;
150
+ }
151
+
152
+ getImplicitlyGroundedTerms(definedVariables) {
153
+ const implicitlyGroundedTerms = this.terms.reduce((implicitlyGroundedTerms, term) => {
154
+ const termImplicitlyGrounded = term.isImplicitlyGrounded(definedVariables);
155
+
156
+ if (termImplicitlyGrounded) {
157
+ const implicitlyGroundedTerm = term; ///
158
+
159
+ implicitlyGroundedTerms.push(implicitlyGroundedTerm);
160
+ }
161
+
162
+ return implicitlyGroundedTerms;
163
+ }, []);
164
+
165
+ return implicitlyGroundedTerms;
166
+ }
167
+
168
+ static merge(leftEquivalence, rightEquivalence) {
169
+ const leftEquivalenceTerms = leftEquivalence.getTerms(),
170
+ rightEquivalenceTerms = rightEquivalence.getTerms(),
113
171
  terms = [
114
- leftTerm,
115
- rightTerm
172
+ ...leftEquivalenceTerms,
173
+ ...rightEquivalenceTerms
116
174
  ],
117
- collection = new Collection(terms);
175
+ equivalence = new Equivalence(terms);
118
176
 
119
- return collection;
177
+ return equivalence;
120
178
  }
121
179
 
122
- static fromCollections(collectionA, collectionB) {
123
- const collectionATerms = collectionA.getTerms(),
124
- collectionBTerms = collectionB.getTerms(),
125
- terms = [
126
- ...collectionATerms,
127
- ...collectionBTerms
180
+ static fromLeftTermAndRightTerm(leftTerm, rightTerm) {
181
+ const terms = [
182
+ leftTerm,
183
+ rightTerm
128
184
  ],
129
- collection = new Collection(terms);
185
+ equivalence = new Equivalence(terms);
130
186
 
131
- return collection;
187
+ return equivalence;
132
188
  }
133
189
  }
134
190
 
package/src/log.js CHANGED
@@ -106,8 +106,8 @@ export default class Log {
106
106
  function formatMessage(level, message, node = null, tokens = null, filePath = null) {
107
107
  const upperCaseLevel = level.toUpperCase();
108
108
 
109
- if (node === null) {
110
- message = `${upperCaseLevel}: ${message}`;
109
+ if ((node === null) || (tokens === null)) {
110
+ message = `${upperCaseLevel}: ${filePath} - ${message}`;
111
111
  } else {
112
112
  const leastLineIndex = leastLineIndexFromNodeAndTokens(node, tokens),
113
113
  leastLineNumber = leastLineIndex, ///
package/src/term.js CHANGED
@@ -1,5 +1,9 @@
1
1
  "use strict";
2
2
 
3
+ import { nodesQuery } from "./utilities/query"
4
+
5
+ const variableNodesQuery = nodesQuery("//variable");
6
+
3
7
  export default class Term {
4
8
  constructor(node, type) {
5
9
  this.node = node;
@@ -21,6 +25,50 @@ export default class Term {
21
25
  return matches;
22
26
  }
23
27
 
28
+ getVariables(variables, context) {
29
+ const variableNodes = variableNodesQuery(this.node);
30
+
31
+ variableNodes.forEach((variableNode) => {
32
+ const variable = context.findVariableByVariableNode(variableNode),
33
+ variablesIncludesVariable = variables.includes(variable);
34
+
35
+ if (!variablesIncludesVariable) {
36
+ variables.push(variable);
37
+ }
38
+ });
39
+
40
+ return variables;
41
+ }
42
+
43
+ isInitiallyGrounded() {
44
+ const definedVariables = [],
45
+ implicitlyGrounded = this.isImplicitlyGrounded(definedVariables),
46
+ initiallyGrounded = implicitlyGrounded; ///
47
+
48
+ return initiallyGrounded;
49
+ }
50
+
51
+ isImplicitlyGrounded(definedVariables) {
52
+ const variableNodes = variableNodesQuery(this.node),
53
+ variables = definedVariables, ///
54
+ nodes = variableNodes, ///
55
+ implicitlyGrounded = nodes.every((node) => {
56
+ const variableMatchesNode = variables.some((variable) => {
57
+ const variableMatchesNode = variable.matchNode(node);
58
+
59
+ if (variableMatchesNode) {
60
+ return true;
61
+ }
62
+ });
63
+
64
+ if (variableMatchesNode) {
65
+ return true;
66
+ }
67
+ });
68
+
69
+ return implicitlyGrounded;
70
+ }
71
+
24
72
  static fromTermNodeAndType(termNode, type) {
25
73
  const node = termNode, ///
26
74
  term = new Term(node, type);
@@ -6,7 +6,7 @@ import permutationsMatrix from "../permutationsMatrix";
6
6
 
7
7
  import { MAXIMUM_INDEXES_LENGTH, MAXIMUM_PERMUTATION_LENGTH } from "../constants";
8
8
 
9
- export const { first, second, third, last, push, prune, match, filter, compress } = arrayUtilities;
9
+ export const { first, second, last, push, prune, match, filter, compress, separate } = arrayUtilities;
10
10
 
11
11
  export function someSubArray(array, subArrayLength, callback) {
12
12
  let found = false;