@jakta/jakta-prolog-incarnation 0.0.0-bootstrap

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 (49) hide show
  1. package/2p-core.js +9164 -0
  2. package/2p-core.js.map +1 -0
  3. package/2p-dsl-core.js +15 -0
  4. package/2p-dsl-core.js.map +1 -0
  5. package/2p-dsl-theory.js +15 -0
  6. package/2p-dsl-theory.js.map +1 -0
  7. package/2p-dsl-unify.js +15 -0
  8. package/2p-dsl-unify.js.map +1 -0
  9. package/2p-parser-core.js +15 -0
  10. package/2p-parser-core.js.map +1 -0
  11. package/2p-parser-impl.js +15 -0
  12. package/2p-parser-impl.js.map +1 -0
  13. package/2p-serialize-core.js +15 -0
  14. package/2p-serialize-core.js.map +1 -0
  15. package/2p-solve-classic.js +2832 -0
  16. package/2p-solve-classic.js.map +1 -0
  17. package/2p-solve.js +13916 -0
  18. package/2p-solve.js.map +1 -0
  19. package/2p-theory.js +4837 -0
  20. package/2p-theory.js.map +1 -0
  21. package/2p-unify.js +886 -0
  22. package/2p-unify.js.map +1 -0
  23. package/2p-utils.js +1361 -0
  24. package/2p-utils.js.map +1 -0
  25. package/Kermit-kermit-core.js +15 -0
  26. package/Kermit-kermit-core.js.map +1 -0
  27. package/Kermit-kermit.js +19 -0
  28. package/Kermit-kermit.js.map +1 -0
  29. package/LICENSE +201 -0
  30. package/README.md +50 -0
  31. package/jakta-jakta-api.js +15 -0
  32. package/jakta-jakta-api.js.map +1 -0
  33. package/jakta-jakta-core.js +15 -0
  34. package/jakta-jakta-core.js.map +1 -0
  35. package/jakta-jakta-dsl.js +15 -0
  36. package/jakta-jakta-dsl.js.map +1 -0
  37. package/jakta-jakta-prolog-incarnation.js +30 -0
  38. package/jakta-jakta-prolog-incarnation.js.map +1 -0
  39. package/kotlin-kotlin-stdlib.js +8814 -0
  40. package/kotlin-kotlin-stdlib.js.map +1 -0
  41. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
  42. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
  43. package/kotlinx-atomicfu.js +15 -0
  44. package/kotlinx-atomicfu.js.map +1 -0
  45. package/kotlinx-coroutines-core.js +15 -0
  46. package/kotlinx-coroutines-core.js.map +1 -0
  47. package/kt-math.js +10071 -0
  48. package/kt-math.js.map +1 -0
  49. package/package.json +9 -0
