@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
@@ -0,0 +1,2832 @@
1
+ (function (factory) {
2
+ if (typeof define === 'function' && define.amd)
3
+ define(['exports', './2p-unify.js', './kotlin-kotlin-stdlib.js', './2p-solve.js', './2p-theory.js', './2p-utils.js', './2p-core.js'], factory);
4
+ else if (typeof exports === 'object')
5
+ factory(module.exports, require('./2p-unify.js'), require('./kotlin-kotlin-stdlib.js'), require('./2p-solve.js'), require('./2p-theory.js'), require('./2p-utils.js'), require('./2p-core.js'));
6
+ else {
7
+ if (typeof globalThis['2p-unify'] === 'undefined') {
8
+ throw new Error("Error loading module '2p-solve-classic'. Its dependency '2p-unify' was not found. Please, check whether '2p-unify' is loaded prior to '2p-solve-classic'.");
9
+ }
10
+ if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
11
+ throw new Error("Error loading module '2p-solve-classic'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to '2p-solve-classic'.");
12
+ }
13
+ if (typeof globalThis['2p-solve'] === 'undefined') {
14
+ throw new Error("Error loading module '2p-solve-classic'. Its dependency '2p-solve' was not found. Please, check whether '2p-solve' is loaded prior to '2p-solve-classic'.");
15
+ }
16
+ if (typeof globalThis['2p-theory'] === 'undefined') {
17
+ throw new Error("Error loading module '2p-solve-classic'. Its dependency '2p-theory' was not found. Please, check whether '2p-theory' is loaded prior to '2p-solve-classic'.");
18
+ }
19
+ if (typeof globalThis['2p-utils'] === 'undefined') {
20
+ throw new Error("Error loading module '2p-solve-classic'. Its dependency '2p-utils' was not found. Please, check whether '2p-utils' is loaded prior to '2p-solve-classic'.");
21
+ }
22
+ if (typeof globalThis['2p-core'] === 'undefined') {
23
+ throw new Error("Error loading module '2p-solve-classic'. Its dependency '2p-core' was not found. Please, check whether '2p-core' is loaded prior to '2p-solve-classic'.");
24
+ }
25
+ globalThis['2p-solve-classic'] = factory(typeof globalThis['2p-solve-classic'] === 'undefined' ? {} : globalThis['2p-solve-classic'], globalThis['2p-unify'], globalThis['kotlin-kotlin-stdlib'], globalThis['2p-solve'], globalThis['2p-theory'], globalThis['2p-utils'], globalThis['2p-core']);
26
+ }
27
+ }(function (_, kotlin_it_unibo_tuprolog_unify, kotlin_kotlin, kotlin_it_unibo_tuprolog_solve, kotlin_it_unibo_tuprolog_theory, kotlin_it_unibo_tuprolog_utils, kotlin_it_unibo_tuprolog_core) {
28
+ 'use strict';
29
+ //region block: imports
30
+ var imul = Math.imul;
31
+ var Companion_getInstance = kotlin_it_unibo_tuprolog_unify.$_$.a;
32
+ var VOID = kotlin_kotlin.$_$.b;
33
+ var Companion_instance = kotlin_it_unibo_tuprolog_solve.$_$.p;
34
+ var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_solve.$_$.l;
35
+ var Companion_instance_0 = kotlin_it_unibo_tuprolog_theory.$_$.b;
36
+ var Companion_instance_1 = kotlin_it_unibo_tuprolog_theory.$_$.a;
37
+ var Companion_instance_2 = kotlin_it_unibo_tuprolog_solve.$_$.a;
38
+ var Companion_instance_3 = kotlin_it_unibo_tuprolog_solve.$_$.c;
39
+ var Companion_instance_4 = kotlin_it_unibo_tuprolog_solve.$_$.b;
40
+ var Companion_instance_5 = kotlin_it_unibo_tuprolog_solve.$_$.d;
41
+ var equalsLong = kotlin_kotlin.$_$.w4;
42
+ var toString = kotlin_kotlin.$_$.q6;
43
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.b1;
44
+ var Unit_instance = kotlin_kotlin.$_$.m;
45
+ var constructCallableReference = kotlin_kotlin.$_$.r5;
46
+ var AbstractSolver = kotlin_it_unibo_tuprolog_solve.$_$.l1;
47
+ var protoOf = kotlin_kotlin.$_$.n6;
48
+ var THROW_CCE = kotlin_kotlin.$_$.ha;
49
+ var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.k4;
50
+ var getAllOperators = kotlin_it_unibo_tuprolog_solve.$_$.z2;
51
+ var toOperatorSet = kotlin_it_unibo_tuprolog_solve.$_$.b3;
52
+ var Long = kotlin_kotlin.$_$.ba;
53
+ var currentTimeInstant = kotlin_it_unibo_tuprolog_solve.$_$.x2;
54
+ var asSequence = kotlin_kotlin.$_$.k7;
55
+ var initMetadataForClass = kotlin_kotlin.$_$.y5;
56
+ var ensureNotNull = kotlin_kotlin.$_$.la;
57
+ var fromInt = kotlin_kotlin.$_$.x4;
58
+ var add = kotlin_kotlin.$_$.n4;
59
+ var hashCode = kotlin_kotlin.$_$.x5;
60
+ var equals = kotlin_kotlin.$_$.t5;
61
+ var CoroutineImpl = kotlin_kotlin.$_$.j4;
62
+ var SequenceScope = kotlin_kotlin.$_$.g7;
63
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.i4;
64
+ var initMetadataForLambda = kotlin_kotlin.$_$.b6;
65
+ var sequence = kotlin_kotlin.$_$.k8;
66
+ var toString_0 = kotlin_kotlin.$_$.ra;
67
+ var asSequence_0 = kotlin_kotlin.$_$.z1;
68
+ var emptySequence = kotlin_kotlin.$_$.p7;
69
+ var plus = kotlin_kotlin.$_$.h8;
70
+ var KProperty1 = kotlin_kotlin.$_$.f7;
71
+ var getPropertyCallableRef = kotlin_kotlin.$_$.v5;
72
+ var flatMap = kotlin_kotlin.$_$.v7;
73
+ var distinct = kotlin_kotlin.$_$.n7;
74
+ var cached = kotlin_it_unibo_tuprolog_utils.$_$.r;
75
+ var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_core.$_$.n;
76
+ var filter = kotlin_kotlin.$_$.s7;
77
+ var map = kotlin_kotlin.$_$.d8;
78
+ var toList = kotlin_kotlin.$_$.q8;
79
+ var Companion_instance_6 = kotlin_it_unibo_tuprolog_solve.$_$.e;
80
+ var Companion_getInstance_2 = kotlin_it_unibo_tuprolog_core.$_$.o;
81
+ var Companion_getInstance_3 = kotlin_it_unibo_tuprolog_core.$_$.q;
82
+ var Companion_instance_7 = kotlin_it_unibo_tuprolog_utils.$_$.c;
83
+ var emptySet = kotlin_kotlin.$_$.k2;
84
+ var compare = kotlin_kotlin.$_$.r4;
85
+ var lazy = kotlin_kotlin.$_$.na;
86
+ var contains = kotlin_kotlin.$_$.l7;
87
+ var createSolver = kotlin_it_unibo_tuprolog_solve.$_$.x;
88
+ var createMutableSolver = kotlin_it_unibo_tuprolog_solve.$_$.w;
89
+ var update = kotlin_it_unibo_tuprolog_solve.$_$.y;
90
+ var apply = kotlin_it_unibo_tuprolog_solve.$_$.v1;
91
+ var applyIterable = kotlin_it_unibo_tuprolog_solve.$_$.u1;
92
+ var applySequence = kotlin_it_unibo_tuprolog_solve.$_$.w1;
93
+ var get_standardInput = kotlin_it_unibo_tuprolog_solve.$_$.y1;
94
+ var get_standardOutput = kotlin_it_unibo_tuprolog_solve.$_$.z1;
95
+ var get_standardError = kotlin_it_unibo_tuprolog_solve.$_$.x1;
96
+ var get_warnings = kotlin_it_unibo_tuprolog_solve.$_$.a2;
97
+ var get_endTime = kotlin_it_unibo_tuprolog_solve.$_$.s1;
98
+ var get_remainingTime = kotlin_it_unibo_tuprolog_solve.$_$.t1;
99
+ var get_elapsedTime = kotlin_it_unibo_tuprolog_solve.$_$.r1;
100
+ var ExecutionContext = kotlin_it_unibo_tuprolog_solve.$_$.b2;
101
+ var objectCreate = kotlin_kotlin.$_$.m6;
102
+ var rawSolverOf = kotlin_it_unibo_tuprolog_solve.$_$.d1;
103
+ var solverOf = kotlin_it_unibo_tuprolog_solve.$_$.c1;
104
+ var mutableSolverOf = kotlin_it_unibo_tuprolog_solve.$_$.z;
105
+ var rawMutableSolverOf = kotlin_it_unibo_tuprolog_solve.$_$.a1;
106
+ var newBuilder = kotlin_it_unibo_tuprolog_solve.$_$.u2;
107
+ var get_defaultRuntime = kotlin_it_unibo_tuprolog_solve.$_$.p2;
108
+ var get_defaultUnificator = kotlin_it_unibo_tuprolog_solve.$_$.r2;
109
+ var get_defaultFlags = kotlin_it_unibo_tuprolog_solve.$_$.m2;
110
+ var get_defaultStaticKb = kotlin_it_unibo_tuprolog_solve.$_$.q2;
111
+ var get_defaultDynamicKb = kotlin_it_unibo_tuprolog_solve.$_$.k2;
112
+ var get_defaultInputChannel = kotlin_it_unibo_tuprolog_solve.$_$.n2;
113
+ var get_defaultOutputChannel = kotlin_it_unibo_tuprolog_solve.$_$.o2;
114
+ var get_defaultErrorChannel = kotlin_it_unibo_tuprolog_solve.$_$.l2;
115
+ var get_defaultWarningsChannel = kotlin_it_unibo_tuprolog_solve.$_$.s2;
116
+ var solverWithDefaultBuiltins = kotlin_it_unibo_tuprolog_solve.$_$.v2;
117
+ var solverWithDefaultBuiltinsAnd = kotlin_it_unibo_tuprolog_solve.$_$.e1;
118
+ var mutableSolverWithDefaultBuiltins = kotlin_it_unibo_tuprolog_solve.$_$.t2;
119
+ var mutableSolverWithDefaultBuiltinsAnd = kotlin_it_unibo_tuprolog_solve.$_$.b1;
120
+ var SolverFactory = kotlin_it_unibo_tuprolog_solve.$_$.w2;
121
+ var initMetadataForObject = kotlin_kotlin.$_$.c6;
122
+ var defineProp = kotlin_kotlin.$_$.s5;
123
+ var listOf = kotlin_kotlin.$_$.x2;
124
+ var getAllOperators_0 = kotlin_it_unibo_tuprolog_solve.$_$.a3;
125
+ var to = kotlin_kotlin.$_$.sa;
126
+ var loadStaticClauses = kotlin_it_unibo_tuprolog_solve.$_$.f2;
127
+ var loadStaticClausesIterable = kotlin_it_unibo_tuprolog_solve.$_$.g2;
128
+ var loadStaticClausesSequence = kotlin_it_unibo_tuprolog_solve.$_$.h2;
129
+ var loadDynamicClauses = kotlin_it_unibo_tuprolog_solve.$_$.e2;
130
+ var loadDynamicClausesIterable = kotlin_it_unibo_tuprolog_solve.$_$.c2;
131
+ var loadDynamicClausesSequence = kotlin_it_unibo_tuprolog_solve.$_$.d2;
132
+ var MutableSolver = kotlin_it_unibo_tuprolog_solve.$_$.i2;
133
+ var initMetadataForCompanion = kotlin_kotlin.$_$.z5;
134
+ var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.h1;
135
+ var subtract = kotlin_kotlin.$_$.g5;
136
+ var TimeOutException_init_$Create$ = kotlin_it_unibo_tuprolog_solve.$_$.g1;
137
+ var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.i1;
138
+ var initMetadataForInterface = kotlin_kotlin.$_$.a6;
139
+ var getKClass = kotlin_kotlin.$_$.e7;
140
+ var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.z;
141
+ var Companion_instance_8 = kotlin_it_unibo_tuprolog_solve.$_$.u;
142
+ var MessageError = kotlin_it_unibo_tuprolog_solve.$_$.i1;
143
+ var Companion_instance_9 = kotlin_it_unibo_tuprolog_solve.$_$.i;
144
+ var plus_0 = kotlin_it_unibo_tuprolog_utils.$_$.h1;
145
+ var LogicError = kotlin_it_unibo_tuprolog_solve.$_$.j1;
146
+ var toSet = kotlin_kotlin.$_$.s8;
147
+ var plus_1 = kotlin_kotlin.$_$.n3;
148
+ var TrackVariables_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.n;
149
+ var drop = kotlin_kotlin.$_$.o7;
150
+ var first = kotlin_kotlin.$_$.u7;
151
+ var Unifier = kotlin_it_unibo_tuprolog_core.$_$.l1;
152
+ var isInterface = kotlin_kotlin.$_$.f6;
153
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.e1;
154
+ var ResolutionException = kotlin_it_unibo_tuprolog_solve.$_$.k1;
155
+ var Companion_instance_10 = kotlin_it_unibo_tuprolog_solve.$_$.j;
156
+ var extractSignature = kotlin_it_unibo_tuprolog_solve.$_$.y2;
157
+ var Signature = kotlin_it_unibo_tuprolog_solve.$_$.j2;
158
+ var Expected_CALLABLE_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.v;
159
+ var cursor = kotlin_it_unibo_tuprolog_utils.$_$.t;
160
+ var Companion_instance_11 = kotlin_it_unibo_tuprolog_solve.$_$.g;
161
+ var prepareForExecutionWithUnifier = kotlin_it_unibo_tuprolog_core.$_$.m2;
162
+ var setOf = kotlin_kotlin.$_$.t3;
163
+ var Unknown_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.o;
164
+ var MissingPredicate_init_$Create$ = kotlin_it_unibo_tuprolog_solve.$_$.f1;
165
+ var Companion_instance_12 = kotlin_it_unibo_tuprolog_solve.$_$.f;
166
+ var contains_0 = kotlin_kotlin.$_$.c2;
167
+ var firstOrNull = kotlin_kotlin.$_$.t7;
168
+ var any = kotlin_kotlin.$_$.i7;
169
+ var LastCallOptimization_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.m;
170
+ var buffered = kotlin_it_unibo_tuprolog_utils.$_$.q;
171
+ var sequenceOf = kotlin_kotlin.$_$.i8;
172
+ var MagicCut = kotlin_it_unibo_tuprolog_solve.$_$.q1;
173
+ var sequenceOf_0 = kotlin_kotlin.$_$.j8;
174
+ var Request = kotlin_it_unibo_tuprolog_solve.$_$.n1;
175
+ var get_ONE = kotlin_kotlin.$_$.m4;
176
+ var ExtensionLibrary = kotlin_it_unibo_tuprolog_solve.$_$.m1;
177
+ var CommonBuiltins_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.t;
178
+ var listOf_0 = kotlin_kotlin.$_$.y2;
179
+ var Struct = kotlin_it_unibo_tuprolog_core.$_$.k1;
180
+ var Companion_instance_13 = kotlin_it_unibo_tuprolog_solve.$_$.h;
181
+ var Companion_instance_14 = kotlin_it_unibo_tuprolog_solve.$_$.k;
182
+ var UnaryPredicate = kotlin_it_unibo_tuprolog_solve.$_$.o1;
183
+ var Companion_getInstance_4 = kotlin_it_unibo_tuprolog_solve.$_$.q;
184
+ var RuleWrapper = kotlin_it_unibo_tuprolog_solve.$_$.p1;
185
+ var RuleWrapper_init_$Init$ = kotlin_it_unibo_tuprolog_solve.$_$.h1;
186
+ var EnsureExecutable_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.s;
187
+ var MagicCut_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.r;
188
+ //endregion
189
+ //region block: pre-declaration
190
+ initMetadataForClass(AbstractClassicSolver, 'AbstractClassicSolver', VOID, AbstractSolver);
191
+ initMetadataForClass(ChoicePointContext, 'ChoicePointContext');
192
+ initMetadataForClass(Primitives, 'Primitives', VOID, ChoicePointContext);
193
+ initMetadataForClass(Rules, 'Rules', VOID, ChoicePointContext);
194
+ initMetadataForLambda(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn, CoroutineImpl, VOID, [1]);
195
+ initMetadataForLambda(ClassicExecutionContext$pathToRoot$slambda, CoroutineImpl, VOID, [1]);
196
+ initMetadataForClass(ClassicExecutionContext, 'ClassicExecutionContext', VOID, VOID, [ExecutionContext]);
197
+ initMetadataForClass(ClassicSolver, 'ClassicSolver', VOID, AbstractClassicSolver);
198
+ initMetadataForObject(ClassicSolverFactory, 'ClassicSolverFactory', VOID, VOID, [SolverFactory]);
199
+ initMetadataForClass(MutableClassicSolver, 'MutableClassicSolver', VOID, ClassicSolver, [MutableSolver]);
200
+ initMetadataForCompanion(Companion);
201
+ function get_isEndState() {
202
+ return false;
203
+ }
204
+ function asEndState() {
205
+ return null;
206
+ }
207
+ function castToEndState() {
208
+ var tmp0_elvis_lhs = this.asEndState();
209
+ var tmp;
210
+ if (tmp0_elvis_lhs == null) {
211
+ throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(EndState).g9());
212
+ } else {
213
+ tmp = tmp0_elvis_lhs;
214
+ }
215
+ return tmp;
216
+ }
217
+ function clone(context, $super) {
218
+ context = context === VOID ? this.m8() : context;
219
+ return $super === VOID ? this.g2z(context) : $super.g2z.call(this, context);
220
+ }
221
+ initMetadataForInterface(State, 'State');
222
+ initMetadataForClass(AbstractState, 'AbstractState', VOID, VOID, [State]);
223
+ function get_hasOpenAlternatives() {
224
+ return this.j2e().w1s() && this.m8().b2w();
225
+ }
226
+ function get_isEndState_0() {
227
+ return true;
228
+ }
229
+ function asEndState_0() {
230
+ return this;
231
+ }
232
+ function asEndState_1() {
233
+ return this.f2z();
234
+ }
235
+ initMetadataForInterface(EndState, 'EndState', VOID, VOID, [State]);
236
+ initMetadataForClass(AbstractEndState, 'AbstractEndState', VOID, AbstractState, [EndState]);
237
+ initMetadataForClass(StateBacktracking, 'StateBacktracking', VOID, AbstractState);
238
+ initMetadataForClass(StateEnd, 'StateEnd', VOID, AbstractEndState);
239
+ initMetadataForClass(StateException, 'StateException', VOID, AbstractState, [State]);
240
+ initMetadataForClass(StateGoalSelection, 'StateGoalSelection', VOID, AbstractState);
241
+ initMetadataForClass(StateHalt, 'StateHalt', VOID, AbstractEndState, [State]);
242
+ initMetadataForClass(StateInit, 'StateInit', VOID, AbstractState);
243
+ initMetadataForClass(StatePrimitiveExecution, 'StatePrimitiveExecution', VOID, AbstractState);
244
+ initMetadataForClass(StatePrimitiveSelection, 'StatePrimitiveSelection', VOID, AbstractState);
245
+ initMetadataForClass(StateRuleExecution, 'StateRuleExecution', VOID, AbstractState);
246
+ initMetadataForClass(CutLimit, 'CutLimit');
247
+ initMetadataForObject(None, 'None', VOID, CutLimit);
248
+ initMetadataForClass(Actual, 'Actual', VOID, CutLimit);
249
+ initMetadataForCompanion(Companion_0);
250
+ initMetadataForClass(StateRuleSelection, 'StateRuleSelection', VOID, AbstractState);
251
+ initMetadataForClass(AbstractSolutionIterator, 'AbstractSolutionIterator');
252
+ initMetadataForClass(SimpleSolutionIterator, 'SimpleSolutionIterator', VOID, AbstractSolutionIterator);
253
+ initMetadataForObject(DefaultBuiltins, 'DefaultBuiltins', VOID, ExtensionLibrary);
254
+ initMetadataForObject(Throw, 'Throw', VOID, UnaryPredicate);
255
+ initMetadataForObject(Call, 'Call', VOID, RuleWrapper);
256
+ initMetadataForObject(Catch, 'Catch', VOID, RuleWrapper);
257
+ initMetadataForObject(Comma, 'Comma', VOID, RuleWrapper);
258
+ initMetadataForObject(Cut, 'Cut', VOID, RuleWrapper);
259
+ initMetadataForClass(NegationAsFailure, 'NegationAsFailure', VOID, RuleWrapper);
260
+ initMetadataForObject(Fail, 'Fail', VOID, NegationAsFailure);
261
+ initMetadataForObject(Success, 'Success', VOID, NegationAsFailure);
262
+ initMetadataForCompanion(Companion_1);
263
+ //endregion
264
+ function AbstractClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this) {
265
+ unificator = unificator === VOID ? Companion_getInstance().q1h() : unificator;
266
+ libraries = libraries === VOID ? Companion_instance.empty() : libraries;
267
+ flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
268
+ staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
269
+ dynamicKb = dynamicKb === VOID ? Companion_instance_1.empty(unificator) : dynamicKb;
270
+ stdIn = stdIn === VOID ? Companion_instance_2.stdIn() : stdIn;
271
+ stdOut = stdOut === VOID ? Companion_instance_3.stdOut() : stdOut;
272
+ stdErr = stdErr === VOID ? Companion_instance_3.stdErr() : stdErr;
273
+ warnings = warnings === VOID ? Companion_instance_3.warning() : warnings;
274
+ trustKb = trustKb === VOID ? false : trustKb;
275
+ AbstractClassicSolver.call($this, unificator, libraries, flags, staticKb, dynamicKb, Companion_instance_4.t1u(stdIn), Companion_instance_5.w1u(stdOut, stdErr, warnings), trustKb);
276
+ return $this;
277
+ }
278
+ function updateCurrentContextAfterStateTransition($this, source, destination, index) {
279
+ // Inline function 'kotlin.require' call
280
+ // Inline function 'kotlin.require' call
281
+ if (!equalsLong(destination.m8().x2u_1, index)) {
282
+ var message = 'Failed requirement.';
283
+ throw IllegalArgumentException_init_$Create$(toString(message));
284
+ }
285
+ $this.e2v(destination.m8());
286
+ }
287
+ function AbstractClassicSolver$updateCurrentContextAfterStateTransition$ref(p0) {
288
+ return constructCallableReference(function (p0_0, p1, p2) {
289
+ var tmp0 = p0;
290
+ updateCurrentContextAfterStateTransition(tmp0, p0_0, p1, p2);
291
+ return Unit_instance;
292
+ }, 3, 0, 83, 'updateCurrentContextAfterStateTransition', [p0]);
293
+ }
294
+ function AbstractClassicSolver(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb) {
295
+ unificator = unificator === VOID ? Companion_getInstance().q1h() : unificator;
296
+ libraries = libraries === VOID ? Companion_instance.empty() : libraries;
297
+ flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
298
+ initialStaticKb = initialStaticKb === VOID ? Companion_instance_0.empty(unificator) : initialStaticKb;
299
+ initialDynamicKb = initialDynamicKb === VOID ? Companion_instance_1.empty(unificator) : initialDynamicKb;
300
+ inputChannels = inputChannels === VOID ? Companion_instance_4.fromStandard() : inputChannels;
301
+ outputChannels = outputChannels === VOID ? Companion_instance_5.fromStandard() : outputChannels;
302
+ trustKb = trustKb === VOID ? false : trustKb;
303
+ AbstractSolver.call(this, unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb);
304
+ }
305
+ protoOf(AbstractClassicSolver).e2v = function (_set____db54di) {
306
+ this.d2v_1 = _set____db54di;
307
+ };
308
+ protoOf(AbstractClassicSolver).m27 = function (_set____db54di) {
309
+ return this.e2v(_set____db54di instanceof ClassicExecutionContext ? _set____db54di : THROW_CCE());
310
+ };
311
+ protoOf(AbstractClassicSolver).k27 = function () {
312
+ var tmp = this.d2v_1;
313
+ if (!(tmp == null))
314
+ return tmp;
315
+ else {
316
+ throwUninitializedPropertyAccessException('currentContext');
317
+ }
318
+ };
319
+ protoOf(AbstractClassicSolver).l27 = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, trustKb) {
320
+ return new ClassicExecutionContext(VOID, unificator, libraries, flags, trustKb ? staticKb.toImmutableTheory() : Companion_instance_0.empty(unificator), trustKb ? dynamicKb.toMutableTheory() : Companion_instance_1.empty(unificator), toOperatorSet(getAllOperators(libraries, [])), inputChannels, outputChannels, VOID, VOID, VOID, VOID, VOID, VOID, new Long(0, 0));
321
+ };
322
+ protoOf(AbstractClassicSolver).s27 = function (goal, options) {
323
+ var tmp0_unificator = this.x1h();
324
+ var tmp1_libraries = this.u1r();
325
+ var tmp2_flags = this.v1r();
326
+ var tmp3_staticKb = this.w1r().toImmutableTheory();
327
+ var tmp4_dynamicKb = this.x1r().toMutableTheory();
328
+ var tmp5_operators = this.d1s();
329
+ var tmp6_inputChannels = this.y1r();
330
+ var tmp7_outputChannels = this.z1r();
331
+ var tmp8_customData = this.k27().m2u_1;
332
+ var tmp9_startTime = currentTimeInstant();
333
+ var tmp10_maxDuration = options.a1u();
334
+ this.e2v(new ClassicExecutionContext(VOID, tmp0_unificator, tmp1_libraries, tmp2_flags, tmp3_staticKb, tmp4_dynamicKb, tmp5_operators, tmp6_inputChannels, tmp7_outputChannels, tmp8_customData, VOID, goal, VOID, VOID, VOID, tmp9_startTime, tmp10_maxDuration));
335
+ var tmp = new StateInit(this.k27());
336
+ return asSequence(this.f2v(tmp, AbstractClassicSolver$updateCurrentContextAfterStateTransition$ref(this)));
337
+ };
338
+ protoOf(AbstractClassicSolver).copy = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
339
+ return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof AbstractClassicSolver) ? $super : THROW_CCE());
340
+ };
341
+ function Primitives(alternatives, executionContext, parent, depth) {
342
+ ChoicePointContext.call(this, alternatives, executionContext, parent, depth);
343
+ this.k2v_1 = alternatives;
344
+ this.l2v_1 = executionContext;
345
+ this.m2v_1 = parent;
346
+ this.n2v_1 = depth;
347
+ }
348
+ protoOf(Primitives).o2v = function () {
349
+ return this.k2v_1;
350
+ };
351
+ protoOf(Primitives).p2v = function () {
352
+ return this.l2v_1;
353
+ };
354
+ protoOf(Primitives).q2v = function () {
355
+ return this.m2v_1;
356
+ };
357
+ protoOf(Primitives).r2v = function () {
358
+ return this.n2v_1;
359
+ };
360
+ protoOf(Primitives).toString = function () {
361
+ return protoOf(ChoicePointContext).toString.call(this);
362
+ };
363
+ protoOf(Primitives).s2v = function () {
364
+ return 'Primitives';
365
+ };
366
+ protoOf(Primitives).t2v = function (context) {
367
+ var tmp0_$this = ensureNotNull(this.l2v_1);
368
+ var tmp1_primitives = this.k2v_1;
369
+ // Inline function 'kotlin.Long.plus' call
370
+ var this_0 = context.x2u_1;
371
+ var tmp2_step = add(this_0, fromInt(1));
372
+ var tmp3_startTime = context.s2u_1;
373
+ var tmp4_flags = context.g2u_1;
374
+ var tmp5_dynamicKb = context.i2u_1;
375
+ var tmp6_staticKb = context.h2u_1;
376
+ var tmp7_operators = context.j2u_1;
377
+ var tmp8_inputChannels = context.k2u_1;
378
+ var tmp9_outputChannels = context.l2u_1;
379
+ var tmp10_libraries = context.f2u_1;
380
+ var tmp11_customData = context.m2u_1.discardEphemeral();
381
+ var tempContext = tmp0_$this.u2v(VOID, VOID, tmp10_libraries, tmp4_flags, tmp6_staticKb, tmp5_dynamicKb, tmp7_operators, tmp8_inputChannels, tmp9_outputChannels, tmp11_customData, VOID, VOID, VOID, VOID, tmp1_primitives, tmp3_startTime, VOID, VOID, VOID, VOID, tmp2_step);
382
+ var nextChoicePointContext = this.v2v(this.k2v_1.ro(), tempContext);
383
+ return tempContext.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, nextChoicePointContext);
384
+ };
385
+ protoOf(Primitives).w2v = function (alternatives, executionContext, parent, depth) {
386
+ return new Primitives(alternatives, executionContext, parent, depth);
387
+ };
388
+ protoOf(Primitives).v2v = function (alternatives, executionContext, parent, depth, $super) {
389
+ alternatives = alternatives === VOID ? this.k2v_1 : alternatives;
390
+ executionContext = executionContext === VOID ? this.l2v_1 : executionContext;
391
+ parent = parent === VOID ? this.m2v_1 : parent;
392
+ depth = depth === VOID ? this.n2v_1 : depth;
393
+ return $super === VOID ? this.w2v(alternatives, executionContext, parent, depth) : $super.w2v.call(this, alternatives, executionContext, parent, depth);
394
+ };
395
+ protoOf(Primitives).hashCode = function () {
396
+ var result = hashCode(this.k2v_1);
397
+ result = imul(result, 31) + (this.l2v_1 == null ? 0 : this.l2v_1.hashCode()) | 0;
398
+ result = imul(result, 31) + (this.m2v_1 == null ? 0 : hashCode(this.m2v_1)) | 0;
399
+ result = imul(result, 31) + this.n2v_1 | 0;
400
+ return result;
401
+ };
402
+ protoOf(Primitives).equals = function (other) {
403
+ if (this === other)
404
+ return true;
405
+ if (!(other instanceof Primitives))
406
+ return false;
407
+ if (!equals(this.k2v_1, other.k2v_1))
408
+ return false;
409
+ if (!equals(this.l2v_1, other.l2v_1))
410
+ return false;
411
+ if (!equals(this.m2v_1, other.m2v_1))
412
+ return false;
413
+ if (!(this.n2v_1 === other.n2v_1))
414
+ return false;
415
+ return true;
416
+ };
417
+ function Rules(alternatives, executionContext, parent, depth) {
418
+ ChoicePointContext.call(this, alternatives, executionContext, parent, depth);
419
+ this.j2w_1 = alternatives;
420
+ this.k2w_1 = executionContext;
421
+ this.l2w_1 = parent;
422
+ this.m2w_1 = depth;
423
+ }
424
+ protoOf(Rules).o2v = function () {
425
+ return this.j2w_1;
426
+ };
427
+ protoOf(Rules).p2v = function () {
428
+ return this.k2w_1;
429
+ };
430
+ protoOf(Rules).q2v = function () {
431
+ return this.l2w_1;
432
+ };
433
+ protoOf(Rules).r2v = function () {
434
+ return this.m2w_1;
435
+ };
436
+ protoOf(Rules).toString = function () {
437
+ return protoOf(ChoicePointContext).toString.call(this);
438
+ };
439
+ protoOf(Rules).s2v = function () {
440
+ return 'Rules';
441
+ };
442
+ protoOf(Rules).t2v = function (context) {
443
+ var tmp0_$this = ensureNotNull(this.k2w_1);
444
+ var tmp1_rules = this.j2w_1;
445
+ // Inline function 'kotlin.Long.plus' call
446
+ var this_0 = context.x2u_1;
447
+ var tmp2_step = add(this_0, fromInt(1));
448
+ var tmp3_startTime = context.s2u_1;
449
+ var tmp4_flags = context.g2u_1;
450
+ var tmp5_dynamicKb = context.i2u_1;
451
+ var tmp6_staticKb = context.h2u_1;
452
+ var tmp7_operators = context.j2u_1;
453
+ var tmp8_inputChannels = context.k2u_1;
454
+ var tmp9_outputChannels = context.l2u_1;
455
+ var tmp10_libraries = context.f2u_1;
456
+ var tmp11_customData = context.m2u_1.discardEphemeral();
457
+ var tempContext = tmp0_$this.u2v(VOID, VOID, tmp10_libraries, tmp4_flags, tmp6_staticKb, tmp5_dynamicKb, tmp7_operators, tmp8_inputChannels, tmp9_outputChannels, tmp11_customData, VOID, VOID, VOID, tmp1_rules, VOID, tmp3_startTime, VOID, VOID, VOID, VOID, tmp2_step);
458
+ var nextChoicePointContext = this.n2w(this.j2w_1.ro(), tempContext);
459
+ return tempContext.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, nextChoicePointContext);
460
+ };
461
+ protoOf(Rules).o2w = function (alternatives, executionContext, parent, depth) {
462
+ return new Rules(alternatives, executionContext, parent, depth);
463
+ };
464
+ protoOf(Rules).n2w = function (alternatives, executionContext, parent, depth, $super) {
465
+ alternatives = alternatives === VOID ? this.j2w_1 : alternatives;
466
+ executionContext = executionContext === VOID ? this.k2w_1 : executionContext;
467
+ parent = parent === VOID ? this.l2w_1 : parent;
468
+ depth = depth === VOID ? this.m2w_1 : depth;
469
+ return $super === VOID ? this.o2w(alternatives, executionContext, parent, depth) : $super.o2w.call(this, alternatives, executionContext, parent, depth);
470
+ };
471
+ protoOf(Rules).hashCode = function () {
472
+ var result = hashCode(this.j2w_1);
473
+ result = imul(result, 31) + (this.k2w_1 == null ? 0 : this.k2w_1.hashCode()) | 0;
474
+ result = imul(result, 31) + (this.l2w_1 == null ? 0 : hashCode(this.l2w_1)) | 0;
475
+ result = imul(result, 31) + this.m2w_1 | 0;
476
+ return result;
477
+ };
478
+ protoOf(Rules).equals = function (other) {
479
+ if (this === other)
480
+ return true;
481
+ if (!(other instanceof Rules))
482
+ return false;
483
+ if (!equals(this.j2w_1, other.j2w_1))
484
+ return false;
485
+ if (!equals(this.k2w_1, other.k2w_1))
486
+ return false;
487
+ if (!equals(this.l2w_1, other.l2w_1))
488
+ return false;
489
+ if (!(this.m2w_1 === other.m2w_1))
490
+ return false;
491
+ return true;
492
+ };
493
+ function ChoicePointContext$_get_pathToRoot_$slambda_q0myjn(this$0, resultContinuation) {
494
+ this.x2w_1 = this$0;
495
+ CoroutineImpl.call(this, resultContinuation);
496
+ }
497
+ protoOf(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn).a2x = function ($this$sequence, $completion) {
498
+ var tmp = this.b2x($this$sequence, $completion);
499
+ tmp.i8_1 = Unit_instance;
500
+ tmp.j8_1 = null;
501
+ return tmp.o8();
502
+ };
503
+ protoOf(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn).f9 = function (p1, $completion) {
504
+ return this.a2x(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
505
+ };
506
+ protoOf(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn).o8 = function () {
507
+ var suspendResult = this.i8_1;
508
+ $sm: do
509
+ try {
510
+ var tmp = this.g8_1;
511
+ switch (tmp) {
512
+ case 0:
513
+ this.h8_1 = 4;
514
+ this.z2w_1 = this.x2w_1;
515
+ this.g8_1 = 1;
516
+ continue $sm;
517
+ case 1:
518
+ if (!!(this.z2w_1 == null)) {
519
+ this.g8_1 = 3;
520
+ continue $sm;
521
+ }
522
+
523
+ this.g8_1 = 2;
524
+ suspendResult = this.y2w_1.nc(ensureNotNull(this.z2w_1), this);
525
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
526
+ return suspendResult;
527
+ }
528
+
529
+ continue $sm;
530
+ case 2:
531
+ this.z2w_1 = this.z2w_1.q2v();
532
+ this.g8_1 = 1;
533
+ continue $sm;
534
+ case 3:
535
+ return Unit_instance;
536
+ case 4:
537
+ throw this.j8_1;
538
+ }
539
+ } catch ($p) {
540
+ var e = $p;
541
+ if (this.h8_1 === 4) {
542
+ throw e;
543
+ } else {
544
+ this.g8_1 = this.h8_1;
545
+ this.j8_1 = e;
546
+ }
547
+ }
548
+ while (true);
549
+ };
550
+ protoOf(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn).b2x = function ($this$sequence, completion) {
551
+ var i = new ChoicePointContext$_get_pathToRoot_$slambda_q0myjn(this.x2w_1, completion);
552
+ i.y2w_1 = $this$sequence;
553
+ return i;
554
+ };
555
+ function ChoicePointContext$_get_pathToRoot_$slambda_q0myjn_0(this$0, resultContinuation) {
556
+ var i = new ChoicePointContext$_get_pathToRoot_$slambda_q0myjn(this$0, resultContinuation);
557
+ return constructCallableReference(function ($this$sequence, $completion) {
558
+ return i.a2x($this$sequence, $completion);
559
+ }, 1);
560
+ }
561
+ function ChoicePointContext(alternatives, executionContext, parent, depth) {
562
+ depth = depth === VOID ? 0 : depth;
563
+ this.x2v_1 = alternatives;
564
+ this.y2v_1 = executionContext;
565
+ this.z2v_1 = parent;
566
+ this.a2w_1 = depth;
567
+ }
568
+ protoOf(ChoicePointContext).o2v = function () {
569
+ return this.x2v_1;
570
+ };
571
+ protoOf(ChoicePointContext).p2v = function () {
572
+ return this.y2v_1;
573
+ };
574
+ protoOf(ChoicePointContext).q2v = function () {
575
+ return this.z2v_1;
576
+ };
577
+ protoOf(ChoicePointContext).r2v = function () {
578
+ return this.a2w_1;
579
+ };
580
+ protoOf(ChoicePointContext).b2w = function () {
581
+ var tmp0 = this.c2w();
582
+ var tmp$ret$0;
583
+ $l$block: {
584
+ // Inline function 'kotlin.sequences.any' call
585
+ var _iterator__ex2g4s = tmp0.m();
586
+ while (_iterator__ex2g4s.p()) {
587
+ var element = _iterator__ex2g4s.q();
588
+ if (element.o2v().to()) {
589
+ tmp$ret$0 = true;
590
+ break $l$block;
591
+ }
592
+ }
593
+ tmp$ret$0 = false;
594
+ }
595
+ return tmp$ret$0;
596
+ };
597
+ protoOf(ChoicePointContext).c2w = function () {
598
+ return sequence(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn_0(this, null));
599
+ };
600
+ protoOf(ChoicePointContext).d2w = function () {
601
+ var tmp0_safe_receiver = this.p2v();
602
+ return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w2u_1;
603
+ };
604
+ protoOf(ChoicePointContext).e2w = function () {
605
+ var tmp0_safe_receiver = this.p2v();
606
+ return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d2u_1;
607
+ };
608
+ protoOf(ChoicePointContext).toString = function () {
609
+ var tmp = this.s2v() + '(' + ('alternatives=' + toString(this.o2v()) + ', ');
610
+ var tmp_0;
611
+ if (this.p2v() === null) {
612
+ tmp_0 = 'executionContext=' + toString_0(this.p2v()) + ', ';
613
+ } else {
614
+ 'executionContextDepth=' + this.d2w() + ', ';
615
+ tmp_0 = 'executionContextProcedure=' + toString_0(this.e2w()) + ', ';
616
+ }
617
+ return tmp + tmp_0 + ('depth=' + this.r2v()) + ')';
618
+ };
619
+ function appendRules(_this__u8e3s4, alternatives, executionContext) {
620
+ executionContext = executionContext === VOID ? null : executionContext;
621
+ return new Rules(alternatives, executionContext, _this__u8e3s4, nextDepth(_this__u8e3s4));
622
+ }
623
+ function nextDepth(_this__u8e3s4) {
624
+ return _this__u8e3s4 == null ? 0 : _this__u8e3s4.r2v() + 1 | 0;
625
+ }
626
+ function appendPrimitives(_this__u8e3s4, alternatives, executionContext) {
627
+ executionContext = executionContext === VOID ? null : executionContext;
628
+ return new Primitives(alternatives, executionContext, _this__u8e3s4, nextDepth(_this__u8e3s4));
629
+ }
630
+ function _get_locallyInterestingVariables__39cqti($this) {
631
+ var tmp = asSequence_0($this.y2u_1);
632
+ var tmp0_safe_receiver = $this.p2u_1.so();
633
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jt();
634
+ return plus(tmp, tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs);
635
+ }
636
+ function _get_interestingVariables__k6uw5o($this) {
637
+ var tmp0 = $this.b2v_1;
638
+ var tmp = KProperty1;
639
+ // Inline function 'kotlin.getValue' call
640
+ getPropertyCallableRef('interestingVariables', 1, tmp, ClassicExecutionContext$_get_interestingVariables_$ref_xwa4zu(), null);
641
+ return tmp0.c2();
642
+ }
643
+ function ClassicExecutionContext$pathToRoot$slambda(this$0, resultContinuation) {
644
+ this.k2x_1 = this$0;
645
+ CoroutineImpl.call(this, resultContinuation);
646
+ }
647
+ protoOf(ClassicExecutionContext$pathToRoot$slambda).n2x = function ($this$sequence, $completion) {
648
+ var tmp = this.o2x($this$sequence, $completion);
649
+ tmp.i8_1 = Unit_instance;
650
+ tmp.j8_1 = null;
651
+ return tmp.o8();
652
+ };
653
+ protoOf(ClassicExecutionContext$pathToRoot$slambda).f9 = function (p1, $completion) {
654
+ return this.n2x(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
655
+ };
656
+ protoOf(ClassicExecutionContext$pathToRoot$slambda).o8 = function () {
657
+ var suspendResult = this.i8_1;
658
+ $sm: do
659
+ try {
660
+ var tmp = this.g8_1;
661
+ switch (tmp) {
662
+ case 0:
663
+ this.h8_1 = 4;
664
+ this.m2x_1 = this.k2x_1;
665
+ this.g8_1 = 1;
666
+ continue $sm;
667
+ case 1:
668
+ if (!!(this.m2x_1 == null)) {
669
+ this.g8_1 = 3;
670
+ continue $sm;
671
+ }
672
+
673
+ this.g8_1 = 2;
674
+ suspendResult = this.l2x_1.nc(this.m2x_1, this);
675
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
676
+ return suspendResult;
677
+ }
678
+
679
+ continue $sm;
680
+ case 2:
681
+ this.m2x_1 = this.m2x_1.v2u_1;
682
+ this.g8_1 = 1;
683
+ continue $sm;
684
+ case 3:
685
+ return Unit_instance;
686
+ case 4:
687
+ throw this.j8_1;
688
+ }
689
+ } catch ($p) {
690
+ var e = $p;
691
+ if (this.h8_1 === 4) {
692
+ throw e;
693
+ } else {
694
+ this.g8_1 = this.h8_1;
695
+ this.j8_1 = e;
696
+ }
697
+ }
698
+ while (true);
699
+ };
700
+ protoOf(ClassicExecutionContext$pathToRoot$slambda).o2x = function ($this$sequence, completion) {
701
+ var i = new ClassicExecutionContext$pathToRoot$slambda(this.k2x_1, completion);
702
+ i.l2x_1 = $this$sequence;
703
+ return i;
704
+ };
705
+ function ClassicExecutionContext$pathToRoot$slambda_0(this$0, resultContinuation) {
706
+ var i = new ClassicExecutionContext$pathToRoot$slambda(this$0, resultContinuation);
707
+ return constructCallableReference(function ($this$sequence, $completion) {
708
+ return i.n2x($this$sequence, $completion);
709
+ }, 1);
710
+ }
711
+ function ClassicExecutionContext$currentGoal$delegate$lambda(this$0) {
712
+ return function () {
713
+ var tmp;
714
+ if (this$0.p2u_1.uo()) {
715
+ tmp = null;
716
+ } else {
717
+ var tmp0_safe_receiver = this$0.p2u_1.so();
718
+ tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.applySubstitution(this$0.n2u_1);
719
+ }
720
+ return tmp;
721
+ };
722
+ }
723
+ function ClassicExecutionContext$_get_currentGoal_$ref_ulveh3() {
724
+ return constructCallableReference(function (p0) {
725
+ return p0.p2x();
726
+ }, 1, 0, 84);
727
+ }
728
+ function ClassicExecutionContext$interestingVariables$delegate$lambda$lambda(it) {
729
+ return _get_locallyInterestingVariables__39cqti(it);
730
+ }
731
+ function ClassicExecutionContext$interestingVariables$delegate$lambda(this$0) {
732
+ return function () {
733
+ var tmp = plus(_get_locallyInterestingVariables__39cqti(this$0), this$0.o2u_1.jt());
734
+ return cached(distinct(plus(tmp, flatMap(this$0.z2u_1, ClassicExecutionContext$interestingVariables$delegate$lambda$lambda))));
735
+ };
736
+ }
737
+ function ClassicExecutionContext$_get_interestingVariables_$ref_xwa4zu() {
738
+ return constructCallableReference(function (p0) {
739
+ return _get_interestingVariables__k6uw5o(p0);
740
+ }, 1, 0, 85);
741
+ }
742
+ function ClassicExecutionContext$logicStackTrace$delegate$lambda$lambda(it) {
743
+ return it.q2x();
744
+ }
745
+ function ClassicExecutionContext$logicStackTrace$delegate$lambda$lambda_0(this$0) {
746
+ return function (it) {
747
+ var tmp0_elvis_lhs = it.d2u_1;
748
+ return tmp0_elvis_lhs == null ? Companion_getInstance_1().of('?-', [this$0.o2u_1]) : tmp0_elvis_lhs;
749
+ };
750
+ }
751
+ function ClassicExecutionContext$logicStackTrace$delegate$lambda(this$0) {
752
+ return function () {
753
+ var tmp = filter(this$0.z2u_1, ClassicExecutionContext$logicStackTrace$delegate$lambda$lambda);
754
+ return toList(map(tmp, ClassicExecutionContext$logicStackTrace$delegate$lambda$lambda_0(this$0)));
755
+ };
756
+ }
757
+ function ClassicExecutionContext$_get_logicStackTrace_$ref_p35zx2() {
758
+ return constructCallableReference(function (p0) {
759
+ return p0.r1r();
760
+ }, 1, 0, 86);
761
+ }
762
+ function ClassicExecutionContext(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables) {
763
+ procedure = procedure === VOID ? null : procedure;
764
+ unificator = unificator === VOID ? Companion_getInstance().q1h() : unificator;
765
+ libraries = libraries === VOID ? Companion_instance.empty() : libraries;
766
+ flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
767
+ staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
768
+ dynamicKb = dynamicKb === VOID ? Companion_instance_1.empty(unificator) : dynamicKb;
769
+ operators = operators === VOID ? toOperatorSet(getAllOperators(libraries, [staticKb, dynamicKb])) : operators;
770
+ inputChannels = inputChannels === VOID ? Companion_instance_4.fromStandard() : inputChannels;
771
+ outputChannels = outputChannels === VOID ? Companion_instance_5.fromStandard() : outputChannels;
772
+ customData = customData === VOID ? Companion_instance_6.empty() : customData;
773
+ substitution = substitution === VOID ? Companion_getInstance_2().empty() : substitution;
774
+ query = query === VOID ? Companion_getInstance_3().ys_1 : query;
775
+ goals = goals === VOID ? Companion_instance_7.empty() : goals;
776
+ rules = rules === VOID ? Companion_instance_7.empty() : rules;
777
+ primitives = primitives === VOID ? Companion_instance_7.empty() : primitives;
778
+ maxDuration = maxDuration === VOID ? new Long(-1, 2147483647) : maxDuration;
779
+ choicePoints = choicePoints === VOID ? null : choicePoints;
780
+ parent = parent === VOID ? null : parent;
781
+ depth = depth === VOID ? 0 : depth;
782
+ step = step === VOID ? new Long(0, 0) : step;
783
+ relevantVariables = relevantVariables === VOID ? emptySet() : relevantVariables;
784
+ this.d2u_1 = procedure;
785
+ this.e2u_1 = unificator;
786
+ this.f2u_1 = libraries;
787
+ this.g2u_1 = flags;
788
+ this.h2u_1 = staticKb;
789
+ this.i2u_1 = dynamicKb;
790
+ this.j2u_1 = operators;
791
+ this.k2u_1 = inputChannels;
792
+ this.l2u_1 = outputChannels;
793
+ this.m2u_1 = customData;
794
+ this.n2u_1 = substitution;
795
+ this.o2u_1 = query;
796
+ this.p2u_1 = goals;
797
+ this.q2u_1 = rules;
798
+ this.r2u_1 = primitives;
799
+ this.s2u_1 = startTime;
800
+ this.t2u_1 = maxDuration;
801
+ this.u2u_1 = choicePoints;
802
+ this.v2u_1 = parent;
803
+ this.w2u_1 = depth;
804
+ this.x2u_1 = step;
805
+ this.y2u_1 = relevantVariables;
806
+ // Inline function 'kotlin.require' call
807
+ // Inline function 'kotlin.require' call
808
+ if (!(this.w2u_1 === 0 && this.v2u_1 == null || (this.w2u_1 > 0 && !(this.v2u_1 == null)))) {
809
+ var message = 'Failed requirement.';
810
+ throw IllegalArgumentException_init_$Create$(toString(message));
811
+ }
812
+ // Inline function 'kotlin.require' call
813
+ // Inline function 'kotlin.require' call
814
+ if (!(compare(this.s2u_1, new Long(0, 0)) >= 0)) {
815
+ var message_0 = 'Failed requirement.';
816
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
817
+ }
818
+ // Inline function 'kotlin.require' call
819
+ // Inline function 'kotlin.require' call
820
+ if (!(compare(this.t2u_1, new Long(0, 0)) >= 0)) {
821
+ var message_1 = 'Failed requirement.';
822
+ throw IllegalArgumentException_init_$Create$(toString(message_1));
823
+ }
824
+ var tmp = this;
825
+ tmp.z2u_1 = sequence(ClassicExecutionContext$pathToRoot$slambda_0(this, null));
826
+ var tmp_0 = this;
827
+ tmp_0.a2v_1 = lazy(ClassicExecutionContext$currentGoal$delegate$lambda(this));
828
+ var tmp_1 = this;
829
+ tmp_1.b2v_1 = lazy(ClassicExecutionContext$interestingVariables$delegate$lambda(this));
830
+ var tmp_2 = this;
831
+ tmp_2.c2v_1 = lazy(ClassicExecutionContext$logicStackTrace$delegate$lambda(this));
832
+ }
833
+ protoOf(ClassicExecutionContext).p1r = function () {
834
+ return this.d2u_1;
835
+ };
836
+ protoOf(ClassicExecutionContext).x1h = function () {
837
+ return this.e2u_1;
838
+ };
839
+ protoOf(ClassicExecutionContext).u1r = function () {
840
+ return this.f2u_1;
841
+ };
842
+ protoOf(ClassicExecutionContext).v1r = function () {
843
+ return this.g2u_1;
844
+ };
845
+ protoOf(ClassicExecutionContext).w1r = function () {
846
+ return this.h2u_1;
847
+ };
848
+ protoOf(ClassicExecutionContext).x1r = function () {
849
+ return this.i2u_1;
850
+ };
851
+ protoOf(ClassicExecutionContext).d1s = function () {
852
+ return this.j2u_1;
853
+ };
854
+ protoOf(ClassicExecutionContext).y1r = function () {
855
+ return this.k2u_1;
856
+ };
857
+ protoOf(ClassicExecutionContext).z1r = function () {
858
+ return this.l2u_1;
859
+ };
860
+ protoOf(ClassicExecutionContext).s1r = function () {
861
+ return this.m2u_1;
862
+ };
863
+ protoOf(ClassicExecutionContext).q1r = function () {
864
+ return this.n2u_1;
865
+ };
866
+ protoOf(ClassicExecutionContext).k1r = function () {
867
+ return this.s2u_1;
868
+ };
869
+ protoOf(ClassicExecutionContext).m1r = function () {
870
+ return this.t2u_1;
871
+ };
872
+ protoOf(ClassicExecutionContext).r2x = function () {
873
+ return this.w2u_1 === 0;
874
+ };
875
+ protoOf(ClassicExecutionContext).b2w = function () {
876
+ var tmp0_safe_receiver = this.u2u_1;
877
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b2w();
878
+ return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
879
+ };
880
+ protoOf(ClassicExecutionContext).q2x = function () {
881
+ return this.v2u_1 == null || (this.w2u_1 - this.v2u_1.w2u_1 | 0) >= 1;
882
+ };
883
+ protoOf(ClassicExecutionContext).p2x = function () {
884
+ var tmp0 = this.a2v_1;
885
+ var tmp = KProperty1;
886
+ // Inline function 'kotlin.getValue' call
887
+ getPropertyCallableRef('currentGoal', 1, tmp, ClassicExecutionContext$_get_currentGoal_$ref_ulveh3(), null);
888
+ return tmp0.c2();
889
+ };
890
+ protoOf(ClassicExecutionContext).s2x = function (variable) {
891
+ return contains(_get_interestingVariables__k6uw5o(this), variable);
892
+ };
893
+ protoOf(ClassicExecutionContext).r1r = function () {
894
+ var tmp0 = this.c2v_1;
895
+ var tmp = KProperty1;
896
+ // Inline function 'kotlin.getValue' call
897
+ getPropertyCallableRef('logicStackTrace', 1, tmp, ClassicExecutionContext$_get_logicStackTrace_$ref_p35zx2(), null);
898
+ return tmp0.c2();
899
+ };
900
+ protoOf(ClassicExecutionContext).t1r = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels) {
901
+ return ClassicSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, true);
902
+ };
903
+ protoOf(ClassicExecutionContext).createSolver = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, $super) {
904
+ return this.createSolver(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, ($super == null ? true : $super instanceof ClassicExecutionContext) ? $super : THROW_CCE());
905
+ };
906
+ protoOf(ClassicExecutionContext).a1s = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels) {
907
+ return MutableClassicSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, true);
908
+ };
909
+ protoOf(ClassicExecutionContext).createMutableSolver = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, $super) {
910
+ return this.createMutableSolver(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, ($super == null ? true : $super instanceof ClassicExecutionContext) ? $super : THROW_CCE());
911
+ };
912
+ protoOf(ClassicExecutionContext).c1s = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData) {
913
+ return this.u2v(VOID, unificator, libraries, flags, staticKb, dynamicKb.toMutableTheory(), operators, inputChannels, outputChannels, customData);
914
+ };
915
+ protoOf(ClassicExecutionContext).update = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, $super) {
916
+ return this.update(unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, ($super == null ? true : $super instanceof ClassicExecutionContext) ? $super : THROW_CCE());
917
+ };
918
+ protoOf(ClassicExecutionContext).t2x = function (sideEffect) {
919
+ var tmp = apply.call(this, sideEffect);
920
+ return tmp instanceof ClassicExecutionContext ? tmp : THROW_CCE();
921
+ };
922
+ protoOf(ClassicExecutionContext).apply = function (sideEffect) {
923
+ return this.t2x(sideEffect);
924
+ };
925
+ protoOf(ClassicExecutionContext).u2x = function (sideEffects) {
926
+ var tmp = applyIterable.call(this, sideEffects);
927
+ return tmp instanceof ClassicExecutionContext ? tmp : THROW_CCE();
928
+ };
929
+ protoOf(ClassicExecutionContext).applyIterable = function (sideEffects) {
930
+ return this.u2x(sideEffects);
931
+ };
932
+ protoOf(ClassicExecutionContext).v2x = function (sideEffects) {
933
+ var tmp = applySequence.call(this, sideEffects);
934
+ return tmp instanceof ClassicExecutionContext ? tmp : THROW_CCE();
935
+ };
936
+ protoOf(ClassicExecutionContext).applySequence = function (sideEffects) {
937
+ return this.v2x(sideEffects);
938
+ };
939
+ protoOf(ClassicExecutionContext).toString = function () {
940
+ return 'ClassicExecutionContext(' + ('step=' + this.x2u_1.toString() + ', ') + ('depth=' + this.w2u_1 + ', ') + ('substitution=' + toString(this.n2u_1) + ', ') + ('logicStackTrace=' + toString(this.r1r()) + ', ') + ('goals=' + toString(this.p2u_1) + ', ') + ('rules=' + toString(this.q2u_1) + ', ') + ('primitives=' + toString(this.r2u_1) + ', ') + ('startTime=' + this.s2u_1.toString() + ', ') + ('endTime=' + this.l1r().toString() + ', ') + ('maxDuration=' + this.t2u_1.toString() + ', ') + ('unificator=' + toString(this.e2u_1) + ', ') + ('choicePoints=' + toString_0(this.u2u_1)) + ')';
941
+ };
942
+ protoOf(ClassicExecutionContext).w2x = function (procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables) {
943
+ return new ClassicExecutionContext(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables);
944
+ };
945
+ protoOf(ClassicExecutionContext).u2v = function (procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables, $super) {
946
+ procedure = procedure === VOID ? this.d2u_1 : procedure;
947
+ unificator = unificator === VOID ? this.e2u_1 : unificator;
948
+ libraries = libraries === VOID ? this.f2u_1 : libraries;
949
+ flags = flags === VOID ? this.g2u_1 : flags;
950
+ staticKb = staticKb === VOID ? this.h2u_1 : staticKb;
951
+ dynamicKb = dynamicKb === VOID ? this.i2u_1 : dynamicKb;
952
+ operators = operators === VOID ? this.j2u_1 : operators;
953
+ inputChannels = inputChannels === VOID ? this.k2u_1 : inputChannels;
954
+ outputChannels = outputChannels === VOID ? this.l2u_1 : outputChannels;
955
+ customData = customData === VOID ? this.m2u_1 : customData;
956
+ substitution = substitution === VOID ? this.n2u_1 : substitution;
957
+ query = query === VOID ? this.o2u_1 : query;
958
+ goals = goals === VOID ? this.p2u_1 : goals;
959
+ rules = rules === VOID ? this.q2u_1 : rules;
960
+ primitives = primitives === VOID ? this.r2u_1 : primitives;
961
+ startTime = startTime === VOID ? this.s2u_1 : startTime;
962
+ maxDuration = maxDuration === VOID ? this.t2u_1 : maxDuration;
963
+ choicePoints = choicePoints === VOID ? this.u2u_1 : choicePoints;
964
+ parent = parent === VOID ? this.v2u_1 : parent;
965
+ depth = depth === VOID ? this.w2u_1 : depth;
966
+ step = step === VOID ? this.x2u_1 : step;
967
+ relevantVariables = relevantVariables === VOID ? this.y2u_1 : relevantVariables;
968
+ return $super === VOID ? this.w2x(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables) : $super.w2x.call(this, procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables);
969
+ };
970
+ protoOf(ClassicExecutionContext).hashCode = function () {
971
+ var result = this.d2u_1 == null ? 0 : this.d2u_1.hashCode();
972
+ result = imul(result, 31) + hashCode(this.e2u_1) | 0;
973
+ result = imul(result, 31) + hashCode(this.f2u_1) | 0;
974
+ result = imul(result, 31) + this.g2u_1.hashCode() | 0;
975
+ result = imul(result, 31) + hashCode(this.h2u_1) | 0;
976
+ result = imul(result, 31) + hashCode(this.i2u_1) | 0;
977
+ result = imul(result, 31) + this.j2u_1.hashCode() | 0;
978
+ result = imul(result, 31) + hashCode(this.k2u_1) | 0;
979
+ result = imul(result, 31) + hashCode(this.l2u_1) | 0;
980
+ result = imul(result, 31) + this.m2u_1.hashCode() | 0;
981
+ result = imul(result, 31) + hashCode(this.n2u_1) | 0;
982
+ result = imul(result, 31) + this.o2u_1.hashCode() | 0;
983
+ result = imul(result, 31) + hashCode(this.p2u_1) | 0;
984
+ result = imul(result, 31) + hashCode(this.q2u_1) | 0;
985
+ result = imul(result, 31) + hashCode(this.r2u_1) | 0;
986
+ result = imul(result, 31) + this.s2u_1.hashCode() | 0;
987
+ result = imul(result, 31) + this.t2u_1.hashCode() | 0;
988
+ result = imul(result, 31) + (this.u2u_1 == null ? 0 : hashCode(this.u2u_1)) | 0;
989
+ result = imul(result, 31) + (this.v2u_1 == null ? 0 : this.v2u_1.hashCode()) | 0;
990
+ result = imul(result, 31) + this.w2u_1 | 0;
991
+ result = imul(result, 31) + this.x2u_1.hashCode() | 0;
992
+ result = imul(result, 31) + hashCode(this.y2u_1) | 0;
993
+ return result;
994
+ };
995
+ protoOf(ClassicExecutionContext).equals = function (other) {
996
+ if (this === other)
997
+ return true;
998
+ if (!(other instanceof ClassicExecutionContext))
999
+ return false;
1000
+ if (!equals(this.d2u_1, other.d2u_1))
1001
+ return false;
1002
+ if (!equals(this.e2u_1, other.e2u_1))
1003
+ return false;
1004
+ if (!equals(this.f2u_1, other.f2u_1))
1005
+ return false;
1006
+ if (!this.g2u_1.equals(other.g2u_1))
1007
+ return false;
1008
+ if (!equals(this.h2u_1, other.h2u_1))
1009
+ return false;
1010
+ if (!equals(this.i2u_1, other.i2u_1))
1011
+ return false;
1012
+ if (!this.j2u_1.equals(other.j2u_1))
1013
+ return false;
1014
+ if (!equals(this.k2u_1, other.k2u_1))
1015
+ return false;
1016
+ if (!equals(this.l2u_1, other.l2u_1))
1017
+ return false;
1018
+ if (!this.m2u_1.equals(other.m2u_1))
1019
+ return false;
1020
+ if (!equals(this.n2u_1, other.n2u_1))
1021
+ return false;
1022
+ if (!this.o2u_1.equals(other.o2u_1))
1023
+ return false;
1024
+ if (!equals(this.p2u_1, other.p2u_1))
1025
+ return false;
1026
+ if (!equals(this.q2u_1, other.q2u_1))
1027
+ return false;
1028
+ if (!equals(this.r2u_1, other.r2u_1))
1029
+ return false;
1030
+ if (!equalsLong(this.s2u_1, other.s2u_1))
1031
+ return false;
1032
+ if (!equalsLong(this.t2u_1, other.t2u_1))
1033
+ return false;
1034
+ if (!equals(this.u2u_1, other.u2u_1))
1035
+ return false;
1036
+ if (!equals(this.v2u_1, other.v2u_1))
1037
+ return false;
1038
+ if (!(this.w2u_1 === other.w2u_1))
1039
+ return false;
1040
+ if (!equalsLong(this.x2u_1, other.x2u_1))
1041
+ return false;
1042
+ if (!equals(this.y2u_1, other.y2u_1))
1043
+ return false;
1044
+ return true;
1045
+ };
1046
+ function ClassicSolver_init_$Init$(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb, $this) {
1047
+ unificator = unificator === VOID ? Companion_getInstance().q1h() : unificator;
1048
+ libraries = libraries === VOID ? Companion_instance.empty() : libraries;
1049
+ flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
1050
+ initialStaticKb = initialStaticKb === VOID ? Companion_instance_0.empty(unificator) : initialStaticKb;
1051
+ initialDynamicKb = initialDynamicKb === VOID ? Companion_instance_1.empty(unificator) : initialDynamicKb;
1052
+ inputChannels = inputChannels === VOID ? Companion_instance_4.fromStandard() : inputChannels;
1053
+ outputChannels = outputChannels === VOID ? Companion_instance_5.fromStandard() : outputChannels;
1054
+ trustKb = trustKb === VOID ? false : trustKb;
1055
+ AbstractClassicSolver.call($this, unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb);
1056
+ ClassicSolver.call($this);
1057
+ return $this;
1058
+ }
1059
+ function ClassicSolver_init_$Create$(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb) {
1060
+ return ClassicSolver_init_$Init$(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb, objectCreate(protoOf(ClassicSolver)));
1061
+ }
1062
+ function ClassicSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this) {
1063
+ unificator = unificator === VOID ? Companion_getInstance().q1h() : unificator;
1064
+ libraries = libraries === VOID ? Companion_instance.empty() : libraries;
1065
+ flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
1066
+ staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
1067
+ dynamicKb = dynamicKb === VOID ? Companion_instance_1.empty(unificator) : dynamicKb;
1068
+ stdIn = stdIn === VOID ? Companion_instance_2.stdIn() : stdIn;
1069
+ stdOut = stdOut === VOID ? Companion_instance_3.stdOut() : stdOut;
1070
+ stdErr = stdErr === VOID ? Companion_instance_3.stdErr() : stdErr;
1071
+ warnings = warnings === VOID ? Companion_instance_3.warning() : warnings;
1072
+ trustKb = trustKb === VOID ? false : trustKb;
1073
+ AbstractClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this);
1074
+ ClassicSolver.call($this);
1075
+ return $this;
1076
+ }
1077
+ function ClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb) {
1078
+ return ClassicSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, objectCreate(protoOf(ClassicSolver)));
1079
+ }
1080
+ protoOf(ClassicSolver).f2v = function (initialState, onStateTransition) {
1081
+ return Companion_instance_15.y2x(initialState, onStateTransition);
1082
+ };
1083
+ protoOf(ClassicSolver).e1u = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
1084
+ return ClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
1085
+ };
1086
+ protoOf(ClassicSolver).copy = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
1087
+ return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof ClassicSolver) ? $super : THROW_CCE());
1088
+ };
1089
+ protoOf(ClassicSolver).m1p = function () {
1090
+ return this.copy();
1091
+ };
1092
+ protoOf(ClassicSolver).clone = function () {
1093
+ return this.m1p();
1094
+ };
1095
+ function ClassicSolver() {
1096
+ }
1097
+ function ClassicSolverFactory() {
1098
+ }
1099
+ protoOf(ClassicSolverFactory).g1u = function () {
1100
+ return DefaultBuiltins_getInstance();
1101
+ };
1102
+ protoOf(ClassicSolverFactory).r1u = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
1103
+ return ClassicSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs);
1104
+ };
1105
+ protoOf(ClassicSolverFactory).rawSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, $super) {
1106
+ return this.rawSolverOf(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, ($super == null ? true : $super instanceof ClassicSolverFactory) ? $super : THROW_CCE());
1107
+ };
1108
+ protoOf(ClassicSolverFactory).x1u = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
1109
+ return ClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
1110
+ };
1111
+ protoOf(ClassicSolverFactory).solverOf = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
1112
+ return this.solverOf(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof ClassicSolverFactory) ? $super : THROW_CCE());
1113
+ };
1114
+ protoOf(ClassicSolverFactory).z1u = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
1115
+ return MutableClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
1116
+ };
1117
+ protoOf(ClassicSolverFactory).mutableSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
1118
+ return this.mutableSolverOf(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof ClassicSolverFactory) ? $super : THROW_CCE());
1119
+ };
1120
+ protoOf(ClassicSolverFactory).b1v = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
1121
+ return MutableClassicSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs);
1122
+ };
1123
+ protoOf(ClassicSolverFactory).rawMutableSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, $super) {
1124
+ return this.rawMutableSolverOf(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, ($super == null ? true : $super instanceof ClassicSolverFactory) ? $super : THROW_CCE());
1125
+ };
1126
+ var ClassicSolverFactory_instance;
1127
+ function ClassicSolverFactory_getInstance() {
1128
+ return ClassicSolverFactory_instance;
1129
+ }
1130
+ function MutableClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $this) {
1131
+ unificator = unificator === VOID ? Companion_getInstance().q1h() : unificator;
1132
+ libraries = libraries === VOID ? Companion_instance.empty() : libraries;
1133
+ flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
1134
+ staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
1135
+ dynamicKb = dynamicKb === VOID ? Companion_instance_1.empty(unificator) : dynamicKb;
1136
+ inputChannels = inputChannels === VOID ? Companion_instance_4.fromStandard() : inputChannels;
1137
+ outputChannels = outputChannels === VOID ? Companion_instance_5.fromStandard() : outputChannels;
1138
+ trustKb = trustKb === VOID ? false : trustKb;
1139
+ ClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $this);
1140
+ MutableClassicSolver.call($this);
1141
+ return $this;
1142
+ }
1143
+ function MutableClassicSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb) {
1144
+ return MutableClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, objectCreate(protoOf(MutableClassicSolver)));
1145
+ }
1146
+ function MutableClassicSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this) {
1147
+ unificator = unificator === VOID ? Companion_getInstance().q1h() : unificator;
1148
+ libraries = libraries === VOID ? Companion_instance.empty() : libraries;
1149
+ flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
1150
+ staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
1151
+ dynamicKb = dynamicKb === VOID ? Companion_instance_1.empty(unificator) : dynamicKb;
1152
+ stdIn = stdIn === VOID ? Companion_instance_2.stdIn() : stdIn;
1153
+ stdOut = stdOut === VOID ? Companion_instance_3.stdOut() : stdOut;
1154
+ stdErr = stdErr === VOID ? Companion_instance_3.stdErr() : stdErr;
1155
+ warnings = warnings === VOID ? Companion_instance_3.warning() : warnings;
1156
+ trustKb = trustKb === VOID ? false : trustKb;
1157
+ ClassicSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this);
1158
+ MutableClassicSolver.call($this);
1159
+ return $this;
1160
+ }
1161
+ function MutableClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb) {
1162
+ return MutableClassicSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, objectCreate(protoOf(MutableClassicSolver)));
1163
+ }
1164
+ function MutableClassicSolver$loadLibrary$lambda($library) {
1165
+ return function ($this$updateContext) {
1166
+ var newRuntime = $this$updateContext.f2u_1.plusLibrary($library);
1167
+ return $this$updateContext.u2v(VOID, VOID, newRuntime, VOID, VOID, VOID, $this$updateContext.j2u_1.plusOperatorSet(toOperatorSet(getAllOperators(newRuntime, []))));
1168
+ };
1169
+ }
1170
+ function MutableClassicSolver$unloadLibrary$lambda($library) {
1171
+ return function ($this$updateContext) {
1172
+ var newRuntime = $this$updateContext.f2u_1.plusLibrary($library);
1173
+ return $this$updateContext.u2v(VOID, VOID, newRuntime, VOID, VOID, VOID, toOperatorSet(getAllOperators(newRuntime, [$this$updateContext.h2u_1, $this$updateContext.i2u_1])));
1174
+ };
1175
+ }
1176
+ function MutableClassicSolver$setRuntime$lambda($libraries) {
1177
+ return function ($this$updateContext) {
1178
+ return $this$updateContext.u2v(VOID, VOID, $libraries, VOID, VOID, VOID, toOperatorSet(getAllOperators($libraries, [$this$updateContext.h2u_1, $this$updateContext.i2u_1])));
1179
+ };
1180
+ }
1181
+ function MutableClassicSolver$resetStaticKb$lambda($this$updateContext) {
1182
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, Companion_instance_0.empty($this$updateContext.e2u_1), VOID, toOperatorSet(getAllOperators($this$updateContext.f2u_1, [$this$updateContext.i2u_1])));
1183
+ }
1184
+ function MutableClassicSolver$resetDynamicKb$lambda($this$updateContext) {
1185
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, Companion_instance_1.empty($this$updateContext.e2u_1), toOperatorSet(getAllOperators($this$updateContext.f2u_1, [$this$updateContext.h2u_1])));
1186
+ }
1187
+ function MutableClassicSolver$assertA$lambda($clause) {
1188
+ return function ($this$updateContext) {
1189
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, $this$updateContext.i2u_1.c1p($clause), $this$updateContext.j2u_1.plusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause)))));
1190
+ };
1191
+ }
1192
+ function MutableClassicSolver$assertA$lambda_0($fact) {
1193
+ return function ($this$updateContext) {
1194
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, $this$updateContext.i2u_1.b1q($fact));
1195
+ };
1196
+ }
1197
+ function MutableClassicSolver$assertZ$lambda($clause) {
1198
+ return function ($this$updateContext) {
1199
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, $this$updateContext.i2u_1.g1p($clause), $this$updateContext.j2u_1.plusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause)))));
1200
+ };
1201
+ }
1202
+ function MutableClassicSolver$assertZ$lambda_0($fact) {
1203
+ return function ($this$updateContext) {
1204
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, $this$updateContext.i2u_1.c1q($fact));
1205
+ };
1206
+ }
1207
+ function MutableClassicSolver$retract$lambda($result, $clause) {
1208
+ return function ($this$updateContext) {
1209
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, $result.u1o().toMutableTheory(), $this$updateContext.j2u_1.minusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause)))));
1210
+ };
1211
+ }
1212
+ function MutableClassicSolver$retract$lambda_0($result) {
1213
+ return function ($this$updateContext) {
1214
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, $result.u1o().toMutableTheory());
1215
+ };
1216
+ }
1217
+ function MutableClassicSolver$retractAll$lambda($result) {
1218
+ return function ($this$updateContext) {
1219
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, $result.u1o().toMutableTheory(), $this$updateContext.j2u_1.minusOperatorSet(toOperatorSet(getAllOperators_0($result.u1o()))));
1220
+ };
1221
+ }
1222
+ function MutableClassicSolver$retractAll$lambda_0($result) {
1223
+ return function ($this$updateContext) {
1224
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, $result.u1o().toMutableTheory());
1225
+ };
1226
+ }
1227
+ function MutableClassicSolver$setFlag$lambda($name, $value) {
1228
+ return function ($this$updateContext) {
1229
+ return $this$updateContext.u2v(VOID, VOID, VOID, $this$updateContext.g2u_1.set($name, $value));
1230
+ };
1231
+ }
1232
+ function MutableClassicSolver$setFlag$lambda_0($flag) {
1233
+ return function ($this$updateContext) {
1234
+ return $this$updateContext.u2v(VOID, VOID, VOID, $this$updateContext.g2u_1.plusPair($flag));
1235
+ };
1236
+ }
1237
+ function MutableClassicSolver$setFlag$lambda_1($flag) {
1238
+ return function ($this$updateContext) {
1239
+ return $this$updateContext.u2v(VOID, VOID, VOID, $this$updateContext.g2u_1.plusNotable($flag));
1240
+ };
1241
+ }
1242
+ function MutableClassicSolver$setStandardInput$lambda($stdIn) {
1243
+ return function ($this$updateContext) {
1244
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this$updateContext.k2u_1.plus(to('stdin', $stdIn)));
1245
+ };
1246
+ }
1247
+ function MutableClassicSolver$setStandardError$lambda($stdErr) {
1248
+ return function ($this$updateContext) {
1249
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this$updateContext.l2u_1.plus(to('stderr', $stdErr)));
1250
+ };
1251
+ }
1252
+ function MutableClassicSolver$setStandardOutput$lambda($stdOut) {
1253
+ return function ($this$updateContext) {
1254
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this$updateContext.l2u_1.plus(to('stdout', $stdOut)));
1255
+ };
1256
+ }
1257
+ function MutableClassicSolver$setWarnings$lambda($warnings) {
1258
+ return function ($this$updateContext) {
1259
+ return $this$updateContext.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_instance_5.p1v($this$updateContext.l2u_1, $warnings));
1260
+ };
1261
+ }
1262
+ protoOf(MutableClassicSolver).a2y = function (library) {
1263
+ this.j27(MutableClassicSolver$loadLibrary$lambda(library));
1264
+ };
1265
+ protoOf(MutableClassicSolver).loadLibrary = function (library) {
1266
+ return this.a2y(library);
1267
+ };
1268
+ protoOf(MutableClassicSolver).b2y = function (library) {
1269
+ this.j27(MutableClassicSolver$unloadLibrary$lambda(library));
1270
+ };
1271
+ protoOf(MutableClassicSolver).unloadLibrary = function (library) {
1272
+ return this.b2y(library);
1273
+ };
1274
+ protoOf(MutableClassicSolver).c2y = function (libraries) {
1275
+ this.j27(MutableClassicSolver$setRuntime$lambda(libraries));
1276
+ };
1277
+ protoOf(MutableClassicSolver).setLibraries = function (libraries) {
1278
+ return this.c2y(libraries);
1279
+ };
1280
+ protoOf(MutableClassicSolver).d2y = function (theory) {
1281
+ this.n27(theory, VOID, false);
1282
+ };
1283
+ protoOf(MutableClassicSolver).loadStaticKb = function (theory) {
1284
+ return this.d2y(theory);
1285
+ };
1286
+ protoOf(MutableClassicSolver).e2y = function (theory) {
1287
+ this.n27(theory);
1288
+ };
1289
+ protoOf(MutableClassicSolver).appendStaticKb = function (theory) {
1290
+ return this.e2y(theory);
1291
+ };
1292
+ protoOf(MutableClassicSolver).f2y = function () {
1293
+ this.j27(MutableClassicSolver$resetStaticKb$lambda);
1294
+ };
1295
+ protoOf(MutableClassicSolver).resetStaticKb = function () {
1296
+ return this.f2y();
1297
+ };
1298
+ protoOf(MutableClassicSolver).g2y = function (theory) {
1299
+ this.n27(VOID, theory, VOID, false);
1300
+ };
1301
+ protoOf(MutableClassicSolver).loadDynamicKb = function (theory) {
1302
+ return this.g2y(theory);
1303
+ };
1304
+ protoOf(MutableClassicSolver).h2y = function (theory) {
1305
+ this.n27(VOID, theory);
1306
+ };
1307
+ protoOf(MutableClassicSolver).appendDynamicKb = function (theory) {
1308
+ return this.h2y(theory);
1309
+ };
1310
+ protoOf(MutableClassicSolver).i2y = function () {
1311
+ this.j27(MutableClassicSolver$resetDynamicKb$lambda);
1312
+ };
1313
+ protoOf(MutableClassicSolver).resetDynamicKb = function () {
1314
+ return this.i2y();
1315
+ };
1316
+ protoOf(MutableClassicSolver).j1j = function (clause) {
1317
+ this.j27(MutableClassicSolver$assertA$lambda(clause));
1318
+ };
1319
+ protoOf(MutableClassicSolver).assertA = function (clause) {
1320
+ return this.j1j(clause);
1321
+ };
1322
+ protoOf(MutableClassicSolver).j2y = function (fact) {
1323
+ this.j27(MutableClassicSolver$assertA$lambda_0(fact));
1324
+ };
1325
+ protoOf(MutableClassicSolver).assertAFact = function (fact) {
1326
+ return this.j2y(fact);
1327
+ };
1328
+ protoOf(MutableClassicSolver).k1i = function (clause) {
1329
+ this.j27(MutableClassicSolver$assertZ$lambda(clause));
1330
+ };
1331
+ protoOf(MutableClassicSolver).assertZ = function (clause) {
1332
+ return this.k1i(clause);
1333
+ };
1334
+ protoOf(MutableClassicSolver).k2y = function (fact) {
1335
+ this.j27(MutableClassicSolver$assertZ$lambda_0(fact));
1336
+ };
1337
+ protoOf(MutableClassicSolver).assertZFact = function (fact) {
1338
+ return this.k2y(fact);
1339
+ };
1340
+ protoOf(MutableClassicSolver).d1q = function (clause) {
1341
+ var result = this.x1r().retract(clause);
1342
+ this.j27(MutableClassicSolver$retract$lambda(result, clause));
1343
+ return result;
1344
+ };
1345
+ protoOf(MutableClassicSolver).retract = function (clause) {
1346
+ return this.d1q(clause);
1347
+ };
1348
+ protoOf(MutableClassicSolver).e1q = function (fact) {
1349
+ var result = this.x1r().retractByHead(fact);
1350
+ this.j27(MutableClassicSolver$retract$lambda_0(result));
1351
+ return result;
1352
+ };
1353
+ protoOf(MutableClassicSolver).retractByHead = function (fact) {
1354
+ return this.e1q(fact);
1355
+ };
1356
+ protoOf(MutableClassicSolver).p1i = function (clause) {
1357
+ var result = this.x1r().retractAll(clause);
1358
+ this.j27(MutableClassicSolver$retractAll$lambda(result));
1359
+ return result;
1360
+ };
1361
+ protoOf(MutableClassicSolver).retractAll = function (clause) {
1362
+ return this.p1i(clause);
1363
+ };
1364
+ protoOf(MutableClassicSolver).l2y = function (fact) {
1365
+ var result = this.x1r().retractAllByHead(fact);
1366
+ this.j27(MutableClassicSolver$retractAll$lambda_0(result));
1367
+ return result;
1368
+ };
1369
+ protoOf(MutableClassicSolver).retractAllBeHead = function (fact) {
1370
+ return this.l2y(fact);
1371
+ };
1372
+ protoOf(MutableClassicSolver).m2y = function (name, value) {
1373
+ this.j27(MutableClassicSolver$setFlag$lambda(name, value));
1374
+ };
1375
+ protoOf(MutableClassicSolver).setFlag = function (name, value) {
1376
+ return this.m2y(name, value);
1377
+ };
1378
+ protoOf(MutableClassicSolver).n2y = function (flag) {
1379
+ this.j27(MutableClassicSolver$setFlag$lambda_0(flag));
1380
+ };
1381
+ protoOf(MutableClassicSolver).setFlagPair = function (flag) {
1382
+ return this.n2y(flag);
1383
+ };
1384
+ protoOf(MutableClassicSolver).o2y = function (flag) {
1385
+ this.j27(MutableClassicSolver$setFlag$lambda_1(flag));
1386
+ };
1387
+ protoOf(MutableClassicSolver).setFlagNotable = function (flag) {
1388
+ return this.o2y(flag);
1389
+ };
1390
+ protoOf(MutableClassicSolver).p2y = function (stdIn) {
1391
+ this.j27(MutableClassicSolver$setStandardInput$lambda(stdIn));
1392
+ };
1393
+ protoOf(MutableClassicSolver).setStandardInput = function (stdIn) {
1394
+ return this.p2y(stdIn);
1395
+ };
1396
+ protoOf(MutableClassicSolver).q2y = function (stdErr) {
1397
+ this.j27(MutableClassicSolver$setStandardError$lambda(stdErr));
1398
+ };
1399
+ protoOf(MutableClassicSolver).setStandardError = function (stdErr) {
1400
+ return this.q2y(stdErr);
1401
+ };
1402
+ protoOf(MutableClassicSolver).r2y = function (stdOut) {
1403
+ this.j27(MutableClassicSolver$setStandardOutput$lambda(stdOut));
1404
+ };
1405
+ protoOf(MutableClassicSolver).setStandardOutput = function (stdOut) {
1406
+ return this.r2y(stdOut);
1407
+ };
1408
+ protoOf(MutableClassicSolver).s2y = function (warnings) {
1409
+ this.j27(MutableClassicSolver$setWarnings$lambda(warnings));
1410
+ };
1411
+ protoOf(MutableClassicSolver).setWarnings = function (warnings) {
1412
+ return this.s2y(warnings);
1413
+ };
1414
+ protoOf(MutableClassicSolver).e1u = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
1415
+ return MutableClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
1416
+ };
1417
+ protoOf(MutableClassicSolver).copy = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
1418
+ return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof MutableClassicSolver) ? $super : THROW_CCE());
1419
+ };
1420
+ protoOf(MutableClassicSolver).m1p = function () {
1421
+ return this.copy();
1422
+ };
1423
+ protoOf(MutableClassicSolver).clone = function () {
1424
+ return this.m1p();
1425
+ };
1426
+ function MutableClassicSolver() {
1427
+ }
1428
+ function SolutionIterator$Companion$of$lambda(_unused_var__etf5q3, _unused_var__etf5q3_0, _unused_var__etf5q3_1) {
1429
+ return Unit_instance;
1430
+ }
1431
+ function Companion() {
1432
+ }
1433
+ protoOf(Companion).y2x = function (initialState, onStateTransition) {
1434
+ return new SimpleSolutionIterator(initialState, onStateTransition);
1435
+ };
1436
+ protoOf(Companion).of = function (initialState, onStateTransition, $super) {
1437
+ var tmp;
1438
+ if (onStateTransition === VOID) {
1439
+ tmp = SolutionIterator$Companion$of$lambda;
1440
+ } else {
1441
+ tmp = onStateTransition;
1442
+ }
1443
+ onStateTransition = tmp;
1444
+ return $super === VOID ? this.y2x(initialState, onStateTransition) : $super.y2x.call(this, initialState, onStateTransition);
1445
+ };
1446
+ var Companion_instance_15;
1447
+ function Companion_getInstance_5() {
1448
+ return Companion_instance_15;
1449
+ }
1450
+ function AbstractEndState(solution, context) {
1451
+ AbstractState.call(this, context);
1452
+ this.v2y_1 = solution;
1453
+ this.w2y_1 = context;
1454
+ }
1455
+ protoOf(AbstractEndState).j2e = function () {
1456
+ return this.v2y_1;
1457
+ };
1458
+ protoOf(AbstractEndState).m8 = function () {
1459
+ return this.w2y_1;
1460
+ };
1461
+ protoOf(AbstractEndState).x2y = function () {
1462
+ throw NoSuchElementException_init_$Create$();
1463
+ };
1464
+ protoOf(AbstractEndState).asEndState = function () {
1465
+ return this.f2z();
1466
+ };
1467
+ function AbstractState$executionTime$delegate$lambda(this$0) {
1468
+ return function () {
1469
+ return this$0.c2z();
1470
+ };
1471
+ }
1472
+ function AbstractState$_get_executionTime_$ref_gwd5wm() {
1473
+ return constructCallableReference(function (p0) {
1474
+ return p0.a2z();
1475
+ }, 1, 0, 87);
1476
+ }
1477
+ function AbstractState(context) {
1478
+ this.y2y_1 = context;
1479
+ var tmp = this;
1480
+ tmp.z2y_1 = lazy(AbstractState$executionTime$delegate$lambda(this));
1481
+ }
1482
+ protoOf(AbstractState).m8 = function () {
1483
+ return this.y2y_1;
1484
+ };
1485
+ protoOf(AbstractState).a2z = function () {
1486
+ var tmp0 = this.z2y_1;
1487
+ var tmp = KProperty1;
1488
+ // Inline function 'kotlin.getValue' call
1489
+ getPropertyCallableRef('executionTime', 1, tmp, AbstractState$_get_executionTime_$ref_gwd5wm(), null);
1490
+ return tmp0.c2();
1491
+ };
1492
+ protoOf(AbstractState).b2z = function () {
1493
+ return compare(subtract(this.a2z(), this.m8().s2u_1), this.m8().t2u_1) > 0;
1494
+ };
1495
+ protoOf(AbstractState).q = function () {
1496
+ var tmp;
1497
+ if (this.b2z()) {
1498
+ var tmp0_exceededDuration = this.m8().t2u_1;
1499
+ var tmp1_context = this.m8();
1500
+ tmp = new StateHalt(TimeOutException_init_$Create$(VOID, VOID, tmp1_context, tmp0_exceededDuration), this.m8().u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.d2z()));
1501
+ } else {
1502
+ tmp = this.x2y();
1503
+ }
1504
+ return tmp;
1505
+ };
1506
+ protoOf(AbstractState).next = function () {
1507
+ return this.q();
1508
+ };
1509
+ protoOf(AbstractState).c2z = function () {
1510
+ return currentTimeInstant();
1511
+ };
1512
+ protoOf(AbstractState).d2z = function () {
1513
+ // Inline function 'kotlin.Long.plus' call
1514
+ var this_0 = this.m8().x2u_1;
1515
+ return add(this_0, fromInt(1));
1516
+ };
1517
+ protoOf(AbstractState).h2z = function (_this__u8e3s4) {
1518
+ var tmp0 = _this__u8e3s4.z2u_1;
1519
+ var tmp$ret$0;
1520
+ $l$block: {
1521
+ // Inline function 'kotlin.sequences.first' call
1522
+ var _iterator__ex2g4s = tmp0.m();
1523
+ while (_iterator__ex2g4s.p()) {
1524
+ var element = _iterator__ex2g4s.q();
1525
+ var tmp0_safe_receiver = element.d2u_1;
1526
+ var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ht();
1527
+ // Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
1528
+ if (!(tmp === Throw_getInstance().signature.name)) {
1529
+ tmp$ret$0 = element;
1530
+ break $l$block;
1531
+ }
1532
+ }
1533
+ throw NoSuchElementException_init_$Create$_0('Sequence contains no element matching the predicate.');
1534
+ }
1535
+ return tmp$ret$0;
1536
+ };
1537
+ function EndState() {
1538
+ }
1539
+ function State() {
1540
+ }
1541
+ function StateBacktracking(context) {
1542
+ AbstractState.call(this, context);
1543
+ this.k2z_1 = context;
1544
+ }
1545
+ protoOf(StateBacktracking).m8 = function () {
1546
+ return this.k2z_1;
1547
+ };
1548
+ protoOf(StateBacktracking).x2y = function () {
1549
+ var choicePoints = this.k2z_1.u2u_1;
1550
+ var tmp;
1551
+ // Inline function 'kotlin.let' call
1552
+ if (choicePoints === null || !choicePoints.b2w()) {
1553
+ tmp = new StateEnd(Companion_instance_8.no(this.k2z_1.o2u_1), this.k2z_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.d2z()));
1554
+ } else {
1555
+ var tmp0 = ensureNotNull(choicePoints).c2w();
1556
+ var tmp$ret$2;
1557
+ $l$block: {
1558
+ // Inline function 'kotlin.sequences.first' call
1559
+ var _iterator__ex2g4s = tmp0.m();
1560
+ while (_iterator__ex2g4s.p()) {
1561
+ var element = _iterator__ex2g4s.q();
1562
+ if (element.o2v().to()) {
1563
+ tmp$ret$2 = element;
1564
+ break $l$block;
1565
+ }
1566
+ }
1567
+ throw NoSuchElementException_init_$Create$_0('Sequence contains no element matching the predicate.');
1568
+ }
1569
+ var choicePointContext = tmp$ret$2;
1570
+ var nextContext = choicePointContext.t2v(this.k2z_1);
1571
+ var tmp_0;
1572
+ if (nextContext.r2u_1.to()) {
1573
+ tmp_0 = new StatePrimitiveExecution(nextContext);
1574
+ } else {
1575
+ tmp_0 = new StateRuleExecution(nextContext);
1576
+ }
1577
+ tmp = tmp_0;
1578
+ }
1579
+ return tmp;
1580
+ };
1581
+ protoOf(StateBacktracking).g2z = function (context) {
1582
+ return this.l2z(context);
1583
+ };
1584
+ protoOf(StateBacktracking).clone = function (context, $super) {
1585
+ return this.clone(context, ($super == null ? true : $super instanceof StateBacktracking) ? $super : THROW_CCE());
1586
+ };
1587
+ protoOf(StateBacktracking).l2z = function (context) {
1588
+ return new StateBacktracking(context);
1589
+ };
1590
+ protoOf(StateBacktracking).toString = function () {
1591
+ return 'StateBacktracking(context=' + this.k2z_1.toString() + ')';
1592
+ };
1593
+ protoOf(StateBacktracking).hashCode = function () {
1594
+ return this.k2z_1.hashCode();
1595
+ };
1596
+ protoOf(StateBacktracking).equals = function (other) {
1597
+ if (this === other)
1598
+ return true;
1599
+ if (!(other instanceof StateBacktracking))
1600
+ return false;
1601
+ if (!this.k2z_1.equals(other.k2z_1))
1602
+ return false;
1603
+ return true;
1604
+ };
1605
+ function StateEnd(solution, context) {
1606
+ AbstractEndState.call(this, solution, context);
1607
+ this.q2z_1 = solution;
1608
+ this.r2z_1 = context;
1609
+ }
1610
+ protoOf(StateEnd).j2e = function () {
1611
+ return this.q2z_1;
1612
+ };
1613
+ protoOf(StateEnd).m8 = function () {
1614
+ return this.r2z_1;
1615
+ };
1616
+ protoOf(StateEnd).b2z = function () {
1617
+ return false;
1618
+ };
1619
+ protoOf(StateEnd).x2y = function () {
1620
+ var tmp;
1621
+ if (this.r2z_1.b2w()) {
1622
+ var tmp0_$this = this.r2z_1;
1623
+ var tmp1_step = this.d2z();
1624
+ var tmp2_startTime = this.c2z();
1625
+ tmp = new StateBacktracking(tmp0_$this.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_startTime, VOID, VOID, VOID, VOID, tmp1_step));
1626
+ } else {
1627
+ tmp = protoOf(AbstractEndState).x2y.call(this);
1628
+ }
1629
+ return tmp;
1630
+ };
1631
+ protoOf(StateEnd).g2z = function (context) {
1632
+ return this.s2z(this.q2z_1, context);
1633
+ };
1634
+ protoOf(StateEnd).clone = function (context, $super) {
1635
+ return this.clone(context, ($super == null ? true : $super instanceof StateEnd) ? $super : THROW_CCE());
1636
+ };
1637
+ protoOf(StateEnd).s2z = function (solution, context) {
1638
+ return new StateEnd(solution, context);
1639
+ };
1640
+ protoOf(StateEnd).toString = function () {
1641
+ return 'StateEnd(solution=' + toString(this.q2z_1) + ', context=' + this.r2z_1.toString() + ')';
1642
+ };
1643
+ protoOf(StateEnd).hashCode = function () {
1644
+ var result = hashCode(this.q2z_1);
1645
+ result = imul(result, 31) + this.r2z_1.hashCode() | 0;
1646
+ return result;
1647
+ };
1648
+ protoOf(StateEnd).equals = function (other) {
1649
+ if (this === other)
1650
+ return true;
1651
+ if (!(other instanceof StateEnd))
1652
+ return false;
1653
+ if (!equals(this.q2z_1, other.q2z_1))
1654
+ return false;
1655
+ if (!this.r2z_1.equals(other.r2z_1))
1656
+ return false;
1657
+ return true;
1658
+ };
1659
+ protoOf(StateEnd).asEndState = function () {
1660
+ return this.f2z();
1661
+ };
1662
+ function isCatch($this, $receiver) {
1663
+ var tmp;
1664
+ if ($receiver.bt() === 3) {
1665
+ var tmp_0 = $receiver.ht();
1666
+ // Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
1667
+ tmp = tmp_0 === Catch_getInstance().signature.name;
1668
+ } else {
1669
+ tmp = false;
1670
+ }
1671
+ return tmp;
1672
+ }
1673
+ function getExceptionContent($this, $receiver) {
1674
+ var tmp;
1675
+ if ($receiver instanceof MessageError) {
1676
+ tmp = $receiver.c23();
1677
+ } else {
1678
+ tmp = $receiver.e21();
1679
+ }
1680
+ return tmp;
1681
+ }
1682
+ function toPublicException($this, $receiver) {
1683
+ var tmp;
1684
+ if ($receiver instanceof MessageError) {
1685
+ tmp = Companion_instance_9.forUncaughtError($receiver);
1686
+ } else {
1687
+ tmp = $receiver;
1688
+ }
1689
+ return tmp;
1690
+ }
1691
+ function _get_finalState__3aigq8($this) {
1692
+ return new StateHalt(toPublicException($this, $this.v2z_1), $this.w2z_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.d2z()));
1693
+ }
1694
+ function _get_handleExceptionInParentContext__yj3v4e($this) {
1695
+ return new StateException($this.v2z_1, ensureNotNull($this.w2z_1.v2u_1).u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.d2z()));
1696
+ }
1697
+ function handleStruct($this, unificator, catchGoal, error) {
1698
+ var tmp;
1699
+ if (isCatch($this, catchGoal)) {
1700
+ var catcher = unificator.mgu(catchGoal.get(1), getExceptionContent($this, error));
1701
+ tmp = handleCatch($this, catchGoal, catcher);
1702
+ } else if ($this.w2z_1.r2x()) {
1703
+ tmp = _get_finalState__3aigq8($this);
1704
+ } else {
1705
+ tmp = _get_handleExceptionInParentContext__yj3v4e($this);
1706
+ }
1707
+ return tmp;
1708
+ }
1709
+ function handleCatch($this, catchGoal, catcher) {
1710
+ var tmp;
1711
+ if (catcher.lz()) {
1712
+ var tmp_0 = $this.w2z_1.n2u_1.plus(catcher);
1713
+ var newSubstitution = tmp_0.filterEntry(StateException$handleCatch$lambda($this));
1714
+ var subGoals = catchGoal.get(2).getSubstituted(newSubstitution, []);
1715
+ var newGoals = plus_0(toGoals(subGoals), $this.w2z_1.p2u_1.ro());
1716
+ var tmp0_$this = $this.w2z_1;
1717
+ var tmp1_rules = Companion_instance_7.empty();
1718
+ var tmp2_primitives = Companion_instance_7.empty();
1719
+ var tmp3_substitution = newSubstitution.castToUnifier();
1720
+ var tmp4_step = $this.d2z();
1721
+ tmp = new StateGoalSelection(tmp0_$this.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_substitution, VOID, newGoals, tmp1_rules, tmp2_primitives, VOID, VOID, VOID, VOID, VOID, tmp4_step));
1722
+ } else if ($this.w2z_1.r2x()) {
1723
+ tmp = _get_finalState__3aigq8($this);
1724
+ } else {
1725
+ tmp = _get_handleExceptionInParentContext__yj3v4e($this);
1726
+ }
1727
+ return tmp;
1728
+ }
1729
+ function StateException$handleCatch$lambda(this$0) {
1730
+ return function (_destruct__k2r9zo) {
1731
+ // Inline function 'kotlin.collections.component1' call
1732
+ var it = _destruct__k2r9zo.b2();
1733
+ return this$0.w2z_1.s2x(it);
1734
+ };
1735
+ }
1736
+ function StateException(exception, context) {
1737
+ AbstractState.call(this, context);
1738
+ this.v2z_1 = exception;
1739
+ this.w2z_1 = context;
1740
+ }
1741
+ protoOf(StateException).m8 = function () {
1742
+ return this.w2z_1;
1743
+ };
1744
+ protoOf(StateException).x2y = function () {
1745
+ var tmp;
1746
+ if (this.v2z_1 instanceof LogicError) {
1747
+ var catchGoal = ensureNotNull(this.w2z_1.p2x());
1748
+ tmp = catchGoal.nt() ? handleStruct(this, this.w2z_1.e2u_1, catchGoal.castToStruct(), this.v2z_1) : this.w2z_1.r2x() ? _get_finalState__3aigq8(this) : _get_handleExceptionInParentContext__yj3v4e(this);
1749
+ } else {
1750
+ tmp = _get_finalState__3aigq8(this);
1751
+ }
1752
+ return tmp;
1753
+ };
1754
+ protoOf(StateException).g2z = function (context) {
1755
+ return this.x2z(this.v2z_1, context);
1756
+ };
1757
+ protoOf(StateException).clone = function (context, $super) {
1758
+ return this.clone(context, ($super == null ? true : $super instanceof StateException) ? $super : THROW_CCE());
1759
+ };
1760
+ protoOf(StateException).x2z = function (exception, context) {
1761
+ return new StateException(exception, context);
1762
+ };
1763
+ protoOf(StateException).toString = function () {
1764
+ return 'StateException(exception=' + this.v2z_1.toString() + ', context=' + this.w2z_1.toString() + ')';
1765
+ };
1766
+ protoOf(StateException).hashCode = function () {
1767
+ var result = hashCode(this.v2z_1);
1768
+ result = imul(result, 31) + this.w2z_1.hashCode() | 0;
1769
+ return result;
1770
+ };
1771
+ protoOf(StateException).equals = function (other) {
1772
+ if (this === other)
1773
+ return true;
1774
+ if (!(other instanceof StateException))
1775
+ return false;
1776
+ if (!equals(this.v2z_1, other.v2z_1))
1777
+ return false;
1778
+ if (!this.w2z_1.equals(other.w2z_1))
1779
+ return false;
1780
+ return true;
1781
+ };
1782
+ function StateGoalSelection$computeNext$lambda(this$0) {
1783
+ return function (_destruct__k2r9zo) {
1784
+ // Inline function 'kotlin.collections.component1' call
1785
+ var it = _destruct__k2r9zo.b2();
1786
+ return this$0.a30_1.s2x(it);
1787
+ };
1788
+ }
1789
+ function StateGoalSelection(context) {
1790
+ AbstractState.call(this, context);
1791
+ this.a30_1 = context;
1792
+ }
1793
+ protoOf(StateGoalSelection).m8 = function () {
1794
+ return this.a30_1;
1795
+ };
1796
+ protoOf(StateGoalSelection).x2y = function () {
1797
+ var tmp;
1798
+ if (this.a30_1.p2u_1.uo()) {
1799
+ var tmp_0;
1800
+ if (this.a30_1.r2x()) {
1801
+ tmp_0 = new StateEnd(Companion_instance_8.f1t(this.a30_1.o2u_1, this.a30_1.n2u_1), this.a30_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.d2z()));
1802
+ } else {
1803
+ // Inline function 'kotlin.let' call
1804
+ var it = ensureNotNull(this.a30_1.v2u_1);
1805
+ var tmp0_choicePoints = this.a30_1.u2u_1;
1806
+ var tmp1_flags = this.a30_1.g2u_1;
1807
+ var tmp2_dynamicKb = this.a30_1.i2u_1;
1808
+ var tmp3_staticKb = this.a30_1.h2u_1;
1809
+ var tmp4_substitution = this.a30_1.n2u_1.fz(StateGoalSelection$computeNext$lambda(this));
1810
+ var tmp5_goals = it.p2u_1.ro();
1811
+ var tmp6_procedure = it.d2u_1;
1812
+ var tmp7_step = this.d2z();
1813
+ var tmp8_startTime = this.a30_1.s2u_1;
1814
+ var tmp9_operators = this.a30_1.j2u_1;
1815
+ var tmp10_inputChannels = this.a30_1.k2u_1;
1816
+ var tmp11_outputChannels = this.a30_1.l2u_1;
1817
+ var tmp12_libraries = this.a30_1.f2u_1;
1818
+ var tmp13_customData = this.a30_1.m2u_1;
1819
+ var tmp$ret$0 = it.u2v(tmp6_procedure, VOID, tmp12_libraries, tmp1_flags, tmp3_staticKb, tmp2_dynamicKb, tmp9_operators, tmp10_inputChannels, tmp11_outputChannels, tmp13_customData, tmp4_substitution, VOID, tmp5_goals, VOID, VOID, tmp8_startTime, VOID, tmp0_choicePoints, VOID, VOID, tmp7_step);
1820
+ tmp_0 = new StateGoalSelection(tmp$ret$0);
1821
+ }
1822
+ tmp = tmp_0;
1823
+ } else if (equals(this.a30_1.g2u_1.get(TrackVariables_getInstance()), TrackVariables_getInstance().j25_1)) {
1824
+ tmp = new StatePrimitiveSelection(this.a30_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.d2z(), plus_1(this.a30_1.y2u_1, toSet(ensureNotNull(this.a30_1.p2u_1.so()).jt()))));
1825
+ } else {
1826
+ tmp = new StatePrimitiveSelection(this.a30_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.d2z()));
1827
+ }
1828
+ return tmp;
1829
+ };
1830
+ protoOf(StateGoalSelection).g2z = function (context) {
1831
+ return this.l2z(context);
1832
+ };
1833
+ protoOf(StateGoalSelection).clone = function (context, $super) {
1834
+ return this.clone(context, ($super == null ? true : $super instanceof StateGoalSelection) ? $super : THROW_CCE());
1835
+ };
1836
+ protoOf(StateGoalSelection).l2z = function (context) {
1837
+ return new StateGoalSelection(context);
1838
+ };
1839
+ protoOf(StateGoalSelection).toString = function () {
1840
+ return 'StateGoalSelection(context=' + this.a30_1.toString() + ')';
1841
+ };
1842
+ protoOf(StateGoalSelection).hashCode = function () {
1843
+ return this.a30_1.hashCode();
1844
+ };
1845
+ protoOf(StateGoalSelection).equals = function (other) {
1846
+ if (this === other)
1847
+ return true;
1848
+ if (!(other instanceof StateGoalSelection))
1849
+ return false;
1850
+ if (!this.a30_1.equals(other.a30_1))
1851
+ return false;
1852
+ return true;
1853
+ };
1854
+ function StateHalt(exception, context) {
1855
+ AbstractEndState.call(this, Companion_instance_8.halt(context.o2u_1, exception), context);
1856
+ this.f30_1 = exception;
1857
+ this.g30_1 = context;
1858
+ }
1859
+ protoOf(StateHalt).m8 = function () {
1860
+ return this.g30_1;
1861
+ };
1862
+ protoOf(StateHalt).g2z = function (context) {
1863
+ return this.x2z(this.f30_1, context);
1864
+ };
1865
+ protoOf(StateHalt).clone = function (context, $super) {
1866
+ return this.clone(context, ($super == null ? true : $super instanceof StateHalt) ? $super : THROW_CCE());
1867
+ };
1868
+ protoOf(StateHalt).x2z = function (exception, context) {
1869
+ return new StateHalt(exception, context);
1870
+ };
1871
+ protoOf(StateHalt).toString = function () {
1872
+ return 'StateHalt(exception=' + this.f30_1.toString() + ', context=' + this.g30_1.toString() + ')';
1873
+ };
1874
+ protoOf(StateHalt).hashCode = function () {
1875
+ var result = hashCode(this.f30_1);
1876
+ result = imul(result, 31) + this.g30_1.hashCode() | 0;
1877
+ return result;
1878
+ };
1879
+ protoOf(StateHalt).equals = function (other) {
1880
+ if (this === other)
1881
+ return true;
1882
+ if (!(other instanceof StateHalt))
1883
+ return false;
1884
+ if (!equals(this.f30_1, other.f30_1))
1885
+ return false;
1886
+ if (!this.g30_1.equals(other.g30_1))
1887
+ return false;
1888
+ return true;
1889
+ };
1890
+ protoOf(StateHalt).asEndState = function () {
1891
+ return this.f2z();
1892
+ };
1893
+ function StateInit(context) {
1894
+ AbstractState.call(this, context);
1895
+ this.j30_1 = context;
1896
+ }
1897
+ protoOf(StateInit).m8 = function () {
1898
+ return this.j30_1;
1899
+ };
1900
+ protoOf(StateInit).x2y = function () {
1901
+ var tmp0_$this = this.j30_1;
1902
+ var tmp1_goals = toGoals(this.j30_1.o2u_1);
1903
+ var tmp2_rules = Companion_instance_7.empty();
1904
+ var tmp3_primitives = Companion_instance_7.empty();
1905
+ var tmp4_substitution = Companion_getInstance_2().empty();
1906
+ var tmp5_customData = this.j30_1.m2u_1.preservePersistent();
1907
+ var tmp6_relevantVariables = emptySet();
1908
+ return new StateGoalSelection(appendRulesAndChoicePoints(tmp0_$this.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp5_customData, tmp4_substitution, VOID, tmp1_goals, tmp2_rules, tmp3_primitives, VOID, VOID, null, null, 0, new Long(1, 0), tmp6_relevantVariables), Companion_instance_7.empty()));
1909
+ };
1910
+ protoOf(StateInit).g2z = function (context) {
1911
+ return this.l2z(context);
1912
+ };
1913
+ protoOf(StateInit).clone = function (context, $super) {
1914
+ return this.clone(context, ($super == null ? true : $super instanceof StateInit) ? $super : THROW_CCE());
1915
+ };
1916
+ protoOf(StateInit).l2z = function (context) {
1917
+ return new StateInit(context);
1918
+ };
1919
+ protoOf(StateInit).toString = function () {
1920
+ return 'StateInit(context=' + this.j30_1.toString() + ')';
1921
+ };
1922
+ protoOf(StateInit).hashCode = function () {
1923
+ return this.j30_1.hashCode();
1924
+ };
1925
+ protoOf(StateInit).equals = function (other) {
1926
+ if (this === other)
1927
+ return true;
1928
+ if (!(other instanceof StateInit))
1929
+ return false;
1930
+ if (!this.j30_1.equals(other.j30_1))
1931
+ return false;
1932
+ return true;
1933
+ };
1934
+ function copyFromCurrentPrimitive($this, $receiver, goals, procedureFromAncestor, substitution) {
1935
+ goals = goals === VOID ? null : goals;
1936
+ procedureFromAncestor = procedureFromAncestor === VOID ? 0 : procedureFromAncestor;
1937
+ substitution = substitution === VOID ? null : substitution;
1938
+ var tmp0_safe_receiver = $receiver.r2u_1.so();
1939
+ var tmp;
1940
+ if (tmp0_safe_receiver == null) {
1941
+ tmp = null;
1942
+ } else {
1943
+ // Inline function 'kotlin.let' call
1944
+ tmp = $receiver.u2x(tmp0_safe_receiver.sideEffects);
1945
+ }
1946
+ var tmp1_elvis_lhs = tmp;
1947
+ var ctx = tmp1_elvis_lhs == null ? $receiver : tmp1_elvis_lhs;
1948
+ var tmp4_goals = goals == null ? $receiver.p2u_1 : goals;
1949
+ var tmp_0 = drop($receiver.z2u_1, procedureFromAncestor);
1950
+ var tmp5_procedure = first(map(tmp_0, StatePrimitiveExecution$copyFromCurrentPrimitive$lambda));
1951
+ var tmp6_primitives = Companion_instance_7.empty();
1952
+ var tmp_1 = substitution == null ? $receiver.n2u_1 : substitution;
1953
+ var tmp7_substitution = isInterface(tmp_1, Unifier) ? tmp_1 : THROW_CCE();
1954
+ var tmp8_step = $this.d2z();
1955
+ return ctx.u2v(tmp5_procedure, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp7_substitution, VOID, tmp4_goals, VOID, tmp6_primitives, VOID, VOID, VOID, VOID, VOID, tmp8_step);
1956
+ }
1957
+ function StatePrimitiveExecution$copyFromCurrentPrimitive$lambda(it) {
1958
+ return it.d2u_1;
1959
+ }
1960
+ function StatePrimitiveExecution$computeNext$lambda(this$0) {
1961
+ return function (it) {
1962
+ return new StateGoalSelection(copyFromCurrentPrimitive(this$0, this$0.m30_1, this$0.m30_1.p2u_1.ro(), 1, this$0.m30_1.e2u_1.mergeWithOccurCheck(this$0.m30_1.n2u_1, it.q1r(), false)));
1963
+ };
1964
+ }
1965
+ function StatePrimitiveExecution$computeNext$lambda_0(this$0) {
1966
+ return function (it) {
1967
+ return new StateBacktracking(copyFromCurrentPrimitive(this$0, ensureNotNull(this$0.m30_1.v2u_1)));
1968
+ };
1969
+ }
1970
+ function StatePrimitiveExecution$computeNext$lambda_1(this$0) {
1971
+ return function (it) {
1972
+ return new StateException(it.v1s().updateLastContext(this$0.h2z(this$0.m30_1)), copyFromCurrentPrimitive(this$0, this$0.m30_1));
1973
+ };
1974
+ }
1975
+ function StatePrimitiveExecution$computeNext$lambda_2(it) {
1976
+ throw IllegalStateException_init_$Create$('This should never happen');
1977
+ }
1978
+ function StatePrimitiveExecution(context) {
1979
+ AbstractState.call(this, context);
1980
+ this.m30_1 = context;
1981
+ }
1982
+ protoOf(StatePrimitiveExecution).m8 = function () {
1983
+ return this.m30_1;
1984
+ };
1985
+ protoOf(StatePrimitiveExecution).x2y = function () {
1986
+ var tmp;
1987
+ try {
1988
+ var tmp0_safe_receiver = this.m30_1.r2u_1.so();
1989
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.solution;
1990
+ var tmp_0;
1991
+ if (tmp1_safe_receiver == null) {
1992
+ tmp_0 = null;
1993
+ } else {
1994
+ var tmp_1 = StatePrimitiveExecution$computeNext$lambda(this);
1995
+ var tmp_2 = StatePrimitiveExecution$computeNext$lambda_0(this);
1996
+ var tmp_3 = StatePrimitiveExecution$computeNext$lambda_1(this);
1997
+ tmp_0 = tmp1_safe_receiver.z1s(tmp_1, tmp_2, tmp_3, StatePrimitiveExecution$computeNext$lambda_2);
1998
+ }
1999
+ var tmp2_elvis_lhs = tmp_0;
2000
+ tmp = tmp2_elvis_lhs == null ? new StateBacktracking(copyFromCurrentPrimitive(this, this.m30_1)) : tmp2_elvis_lhs;
2001
+ } catch ($p) {
2002
+ var tmp_4;
2003
+ if ($p instanceof ResolutionException) {
2004
+ var exception = $p;
2005
+ tmp_4 = new StateException(exception.updateLastContext(this.h2z(this.m30_1)), this.m30_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.d2z()));
2006
+ } else {
2007
+ throw $p;
2008
+ }
2009
+ tmp = tmp_4;
2010
+ }
2011
+ return tmp;
2012
+ };
2013
+ protoOf(StatePrimitiveExecution).g2z = function (context) {
2014
+ return this.l2z(context);
2015
+ };
2016
+ protoOf(StatePrimitiveExecution).clone = function (context, $super) {
2017
+ return this.clone(context, ($super == null ? true : $super instanceof StatePrimitiveExecution) ? $super : THROW_CCE());
2018
+ };
2019
+ protoOf(StatePrimitiveExecution).l2z = function (context) {
2020
+ return new StatePrimitiveExecution(context);
2021
+ };
2022
+ protoOf(StatePrimitiveExecution).toString = function () {
2023
+ return 'StatePrimitiveExecution(context=' + this.m30_1.toString() + ')';
2024
+ };
2025
+ protoOf(StatePrimitiveExecution).hashCode = function () {
2026
+ return this.m30_1.hashCode();
2027
+ };
2028
+ protoOf(StatePrimitiveExecution).equals = function (other) {
2029
+ if (this === other)
2030
+ return true;
2031
+ if (!(other instanceof StatePrimitiveExecution))
2032
+ return false;
2033
+ if (!this.m30_1.equals(other.m30_1))
2034
+ return false;
2035
+ return true;
2036
+ };
2037
+ function exceptionalState($this, exception) {
2038
+ return new StateException(exception, $this.p30_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.d2z()));
2039
+ }
2040
+ function StatePrimitiveSelection(context) {
2041
+ AbstractState.call(this, context);
2042
+ this.p30_1 = context;
2043
+ }
2044
+ protoOf(StatePrimitiveSelection).m8 = function () {
2045
+ return this.p30_1;
2046
+ };
2047
+ protoOf(StatePrimitiveSelection).x2y = function () {
2048
+ // Inline function 'kotlin.with' call
2049
+ var $this$with = this.p30_1;
2050
+ var goal = ensureNotNull($this$with.p2x());
2051
+ var tmp;
2052
+ if (goal.du()) {
2053
+ tmp = exceptionalState(this, Companion_instance_11.forGoal(this.p30_1, extractSignature(ensureNotNull(this.p30_1.d2u_1)), goal.castToVar()));
2054
+ } else if (goal.nt()) {
2055
+ var goalStruct = goal.castToStruct();
2056
+ var signature = extractSignature(goalStruct);
2057
+ var tmp_0;
2058
+ if ($this$with.f2u_1.hasPrimitive(signature)) {
2059
+ var childContext = createChild($this$with);
2060
+ var tmp_1;
2061
+ try {
2062
+ var request = toRequest(childContext, goalStruct, signature, this.a2z());
2063
+ var tmp0_elvis_lhs = $this$with.f2u_1.h2a().f2(signature);
2064
+ var tmp_2;
2065
+ if (tmp0_elvis_lhs == null) {
2066
+ // Inline function 'kotlin.error' call
2067
+ var message = 'Inconsistent behaviour of Library.contains and Library.get';
2068
+ throw IllegalStateException_init_$Create$(toString(message));
2069
+ } else {
2070
+ tmp_2 = tmp0_elvis_lhs;
2071
+ }
2072
+ var primitive = tmp_2;
2073
+ var primitiveExecutions = cursor(primitive.solve(request));
2074
+ tmp_1 = new StatePrimitiveExecution(appendPrimitivesAndChoicePoints(childContext, primitiveExecutions));
2075
+ } catch ($p) {
2076
+ var tmp_3;
2077
+ if ($p instanceof ResolutionException) {
2078
+ var exception = $p;
2079
+ tmp_3 = exceptionalState(this, exception.updateLastContext(this.h2z(childContext)));
2080
+ } else {
2081
+ throw $p;
2082
+ }
2083
+ tmp_1 = tmp_3;
2084
+ }
2085
+ tmp_0 = tmp_1;
2086
+ } else {
2087
+ tmp_0 = new StateRuleSelection(this.p30_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.d2z()));
2088
+ }
2089
+ tmp = tmp_0;
2090
+ } else {
2091
+ var tmp_4 = Companion_instance_10;
2092
+ var tmp1_safe_receiver = this.p30_1.d2u_1;
2093
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : extractSignature(tmp1_safe_receiver);
2094
+ tmp = exceptionalState(this, tmp_4.forGoal(this.p30_1, tmp2_elvis_lhs == null ? new Signature('?-', 1) : tmp2_elvis_lhs, Expected_CALLABLE_getInstance(), goal));
2095
+ }
2096
+ return tmp;
2097
+ };
2098
+ protoOf(StatePrimitiveSelection).g2z = function (context) {
2099
+ return this.l2z(context);
2100
+ };
2101
+ protoOf(StatePrimitiveSelection).clone = function (context, $super) {
2102
+ return this.clone(context, ($super == null ? true : $super instanceof StatePrimitiveSelection) ? $super : THROW_CCE());
2103
+ };
2104
+ protoOf(StatePrimitiveSelection).l2z = function (context) {
2105
+ return new StatePrimitiveSelection(context);
2106
+ };
2107
+ protoOf(StatePrimitiveSelection).toString = function () {
2108
+ return 'StatePrimitiveSelection(context=' + this.p30_1.toString() + ')';
2109
+ };
2110
+ protoOf(StatePrimitiveSelection).hashCode = function () {
2111
+ return this.p30_1.hashCode();
2112
+ };
2113
+ protoOf(StatePrimitiveSelection).equals = function (other) {
2114
+ if (this === other)
2115
+ return true;
2116
+ if (!(other instanceof StatePrimitiveSelection))
2117
+ return false;
2118
+ if (!this.p30_1.equals(other.p30_1))
2119
+ return false;
2120
+ return true;
2121
+ };
2122
+ function _get_failureState__yid9tw($this) {
2123
+ return new StateBacktracking($this.s30_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_instance_7.empty(), VOID, VOID, VOID, VOID, VOID, VOID, $this.d2z()));
2124
+ }
2125
+ function StateRuleExecution(context) {
2126
+ AbstractState.call(this, context);
2127
+ this.s30_1 = context;
2128
+ }
2129
+ protoOf(StateRuleExecution).m8 = function () {
2130
+ return this.s30_1;
2131
+ };
2132
+ protoOf(StateRuleExecution).x2y = function () {
2133
+ // Inline function 'kotlin.with' call
2134
+ var $this$with = this.s30_1;
2135
+ var substitution = $this$with.e2u_1.mgu(ensureNotNull($this$with.p2x()), ensureNotNull($this$with.q2u_1.so()).nv());
2136
+ var tmp;
2137
+ if (substitution.lz()) {
2138
+ var newSubstitution = this.s30_1.n2u_1.plus(substitution).castToUnifier();
2139
+ var subGoals = prepareForExecutionWithUnifier(ensureNotNull(this.s30_1.q2u_1.so()), newSubstitution).ov().getSubstituted(newSubstitution, []);
2140
+ var tmp0_$this = this.s30_1;
2141
+ var tmp1_goals = toGoals(subGoals);
2142
+ var tmp2_rules = Companion_instance_7.empty();
2143
+ var tmp3_step = this.d2z();
2144
+ tmp = new StateGoalSelection(tmp0_$this.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, newSubstitution, VOID, tmp1_goals, tmp2_rules, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_step));
2145
+ } else {
2146
+ tmp = _get_failureState__yid9tw(this);
2147
+ }
2148
+ return tmp;
2149
+ };
2150
+ protoOf(StateRuleExecution).g2z = function (context) {
2151
+ return this.l2z(context);
2152
+ };
2153
+ protoOf(StateRuleExecution).clone = function (context, $super) {
2154
+ return this.clone(context, ($super == null ? true : $super instanceof StateRuleExecution) ? $super : THROW_CCE());
2155
+ };
2156
+ protoOf(StateRuleExecution).l2z = function (context) {
2157
+ return new StateRuleExecution(context);
2158
+ };
2159
+ protoOf(StateRuleExecution).toString = function () {
2160
+ return 'StateRuleExecution(context=' + this.s30_1.toString() + ')';
2161
+ };
2162
+ protoOf(StateRuleExecution).hashCode = function () {
2163
+ return this.s30_1.hashCode();
2164
+ };
2165
+ protoOf(StateRuleExecution).equals = function (other) {
2166
+ if (this === other)
2167
+ return true;
2168
+ if (!(other instanceof StateRuleExecution))
2169
+ return false;
2170
+ if (!this.s30_1.equals(other.s30_1))
2171
+ return false;
2172
+ return true;
2173
+ };
2174
+ function None() {
2175
+ None_instance = this;
2176
+ CutLimit.call(this);
2177
+ this.t30_1 = -1;
2178
+ this.u30_1 = null;
2179
+ }
2180
+ protoOf(None).v30 = function () {
2181
+ return this.t30_1;
2182
+ };
2183
+ protoOf(None).p1r = function () {
2184
+ return this.u30_1;
2185
+ };
2186
+ protoOf(None).w30 = function () {
2187
+ return true;
2188
+ };
2189
+ var None_instance;
2190
+ function None_getInstance() {
2191
+ if (None_instance == null)
2192
+ new None();
2193
+ return None_instance;
2194
+ }
2195
+ function Actual(depthToCut, procedure) {
2196
+ CutLimit.call(this);
2197
+ this.x30_1 = depthToCut;
2198
+ this.y30_1 = procedure;
2199
+ }
2200
+ protoOf(Actual).v30 = function () {
2201
+ return this.x30_1;
2202
+ };
2203
+ protoOf(Actual).p1r = function () {
2204
+ return this.y30_1;
2205
+ };
2206
+ function CutLimit() {
2207
+ }
2208
+ protoOf(CutLimit).w30 = function () {
2209
+ return false;
2210
+ };
2211
+ function Companion_0() {
2212
+ Companion_instance_16 = this;
2213
+ this.z30_1 = Catch_getInstance().signature;
2214
+ this.a31_1 = setOf([new Signature(',', 2), new Signature(';', 2), new Signature('->', 2)]);
2215
+ }
2216
+ var Companion_instance_16;
2217
+ function Companion_getInstance_6() {
2218
+ if (Companion_instance_16 == null)
2219
+ new Companion_0();
2220
+ return Companion_instance_16;
2221
+ }
2222
+ function _get_failureState__yid9tw_0($this) {
2223
+ return new StateBacktracking($this.d31_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.d2z()));
2224
+ }
2225
+ function exceptionalState_0($this, exception) {
2226
+ return new StateException(exception, $this.d31_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.d2z()));
2227
+ }
2228
+ function missingProcedure($this, ruleSources, missing) {
2229
+ var unknown = $this.d31_1.g2u_1.get(Unknown_getInstance());
2230
+ var tmp;
2231
+ if (equals(unknown, Unknown_getInstance().p25_1)) {
2232
+ tmp = _get_failureState__yid9tw_0($this);
2233
+ } else {
2234
+ var tmp_0;
2235
+ var tmp$ret$0;
2236
+ $l$block: {
2237
+ // Inline function 'kotlin.sequences.none' call
2238
+ var _iterator__ex2g4s = ruleSources.m();
2239
+ while (_iterator__ex2g4s.p()) {
2240
+ var element = _iterator__ex2g4s.q();
2241
+ if (element.containsIndicator(missing.toIndicator())) {
2242
+ tmp$ret$0 = false;
2243
+ break $l$block;
2244
+ }
2245
+ }
2246
+ tmp$ret$0 = true;
2247
+ }
2248
+ if (tmp$ret$0) {
2249
+ var tmp_1;
2250
+ if (equals(unknown, Unknown_getInstance().n25_1)) {
2251
+ tmp_1 = exceptionalState_0($this, Companion_instance_12.forProcedure($this.d31_1, missing));
2252
+ } else if (equals(unknown, Unknown_getInstance().o25_1)) {
2253
+ // Inline function 'kotlin.also' call
2254
+ var this_0 = _get_failureState__yid9tw_0($this);
2255
+ $this.d31_1.h1s().write(MissingPredicate_init_$Create$($this.d31_1, missing));
2256
+ tmp_1 = this_0;
2257
+ } else {
2258
+ tmp_1 = _get_failureState__yid9tw_0($this);
2259
+ }
2260
+ tmp_0 = tmp_1;
2261
+ } else {
2262
+ tmp_0 = _get_failureState__yid9tw_0($this);
2263
+ }
2264
+ tmp = tmp_0;
2265
+ }
2266
+ return tmp;
2267
+ }
2268
+ function _get_ignoreState__t4wl8y($this) {
2269
+ return new StateGoalSelection($this.d31_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.d31_1.p2u_1.ro(), VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.d2z()));
2270
+ }
2271
+ function isCut($this, $receiver) {
2272
+ return $receiver.ct() && $receiver.castToAtom().c2() === '!';
2273
+ }
2274
+ function computeCutLimit($this, $receiver, magicCut) {
2275
+ magicCut = magicCut === VOID ? false : magicCut;
2276
+ var tmp;
2277
+ if (magicCut) {
2278
+ tmp = firstOrNull($receiver.z2u_1);
2279
+ } else {
2280
+ var tmp0 = $receiver.z2u_1;
2281
+ var tmp$ret$0;
2282
+ $l$block: {
2283
+ // Inline function 'kotlin.sequences.firstOrNull' call
2284
+ var _iterator__ex2g4s = tmp0.m();
2285
+ while (_iterator__ex2g4s.p()) {
2286
+ var element = _iterator__ex2g4s.q();
2287
+ var tmp_0 = Companion_getInstance_6().a31_1;
2288
+ var tmp0_safe_receiver = element.d2u_1;
2289
+ if (!contains_0(tmp_0, tmp0_safe_receiver == null ? null : extractSignature(tmp0_safe_receiver))) {
2290
+ tmp$ret$0 = element;
2291
+ break $l$block;
2292
+ }
2293
+ }
2294
+ tmp$ret$0 = null;
2295
+ }
2296
+ tmp = tmp$ret$0;
2297
+ }
2298
+ var cutLimit = tmp;
2299
+ var tmp_1;
2300
+ if (cutLimit == null) {
2301
+ tmp_1 = None_getInstance();
2302
+ } else {
2303
+ tmp_1 = new Actual(cutLimit.w2u_1, cutLimit.d2u_1);
2304
+ }
2305
+ return tmp_1;
2306
+ }
2307
+ function cutCanBeSkipped($this, cutLimit, executionContext) {
2308
+ return cutLimit.w30() || cutLimit.v30() > executionContext.w2u_1 || (cutLimit.v30() === executionContext.w2u_1 && !equals(cutLimit.p1r(), executionContext.d2u_1));
2309
+ }
2310
+ function performCut($this, $receiver, cutLimit) {
2311
+ var tmp;
2312
+ if ($receiver === null) {
2313
+ tmp = null;
2314
+ } else if (cutCanBeSkipped($this, cutLimit, ensureNotNull($receiver.p2v()))) {
2315
+ tmp = $receiver;
2316
+ } else {
2317
+ var tmp_0 = $receiver.c2w();
2318
+ var cutCandidates = filter(tmp_0, StateRuleSelection$performCut$lambda(cutLimit));
2319
+ var tmp_1;
2320
+ if (any(cutCandidates)) {
2321
+ var tmp$ret$0;
2322
+ $l$block: {
2323
+ // Inline function 'kotlin.sequences.firstOrNull' call
2324
+ var _iterator__ex2g4s = cutCandidates.m();
2325
+ while (_iterator__ex2g4s.p()) {
2326
+ var element = _iterator__ex2g4s.q();
2327
+ if (ensureNotNull(element.p2v()).w2u_1 <= cutLimit.v30()) {
2328
+ tmp$ret$0 = element;
2329
+ break $l$block;
2330
+ }
2331
+ }
2332
+ tmp$ret$0 = null;
2333
+ }
2334
+ var tmp0_safe_receiver = tmp$ret$0;
2335
+ tmp_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q2v();
2336
+ } else {
2337
+ tmp_1 = $receiver;
2338
+ }
2339
+ tmp = tmp_1;
2340
+ }
2341
+ return tmp;
2342
+ }
2343
+ function _get_isTailRecursive__h5eso7($this, $receiver) {
2344
+ var tmp;
2345
+ if ($receiver.p2u_1.ro().uo() && equals($receiver.g2u_1.get(LastCallOptimization_getInstance()), LastCallOptimization_getInstance().c25_1)) {
2346
+ // Inline function 'kotlin.let' call
2347
+ var tmp0_safe_receiver = ensureNotNull($receiver.p2x()).asStruct();
2348
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : extractSignature(tmp0_safe_receiver);
2349
+ var tmp_0;
2350
+ if (tmp1_safe_receiver == null) {
2351
+ tmp_0 = null;
2352
+ } else {
2353
+ // Inline function 'kotlin.let' call
2354
+ var tmp_1;
2355
+ var tmp0_safe_receiver_0 = $receiver.d2u_1;
2356
+ if (tmp1_safe_receiver.equals(tmp0_safe_receiver_0 == null ? null : extractSignature(tmp0_safe_receiver_0))) {
2357
+ tmp_1 = !tmp1_safe_receiver.equals(Companion_getInstance_6().z30_1);
2358
+ } else {
2359
+ tmp_1 = false;
2360
+ }
2361
+ tmp_0 = tmp_1;
2362
+ }
2363
+ var tmp2_elvis_lhs = tmp_0;
2364
+ tmp = tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs;
2365
+ } else {
2366
+ tmp = false;
2367
+ }
2368
+ return tmp;
2369
+ }
2370
+ function selectClauses($this, $receiver, term) {
2371
+ var tmp = $receiver.getByHead(term);
2372
+ // Inline function 'kotlin.let' call
2373
+ var it = ensureRules(map(tmp, StateRuleSelection$selectClauses$lambda));
2374
+ var tmp_0;
2375
+ if ($receiver.n1p()) {
2376
+ tmp_0 = buffered(it);
2377
+ } else {
2378
+ tmp_0 = it;
2379
+ }
2380
+ return tmp_0;
2381
+ }
2382
+ function StateRuleSelection$performCut$lambda($cutLimit) {
2383
+ return function (it) {
2384
+ return equals(ensureNotNull(it.p2v()).d2u_1, $cutLimit.p1r());
2385
+ };
2386
+ }
2387
+ function StateRuleSelection$computeNext$lambda(this$0, $currentGoalStruct) {
2388
+ return function (it) {
2389
+ return selectClauses(this$0, it, $currentGoalStruct);
2390
+ };
2391
+ }
2392
+ function StateRuleSelection$selectClauses$lambda(it) {
2393
+ return it.kt();
2394
+ }
2395
+ function StateRuleSelection(context) {
2396
+ Companion_getInstance_6();
2397
+ AbstractState.call(this, context);
2398
+ this.d31_1 = context;
2399
+ }
2400
+ protoOf(StateRuleSelection).m8 = function () {
2401
+ return this.d31_1;
2402
+ };
2403
+ protoOf(StateRuleSelection).x2y = function () {
2404
+ var currentGoal = ensureNotNull(this.d31_1.p2x());
2405
+ var tmp;
2406
+ if (currentGoal.du()) {
2407
+ tmp = exceptionalState_0(this, Companion_instance_11.forGoal(this.d31_1, extractSignature(ensureNotNull(this.d31_1.d2u_1)), currentGoal.castToVar()));
2408
+ } else if (currentGoal.nt()) {
2409
+ // Inline function 'kotlin.with' call
2410
+ var $this$with = this.d31_1;
2411
+ var currentGoalStruct = currentGoal.castToStruct();
2412
+ var ruleSources = sequenceOf([$this$with.f2u_1.asTheory($this$with.e2u_1), $this$with.h2u_1, $this$with.i2u_1]);
2413
+ var tmp_0;
2414
+ if (currentGoalStruct.eu()) {
2415
+ var tmp_1;
2416
+ if (currentGoalStruct.ft()) {
2417
+ tmp_1 = _get_ignoreState__t4wl8y(this);
2418
+ } else {
2419
+ tmp_1 = _get_failureState__yid9tw_0(this);
2420
+ }
2421
+ tmp_0 = tmp_1;
2422
+ } else {
2423
+ if (isCut(this, currentGoalStruct)) {
2424
+ var cutLimit = computeCutLimit(this, $this$with, currentGoalStruct instanceof MagicCut);
2425
+ // Inline function 'kotlin.let' call
2426
+ var it = _get_ignoreState__t4wl8y(this);
2427
+ tmp_0 = it.l2z(it.a30_1.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, performCut(this, it.a30_1.u2u_1, cutLimit)));
2428
+ } else {
2429
+ var tmp$ret$4;
2430
+ $l$block: {
2431
+ // Inline function 'kotlin.sequences.any' call
2432
+ var _iterator__ex2g4s = ruleSources.m();
2433
+ while (_iterator__ex2g4s.p()) {
2434
+ var element = _iterator__ex2g4s.q();
2435
+ if (element.containsHead(currentGoalStruct)) {
2436
+ tmp$ret$4 = true;
2437
+ break $l$block;
2438
+ }
2439
+ }
2440
+ tmp$ret$4 = false;
2441
+ }
2442
+ if (tmp$ret$4) {
2443
+ var rules = cursor(flatMap(ruleSources, StateRuleSelection$computeNext$lambda(this, currentGoalStruct)));
2444
+ var tmp_2;
2445
+ if (_get_isTailRecursive__h5eso7(this, this.d31_1)) {
2446
+ tmp_2 = new StateRuleExecution(replaceWithChildAppendingRulesAndChoicePoints(this.d31_1, rules));
2447
+ } else {
2448
+ tmp_2 = new StateRuleExecution(createChildAppendingRulesAndChoicePoints(this.d31_1, rules));
2449
+ }
2450
+ tmp_0 = tmp_2;
2451
+ } else {
2452
+ tmp_0 = missingProcedure(this, ruleSources, extractSignature(currentGoalStruct));
2453
+ }
2454
+ }
2455
+ }
2456
+ tmp = tmp_0;
2457
+ } else {
2458
+ tmp = exceptionalState_0(this, Companion_instance_10.forGoal(this.d31_1, extractSignature(ensureNotNull(this.d31_1.d2u_1)), Expected_CALLABLE_getInstance(), currentGoal));
2459
+ }
2460
+ return tmp;
2461
+ };
2462
+ protoOf(StateRuleSelection).g2z = function (context) {
2463
+ return this.l2z(context);
2464
+ };
2465
+ protoOf(StateRuleSelection).clone = function (context, $super) {
2466
+ return this.clone(context, ($super == null ? true : $super instanceof StateRuleSelection) ? $super : THROW_CCE());
2467
+ };
2468
+ protoOf(StateRuleSelection).l2z = function (context) {
2469
+ return new StateRuleSelection(context);
2470
+ };
2471
+ protoOf(StateRuleSelection).toString = function () {
2472
+ return 'StateRuleSelection(context=' + this.d31_1.toString() + ')';
2473
+ };
2474
+ protoOf(StateRuleSelection).hashCode = function () {
2475
+ return this.d31_1.hashCode();
2476
+ };
2477
+ protoOf(StateRuleSelection).equals = function (other) {
2478
+ if (this === other)
2479
+ return true;
2480
+ if (!(other instanceof StateRuleSelection))
2481
+ return false;
2482
+ if (!this.d31_1.equals(other.d31_1))
2483
+ return false;
2484
+ return true;
2485
+ };
2486
+ function appendRulesAndChoicePoints(_this__u8e3s4, rules) {
2487
+ var tmp;
2488
+ if (rules.to()) {
2489
+ tmp = appendRules(_this__u8e3s4.u2u_1, rules.ro(), _this__u8e3s4);
2490
+ } else {
2491
+ tmp = appendRules(_this__u8e3s4.u2u_1, Companion_instance_7.empty(), _this__u8e3s4);
2492
+ }
2493
+ var newChoicePointContext = tmp;
2494
+ return _this__u8e3s4.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, rules, VOID, VOID, VOID, newChoicePointContext);
2495
+ }
2496
+ function toGoals(_this__u8e3s4) {
2497
+ var tmp = unfoldGoals(_this__u8e3s4);
2498
+ return cursor(map(tmp, toGoals$lambda));
2499
+ }
2500
+ function unfoldGoals(_this__u8e3s4) {
2501
+ var tmp;
2502
+ if (_this__u8e3s4.st()) {
2503
+ var tmp_0 = _this__u8e3s4.castToTuple().xr();
2504
+ tmp = flatMap(tmp_0, unfoldGoals$lambda);
2505
+ } else {
2506
+ tmp = sequenceOf_0(_this__u8e3s4);
2507
+ }
2508
+ return tmp;
2509
+ }
2510
+ function createChild(_this__u8e3s4, inferProcedureFromGoals) {
2511
+ inferProcedureFromGoals = inferProcedureFromGoals === VOID ? true : inferProcedureFromGoals;
2512
+ var currentGoal = ensureNotNull(_this__u8e3s4.p2x()).castToStruct();
2513
+ var tmp0_goals = toGoals(currentGoal);
2514
+ var tmp1_procedure = inferProcedureFromGoals ? currentGoal : _this__u8e3s4.d2u_1;
2515
+ var tmp2_depth = _this__u8e3s4.w2u_1 + 1 | 0;
2516
+ // Inline function 'kotlin.Long.plus' call
2517
+ var this_0 = _this__u8e3s4.x2u_1;
2518
+ var tmp3_step = add(this_0, fromInt(1));
2519
+ var tmp4_relevantVariables = emptySet();
2520
+ return _this__u8e3s4.u2v(tmp1_procedure, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_goals, VOID, VOID, VOID, VOID, VOID, _this__u8e3s4, tmp2_depth, tmp3_step, tmp4_relevantVariables);
2521
+ }
2522
+ function toRequest(_this__u8e3s4, goal, signature, startTime) {
2523
+ return new Request(signature, goal.it(), _this__u8e3s4, startTime);
2524
+ }
2525
+ function appendPrimitivesAndChoicePoints(_this__u8e3s4, primitiveExecutions) {
2526
+ var tmp;
2527
+ if (primitiveExecutions.to()) {
2528
+ tmp = appendPrimitives(_this__u8e3s4.u2u_1, primitiveExecutions.ro(), _this__u8e3s4);
2529
+ } else {
2530
+ tmp = appendPrimitives(_this__u8e3s4.u2u_1, Companion_instance_7.empty(), _this__u8e3s4);
2531
+ }
2532
+ var newChoicePointContext = tmp;
2533
+ return _this__u8e3s4.u2v(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, primitiveExecutions, VOID, VOID, newChoicePointContext);
2534
+ }
2535
+ function replaceWithChildAppendingRulesAndChoicePoints(_this__u8e3s4, rules, inferProcedureFromGoals) {
2536
+ inferProcedureFromGoals = inferProcedureFromGoals === VOID ? true : inferProcedureFromGoals;
2537
+ var tempExecutionContext = replaceWithChild(_this__u8e3s4, inferProcedureFromGoals);
2538
+ return appendRulesAndChoicePoints(tempExecutionContext, rules);
2539
+ }
2540
+ function createChildAppendingRulesAndChoicePoints(_this__u8e3s4, rules, inferProcedureFromGoals) {
2541
+ inferProcedureFromGoals = inferProcedureFromGoals === VOID ? true : inferProcedureFromGoals;
2542
+ var tempExecutionContext = createChild(_this__u8e3s4, inferProcedureFromGoals);
2543
+ return appendRulesAndChoicePoints(tempExecutionContext, rules);
2544
+ }
2545
+ function ensureRules(_this__u8e3s4) {
2546
+ return map(_this__u8e3s4, ensureRules$lambda);
2547
+ }
2548
+ function replaceWithChild(_this__u8e3s4, inferProcedureFromGoals) {
2549
+ inferProcedureFromGoals = inferProcedureFromGoals === VOID ? true : inferProcedureFromGoals;
2550
+ var currentGoal = ensureNotNull(_this__u8e3s4.p2x()).castToStruct();
2551
+ var tmp0_goals = toGoals(currentGoal);
2552
+ var tmp1_procedure = inferProcedureFromGoals ? currentGoal : _this__u8e3s4.d2u_1;
2553
+ var tmp2_depth = _this__u8e3s4.w2u_1 + 1 | 0;
2554
+ // Inline function 'kotlin.Long.plus' call
2555
+ var this_0 = _this__u8e3s4.x2u_1;
2556
+ var tmp3_step = add(this_0, fromInt(1));
2557
+ return _this__u8e3s4.u2v(tmp1_procedure, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_goals, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_depth, tmp3_step);
2558
+ }
2559
+ function toGoals$lambda(it) {
2560
+ return it.du() ? Companion_getInstance_1().of('call', [it]) : it;
2561
+ }
2562
+ function unfoldGoals$lambda(it) {
2563
+ return unfoldGoals(it);
2564
+ }
2565
+ function ensureRules$lambda(it) {
2566
+ // Inline function 'kotlin.require' call
2567
+ // Inline function 'kotlin.require' call
2568
+ if (!it.pt()) {
2569
+ var message = 'Failed requirement.';
2570
+ throw IllegalArgumentException_init_$Create$(toString(message));
2571
+ }
2572
+ return it.castToRule();
2573
+ }
2574
+ function AbstractSolutionIterator(state) {
2575
+ this.e31_1 = state;
2576
+ this.f31_1 = new Long(0, 0);
2577
+ }
2578
+ protoOf(AbstractSolutionIterator).p = function () {
2579
+ // Inline function 'kotlin.let' call
2580
+ var it = this.e31_1;
2581
+ return !it.e2z() || it.castToEndState().b2w();
2582
+ };
2583
+ protoOf(AbstractSolutionIterator).q = function () {
2584
+ do {
2585
+ var previousState = this.e31_1;
2586
+ var tmp = this;
2587
+ var tmp_0 = this.e31_1;
2588
+ this.f31_1 = add(this.f31_1, get_ONE());
2589
+ tmp.e31_1 = this.g31(tmp_0, this.f31_1);
2590
+ this.onStateTransition(previousState, this.e31_1, this.f31_1);
2591
+ }
2592
+ while (!this.e31_1.e2z());
2593
+ return this.e31_1.castToEndState().j2e().cleanUp();
2594
+ };
2595
+ function SimpleSolutionIterator(state, onStateTransitionCallback) {
2596
+ AbstractSolutionIterator.call(this, state);
2597
+ this.j31_1 = onStateTransitionCallback;
2598
+ }
2599
+ protoOf(SimpleSolutionIterator).g31 = function (state, step) {
2600
+ return state.next();
2601
+ };
2602
+ protoOf(SimpleSolutionIterator).k31 = function (source, destination, index) {
2603
+ return this.j31_1(source, destination, index);
2604
+ };
2605
+ protoOf(SimpleSolutionIterator).onStateTransition = function (source, destination, index) {
2606
+ return this.k31(source, destination, index);
2607
+ };
2608
+ function DefaultBuiltins() {
2609
+ DefaultBuiltins_instance = this;
2610
+ ExtensionLibrary.call(this, CommonBuiltins_getInstance());
2611
+ }
2612
+ protoOf(DefaultBuiltins).v2a = function () {
2613
+ return listOf(Throw_getInstance());
2614
+ };
2615
+ protoOf(DefaultBuiltins).u2a = function () {
2616
+ return listOf_0([Catch_getInstance(), Call_getInstance(), Comma_getInstance(), Cut_getInstance(), Fail_getInstance(), Success_getInstance()]);
2617
+ };
2618
+ var DefaultBuiltins_instance;
2619
+ function DefaultBuiltins_getInstance() {
2620
+ if (DefaultBuiltins_instance == null)
2621
+ new DefaultBuiltins();
2622
+ return DefaultBuiltins_instance;
2623
+ }
2624
+ function handleError($this, context, error) {
2625
+ var tmp;
2626
+ var tmp_0;
2627
+ var tmp_1;
2628
+ if (isInterface(error, Struct)) {
2629
+ tmp_1 = error.ht() === 'error';
2630
+ } else {
2631
+ tmp_1 = false;
2632
+ }
2633
+ if (tmp_1) {
2634
+ var containsArg = error.bt();
2635
+ tmp_0 = 1 <= containsArg ? containsArg <= 2 : false;
2636
+ } else {
2637
+ tmp_0 = false;
2638
+ }
2639
+ if (tmp_0) {
2640
+ var tmp_2 = Companion_instance_14;
2641
+ var tmp_3 = error.get(0);
2642
+ tmp = tmp_2.of(VOID, VOID, context, isInterface(tmp_3, Struct) ? tmp_3 : THROW_CCE(), error.bt() > 1 ? error.get(1) : null);
2643
+ } else {
2644
+ tmp = Companion_instance_13.x22(error, context);
2645
+ }
2646
+ return tmp;
2647
+ }
2648
+ function Throw() {
2649
+ Throw_instance = this;
2650
+ UnaryPredicate.call(this, 'throw');
2651
+ }
2652
+ protoOf(Throw).a2l = function (_this__u8e3s4, first) {
2653
+ return sequenceOf_0(Companion_getInstance_4().v2b(_this__u8e3s4).replyException(handleError(this, _this__u8e3s4.context, _this__u8e3s4.arguments.t(0)), VOID, []));
2654
+ };
2655
+ protoOf(Throw).a2f = function (_this__u8e3s4, first) {
2656
+ return this.a2l(_this__u8e3s4, first);
2657
+ };
2658
+ var Throw_instance;
2659
+ function Throw_getInstance() {
2660
+ if (Throw_instance == null)
2661
+ new Throw();
2662
+ return Throw_instance;
2663
+ }
2664
+ function Call() {
2665
+ Call_instance = this;
2666
+ RuleWrapper_init_$Init$('call', 1, VOID, this);
2667
+ }
2668
+ protoOf(Call).e2f = function (_this__u8e3s4) {
2669
+ return listOf(_this__u8e3s4.varOf('G'));
2670
+ };
2671
+ protoOf(Call).f2f = function (_this__u8e3s4) {
2672
+ // Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
2673
+ var tmp$ret$0 = EnsureExecutable_getInstance().signature.name;
2674
+ return _this__u8e3s4.tupleOf([_this__u8e3s4.structOf(tmp$ret$0, [_this__u8e3s4.varOf('G')]), _this__u8e3s4.varOf('G')]);
2675
+ };
2676
+ var Call_instance;
2677
+ function Call_getInstance() {
2678
+ if (Call_instance == null)
2679
+ new Call();
2680
+ return Call_instance;
2681
+ }
2682
+ function Catch() {
2683
+ Catch_instance = this;
2684
+ RuleWrapper_init_$Init$('catch', 3, VOID, this);
2685
+ }
2686
+ protoOf(Catch).e2f = function (_this__u8e3s4) {
2687
+ return listOf_0([_this__u8e3s4.varOf('G'), _this__u8e3s4.varOf('E'), _this__u8e3s4.varOf('C')]);
2688
+ };
2689
+ protoOf(Catch).f2f = function (_this__u8e3s4) {
2690
+ return _this__u8e3s4.varOf('G');
2691
+ };
2692
+ var Catch_instance;
2693
+ function Catch_getInstance() {
2694
+ if (Catch_instance == null)
2695
+ new Catch();
2696
+ return Catch_instance;
2697
+ }
2698
+ function Comma() {
2699
+ Comma_instance = this;
2700
+ RuleWrapper_init_$Init$(',', 2, VOID, this);
2701
+ }
2702
+ protoOf(Comma).e2f = function (_this__u8e3s4) {
2703
+ return listOf_0([_this__u8e3s4.varOf('A'), _this__u8e3s4.varOf('B')]);
2704
+ };
2705
+ protoOf(Comma).f2f = function (_this__u8e3s4) {
2706
+ return _this__u8e3s4.tupleOf([_this__u8e3s4.varOf('A'), _this__u8e3s4.varOf('B')]);
2707
+ };
2708
+ var Comma_instance;
2709
+ function Comma_getInstance() {
2710
+ if (Comma_instance == null)
2711
+ new Comma();
2712
+ return Comma_instance;
2713
+ }
2714
+ function Cut() {
2715
+ Cut_instance = this;
2716
+ RuleWrapper_init_$Init$('!', 0, VOID, this);
2717
+ }
2718
+ var Cut_instance;
2719
+ function Cut_getInstance() {
2720
+ if (Cut_instance == null)
2721
+ new Cut();
2722
+ return Cut_instance;
2723
+ }
2724
+ function Fail() {
2725
+ Fail_instance = this;
2726
+ NegationAsFailure.call(this);
2727
+ }
2728
+ protoOf(Fail).f2f = function (_this__u8e3s4) {
2729
+ // Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
2730
+ var tmp$ret$0 = EnsureExecutable_getInstance().signature.name;
2731
+ var tmp = _this__u8e3s4.structOf(tmp$ret$0, [_this__u8e3s4.varOf('X')]);
2732
+ // Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
2733
+ var tmp$ret$1 = Call_getInstance().signature.name;
2734
+ return _this__u8e3s4.tupleOf([tmp, _this__u8e3s4.structOf(tmp$ret$1, [_this__u8e3s4.varOf('X')]), MagicCut_getInstance(), _this__u8e3s4.truthOf(false)]);
2735
+ };
2736
+ var Fail_instance;
2737
+ function Fail_getInstance() {
2738
+ if (Fail_instance == null)
2739
+ new Fail();
2740
+ return Fail_instance;
2741
+ }
2742
+ function Success() {
2743
+ Success_instance = this;
2744
+ NegationAsFailure.call(this);
2745
+ }
2746
+ protoOf(Success).f2f = function (_this__u8e3s4) {
2747
+ return _this__u8e3s4.truthOf(true);
2748
+ };
2749
+ var Success_instance;
2750
+ function Success_getInstance() {
2751
+ if (Success_instance == null)
2752
+ new Success();
2753
+ return Success_instance;
2754
+ }
2755
+ function Companion_1() {
2756
+ this.k32_1 = '\\+';
2757
+ this.l32_1 = 1;
2758
+ }
2759
+ var Companion_instance_17;
2760
+ function Companion_getInstance_7() {
2761
+ return Companion_instance_17;
2762
+ }
2763
+ function NegationAsFailure() {
2764
+ RuleWrapper_init_$Init$('\\+', 1, VOID, this);
2765
+ }
2766
+ protoOf(NegationAsFailure).e2f = function (_this__u8e3s4) {
2767
+ return listOf(_this__u8e3s4.varOf('X'));
2768
+ };
2769
+ //region block: post-declaration
2770
+ protoOf(ClassicExecutionContext).createSolver = createSolver;
2771
+ protoOf(ClassicExecutionContext).createMutableSolver = createMutableSolver;
2772
+ protoOf(ClassicExecutionContext).update = update;
2773
+ protoOf(ClassicExecutionContext).e1s = get_standardInput;
2774
+ protoOf(ClassicExecutionContext).f1s = get_standardOutput;
2775
+ protoOf(ClassicExecutionContext).g1s = get_standardError;
2776
+ protoOf(ClassicExecutionContext).h1s = get_warnings;
2777
+ protoOf(ClassicExecutionContext).l1r = get_endTime;
2778
+ protoOf(ClassicExecutionContext).n1r = get_remainingTime;
2779
+ protoOf(ClassicExecutionContext).o1r = get_elapsedTime;
2780
+ protoOf(ClassicSolverFactory).rawSolverOf = rawSolverOf;
2781
+ protoOf(ClassicSolverFactory).solverOf = solverOf;
2782
+ protoOf(ClassicSolverFactory).mutableSolverOf = mutableSolverOf;
2783
+ protoOf(ClassicSolverFactory).rawMutableSolverOf = rawMutableSolverOf;
2784
+ protoOf(ClassicSolverFactory).newBuilder = newBuilder;
2785
+ protoOf(ClassicSolverFactory).f1u = get_defaultRuntime;
2786
+ protoOf(ClassicSolverFactory).h1u = get_defaultUnificator;
2787
+ protoOf(ClassicSolverFactory).i1u = get_defaultFlags;
2788
+ protoOf(ClassicSolverFactory).l1u = get_defaultStaticKb;
2789
+ protoOf(ClassicSolverFactory).m1u = get_defaultDynamicKb;
2790
+ protoOf(ClassicSolverFactory).n1u = get_defaultInputChannel;
2791
+ protoOf(ClassicSolverFactory).o1u = get_defaultOutputChannel;
2792
+ protoOf(ClassicSolverFactory).p1u = get_defaultErrorChannel;
2793
+ protoOf(ClassicSolverFactory).q1u = get_defaultWarningsChannel;
2794
+ protoOf(ClassicSolverFactory).y1u = solverWithDefaultBuiltins;
2795
+ protoOf(ClassicSolverFactory).solverWithDefaultBuiltinsAnd = solverWithDefaultBuiltinsAnd;
2796
+ protoOf(ClassicSolverFactory).a1v = mutableSolverWithDefaultBuiltins;
2797
+ protoOf(ClassicSolverFactory).mutableSolverWithDefaultBuiltinsAnd = mutableSolverWithDefaultBuiltinsAnd;
2798
+ protoOf(MutableClassicSolver).loadStaticClauses = loadStaticClauses;
2799
+ protoOf(MutableClassicSolver).loadStaticClausesIterable = loadStaticClausesIterable;
2800
+ protoOf(MutableClassicSolver).loadStaticClausesSequence = loadStaticClausesSequence;
2801
+ protoOf(MutableClassicSolver).loadDynamicClauses = loadDynamicClauses;
2802
+ protoOf(MutableClassicSolver).loadDynamicClausesIterable = loadDynamicClausesIterable;
2803
+ protoOf(MutableClassicSolver).loadDynamicClausesSequence = loadDynamicClausesSequence;
2804
+ protoOf(AbstractState).e2z = get_isEndState;
2805
+ protoOf(AbstractState).asEndState = asEndState;
2806
+ protoOf(AbstractState).castToEndState = castToEndState;
2807
+ protoOf(AbstractState).clone = clone;
2808
+ protoOf(AbstractEndState).e2z = get_isEndState_0;
2809
+ protoOf(AbstractEndState).f2z = asEndState_0;
2810
+ protoOf(AbstractEndState).b2w = get_hasOpenAlternatives;
2811
+ //endregion
2812
+ //region block: init
2813
+ ClassicSolverFactory_instance = new ClassicSolverFactory();
2814
+ Companion_instance_15 = new Companion();
2815
+ Companion_instance_17 = new Companion_1();
2816
+ //endregion
2817
+ //region block: exports
2818
+ function $jsExportAll$(_) {
2819
+ var it = _.it || (_.it = {});
2820
+ var unibo = it.unibo || (it.unibo = {});
2821
+ var tuprolog = unibo.tuprolog || (unibo.tuprolog = {});
2822
+ var solve = tuprolog.solve || (tuprolog.solve = {});
2823
+ var classic = solve.classic || (solve.classic = {});
2824
+ defineProp(classic, 'ClassicSolverFactory', ClassicSolverFactory_getInstance, VOID, true);
2825
+ }
2826
+ $jsExportAll$(_);
2827
+ _.$jsExportAll$ = $jsExportAll$;
2828
+ //endregion
2829
+ return _;
2830
+ }));
2831
+
2832
+ //# sourceMappingURL=2p-solve-classic.js.map