package/2p-theory.js ADDED
@@ -0,0 +1,4837 @@
1
+ (function (factory) {
2
+ if (typeof define === 'function' && define.amd)
3
+ define(['exports', './kotlin-kotlin-stdlib.js', './2p-core.js', './2p-utils.js', './2p-unify.js'], factory);
4
+ else if (typeof exports === 'object')
5
+ factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./2p-core.js'), require('./2p-utils.js'), require('./2p-unify.js'));
6
+ else {
7
+ if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
8
+ throw new Error("Error loading module '2p-theory'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to '2p-theory'.");
9
+ }
10
+ if (typeof globalThis['2p-core'] === 'undefined') {
11
+ throw new Error("Error loading module '2p-theory'. Its dependency '2p-core' was not found. Please, check whether '2p-core' is loaded prior to '2p-theory'.");
12
+ }
13
+ if (typeof globalThis['2p-utils'] === 'undefined') {
14
+ throw new Error("Error loading module '2p-theory'. Its dependency '2p-utils' was not found. Please, check whether '2p-utils' is loaded prior to '2p-theory'.");
15
+ }
16
+ if (typeof globalThis['2p-unify'] === 'undefined') {
17
+ throw new Error("Error loading module '2p-theory'. Its dependency '2p-unify' was not found. Please, check whether '2p-unify' is loaded prior to '2p-theory'.");
18
+ }
19
+ globalThis['2p-theory'] = factory(typeof globalThis['2p-theory'] === 'undefined' ? {} : globalThis['2p-theory'], globalThis['kotlin-kotlin-stdlib'], globalThis['2p-core'], globalThis['2p-utils'], globalThis['2p-unify']);
20
+ }
21
+ }(function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_utils, kotlin_it_unibo_tuprolog_unify) {
22
+ 'use strict';
23
+ //region block: imports
24
+ var imul = Math.imul;
25
+ var protoOf = kotlin_kotlin.$_$.n6;
26
+ var asIterable = kotlin_kotlin.$_$.j7;
27
+ var any = kotlin_kotlin.$_$.i7;
28
+ var asSequence = kotlin_kotlin.$_$.z1;
29
+ var getKClassFromExpression = kotlin_kotlin.$_$.d7;
30
+ var joinToString = kotlin_kotlin.$_$.q2;
31
+ var initMetadataForClass = kotlin_kotlin.$_$.y5;
32
+ var Unit_instance = kotlin_kotlin.$_$.m;
33
+ var toList = kotlin_kotlin.$_$.q8;
34
+ var none = kotlin_kotlin.$_$.f8;
35
+ var VOID = kotlin_kotlin.$_$.b;
36
+ var emptyList = kotlin_kotlin.$_$.i2;
37
+ var asIterable_0 = kotlin_kotlin.$_$.v1;
38
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.n;
39
+ var Companion_instance = kotlin_it_unibo_tuprolog_core.$_$.m;
40
+ var itemWiseEquals = kotlin_it_unibo_tuprolog_utils.$_$.c1;
41
+ var getKClass = kotlin_kotlin.$_$.e7;
42
+ var itemWiseHashCode = kotlin_it_unibo_tuprolog_utils.$_$.d1;
43
+ var itemWiseHashCode_0 = kotlin_it_unibo_tuprolog_utils.$_$.e1;
44
+ var initMetadataForCompanion = kotlin_kotlin.$_$.z5;
45
+ var initMetadataForInterface = kotlin_kotlin.$_$.a6;
46
+ var first = kotlin_kotlin.$_$.m2;
47
+ var toString = kotlin_kotlin.$_$.q6;
48
+ var hashCode = kotlin_kotlin.$_$.x5;
49
+ var equals = kotlin_kotlin.$_$.t5;
50
+ var defineProp = kotlin_kotlin.$_$.s5;
51
+ var objectCreate = kotlin_kotlin.$_$.m6;
52
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.b1;
53
+ var asReversed = kotlin_kotlin.$_$.w1;
54
+ var isInterface = kotlin_kotlin.$_$.f6;
55
+ var KProperty1 = kotlin_kotlin.$_$.f7;
56
+ var getPropertyCallableRef = kotlin_kotlin.$_$.v5;
57
+ var constructCallableReference = kotlin_kotlin.$_$.r5;
58
+ var lazy = kotlin_kotlin.$_$.na;
59
+ var CoroutineImpl = kotlin_kotlin.$_$.j4;
60
+ var THROW_CCE = kotlin_kotlin.$_$.ha;
61
+ var SequenceScope = kotlin_kotlin.$_$.g7;
62
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.i4;
63
+ var initMetadataForLambda = kotlin_kotlin.$_$.b6;
64
+ var sequence = kotlin_kotlin.$_$.k8;
65
+ var listOf = kotlin_kotlin.$_$.y2;
66
+ var mergeSequences = kotlin_it_unibo_tuprolog_utils.$_$.g1;
67
+ var sequenceOf = kotlin_kotlin.$_$.i8;
68
+ var flatten = kotlin_kotlin.$_$.w7;
69
+ var initMetadataForObject = kotlin_kotlin.$_$.c6;
70
+ var compareTo = kotlin_it_unibo_tuprolog_utils.$_$.i;
71
+ var LongIndexed = kotlin_it_unibo_tuprolog_utils.$_$.j;
72
+ var component1 = kotlin_it_unibo_tuprolog_utils.$_$.g;
73
+ var component2 = kotlin_it_unibo_tuprolog_utils.$_$.h;
74
+ var Companion_instance_0 = kotlin_it_unibo_tuprolog_utils.$_$.d;
75
+ var copyToArray = kotlin_kotlin.$_$.g2;
76
+ var plus = kotlin_kotlin.$_$.q3;
77
+ var equalsLong = kotlin_kotlin.$_$.w4;
78
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.o;
79
+ var minOrNull = kotlin_kotlin.$_$.c3;
80
+ var map = kotlin_kotlin.$_$.d8;
81
+ var ensureNotNull = kotlin_kotlin.$_$.la;
82
+ var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.q;
83
+ var sum = kotlin_kotlin.$_$.l8;
84
+ var Collection = kotlin_kotlin.$_$.o1;
85
+ var filter = kotlin_kotlin.$_$.s7;
86
+ var emptySequence = kotlin_kotlin.$_$.p7;
87
+ var dequeOf = kotlin_it_unibo_tuprolog_utils.$_$.x;
88
+ var addFirst = kotlin_it_unibo_tuprolog_utils.$_$.p;
89
+ var buffered = kotlin_it_unibo_tuprolog_utils.$_$.q;
90
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.b2;
91
+ var dequeOf_0 = kotlin_it_unibo_tuprolog_utils.$_$.v;
92
+ var Companion_instance_1 = kotlin_it_unibo_tuprolog_utils.$_$.b;
93
+ var flatMap = kotlin_kotlin.$_$.v7;
94
+ var sequenceOf_0 = kotlin_kotlin.$_$.j8;
95
+ var firstOrNull = kotlin_kotlin.$_$.t7;
96
+ var NotImplementedError = kotlin_kotlin.$_$.ca;
97
+ var take = kotlin_kotlin.$_$.n8;
98
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.e1;
99
+ var get_ONE = kotlin_kotlin.$_$.m4;
100
+ var add = kotlin_kotlin.$_$.n4;
101
+ var subtract = kotlin_kotlin.$_$.g5;
102
+ var Long = kotlin_kotlin.$_$.ba;
103
+ var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.n1;
104
+ var Companion_instance_2 = kotlin_it_unibo_tuprolog_core.$_$.l;
105
+ var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.r;
106
+ var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.n;
107
+ var numberRangeToNumber = kotlin_kotlin.$_$.j6;
108
+ var plus_0 = kotlin_kotlin.$_$.h8;
109
+ var getTag = kotlin_it_unibo_tuprolog_utils.$_$.m;
110
+ var containsTag = kotlin_it_unibo_tuprolog_utils.$_$.l;
111
+ var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_unify.$_$.a;
112
+ var Companion_instance_3 = kotlin_it_unibo_tuprolog_core.$_$.f;
113
+ var first_0 = kotlin_kotlin.$_$.n2;
114
+ var filterNotNull = kotlin_kotlin.$_$.q7;
115
+ var Taggable = kotlin_it_unibo_tuprolog_utils.$_$.n;
116
+ var filterNot = kotlin_kotlin.$_$.r7;
117
+ var asSequence_0 = kotlin_kotlin.$_$.a2;
118
+ var fromInt = kotlin_kotlin.$_$.x4;
119
+ var emptyMap = kotlin_kotlin.$_$.j2;
120
+ var toList_0 = kotlin_kotlin.$_$.y3;
121
+ var listOf_0 = kotlin_kotlin.$_$.x2;
122
+ var none_0 = kotlin_kotlin.$_$.l3;
123
+ var dequeOf_1 = kotlin_it_unibo_tuprolog_utils.$_$.w;
124
+ var Pair = kotlin_kotlin.$_$.fa;
125
+ var toMutableList = kotlin_kotlin.$_$.e4;
126
+ var toMutableList_0 = kotlin_kotlin.$_$.r8;
127
+ var addFirst_0 = kotlin_it_unibo_tuprolog_utils.$_$.o;
128
+ var addAll = kotlin_kotlin.$_$.s1;
129
+ //endregion
130
+ //region block: pre-declaration
131
+ initMetadataForClass(AbstractClauseCollection, 'AbstractClauseCollection');
132
+ initMetadataForClass(AbstractMutableReteClauseCollection, 'AbstractMutableReteClauseCollection', VOID, AbstractClauseCollection);
133
+ initMetadataForClass(AbstractReteClauseCollection, 'AbstractReteClauseCollection', VOID, AbstractClauseCollection);
134
+ initMetadataForCompanion(Companion);
135
+ function get(clause) {
136
+ return this.getFifoOrdered(clause);
137
+ }
138
+ function add_0(clause) {
139
+ return this.addLast(clause);
140
+ }
141
+ function add_1(clause) {
142
+ return this.j1i(clause);
143
+ }
144
+ function retrieve(clause) {
145
+ return this.retrieveFirst(clause);
146
+ }
147
+ function retrieve_0(clause) {
148
+ return this.m1i(clause);
149
+ }
150
+ initMetadataForInterface(ClauseQueue, 'ClauseQueue');
151
+ initMetadataForCompanion(Companion_0);
152
+ initMetadataForInterface(MutableClauseQueue, 'MutableClauseQueue', VOID, VOID, [ClauseQueue]);
153
+ initMetadataForClass(RetrieveResult, 'RetrieveResult');
154
+ initMetadataForClass(Success, 'Success', VOID, RetrieveResult);
155
+ initMetadataForClass(Failure, 'Failure', VOID, RetrieveResult);
156
+ initMetadataForClass(MutableReteClauseQueue, 'MutableReteClauseQueue', VOID, AbstractMutableReteClauseCollection, [MutableClauseQueue]);
157
+ initMetadataForClass(ReteClauseQueue, 'ReteClauseQueue', VOID, AbstractReteClauseCollection, [ClauseQueue]);
158
+ initMetadataForLambda(AbstractReteNode$removeAllLazily$slambda, CoroutineImpl, VOID, [1]);
159
+ initMetadataForClass(AbstractReteNode, 'AbstractReteNode');
160
+ initMetadataForCompanion(Companion_1);
161
+ initMetadataForLambda(Utils$firstArguments$slambda, CoroutineImpl, VOID, [1]);
162
+ initMetadataForObject(Utils, 'Utils');
163
+ function get_innerClause() {
164
+ return this.c2();
165
+ }
166
+ function plus_1(traversed) {
167
+ return Companion_instance_7.n1l(this.wo(), this.b1k(), plus(this.j1l(), traversed));
168
+ }
169
+ initMetadataForInterface(IndexedClause, 'IndexedClause', VOID, VOID, [LongIndexed]);
170
+ initMetadataForClass(IndexedClause$Companion$wrap$1, VOID, VOID, VOID, [IndexedClause]);
171
+ initMetadataForCompanion(Companion_2);
172
+ initMetadataForInterface(SituatedIndexedClause, 'SituatedIndexedClause', VOID, VOID, [IndexedClause]);
173
+ initMetadataForClass(SituatedIndexedClause$Companion$of$1, VOID, VOID, VOID, [SituatedIndexedClause]);
174
+ initMetadataForCompanion(Companion_3);
175
+ initMetadataForClass(AbstractIndexingLeaf, 'AbstractIndexingLeaf', VOID, AbstractReteNode);
176
+ initMetadataForClass(AtomIndex, 'AtomIndex', VOID, AbstractIndexingLeaf);
177
+ initMetadataForClass(CompoundIndex, 'CompoundIndex', VOID, AbstractReteNode);
178
+ initMetadataForClass(DirectiveIndex$getCache$1$1);
179
+ initMetadataForClass(DirectiveIndex, 'DirectiveIndex', VOID, AbstractReteNode);
180
+ initMetadataForClass(NumericIndex, 'NumericIndex', VOID, AbstractIndexingLeaf);
181
+ initMetadataForClass(VariableIndex, 'VariableIndex', VOID, AbstractIndexingLeaf);
182
+ initMetadataForClass(ArityNode, 'ArityNode', VOID, AbstractReteNode);
183
+ initMetadataForClass(FamilyArityReteNode, 'FamilyArityReteNode', VOID, ArityNode);
184
+ initMetadataForClass(FamilyArityIndexingNode, 'FamilyArityIndexingNode', VOID, FamilyArityReteNode);
185
+ initMetadataForClass(FunctorNode, 'FunctorNode', VOID, AbstractReteNode);
186
+ initMetadataForClass(FunctorIndexingNode, 'FunctorIndexingNode', VOID, FunctorNode);
187
+ initMetadataForClass(RootNode, 'RootNode');
188
+ initMetadataForClass(RuleNode, 'RuleNode');
189
+ initMetadataForClass(TopLevelFunctorReteNode, 'TopLevelFunctorReteNode', VOID, FunctorNode);
190
+ initMetadataForClass(ZeroArityReteNode, 'ZeroArityReteNode', VOID, ArityNode);
191
+ function get_isMutable() {
192
+ return false;
193
+ }
194
+ function get_rules() {
195
+ var tmp = asSequence(this.h1i());
196
+ return asIterable(filterNotNull(map(tmp, Theory$_get_rules_$lambda_c39n1s)));
197
+ }
198
+ function get_directives() {
199
+ var tmp = asSequence(this.h1i());
200
+ return asIterable(filterNotNull(map(tmp, Theory$_get_directives_$lambda_zbsn17)));
201
+ }
202
+ function plus_2(clause) {
203
+ return this.assertZ(clause);
204
+ }
205
+ function assertAFact(struct) {
206
+ return this.assertA(Companion_instance_3.of(struct));
207
+ }
208
+ function assertZFact(struct) {
209
+ return this.assertZ(Companion_instance_3.of(struct));
210
+ }
211
+ function retractByHead(head) {
212
+ return this.retract(Companion_instance_2.of(head, [Companion_getInstance().anonymous()]));
213
+ }
214
+ function retractAllByHead(head) {
215
+ return this.retractAll(Companion_instance_2.of(head, [Companion_getInstance().anonymous()]));
216
+ }
217
+ initMetadataForInterface(Theory, 'Theory', VOID, VOID, [Taggable]);
218
+ initMetadataForClass(AbstractTheory, 'AbstractTheory', VOID, VOID, [Theory]);
219
+ function emptyTheory() {
220
+ return this.emptyTheoryWithUnificator(this.x1h());
221
+ }
222
+ function theoryOfIterable(clauses) {
223
+ return this.theoryOfIterableWithUnificator(clauses, this.x1h());
224
+ }
225
+ function theoryOf(clauses) {
226
+ return this.theoryOfWithUnificator(this.x1h(), clauses.slice());
227
+ }
228
+ function theoryOfSequence(clauses) {
229
+ return this.theoryOfSequenceWithUnificator(clauses, this.x1h());
230
+ }
231
+ function emptyMutableTheory() {
232
+ return this.emptyMutableTheoryWithUnificator(this.x1h());
233
+ }
234
+ function mutableTheoryOfIterable(clauses) {
235
+ return this.mutableTheoryOfIterableWithUnificator(clauses, this.x1h());
236
+ }
237
+ function mutableTheoryOf(clauses) {
238
+ return this.mutableTheoryOfWithUnificator(this.x1h(), clauses.slice());
239
+ }
240
+ function mutableTheoryOfSequence(clauses) {
241
+ return this.mutableTheoryOfSequenceWithUnificator(clauses, this.x1h());
242
+ }
243
+ initMetadataForInterface(TheoryFactory, 'TheoryFactory');
244
+ initMetadataForObject(Default, 'Default', VOID, VOID, [TheoryFactory]);
245
+ initMetadataForClass(IndexedTheoryFactory, 'IndexedTheoryFactory', VOID, VOID, [TheoryFactory]);
246
+ initMetadataForObject(Default_0, 'Default', VOID, VOID, [TheoryFactory]);
247
+ initMetadataForClass(ListedTheoryFactory, 'ListedTheoryFactory', VOID, VOID, [TheoryFactory]);
248
+ initMetadataForCompanion(Companion_4);
249
+ function get_isMutable_0() {
250
+ return true;
251
+ }
252
+ function toMutableTheory() {
253
+ return this;
254
+ }
255
+ function assertAFact_0(struct) {
256
+ return this.c1p(Companion_instance_3.of(struct));
257
+ }
258
+ function assertZFact_0(struct) {
259
+ return this.g1p(Companion_instance_3.of(struct));
260
+ }
261
+ function retractByHead_0(head) {
262
+ return this.d1q(Companion_instance_2.of(head, [Companion_getInstance().anonymous()]));
263
+ }
264
+ function retractAllByHead_0(head) {
265
+ return this.p1i(Companion_instance_2.of(head, [Companion_getInstance().anonymous()]));
266
+ }
267
+ initMetadataForInterface(MutableTheory, 'MutableTheory', VOID, VOID, [Theory]);
268
+ initMetadataForClass(RetractResult, 'RetractResult');
269
+ initMetadataForClass(Success_0, 'Success', VOID, RetractResult);
270
+ initMetadataForClass(Failure_0, 'Failure', VOID, RetractResult);
271
+ initMetadataForCompanion(Companion_5);
272
+ initMetadataForObject(TheoryUtils, 'TheoryUtils');
273
+ initMetadataForClass(AbstractIndexedTheory$clauses$$inlined$Iterable$1);
274
+ initMetadataForClass(AbstractIndexedTheory, 'AbstractIndexedTheory', VOID, AbstractTheory);
275
+ initMetadataForClass(AbstractListedTheory, 'AbstractListedTheory', VOID, AbstractTheory);
276
+ initMetadataForClass(IndexedTheory, 'IndexedTheory', VOID, AbstractIndexedTheory);
277
+ initMetadataForClass(ListedTheory, 'ListedTheory', VOID, AbstractListedTheory);
278
+ initMetadataForClass(MutableIndexedTheory, 'MutableIndexedTheory', VOID, AbstractIndexedTheory, [MutableTheory]);
279
+ initMetadataForClass(MutableListedTheory, 'MutableListedTheory', VOID, AbstractListedTheory, [MutableTheory]);
280
+ //endregion
281
+ function AbstractClauseCollection(rete) {
282
+ this.w1h_1 = rete;
283
+ }
284
+ protoOf(AbstractClauseCollection).x1h = function () {
285
+ return this.w1h_1.x1h();
286
+ };
287
+ protoOf(AbstractClauseCollection).s = function () {
288
+ return this.w1h_1.s();
289
+ };
290
+ protoOf(AbstractClauseCollection).z1h = function () {
291
+ return asIterable(this.w1h_1.a1i());
292
+ };
293
+ protoOf(AbstractClauseCollection).b1i = function () {
294
+ return asIterable(this.w1h_1.b1i());
295
+ };
296
+ protoOf(AbstractClauseCollection).g = function () {
297
+ return this.w1h_1.c1i();
298
+ };
299
+ protoOf(AbstractClauseCollection).isEmpty = function () {
300
+ return this.g();
301
+ };
302
+ protoOf(AbstractClauseCollection).d1i = function () {
303
+ return !this.g();
304
+ };
305
+ protoOf(AbstractClauseCollection).isNonEmpty = function () {
306
+ return this.d1i();
307
+ };
308
+ protoOf(AbstractClauseCollection).e1i = function (element) {
309
+ return any(this.w1h_1.f1i(element));
310
+ };
311
+ protoOf(AbstractClauseCollection).contains = function (element) {
312
+ return this.e1i(element);
313
+ };
314
+ protoOf(AbstractClauseCollection).g1i = function (elements) {
315
+ var tmp0 = asSequence(elements);
316
+ var tmp$ret$0;
317
+ $l$block: {
318
+ // Inline function 'kotlin.sequences.all' call
319
+ var _iterator__ex2g4s = tmp0.m();
320
+ while (_iterator__ex2g4s.p()) {
321
+ var element = _iterator__ex2g4s.q();
322
+ if (!this.e1i(element)) {
323
+ tmp$ret$0 = false;
324
+ break $l$block;
325
+ }
326
+ }
327
+ tmp$ret$0 = true;
328
+ }
329
+ return tmp$ret$0;
330
+ };
331
+ protoOf(AbstractClauseCollection).containsAll = function (elements) {
332
+ return this.g1i(elements);
333
+ };
334
+ protoOf(AbstractClauseCollection).m = function () {
335
+ return this.w1h_1.h1i().m();
336
+ };
337
+ protoOf(AbstractClauseCollection).toString = function () {
338
+ return '' + getKClassFromExpression(this).g9() + '(' + joinToString(this, ', ') + ')';
339
+ };
340
+ function AbstractMutableReteClauseCollection_init_$Init$(rete, $this) {
341
+ AbstractClauseCollection.call($this, rete);
342
+ AbstractMutableReteClauseCollection.call($this);
343
+ return $this;
344
+ }
345
+ protoOf(AbstractMutableReteClauseCollection).j1i = function (clause) {
346
+ this.w1h_1.k1i(clause);
347
+ return this.y1h();
348
+ };
349
+ protoOf(AbstractMutableReteClauseCollection).add = function (clause) {
350
+ return this.j1i(clause);
351
+ };
352
+ protoOf(AbstractMutableReteClauseCollection).l1i = function (clauses) {
353
+ // Inline function 'kotlin.collections.forEach' call
354
+ var _iterator__ex2g4s = clauses.m();
355
+ while (_iterator__ex2g4s.p()) {
356
+ var element = _iterator__ex2g4s.q();
357
+ this.w1h_1.k1i(element);
358
+ }
359
+ return this.y1h();
360
+ };
361
+ protoOf(AbstractMutableReteClauseCollection).addAll = function (clauses) {
362
+ return this.l1i(clauses);
363
+ };
364
+ protoOf(AbstractMutableReteClauseCollection).m1i = function (clause) {
365
+ var retracted = this.w1h_1.n1i(clause);
366
+ return none(retracted) ? new Failure(this.y1h()) : new Success(this.y1h(), toList(retracted));
367
+ };
368
+ protoOf(AbstractMutableReteClauseCollection).retrieve = function (clause) {
369
+ return this.m1i(clause);
370
+ };
371
+ protoOf(AbstractMutableReteClauseCollection).o1i = function (clause) {
372
+ var retracted = this.w1h_1.p1i(clause);
373
+ return none(retracted) ? new Failure(this.y1h()) : new Success(this.y1h(), toList(retracted));
374
+ };
375
+ protoOf(AbstractMutableReteClauseCollection).retrieveAll = function (clause) {
376
+ return this.o1i(clause);
377
+ };
378
+ function AbstractMutableReteClauseCollection() {
379
+ }
380
+ function AbstractReteClauseCollection(rete) {
381
+ AbstractClauseCollection.call(this, rete);
382
+ }
383
+ protoOf(AbstractReteClauseCollection).j1i = function (clause) {
384
+ // Inline function 'kotlin.apply' call
385
+ var this_0 = this.w1h_1.s1i();
386
+ this_0.k1i(TheoryUtils_instance.t1i(clause));
387
+ return this.r1i(this_0);
388
+ };
389
+ protoOf(AbstractReteClauseCollection).add = function (clause) {
390
+ return this.j1i(clause);
391
+ };
392
+ protoOf(AbstractReteClauseCollection).l1i = function (clauses) {
393
+ // Inline function 'kotlin.apply' call
394
+ var this_0 = this.w1h_1.s1i();
395
+ // Inline function 'kotlin.collections.forEach' call
396
+ var _iterator__ex2g4s = clauses.m();
397
+ while (_iterator__ex2g4s.p()) {
398
+ var element = _iterator__ex2g4s.q();
399
+ this_0.k1i(TheoryUtils_instance.t1i(element));
400
+ }
401
+ return this.r1i(this_0);
402
+ };
403
+ protoOf(AbstractReteClauseCollection).addAll = function (clauses) {
404
+ return this.l1i(clauses);
405
+ };
406
+ protoOf(AbstractReteClauseCollection).m1i = function (clause) {
407
+ var newTheory = this.w1h_1.s1i();
408
+ var retracted = newTheory.n1i(clause);
409
+ return none(retracted) ? new Failure(this.y1h()) : new Success(this.r1i(newTheory), toList(retracted));
410
+ };
411
+ protoOf(AbstractReteClauseCollection).retrieve = function (clause) {
412
+ return this.m1i(clause);
413
+ };
414
+ protoOf(AbstractReteClauseCollection).o1i = function (clause) {
415
+ var newTheory = this.w1h_1.s1i();
416
+ var retracted = newTheory.p1i(clause);
417
+ return none(retracted) ? new Failure(this.y1h()) : new Success(this.r1i(newTheory), toList(retracted));
418
+ };
419
+ protoOf(AbstractReteClauseCollection).retrieveAll = function (clause) {
420
+ return this.o1i(clause);
421
+ };
422
+ function Companion() {
423
+ }
424
+ protoOf(Companion).empty = function (unificator) {
425
+ return this.ofIterable(unificator, emptyList());
426
+ };
427
+ protoOf(Companion).of = function (unificator, clause) {
428
+ return this.ofIterable(unificator, asIterable_0(clause));
429
+ };
430
+ protoOf(Companion).ofScopes = function (unificator, clause) {
431
+ // Inline function 'kotlin.collections.map' call
432
+ // Inline function 'kotlin.collections.mapTo' call
433
+ var destination = ArrayList_init_$Create$(clause.length);
434
+ var inductionVariable = 0;
435
+ var last = clause.length;
436
+ while (inductionVariable < last) {
437
+ var item = clause[inductionVariable];
438
+ inductionVariable = inductionVariable + 1 | 0;
439
+ var tmp$ret$2 = Companion_instance.emptyWithFunction(item);
440
+ destination.j(tmp$ret$2);
441
+ }
442
+ return this.ofIterable(unificator, destination);
443
+ };
444
+ protoOf(Companion).ofSequence = function (unificator, clauses) {
445
+ return this.ofIterable(unificator, asIterable(clauses));
446
+ };
447
+ protoOf(Companion).ofIterable = function (unificator, clauses) {
448
+ return ReteClauseQueue_init_$Create$(unificator, clauses);
449
+ };
450
+ protoOf(Companion).areEquals = function (queue1, queue2) {
451
+ return itemWiseEquals(queue1, queue2);
452
+ };
453
+ protoOf(Companion).computeHashCode = function (queue) {
454
+ return itemWiseHashCode_0([getKClass(ClauseQueue), itemWiseHashCode(queue)]);
455
+ };
456
+ var Companion_instance_4;
457
+ function Companion_getInstance_2() {
458
+ return Companion_instance_4;
459
+ }
460
+ function ClauseQueue() {
461
+ }
462
+ function Companion_0() {
463
+ }
464
+ protoOf(Companion_0).empty = function (unificator) {
465
+ return this.ofIterable(unificator, emptyList());
466
+ };
467
+ protoOf(Companion_0).of = function (unificator, clause) {
468
+ return this.ofIterable(unificator, asIterable_0(clause));
469
+ };
470
+ protoOf(Companion_0).ofScopes = function (unificator, clause) {
471
+ // Inline function 'kotlin.collections.map' call
472
+ // Inline function 'kotlin.collections.mapTo' call
473
+ var destination = ArrayList_init_$Create$(clause.length);
474
+ var inductionVariable = 0;
475
+ var last = clause.length;
476
+ while (inductionVariable < last) {
477
+ var item = clause[inductionVariable];
478
+ inductionVariable = inductionVariable + 1 | 0;
479
+ var tmp$ret$2 = Companion_instance.emptyWithFunction(item);
480
+ destination.j(tmp$ret$2);
481
+ }
482
+ return this.ofIterable(unificator, destination);
483
+ };
484
+ protoOf(Companion_0).ofSequence = function (unificator, clauses) {
485
+ return this.ofIterable(unificator, asIterable(clauses));
486
+ };
487
+ protoOf(Companion_0).ofIterable = function (unificator, clauses) {
488
+ return MutableReteClauseQueue_init_$Create$(unificator, clauses);
489
+ };
490
+ protoOf(Companion_0).areEquals = function (queue1, queue2) {
491
+ return Companion_instance_4.areEquals(queue1, queue2);
492
+ };
493
+ protoOf(Companion_0).computeHashCode = function (queue) {
494
+ return itemWiseHashCode_0([getKClass(MutableClauseQueue), itemWiseHashCode(queue)]);
495
+ };
496
+ var Companion_instance_5;
497
+ function Companion_getInstance_3() {
498
+ return Companion_instance_5;
499
+ }
500
+ function MutableClauseQueue() {
501
+ }
502
+ function Success(collection, clauses) {
503
+ RetrieveResult.call(this);
504
+ this.x1i_1 = collection;
505
+ this.y1i_1 = clauses;
506
+ }
507
+ protoOf(Success).z1i = function () {
508
+ return this.x1i_1;
509
+ };
510
+ protoOf(Success).h1i = function () {
511
+ return this.y1i_1;
512
+ };
513
+ protoOf(Success).lz = function () {
514
+ return true;
515
+ };
516
+ protoOf(Success).a1j = function () {
517
+ return first(this.y1i_1);
518
+ };
519
+ protoOf(Success).toString = function () {
520
+ return 'Success(collection=' + toString(this.x1i_1) + ', clauses=' + toString(this.y1i_1) + ')';
521
+ };
522
+ protoOf(Success).hashCode = function () {
523
+ var result = hashCode(this.x1i_1);
524
+ result = imul(result, 31) + hashCode(this.y1i_1) | 0;
525
+ return result;
526
+ };
527
+ protoOf(Success).equals = function (other) {
528
+ if (this === other)
529
+ return true;
530
+ if (!(other instanceof Success))
531
+ return false;
532
+ if (!equals(this.x1i_1, other.x1i_1))
533
+ return false;
534
+ if (!equals(this.y1i_1, other.y1i_1))
535
+ return false;
536
+ return true;
537
+ };
538
+ function Failure(collection) {
539
+ RetrieveResult.call(this);
540
+ this.c1j_1 = collection;
541
+ }
542
+ protoOf(Failure).z1i = function () {
543
+ return this.c1j_1;
544
+ };
545
+ protoOf(Failure).b1j = function () {
546
+ return true;
547
+ };
548
+ protoOf(Failure).h1i = function () {
549
+ return null;
550
+ };
551
+ protoOf(Failure).a1j = function () {
552
+ return null;
553
+ };
554
+ protoOf(Failure).toString = function () {
555
+ return 'Failure(collection=' + toString(this.c1j_1) + ')';
556
+ };
557
+ protoOf(Failure).hashCode = function () {
558
+ return hashCode(this.c1j_1);
559
+ };
560
+ protoOf(Failure).equals = function (other) {
561
+ if (this === other)
562
+ return true;
563
+ if (!(other instanceof Failure))
564
+ return false;
565
+ if (!equals(this.c1j_1, other.c1j_1))
566
+ return false;
567
+ return true;
568
+ };
569
+ function RetrieveResult() {
570
+ }
571
+ protoOf(RetrieveResult).lz = function () {
572
+ return false;
573
+ };
574
+ protoOf(RetrieveResult).b1j = function () {
575
+ return false;
576
+ };
577
+ function MutableReteClauseQueue_init_$Init$(unificator, clauses, $this) {
578
+ MutableReteClauseQueue.call($this, Companion_instance_6.d1j(unificator, clauses));
579
+ TheoryUtils_instance.e1j(clauses);
580
+ return $this;
581
+ }
582
+ function MutableReteClauseQueue_init_$Create$(unificator, clauses) {
583
+ return MutableReteClauseQueue_init_$Init$(unificator, clauses, objectCreate(protoOf(MutableReteClauseQueue)));
584
+ }
585
+ function MutableReteClauseQueue(rete) {
586
+ AbstractMutableReteClauseCollection_init_$Init$(rete, this);
587
+ // Inline function 'kotlin.require' call
588
+ // Inline function 'kotlin.require' call
589
+ if (!rete.f1j()) {
590
+ var message = 'Failed requirement.';
591
+ throw IllegalArgumentException_init_$Create$(toString(message));
592
+ }
593
+ }
594
+ protoOf(MutableReteClauseQueue).h1j = function (clause) {
595
+ return this.w1h_1.f1i(clause);
596
+ };
597
+ protoOf(MutableReteClauseQueue).getFifoOrdered = function (clause) {
598
+ return this.h1j(clause);
599
+ };
600
+ protoOf(MutableReteClauseQueue).i1j = function (clause) {
601
+ return asSequence(asReversed(toList(this.h1j(clause))));
602
+ };
603
+ protoOf(MutableReteClauseQueue).getLifoOrdered = function (clause) {
604
+ return this.i1j(clause);
605
+ };
606
+ protoOf(MutableReteClauseQueue).u1i = function (clause) {
607
+ this.w1h_1.j1j(clause);
608
+ return this;
609
+ };
610
+ protoOf(MutableReteClauseQueue).addFirst = function (clause) {
611
+ return this.u1i(clause);
612
+ };
613
+ protoOf(MutableReteClauseQueue).v1i = function (clause) {
614
+ this.w1h_1.k1i(clause);
615
+ return this;
616
+ };
617
+ protoOf(MutableReteClauseQueue).addLast = function (clause) {
618
+ return this.v1i(clause);
619
+ };
620
+ protoOf(MutableReteClauseQueue).w1i = function (clause) {
621
+ var retracted = this.w1h_1.n1i(clause);
622
+ return none(retracted) ? new Failure(this) : new Success(this, toList(retracted));
623
+ };
624
+ protoOf(MutableReteClauseQueue).retrieveFirst = function (clause) {
625
+ return this.w1i(clause);
626
+ };
627
+ protoOf(MutableReteClauseQueue).equals = function (other) {
628
+ var tmp;
629
+ if (!(other == null) ? isInterface(other, MutableClauseQueue) : false) {
630
+ tmp = Companion_instance_5.areEquals(this, other);
631
+ } else {
632
+ tmp = false;
633
+ }
634
+ return tmp;
635
+ };
636
+ protoOf(MutableReteClauseQueue).hashCode = function () {
637
+ return Companion_instance_5.computeHashCode(this);
638
+ };
639
+ protoOf(MutableReteClauseQueue).y1h = function () {
640
+ return this;
641
+ };
642
+ function _get_hashCodeCache__ny3r0q($this) {
643
+ var tmp0 = $this.l1j_1;
644
+ var tmp = KProperty1;
645
+ // Inline function 'kotlin.getValue' call
646
+ getPropertyCallableRef('hashCodeCache', 1, tmp, ReteClauseQueue$_get_hashCodeCache_$ref_rnll9p(), null);
647
+ return tmp0.c2();
648
+ }
649
+ function ReteClauseQueue_init_$Init$(unificator, clauses, $this) {
650
+ ReteClauseQueue.call($this, Companion_instance_6.d1j(unificator, clauses));
651
+ TheoryUtils_instance.e1j(clauses);
652
+ return $this;
653
+ }
654
+ function ReteClauseQueue_init_$Create$(unificator, clauses) {
655
+ return ReteClauseQueue_init_$Init$(unificator, clauses, objectCreate(protoOf(ReteClauseQueue)));
656
+ }
657
+ function ReteClauseQueue$hashCodeCache$delegate$lambda(this$0) {
658
+ return function () {
659
+ return Companion_instance_4.computeHashCode(this$0);
660
+ };
661
+ }
662
+ function ReteClauseQueue$_get_hashCodeCache_$ref_rnll9p() {
663
+ return constructCallableReference(function (p0) {
664
+ return _get_hashCodeCache__ny3r0q(p0);
665
+ }, 1, 0, 29);
666
+ }
667
+ function ReteClauseQueue(rete) {
668
+ AbstractReteClauseCollection.call(this, rete);
669
+ var tmp = this;
670
+ tmp.l1j_1 = lazy(ReteClauseQueue$hashCodeCache$delegate$lambda(this));
671
+ // Inline function 'kotlin.require' call
672
+ // Inline function 'kotlin.require' call
673
+ if (!rete.f1j()) {
674
+ var message = 'Failed requirement.';
675
+ throw IllegalArgumentException_init_$Create$(toString(message));
676
+ }
677
+ }
678
+ protoOf(ReteClauseQueue).u1i = function (clause) {
679
+ // Inline function 'kotlin.apply' call
680
+ var this_0 = this.w1h_1.s1i();
681
+ this_0.j1j(TheoryUtils_instance.t1i(clause));
682
+ return new ReteClauseQueue(this_0);
683
+ };
684
+ protoOf(ReteClauseQueue).addFirst = function (clause) {
685
+ return this.u1i(clause);
686
+ };
687
+ protoOf(ReteClauseQueue).v1i = function (clause) {
688
+ // Inline function 'kotlin.apply' call
689
+ var this_0 = this.w1h_1.s1i();
690
+ this_0.k1i(TheoryUtils_instance.t1i(clause));
691
+ return new ReteClauseQueue(this_0);
692
+ };
693
+ protoOf(ReteClauseQueue).addLast = function (clause) {
694
+ return this.v1i(clause);
695
+ };
696
+ protoOf(ReteClauseQueue).h1j = function (clause) {
697
+ return this.w1h_1.f1i(clause);
698
+ };
699
+ protoOf(ReteClauseQueue).getFifoOrdered = function (clause) {
700
+ return this.h1j(clause);
701
+ };
702
+ protoOf(ReteClauseQueue).i1j = function (clause) {
703
+ return asSequence(asReversed(toList(this.h1j(clause))));
704
+ };
705
+ protoOf(ReteClauseQueue).getLifoOrdered = function (clause) {
706
+ return this.i1j(clause);
707
+ };
708
+ protoOf(ReteClauseQueue).j1i = function (clause) {
709
+ return this.v1i(clause);
710
+ };
711
+ protoOf(ReteClauseQueue).add = function (clause) {
712
+ return this.j1i(clause);
713
+ };
714
+ protoOf(ReteClauseQueue).m1i = function (clause) {
715
+ return protoOf(AbstractReteClauseCollection).m1i.call(this, clause);
716
+ };
717
+ protoOf(ReteClauseQueue).retrieve = function (clause) {
718
+ return this.m1i(clause);
719
+ };
720
+ protoOf(ReteClauseQueue).w1i = function (clause) {
721
+ return protoOf(AbstractReteClauseCollection).m1i.call(this, clause);
722
+ };
723
+ protoOf(ReteClauseQueue).retrieveFirst = function (clause) {
724
+ return this.w1i(clause);
725
+ };
726
+ protoOf(ReteClauseQueue).r1i = function (rete) {
727
+ return new ReteClauseQueue(rete);
728
+ };
729
+ protoOf(ReteClauseQueue).equals = function (other) {
730
+ var tmp;
731
+ var tmp_0;
732
+ if (!(other == null) ? isInterface(other, ClauseQueue) : false) {
733
+ tmp_0 = !isInterface(other, MutableClauseQueue);
734
+ } else {
735
+ tmp_0 = false;
736
+ }
737
+ if (tmp_0) {
738
+ tmp = Companion_instance_4.areEquals(this, other);
739
+ } else {
740
+ tmp = false;
741
+ }
742
+ return tmp;
743
+ };
744
+ protoOf(ReteClauseQueue).hashCode = function () {
745
+ return _get_hashCodeCache__ny3r0q(this);
746
+ };
747
+ protoOf(ReteClauseQueue).y1h = function () {
748
+ return this;
749
+ };
750
+ function AbstractReteNode$removeAllLazily$slambda($source, this$0, $clause, resultContinuation) {
751
+ this.u1j_1 = $source;
752
+ this.v1j_1 = this$0;
753
+ this.w1j_1 = $clause;
754
+ CoroutineImpl.call(this, resultContinuation);
755
+ }
756
+ protoOf(AbstractReteNode$removeAllLazily$slambda).lp = function ($this$sequence, $completion) {
757
+ var tmp = this.mp($this$sequence, $completion);
758
+ tmp.i8_1 = Unit_instance;
759
+ tmp.j8_1 = null;
760
+ return tmp.o8();
761
+ };
762
+ protoOf(AbstractReteNode$removeAllLazily$slambda).f9 = function (p1, $completion) {
763
+ return this.lp(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
764
+ };
765
+ protoOf(AbstractReteNode$removeAllLazily$slambda).o8 = function () {
766
+ var suspendResult = this.i8_1;
767
+ $sm: do
768
+ try {
769
+ var tmp = this.g8_1;
770
+ switch (tmp) {
771
+ case 0:
772
+ this.h8_1 = 5;
773
+ this.y1j_1 = this.u1j_1.m();
774
+ this.g8_1 = 1;
775
+ continue $sm;
776
+ case 1:
777
+ if (!this.y1j_1.p()) {
778
+ this.g8_1 = 4;
779
+ continue $sm;
780
+ }
781
+
782
+ var it = this.y1j_1.q();
783
+ if (this.v1j_1.x1h().match(it.b1k(), this.w1j_1)) {
784
+ it.z1j();
785
+ this.y1j_1.g3();
786
+ this.g8_1 = 2;
787
+ suspendResult = this.x1j_1.nc(it, this);
788
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
789
+ return suspendResult;
790
+ }
791
+ continue $sm;
792
+ } else {
793
+ this.g8_1 = 3;
794
+ continue $sm;
795
+ }
796
+
797
+ case 2:
798
+ this.g8_1 = 3;
799
+ continue $sm;
800
+ case 3:
801
+ this.g8_1 = 1;
802
+ continue $sm;
803
+ case 4:
804
+ return Unit_instance;
805
+ case 5:
806
+ throw this.j8_1;
807
+ }
808
+ } catch ($p) {
809
+ var e = $p;
810
+ if (this.h8_1 === 5) {
811
+ throw e;
812
+ } else {
813
+ this.g8_1 = this.h8_1;
814
+ this.j8_1 = e;
815
+ }
816
+ }
817
+ while (true);
818
+ };
819
+ protoOf(AbstractReteNode$removeAllLazily$slambda).mp = function ($this$sequence, completion) {
820
+ var i = new AbstractReteNode$removeAllLazily$slambda(this.u1j_1, this.v1j_1, this.w1j_1, completion);
821
+ i.x1j_1 = $this$sequence;
822
+ return i;
823
+ };
824
+ function AbstractReteNode$removeAllLazily$slambda_0($source, this$0, $clause, resultContinuation) {
825
+ var i = new AbstractReteNode$removeAllLazily$slambda($source, this$0, $clause, resultContinuation);
826
+ return constructCallableReference(function ($this$sequence, $completion) {
827
+ return i.lp($this$sequence, $completion);
828
+ }, 1);
829
+ }
830
+ function AbstractReteNode(unificator) {
831
+ this.a1k_1 = unificator;
832
+ }
833
+ protoOf(AbstractReteNode).x1h = function () {
834
+ return this.a1k_1;
835
+ };
836
+ protoOf(AbstractReteNode).c1k = function (source, clause) {
837
+ return sequence(AbstractReteNode$removeAllLazily$slambda_0(source, this, clause, null));
838
+ };
839
+ function ReteNode$assertA$ref() {
840
+ return constructCallableReference(function (p0, p1) {
841
+ p0.d1k(p1);
842
+ return Unit_instance;
843
+ }, 2, 0, 30, 'assertA');
844
+ }
845
+ function ReteNode$assertZ$ref() {
846
+ return constructCallableReference(function (p0, p1) {
847
+ p0.e1k(p1);
848
+ return Unit_instance;
849
+ }, 2, 0, 31, 'assertZ');
850
+ }
851
+ function Companion_1() {
852
+ }
853
+ protoOf(Companion_1).d1j = function (unificator, clauses) {
854
+ return new RootNode(unificator, clauses, true);
855
+ };
856
+ var Companion_instance_6;
857
+ function Companion_getInstance_4() {
858
+ return Companion_instance_6;
859
+ }
860
+ function firstArguments($this, $receiver) {
861
+ return sequence(Utils$firstArguments$slambda_0($receiver, null));
862
+ }
863
+ function Utils$firstArguments$slambda($this_firstArguments, resultContinuation) {
864
+ this.p1k_1 = $this_firstArguments;
865
+ CoroutineImpl.call(this, resultContinuation);
866
+ }
867
+ protoOf(Utils$firstArguments$slambda).s1k = function ($this$sequence, $completion) {
868
+ var tmp = this.t1k($this$sequence, $completion);
869
+ tmp.i8_1 = Unit_instance;
870
+ tmp.j8_1 = null;
871
+ return tmp.o8();
872
+ };
873
+ protoOf(Utils$firstArguments$slambda).f9 = function (p1, $completion) {
874
+ return this.s1k(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
875
+ };
876
+ protoOf(Utils$firstArguments$slambda).o8 = function () {
877
+ var suspendResult = this.i8_1;
878
+ $sm: do
879
+ try {
880
+ var tmp = this.g8_1;
881
+ switch (tmp) {
882
+ case 0:
883
+ this.h8_1 = 5;
884
+ this.r1k_1 = this.p1k_1;
885
+ this.g8_1 = 1;
886
+ continue $sm;
887
+ case 1:
888
+ if (!this.r1k_1.nt()) {
889
+ this.g8_1 = 3;
890
+ continue $sm;
891
+ }
892
+
893
+ this.g8_1 = 2;
894
+ suspendResult = this.q1k_1.nc(this.r1k_1, this);
895
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
896
+ return suspendResult;
897
+ }
898
+
899
+ continue $sm;
900
+ case 2:
901
+ this.r1k_1 = this.r1k_1.castToStruct().getArgAt(0);
902
+ this.g8_1 = 1;
903
+ continue $sm;
904
+ case 3:
905
+ this.g8_1 = 4;
906
+ suspendResult = this.q1k_1.nc(this.r1k_1, this);
907
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
908
+ return suspendResult;
909
+ }
910
+
911
+ continue $sm;
912
+ case 4:
913
+ return Unit_instance;
914
+ case 5:
915
+ throw this.j8_1;
916
+ }
917
+ } catch ($p) {
918
+ var e = $p;
919
+ if (this.h8_1 === 5) {
920
+ throw e;
921
+ } else {
922
+ this.g8_1 = this.h8_1;
923
+ this.j8_1 = e;
924
+ }
925
+ }
926
+ while (true);
927
+ };
928
+ protoOf(Utils$firstArguments$slambda).t1k = function ($this$sequence, completion) {
929
+ var i = new Utils$firstArguments$slambda(this.p1k_1, completion);
930
+ i.q1k_1 = $this$sequence;
931
+ return i;
932
+ };
933
+ function Utils$firstArguments$slambda_0($this_firstArguments, resultContinuation) {
934
+ var i = new Utils$firstArguments$slambda($this_firstArguments, resultContinuation);
935
+ return constructCallableReference(function ($this$sequence, $completion) {
936
+ return i.s1k($this$sequence, $completion);
937
+ }, 1);
938
+ }
939
+ function Utils() {
940
+ }
941
+ protoOf(Utils).u1k = function (_this__u8e3s4, nestingLevel) {
942
+ // Inline function 'kotlin.let' call
943
+ return takeFirstAfterSkipping(firstArguments(this, _this__u8e3s4), nestingLevel).castToStruct().bt();
944
+ };
945
+ protoOf(Utils).v1k = function (_this__u8e3s4, nestingLevel) {
946
+ // Inline function 'kotlin.let' call
947
+ return takeFirstAfterSkipping(firstArguments(this, _this__u8e3s4), nestingLevel).castToStruct().ht();
948
+ };
949
+ protoOf(Utils).w1k = function (_this__u8e3s4, nestingLevel) {
950
+ return takeFirstAfterSkipping(firstArguments(this, _this__u8e3s4), nestingLevel);
951
+ };
952
+ protoOf(Utils).x1k = function (args) {
953
+ return this.y1k(listOf(args.slice()));
954
+ };
955
+ protoOf(Utils).z1k = function (sequence) {
956
+ return this.y1k(asIterable(sequence));
957
+ };
958
+ protoOf(Utils).y1k = function (iterable) {
959
+ return mergeSequences(iterable, SituatedIndexedClause$compareTo$ref());
960
+ };
961
+ protoOf(Utils).a1l = function (args) {
962
+ return this.b1l(sequenceOf(args.slice()));
963
+ };
964
+ protoOf(Utils).b1l = function (sequence) {
965
+ return flatten(sequence);
966
+ };
967
+ protoOf(Utils).c1l = function (iterable) {
968
+ return this.b1l(asSequence(iterable));
969
+ };
970
+ protoOf(Utils).d1l = function (args) {
971
+ return this.e1l(sequenceOf(args.slice()));
972
+ };
973
+ protoOf(Utils).e1l = function (sequence) {
974
+ return flatten(sequence);
975
+ };
976
+ protoOf(Utils).f1l = function (iterable) {
977
+ return this.e1l(asSequence(iterable));
978
+ };
979
+ protoOf(Utils).g1l = function (a, b) {
980
+ return a == null && b == null ? null : a == null ? b : b == null ? a : a.rq(b) < 0 ? a : b;
981
+ };
982
+ var Utils_instance;
983
+ function Utils_getInstance() {
984
+ return Utils_instance;
985
+ }
986
+ function IndexedClause$Companion$wrap$1($traversed, $indexedClause) {
987
+ this.i1l_1 = $indexedClause;
988
+ this.h1l_1 = listOf($traversed.slice());
989
+ }
990
+ protoOf(IndexedClause$Companion$wrap$1).wo = function () {
991
+ return this.i1l_1.wo();
992
+ };
993
+ protoOf(IndexedClause$Companion$wrap$1).c2 = function () {
994
+ return this.i1l_1.c2();
995
+ };
996
+ protoOf(IndexedClause$Companion$wrap$1).j1l = function () {
997
+ return this.h1l_1;
998
+ };
999
+ protoOf(IndexedClause$Companion$wrap$1).z1j = function () {
1000
+ // Inline function 'kotlin.collections.forEach' call
1001
+ var _iterator__ex2g4s = this.h1l_1.m();
1002
+ while (_iterator__ex2g4s.p()) {
1003
+ var element = _iterator__ex2g4s.q();
1004
+ element.g1k();
1005
+ }
1006
+ };
1007
+ protoOf(IndexedClause$Companion$wrap$1).y1 = function (other) {
1008
+ return this.rq((!(other == null) ? isInterface(other, LongIndexed) : false) ? other : THROW_CCE());
1009
+ };
1010
+ function Companion_2() {
1011
+ }
1012
+ protoOf(Companion_2).l1l = function (indexedClause, traversed) {
1013
+ return new IndexedClause$Companion$wrap$1(traversed, indexedClause);
1014
+ };
1015
+ protoOf(Companion_2).m1l = function (index, clause, traversed) {
1016
+ return this.l1l(Companion_instance_0.qq(index, clause), traversed.slice());
1017
+ };
1018
+ protoOf(Companion_2).n1l = function (index, clause, traversed) {
1019
+ var tmp = Companion_instance_0.qq(index, clause);
1020
+ // Inline function 'kotlin.collections.toTypedArray' call
1021
+ var tmp$ret$0 = copyToArray(traversed);
1022
+ return this.l1l(tmp, tmp$ret$0.slice());
1023
+ };
1024
+ var Companion_instance_7;
1025
+ function Companion_getInstance_5() {
1026
+ return Companion_instance_7;
1027
+ }
1028
+ function IndexedClause() {
1029
+ }
1030
+ function SituatedIndexedClause$Companion$of$1($indexed, $index) {
1031
+ this.o1l_1 = $indexed;
1032
+ this.p1l_1 = $index;
1033
+ }
1034
+ protoOf(SituatedIndexedClause$Companion$of$1).wo = function () {
1035
+ return this.o1l_1.wo();
1036
+ };
1037
+ protoOf(SituatedIndexedClause$Companion$of$1).c2 = function () {
1038
+ return this.o1l_1.c2();
1039
+ };
1040
+ protoOf(SituatedIndexedClause$Companion$of$1).q1l = function () {
1041
+ this.p1l_1.r1l(this);
1042
+ this.z1j();
1043
+ };
1044
+ protoOf(SituatedIndexedClause$Companion$of$1).j1l = function () {
1045
+ return this.o1l_1.j1l();
1046
+ };
1047
+ protoOf(SituatedIndexedClause$Companion$of$1).z1j = function () {
1048
+ this.o1l_1.z1j();
1049
+ };
1050
+ protoOf(SituatedIndexedClause$Companion$of$1).equals = function (other) {
1051
+ if (this === other)
1052
+ return true;
1053
+ if (!(!(other == null) ? isInterface(other, SituatedIndexedClause) : false))
1054
+ return false;
1055
+ if (!equalsLong(this.wo(), other.wo()))
1056
+ return false;
1057
+ return true;
1058
+ };
1059
+ protoOf(SituatedIndexedClause$Companion$of$1).y1 = function (other) {
1060
+ return this.rq((!(other == null) ? isInterface(other, LongIndexed) : false) ? other : THROW_CCE());
1061
+ };
1062
+ function Companion_3() {
1063
+ }
1064
+ protoOf(Companion_3).s1l = function (indexed, index) {
1065
+ return new SituatedIndexedClause$Companion$of$1(indexed, index);
1066
+ };
1067
+ var Companion_instance_8;
1068
+ function Companion_getInstance_6() {
1069
+ return Companion_instance_8;
1070
+ }
1071
+ function SituatedIndexedClause() {
1072
+ }
1073
+ function SituatedIndexedClause$compareTo$ref() {
1074
+ return constructCallableReference(function (p0, p1) {
1075
+ return p0.rq(p1);
1076
+ }, 2, 0, 32, 'compareTo');
1077
+ }
1078
+ function AbstractIndexingLeaf(unificator) {
1079
+ AbstractReteNode.call(this, unificator);
1080
+ }
1081
+ protoOf(AbstractIndexingLeaf).g1k = function () {
1082
+ };
1083
+ function extractFirst($this, clause) {
1084
+ // Inline function 'kotlin.collections.mapNotNull' call
1085
+ var tmp0 = $this.b1m_1.h2();
1086
+ // Inline function 'kotlin.collections.mapNotNullTo' call
1087
+ var destination = ArrayList_init_$Create$_0();
1088
+ // Inline function 'kotlin.collections.forEach' call
1089
+ var _iterator__ex2g4s = tmp0.m();
1090
+ while (_iterator__ex2g4s.p()) {
1091
+ var element = _iterator__ex2g4s.q();
1092
+ var tmp0_safe_receiver = extractFirst_0($this, clause, element);
1093
+ if (tmp0_safe_receiver == null)
1094
+ null;
1095
+ else {
1096
+ // Inline function 'kotlin.let' call
1097
+ destination.j(tmp0_safe_receiver);
1098
+ }
1099
+ }
1100
+ return minOrNull(destination);
1101
+ }
1102
+ function extractFirst_0($this, clause, index) {
1103
+ var tmp$ret$0;
1104
+ $l$block: {
1105
+ // Inline function 'kotlin.collections.indexOfFirst' call
1106
+ var index_0 = 0;
1107
+ var _iterator__ex2g4s = index.m();
1108
+ while (_iterator__ex2g4s.p()) {
1109
+ var item = _iterator__ex2g4s.q();
1110
+ if ($this.x1h().match(item.b1k(), clause)) {
1111
+ tmp$ret$0 = index_0;
1112
+ break $l$block;
1113
+ }
1114
+ index_0 = index_0 + 1 | 0;
1115
+ }
1116
+ tmp$ret$0 = -1;
1117
+ }
1118
+ var actualIndex = tmp$ret$0;
1119
+ var tmp;
1120
+ if (actualIndex === -1) {
1121
+ tmp = null;
1122
+ } else {
1123
+ tmp = index.t(actualIndex);
1124
+ }
1125
+ return tmp;
1126
+ }
1127
+ function extractGlobalSequence($this, clause) {
1128
+ var tmp = $this.x1l(clause);
1129
+ return map(tmp, AtomIndex$extractGlobalSequence$lambda);
1130
+ }
1131
+ function nestedFirstArgument($this, $receiver) {
1132
+ return Utils_instance.w1k(ensureNotNull($receiver.nv()), $this.a1m_1 + 1 | 0);
1133
+ }
1134
+ function asInnerAtom($this, $receiver) {
1135
+ return nestedFirstArgument($this, $receiver).castToAtom();
1136
+ }
1137
+ function asInnerAtom_0($this, $receiver) {
1138
+ return nestedFirstArgument($this, $receiver.b1k()).castToAtom();
1139
+ }
1140
+ function asInnerAtom_1($this, $receiver) {
1141
+ return nestedFirstArgument($this, $receiver.b1k()).castToAtom();
1142
+ }
1143
+ function AtomIndex$_get_size_$lambda_ygjfwe(it) {
1144
+ return it.s();
1145
+ }
1146
+ function AtomIndex$get$lambda(this$0, $clause) {
1147
+ return function (it) {
1148
+ return this$0.x1h().match(it.b1k(), $clause);
1149
+ };
1150
+ }
1151
+ function AtomIndex$get$lambda_0(it) {
1152
+ return it.b1k();
1153
+ }
1154
+ function AtomIndex$getIndexed$lambda(this$0, $clause) {
1155
+ return function (it) {
1156
+ return this$0.x1h().match(it.b1k(), $clause);
1157
+ };
1158
+ }
1159
+ function AtomIndex$retractAllIndexed$lambda(this$0, $clause) {
1160
+ return function (it) {
1161
+ return this$0.c1k(it, $clause);
1162
+ };
1163
+ }
1164
+ function AtomIndex$retractAll$lambda(it) {
1165
+ return it.b1k();
1166
+ }
1167
+ function AtomIndex$getCache$lambda(it) {
1168
+ return asSequence(it);
1169
+ }
1170
+ function AtomIndex$extractGlobalIndexedSequence$lambda(this$0, $clause) {
1171
+ return function (it) {
1172
+ return this$0.x1h().match(it.b1k(), $clause);
1173
+ };
1174
+ }
1175
+ function AtomIndex$extractGlobalSequence$lambda(it) {
1176
+ return it.b1k();
1177
+ }
1178
+ function AtomIndex(unificator, ordered, nestingLevel) {
1179
+ AbstractIndexingLeaf.call(this, unificator);
1180
+ this.z1l_1 = ordered;
1181
+ this.a1m_1 = nestingLevel;
1182
+ var tmp = this;
1183
+ // Inline function 'kotlin.collections.mutableMapOf' call
1184
+ tmp.b1m_1 = LinkedHashMap_init_$Create$();
1185
+ }
1186
+ protoOf(AtomIndex).s = function () {
1187
+ var tmp = asSequence(this.b1m_1.h2());
1188
+ return sum(map(tmp, AtomIndex$_get_size_$lambda_ygjfwe));
1189
+ };
1190
+ protoOf(AtomIndex).c1i = function () {
1191
+ var tmp;
1192
+ if (this.b1m_1.g()) {
1193
+ tmp = true;
1194
+ } else {
1195
+ var tmp0 = this.b1m_1.h2();
1196
+ var tmp$ret$0;
1197
+ $l$block_0: {
1198
+ // Inline function 'kotlin.collections.all' call
1199
+ var tmp_0;
1200
+ if (isInterface(tmp0, Collection)) {
1201
+ tmp_0 = tmp0.g();
1202
+ } else {
1203
+ tmp_0 = false;
1204
+ }
1205
+ if (tmp_0) {
1206
+ tmp$ret$0 = true;
1207
+ break $l$block_0;
1208
+ }
1209
+ var _iterator__ex2g4s = tmp0.m();
1210
+ while (_iterator__ex2g4s.p()) {
1211
+ var element = _iterator__ex2g4s.q();
1212
+ if (!element.g()) {
1213
+ tmp$ret$0 = false;
1214
+ break $l$block_0;
1215
+ }
1216
+ }
1217
+ tmp$ret$0 = true;
1218
+ }
1219
+ tmp = tmp$ret$0;
1220
+ }
1221
+ return tmp;
1222
+ };
1223
+ protoOf(AtomIndex).f1i = function (clause) {
1224
+ var tmp;
1225
+ if (nestedFirstArgument(this, clause).ct()) {
1226
+ var tmp0_safe_receiver = this.b1m_1.f2(asInnerAtom(this, clause));
1227
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : asSequence(tmp0_safe_receiver);
1228
+ var tmp_0;
1229
+ if (tmp1_safe_receiver == null) {
1230
+ tmp_0 = null;
1231
+ } else {
1232
+ tmp_0 = filter(tmp1_safe_receiver, AtomIndex$get$lambda(this, clause));
1233
+ }
1234
+ var tmp2_safe_receiver = tmp_0;
1235
+ var tmp_1;
1236
+ if (tmp2_safe_receiver == null) {
1237
+ tmp_1 = null;
1238
+ } else {
1239
+ tmp_1 = map(tmp2_safe_receiver, AtomIndex$get$lambda_0);
1240
+ }
1241
+ var tmp3_elvis_lhs = tmp_1;
1242
+ tmp = tmp3_elvis_lhs == null ? emptySequence() : tmp3_elvis_lhs;
1243
+ } else {
1244
+ tmp = extractGlobalSequence(this, clause);
1245
+ }
1246
+ return tmp;
1247
+ };
1248
+ protoOf(AtomIndex).d1k = function (clause) {
1249
+ if (this.z1l_1) {
1250
+ // Inline function 'kotlin.let' call
1251
+ var it = asInnerAtom_1(this, clause);
1252
+ // Inline function 'kotlin.collections.getOrPut' call
1253
+ var this_0 = this.b1m_1;
1254
+ var value = this_0.f2(it);
1255
+ var tmp;
1256
+ if (value == null) {
1257
+ var answer = dequeOf([]);
1258
+ this_0.p4(it, answer);
1259
+ tmp = answer;
1260
+ } else {
1261
+ tmp = value;
1262
+ }
1263
+ var tmp$ret$2 = tmp;
1264
+ addFirst(tmp$ret$2, Companion_instance_8.s1l(clause.k1l(this), this));
1265
+ } else {
1266
+ this.e1k(clause);
1267
+ }
1268
+ };
1269
+ protoOf(AtomIndex).e1k = function (clause) {
1270
+ // Inline function 'kotlin.let' call
1271
+ var it = asInnerAtom_1(this, clause);
1272
+ // Inline function 'kotlin.collections.getOrPut' call
1273
+ var this_0 = this.b1m_1;
1274
+ var value = this_0.f2(it);
1275
+ var tmp;
1276
+ if (value == null) {
1277
+ var answer = dequeOf([]);
1278
+ this_0.p4(it, answer);
1279
+ tmp = answer;
1280
+ } else {
1281
+ tmp = value;
1282
+ }
1283
+ tmp.j(Companion_instance_8.s1l(clause.k1l(this), this));
1284
+ };
1285
+ protoOf(AtomIndex).u1l = function (clause) {
1286
+ var tmp;
1287
+ if (nestedFirstArgument(this, clause).ct()) {
1288
+ // Inline function 'kotlin.let' call
1289
+ var it = this.b1m_1.f2(asInnerAtom(this, clause));
1290
+ var tmp_0;
1291
+ if (it == null) {
1292
+ tmp_0 = null;
1293
+ } else {
1294
+ tmp_0 = extractFirst_0(this, clause, it);
1295
+ }
1296
+ tmp = tmp_0;
1297
+ } else {
1298
+ tmp = extractFirst(this, clause);
1299
+ }
1300
+ return tmp;
1301
+ };
1302
+ protoOf(AtomIndex).v1l = function (clause) {
1303
+ var tmp;
1304
+ if (nestedFirstArgument(this, clause).ct()) {
1305
+ var tmp0_safe_receiver = this.b1m_1.f2(asInnerAtom(this, clause));
1306
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : asSequence(tmp0_safe_receiver);
1307
+ var tmp_0;
1308
+ if (tmp1_safe_receiver == null) {
1309
+ tmp_0 = null;
1310
+ } else {
1311
+ tmp_0 = filter(tmp1_safe_receiver, AtomIndex$getIndexed$lambda(this, clause));
1312
+ }
1313
+ var tmp2_elvis_lhs = tmp_0;
1314
+ tmp = tmp2_elvis_lhs == null ? emptySequence() : tmp2_elvis_lhs;
1315
+ } else {
1316
+ tmp = this.x1l(clause);
1317
+ }
1318
+ return tmp;
1319
+ };
1320
+ protoOf(AtomIndex).r1l = function (indexed) {
1321
+ ensureNotNull(this.b1m_1.f2(asInnerAtom_0(this, indexed))).e3(indexed);
1322
+ };
1323
+ protoOf(AtomIndex).w1l = function (clause) {
1324
+ var tmp;
1325
+ if (nestedFirstArgument(this, clause).ct()) {
1326
+ var partialIndex = this.b1m_1.f2(asInnerAtom(this, clause));
1327
+ tmp = partialIndex == null ? emptySequence() : this.c1k(partialIndex, clause);
1328
+ } else {
1329
+ var tmp_0 = Utils_instance;
1330
+ var tmp_1 = asSequence(this.b1m_1.h2());
1331
+ tmp = tmp_0.z1k(map(tmp_1, AtomIndex$retractAllIndexed$lambda(this, clause)));
1332
+ }
1333
+ return buffered(tmp);
1334
+ };
1335
+ protoOf(AtomIndex).p1i = function (clause) {
1336
+ var tmp = this.w1l(clause);
1337
+ return map(tmp, AtomIndex$retractAll$lambda);
1338
+ };
1339
+ protoOf(AtomIndex).f1k = function () {
1340
+ var tmp = Utils_instance;
1341
+ var tmp_0 = asSequence(this.b1m_1.h2());
1342
+ return tmp.z1k(map(tmp_0, AtomIndex$getCache$lambda));
1343
+ };
1344
+ protoOf(AtomIndex).x1l = function (clause) {
1345
+ var tmp = this.f1k();
1346
+ return filter(tmp, AtomIndex$extractGlobalIndexedSequence$lambda(this, clause));
1347
+ };
1348
+ function retractAllOrdered($this, clause) {
1349
+ var tmp;
1350
+ if (isGlobal($this, clause)) {
1351
+ var tmp_0 = Utils_instance;
1352
+ // Inline function 'kotlin.collections.map' call
1353
+ var this_0 = $this.f1m_1.h2();
1354
+ // Inline function 'kotlin.collections.mapTo' call
1355
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1356
+ var _iterator__ex2g4s = this_0.m();
1357
+ while (_iterator__ex2g4s.p()) {
1358
+ var item = _iterator__ex2g4s.q();
1359
+ var tmp$ret$2 = item.w1l(clause);
1360
+ destination.j(tmp$ret$2);
1361
+ }
1362
+ var tmp_1 = tmp_0.y1k(destination);
1363
+ tmp = map(tmp_1, CompoundIndex$retractAllOrdered$lambda);
1364
+ } else {
1365
+ var tmp0_safe_receiver = $this.f1m_1.f2(nestedFunctor($this, clause));
1366
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p1i(clause);
1367
+ tmp = tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
1368
+ }
1369
+ return tmp;
1370
+ }
1371
+ function retractAllUnordered($this, clause) {
1372
+ var tmp;
1373
+ if (isGlobal($this, clause)) {
1374
+ var tmp_0 = Utils_instance;
1375
+ // Inline function 'kotlin.collections.map' call
1376
+ var this_0 = $this.f1m_1.h2();
1377
+ // Inline function 'kotlin.collections.mapTo' call
1378
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1379
+ var _iterator__ex2g4s = this_0.m();
1380
+ while (_iterator__ex2g4s.p()) {
1381
+ var item = _iterator__ex2g4s.q();
1382
+ var tmp$ret$2 = item.p1i(clause);
1383
+ destination.j(tmp$ret$2);
1384
+ }
1385
+ tmp = tmp_0.f1l(destination);
1386
+ } else {
1387
+ var tmp0_safe_receiver = $this.f1m_1.f2(nestedFunctor($this, clause));
1388
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p1i(clause);
1389
+ tmp = tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
1390
+ }
1391
+ return tmp;
1392
+ }
1393
+ function nestedFunctor($this, $receiver) {
1394
+ return Utils_instance.v1k(ensureNotNull($receiver.nv()), $this.e1m_1);
1395
+ }
1396
+ function nestedFunctor_0($this, $receiver) {
1397
+ return Utils_instance.v1k(ensureNotNull($receiver.b1k().nv()), $this.e1m_1);
1398
+ }
1399
+ function isGlobal($this, $receiver) {
1400
+ return Utils_instance.w1k(ensureNotNull($receiver.nv()), $this.e1m_1).du();
1401
+ }
1402
+ function regenerateCache($this) {
1403
+ var tmp;
1404
+ if ($this.d1m_1) {
1405
+ var tmp_0 = Utils_instance;
1406
+ // Inline function 'kotlin.collections.map' call
1407
+ var this_0 = $this.f1m_1.h2();
1408
+ // Inline function 'kotlin.collections.mapTo' call
1409
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1410
+ var _iterator__ex2g4s = this_0.m();
1411
+ while (_iterator__ex2g4s.p()) {
1412
+ var item = _iterator__ex2g4s.q();
1413
+ var tmp$ret$2 = item.f1k();
1414
+ destination.j(tmp$ret$2);
1415
+ }
1416
+ tmp = tmp_0.y1k(destination);
1417
+ } else {
1418
+ var tmp_1 = Utils_instance;
1419
+ // Inline function 'kotlin.collections.map' call
1420
+ var this_1 = $this.f1m_1.h2();
1421
+ // Inline function 'kotlin.collections.mapTo' call
1422
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
1423
+ var _iterator__ex2g4s_0 = this_1.m();
1424
+ while (_iterator__ex2g4s_0.p()) {
1425
+ var item_0 = _iterator__ex2g4s_0.q();
1426
+ var tmp$ret$5 = item_0.f1k();
1427
+ destination_0.j(tmp$ret$5);
1428
+ }
1429
+ tmp = tmp_1.c1l(destination_0);
1430
+ }
1431
+ return dequeOf_0(tmp);
1432
+ }
1433
+ function CompoundIndex$regenerateCache$ref(p0) {
1434
+ return constructCallableReference(function () {
1435
+ var tmp0 = p0;
1436
+ return regenerateCache(tmp0);
1437
+ }, 0, 0, 33, 'regenerateCache', [p0]);
1438
+ }
1439
+ function CompoundIndex$_get_size_$lambda_91vt0k(it) {
1440
+ return it.s();
1441
+ }
1442
+ function CompoundIndex$get$lambda($clause) {
1443
+ return function (it) {
1444
+ return it.v1l($clause);
1445
+ };
1446
+ }
1447
+ function CompoundIndex$get$lambda_0(it) {
1448
+ return it.b1k();
1449
+ }
1450
+ function CompoundIndex$get$lambda_1($clause) {
1451
+ return function (it) {
1452
+ return it.f1i($clause);
1453
+ };
1454
+ }
1455
+ function CompoundIndex$retractAllOrdered$lambda(it) {
1456
+ return it.b1k();
1457
+ }
1458
+ function CompoundIndex(unificator, ordered, nestingLevel) {
1459
+ AbstractReteNode.call(this, unificator);
1460
+ this.d1m_1 = ordered;
1461
+ this.e1m_1 = nestingLevel;
1462
+ var tmp = this;
1463
+ // Inline function 'kotlin.collections.mutableMapOf' call
1464
+ tmp.f1m_1 = LinkedHashMap_init_$Create$();
1465
+ var tmp_0 = this;
1466
+ var tmp_1 = Companion_instance_1;
1467
+ tmp_0.g1m_1 = tmp_1.io(CompoundIndex$regenerateCache$ref(this));
1468
+ }
1469
+ protoOf(CompoundIndex).s = function () {
1470
+ var tmp = asSequence(this.f1m_1.h2());
1471
+ return sum(map(tmp, CompoundIndex$_get_size_$lambda_91vt0k));
1472
+ };
1473
+ protoOf(CompoundIndex).c1i = function () {
1474
+ var tmp;
1475
+ if (this.f1m_1.g()) {
1476
+ tmp = true;
1477
+ } else {
1478
+ var tmp0 = this.f1m_1.h2();
1479
+ var tmp$ret$0;
1480
+ $l$block_0: {
1481
+ // Inline function 'kotlin.collections.all' call
1482
+ var tmp_0;
1483
+ if (isInterface(tmp0, Collection)) {
1484
+ tmp_0 = tmp0.g();
1485
+ } else {
1486
+ tmp_0 = false;
1487
+ }
1488
+ if (tmp_0) {
1489
+ tmp$ret$0 = true;
1490
+ break $l$block_0;
1491
+ }
1492
+ var _iterator__ex2g4s = tmp0.m();
1493
+ while (_iterator__ex2g4s.p()) {
1494
+ var element = _iterator__ex2g4s.q();
1495
+ if (!element.c1i()) {
1496
+ tmp$ret$0 = false;
1497
+ break $l$block_0;
1498
+ }
1499
+ }
1500
+ tmp$ret$0 = true;
1501
+ }
1502
+ tmp = tmp$ret$0;
1503
+ }
1504
+ return tmp;
1505
+ };
1506
+ protoOf(CompoundIndex).f1i = function (clause) {
1507
+ var tmp;
1508
+ if (isGlobal(this, clause)) {
1509
+ var tmp_0;
1510
+ if (this.d1m_1) {
1511
+ var tmp_1 = Utils_instance;
1512
+ var tmp_2 = asSequence(this.f1m_1.h2());
1513
+ var tmp_3 = tmp_1.x1k([flatMap(tmp_2, CompoundIndex$get$lambda(clause))]);
1514
+ tmp_0 = map(tmp_3, CompoundIndex$get$lambda_0);
1515
+ } else {
1516
+ var tmp_4 = Utils_instance;
1517
+ var tmp_5 = asSequence(this.f1m_1.h2());
1518
+ tmp_0 = tmp_4.d1l([flatMap(tmp_5, CompoundIndex$get$lambda_1(clause))]);
1519
+ }
1520
+ tmp = tmp_0;
1521
+ } else {
1522
+ var tmp0_safe_receiver = this.f1m_1.f2(nestedFunctor(this, clause));
1523
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f1i(clause);
1524
+ tmp = tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
1525
+ }
1526
+ return tmp;
1527
+ };
1528
+ protoOf(CompoundIndex).d1k = function (clause) {
1529
+ // Inline function 'kotlin.let' call
1530
+ var it = nestedFunctor_0(this, clause);
1531
+ if (this.d1m_1) {
1532
+ // Inline function 'kotlin.collections.getOrPut' call
1533
+ var this_0 = this.f1m_1;
1534
+ var value = this_0.f2(it);
1535
+ var tmp;
1536
+ if (value == null) {
1537
+ var answer = new FunctorIndexingNode(this.x1h(), this.d1m_1, this.e1m_1);
1538
+ this_0.p4(it, answer);
1539
+ tmp = answer;
1540
+ } else {
1541
+ tmp = value;
1542
+ }
1543
+ tmp.d1k(clause.k1l(this));
1544
+ } else {
1545
+ this.e1k(clause);
1546
+ }
1547
+ return Unit_instance;
1548
+ };
1549
+ protoOf(CompoundIndex).e1k = function (clause) {
1550
+ // Inline function 'kotlin.let' call
1551
+ var it = nestedFunctor_0(this, clause);
1552
+ // Inline function 'kotlin.collections.getOrPut' call
1553
+ var this_0 = this.f1m_1;
1554
+ var value = this_0.f2(it);
1555
+ var tmp;
1556
+ if (value == null) {
1557
+ var answer = new FunctorIndexingNode(this.x1h(), this.d1m_1, this.e1m_1);
1558
+ this_0.p4(it, answer);
1559
+ tmp = answer;
1560
+ } else {
1561
+ tmp = value;
1562
+ }
1563
+ tmp.e1k(clause.k1l(this));
1564
+ return Unit_instance;
1565
+ };
1566
+ protoOf(CompoundIndex).p1i = function (clause) {
1567
+ var tmp;
1568
+ if (this.d1m_1) {
1569
+ tmp = retractAllOrdered(this, clause);
1570
+ } else {
1571
+ tmp = retractAllUnordered(this, clause);
1572
+ }
1573
+ return tmp;
1574
+ };
1575
+ protoOf(CompoundIndex).f1k = function () {
1576
+ return asSequence(this.g1m_1.c2());
1577
+ };
1578
+ protoOf(CompoundIndex).u1l = function (clause) {
1579
+ var tmp;
1580
+ if (isGlobal(this, clause)) {
1581
+ var tmp_0 = Utils_instance;
1582
+ // Inline function 'kotlin.collections.mapNotNull' call
1583
+ var tmp0 = this.f1m_1.h2();
1584
+ // Inline function 'kotlin.collections.mapNotNullTo' call
1585
+ var destination = ArrayList_init_$Create$_0();
1586
+ // Inline function 'kotlin.collections.forEach' call
1587
+ var _iterator__ex2g4s = tmp0.m();
1588
+ while (_iterator__ex2g4s.p()) {
1589
+ var element = _iterator__ex2g4s.q();
1590
+ var tmp0_safe_receiver = element.u1l(clause);
1591
+ if (tmp0_safe_receiver == null)
1592
+ null;
1593
+ else {
1594
+ // Inline function 'kotlin.let' call
1595
+ destination.j(tmp0_safe_receiver);
1596
+ }
1597
+ }
1598
+ tmp = firstOrNull(tmp_0.z1k(sequenceOf_0(asSequence(destination))));
1599
+ } else {
1600
+ var tmp0_safe_receiver_0 = this.f1m_1.f2(nestedFunctor(this, clause));
1601
+ tmp = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.u1l(clause);
1602
+ }
1603
+ return tmp;
1604
+ };
1605
+ protoOf(CompoundIndex).v1l = function (clause) {
1606
+ var tmp;
1607
+ if (isGlobal(this, clause)) {
1608
+ var tmp_0 = Utils_instance;
1609
+ // Inline function 'kotlin.collections.map' call
1610
+ var this_0 = this.f1m_1.h2();
1611
+ // Inline function 'kotlin.collections.mapTo' call
1612
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1613
+ var _iterator__ex2g4s = this_0.m();
1614
+ while (_iterator__ex2g4s.p()) {
1615
+ var item = _iterator__ex2g4s.q();
1616
+ var tmp$ret$2 = item.x1l(clause);
1617
+ destination.j(tmp$ret$2);
1618
+ }
1619
+ tmp = tmp_0.y1k(destination);
1620
+ } else {
1621
+ var tmp0_safe_receiver = this.f1m_1.f2(nestedFunctor(this, clause));
1622
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v1l(clause);
1623
+ tmp = tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
1624
+ }
1625
+ return tmp;
1626
+ };
1627
+ protoOf(CompoundIndex).w1l = function (clause) {
1628
+ var tmp;
1629
+ if (isGlobal(this, clause)) {
1630
+ var tmp_0 = Utils_instance;
1631
+ // Inline function 'kotlin.collections.map' call
1632
+ var this_0 = this.f1m_1.h2();
1633
+ // Inline function 'kotlin.collections.mapTo' call
1634
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1635
+ var _iterator__ex2g4s = this_0.m();
1636
+ while (_iterator__ex2g4s.p()) {
1637
+ var item = _iterator__ex2g4s.q();
1638
+ var tmp$ret$2 = item.w1l(clause);
1639
+ destination.j(tmp$ret$2);
1640
+ }
1641
+ tmp = tmp_0.y1k(destination);
1642
+ } else {
1643
+ var tmp0_safe_receiver = this.f1m_1.f2(nestedFunctor(this, clause));
1644
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w1l(clause);
1645
+ tmp = tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
1646
+ }
1647
+ return tmp;
1648
+ };
1649
+ protoOf(CompoundIndex).x1l = function (clause) {
1650
+ var tmp;
1651
+ if (this.d1m_1) {
1652
+ var tmp_0 = Utils_instance;
1653
+ // Inline function 'kotlin.collections.map' call
1654
+ var this_0 = this.f1m_1.h2();
1655
+ // Inline function 'kotlin.collections.mapTo' call
1656
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1657
+ var _iterator__ex2g4s = this_0.m();
1658
+ while (_iterator__ex2g4s.p()) {
1659
+ var item = _iterator__ex2g4s.q();
1660
+ var tmp$ret$2 = item.x1l(clause);
1661
+ destination.j(tmp$ret$2);
1662
+ }
1663
+ tmp = tmp_0.y1k(destination);
1664
+ } else {
1665
+ var tmp_1 = Utils_instance;
1666
+ // Inline function 'kotlin.collections.map' call
1667
+ var this_1 = this.f1m_1.h2();
1668
+ // Inline function 'kotlin.collections.mapTo' call
1669
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
1670
+ var _iterator__ex2g4s_0 = this_1.m();
1671
+ while (_iterator__ex2g4s_0.p()) {
1672
+ var item_0 = _iterator__ex2g4s_0.q();
1673
+ var tmp$ret$5 = item_0.x1l(clause);
1674
+ destination_0.j(tmp$ret$5);
1675
+ }
1676
+ tmp = tmp_1.c1l(destination_0);
1677
+ }
1678
+ return tmp;
1679
+ };
1680
+ protoOf(CompoundIndex).g1k = function () {
1681
+ this.g1m_1.ko();
1682
+ };
1683
+ function DirectiveIndex$retractFirst$lambda(it) {
1684
+ return it.b1k();
1685
+ }
1686
+ function DirectiveIndex$retractAll$lambda(it) {
1687
+ return it.b1k();
1688
+ }
1689
+ function DirectiveIndex$getCache$lambda(it) {
1690
+ var tmp = Companion_instance_8;
1691
+ return tmp.s1l(it, new DirectiveIndex$getCache$1$1());
1692
+ }
1693
+ function DirectiveIndex$getCache$1$1() {
1694
+ }
1695
+ protoOf(DirectiveIndex$getCache$1$1).r1l = function (indexed) {
1696
+ // Inline function 'kotlin.TODO' call
1697
+ var reason = 'Directives are adapted as a SituatedIndexedClause, but they are not actually stored with this type. Given their particular semantic, try retracting directly with a proper query, or opening a pull request implementing this indexing class as a proper typed data structure';
1698
+ throw new NotImplementedError('An operation is not implemented: ' + reason);
1699
+ };
1700
+ function DirectiveIndex(unificator, ordered) {
1701
+ AbstractReteNode.call(this, unificator);
1702
+ this.i1m_1 = ordered;
1703
+ this.j1m_1 = dequeOf([]);
1704
+ }
1705
+ protoOf(DirectiveIndex).s = function () {
1706
+ return this.j1m_1.s();
1707
+ };
1708
+ protoOf(DirectiveIndex).c1i = function () {
1709
+ return this.j1m_1.g();
1710
+ };
1711
+ protoOf(DirectiveIndex).f1i = function (clause) {
1712
+ // Inline function 'kotlin.collections.filter' call
1713
+ var tmp0 = this.j1m_1;
1714
+ // Inline function 'kotlin.collections.filterTo' call
1715
+ var destination = ArrayList_init_$Create$_0();
1716
+ var _iterator__ex2g4s = tmp0.m();
1717
+ while (_iterator__ex2g4s.p()) {
1718
+ var element = _iterator__ex2g4s.q();
1719
+ if (this.x1h().match(element.b1k(), clause)) {
1720
+ destination.j(element);
1721
+ }
1722
+ }
1723
+ // Inline function 'kotlin.collections.map' call
1724
+ // Inline function 'kotlin.collections.mapTo' call
1725
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(destination, 10));
1726
+ var _iterator__ex2g4s_0 = destination.m();
1727
+ while (_iterator__ex2g4s_0.p()) {
1728
+ var item = _iterator__ex2g4s_0.q();
1729
+ var tmp$ret$5 = item.b1k();
1730
+ destination_0.j(tmp$ret$5);
1731
+ }
1732
+ return asSequence(destination_0);
1733
+ };
1734
+ protoOf(DirectiveIndex).d1k = function (clause) {
1735
+ if (this.i1m_1) {
1736
+ addFirst(this.j1m_1, clause.k1l(this));
1737
+ } else {
1738
+ this.e1k(clause);
1739
+ }
1740
+ };
1741
+ protoOf(DirectiveIndex).e1k = function (clause) {
1742
+ this.j1m_1.j(clause.k1l(this));
1743
+ };
1744
+ protoOf(DirectiveIndex).n1i = function (clause) {
1745
+ var tmp = this.c1k(this.j1m_1, clause);
1746
+ return buffered(take(map(tmp, DirectiveIndex$retractFirst$lambda), 1));
1747
+ };
1748
+ protoOf(DirectiveIndex).p1i = function (clause) {
1749
+ var tmp = this.c1k(this.j1m_1, clause);
1750
+ return buffered(map(tmp, DirectiveIndex$retractAll$lambda));
1751
+ };
1752
+ protoOf(DirectiveIndex).f1k = function () {
1753
+ var tmp = asSequence(this.j1m_1);
1754
+ return map(tmp, DirectiveIndex$getCache$lambda);
1755
+ };
1756
+ protoOf(DirectiveIndex).g1k = function () {
1757
+ };
1758
+ function extractFirst_1($this, clause) {
1759
+ // Inline function 'kotlin.collections.mapNotNull' call
1760
+ var tmp0 = $this.n1m_1.h2();
1761
+ // Inline function 'kotlin.collections.mapNotNullTo' call
1762
+ var destination = ArrayList_init_$Create$_0();
1763
+ // Inline function 'kotlin.collections.forEach' call
1764
+ var _iterator__ex2g4s = tmp0.m();
1765
+ while (_iterator__ex2g4s.p()) {
1766
+ var element = _iterator__ex2g4s.q();
1767
+ var tmp0_safe_receiver = extractFirst_2($this, clause, element);
1768
+ if (tmp0_safe_receiver == null)
1769
+ null;
1770
+ else {
1771
+ // Inline function 'kotlin.let' call
1772
+ destination.j(tmp0_safe_receiver);
1773
+ }
1774
+ }
1775
+ return minOrNull(destination);
1776
+ }
1777
+ function extractFirst_2($this, clause, index) {
1778
+ var tmp$ret$0;
1779
+ $l$block: {
1780
+ // Inline function 'kotlin.collections.indexOfFirst' call
1781
+ var index_0 = 0;
1782
+ var _iterator__ex2g4s = index.m();
1783
+ while (_iterator__ex2g4s.p()) {
1784
+ var item = _iterator__ex2g4s.q();
1785
+ if ($this.x1h().match(item.b1k(), clause)) {
1786
+ tmp$ret$0 = index_0;
1787
+ break $l$block;
1788
+ }
1789
+ index_0 = index_0 + 1 | 0;
1790
+ }
1791
+ tmp$ret$0 = -1;
1792
+ }
1793
+ var actualIndex = tmp$ret$0;
1794
+ var tmp;
1795
+ if (actualIndex === -1) {
1796
+ tmp = null;
1797
+ } else {
1798
+ tmp = index.t(actualIndex);
1799
+ }
1800
+ return tmp;
1801
+ }
1802
+ function extractGlobalSequence_0($this, clause) {
1803
+ var tmp = $this.x1l(clause);
1804
+ return map(tmp, NumericIndex$extractGlobalSequence$lambda);
1805
+ }
1806
+ function nestedFirstArgument_0($this, $receiver) {
1807
+ return Utils_instance.w1k(ensureNotNull($receiver.nv()), $this.m1m_1 + 1 | 0);
1808
+ }
1809
+ function asInnerNumeric($this, $receiver) {
1810
+ return nestedFirstArgument_0($this, $receiver).castToNumeric();
1811
+ }
1812
+ function asInnerNumeric_0($this, $receiver) {
1813
+ return nestedFirstArgument_0($this, $receiver.b1k()).castToNumeric();
1814
+ }
1815
+ function asInnerNumeric_1($this, $receiver) {
1816
+ return nestedFirstArgument_0($this, $receiver.b1k()).castToNumeric();
1817
+ }
1818
+ function NumericIndex$_get_size_$lambda_exo30i(it) {
1819
+ return it.s();
1820
+ }
1821
+ function NumericIndex$get$lambda(this$0, $clause) {
1822
+ return function (it) {
1823
+ return this$0.x1h().match(it.b1k(), $clause);
1824
+ };
1825
+ }
1826
+ function NumericIndex$get$lambda_0(it) {
1827
+ return it.b1k();
1828
+ }
1829
+ function NumericIndex$getIndexed$lambda(this$0, $clause) {
1830
+ return function (it) {
1831
+ return this$0.x1h().match(it.b1k(), $clause);
1832
+ };
1833
+ }
1834
+ function NumericIndex$retractAllIndexed$lambda(this$0, $clause) {
1835
+ return function (it) {
1836
+ return this$0.c1k(it, $clause);
1837
+ };
1838
+ }
1839
+ function NumericIndex$retractAll$lambda(it) {
1840
+ return it.b1k();
1841
+ }
1842
+ function NumericIndex$getCache$lambda(it) {
1843
+ return asSequence(it);
1844
+ }
1845
+ function NumericIndex$extractGlobalIndexedSequence$lambda(this$0, $clause) {
1846
+ return function (it) {
1847
+ return this$0.x1h().match(it.b1k(), $clause);
1848
+ };
1849
+ }
1850
+ function NumericIndex$extractGlobalSequence$lambda(it) {
1851
+ return it.b1k();
1852
+ }
1853
+ function NumericIndex(unificator, ordered, nestingLevel) {
1854
+ AbstractIndexingLeaf.call(this, unificator);
1855
+ this.l1m_1 = ordered;
1856
+ this.m1m_1 = nestingLevel;
1857
+ var tmp = this;
1858
+ // Inline function 'kotlin.collections.mutableMapOf' call
1859
+ tmp.n1m_1 = LinkedHashMap_init_$Create$();
1860
+ }
1861
+ protoOf(NumericIndex).s = function () {
1862
+ var tmp = asSequence(this.n1m_1.h2());
1863
+ return sum(map(tmp, NumericIndex$_get_size_$lambda_exo30i));
1864
+ };
1865
+ protoOf(NumericIndex).c1i = function () {
1866
+ var tmp;
1867
+ if (this.n1m_1.g()) {
1868
+ tmp = true;
1869
+ } else {
1870
+ var tmp0 = this.n1m_1.h2();
1871
+ var tmp$ret$0;
1872
+ $l$block_0: {
1873
+ // Inline function 'kotlin.collections.all' call
1874
+ var tmp_0;
1875
+ if (isInterface(tmp0, Collection)) {
1876
+ tmp_0 = tmp0.g();
1877
+ } else {
1878
+ tmp_0 = false;
1879
+ }
1880
+ if (tmp_0) {
1881
+ tmp$ret$0 = true;
1882
+ break $l$block_0;
1883
+ }
1884
+ var _iterator__ex2g4s = tmp0.m();
1885
+ while (_iterator__ex2g4s.p()) {
1886
+ var element = _iterator__ex2g4s.q();
1887
+ if (!element.g()) {
1888
+ tmp$ret$0 = false;
1889
+ break $l$block_0;
1890
+ }
1891
+ }
1892
+ tmp$ret$0 = true;
1893
+ }
1894
+ tmp = tmp$ret$0;
1895
+ }
1896
+ return tmp;
1897
+ };
1898
+ protoOf(NumericIndex).f1i = function (clause) {
1899
+ var tmp;
1900
+ if (nestedFirstArgument_0(this, clause).hu()) {
1901
+ var tmp0_safe_receiver = this.n1m_1.f2(asInnerNumeric(this, clause));
1902
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : asSequence(tmp0_safe_receiver);
1903
+ var tmp_0;
1904
+ if (tmp1_safe_receiver == null) {
1905
+ tmp_0 = null;
1906
+ } else {
1907
+ tmp_0 = filter(tmp1_safe_receiver, NumericIndex$get$lambda(this, clause));
1908
+ }
1909
+ var tmp2_safe_receiver = tmp_0;
1910
+ var tmp_1;
1911
+ if (tmp2_safe_receiver == null) {
1912
+ tmp_1 = null;
1913
+ } else {
1914
+ tmp_1 = map(tmp2_safe_receiver, NumericIndex$get$lambda_0);
1915
+ }
1916
+ var tmp3_elvis_lhs = tmp_1;
1917
+ tmp = tmp3_elvis_lhs == null ? emptySequence() : tmp3_elvis_lhs;
1918
+ } else {
1919
+ tmp = extractGlobalSequence_0(this, clause);
1920
+ }
1921
+ return tmp;
1922
+ };
1923
+ protoOf(NumericIndex).d1k = function (clause) {
1924
+ if (this.l1m_1) {
1925
+ // Inline function 'kotlin.let' call
1926
+ var it = asInnerNumeric_1(this, clause);
1927
+ // Inline function 'kotlin.collections.getOrPut' call
1928
+ var this_0 = this.n1m_1;
1929
+ var value = this_0.f2(it);
1930
+ var tmp;
1931
+ if (value == null) {
1932
+ var answer = dequeOf([]);
1933
+ this_0.p4(it, answer);
1934
+ tmp = answer;
1935
+ } else {
1936
+ tmp = value;
1937
+ }
1938
+ var tmp$ret$2 = tmp;
1939
+ addFirst(tmp$ret$2, Companion_instance_8.s1l(clause.k1l(this), this));
1940
+ } else {
1941
+ this.e1k(clause);
1942
+ }
1943
+ };
1944
+ protoOf(NumericIndex).e1k = function (clause) {
1945
+ // Inline function 'kotlin.let' call
1946
+ var it = asInnerNumeric_1(this, clause);
1947
+ // Inline function 'kotlin.collections.getOrPut' call
1948
+ var this_0 = this.n1m_1;
1949
+ var value = this_0.f2(it);
1950
+ var tmp;
1951
+ if (value == null) {
1952
+ var answer = dequeOf([]);
1953
+ this_0.p4(it, answer);
1954
+ tmp = answer;
1955
+ } else {
1956
+ tmp = value;
1957
+ }
1958
+ tmp.j(Companion_instance_8.s1l(clause.k1l(this), this));
1959
+ };
1960
+ protoOf(NumericIndex).u1l = function (clause) {
1961
+ if (nestedFirstArgument_0(this, clause).hu()) {
1962
+ // Inline function 'kotlin.let' call
1963
+ var it = this.n1m_1.f2(asInnerNumeric(this, clause));
1964
+ var tmp;
1965
+ if (it == null) {
1966
+ tmp = null;
1967
+ } else {
1968
+ tmp = extractFirst_2(this, clause, it);
1969
+ }
1970
+ return tmp;
1971
+ } else {
1972
+ return extractFirst_1(this, clause);
1973
+ }
1974
+ };
1975
+ protoOf(NumericIndex).v1l = function (clause) {
1976
+ var tmp;
1977
+ if (nestedFirstArgument_0(this, clause).hu()) {
1978
+ var tmp0_safe_receiver = this.n1m_1.f2(asInnerNumeric(this, clause));
1979
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : asSequence(tmp0_safe_receiver);
1980
+ var tmp_0;
1981
+ if (tmp1_safe_receiver == null) {
1982
+ tmp_0 = null;
1983
+ } else {
1984
+ tmp_0 = filter(tmp1_safe_receiver, NumericIndex$getIndexed$lambda(this, clause));
1985
+ }
1986
+ var tmp2_elvis_lhs = tmp_0;
1987
+ tmp = tmp2_elvis_lhs == null ? emptySequence() : tmp2_elvis_lhs;
1988
+ } else {
1989
+ tmp = this.x1l(clause);
1990
+ }
1991
+ return tmp;
1992
+ };
1993
+ protoOf(NumericIndex).r1l = function (indexed) {
1994
+ ensureNotNull(this.n1m_1.f2(asInnerNumeric_0(this, indexed))).e3(indexed);
1995
+ };
1996
+ protoOf(NumericIndex).w1l = function (clause) {
1997
+ var tmp;
1998
+ if (nestedFirstArgument_0(this, clause).hu()) {
1999
+ var partialIndex = this.n1m_1.f2(asInnerNumeric(this, clause));
2000
+ tmp = partialIndex == null ? emptySequence() : buffered(this.c1k(partialIndex, clause));
2001
+ } else {
2002
+ var tmp_0 = Utils_instance;
2003
+ var tmp_1 = asSequence(this.n1m_1.h2());
2004
+ tmp = buffered(tmp_0.z1k(map(tmp_1, NumericIndex$retractAllIndexed$lambda(this, clause))));
2005
+ }
2006
+ return tmp;
2007
+ };
2008
+ protoOf(NumericIndex).p1i = function (clause) {
2009
+ var tmp = this.w1l(clause);
2010
+ return map(tmp, NumericIndex$retractAll$lambda);
2011
+ };
2012
+ protoOf(NumericIndex).f1k = function () {
2013
+ var tmp = Utils_instance;
2014
+ var tmp_0 = asSequence(this.n1m_1.h2());
2015
+ return tmp.z1k(map(tmp_0, NumericIndex$getCache$lambda));
2016
+ };
2017
+ protoOf(NumericIndex).x1l = function (clause) {
2018
+ var tmp = this.f1k();
2019
+ return filter(tmp, NumericIndex$extractGlobalIndexedSequence$lambda(this, clause));
2020
+ };
2021
+ function extractFirst_3($this, clause, index) {
2022
+ var tmp$ret$0;
2023
+ $l$block: {
2024
+ // Inline function 'kotlin.collections.indexOfFirst' call
2025
+ var index_0 = 0;
2026
+ var _iterator__ex2g4s = index.m();
2027
+ while (_iterator__ex2g4s.p()) {
2028
+ var item = _iterator__ex2g4s.q();
2029
+ if ($this.x1h().match(item.b1k(), clause)) {
2030
+ tmp$ret$0 = index_0;
2031
+ break $l$block;
2032
+ }
2033
+ index_0 = index_0 + 1 | 0;
2034
+ }
2035
+ tmp$ret$0 = -1;
2036
+ }
2037
+ var actualIndex = tmp$ret$0;
2038
+ var tmp;
2039
+ if (actualIndex === -1) {
2040
+ tmp = null;
2041
+ } else {
2042
+ tmp = index.t(actualIndex);
2043
+ }
2044
+ return tmp;
2045
+ }
2046
+ function extractGlobalSequence_1($this, clause) {
2047
+ var tmp = $this.x1l(clause);
2048
+ return map(tmp, VariableIndex$extractGlobalSequence$lambda);
2049
+ }
2050
+ function VariableIndex$retractAll$lambda(it) {
2051
+ return it.b1k();
2052
+ }
2053
+ function VariableIndex$extractGlobalIndexedSequence$lambda(this$0, $clause) {
2054
+ return function (it) {
2055
+ return this$0.x1h().match(it.b1k(), $clause);
2056
+ };
2057
+ }
2058
+ function VariableIndex$extractGlobalSequence$lambda(it) {
2059
+ return it.b1k();
2060
+ }
2061
+ function VariableIndex(unificator, ordered) {
2062
+ AbstractIndexingLeaf.call(this, unificator);
2063
+ this.p1m_1 = ordered;
2064
+ this.q1m_1 = dequeOf([]);
2065
+ }
2066
+ protoOf(VariableIndex).s = function () {
2067
+ return this.q1m_1.s();
2068
+ };
2069
+ protoOf(VariableIndex).c1i = function () {
2070
+ return this.q1m_1.g();
2071
+ };
2072
+ protoOf(VariableIndex).f1i = function (clause) {
2073
+ return extractGlobalSequence_1(this, clause);
2074
+ };
2075
+ protoOf(VariableIndex).d1k = function (clause) {
2076
+ var tmp;
2077
+ if (this.p1m_1) {
2078
+ addFirst(this.q1m_1, Companion_instance_8.s1l(clause.k1l(this), this));
2079
+ tmp = Unit_instance;
2080
+ } else {
2081
+ this.e1k(clause);
2082
+ tmp = Unit_instance;
2083
+ }
2084
+ return tmp;
2085
+ };
2086
+ protoOf(VariableIndex).e1k = function (clause) {
2087
+ this.q1m_1.j(Companion_instance_8.s1l(clause.k1l(this), this));
2088
+ };
2089
+ protoOf(VariableIndex).p1i = function (clause) {
2090
+ var tmp = this.w1l(clause);
2091
+ return map(tmp, VariableIndex$retractAll$lambda);
2092
+ };
2093
+ protoOf(VariableIndex).f1k = function () {
2094
+ return asSequence(this.q1m_1);
2095
+ };
2096
+ protoOf(VariableIndex).u1l = function (clause) {
2097
+ return extractFirst_3(this, clause, this.q1m_1);
2098
+ };
2099
+ protoOf(VariableIndex).v1l = function (clause) {
2100
+ return this.x1l(clause);
2101
+ };
2102
+ protoOf(VariableIndex).r1l = function (indexed) {
2103
+ this.q1m_1.e3(indexed);
2104
+ };
2105
+ protoOf(VariableIndex).w1l = function (clause) {
2106
+ return buffered(this.c1k(this.q1m_1, clause));
2107
+ };
2108
+ protoOf(VariableIndex).x1l = function (clause) {
2109
+ var tmp = asSequence(this.q1m_1);
2110
+ return filter(tmp, VariableIndex$extractGlobalIndexedSequence$lambda(this, clause));
2111
+ };
2112
+ function ArityNode(unificator) {
2113
+ AbstractReteNode.call(this, unificator);
2114
+ }
2115
+ function FamilyArityIndexingNode(unificator, ordered, nestingLevel) {
2116
+ FamilyArityReteNode.call(this, unificator, ordered, nestingLevel);
2117
+ this.z1m_1 = ordered;
2118
+ }
2119
+ protoOf(FamilyArityIndexingNode).u1l = function (clause) {
2120
+ var tmp;
2121
+ if (this.z1m_1) {
2122
+ tmp = this.j1n(clause);
2123
+ } else {
2124
+ tmp = this.i1n(clause);
2125
+ }
2126
+ return tmp;
2127
+ };
2128
+ protoOf(FamilyArityIndexingNode).v1l = function (clause) {
2129
+ var tmp;
2130
+ if (this.z1m_1) {
2131
+ tmp = this.l1n(clause);
2132
+ } else {
2133
+ tmp = this.k1n(clause);
2134
+ }
2135
+ return tmp;
2136
+ };
2137
+ protoOf(FamilyArityIndexingNode).w1l = function (clause) {
2138
+ var tmp;
2139
+ if (this.z1m_1) {
2140
+ tmp = this.n1n(clause);
2141
+ } else {
2142
+ tmp = this.m1n(clause);
2143
+ }
2144
+ return tmp;
2145
+ };
2146
+ protoOf(FamilyArityIndexingNode).x1l = function (clause) {
2147
+ var tmp;
2148
+ if (this.z1m_1) {
2149
+ tmp = Utils_instance.x1k([this.e1n_1.x1l(clause), this.d1n_1.x1l(clause), this.f1n_1.x1l(clause), this.g1n_1.x1l(clause)]);
2150
+ } else {
2151
+ tmp = Utils_instance.a1l([this.e1n_1.x1l(clause), this.d1n_1.x1l(clause), this.f1n_1.x1l(clause), this.g1n_1.x1l(clause)]);
2152
+ }
2153
+ return tmp;
2154
+ };
2155
+ function retractAllOrdered_0($this, clause) {
2156
+ var tmp = $this.n1n(clause);
2157
+ return map(tmp, FamilyArityReteNode$retractAllOrdered$lambda);
2158
+ }
2159
+ function getOrdered($this, clause) {
2160
+ var tmp = $this.l1n(clause);
2161
+ return map(tmp, FamilyArityReteNode$getOrdered$lambda);
2162
+ }
2163
+ function retractAllUnordered_0($this, clause) {
2164
+ var tmp = $this.m1n(clause);
2165
+ return map(tmp, FamilyArityReteNode$retractAllUnordered$lambda);
2166
+ }
2167
+ function getUnordered($this, clause) {
2168
+ var tmp = $this.k1n(clause);
2169
+ return map(tmp, FamilyArityReteNode$getUnordered$lambda);
2170
+ }
2171
+ function regenerateCache_0($this) {
2172
+ var tmp;
2173
+ if ($this.b1n_1) {
2174
+ tmp = Utils_instance.x1k([$this.e1n_1.f1k(), $this.d1n_1.f1k(), $this.f1n_1.f1k(), $this.g1n_1.f1k()]);
2175
+ } else {
2176
+ tmp = Utils_instance.a1l([$this.e1n_1.f1k(), $this.d1n_1.f1k(), $this.f1n_1.f1k(), $this.g1n_1.f1k()]);
2177
+ }
2178
+ return dequeOf_0(tmp);
2179
+ }
2180
+ function nestedFirstArgument_1($this, $receiver) {
2181
+ return Utils_instance.w1k(ensureNotNull($receiver.nv()), $this.c1n_1 + 1 | 0);
2182
+ }
2183
+ function assertByFirstParameter($this, clause) {
2184
+ var innerFirst = nestedFirstArgument_1($this, clause.b1k());
2185
+ return innerFirst.hu() ? $this.d1n_1 : innerFirst.ct() ? $this.e1n_1 : innerFirst.du() ? $this.f1n_1 : $this.g1n_1;
2186
+ }
2187
+ function isGlobal_0($this, $receiver) {
2188
+ return Utils_instance.w1k(ensureNotNull($receiver.nv()), $this.c1n_1 + 1 | 0).du();
2189
+ }
2190
+ function FamilyArityReteNode$regenerateCache$ref(p0) {
2191
+ return constructCallableReference(function () {
2192
+ var tmp0 = p0;
2193
+ return regenerateCache_0(tmp0);
2194
+ }, 0, 0, 34, 'regenerateCache', [p0]);
2195
+ }
2196
+ function FamilyArityReteNode$_get_size_$lambda_sxz8zo(it) {
2197
+ return it.s();
2198
+ }
2199
+ function FamilyArityReteNode$get$lambda(it) {
2200
+ return it.b1k();
2201
+ }
2202
+ function FamilyArityReteNode$get$lambda_0(it) {
2203
+ return it.b1k();
2204
+ }
2205
+ function FamilyArityReteNode$retractAllOrdered$lambda(it) {
2206
+ return it.b1k();
2207
+ }
2208
+ function FamilyArityReteNode$getOrdered$lambda(it) {
2209
+ return it.b1k();
2210
+ }
2211
+ function FamilyArityReteNode$retractAllUnordered$lambda(it) {
2212
+ return it.b1k();
2213
+ }
2214
+ function FamilyArityReteNode$getUnordered$lambda(it) {
2215
+ return it.b1k();
2216
+ }
2217
+ function FamilyArityReteNode(unificator, ordered, nestingLevel) {
2218
+ ArityNode.call(this, unificator);
2219
+ this.b1n_1 = ordered;
2220
+ this.c1n_1 = nestingLevel;
2221
+ this.d1n_1 = new NumericIndex(unificator, this.b1n_1, this.c1n_1);
2222
+ this.e1n_1 = new AtomIndex(unificator, this.b1n_1, this.c1n_1);
2223
+ this.f1n_1 = new VariableIndex(unificator, this.b1n_1);
2224
+ this.g1n_1 = new CompoundIndex(unificator, this.b1n_1, this.c1n_1 + 1 | 0);
2225
+ var tmp = this;
2226
+ var tmp_0 = Companion_instance_1;
2227
+ tmp.h1n_1 = tmp_0.io(FamilyArityReteNode$regenerateCache$ref(this));
2228
+ }
2229
+ protoOf(FamilyArityReteNode).n1i = function (clause) {
2230
+ var tmp;
2231
+ if (this.b1n_1) {
2232
+ tmp = this.j1n(clause);
2233
+ } else {
2234
+ tmp = this.i1n(clause);
2235
+ }
2236
+ var result = tmp;
2237
+ var tmp_0;
2238
+ if (result == null) {
2239
+ tmp_0 = emptySequence();
2240
+ } else {
2241
+ result.q1l();
2242
+ this.g1k();
2243
+ tmp_0 = sequenceOf_0(result.b1k());
2244
+ }
2245
+ return tmp_0;
2246
+ };
2247
+ protoOf(FamilyArityReteNode).s = function () {
2248
+ var tmp = sequenceOf([this.d1n_1, this.e1n_1, this.f1n_1, this.g1n_1]);
2249
+ return sum(map(tmp, FamilyArityReteNode$_get_size_$lambda_sxz8zo));
2250
+ };
2251
+ protoOf(FamilyArityReteNode).c1i = function () {
2252
+ var tmp0 = sequenceOf([this.d1n_1, this.e1n_1, this.f1n_1, this.g1n_1]);
2253
+ var tmp$ret$0;
2254
+ $l$block: {
2255
+ // Inline function 'kotlin.sequences.all' call
2256
+ var _iterator__ex2g4s = tmp0.m();
2257
+ while (_iterator__ex2g4s.p()) {
2258
+ var element = _iterator__ex2g4s.q();
2259
+ if (!element.c1i()) {
2260
+ tmp$ret$0 = false;
2261
+ break $l$block;
2262
+ }
2263
+ }
2264
+ tmp$ret$0 = true;
2265
+ }
2266
+ return tmp$ret$0;
2267
+ };
2268
+ protoOf(FamilyArityReteNode).f1i = function (clause) {
2269
+ var tmp;
2270
+ if (isGlobal_0(this, clause)) {
2271
+ var tmp_0;
2272
+ if (this.b1n_1) {
2273
+ var tmp_1 = Utils_instance.x1k([this.e1n_1.x1l(clause), this.f1n_1.x1l(clause), this.d1n_1.x1l(clause), this.g1n_1.x1l(clause)]);
2274
+ tmp_0 = map(tmp_1, FamilyArityReteNode$get$lambda);
2275
+ } else {
2276
+ var tmp_2 = Utils_instance.a1l([this.e1n_1.x1l(clause), this.f1n_1.x1l(clause), this.d1n_1.x1l(clause), this.g1n_1.x1l(clause)]);
2277
+ tmp_0 = map(tmp_2, FamilyArityReteNode$get$lambda_0);
2278
+ }
2279
+ tmp = tmp_0;
2280
+ } else {
2281
+ var tmp_3;
2282
+ if (this.b1n_1) {
2283
+ tmp_3 = getOrdered(this, clause);
2284
+ } else {
2285
+ tmp_3 = getUnordered(this, clause);
2286
+ }
2287
+ tmp = tmp_3;
2288
+ }
2289
+ return tmp;
2290
+ };
2291
+ protoOf(FamilyArityReteNode).d1k = function (clause) {
2292
+ return assertByFirstParameter(this, clause).d1k(clause.k1l(this));
2293
+ };
2294
+ protoOf(FamilyArityReteNode).e1k = function (clause) {
2295
+ return assertByFirstParameter(this, clause).e1k(clause.k1l(this));
2296
+ };
2297
+ protoOf(FamilyArityReteNode).p1i = function (clause) {
2298
+ var tmp;
2299
+ if (this.b1n_1) {
2300
+ tmp = retractAllOrdered_0(this, clause);
2301
+ } else {
2302
+ tmp = retractAllUnordered_0(this, clause);
2303
+ }
2304
+ return tmp;
2305
+ };
2306
+ protoOf(FamilyArityReteNode).f1k = function () {
2307
+ return asSequence(this.h1n_1.c2());
2308
+ };
2309
+ protoOf(FamilyArityReteNode).n1n = function (clause) {
2310
+ var innerFirst = nestedFirstArgument_1(this, clause);
2311
+ var tmp;
2312
+ if (innerFirst.hu()) {
2313
+ tmp = Utils_instance.x1k([this.f1n_1.w1l(clause), this.d1n_1.w1l(clause)]);
2314
+ } else if (innerFirst.ct()) {
2315
+ tmp = Utils_instance.x1k([this.f1n_1.w1l(clause), this.e1n_1.w1l(clause)]);
2316
+ } else if (innerFirst.du()) {
2317
+ tmp = Utils_instance.x1k([this.f1n_1.w1l(clause), this.d1n_1.w1l(clause), this.e1n_1.w1l(clause), this.g1n_1.w1l(clause)]);
2318
+ } else {
2319
+ tmp = Utils_instance.x1k([this.f1n_1.w1l(clause), this.g1n_1.w1l(clause)]);
2320
+ }
2321
+ return tmp;
2322
+ };
2323
+ protoOf(FamilyArityReteNode).m1n = function (clause) {
2324
+ var innerFirst = nestedFirstArgument_1(this, clause);
2325
+ return innerFirst.hu() ? Utils_instance.a1l([this.f1n_1.w1l(clause), this.d1n_1.w1l(clause)]) : innerFirst.ct() ? Utils_instance.a1l([this.f1n_1.w1l(clause), this.e1n_1.w1l(clause)]) : innerFirst.du() ? Utils_instance.a1l([this.f1n_1.w1l(clause), this.d1n_1.w1l(clause), this.e1n_1.w1l(clause), this.g1n_1.w1l(clause)]) : Utils_instance.a1l([this.f1n_1.w1l(clause), this.g1n_1.w1l(clause)]);
2326
+ };
2327
+ protoOf(FamilyArityReteNode).l1n = function (clause) {
2328
+ var innerFirst = nestedFirstArgument_1(this, clause);
2329
+ return innerFirst.hu() ? Utils_instance.x1k([this.f1n_1.v1l(clause), this.d1n_1.v1l(clause)]) : innerFirst.ct() ? Utils_instance.x1k([this.f1n_1.v1l(clause), this.e1n_1.v1l(clause)]) : innerFirst.du() ? Utils_instance.x1k([this.f1n_1.v1l(clause), this.d1n_1.v1l(clause), this.e1n_1.v1l(clause), this.g1n_1.v1l(clause)]) : Utils_instance.x1k([this.f1n_1.v1l(clause), this.g1n_1.v1l(clause)]);
2330
+ };
2331
+ protoOf(FamilyArityReteNode).k1n = function (clause) {
2332
+ var innerFirst = nestedFirstArgument_1(this, clause);
2333
+ return innerFirst.hu() ? Utils_instance.a1l([this.f1n_1.v1l(clause), this.d1n_1.v1l(clause)]) : innerFirst.ct() ? Utils_instance.a1l([this.f1n_1.v1l(clause), this.e1n_1.v1l(clause)]) : innerFirst.du() ? Utils_instance.a1l([this.f1n_1.v1l(clause), this.d1n_1.v1l(clause), this.e1n_1.v1l(clause), this.g1n_1.v1l(clause)]) : Utils_instance.a1l([this.f1n_1.v1l(clause), this.g1n_1.v1l(clause)]);
2334
+ };
2335
+ protoOf(FamilyArityReteNode).i1n = function (clause) {
2336
+ var innerFirst = nestedFirstArgument_1(this, clause);
2337
+ var tmp;
2338
+ if (innerFirst.hu()) {
2339
+ var tmp0_elvis_lhs = this.f1n_1.u1l(clause);
2340
+ tmp = tmp0_elvis_lhs == null ? this.d1n_1.u1l(clause) : tmp0_elvis_lhs;
2341
+ } else if (innerFirst.ct()) {
2342
+ var tmp1_elvis_lhs = this.f1n_1.u1l(clause);
2343
+ tmp = tmp1_elvis_lhs == null ? this.e1n_1.u1l(clause) : tmp1_elvis_lhs;
2344
+ } else if (innerFirst.du()) {
2345
+ var tmp2_elvis_lhs = this.f1n_1.u1l(clause);
2346
+ var tmp3_elvis_lhs = tmp2_elvis_lhs == null ? this.d1n_1.u1l(clause) : tmp2_elvis_lhs;
2347
+ var tmp4_elvis_lhs = tmp3_elvis_lhs == null ? this.e1n_1.u1l(clause) : tmp3_elvis_lhs;
2348
+ tmp = tmp4_elvis_lhs == null ? this.g1n_1.u1l(clause) : tmp4_elvis_lhs;
2349
+ } else {
2350
+ var tmp5_elvis_lhs = this.f1n_1.u1l(clause);
2351
+ tmp = tmp5_elvis_lhs == null ? this.g1n_1.u1l(clause) : tmp5_elvis_lhs;
2352
+ }
2353
+ return tmp;
2354
+ };
2355
+ protoOf(FamilyArityReteNode).j1n = function (clause) {
2356
+ var innerFirst = nestedFirstArgument_1(this, clause);
2357
+ var tmp;
2358
+ if (innerFirst.hu()) {
2359
+ tmp = Utils_instance.g1l(this.d1n_1.u1l(clause), this.f1n_1.u1l(clause));
2360
+ } else if (innerFirst.ct()) {
2361
+ tmp = Utils_instance.g1l(this.e1n_1.u1l(clause), this.f1n_1.u1l(clause));
2362
+ } else if (innerFirst.du()) {
2363
+ tmp = Utils_instance.g1l(Utils_instance.g1l(this.d1n_1.u1l(clause), this.e1n_1.u1l(clause)), Utils_instance.g1l(this.f1n_1.u1l(clause), this.g1n_1.u1l(clause)));
2364
+ } else {
2365
+ tmp = Utils_instance.g1l(this.f1n_1.u1l(clause), this.g1n_1.u1l(clause));
2366
+ }
2367
+ return tmp;
2368
+ };
2369
+ protoOf(FamilyArityReteNode).g1k = function () {
2370
+ this.h1n_1.ko();
2371
+ };
2372
+ function isGlobal_1($this, $receiver) {
2373
+ return $receiver.pt() && Utils_instance.w1k($receiver.castToRule().nv(), $this.q1n_1).du();
2374
+ }
2375
+ function nestedArity($this, $receiver) {
2376
+ var tmp0_safe_receiver = $receiver.asRule();
2377
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nv();
2378
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : Utils_instance.u1k(tmp1_safe_receiver, $this.q1n_1);
2379
+ var tmp;
2380
+ if (tmp2_elvis_lhs == null) {
2381
+ // Inline function 'kotlin.error' call
2382
+ var message = 'The nestedArity method cannot be invoked on non-rule clauses';
2383
+ throw IllegalStateException_init_$Create$(toString(message));
2384
+ } else {
2385
+ tmp = tmp2_elvis_lhs;
2386
+ }
2387
+ return tmp;
2388
+ }
2389
+ function nestedArity_0($this, $receiver) {
2390
+ return Utils_instance.u1k(ensureNotNull($receiver.b1k().nv()), $this.q1n_1);
2391
+ }
2392
+ function regenerateCache_1($this) {
2393
+ var tmp;
2394
+ if ($this.p1n_1) {
2395
+ var tmp_0 = Utils_instance;
2396
+ // Inline function 'kotlin.collections.map' call
2397
+ var this_0 = $this.r1n_1.h2();
2398
+ // Inline function 'kotlin.collections.mapTo' call
2399
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
2400
+ var _iterator__ex2g4s = this_0.m();
2401
+ while (_iterator__ex2g4s.p()) {
2402
+ var item = _iterator__ex2g4s.q();
2403
+ var tmp$ret$2 = item.f1k();
2404
+ destination.j(tmp$ret$2);
2405
+ }
2406
+ tmp = tmp_0.y1k(destination);
2407
+ } else {
2408
+ var tmp_1 = Utils_instance;
2409
+ // Inline function 'kotlin.collections.map' call
2410
+ var this_1 = $this.r1n_1.h2();
2411
+ // Inline function 'kotlin.collections.mapTo' call
2412
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
2413
+ var _iterator__ex2g4s_0 = this_1.m();
2414
+ while (_iterator__ex2g4s_0.p()) {
2415
+ var item_0 = _iterator__ex2g4s_0.q();
2416
+ var tmp$ret$5 = item_0.f1k();
2417
+ destination_0.j(tmp$ret$5);
2418
+ }
2419
+ tmp = tmp_1.c1l(destination_0);
2420
+ }
2421
+ return dequeOf_0(tmp);
2422
+ }
2423
+ function FunctorIndexingNode$regenerateCache$ref(p0) {
2424
+ return constructCallableReference(function () {
2425
+ var tmp0 = p0;
2426
+ return regenerateCache_1(tmp0);
2427
+ }, 0, 0, 35, 'regenerateCache', [p0]);
2428
+ }
2429
+ function FunctorIndexingNode$_get_size_$lambda_vcufvm(it) {
2430
+ return it.s();
2431
+ }
2432
+ function FunctorIndexingNode$retractAllIndexed$lambda(this$0, $clause) {
2433
+ return function (it) {
2434
+ return this$0.x1h().match(it.b1k(), $clause);
2435
+ };
2436
+ }
2437
+ function FunctorIndexingNode(unificator, ordered, nestingLevel) {
2438
+ FunctorNode.call(this, unificator);
2439
+ this.p1n_1 = ordered;
2440
+ this.q1n_1 = nestingLevel;
2441
+ var tmp = this;
2442
+ // Inline function 'kotlin.collections.mutableMapOf' call
2443
+ tmp.r1n_1 = LinkedHashMap_init_$Create$();
2444
+ var tmp_0 = this;
2445
+ var tmp_1 = Companion_instance_1;
2446
+ tmp_0.s1n_1 = tmp_1.io(FunctorIndexingNode$regenerateCache$ref(this));
2447
+ }
2448
+ protoOf(FunctorIndexingNode).s = function () {
2449
+ var tmp = asSequence(this.r1n_1.h2());
2450
+ return sum(map(tmp, FunctorIndexingNode$_get_size_$lambda_vcufvm));
2451
+ };
2452
+ protoOf(FunctorIndexingNode).c1i = function () {
2453
+ var tmp;
2454
+ if (this.r1n_1.g()) {
2455
+ tmp = true;
2456
+ } else {
2457
+ var tmp0 = this.r1n_1.h2();
2458
+ var tmp$ret$0;
2459
+ $l$block_0: {
2460
+ // Inline function 'kotlin.collections.all' call
2461
+ var tmp_0;
2462
+ if (isInterface(tmp0, Collection)) {
2463
+ tmp_0 = tmp0.g();
2464
+ } else {
2465
+ tmp_0 = false;
2466
+ }
2467
+ if (tmp_0) {
2468
+ tmp$ret$0 = true;
2469
+ break $l$block_0;
2470
+ }
2471
+ var _iterator__ex2g4s = tmp0.m();
2472
+ while (_iterator__ex2g4s.p()) {
2473
+ var element = _iterator__ex2g4s.q();
2474
+ if (!element.c1i()) {
2475
+ tmp$ret$0 = false;
2476
+ break $l$block_0;
2477
+ }
2478
+ }
2479
+ tmp$ret$0 = true;
2480
+ }
2481
+ tmp = tmp$ret$0;
2482
+ }
2483
+ return tmp;
2484
+ };
2485
+ protoOf(FunctorIndexingNode).f1i = function (clause) {
2486
+ var tmp0_safe_receiver = this.r1n_1.f2(nestedArity(this, clause));
2487
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f1i(clause);
2488
+ return tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
2489
+ };
2490
+ protoOf(FunctorIndexingNode).d1k = function (clause) {
2491
+ var tmp0 = this.r1n_1;
2492
+ // Inline function 'kotlin.collections.getOrPut' call
2493
+ var key = nestedArity_0(this, clause);
2494
+ var value = tmp0.f2(key);
2495
+ var tmp;
2496
+ if (value == null) {
2497
+ var answer = new FamilyArityIndexingNode(this.x1h(), this.p1n_1, this.q1n_1);
2498
+ tmp0.p4(key, answer);
2499
+ tmp = answer;
2500
+ } else {
2501
+ tmp = value;
2502
+ }
2503
+ tmp.d1k(clause.k1l(this));
2504
+ };
2505
+ protoOf(FunctorIndexingNode).e1k = function (clause) {
2506
+ var tmp0 = this.r1n_1;
2507
+ // Inline function 'kotlin.collections.getOrPut' call
2508
+ var key = nestedArity_0(this, clause);
2509
+ var value = tmp0.f2(key);
2510
+ var tmp;
2511
+ if (value == null) {
2512
+ var answer = new FamilyArityIndexingNode(this.x1h(), this.p1n_1, this.q1n_1);
2513
+ tmp0.p4(key, answer);
2514
+ tmp = answer;
2515
+ } else {
2516
+ tmp = value;
2517
+ }
2518
+ tmp.e1k(clause.k1l(this));
2519
+ };
2520
+ protoOf(FunctorIndexingNode).p1i = function (clause) {
2521
+ var tmp0_safe_receiver = this.r1n_1.f2(nestedArity(this, clause));
2522
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p1i(clause);
2523
+ return tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
2524
+ };
2525
+ protoOf(FunctorIndexingNode).f1k = function () {
2526
+ return asSequence(this.s1n_1.c2());
2527
+ };
2528
+ protoOf(FunctorIndexingNode).u1l = function (clause) {
2529
+ var tmp;
2530
+ if (isGlobal_1(this, clause)) {
2531
+ var tmp_0 = Utils_instance;
2532
+ // Inline function 'kotlin.collections.map' call
2533
+ var this_0 = this.r1n_1.h2();
2534
+ // Inline function 'kotlin.collections.mapTo' call
2535
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
2536
+ var _iterator__ex2g4s = this_0.m();
2537
+ while (_iterator__ex2g4s.p()) {
2538
+ var item = _iterator__ex2g4s.q();
2539
+ var tmp$ret$2 = item.x1l(clause);
2540
+ destination.j(tmp$ret$2);
2541
+ }
2542
+ var tmp0 = tmp_0.y1k(destination);
2543
+ var tmp$ret$3;
2544
+ $l$block: {
2545
+ // Inline function 'kotlin.sequences.firstOrNull' call
2546
+ var _iterator__ex2g4s_0 = tmp0.m();
2547
+ while (_iterator__ex2g4s_0.p()) {
2548
+ var element = _iterator__ex2g4s_0.q();
2549
+ if (this.x1h().match(element.b1k(), clause)) {
2550
+ tmp$ret$3 = element;
2551
+ break $l$block;
2552
+ }
2553
+ }
2554
+ tmp$ret$3 = null;
2555
+ }
2556
+ tmp = tmp$ret$3;
2557
+ } else {
2558
+ var tmp0_safe_receiver = this.r1n_1.f2(nestedArity(this, clause));
2559
+ tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u1l(clause);
2560
+ }
2561
+ return tmp;
2562
+ };
2563
+ protoOf(FunctorIndexingNode).v1l = function (clause) {
2564
+ var tmp;
2565
+ if (isGlobal_1(this, clause)) {
2566
+ var tmp_0 = Utils_instance;
2567
+ // Inline function 'kotlin.collections.map' call
2568
+ var this_0 = this.r1n_1.h2();
2569
+ // Inline function 'kotlin.collections.mapTo' call
2570
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
2571
+ var _iterator__ex2g4s = this_0.m();
2572
+ while (_iterator__ex2g4s.p()) {
2573
+ var item = _iterator__ex2g4s.q();
2574
+ var tmp$ret$2 = item.x1l(clause);
2575
+ destination.j(tmp$ret$2);
2576
+ }
2577
+ tmp = tmp_0.y1k(destination);
2578
+ } else {
2579
+ var tmp0_safe_receiver = this.r1n_1.f2(nestedArity(this, clause));
2580
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v1l(clause);
2581
+ tmp = tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
2582
+ }
2583
+ return tmp;
2584
+ };
2585
+ protoOf(FunctorIndexingNode).w1l = function (clause) {
2586
+ var tmp;
2587
+ if (isGlobal_1(this, clause)) {
2588
+ var tmp_0 = Utils_instance;
2589
+ // Inline function 'kotlin.collections.map' call
2590
+ var this_0 = this.r1n_1.h2();
2591
+ // Inline function 'kotlin.collections.mapTo' call
2592
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
2593
+ var _iterator__ex2g4s = this_0.m();
2594
+ while (_iterator__ex2g4s.p()) {
2595
+ var item = _iterator__ex2g4s.q();
2596
+ var tmp$ret$2 = item.x1l(clause);
2597
+ destination.j(tmp$ret$2);
2598
+ }
2599
+ var tmp_1 = tmp_0.y1k(destination);
2600
+ var partialResult = toList(filter(tmp_1, FunctorIndexingNode$retractAllIndexed$lambda(this, clause)));
2601
+ // Inline function 'kotlin.collections.isNotEmpty' call
2602
+ if (!partialResult.g()) {
2603
+ this.g1k();
2604
+ // Inline function 'kotlin.collections.forEach' call
2605
+ var _iterator__ex2g4s_0 = partialResult.m();
2606
+ while (_iterator__ex2g4s_0.p()) {
2607
+ var element = _iterator__ex2g4s_0.q();
2608
+ element.q1l();
2609
+ }
2610
+ }
2611
+ tmp = asSequence(partialResult);
2612
+ } else {
2613
+ var tmp0_safe_receiver = this.r1n_1.f2(nestedArity(this, clause));
2614
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w1l(clause);
2615
+ tmp = tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
2616
+ }
2617
+ return tmp;
2618
+ };
2619
+ protoOf(FunctorIndexingNode).x1l = function (clause) {
2620
+ var tmp;
2621
+ if (this.p1n_1) {
2622
+ var tmp_0 = Utils_instance;
2623
+ // Inline function 'kotlin.collections.map' call
2624
+ var this_0 = this.r1n_1.h2();
2625
+ // Inline function 'kotlin.collections.mapTo' call
2626
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
2627
+ var _iterator__ex2g4s = this_0.m();
2628
+ while (_iterator__ex2g4s.p()) {
2629
+ var item = _iterator__ex2g4s.q();
2630
+ var tmp$ret$2 = item.x1l(clause);
2631
+ destination.j(tmp$ret$2);
2632
+ }
2633
+ tmp = tmp_0.y1k(destination);
2634
+ } else {
2635
+ var tmp_1 = Utils_instance;
2636
+ // Inline function 'kotlin.collections.map' call
2637
+ var this_1 = this.r1n_1.h2();
2638
+ // Inline function 'kotlin.collections.mapTo' call
2639
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
2640
+ var _iterator__ex2g4s_0 = this_1.m();
2641
+ while (_iterator__ex2g4s_0.p()) {
2642
+ var item_0 = _iterator__ex2g4s_0.q();
2643
+ var tmp$ret$5 = item_0.x1l(clause);
2644
+ destination_0.j(tmp$ret$5);
2645
+ }
2646
+ tmp = tmp_1.c1l(destination_0);
2647
+ }
2648
+ return tmp;
2649
+ };
2650
+ protoOf(FunctorIndexingNode).g1k = function () {
2651
+ this.s1n_1.ko();
2652
+ };
2653
+ function FunctorNode(unificator) {
2654
+ AbstractReteNode.call(this, unificator);
2655
+ }
2656
+ function assignHigherIndex($this, clause) {
2657
+ var tmp = Companion_instance_7;
2658
+ $this.z1n_1 = add($this.z1n_1, get_ONE());
2659
+ return tmp.m1l($this.z1n_1, clause, [$this]);
2660
+ }
2661
+ function assignLowerIndex($this, clause) {
2662
+ var tmp = Companion_instance_7;
2663
+ $this.y1n_1 = subtract($this.y1n_1, get_ONE());
2664
+ return tmp.m1l($this.y1n_1, clause, [$this]);
2665
+ }
2666
+ function regenerateCache_2($this) {
2667
+ var tmp;
2668
+ if ($this.u1n_1) {
2669
+ var tmp_0 = Utils_instance.x1k([$this.x1n_1.f1k(), $this.w1n_1.f1k()]);
2670
+ tmp = map(tmp_0, RootNode$regenerateCache$lambda);
2671
+ } else {
2672
+ var tmp_1 = Utils_instance;
2673
+ var tmp_2 = $this.x1n_1.f1k();
2674
+ var tmp_3 = map(tmp_2, RootNode$regenerateCache$lambda_0);
2675
+ var tmp_4 = $this.w1n_1.f1k();
2676
+ tmp = tmp_1.d1l([tmp_3, map(tmp_4, RootNode$regenerateCache$lambda_1)]);
2677
+ }
2678
+ return dequeOf_0(tmp);
2679
+ }
2680
+ function RootNode$regenerateCache$ref(p0) {
2681
+ return constructCallableReference(function () {
2682
+ var tmp0 = p0;
2683
+ return regenerateCache_2(tmp0);
2684
+ }, 0, 0, 36, 'regenerateCache', [p0]);
2685
+ }
2686
+ function RootNode$_get_directives_$lambda_9lfp1g(it) {
2687
+ return it.c2().castToDirective();
2688
+ }
2689
+ function RootNode$_get_rules_$lambda_py6utr(it) {
2690
+ return it.c2().castToRule();
2691
+ }
2692
+ function RootNode$assertA$lambda($clause) {
2693
+ return function (it) {
2694
+ addFirst(it, $clause);
2695
+ return Unit_instance;
2696
+ };
2697
+ }
2698
+ function RootNode$assertZ$lambda($clause) {
2699
+ return function (it) {
2700
+ return it.j($clause);
2701
+ };
2702
+ }
2703
+ function RootNode$regenerateCache$lambda(it) {
2704
+ return it.b1k();
2705
+ }
2706
+ function RootNode$regenerateCache$lambda_0(it) {
2707
+ return it.b1k();
2708
+ }
2709
+ function RootNode$regenerateCache$lambda_1(it) {
2710
+ return it.b1k();
2711
+ }
2712
+ function RootNode(unificator, clauses, isOrdered) {
2713
+ this.t1n_1 = unificator;
2714
+ this.u1n_1 = isOrdered;
2715
+ var tmp = this;
2716
+ var tmp_0 = Companion_instance_1;
2717
+ tmp.v1n_1 = tmp_0.io(RootNode$regenerateCache$ref(this));
2718
+ this.w1n_1 = new RuleNode(this.t1n_1, this.u1n_1);
2719
+ this.x1n_1 = new DirectiveIndex(this.t1n_1, this.u1n_1);
2720
+ this.y1n_1 = new Long(0, 0);
2721
+ this.z1n_1 = new Long(0, 0);
2722
+ // Inline function 'kotlin.collections.forEach' call
2723
+ var _iterator__ex2g4s = clauses.m();
2724
+ while (_iterator__ex2g4s.p()) {
2725
+ var element = _iterator__ex2g4s.q();
2726
+ this.k1i(element);
2727
+ }
2728
+ }
2729
+ protoOf(RootNode).x1h = function () {
2730
+ return this.t1n_1;
2731
+ };
2732
+ protoOf(RootNode).f1j = function () {
2733
+ return this.u1n_1;
2734
+ };
2735
+ protoOf(RootNode).s = function () {
2736
+ return this.x1n_1.s() + this.w1n_1.s() | 0;
2737
+ };
2738
+ protoOf(RootNode).c1i = function () {
2739
+ return this.x1n_1.c1i() && this.w1n_1.c1i();
2740
+ };
2741
+ protoOf(RootNode).h1i = function () {
2742
+ return asSequence(this.v1n_1.c2());
2743
+ };
2744
+ protoOf(RootNode).a1i = function () {
2745
+ var tmp = this.x1n_1.f1k();
2746
+ return map(tmp, RootNode$_get_directives_$lambda_9lfp1g);
2747
+ };
2748
+ protoOf(RootNode).b1i = function () {
2749
+ var tmp = this.w1n_1.f1k();
2750
+ return map(tmp, RootNode$_get_rules_$lambda_py6utr);
2751
+ };
2752
+ protoOf(RootNode).f1i = function (clause) {
2753
+ var tmp;
2754
+ if (clause.qt()) {
2755
+ tmp = this.x1n_1.f1i(clause);
2756
+ } else {
2757
+ tmp = this.w1n_1.f1i(clause);
2758
+ }
2759
+ return tmp;
2760
+ };
2761
+ protoOf(RootNode).n1i = function (clause) {
2762
+ var tmp;
2763
+ if (clause.qt()) {
2764
+ tmp = this.x1n_1.n1i(clause);
2765
+ } else {
2766
+ tmp = this.w1n_1.n1i(clause);
2767
+ }
2768
+ return tmp;
2769
+ };
2770
+ protoOf(RootNode).p1i = function (clause) {
2771
+ var tmp;
2772
+ if (clause.qt()) {
2773
+ tmp = this.x1n_1.p1i(clause);
2774
+ } else {
2775
+ tmp = this.w1n_1.p1i(clause);
2776
+ }
2777
+ return tmp;
2778
+ };
2779
+ protoOf(RootNode).s1i = function () {
2780
+ return new RootNode(this.t1n_1, asIterable(this.h1i()), this.u1n_1);
2781
+ };
2782
+ protoOf(RootNode).j1j = function (clause) {
2783
+ var indexed = assignLowerIndex(this, clause);
2784
+ if (this.u1n_1) {
2785
+ this.v1n_1.lo(RootNode$assertA$lambda(clause));
2786
+ if (clause.qt()) {
2787
+ this.x1n_1.d1k(indexed);
2788
+ } else {
2789
+ this.w1n_1.d1k(indexed);
2790
+ }
2791
+ } else {
2792
+ throw UnsupportedOperationException_init_$Create$('An unordered ReteTree cannot perform the assertA operation.');
2793
+ }
2794
+ };
2795
+ protoOf(RootNode).k1i = function (clause) {
2796
+ var indexed = assignHigherIndex(this, clause);
2797
+ this.v1n_1.lo(RootNode$assertZ$lambda(clause));
2798
+ if (clause.qt()) {
2799
+ this.x1n_1.e1k(indexed);
2800
+ } else {
2801
+ this.w1n_1.e1k(indexed);
2802
+ }
2803
+ };
2804
+ protoOf(RootNode).f1k = function () {
2805
+ return asSequence(this.v1n_1.c2());
2806
+ };
2807
+ protoOf(RootNode).g1k = function () {
2808
+ this.v1n_1.ko();
2809
+ };
2810
+ function nestedFunctor_1($this, $receiver) {
2811
+ return Utils_instance.v1k(ensureNotNull($receiver.nv()), 0);
2812
+ }
2813
+ function nestedFunctor_2($this, $receiver) {
2814
+ return nestedFunctor_1($this, $receiver.b1k());
2815
+ }
2816
+ function regenerateCache_3($this) {
2817
+ var tmp;
2818
+ if ($this.b1o_1) {
2819
+ var tmp_0 = Utils_instance;
2820
+ // Inline function 'kotlin.collections.map' call
2821
+ var this_0 = $this.c1o_1.h2();
2822
+ // Inline function 'kotlin.collections.mapTo' call
2823
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
2824
+ var _iterator__ex2g4s = this_0.m();
2825
+ while (_iterator__ex2g4s.p()) {
2826
+ var item = _iterator__ex2g4s.q();
2827
+ var tmp$ret$2 = item.f1k();
2828
+ destination.j(tmp$ret$2);
2829
+ }
2830
+ tmp = tmp_0.y1k(destination);
2831
+ } else {
2832
+ var tmp_1 = Utils_instance;
2833
+ // Inline function 'kotlin.collections.map' call
2834
+ var this_1 = $this.c1o_1.h2();
2835
+ // Inline function 'kotlin.collections.mapTo' call
2836
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
2837
+ var _iterator__ex2g4s_0 = this_1.m();
2838
+ while (_iterator__ex2g4s_0.p()) {
2839
+ var item_0 = _iterator__ex2g4s_0.q();
2840
+ var tmp$ret$5 = item_0.f1k();
2841
+ destination_0.j(tmp$ret$5);
2842
+ }
2843
+ tmp = tmp_1.c1l(destination_0);
2844
+ }
2845
+ return dequeOf_0(tmp);
2846
+ }
2847
+ function RuleNode$regenerateCache$ref(p0) {
2848
+ return constructCallableReference(function () {
2849
+ var tmp0 = p0;
2850
+ return regenerateCache_3(tmp0);
2851
+ }, 0, 0, 37, 'regenerateCache', [p0]);
2852
+ }
2853
+ function RuleNode$_get_size_$lambda_xjenvf(it) {
2854
+ return it.s();
2855
+ }
2856
+ function RuleNode(unificator, ordered) {
2857
+ this.a1o_1 = unificator;
2858
+ this.b1o_1 = ordered;
2859
+ var tmp = this;
2860
+ // Inline function 'kotlin.collections.mutableMapOf' call
2861
+ tmp.c1o_1 = LinkedHashMap_init_$Create$();
2862
+ var tmp_0 = this;
2863
+ var tmp_1 = Companion_instance_1;
2864
+ tmp_0.d1o_1 = tmp_1.io(RuleNode$regenerateCache$ref(this));
2865
+ }
2866
+ protoOf(RuleNode).f1i = function (clause) {
2867
+ var tmp0_safe_receiver = this.c1o_1.f2(nestedFunctor_1(this, clause));
2868
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f1i(clause);
2869
+ return tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
2870
+ };
2871
+ protoOf(RuleNode).d1k = function (clause) {
2872
+ // Inline function 'kotlin.let' call
2873
+ var it = nestedFunctor_2(this, clause);
2874
+ if (this.b1o_1) {
2875
+ // Inline function 'kotlin.collections.getOrPut' call
2876
+ var this_0 = this.c1o_1;
2877
+ var value = this_0.f2(it);
2878
+ var tmp;
2879
+ if (value == null) {
2880
+ var answer = new TopLevelFunctorReteNode(this.a1o_1, this.b1o_1, 0);
2881
+ this_0.p4(it, answer);
2882
+ tmp = answer;
2883
+ } else {
2884
+ tmp = value;
2885
+ }
2886
+ tmp.d1k(clause.k1l(this));
2887
+ } else {
2888
+ this.e1k(clause);
2889
+ }
2890
+ };
2891
+ protoOf(RuleNode).e1k = function (clause) {
2892
+ // Inline function 'kotlin.let' call
2893
+ var it = nestedFunctor_2(this, clause);
2894
+ // Inline function 'kotlin.collections.getOrPut' call
2895
+ var this_0 = this.c1o_1;
2896
+ var value = this_0.f2(it);
2897
+ var tmp;
2898
+ if (value == null) {
2899
+ var answer = new TopLevelFunctorReteNode(this.a1o_1, this.b1o_1, 0);
2900
+ this_0.p4(it, answer);
2901
+ tmp = answer;
2902
+ } else {
2903
+ tmp = value;
2904
+ }
2905
+ tmp.e1k(clause.k1l(this));
2906
+ };
2907
+ protoOf(RuleNode).n1i = function (clause) {
2908
+ var tmp0_safe_receiver = this.c1o_1.f2(nestedFunctor_1(this, clause));
2909
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n1i(clause);
2910
+ return tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
2911
+ };
2912
+ protoOf(RuleNode).s = function () {
2913
+ var tmp = asSequence(this.c1o_1.h2());
2914
+ return sum(map(tmp, RuleNode$_get_size_$lambda_xjenvf));
2915
+ };
2916
+ protoOf(RuleNode).c1i = function () {
2917
+ var tmp;
2918
+ if (this.c1o_1.g()) {
2919
+ tmp = true;
2920
+ } else {
2921
+ var tmp0 = this.c1o_1.h2();
2922
+ var tmp$ret$0;
2923
+ $l$block_0: {
2924
+ // Inline function 'kotlin.collections.all' call
2925
+ var tmp_0;
2926
+ if (isInterface(tmp0, Collection)) {
2927
+ tmp_0 = tmp0.g();
2928
+ } else {
2929
+ tmp_0 = false;
2930
+ }
2931
+ if (tmp_0) {
2932
+ tmp$ret$0 = true;
2933
+ break $l$block_0;
2934
+ }
2935
+ var _iterator__ex2g4s = tmp0.m();
2936
+ while (_iterator__ex2g4s.p()) {
2937
+ var element = _iterator__ex2g4s.q();
2938
+ if (!element.c1i()) {
2939
+ tmp$ret$0 = false;
2940
+ break $l$block_0;
2941
+ }
2942
+ }
2943
+ tmp$ret$0 = true;
2944
+ }
2945
+ tmp = tmp$ret$0;
2946
+ }
2947
+ return tmp;
2948
+ };
2949
+ protoOf(RuleNode).p1i = function (clause) {
2950
+ var tmp0_safe_receiver = this.c1o_1.f2(nestedFunctor_1(this, clause));
2951
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p1i(clause);
2952
+ return tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
2953
+ };
2954
+ protoOf(RuleNode).f1k = function () {
2955
+ return asSequence(this.d1o_1.c2());
2956
+ };
2957
+ protoOf(RuleNode).g1k = function () {
2958
+ this.d1o_1.ko();
2959
+ };
2960
+ function selectArity($this, clause) {
2961
+ return $this.h1o_1.f2(Utils_instance.u1k(ensureNotNull(clause.nv()), $this.g1o_1));
2962
+ }
2963
+ function chooseAssertionBranch($this, clause, op) {
2964
+ // Inline function 'kotlin.let' call
2965
+ var it = Utils_instance.u1k(ensureNotNull(clause.b1k().nv()), $this.g1o_1);
2966
+ var tmp;
2967
+ if (it === 0) {
2968
+ // Inline function 'kotlin.collections.getOrPut' call
2969
+ var this_0 = $this.h1o_1;
2970
+ var value = this_0.f2(it);
2971
+ var tmp_0;
2972
+ if (value == null) {
2973
+ var answer = new ZeroArityReteNode($this.x1h(), $this.f1o_1);
2974
+ this_0.p4(it, answer);
2975
+ tmp_0 = answer;
2976
+ } else {
2977
+ tmp_0 = value;
2978
+ }
2979
+ tmp = tmp_0;
2980
+ } else {
2981
+ // Inline function 'kotlin.collections.getOrPut' call
2982
+ var this_1 = $this.h1o_1;
2983
+ var value_0 = this_1.f2(it);
2984
+ var tmp_1;
2985
+ if (value_0 == null) {
2986
+ var answer_0 = new FamilyArityReteNode($this.x1h(), $this.f1o_1, $this.g1o_1);
2987
+ this_1.p4(it, answer_0);
2988
+ tmp_1 = answer_0;
2989
+ } else {
2990
+ tmp_1 = value_0;
2991
+ }
2992
+ tmp = tmp_1;
2993
+ }
2994
+ op(tmp, clause);
2995
+ }
2996
+ function regenerateCache_4($this) {
2997
+ var tmp;
2998
+ if ($this.f1o_1) {
2999
+ var tmp_0 = Utils_instance;
3000
+ // Inline function 'kotlin.collections.map' call
3001
+ var this_0 = $this.h1o_1.h2();
3002
+ // Inline function 'kotlin.collections.mapTo' call
3003
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
3004
+ var _iterator__ex2g4s = this_0.m();
3005
+ while (_iterator__ex2g4s.p()) {
3006
+ var item = _iterator__ex2g4s.q();
3007
+ var tmp$ret$2 = item.f1k();
3008
+ destination.j(tmp$ret$2);
3009
+ }
3010
+ tmp = tmp_0.y1k(destination);
3011
+ } else {
3012
+ var tmp_1 = Utils_instance;
3013
+ // Inline function 'kotlin.collections.map' call
3014
+ var this_1 = $this.h1o_1.h2();
3015
+ // Inline function 'kotlin.collections.mapTo' call
3016
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
3017
+ var _iterator__ex2g4s_0 = this_1.m();
3018
+ while (_iterator__ex2g4s_0.p()) {
3019
+ var item_0 = _iterator__ex2g4s_0.q();
3020
+ var tmp$ret$5 = item_0.f1k();
3021
+ destination_0.j(tmp$ret$5);
3022
+ }
3023
+ tmp = tmp_1.c1l(destination_0);
3024
+ }
3025
+ return dequeOf_0(tmp);
3026
+ }
3027
+ function TopLevelFunctorReteNode$regenerateCache$ref(p0) {
3028
+ return constructCallableReference(function () {
3029
+ var tmp0 = p0;
3030
+ return regenerateCache_4(tmp0);
3031
+ }, 0, 0, 38, 'regenerateCache', [p0]);
3032
+ }
3033
+ function TopLevelFunctorReteNode$_get_size_$lambda_6i36rr(it) {
3034
+ return it.s();
3035
+ }
3036
+ function TopLevelFunctorReteNode(unificator, ordered, nestingLevel) {
3037
+ FunctorNode.call(this, unificator);
3038
+ this.f1o_1 = ordered;
3039
+ this.g1o_1 = nestingLevel;
3040
+ var tmp = this;
3041
+ // Inline function 'kotlin.collections.mutableMapOf' call
3042
+ tmp.h1o_1 = LinkedHashMap_init_$Create$();
3043
+ var tmp_0 = this;
3044
+ var tmp_1 = Companion_instance_1;
3045
+ tmp_0.i1o_1 = tmp_1.io(TopLevelFunctorReteNode$regenerateCache$ref(this));
3046
+ }
3047
+ protoOf(TopLevelFunctorReteNode).s = function () {
3048
+ var tmp = asSequence(this.h1o_1.h2());
3049
+ return sum(map(tmp, TopLevelFunctorReteNode$_get_size_$lambda_6i36rr));
3050
+ };
3051
+ protoOf(TopLevelFunctorReteNode).c1i = function () {
3052
+ var tmp;
3053
+ if (this.h1o_1.g()) {
3054
+ tmp = true;
3055
+ } else {
3056
+ var tmp0 = this.h1o_1.h2();
3057
+ var tmp$ret$0;
3058
+ $l$block_0: {
3059
+ // Inline function 'kotlin.collections.all' call
3060
+ var tmp_0;
3061
+ if (isInterface(tmp0, Collection)) {
3062
+ tmp_0 = tmp0.g();
3063
+ } else {
3064
+ tmp_0 = false;
3065
+ }
3066
+ if (tmp_0) {
3067
+ tmp$ret$0 = true;
3068
+ break $l$block_0;
3069
+ }
3070
+ var _iterator__ex2g4s = tmp0.m();
3071
+ while (_iterator__ex2g4s.p()) {
3072
+ var element = _iterator__ex2g4s.q();
3073
+ if (!element.c1i()) {
3074
+ tmp$ret$0 = false;
3075
+ break $l$block_0;
3076
+ }
3077
+ }
3078
+ tmp$ret$0 = true;
3079
+ }
3080
+ tmp = tmp$ret$0;
3081
+ }
3082
+ return tmp;
3083
+ };
3084
+ protoOf(TopLevelFunctorReteNode).f1i = function (clause) {
3085
+ var tmp0_safe_receiver = selectArity(this, clause);
3086
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f1i(clause);
3087
+ return tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
3088
+ };
3089
+ protoOf(TopLevelFunctorReteNode).d1k = function (clause) {
3090
+ var tmp = clause.k1l(this);
3091
+ chooseAssertionBranch(this, tmp, ReteNode$assertA$ref());
3092
+ };
3093
+ protoOf(TopLevelFunctorReteNode).e1k = function (clause) {
3094
+ var tmp = clause.k1l(this);
3095
+ chooseAssertionBranch(this, tmp, ReteNode$assertZ$ref());
3096
+ };
3097
+ protoOf(TopLevelFunctorReteNode).n1i = function (clause) {
3098
+ var tmp0_safe_receiver = selectArity(this, clause);
3099
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n1i(clause);
3100
+ return tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
3101
+ };
3102
+ protoOf(TopLevelFunctorReteNode).p1i = function (clause) {
3103
+ var tmp0_safe_receiver = selectArity(this, clause);
3104
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p1i(clause);
3105
+ return tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs;
3106
+ };
3107
+ protoOf(TopLevelFunctorReteNode).f1k = function () {
3108
+ return asSequence(this.i1o_1.c2());
3109
+ };
3110
+ protoOf(TopLevelFunctorReteNode).g1k = function () {
3111
+ this.i1o_1.ko();
3112
+ };
3113
+ function ZeroArityReteNode$retractFirst$lambda(it) {
3114
+ return it.b1k();
3115
+ }
3116
+ function ZeroArityReteNode$get$lambda(this$0, $clause) {
3117
+ return function (it) {
3118
+ return this$0.x1h().match(it.b1k(), $clause);
3119
+ };
3120
+ }
3121
+ function ZeroArityReteNode$get$lambda_0(it) {
3122
+ return it.b1k();
3123
+ }
3124
+ function ZeroArityReteNode$retractAll$lambda(it) {
3125
+ return it.b1k();
3126
+ }
3127
+ function ZeroArityReteNode(unificator, ordered) {
3128
+ ArityNode.call(this, unificator);
3129
+ this.k1o_1 = ordered;
3130
+ this.l1o_1 = dequeOf([]);
3131
+ }
3132
+ protoOf(ZeroArityReteNode).n1i = function (clause) {
3133
+ var tmp = this.c1k(this.l1o_1, clause);
3134
+ return buffered(take(map(tmp, ZeroArityReteNode$retractFirst$lambda), 1));
3135
+ };
3136
+ protoOf(ZeroArityReteNode).s = function () {
3137
+ return this.l1o_1.s();
3138
+ };
3139
+ protoOf(ZeroArityReteNode).c1i = function () {
3140
+ return this.l1o_1.g();
3141
+ };
3142
+ protoOf(ZeroArityReteNode).f1i = function (clause) {
3143
+ var tmp = asSequence(this.l1o_1);
3144
+ var tmp_0 = filter(tmp, ZeroArityReteNode$get$lambda(this, clause));
3145
+ return map(tmp_0, ZeroArityReteNode$get$lambda_0);
3146
+ };
3147
+ protoOf(ZeroArityReteNode).d1k = function (clause) {
3148
+ if (this.k1o_1) {
3149
+ addFirst(this.l1o_1, Companion_instance_8.s1l(clause.k1l(this), this));
3150
+ } else {
3151
+ this.e1k(clause);
3152
+ }
3153
+ };
3154
+ protoOf(ZeroArityReteNode).e1k = function (clause) {
3155
+ this.l1o_1.j(Companion_instance_8.s1l(clause.k1l(this), this));
3156
+ };
3157
+ protoOf(ZeroArityReteNode).p1i = function (clause) {
3158
+ var tmp = this.c1k(this.l1o_1, clause);
3159
+ return buffered(map(tmp, ZeroArityReteNode$retractAll$lambda));
3160
+ };
3161
+ protoOf(ZeroArityReteNode).f1k = function () {
3162
+ return asSequence(this.l1o_1);
3163
+ };
3164
+ protoOf(ZeroArityReteNode).g1k = function () {
3165
+ };
3166
+ protoOf(ZeroArityReteNode).r1l = function (indexed) {
3167
+ this.l1o_1.e3(indexed);
3168
+ };
3169
+ function AbstractTheory$get$lambda(it) {
3170
+ return it.castToRule();
3171
+ }
3172
+ function AbstractTheory$get$lambda_0(it) {
3173
+ return it.castToRule();
3174
+ }
3175
+ function AbstractTheory(tags) {
3176
+ this.m1o_1 = tags;
3177
+ }
3178
+ protoOf(AbstractTheory).vq = function () {
3179
+ return this.m1o_1;
3180
+ };
3181
+ protoOf(AbstractTheory).n1o = function () {
3182
+ return this;
3183
+ };
3184
+ protoOf(AbstractTheory).toImmutableTheory = function () {
3185
+ return this.n1o();
3186
+ };
3187
+ protoOf(AbstractTheory).o1o = function (clause) {
3188
+ return plus_2.call(this, TheoryUtils_instance.t1i(clause));
3189
+ };
3190
+ protoOf(AbstractTheory).plus = function (clause) {
3191
+ return this.o1o(clause);
3192
+ };
3193
+ protoOf(AbstractTheory).e1i = function (clause) {
3194
+ return any(this.get(clause));
3195
+ };
3196
+ protoOf(AbstractTheory).contains = function (clause) {
3197
+ return this.e1i(clause);
3198
+ };
3199
+ protoOf(AbstractTheory).p1o = function (head) {
3200
+ return this.e1i(Companion_instance_2.of(head, [Companion_getInstance().anonymous()]));
3201
+ };
3202
+ protoOf(AbstractTheory).containsHead = function (head) {
3203
+ return this.p1o(head);
3204
+ };
3205
+ protoOf(AbstractTheory).q1o = function (indicator) {
3206
+ return any(this.r1o(indicator));
3207
+ };
3208
+ protoOf(AbstractTheory).containsIndicator = function (indicator) {
3209
+ return this.q1o(indicator);
3210
+ };
3211
+ protoOf(AbstractTheory).s1o = function (head) {
3212
+ var tmp = this.get(Companion_instance_2.of(head, [Companion_getInstance().anonymous()]));
3213
+ return map(tmp, AbstractTheory$get$lambda);
3214
+ };
3215
+ protoOf(AbstractTheory).getByHead = function (head) {
3216
+ return this.s1o(head);
3217
+ };
3218
+ protoOf(AbstractTheory).r1o = function (indicator) {
3219
+ // Inline function 'kotlin.require' call
3220
+ if (!indicator.xv()) {
3221
+ var message = 'The provided indicator is not well formed: ' + indicator.toString();
3222
+ throw IllegalArgumentException_init_$Create$(toString(message));
3223
+ }
3224
+ var tmp = Companion_instance_2;
3225
+ var tmp_0 = Companion_getInstance_0();
3226
+ var tmp_1 = ensureNotNull(indicator.qx());
3227
+ // Inline function 'kotlin.collections.map' call
3228
+ var this_0 = numberRangeToNumber(1, ensureNotNull(indicator.rx()));
3229
+ // Inline function 'kotlin.collections.mapTo' call
3230
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
3231
+ var inductionVariable = this_0.bg_1;
3232
+ var last = this_0.cg_1;
3233
+ if (inductionVariable <= last)
3234
+ do {
3235
+ var item = inductionVariable;
3236
+ inductionVariable = inductionVariable + 1 | 0;
3237
+ var tmp$ret$4 = Companion_getInstance().anonymous();
3238
+ destination.j(tmp$ret$4);
3239
+ }
3240
+ while (!(item === last));
3241
+ var tmp_2 = this.get(tmp.of(tmp_0.ofList(tmp_1, destination), [Companion_getInstance().anonymous()]));
3242
+ return map(tmp_2, AbstractTheory$get$lambda_0);
3243
+ };
3244
+ protoOf(AbstractTheory).getByIndicator = function (indicator) {
3245
+ return this.r1o(indicator);
3246
+ };
3247
+ protoOf(AbstractTheory).t1o = function (indicator) {
3248
+ // Inline function 'kotlin.require' call
3249
+ if (!indicator.xv()) {
3250
+ var message = 'The provided indicator is not well formed: ' + indicator.toString();
3251
+ throw IllegalArgumentException_init_$Create$(toString(message));
3252
+ }
3253
+ return this.retractAllByHead(Companion_getInstance_0().template(ensureNotNull(indicator.qx()), ensureNotNull(indicator.rx()))).u1o();
3254
+ };
3255
+ protoOf(AbstractTheory).abolish = function (indicator) {
3256
+ return this.t1o(indicator);
3257
+ };
3258
+ protoOf(AbstractTheory).toString = function () {
3259
+ return '' + getKClassFromExpression(this).g9() + '{ ' + joinToString(this.h1i(), '. ') + ' }';
3260
+ };
3261
+ protoOf(AbstractTheory).v1o = function (asPrologText) {
3262
+ var tmp;
3263
+ if (asPrologText) {
3264
+ tmp = joinToString(this.h1i(), '.\n', '', '.\n');
3265
+ } else {
3266
+ tmp = this.toString();
3267
+ }
3268
+ return tmp;
3269
+ };
3270
+ protoOf(AbstractTheory).toStringAsProlog = function (asPrologText) {
3271
+ return this.v1o(asPrologText);
3272
+ };
3273
+ protoOf(AbstractTheory).m = function () {
3274
+ return this.h1i().m();
3275
+ };
3276
+ protoOf(AbstractTheory).equals = function (other) {
3277
+ if (other == null)
3278
+ return false;
3279
+ if (!isInterface(other, Theory))
3280
+ return false;
3281
+ return this.w1o(other, true);
3282
+ };
3283
+ protoOf(AbstractTheory).w1o = function (other, useVarCompleteName) {
3284
+ if (this === other)
3285
+ return true;
3286
+ var i = this.h1i().m();
3287
+ var j = other.h1i().m();
3288
+ while (i.p() && j.p()) {
3289
+ if (!i.q().equalsUsingVarCompleteNames(j.q(), useVarCompleteName)) {
3290
+ return false;
3291
+ }
3292
+ }
3293
+ return i.p() === j.p();
3294
+ };
3295
+ protoOf(AbstractTheory).equalsUsingVarCompleteNames = function (other, useVarCompleteName) {
3296
+ return this.w1o(other, useVarCompleteName);
3297
+ };
3298
+ protoOf(AbstractTheory).hashCode = function () {
3299
+ // Inline function 'kotlin.hashCode' call
3300
+ var tmp0_safe_receiver = getKClass(AbstractTheory).g9();
3301
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
3302
+ var base = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
3303
+ var result = base ^ (base >>> 32 | 0);
3304
+ var _iterator__ex2g4s = this.h1i().m();
3305
+ while (_iterator__ex2g4s.p()) {
3306
+ var clause = _iterator__ex2g4s.q();
3307
+ result = imul(31, result) + clause.hashCode() | 0;
3308
+ }
3309
+ return result;
3310
+ };
3311
+ protoOf(AbstractTheory).s = function () {
3312
+ var i = new Long(0, 0);
3313
+ var iter = this.m();
3314
+ while (iter.p()) {
3315
+ iter.q();
3316
+ var _unary__edvuaz = i;
3317
+ i = add(_unary__edvuaz, get_ONE());
3318
+ }
3319
+ return i;
3320
+ };
3321
+ protoOf(AbstractTheory).c1i = function () {
3322
+ return !this.x1o();
3323
+ };
3324
+ protoOf(AbstractTheory).x1o = function () {
3325
+ return this.m().p();
3326
+ };
3327
+ protoOf(AbstractTheory).y1o = function (unificator) {
3328
+ var tmp;
3329
+ if (!equals(unificator, this.x1h())) {
3330
+ tmp = this.z1o(asSequence(this.h1i()), VOID, unificator);
3331
+ } else {
3332
+ tmp = this;
3333
+ }
3334
+ return tmp;
3335
+ };
3336
+ protoOf(AbstractTheory).setUnificator = function (unificator) {
3337
+ return this.y1o(unificator);
3338
+ };
3339
+ protoOf(AbstractTheory).a1p = function (theory) {
3340
+ var tmp;
3341
+ if (theory.x1o()) {
3342
+ tmp = this.z1o(plus_0(asSequence(this.h1i()), TheoryUtils_instance.b1p(asSequence(theory.h1i()))));
3343
+ } else {
3344
+ tmp = this;
3345
+ }
3346
+ return tmp;
3347
+ };
3348
+ protoOf(AbstractTheory).plusTheory = function (theory) {
3349
+ return this.a1p(theory);
3350
+ };
3351
+ protoOf(AbstractTheory).c1p = function (clause) {
3352
+ return this.z1o(plus_0(TheoryUtils_instance.d1p([clause]), asSequence(this.h1i())));
3353
+ };
3354
+ protoOf(AbstractTheory).assertA = function (clause) {
3355
+ return this.c1p(clause);
3356
+ };
3357
+ protoOf(AbstractTheory).e1p = function (clauses) {
3358
+ return this.z1o(plus_0(TheoryUtils_instance.b1p(asSequence(clauses)), asSequence(this.h1i())));
3359
+ };
3360
+ protoOf(AbstractTheory).assertAIterable = function (clauses) {
3361
+ return this.e1p(clauses);
3362
+ };
3363
+ protoOf(AbstractTheory).f1p = function (clauses) {
3364
+ return this.z1o(plus_0(TheoryUtils_instance.b1p(clauses), asSequence(this.h1i())));
3365
+ };
3366
+ protoOf(AbstractTheory).assertASequence = function (clauses) {
3367
+ return this.f1p(clauses);
3368
+ };
3369
+ protoOf(AbstractTheory).g1p = function (clause) {
3370
+ return this.z1o(plus_0(asSequence(this.h1i()), TheoryUtils_instance.b1p(sequenceOf_0(clause))));
3371
+ };
3372
+ protoOf(AbstractTheory).assertZ = function (clause) {
3373
+ return this.g1p(clause);
3374
+ };
3375
+ protoOf(AbstractTheory).h1p = function (clauses) {
3376
+ return this.z1o(plus_0(asSequence(this.h1i()), asSequence(TheoryUtils_instance.e1j(clauses))));
3377
+ };
3378
+ protoOf(AbstractTheory).assertZIterable = function (clauses) {
3379
+ return this.h1p(clauses);
3380
+ };
3381
+ protoOf(AbstractTheory).i1p = function (clauses) {
3382
+ return this.z1o(plus_0(asSequence(this.h1i()), TheoryUtils_instance.b1p(clauses)));
3383
+ };
3384
+ protoOf(AbstractTheory).assertZSequence = function (clauses) {
3385
+ return this.i1p(clauses);
3386
+ };
3387
+ protoOf(AbstractTheory).z1o = function (clauses, tags, unificator, $super) {
3388
+ tags = tags === VOID ? this.vq() : tags;
3389
+ unificator = unificator === VOID ? this.x1h() : unificator;
3390
+ return $super === VOID ? this.j1p(clauses, tags, unificator) : $super.j1p.call(this, clauses, tags, unificator);
3391
+ };
3392
+ protoOf(AbstractTheory).k1p = function (clauses) {
3393
+ return this.l1p(asIterable(clauses));
3394
+ };
3395
+ protoOf(AbstractTheory).retractSequence = function (clauses) {
3396
+ return this.k1p(clauses);
3397
+ };
3398
+ protoOf(AbstractTheory).m1p = function () {
3399
+ return this;
3400
+ };
3401
+ protoOf(AbstractTheory).clone = function () {
3402
+ return this.m1p();
3403
+ };
3404
+ function Default() {
3405
+ Default_instance = this;
3406
+ this.o1p_1 = new IndexedTheoryFactory(Companion_getInstance_1().q1h());
3407
+ }
3408
+ protoOf(Default).emptyTheoryWithUnificator = function (unificator) {
3409
+ return this.o1p_1.q1p(unificator);
3410
+ };
3411
+ protoOf(Default).emptyTheory = function () {
3412
+ return this.o1p_1.emptyTheory();
3413
+ };
3414
+ protoOf(Default).theoryOfIterableWithUnificator = function (clauses, unificator) {
3415
+ return this.o1p_1.r1p(clauses, unificator);
3416
+ };
3417
+ protoOf(Default).theoryOfIterable = function (clauses) {
3418
+ return this.o1p_1.theoryOfIterable(clauses);
3419
+ };
3420
+ protoOf(Default).theoryOfWithUnificator = function (unificator, clauses) {
3421
+ return this.o1p_1.s1p(unificator, clauses);
3422
+ };
3423
+ protoOf(Default).theoryOf = function (clauses) {
3424
+ return this.o1p_1.theoryOf(clauses);
3425
+ };
3426
+ protoOf(Default).theoryOfSequenceWithUnificator = function (clauses, unificator) {
3427
+ return this.o1p_1.t1p(clauses, unificator);
3428
+ };
3429
+ protoOf(Default).theoryOfSequence = function (clauses) {
3430
+ return this.o1p_1.theoryOfSequence(clauses);
3431
+ };
3432
+ protoOf(Default).emptyMutableTheoryWithUnificator = function (unificator) {
3433
+ return this.o1p_1.u1p(unificator);
3434
+ };
3435
+ protoOf(Default).emptyMutableTheory = function () {
3436
+ return this.o1p_1.emptyMutableTheory();
3437
+ };
3438
+ protoOf(Default).mutableTheoryOfIterableWithUnificator = function (clauses, unificator) {
3439
+ return this.o1p_1.v1p(clauses, unificator);
3440
+ };
3441
+ protoOf(Default).mutableTheoryOfIterable = function (clauses) {
3442
+ return this.o1p_1.mutableTheoryOfIterable(clauses);
3443
+ };
3444
+ protoOf(Default).mutableTheoryOfWithUnificator = function (unificator, clauses) {
3445
+ return this.o1p_1.w1p(unificator, clauses);
3446
+ };
3447
+ protoOf(Default).mutableTheoryOf = function (clauses) {
3448
+ return this.o1p_1.mutableTheoryOf(clauses);
3449
+ };
3450
+ protoOf(Default).mutableTheoryOfSequenceWithUnificator = function (clauses, unificator) {
3451
+ return this.o1p_1.x1p(clauses, unificator);
3452
+ };
3453
+ protoOf(Default).mutableTheoryOfSequence = function (clauses) {
3454
+ return this.o1p_1.mutableTheoryOfSequence(clauses);
3455
+ };
3456
+ protoOf(Default).x1h = function () {
3457
+ return this.o1p_1.p1p_1;
3458
+ };
3459
+ var Default_instance;
3460
+ function Default_getInstance() {
3461
+ if (Default_instance == null)
3462
+ new Default();
3463
+ return Default_instance;
3464
+ }
3465
+ function IndexedTheoryFactory(unificator) {
3466
+ this.p1p_1 = unificator;
3467
+ }
3468
+ protoOf(IndexedTheoryFactory).x1h = function () {
3469
+ return this.p1p_1;
3470
+ };
3471
+ protoOf(IndexedTheoryFactory).q1p = function (unificator) {
3472
+ return IndexedTheory_init_$Create$(unificator, emptyList());
3473
+ };
3474
+ protoOf(IndexedTheoryFactory).emptyTheoryWithUnificator = function (unificator) {
3475
+ return this.q1p(unificator);
3476
+ };
3477
+ protoOf(IndexedTheoryFactory).r1p = function (clauses, unificator) {
3478
+ return IndexedTheory_init_$Create$(unificator, clauses);
3479
+ };
3480
+ protoOf(IndexedTheoryFactory).theoryOfIterableWithUnificator = function (clauses, unificator) {
3481
+ return this.r1p(clauses, unificator);
3482
+ };
3483
+ protoOf(IndexedTheoryFactory).s1p = function (unificator, clauses) {
3484
+ return IndexedTheory_init_$Create$(unificator, asIterable_0(clauses));
3485
+ };
3486
+ protoOf(IndexedTheoryFactory).theoryOfWithUnificator = function (unificator, clauses) {
3487
+ return this.s1p(unificator, clauses);
3488
+ };
3489
+ protoOf(IndexedTheoryFactory).t1p = function (clauses, unificator) {
3490
+ return IndexedTheory_init_$Create$_0(unificator, clauses);
3491
+ };
3492
+ protoOf(IndexedTheoryFactory).theoryOfSequenceWithUnificator = function (clauses, unificator) {
3493
+ return this.t1p(clauses, unificator);
3494
+ };
3495
+ protoOf(IndexedTheoryFactory).u1p = function (unificator) {
3496
+ return MutableIndexedTheory_init_$Create$(unificator, emptyList());
3497
+ };
3498
+ protoOf(IndexedTheoryFactory).emptyMutableTheoryWithUnificator = function (unificator) {
3499
+ return this.u1p(unificator);
3500
+ };
3501
+ protoOf(IndexedTheoryFactory).v1p = function (clauses, unificator) {
3502
+ return MutableIndexedTheory_init_$Create$(unificator, clauses);
3503
+ };
3504
+ protoOf(IndexedTheoryFactory).mutableTheoryOfIterableWithUnificator = function (clauses, unificator) {
3505
+ return this.v1p(clauses, unificator);
3506
+ };
3507
+ protoOf(IndexedTheoryFactory).w1p = function (unificator, clauses) {
3508
+ return MutableIndexedTheory_init_$Create$(unificator, asIterable_0(clauses));
3509
+ };
3510
+ protoOf(IndexedTheoryFactory).mutableTheoryOfWithUnificator = function (unificator, clauses) {
3511
+ return this.w1p(unificator, clauses);
3512
+ };
3513
+ protoOf(IndexedTheoryFactory).x1p = function (clauses, unificator) {
3514
+ return MutableIndexedTheory_init_$Create$_0(unificator, clauses);
3515
+ };
3516
+ protoOf(IndexedTheoryFactory).mutableTheoryOfSequenceWithUnificator = function (clauses, unificator) {
3517
+ return this.x1p(clauses, unificator);
3518
+ };
3519
+ function Default_0() {
3520
+ Default_instance_0 = this;
3521
+ this.y1p_1 = new ListedTheoryFactory(Companion_getInstance_1().q1h());
3522
+ }
3523
+ protoOf(Default_0).emptyTheoryWithUnificator = function (unificator) {
3524
+ return this.y1p_1.q1p(unificator);
3525
+ };
3526
+ protoOf(Default_0).emptyTheory = function () {
3527
+ return this.y1p_1.emptyTheory();
3528
+ };
3529
+ protoOf(Default_0).theoryOfIterableWithUnificator = function (clauses, unificator) {
3530
+ return this.y1p_1.r1p(clauses, unificator);
3531
+ };
3532
+ protoOf(Default_0).theoryOfIterable = function (clauses) {
3533
+ return this.y1p_1.theoryOfIterable(clauses);
3534
+ };
3535
+ protoOf(Default_0).theoryOfWithUnificator = function (unificator, clauses) {
3536
+ return this.y1p_1.s1p(unificator, clauses);
3537
+ };
3538
+ protoOf(Default_0).theoryOf = function (clauses) {
3539
+ return this.y1p_1.theoryOf(clauses);
3540
+ };
3541
+ protoOf(Default_0).theoryOfSequenceWithUnificator = function (clauses, unificator) {
3542
+ return this.y1p_1.t1p(clauses, unificator);
3543
+ };
3544
+ protoOf(Default_0).theoryOfSequence = function (clauses) {
3545
+ return this.y1p_1.theoryOfSequence(clauses);
3546
+ };
3547
+ protoOf(Default_0).emptyMutableTheoryWithUnificator = function (unificator) {
3548
+ return this.y1p_1.u1p(unificator);
3549
+ };
3550
+ protoOf(Default_0).emptyMutableTheory = function () {
3551
+ return this.y1p_1.emptyMutableTheory();
3552
+ };
3553
+ protoOf(Default_0).mutableTheoryOfIterableWithUnificator = function (clauses, unificator) {
3554
+ return this.y1p_1.v1p(clauses, unificator);
3555
+ };
3556
+ protoOf(Default_0).mutableTheoryOfIterable = function (clauses) {
3557
+ return this.y1p_1.mutableTheoryOfIterable(clauses);
3558
+ };
3559
+ protoOf(Default_0).mutableTheoryOfWithUnificator = function (unificator, clauses) {
3560
+ return this.y1p_1.w1p(unificator, clauses);
3561
+ };
3562
+ protoOf(Default_0).mutableTheoryOf = function (clauses) {
3563
+ return this.y1p_1.mutableTheoryOf(clauses);
3564
+ };
3565
+ protoOf(Default_0).mutableTheoryOfSequenceWithUnificator = function (clauses, unificator) {
3566
+ return this.y1p_1.x1p(clauses, unificator);
3567
+ };
3568
+ protoOf(Default_0).mutableTheoryOfSequence = function (clauses) {
3569
+ return this.y1p_1.mutableTheoryOfSequence(clauses);
3570
+ };
3571
+ protoOf(Default_0).x1h = function () {
3572
+ return this.y1p_1.z1p_1;
3573
+ };
3574
+ var Default_instance_0;
3575
+ function Default_getInstance_0() {
3576
+ if (Default_instance_0 == null)
3577
+ new Default_0();
3578
+ return Default_instance_0;
3579
+ }
3580
+ function ListedTheoryFactory(unificator) {
3581
+ this.z1p_1 = unificator;
3582
+ }
3583
+ protoOf(ListedTheoryFactory).x1h = function () {
3584
+ return this.z1p_1;
3585
+ };
3586
+ protoOf(ListedTheoryFactory).q1p = function (unificator) {
3587
+ return ListedTheory_init_$Create$(unificator, emptyList());
3588
+ };
3589
+ protoOf(ListedTheoryFactory).emptyTheoryWithUnificator = function (unificator) {
3590
+ return this.q1p(unificator);
3591
+ };
3592
+ protoOf(ListedTheoryFactory).r1p = function (clauses, unificator) {
3593
+ return ListedTheory_init_$Create$(unificator, clauses);
3594
+ };
3595
+ protoOf(ListedTheoryFactory).theoryOfIterableWithUnificator = function (clauses, unificator) {
3596
+ return this.r1p(clauses, unificator);
3597
+ };
3598
+ protoOf(ListedTheoryFactory).s1p = function (unificator, clauses) {
3599
+ return ListedTheory_init_$Create$(unificator, asIterable_0(clauses));
3600
+ };
3601
+ protoOf(ListedTheoryFactory).theoryOfWithUnificator = function (unificator, clauses) {
3602
+ return this.s1p(unificator, clauses);
3603
+ };
3604
+ protoOf(ListedTheoryFactory).t1p = function (clauses, unificator) {
3605
+ return ListedTheory_init_$Create$_0(unificator, clauses);
3606
+ };
3607
+ protoOf(ListedTheoryFactory).theoryOfSequenceWithUnificator = function (clauses, unificator) {
3608
+ return this.t1p(clauses, unificator);
3609
+ };
3610
+ protoOf(ListedTheoryFactory).u1p = function (unificator) {
3611
+ return MutableListedTheory_init_$Create$(unificator, emptyList());
3612
+ };
3613
+ protoOf(ListedTheoryFactory).emptyMutableTheoryWithUnificator = function (unificator) {
3614
+ return this.u1p(unificator);
3615
+ };
3616
+ protoOf(ListedTheoryFactory).v1p = function (clauses, unificator) {
3617
+ return MutableListedTheory_init_$Create$(unificator, clauses);
3618
+ };
3619
+ protoOf(ListedTheoryFactory).mutableTheoryOfIterableWithUnificator = function (clauses, unificator) {
3620
+ return this.v1p(clauses, unificator);
3621
+ };
3622
+ protoOf(ListedTheoryFactory).w1p = function (unificator, clauses) {
3623
+ return MutableListedTheory_init_$Create$(unificator, asIterable_0(clauses));
3624
+ };
3625
+ protoOf(ListedTheoryFactory).mutableTheoryOfWithUnificator = function (unificator, clauses) {
3626
+ return this.w1p(unificator, clauses);
3627
+ };
3628
+ protoOf(ListedTheoryFactory).x1p = function (clauses, unificator) {
3629
+ return MutableListedTheory_init_$Create$_0(unificator, clauses);
3630
+ };
3631
+ protoOf(ListedTheoryFactory).mutableTheoryOfSequenceWithUnificator = function (clauses, unificator) {
3632
+ return this.x1p(clauses, unificator);
3633
+ };
3634
+ function Companion_4() {
3635
+ }
3636
+ protoOf(Companion_4).empty = function (unificator) {
3637
+ return this.indexedOfIterable(unificator, emptyList());
3638
+ };
3639
+ protoOf(Companion_4).of = function (unificator, clause) {
3640
+ return this.indexedOf(unificator, clause.slice());
3641
+ };
3642
+ protoOf(Companion_4).ofIterable = function (unificator, clauses) {
3643
+ return this.indexedOfIterable(unificator, clauses);
3644
+ };
3645
+ protoOf(Companion_4).ofSequence = function (unificator, clauses) {
3646
+ return this.indexedOfSequence(unificator, clauses);
3647
+ };
3648
+ protoOf(Companion_4).ofScopes = function (unificator, clauses) {
3649
+ return this.indexedOfScopes(unificator, clauses.slice());
3650
+ };
3651
+ protoOf(Companion_4).emptyIndexed = function (unificator) {
3652
+ return this.indexedOfIterable(unificator, emptyList());
3653
+ };
3654
+ protoOf(Companion_4).indexedOf = function (unificator, clause) {
3655
+ return this.indexedOfIterable(unificator, asIterable_0(clause));
3656
+ };
3657
+ protoOf(Companion_4).indexedOfScopes = function (unificator, clauses) {
3658
+ // Inline function 'kotlin.collections.map' call
3659
+ // Inline function 'kotlin.collections.mapTo' call
3660
+ var destination = ArrayList_init_$Create$(clauses.length);
3661
+ var inductionVariable = 0;
3662
+ var last = clauses.length;
3663
+ while (inductionVariable < last) {
3664
+ var item = clauses[inductionVariable];
3665
+ inductionVariable = inductionVariable + 1 | 0;
3666
+ var tmp$ret$2 = Companion_instance.emptyWithFunction(item);
3667
+ destination.j(tmp$ret$2);
3668
+ }
3669
+ return this.indexedOfIterable(unificator, destination);
3670
+ };
3671
+ protoOf(Companion_4).indexedOfSequence = function (unificator, clauses) {
3672
+ return this.indexedOfIterable(unificator, asIterable(clauses));
3673
+ };
3674
+ protoOf(Companion_4).indexedOfIterable = function (unificator, clauses) {
3675
+ return MutableIndexedTheory_init_$Create$(unificator, clauses);
3676
+ };
3677
+ protoOf(Companion_4).emptyListed = function (unificator) {
3678
+ return this.listedOfSequence(unificator, emptySequence());
3679
+ };
3680
+ protoOf(Companion_4).listedOf = function (unificator, clause) {
3681
+ return this.listedOfIterable(unificator, asIterable_0(clause));
3682
+ };
3683
+ protoOf(Companion_4).listedOfScopes = function (unificator, clause) {
3684
+ // Inline function 'kotlin.collections.map' call
3685
+ // Inline function 'kotlin.collections.mapTo' call
3686
+ var destination = ArrayList_init_$Create$(clause.length);
3687
+ var inductionVariable = 0;
3688
+ var last = clause.length;
3689
+ while (inductionVariable < last) {
3690
+ var item = clause[inductionVariable];
3691
+ inductionVariable = inductionVariable + 1 | 0;
3692
+ var tmp$ret$2 = Companion_instance.emptyWithFunction(item);
3693
+ destination.j(tmp$ret$2);
3694
+ }
3695
+ return this.listedOfIterable(unificator, destination);
3696
+ };
3697
+ protoOf(Companion_4).listedOfSequence = function (unificator, clauses) {
3698
+ return this.listedOfIterable(unificator, asIterable(clauses));
3699
+ };
3700
+ protoOf(Companion_4).listedOfIterable = function (unificator, clauses) {
3701
+ return MutableListedTheory_init_$Create$(unificator, clauses);
3702
+ };
3703
+ var Companion_instance_9;
3704
+ function Companion_getInstance_7() {
3705
+ return Companion_instance_9;
3706
+ }
3707
+ function MutableTheory() {
3708
+ }
3709
+ function Success_0(theory, clauses) {
3710
+ RetractResult.call(this);
3711
+ this.g1q_1 = theory;
3712
+ this.h1q_1 = clauses;
3713
+ }
3714
+ protoOf(Success_0).u1o = function () {
3715
+ return this.g1q_1;
3716
+ };
3717
+ protoOf(Success_0).h1i = function () {
3718
+ return this.h1q_1;
3719
+ };
3720
+ protoOf(Success_0).a1j = function () {
3721
+ return first_0(this.h1q_1);
3722
+ };
3723
+ protoOf(Success_0).toString = function () {
3724
+ return 'Success(theory=' + toString(this.g1q_1) + ', clauses=' + toString(this.h1q_1) + ')';
3725
+ };
3726
+ protoOf(Success_0).hashCode = function () {
3727
+ var result = hashCode(this.g1q_1);
3728
+ result = imul(result, 31) + hashCode(this.h1q_1) | 0;
3729
+ return result;
3730
+ };
3731
+ protoOf(Success_0).equals = function (other) {
3732
+ if (this === other)
3733
+ return true;
3734
+ if (!(other instanceof Success_0))
3735
+ return false;
3736
+ if (!equals(this.g1q_1, other.g1q_1))
3737
+ return false;
3738
+ if (!equals(this.h1q_1, other.h1q_1))
3739
+ return false;
3740
+ return true;
3741
+ };
3742
+ function Failure_0(theory) {
3743
+ RetractResult.call(this);
3744
+ this.i1q_1 = theory;
3745
+ }
3746
+ protoOf(Failure_0).u1o = function () {
3747
+ return this.i1q_1;
3748
+ };
3749
+ protoOf(Failure_0).h1i = function () {
3750
+ return null;
3751
+ };
3752
+ protoOf(Failure_0).a1j = function () {
3753
+ return null;
3754
+ };
3755
+ protoOf(Failure_0).toString = function () {
3756
+ return 'Failure(theory=' + toString(this.i1q_1) + ')';
3757
+ };
3758
+ protoOf(Failure_0).hashCode = function () {
3759
+ return hashCode(this.i1q_1);
3760
+ };
3761
+ protoOf(Failure_0).equals = function (other) {
3762
+ if (this === other)
3763
+ return true;
3764
+ if (!(other instanceof Failure_0))
3765
+ return false;
3766
+ if (!equals(this.i1q_1, other.i1q_1))
3767
+ return false;
3768
+ return true;
3769
+ };
3770
+ function RetractResult() {
3771
+ }
3772
+ function Companion_5() {
3773
+ }
3774
+ protoOf(Companion_5).empty = function (unificator) {
3775
+ return this.indexedOfSequence(unificator, emptySequence());
3776
+ };
3777
+ protoOf(Companion_5).emptyWithDefaultUnificator = function () {
3778
+ return this.empty(Companion_getInstance_1().q1h());
3779
+ };
3780
+ protoOf(Companion_5).of = function (unificator, clause) {
3781
+ return this.indexedOf(unificator, clause.slice());
3782
+ };
3783
+ protoOf(Companion_5).ofWithDefaultUnificator = function (clause) {
3784
+ return this.indexedOf(Companion_getInstance_1().q1h(), clause.slice());
3785
+ };
3786
+ protoOf(Companion_5).ofIterable = function (unificator, clauses) {
3787
+ return this.indexedOfIterable(unificator, clauses);
3788
+ };
3789
+ protoOf(Companion_5).ofIterableWithDefaultUnificator = function (clauses) {
3790
+ return this.indexedOfIterable(Companion_getInstance_1().q1h(), clauses);
3791
+ };
3792
+ protoOf(Companion_5).ofSequence = function (unificator, clauses) {
3793
+ return this.indexedOfSequence(unificator, clauses);
3794
+ };
3795
+ protoOf(Companion_5).ofSequenceWithDefaultUnificator = function (clauses) {
3796
+ return this.indexedOfSequence(Companion_getInstance_1().q1h(), clauses);
3797
+ };
3798
+ protoOf(Companion_5).ofScopes = function (unificator, clauses) {
3799
+ return this.indexedOfScopes(unificator, clauses.slice());
3800
+ };
3801
+ protoOf(Companion_5).ofScopesWithDefaultUnificator = function (clauses) {
3802
+ return this.indexedOfScopes(Companion_getInstance_1().q1h(), clauses.slice());
3803
+ };
3804
+ protoOf(Companion_5).emptyIndexed = function (unificator) {
3805
+ return this.indexedOfIterable(unificator, emptyList());
3806
+ };
3807
+ protoOf(Companion_5).indexedOf = function (unificator, clause) {
3808
+ return this.indexedOfIterable(unificator, asIterable_0(clause));
3809
+ };
3810
+ protoOf(Companion_5).indexedOfScopes = function (unificator, clauses) {
3811
+ // Inline function 'kotlin.collections.map' call
3812
+ // Inline function 'kotlin.collections.mapTo' call
3813
+ var destination = ArrayList_init_$Create$(clauses.length);
3814
+ var inductionVariable = 0;
3815
+ var last = clauses.length;
3816
+ while (inductionVariable < last) {
3817
+ var item = clauses[inductionVariable];
3818
+ inductionVariable = inductionVariable + 1 | 0;
3819
+ var tmp$ret$2 = Companion_instance.emptyWithFunction(item);
3820
+ destination.j(tmp$ret$2);
3821
+ }
3822
+ return this.indexedOfIterable(unificator, destination);
3823
+ };
3824
+ protoOf(Companion_5).indexedOfSequence = function (unificator, clauses) {
3825
+ return this.indexedOfIterable(unificator, asIterable(clauses));
3826
+ };
3827
+ protoOf(Companion_5).indexedOfIterable = function (unificator, clauses) {
3828
+ return Default_getInstance().theoryOfIterableWithUnificator(clauses, unificator);
3829
+ };
3830
+ protoOf(Companion_5).emptyListed = function (unificator) {
3831
+ return this.listedOfSequence(unificator, emptySequence());
3832
+ };
3833
+ protoOf(Companion_5).listedOf = function (unificator, clause) {
3834
+ return this.listedOfIterable(unificator, asIterable_0(clause));
3835
+ };
3836
+ protoOf(Companion_5).listedOfScopes = function (unificator, clause) {
3837
+ // Inline function 'kotlin.collections.map' call
3838
+ // Inline function 'kotlin.collections.mapTo' call
3839
+ var destination = ArrayList_init_$Create$(clause.length);
3840
+ var inductionVariable = 0;
3841
+ var last = clause.length;
3842
+ while (inductionVariable < last) {
3843
+ var item = clause[inductionVariable];
3844
+ inductionVariable = inductionVariable + 1 | 0;
3845
+ var tmp$ret$2 = Companion_instance.emptyWithFunction(item);
3846
+ destination.j(tmp$ret$2);
3847
+ }
3848
+ return this.listedOfIterable(unificator, destination);
3849
+ };
3850
+ protoOf(Companion_5).listedOfSequence = function (unificator, clauses) {
3851
+ return this.listedOfIterable(unificator, asIterable(clauses));
3852
+ };
3853
+ protoOf(Companion_5).listedOfIterable = function (unificator, clauses) {
3854
+ return Default_getInstance_0().theoryOfIterableWithUnificator(clauses, unificator);
3855
+ };
3856
+ var Companion_instance_10;
3857
+ function Companion_getInstance_8() {
3858
+ return Companion_instance_10;
3859
+ }
3860
+ function Theory$_get_rules_$lambda_c39n1s(it) {
3861
+ return it.asRule();
3862
+ }
3863
+ function Theory$_get_directives_$lambda_zbsn17(it) {
3864
+ return it.asDirective();
3865
+ }
3866
+ function Theory() {
3867
+ }
3868
+ function TheoryFactory() {
3869
+ }
3870
+ function actualCheck($this, clauses) {
3871
+ var tmp$ret$0;
3872
+ $l$block: {
3873
+ // Inline function 'kotlin.sequences.all' call
3874
+ var _iterator__ex2g4s = clauses.m();
3875
+ while (_iterator__ex2g4s.p()) {
3876
+ var element = _iterator__ex2g4s.q();
3877
+ if (!element.xv()) {
3878
+ tmp$ret$0 = false;
3879
+ break $l$block;
3880
+ }
3881
+ }
3882
+ tmp$ret$0 = true;
3883
+ }
3884
+ // Inline function 'kotlin.require' call
3885
+ if (!tmp$ret$0) {
3886
+ var message = "ClauseDatabase can contain only well formed clauses: these aren't " + toString(toList(filterNot(clauses, TheoryUtils$actualCheck$lambda)));
3887
+ throw IllegalArgumentException_init_$Create$(toString(message));
3888
+ }
3889
+ }
3890
+ function TheoryUtils$actualCheck$lambda(it) {
3891
+ return it.xv();
3892
+ }
3893
+ function TheoryUtils() {
3894
+ }
3895
+ protoOf(TheoryUtils).t1i = function (clause) {
3896
+ // Inline function 'kotlin.also' call
3897
+ // Inline function 'kotlin.require' call
3898
+ if (!clause.xv()) {
3899
+ var message = 'ClauseDatabase can contain only well formed clauses: ' + ("this isn't " + clause.toString());
3900
+ throw IllegalArgumentException_init_$Create$(toString(message));
3901
+ }
3902
+ return clause;
3903
+ };
3904
+ protoOf(TheoryUtils).d1p = function (clauses) {
3905
+ // Inline function 'kotlin.also' call
3906
+ var this_0 = asSequence_0(clauses);
3907
+ actualCheck(TheoryUtils_instance, this_0);
3908
+ return this_0;
3909
+ };
3910
+ protoOf(TheoryUtils).e1j = function (clauses) {
3911
+ // Inline function 'kotlin.also' call
3912
+ actualCheck(TheoryUtils_instance, asSequence(clauses));
3913
+ return clauses;
3914
+ };
3915
+ protoOf(TheoryUtils).b1p = function (clauses) {
3916
+ // Inline function 'kotlin.also' call
3917
+ actualCheck(TheoryUtils_instance, clauses);
3918
+ return clauses;
3919
+ };
3920
+ var TheoryUtils_instance;
3921
+ function TheoryUtils_getInstance() {
3922
+ return TheoryUtils_instance;
3923
+ }
3924
+ function AbstractIndexedTheory$clauses$$inlined$Iterable$1(this$0) {
3925
+ this.j1q_1 = this$0;
3926
+ }
3927
+ protoOf(AbstractIndexedTheory$clauses$$inlined$Iterable$1).m = function () {
3928
+ return this.j1q_1.m1q().m();
3929
+ };
3930
+ function AbstractIndexedTheory(queue, tags) {
3931
+ AbstractTheory.call(this, tags);
3932
+ this.l1q_1 = queue;
3933
+ }
3934
+ protoOf(AbstractIndexedTheory).x1h = function () {
3935
+ return this.m1q().x1h();
3936
+ };
3937
+ protoOf(AbstractIndexedTheory).m1q = function () {
3938
+ return this.l1q_1;
3939
+ };
3940
+ protoOf(AbstractIndexedTheory).a1i = function () {
3941
+ return this.m1q().z1h();
3942
+ };
3943
+ protoOf(AbstractIndexedTheory).b1i = function () {
3944
+ return this.m1q().b1i();
3945
+ };
3946
+ protoOf(AbstractIndexedTheory).h1i = function () {
3947
+ // Inline function 'kotlin.collections.Iterable' call
3948
+ return new AbstractIndexedTheory$clauses$$inlined$Iterable$1(this);
3949
+ };
3950
+ protoOf(AbstractIndexedTheory).f1i = function (clause) {
3951
+ return this.m1q().f1i(clause);
3952
+ };
3953
+ protoOf(AbstractIndexedTheory).get = function (clause) {
3954
+ return this.f1i(clause);
3955
+ };
3956
+ protoOf(AbstractIndexedTheory).s = function () {
3957
+ return fromInt(this.m1q().s());
3958
+ };
3959
+ protoOf(AbstractIndexedTheory).c1i = function () {
3960
+ return this.m1q().isEmpty();
3961
+ };
3962
+ protoOf(AbstractIndexedTheory).x1o = function () {
3963
+ return !this.c1i();
3964
+ };
3965
+ function AbstractListedTheory(unificator, clauses, tags) {
3966
+ AbstractTheory.call(this, tags);
3967
+ this.o1q_1 = clauses;
3968
+ this.p1q_1 = unificator;
3969
+ }
3970
+ protoOf(AbstractListedTheory).h1i = function () {
3971
+ return this.o1q_1;
3972
+ };
3973
+ protoOf(AbstractListedTheory).q1q = function (_set____db54di) {
3974
+ this.p1q_1 = _set____db54di;
3975
+ };
3976
+ protoOf(AbstractListedTheory).x1h = function () {
3977
+ return this.p1q_1;
3978
+ };
3979
+ protoOf(AbstractListedTheory).f1i = function (clause) {
3980
+ // Inline function 'kotlin.collections.filter' call
3981
+ var tmp0 = this.h1i();
3982
+ // Inline function 'kotlin.collections.filterTo' call
3983
+ var destination = ArrayList_init_$Create$_0();
3984
+ var _iterator__ex2g4s = tmp0.m();
3985
+ while (_iterator__ex2g4s.p()) {
3986
+ var element = _iterator__ex2g4s.q();
3987
+ if (this.x1h().match(element, clause)) {
3988
+ destination.j(element);
3989
+ }
3990
+ }
3991
+ return asSequence(destination);
3992
+ };
3993
+ protoOf(AbstractListedTheory).get = function (clause) {
3994
+ return this.f1i(clause);
3995
+ };
3996
+ function IndexedTheory_init_$Init$(unificator, clauses, tags, $this) {
3997
+ tags = tags === VOID ? emptyMap() : tags;
3998
+ IndexedTheory.call($this, Companion_instance_4.ofIterable(unificator, clauses), tags);
3999
+ TheoryUtils_instance.e1j(clauses);
4000
+ return $this;
4001
+ }
4002
+ function IndexedTheory_init_$Create$(unificator, clauses, tags) {
4003
+ return IndexedTheory_init_$Init$(unificator, clauses, tags, objectCreate(protoOf(IndexedTheory)));
4004
+ }
4005
+ function IndexedTheory_init_$Init$_0(unificator, clauses, tags, $this) {
4006
+ tags = tags === VOID ? emptyMap() : tags;
4007
+ IndexedTheory_init_$Init$(unificator, asIterable(clauses), tags, $this);
4008
+ return $this;
4009
+ }
4010
+ function IndexedTheory_init_$Create$_0(unificator, clauses, tags) {
4011
+ return IndexedTheory_init_$Init$_0(unificator, clauses, tags, objectCreate(protoOf(IndexedTheory)));
4012
+ }
4013
+ function _get_hashCodeCache__ny3r0q_0($this) {
4014
+ var tmp0 = $this.t1q_1;
4015
+ var tmp = KProperty1;
4016
+ // Inline function 'kotlin.getValue' call
4017
+ getPropertyCallableRef('hashCodeCache', 1, tmp, IndexedTheory$_get_hashCodeCache_$ref_4wtmhh(), null);
4018
+ return tmp0.c2();
4019
+ }
4020
+ function _get_sizeCache__6eswog($this) {
4021
+ var tmp0 = $this.u1q_1;
4022
+ var tmp = KProperty1;
4023
+ // Inline function 'kotlin.getValue' call
4024
+ getPropertyCallableRef('sizeCache', 1, tmp, IndexedTheory$_get_sizeCache_$ref_fqi1u9(), null);
4025
+ return tmp0.c2();
4026
+ }
4027
+ function IndexedTheory$hashCodeCache$delegate$lambda(this$0) {
4028
+ return function () {
4029
+ return protoOf(AbstractIndexedTheory).hashCode.call(this$0);
4030
+ };
4031
+ }
4032
+ function IndexedTheory$_get_hashCodeCache_$ref_4wtmhh() {
4033
+ return constructCallableReference(function (p0) {
4034
+ return _get_hashCodeCache__ny3r0q_0(p0);
4035
+ }, 1, 0, 39);
4036
+ }
4037
+ function IndexedTheory$sizeCache$delegate$lambda(this$0) {
4038
+ return function () {
4039
+ return protoOf(AbstractIndexedTheory).s.call(this$0);
4040
+ };
4041
+ }
4042
+ function IndexedTheory$_get_sizeCache_$ref_fqi1u9() {
4043
+ return constructCallableReference(function (p0) {
4044
+ return _get_sizeCache__6eswog(p0);
4045
+ }, 1, 0, 40);
4046
+ }
4047
+ function IndexedTheory(queue, tags) {
4048
+ AbstractIndexedTheory.call(this, queue, tags);
4049
+ var tmp = this;
4050
+ tmp.t1q_1 = lazy(IndexedTheory$hashCodeCache$delegate$lambda(this));
4051
+ var tmp_0 = this;
4052
+ tmp_0.u1q_1 = lazy(IndexedTheory$sizeCache$delegate$lambda(this));
4053
+ }
4054
+ protoOf(IndexedTheory).j1p = function (clauses, tags, unificator) {
4055
+ return IndexedTheory_init_$Create$_0(unificator, clauses, tags);
4056
+ };
4057
+ protoOf(IndexedTheory).d1q = function (clause) {
4058
+ var newTheory = Companion_instance_4.ofIterable(this.x1h(), this.h1i());
4059
+ var retracted = newTheory.retrieveFirst(clause);
4060
+ return retracted.b1j() ? new Failure_0(this) : new Success_0(new IndexedTheory(retracted.z1i(), this.vq()), ensureNotNull(retracted.h1i()));
4061
+ };
4062
+ protoOf(IndexedTheory).retract = function (clause) {
4063
+ return this.d1q(clause);
4064
+ };
4065
+ protoOf(IndexedTheory).a1p = function (theory) {
4066
+ return this.c1i() ? theory.toImmutableTheory() : theory.c1i() ? this : protoOf(AbstractIndexedTheory).a1p.call(this, theory);
4067
+ };
4068
+ protoOf(IndexedTheory).plusTheory = function (theory) {
4069
+ return this.a1p(theory);
4070
+ };
4071
+ protoOf(IndexedTheory).a1q = function () {
4072
+ return Companion_instance_9.indexedOfIterable(this.x1h(), this);
4073
+ };
4074
+ protoOf(IndexedTheory).toMutableTheory = function () {
4075
+ return this.a1q();
4076
+ };
4077
+ protoOf(IndexedTheory).l1p = function (clauses) {
4078
+ var newTheory = Companion_instance_5.ofIterable(this.x1h(), this.h1i());
4079
+ var removed = dequeOf([]);
4080
+ var _iterator__ex2g4s = clauses.m();
4081
+ while (_iterator__ex2g4s.p()) {
4082
+ var clause = _iterator__ex2g4s.q();
4083
+ var result = newTheory.w1i(clause);
4084
+ if (result.lz()) {
4085
+ removed.y(ensureNotNull(result.h1i()));
4086
+ }
4087
+ }
4088
+ var tmp;
4089
+ if (removed.g()) {
4090
+ tmp = new Failure_0(this);
4091
+ } else {
4092
+ tmp = new Success_0(new IndexedTheory(newTheory, this.vq()), removed);
4093
+ }
4094
+ return tmp;
4095
+ };
4096
+ protoOf(IndexedTheory).retractIterable = function (clauses) {
4097
+ return this.l1p(clauses);
4098
+ };
4099
+ protoOf(IndexedTheory).p1i = function (clause) {
4100
+ var newTheory = Companion_instance_4.ofIterable(this.x1h(), this.h1i());
4101
+ var retracted = newTheory.o1i(clause);
4102
+ return retracted.b1j() ? new Failure_0(this) : new Success_0(new IndexedTheory(retracted.z1i(), this.vq()), ensureNotNull(retracted.h1i()));
4103
+ };
4104
+ protoOf(IndexedTheory).retractAll = function (clause) {
4105
+ return this.p1i(clause);
4106
+ };
4107
+ protoOf(IndexedTheory).hashCode = function () {
4108
+ return _get_hashCodeCache__ny3r0q_0(this);
4109
+ };
4110
+ protoOf(IndexedTheory).s = function () {
4111
+ return _get_sizeCache__6eswog(this);
4112
+ };
4113
+ protoOf(IndexedTheory).jz = function (tags) {
4114
+ var tmp;
4115
+ if (tags === this.vq()) {
4116
+ tmp = this;
4117
+ } else {
4118
+ tmp = new IndexedTheory(this.m1q(), tags);
4119
+ }
4120
+ return tmp;
4121
+ };
4122
+ protoOf(IndexedTheory).resetTags = function (tags) {
4123
+ return this.jz(tags);
4124
+ };
4125
+ function ListedTheory_init_$Init$(unificator, clauses, tags, $this) {
4126
+ tags = tags === VOID ? emptyMap() : tags;
4127
+ ListedTheory.call($this, unificator, toList_0(clauses), tags);
4128
+ TheoryUtils_instance.e1j(clauses);
4129
+ return $this;
4130
+ }
4131
+ function ListedTheory_init_$Create$(unificator, clauses, tags) {
4132
+ return ListedTheory_init_$Init$(unificator, clauses, tags, objectCreate(protoOf(ListedTheory)));
4133
+ }
4134
+ function ListedTheory_init_$Init$_0(unificator, clauses, tags, $this) {
4135
+ tags = tags === VOID ? emptyMap() : tags;
4136
+ ListedTheory.call($this, unificator, toList(clauses), tags);
4137
+ TheoryUtils_instance.b1p(clauses);
4138
+ return $this;
4139
+ }
4140
+ function ListedTheory_init_$Create$_0(unificator, clauses, tags) {
4141
+ return ListedTheory_init_$Init$_0(unificator, clauses, tags, objectCreate(protoOf(ListedTheory)));
4142
+ }
4143
+ function _get_hashCodeCache__ny3r0q_1($this) {
4144
+ var tmp0 = $this.y1q_1;
4145
+ var tmp = KProperty1;
4146
+ // Inline function 'kotlin.getValue' call
4147
+ getPropertyCallableRef('hashCodeCache', 1, tmp, ListedTheory$_get_hashCodeCache_$ref_jbnoxj(), null);
4148
+ return tmp0.c2();
4149
+ }
4150
+ function _get_sizeCache__6eswog_0($this) {
4151
+ var tmp0 = $this.z1q_1;
4152
+ var tmp = KProperty1;
4153
+ // Inline function 'kotlin.getValue' call
4154
+ getPropertyCallableRef('sizeCache', 1, tmp, ListedTheory$_get_sizeCache_$ref_3h5dr1(), null);
4155
+ return tmp0.c2();
4156
+ }
4157
+ function ListedTheory$hashCodeCache$delegate$lambda(this$0) {
4158
+ return function () {
4159
+ return protoOf(AbstractListedTheory).hashCode.call(this$0);
4160
+ };
4161
+ }
4162
+ function ListedTheory$_get_hashCodeCache_$ref_jbnoxj() {
4163
+ return constructCallableReference(function (p0) {
4164
+ return _get_hashCodeCache__ny3r0q_1(p0);
4165
+ }, 1, 0, 41);
4166
+ }
4167
+ function ListedTheory$sizeCache$delegate$lambda(this$0) {
4168
+ return function () {
4169
+ return protoOf(AbstractListedTheory).s.call(this$0);
4170
+ };
4171
+ }
4172
+ function ListedTheory$_get_sizeCache_$ref_3h5dr1() {
4173
+ return constructCallableReference(function (p0) {
4174
+ return _get_sizeCache__6eswog_0(p0);
4175
+ }, 1, 0, 42);
4176
+ }
4177
+ function ListedTheory(unificator, clauses, tags) {
4178
+ AbstractListedTheory.call(this, unificator, clauses, tags);
4179
+ var tmp = this;
4180
+ tmp.y1q_1 = lazy(ListedTheory$hashCodeCache$delegate$lambda(this));
4181
+ var tmp_0 = this;
4182
+ tmp_0.z1q_1 = lazy(ListedTheory$sizeCache$delegate$lambda(this));
4183
+ }
4184
+ protoOf(ListedTheory).j1p = function (clauses, tags, unificator) {
4185
+ return ListedTheory_init_$Create$_0(unificator, clauses, tags);
4186
+ };
4187
+ protoOf(ListedTheory).d1q = function (clause) {
4188
+ // Inline function 'kotlin.collections.filter' call
4189
+ var tmp0 = this.h1i();
4190
+ // Inline function 'kotlin.collections.filterTo' call
4191
+ var destination = ArrayList_init_$Create$_0();
4192
+ var _iterator__ex2g4s = tmp0.m();
4193
+ while (_iterator__ex2g4s.p()) {
4194
+ var element = _iterator__ex2g4s.q();
4195
+ if (this.x1h().match(element, clause)) {
4196
+ destination.j(element);
4197
+ }
4198
+ }
4199
+ var retractability = destination;
4200
+ var tmp;
4201
+ if (none_0(retractability)) {
4202
+ tmp = new Failure_0(this);
4203
+ } else {
4204
+ var toBeActuallyRetracted = first(retractability);
4205
+ // Inline function 'kotlin.collections.filter' call
4206
+ var tmp0_0 = this.h1i();
4207
+ // Inline function 'kotlin.collections.filterTo' call
4208
+ var destination_0 = ArrayList_init_$Create$_0();
4209
+ var _iterator__ex2g4s_0 = tmp0_0.m();
4210
+ while (_iterator__ex2g4s_0.p()) {
4211
+ var element_0 = _iterator__ex2g4s_0.q();
4212
+ if (!element_0.equals(toBeActuallyRetracted)) {
4213
+ destination_0.j(element_0);
4214
+ }
4215
+ }
4216
+ var newTheory = destination_0;
4217
+ tmp = new Success_0(new ListedTheory(this.x1h(), newTheory, this.vq()), listOf_0(toBeActuallyRetracted));
4218
+ }
4219
+ return tmp;
4220
+ };
4221
+ protoOf(ListedTheory).retract = function (clause) {
4222
+ return this.d1q(clause);
4223
+ };
4224
+ protoOf(ListedTheory).a1q = function () {
4225
+ return Companion_instance_9.listedOfIterable(this.x1h(), this);
4226
+ };
4227
+ protoOf(ListedTheory).toMutableTheory = function () {
4228
+ return this.a1q();
4229
+ };
4230
+ protoOf(ListedTheory).l1p = function (clauses) {
4231
+ var residual = dequeOf_1(this.h1i());
4232
+ var removed = dequeOf([]);
4233
+ var i = residual.m();
4234
+ while (i.p()) {
4235
+ var current = i.q();
4236
+ var tmp$ret$0;
4237
+ $l$block_0: {
4238
+ // Inline function 'kotlin.collections.any' call
4239
+ var tmp;
4240
+ if (isInterface(clauses, Collection)) {
4241
+ tmp = clauses.g();
4242
+ } else {
4243
+ tmp = false;
4244
+ }
4245
+ if (tmp) {
4246
+ tmp$ret$0 = false;
4247
+ break $l$block_0;
4248
+ }
4249
+ var _iterator__ex2g4s = clauses.m();
4250
+ while (_iterator__ex2g4s.p()) {
4251
+ var element = _iterator__ex2g4s.q();
4252
+ if (this.x1h().match(element, current)) {
4253
+ tmp$ret$0 = true;
4254
+ break $l$block_0;
4255
+ }
4256
+ }
4257
+ tmp$ret$0 = false;
4258
+ }
4259
+ if (tmp$ret$0) {
4260
+ i.g3();
4261
+ removed.j(current);
4262
+ }
4263
+ }
4264
+ var tmp_0;
4265
+ if (removed.g()) {
4266
+ tmp_0 = new Failure_0(this);
4267
+ } else {
4268
+ tmp_0 = new Success_0(new ListedTheory(this.x1h(), residual, this.vq()), removed);
4269
+ }
4270
+ return tmp_0;
4271
+ };
4272
+ protoOf(ListedTheory).retractIterable = function (clauses) {
4273
+ return this.l1p(clauses);
4274
+ };
4275
+ protoOf(ListedTheory).p1i = function (clause) {
4276
+ // Inline function 'kotlin.collections.filter' call
4277
+ var tmp0 = this.h1i();
4278
+ // Inline function 'kotlin.collections.filterTo' call
4279
+ var destination = ArrayList_init_$Create$_0();
4280
+ var _iterator__ex2g4s = tmp0.m();
4281
+ while (_iterator__ex2g4s.p()) {
4282
+ var element = _iterator__ex2g4s.q();
4283
+ if (this.x1h().match(element, clause)) {
4284
+ destination.j(element);
4285
+ }
4286
+ }
4287
+ var retractability = destination;
4288
+ var tmp;
4289
+ if (none_0(retractability)) {
4290
+ tmp = new Failure_0(this);
4291
+ } else {
4292
+ // Inline function 'kotlin.collections.partition' call
4293
+ var this_0 = toList_0(this.h1i());
4294
+ var first = ArrayList_init_$Create$_0();
4295
+ var second = ArrayList_init_$Create$_0();
4296
+ var _iterator__ex2g4s_0 = this_0.m();
4297
+ while (_iterator__ex2g4s_0.p()) {
4298
+ var element_0 = _iterator__ex2g4s_0.q();
4299
+ if (this.x1h().match(element_0, clause)) {
4300
+ first.j(element_0);
4301
+ } else {
4302
+ second.j(element_0);
4303
+ }
4304
+ }
4305
+ var partitionedClauses = new Pair(first, second);
4306
+ var newTheory = partitionedClauses.second;
4307
+ var toBeActuallyRetracted = partitionedClauses.first;
4308
+ tmp = new Success_0(new ListedTheory(this.x1h(), newTheory, this.vq()), toBeActuallyRetracted);
4309
+ }
4310
+ return tmp;
4311
+ };
4312
+ protoOf(ListedTheory).retractAll = function (clause) {
4313
+ return this.p1i(clause);
4314
+ };
4315
+ protoOf(ListedTheory).hashCode = function () {
4316
+ return _get_hashCodeCache__ny3r0q_1(this);
4317
+ };
4318
+ protoOf(ListedTheory).s = function () {
4319
+ return _get_sizeCache__6eswog_0(this);
4320
+ };
4321
+ protoOf(ListedTheory).jz = function (tags) {
4322
+ return tags === this.vq() ? this : new ListedTheory(this.x1h(), this.h1i(), tags);
4323
+ };
4324
+ protoOf(ListedTheory).resetTags = function (tags) {
4325
+ return this.jz(tags);
4326
+ };
4327
+ protoOf(ListedTheory).a1p = function (theory) {
4328
+ return this.c1i() ? theory.toImmutableTheory() : theory.c1i() ? this : protoOf(AbstractListedTheory).a1p.call(this, theory);
4329
+ };
4330
+ protoOf(ListedTheory).plusTheory = function (theory) {
4331
+ return this.a1p(theory);
4332
+ };
4333
+ function MutableIndexedTheory_init_$Init$(unificator, clauses, tags, $this) {
4334
+ tags = tags === VOID ? emptyMap() : tags;
4335
+ MutableIndexedTheory.call($this, Companion_instance_5.ofIterable(unificator, clauses), tags);
4336
+ TheoryUtils_instance.e1j(clauses);
4337
+ return $this;
4338
+ }
4339
+ function MutableIndexedTheory_init_$Create$(unificator, clauses, tags) {
4340
+ return MutableIndexedTheory_init_$Init$(unificator, clauses, tags, objectCreate(protoOf(MutableIndexedTheory)));
4341
+ }
4342
+ function MutableIndexedTheory_init_$Init$_0(unificator, clauses, tags, $this) {
4343
+ tags = tags === VOID ? emptyMap() : tags;
4344
+ MutableIndexedTheory_init_$Init$(unificator, asIterable(clauses), tags, $this);
4345
+ return $this;
4346
+ }
4347
+ function MutableIndexedTheory_init_$Create$_0(unificator, clauses, tags) {
4348
+ return MutableIndexedTheory_init_$Init$_0(unificator, clauses, tags, objectCreate(protoOf(MutableIndexedTheory)));
4349
+ }
4350
+ function toRetractResult($this, $receiver) {
4351
+ return $receiver.lz() ? new Success_0($this, ensureNotNull($receiver.h1i())) : new Failure_0($this);
4352
+ }
4353
+ function MutableIndexedTheory$retract$lambda(this$0) {
4354
+ return function (it) {
4355
+ return this$0.c1r_1.m1i(it);
4356
+ };
4357
+ }
4358
+ function MutableIndexedTheory$retract$lambda_0(it) {
4359
+ return it.lz();
4360
+ }
4361
+ function MutableIndexedTheory$retract$lambda_1(it) {
4362
+ return asSequence(ensureNotNull(it.h1i()));
4363
+ }
4364
+ function MutableIndexedTheory(queue, tags) {
4365
+ AbstractIndexedTheory.call(this, queue, tags);
4366
+ this.c1r_1 = queue;
4367
+ }
4368
+ protoOf(MutableIndexedTheory).m1q = function () {
4369
+ return this.c1r_1;
4370
+ };
4371
+ protoOf(MutableIndexedTheory).y1o = function (unificator) {
4372
+ return protoOf(AbstractIndexedTheory).y1o.call(this, unificator).toMutableTheory();
4373
+ };
4374
+ protoOf(MutableIndexedTheory).setUnificator = function (unificator) {
4375
+ return this.y1o(unificator);
4376
+ };
4377
+ protoOf(MutableIndexedTheory).a1q = function () {
4378
+ return toMutableTheory.call(this);
4379
+ };
4380
+ protoOf(MutableIndexedTheory).toMutableTheory = function () {
4381
+ return this.a1q();
4382
+ };
4383
+ protoOf(MutableIndexedTheory).h1i = function () {
4384
+ return toList_0(this.c1r_1);
4385
+ };
4386
+ protoOf(MutableIndexedTheory).m = function () {
4387
+ return this.c1r_1.m();
4388
+ };
4389
+ protoOf(MutableIndexedTheory).j1p = function (clauses, tags, unificator) {
4390
+ return MutableIndexedTheory_init_$Create$_0(unificator, clauses, tags);
4391
+ };
4392
+ protoOf(MutableIndexedTheory).d1q = function (clause) {
4393
+ return toRetractResult(this, this.c1r_1.m1i(clause));
4394
+ };
4395
+ protoOf(MutableIndexedTheory).retract = function (clause) {
4396
+ return this.d1q(clause);
4397
+ };
4398
+ protoOf(MutableIndexedTheory).l1p = function (clauses) {
4399
+ var tmp = asSequence(clauses);
4400
+ var tmp_0 = map(tmp, MutableIndexedTheory$retract$lambda(this));
4401
+ var tmp_1 = filter(tmp_0, MutableIndexedTheory$retract$lambda_0);
4402
+ var retracted = toList(flatMap(tmp_1, MutableIndexedTheory$retract$lambda_1));
4403
+ var tmp_2;
4404
+ if (retracted.g()) {
4405
+ tmp_2 = new Failure_0(this);
4406
+ } else {
4407
+ tmp_2 = new Success_0(this, retracted);
4408
+ }
4409
+ return tmp_2;
4410
+ };
4411
+ protoOf(MutableIndexedTheory).retractIterable = function (clauses) {
4412
+ return this.l1p(clauses);
4413
+ };
4414
+ protoOf(MutableIndexedTheory).p1i = function (clause) {
4415
+ return toRetractResult(this, this.c1r_1.o1i(clause));
4416
+ };
4417
+ protoOf(MutableIndexedTheory).retractAll = function (clause) {
4418
+ return this.p1i(clause);
4419
+ };
4420
+ protoOf(MutableIndexedTheory).o1o = function (clause) {
4421
+ return this.g1p(TheoryUtils_instance.t1i(clause));
4422
+ };
4423
+ protoOf(MutableIndexedTheory).plus = function (clause) {
4424
+ return this.o1o(clause);
4425
+ };
4426
+ protoOf(MutableIndexedTheory).a1p = function (theory) {
4427
+ var tmp;
4428
+ if (theory === this) {
4429
+ tmp = this.h1p(toList_0(theory));
4430
+ } else {
4431
+ tmp = this.h1p(theory);
4432
+ }
4433
+ return tmp;
4434
+ };
4435
+ protoOf(MutableIndexedTheory).plusTheory = function (theory) {
4436
+ return this.a1p(theory);
4437
+ };
4438
+ protoOf(MutableIndexedTheory).c1p = function (clause) {
4439
+ // Inline function 'kotlin.also' call
4440
+ this.c1r_1.u1i(TheoryUtils_instance.t1i(clause));
4441
+ return this;
4442
+ };
4443
+ protoOf(MutableIndexedTheory).assertA = function (clause) {
4444
+ return this.c1p(clause);
4445
+ };
4446
+ protoOf(MutableIndexedTheory).e1p = function (clauses) {
4447
+ // Inline function 'kotlin.also' call
4448
+ var _iterator__ex2g4s = asReversed(toList_0(TheoryUtils_instance.e1j(clauses))).m();
4449
+ while (_iterator__ex2g4s.p()) {
4450
+ var clause = _iterator__ex2g4s.q();
4451
+ this.c1r_1.u1i(clause);
4452
+ }
4453
+ return this;
4454
+ };
4455
+ protoOf(MutableIndexedTheory).assertAIterable = function (clauses) {
4456
+ return this.e1p(clauses);
4457
+ };
4458
+ protoOf(MutableIndexedTheory).f1p = function (clauses) {
4459
+ return this.e1p(asIterable(clauses));
4460
+ };
4461
+ protoOf(MutableIndexedTheory).assertASequence = function (clauses) {
4462
+ return this.f1p(clauses);
4463
+ };
4464
+ protoOf(MutableIndexedTheory).g1p = function (clause) {
4465
+ // Inline function 'kotlin.also' call
4466
+ this.c1r_1.v1i(TheoryUtils_instance.t1i(clause));
4467
+ return this;
4468
+ };
4469
+ protoOf(MutableIndexedTheory).assertZ = function (clause) {
4470
+ return this.g1p(clause);
4471
+ };
4472
+ protoOf(MutableIndexedTheory).h1p = function (clauses) {
4473
+ // Inline function 'kotlin.also' call
4474
+ this.c1r_1.l1i(TheoryUtils_instance.e1j(clauses));
4475
+ return this;
4476
+ };
4477
+ protoOf(MutableIndexedTheory).assertZIterable = function (clauses) {
4478
+ return this.h1p(clauses);
4479
+ };
4480
+ protoOf(MutableIndexedTheory).i1p = function (clauses) {
4481
+ return this.h1p(TheoryUtils_instance.e1j(asIterable(clauses)));
4482
+ };
4483
+ protoOf(MutableIndexedTheory).assertZSequence = function (clauses) {
4484
+ return this.i1p(clauses);
4485
+ };
4486
+ protoOf(MutableIndexedTheory).k1p = function (clauses) {
4487
+ return this.l1p(asIterable(clauses));
4488
+ };
4489
+ protoOf(MutableIndexedTheory).retractSequence = function (clauses) {
4490
+ return this.k1p(clauses);
4491
+ };
4492
+ protoOf(MutableIndexedTheory).t1o = function (indicator) {
4493
+ return protoOf(AbstractIndexedTheory).t1o.call(this, indicator).toMutableTheory();
4494
+ };
4495
+ protoOf(MutableIndexedTheory).abolish = function (indicator) {
4496
+ return this.t1o(indicator);
4497
+ };
4498
+ protoOf(MutableIndexedTheory).n1o = function () {
4499
+ return Companion_instance_10.indexedOfIterable(this.x1h(), this);
4500
+ };
4501
+ protoOf(MutableIndexedTheory).toImmutableTheory = function () {
4502
+ return this.n1o();
4503
+ };
4504
+ protoOf(MutableIndexedTheory).jz = function (tags) {
4505
+ return tags === this.vq() ? this : new MutableIndexedTheory(this.c1r_1, tags);
4506
+ };
4507
+ protoOf(MutableIndexedTheory).resetTags = function (tags) {
4508
+ return this.jz(tags);
4509
+ };
4510
+ protoOf(MutableIndexedTheory).m1p = function () {
4511
+ return this.z1o(asSequence(this.h1i()));
4512
+ };
4513
+ protoOf(MutableIndexedTheory).clone = function () {
4514
+ return this.m1p();
4515
+ };
4516
+ protoOf(MutableIndexedTheory).assertAFact = function (struct) {
4517
+ return this.b1q(struct);
4518
+ };
4519
+ protoOf(MutableIndexedTheory).assertZFact = function (struct) {
4520
+ return this.c1q(struct);
4521
+ };
4522
+ protoOf(MutableIndexedTheory).retractByHead = function (head) {
4523
+ return this.e1q(head);
4524
+ };
4525
+ protoOf(MutableIndexedTheory).retractAllByHead = function (head) {
4526
+ return this.f1q(head);
4527
+ };
4528
+ function MutableListedTheory_init_$Init$(unificator, clauses, tags, $this) {
4529
+ tags = tags === VOID ? emptyMap() : tags;
4530
+ MutableListedTheory.call($this, unificator, toMutableList(clauses), tags);
4531
+ TheoryUtils_instance.e1j(clauses);
4532
+ return $this;
4533
+ }
4534
+ function MutableListedTheory_init_$Create$(unificator, clauses, tags) {
4535
+ return MutableListedTheory_init_$Init$(unificator, clauses, tags, objectCreate(protoOf(MutableListedTheory)));
4536
+ }
4537
+ function MutableListedTheory_init_$Init$_0(unificator, clauses, tags, $this) {
4538
+ tags = tags === VOID ? emptyMap() : tags;
4539
+ MutableListedTheory.call($this, unificator, toMutableList_0(clauses), tags);
4540
+ TheoryUtils_instance.b1p(clauses);
4541
+ return $this;
4542
+ }
4543
+ function MutableListedTheory_init_$Create$_0(unificator, clauses, tags) {
4544
+ return MutableListedTheory_init_$Init$_0(unificator, clauses, tags, objectCreate(protoOf(MutableListedTheory)));
4545
+ }
4546
+ function MutableListedTheory(unificator, clauses, tags) {
4547
+ AbstractListedTheory.call(this, unificator, clauses, tags);
4548
+ this.g1r_1 = clauses;
4549
+ }
4550
+ protoOf(MutableListedTheory).h1i = function () {
4551
+ return this.g1r_1;
4552
+ };
4553
+ protoOf(MutableListedTheory).y1o = function (unificator) {
4554
+ this.q1q(unificator);
4555
+ return this;
4556
+ };
4557
+ protoOf(MutableListedTheory).setUnificator = function (unificator) {
4558
+ return this.y1o(unificator);
4559
+ };
4560
+ protoOf(MutableListedTheory).a1q = function () {
4561
+ return toMutableTheory.call(this);
4562
+ };
4563
+ protoOf(MutableListedTheory).toMutableTheory = function () {
4564
+ return this.a1q();
4565
+ };
4566
+ protoOf(MutableListedTheory).j1p = function (clauses, tags, unificator) {
4567
+ return MutableListedTheory_init_$Create$_0(unificator, clauses, tags);
4568
+ };
4569
+ protoOf(MutableListedTheory).d1q = function (clause) {
4570
+ var i = this.g1r_1.g4();
4571
+ while (i.p()) {
4572
+ var c = i.q();
4573
+ if (this.x1h().match(c, clause)) {
4574
+ i.g3();
4575
+ return new Success_0(this, listOf_0(c));
4576
+ }
4577
+ }
4578
+ return new Failure_0(this);
4579
+ };
4580
+ protoOf(MutableListedTheory).retract = function (clause) {
4581
+ return this.d1q(clause);
4582
+ };
4583
+ protoOf(MutableListedTheory).l1p = function (clauses) {
4584
+ var i = this.g1r_1.g4();
4585
+ // Inline function 'kotlin.collections.mutableListOf' call
4586
+ var retracted = ArrayList_init_$Create$_0();
4587
+ while (i.p()) {
4588
+ var c = i.q();
4589
+ var _iterator__ex2g4s = clauses.m();
4590
+ while (_iterator__ex2g4s.p()) {
4591
+ var clause = _iterator__ex2g4s.q();
4592
+ if (this.x1h().match(c, clause)) {
4593
+ retracted.j(c);
4594
+ i.g3();
4595
+ }
4596
+ }
4597
+ }
4598
+ var tmp;
4599
+ if (retracted.g()) {
4600
+ tmp = new Failure_0(this);
4601
+ } else {
4602
+ tmp = new Success_0(this, retracted);
4603
+ }
4604
+ return tmp;
4605
+ };
4606
+ protoOf(MutableListedTheory).retractIterable = function (clauses) {
4607
+ return this.l1p(clauses);
4608
+ };
4609
+ protoOf(MutableListedTheory).p1i = function (clause) {
4610
+ var i = this.g1r_1.g4();
4611
+ // Inline function 'kotlin.collections.mutableListOf' call
4612
+ var retracted = ArrayList_init_$Create$_0();
4613
+ while (i.p()) {
4614
+ var c = i.q();
4615
+ if (this.x1h().match(c, clause)) {
4616
+ retracted.j(c);
4617
+ i.g3();
4618
+ }
4619
+ }
4620
+ var tmp;
4621
+ if (retracted.g()) {
4622
+ tmp = new Failure_0(this);
4623
+ } else {
4624
+ tmp = new Success_0(this, retracted);
4625
+ }
4626
+ return tmp;
4627
+ };
4628
+ protoOf(MutableListedTheory).retractAll = function (clause) {
4629
+ return this.p1i(clause);
4630
+ };
4631
+ protoOf(MutableListedTheory).o1o = function (clause) {
4632
+ return this.g1p(clause);
4633
+ };
4634
+ protoOf(MutableListedTheory).plus = function (clause) {
4635
+ return this.o1o(clause);
4636
+ };
4637
+ protoOf(MutableListedTheory).a1p = function (theory) {
4638
+ var tmp;
4639
+ if (theory === this) {
4640
+ tmp = this.h1p(toList_0(theory));
4641
+ } else {
4642
+ tmp = this.h1p(theory);
4643
+ }
4644
+ return tmp;
4645
+ };
4646
+ protoOf(MutableListedTheory).plusTheory = function (theory) {
4647
+ return this.a1p(theory);
4648
+ };
4649
+ protoOf(MutableListedTheory).c1p = function (clause) {
4650
+ // Inline function 'kotlin.also' call
4651
+ addFirst(this.g1r_1, TheoryUtils_instance.t1i(clause));
4652
+ return this;
4653
+ };
4654
+ protoOf(MutableListedTheory).assertA = function (clause) {
4655
+ return this.c1p(clause);
4656
+ };
4657
+ protoOf(MutableListedTheory).e1p = function (clauses) {
4658
+ // Inline function 'kotlin.also' call
4659
+ addFirst_0(this.g1r_1, TheoryUtils_instance.e1j(clauses));
4660
+ return this;
4661
+ };
4662
+ protoOf(MutableListedTheory).assertAIterable = function (clauses) {
4663
+ return this.e1p(clauses);
4664
+ };
4665
+ protoOf(MutableListedTheory).f1p = function (clauses) {
4666
+ return this.e1p(asIterable(clauses));
4667
+ };
4668
+ protoOf(MutableListedTheory).assertASequence = function (clauses) {
4669
+ return this.f1p(clauses);
4670
+ };
4671
+ protoOf(MutableListedTheory).g1p = function (clause) {
4672
+ // Inline function 'kotlin.also' call
4673
+ this.g1r_1.j(TheoryUtils_instance.t1i(clause));
4674
+ return this;
4675
+ };
4676
+ protoOf(MutableListedTheory).assertZ = function (clause) {
4677
+ return this.g1p(clause);
4678
+ };
4679
+ protoOf(MutableListedTheory).h1p = function (clauses) {
4680
+ // Inline function 'kotlin.also' call
4681
+ addAll(this.g1r_1, TheoryUtils_instance.e1j(clauses));
4682
+ return this;
4683
+ };
4684
+ protoOf(MutableListedTheory).assertZIterable = function (clauses) {
4685
+ return this.h1p(clauses);
4686
+ };
4687
+ protoOf(MutableListedTheory).i1p = function (clauses) {
4688
+ return this.h1p(asIterable(clauses));
4689
+ };
4690
+ protoOf(MutableListedTheory).assertZSequence = function (clauses) {
4691
+ return this.i1p(clauses);
4692
+ };
4693
+ protoOf(MutableListedTheory).k1p = function (clauses) {
4694
+ return this.l1p(asIterable(clauses));
4695
+ };
4696
+ protoOf(MutableListedTheory).retractSequence = function (clauses) {
4697
+ return this.k1p(clauses);
4698
+ };
4699
+ protoOf(MutableListedTheory).t1o = function (indicator) {
4700
+ return protoOf(AbstractListedTheory).t1o.call(this, indicator).toMutableTheory();
4701
+ };
4702
+ protoOf(MutableListedTheory).abolish = function (indicator) {
4703
+ return this.t1o(indicator);
4704
+ };
4705
+ protoOf(MutableListedTheory).n1o = function () {
4706
+ return Companion_instance_10.listedOfIterable(this.x1h(), this);
4707
+ };
4708
+ protoOf(MutableListedTheory).toImmutableTheory = function () {
4709
+ return this.n1o();
4710
+ };
4711
+ protoOf(MutableListedTheory).jz = function (tags) {
4712
+ return tags === this.vq() ? this : new MutableListedTheory(this.x1h(), this.g1r_1, tags);
4713
+ };
4714
+ protoOf(MutableListedTheory).resetTags = function (tags) {
4715
+ return this.jz(tags);
4716
+ };
4717
+ protoOf(MutableListedTheory).m1p = function () {
4718
+ return this.z1o(asSequence(this.g1r_1));
4719
+ };
4720
+ protoOf(MutableListedTheory).clone = function () {
4721
+ return this.m1p();
4722
+ };
4723
+ protoOf(MutableListedTheory).assertAFact = function (struct) {
4724
+ return this.b1q(struct);
4725
+ };
4726
+ protoOf(MutableListedTheory).assertZFact = function (struct) {
4727
+ return this.c1q(struct);
4728
+ };
4729
+ protoOf(MutableListedTheory).retractByHead = function (head) {
4730
+ return this.e1q(head);
4731
+ };
4732
+ protoOf(MutableListedTheory).retractAllByHead = function (head) {
4733
+ return this.f1q(head);
4734
+ };
4735
+ function takeFirstAfterSkipping(_this__u8e3s4, n) {
4736
+ var iter = _this__u8e3s4.m();
4737
+ // Inline function 'kotlin.repeat' call
4738
+ var inductionVariable = 0;
4739
+ if (inductionVariable < n)
4740
+ do {
4741
+ var index = inductionVariable;
4742
+ inductionVariable = inductionVariable + 1 | 0;
4743
+ iter.q();
4744
+ }
4745
+ while (inductionVariable < n);
4746
+ return iter.q();
4747
+ }
4748
+ //region block: post-declaration
4749
+ defineProp(protoOf(RetrieveResult), 'collection', function () {
4750
+ return this.z1i();
4751
+ });
4752
+ defineProp(protoOf(RetrieveResult), 'clauses', function () {
4753
+ return this.h1i();
4754
+ });
4755
+ defineProp(protoOf(RetrieveResult), 'firstClause', function () {
4756
+ return this.a1j();
4757
+ });
4758
+ protoOf(MutableReteClauseQueue).f1i = get;
4759
+ protoOf(ReteClauseQueue).f1i = get;
4760
+ protoOf(IndexedClause$Companion$wrap$1).b1k = get_innerClause;
4761
+ protoOf(IndexedClause$Companion$wrap$1).k1l = plus_1;
4762
+ protoOf(IndexedClause$Companion$wrap$1).rq = compareTo;
4763
+ protoOf(IndexedClause$Companion$wrap$1).ac = component1;
4764
+ protoOf(IndexedClause$Companion$wrap$1).bc = component2;
4765
+ protoOf(SituatedIndexedClause$Companion$of$1).b1k = get_innerClause;
4766
+ protoOf(SituatedIndexedClause$Companion$of$1).k1l = plus_1;
4767
+ protoOf(SituatedIndexedClause$Companion$of$1).rq = compareTo;
4768
+ protoOf(SituatedIndexedClause$Companion$of$1).ac = component1;
4769
+ protoOf(SituatedIndexedClause$Companion$of$1).bc = component2;
4770
+ protoOf(AbstractTheory).n1p = get_isMutable;
4771
+ protoOf(AbstractTheory).b1i = get_rules;
4772
+ protoOf(AbstractTheory).a1i = get_directives;
4773
+ protoOf(AbstractTheory).assertAFact = assertAFact;
4774
+ protoOf(AbstractTheory).assertZFact = assertZFact;
4775
+ protoOf(AbstractTheory).retractByHead = retractByHead;
4776
+ protoOf(AbstractTheory).retractAllByHead = retractAllByHead;
4777
+ protoOf(AbstractTheory).getTag = getTag;
4778
+ protoOf(AbstractTheory).containsTag = containsTag;
4779
+ protoOf(IndexedTheoryFactory).emptyTheory = emptyTheory;
4780
+ protoOf(IndexedTheoryFactory).theoryOfIterable = theoryOfIterable;
4781
+ protoOf(IndexedTheoryFactory).theoryOf = theoryOf;
4782
+ protoOf(IndexedTheoryFactory).theoryOfSequence = theoryOfSequence;
4783
+ protoOf(IndexedTheoryFactory).emptyMutableTheory = emptyMutableTheory;
4784
+ protoOf(IndexedTheoryFactory).mutableTheoryOfIterable = mutableTheoryOfIterable;
4785
+ protoOf(IndexedTheoryFactory).mutableTheoryOf = mutableTheoryOf;
4786
+ protoOf(IndexedTheoryFactory).mutableTheoryOfSequence = mutableTheoryOfSequence;
4787
+ protoOf(ListedTheoryFactory).emptyTheory = emptyTheory;
4788
+ protoOf(ListedTheoryFactory).theoryOfIterable = theoryOfIterable;
4789
+ protoOf(ListedTheoryFactory).theoryOf = theoryOf;
4790
+ protoOf(ListedTheoryFactory).theoryOfSequence = theoryOfSequence;
4791
+ protoOf(ListedTheoryFactory).emptyMutableTheory = emptyMutableTheory;
4792
+ protoOf(ListedTheoryFactory).mutableTheoryOfIterable = mutableTheoryOfIterable;
4793
+ protoOf(ListedTheoryFactory).mutableTheoryOf = mutableTheoryOf;
4794
+ protoOf(ListedTheoryFactory).mutableTheoryOfSequence = mutableTheoryOfSequence;
4795
+ defineProp(protoOf(RetractResult), 'theory', function () {
4796
+ return this.u1o();
4797
+ });
4798
+ defineProp(protoOf(RetractResult), 'clauses', function () {
4799
+ return this.h1i();
4800
+ });
4801
+ defineProp(protoOf(RetractResult), 'firstClause', function () {
4802
+ return this.a1j();
4803
+ });
4804
+ protoOf(MutableIndexedTheory).b1q = assertAFact_0;
4805
+ protoOf(MutableIndexedTheory).c1q = assertZFact_0;
4806
+ protoOf(MutableIndexedTheory).e1q = retractByHead_0;
4807
+ protoOf(MutableIndexedTheory).n1p = get_isMutable_0;
4808
+ protoOf(MutableIndexedTheory).f1q = retractAllByHead_0;
4809
+ protoOf(MutableListedTheory).b1q = assertAFact_0;
4810
+ protoOf(MutableListedTheory).c1q = assertZFact_0;
4811
+ protoOf(MutableListedTheory).e1q = retractByHead_0;
4812
+ protoOf(MutableListedTheory).n1p = get_isMutable_0;
4813
+ protoOf(MutableListedTheory).f1q = retractAllByHead_0;
4814
+ //endregion
4815
+ //region block: init
4816
+ Companion_instance_4 = new Companion();
4817
+ Companion_instance_5 = new Companion_0();
4818
+ Companion_instance_6 = new Companion_1();
4819
+ Utils_instance = new Utils();
4820
+ Companion_instance_7 = new Companion_2();
4821
+ Companion_instance_8 = new Companion_3();
4822
+ Companion_instance_9 = new Companion_4();
4823
+ Companion_instance_10 = new Companion_5();
4824
+ TheoryUtils_instance = new TheoryUtils();
4825
+ //endregion
4826
+ //region block: exports
4827
+ _.$_$ = _.$_$ || {};
4828
+ _.$_$.a = Companion_instance_9;
4829
+ _.$_$.b = Companion_instance_10;
4830
+ _.$_$.c = MutableTheory;
4831
+ _.$_$.d = Success_0;
4832
+ _.$_$.e = Theory;
4833
+ //endregion
4834
+ return _;
4835
+ }));
4836
+
4837
+ //# sourceMappingURL=2p-theory.js.map