@tuprolog/2p-full 2.0.5 → 3.0.0

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 (75) hide show
  1. package/2p-bdd.js +172 -172
  2. package/2p-bdd.js.map +1 -1
  3. package/2p-core.js +3599 -3367
  4. package/2p-core.js.map +1 -1
  5. package/2p-datalog.js.map +1 -1
  6. package/2p-dsl-core.js.map +1 -1
  7. package/2p-dsl-solve.js.map +1 -1
  8. package/2p-dsl-theory.js.map +1 -1
  9. package/2p-dsl-unify.js.map +1 -1
  10. package/2p-full.js +20 -11
  11. package/2p-full.js.map +1 -1
  12. package/2p-gui-plp.js.map +1 -1
  13. package/2p-gui.js.map +1 -1
  14. package/2p-ide-web.js.map +1 -1
  15. package/2p-io-lib.js +3699 -5
  16. package/2p-io-lib.js.map +1 -1
  17. package/2p-oop-lib.js +3517 -5
  18. package/2p-oop-lib.js.map +1 -1
  19. package/2p-parser-core.js +616 -5
  20. package/2p-parser-core.js.map +1 -1
  21. package/2p-parser-impl.js +5636 -5
  22. package/2p-parser-impl.js.map +1 -1
  23. package/2p-parser-theory.js +278 -5
  24. package/2p-parser-theory.js.map +1 -1
  25. package/2p-repl.js +536 -5
  26. package/2p-repl.js.map +1 -1
  27. package/2p-serialize-core.js.map +1 -1
  28. package/2p-serialize-theory.js.map +1 -1
  29. package/2p-solve-concurrent.js.map +1 -1
  30. package/2p-solve-plp.js +3 -3
  31. package/2p-solve-plp.js.map +1 -1
  32. package/2p-solve-problog.js +1459 -1453
  33. package/2p-solve-problog.js.map +1 -1
  34. package/2p-solve-prolog.js +2858 -0
  35. package/2p-solve-prolog.js.map +1 -0
  36. package/2p-solve.js +7034 -4765
  37. package/2p-solve.js.map +1 -1
  38. package/2p-test-dsl.js.map +1 -1
  39. package/2p-theory.js +1725 -1725
  40. package/2p-theory.js.map +1 -1
  41. package/2p-unify.js +375 -375
  42. package/2p-unify.js.map +1 -1
  43. package/2p-utils.js +546 -493
  44. package/2p-utils.js.map +1 -1
  45. package/README.md +1 -1
  46. package/clikt-clikt-mordant.js +311 -5
  47. package/clikt-clikt-mordant.js.map +1 -1
  48. package/clikt-clikt.js +6672 -5
  49. package/clikt-clikt.js.map +1 -1
  50. package/colormath-root-colormath.js +1654 -5
  51. package/colormath-root-colormath.js.map +1 -1
  52. package/kotlin-kotlin-stdlib.js +5607 -2742
  53. package/kotlin-kotlin-stdlib.js.map +1 -1
  54. package/kotlin-kotlin-test.js.map +1 -1
  55. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -1
  56. package/kotlinx-atomicfu.js.map +1 -1
  57. package/kotlinx-coroutines-core.js.map +1 -1
  58. package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
  59. package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
  60. package/kt-math.js +1622 -1614
  61. package/kt-math.js.map +1 -1
  62. package/markdown.js +15 -0
  63. package/markdown.js.map +1 -0
  64. package/mordant-mordant-omnibus.js.map +1 -1
  65. package/mordant-mordant.js +10375 -5
  66. package/mordant-mordant.js.map +1 -1
  67. package/okio-parent-okio-nodefilesystem.js +201 -5
  68. package/okio-parent-okio-nodefilesystem.js.map +1 -1
  69. package/okio-parent-okio.js +3863 -5
  70. package/okio-parent-okio.js.map +1 -1
  71. package/package.json +4 -4
  72. package/2p-solve-classic.js +0 -2834
  73. package/2p-solve-classic.js.map +0 -1
  74. package/2p-solve-streams.js +0 -2661
  75. package/2p-solve-streams.js.map +0 -1
@@ -1,2661 +0,0 @@
1
- (function (factory) {
2
- if (typeof define === 'function' && define.amd)
3
- define(['exports', './kotlin-kotlin-stdlib.js', './2p-unify.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('./kotlin-kotlin-stdlib.js'), require('./2p-unify.js'), require('./2p-solve.js'), require('./2p-theory.js'), require('./2p-utils.js'), require('./2p-core.js'));
6
- else {
7
- if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
8
- throw new Error("Error loading module '2p-solve-streams'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to '2p-solve-streams'.");
9
- }
10
- if (typeof globalThis['2p-unify'] === 'undefined') {
11
- throw new Error("Error loading module '2p-solve-streams'. Its dependency '2p-unify' was not found. Please, check whether '2p-unify' is loaded prior to '2p-solve-streams'.");
12
- }
13
- if (typeof globalThis['2p-solve'] === 'undefined') {
14
- throw new Error("Error loading module '2p-solve-streams'. Its dependency '2p-solve' was not found. Please, check whether '2p-solve' is loaded prior to '2p-solve-streams'.");
15
- }
16
- if (typeof globalThis['2p-theory'] === 'undefined') {
17
- throw new Error("Error loading module '2p-solve-streams'. Its dependency '2p-theory' was not found. Please, check whether '2p-theory' is loaded prior to '2p-solve-streams'.");
18
- }
19
- if (typeof globalThis['2p-utils'] === 'undefined') {
20
- throw new Error("Error loading module '2p-solve-streams'. Its dependency '2p-utils' was not found. Please, check whether '2p-utils' is loaded prior to '2p-solve-streams'.");
21
- }
22
- if (typeof globalThis['2p-core'] === 'undefined') {
23
- throw new Error("Error loading module '2p-solve-streams'. Its dependency '2p-core' was not found. Please, check whether '2p-core' is loaded prior to '2p-solve-streams'.");
24
- }
25
- globalThis['2p-solve-streams'] = factory(typeof globalThis['2p-solve-streams'] === 'undefined' ? {} : globalThis['2p-solve-streams'], globalThis['kotlin-kotlin-stdlib'], globalThis['2p-unify'], globalThis['2p-solve'], globalThis['2p-theory'], globalThis['2p-utils'], globalThis['2p-core']);
26
- }
27
- }(function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_unify, 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 first = kotlin_kotlin.$_$.w7;
32
- var protoOf = kotlin_kotlin.$_$.p6;
33
- var initMetadataForClass = kotlin_kotlin.$_$.a6;
34
- var initMetadataForCompanion = kotlin_kotlin.$_$.b6;
35
- var Unit_instance = kotlin_kotlin.$_$.m;
36
- var constructCallableReference = kotlin_kotlin.$_$.r5;
37
- var isInterface = kotlin_kotlin.$_$.j6;
38
- var Companion_getInstance = kotlin_it_unibo_tuprolog_unify.$_$.a;
39
- var VOID = kotlin_kotlin.$_$.b;
40
- var Companion_instance = kotlin_it_unibo_tuprolog_solve.$_$.q;
41
- var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_solve.$_$.l;
42
- var Companion_instance_0 = kotlin_it_unibo_tuprolog_theory.$_$.b;
43
- var Companion_instance_1 = kotlin_it_unibo_tuprolog_theory.$_$.a;
44
- var Companion_instance_2 = kotlin_it_unibo_tuprolog_solve.$_$.a;
45
- var Companion_instance_3 = kotlin_it_unibo_tuprolog_solve.$_$.c;
46
- var Companion_instance_4 = kotlin_it_unibo_tuprolog_solve.$_$.b;
47
- var Companion_instance_5 = kotlin_it_unibo_tuprolog_solve.$_$.d;
48
- var objectCreate = kotlin_kotlin.$_$.o6;
49
- var filter = kotlin_kotlin.$_$.u7;
50
- var THROW_CCE = kotlin_kotlin.$_$.na;
51
- var Sequence = kotlin_kotlin.$_$.i7;
52
- var map = kotlin_kotlin.$_$.g8;
53
- var getAllOperators = kotlin_it_unibo_tuprolog_solve.$_$.c4;
54
- var toOperatorSet = kotlin_it_unibo_tuprolog_solve.$_$.e4;
55
- var extractSignature = kotlin_it_unibo_tuprolog_solve.$_$.b4;
56
- var Request = kotlin_it_unibo_tuprolog_solve.$_$.a2;
57
- var take = kotlin_kotlin.$_$.r8;
58
- var buffered = kotlin_it_unibo_tuprolog_utils.$_$.q;
59
- var copy = kotlin_it_unibo_tuprolog_solve.$_$.b1;
60
- var solveWithTimeout = kotlin_it_unibo_tuprolog_solve.$_$.k3;
61
- var solve = kotlin_it_unibo_tuprolog_solve.$_$.l3;
62
- var solveListWithTimeout = kotlin_it_unibo_tuprolog_solve.$_$.f3;
63
- var solveList = kotlin_it_unibo_tuprolog_solve.$_$.e3;
64
- var solveListWithOptions = kotlin_it_unibo_tuprolog_solve.$_$.g3;
65
- var solveOnceWithTimeout = kotlin_it_unibo_tuprolog_solve.$_$.h3;
66
- var solveOnce = kotlin_it_unibo_tuprolog_solve.$_$.j3;
67
- var solveOnceWithOptions = kotlin_it_unibo_tuprolog_solve.$_$.i3;
68
- var clone = kotlin_it_unibo_tuprolog_solve.$_$.d3;
69
- var get_standardInput = kotlin_it_unibo_tuprolog_solve.$_$.o2;
70
- var get_standardOutput = kotlin_it_unibo_tuprolog_solve.$_$.p2;
71
- var get_standardError = kotlin_it_unibo_tuprolog_solve.$_$.n2;
72
- var get_warnings = kotlin_it_unibo_tuprolog_solve.$_$.q2;
73
- var Solver = kotlin_it_unibo_tuprolog_solve.$_$.z3;
74
- var rawSolverOf = kotlin_it_unibo_tuprolog_solve.$_$.g1;
75
- var solverOf = kotlin_it_unibo_tuprolog_solve.$_$.f1;
76
- var NotImplementedError = kotlin_kotlin.$_$.ia;
77
- var mutableSolverOf = kotlin_it_unibo_tuprolog_solve.$_$.c1;
78
- var rawMutableSolverOf = kotlin_it_unibo_tuprolog_solve.$_$.d1;
79
- var newBuilder = kotlin_it_unibo_tuprolog_solve.$_$.w3;
80
- var get_defaultRuntime = kotlin_it_unibo_tuprolog_solve.$_$.r3;
81
- var get_defaultUnificator = kotlin_it_unibo_tuprolog_solve.$_$.t3;
82
- var get_defaultFlags = kotlin_it_unibo_tuprolog_solve.$_$.o3;
83
- var get_defaultStaticKb = kotlin_it_unibo_tuprolog_solve.$_$.s3;
84
- var get_defaultDynamicKb = kotlin_it_unibo_tuprolog_solve.$_$.m3;
85
- var get_defaultInputChannel = kotlin_it_unibo_tuprolog_solve.$_$.p3;
86
- var get_defaultOutputChannel = kotlin_it_unibo_tuprolog_solve.$_$.q3;
87
- var get_defaultErrorChannel = kotlin_it_unibo_tuprolog_solve.$_$.n3;
88
- var get_defaultWarningsChannel = kotlin_it_unibo_tuprolog_solve.$_$.u3;
89
- var solverWithDefaultBuiltins = kotlin_it_unibo_tuprolog_solve.$_$.x3;
90
- var solverWithDefaultBuiltinsAnd = kotlin_it_unibo_tuprolog_solve.$_$.h1;
91
- var mutableSolverWithDefaultBuiltins = kotlin_it_unibo_tuprolog_solve.$_$.v3;
92
- var mutableSolverWithDefaultBuiltinsAnd = kotlin_it_unibo_tuprolog_solve.$_$.e1;
93
- var SolverFactory = kotlin_it_unibo_tuprolog_solve.$_$.y3;
94
- var initMetadataForObject = kotlin_kotlin.$_$.f6;
95
- var defineProp = kotlin_kotlin.$_$.s5;
96
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.o;
97
- var firstOrNull = kotlin_kotlin.$_$.o2;
98
- var emptyList = kotlin_kotlin.$_$.l2;
99
- var emptySequence = kotlin_kotlin.$_$.q7;
100
- var plus = kotlin_kotlin.$_$.l8;
101
- var toMutableList = kotlin_kotlin.$_$.j4;
102
- var first_0 = kotlin_kotlin.$_$.p2;
103
- var listOf = kotlin_kotlin.$_$.b3;
104
- var lastOrNull = kotlin_kotlin.$_$.x2;
105
- var contains = kotlin_kotlin.$_$.m7;
106
- var equals = kotlin_kotlin.$_$.t5;
107
- var plus_0 = kotlin_kotlin.$_$.j8;
108
- var Collection = kotlin_kotlin.$_$.p1;
109
- var toString = kotlin_kotlin.$_$.s6;
110
- var toString_0 = kotlin_kotlin.$_$.xa;
111
- var hashCode = kotlin_kotlin.$_$.z5;
112
- var getBooleanHashCode = kotlin_kotlin.$_$.v5;
113
- var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_core.$_$.e;
114
- var Companion_getInstance_2 = kotlin_it_unibo_tuprolog_core.$_$.p;
115
- var Unifier = kotlin_it_unibo_tuprolog_core.$_$.q1;
116
- var Companion_instance_6 = kotlin_it_unibo_tuprolog_core.$_$.f;
117
- var prepareForExecution = kotlin_it_unibo_tuprolog_core.$_$.u2;
118
- var single = kotlin_kotlin.$_$.z3;
119
- var copyToArray = kotlin_kotlin.$_$.i2;
120
- var any = kotlin_kotlin.$_$.j7;
121
- var sequence = kotlin_kotlin.$_$.o8;
122
- var drop = kotlin_kotlin.$_$.k2;
123
- var plus_1 = kotlin_kotlin.$_$.t3;
124
- var indexOf = kotlin_kotlin.$_$.a8;
125
- var CoroutineImpl = kotlin_kotlin.$_$.p4;
126
- var SequenceScope = kotlin_kotlin.$_$.h7;
127
- var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.o4;
128
- var filterIndexed = kotlin_kotlin.$_$.r7;
129
- var initMetadataForLambda = kotlin_kotlin.$_$.e6;
130
- var asSequence = kotlin_kotlin.$_$.a2;
131
- var toList = kotlin_kotlin.$_$.u8;
132
- var Companion_instance_7 = kotlin_it_unibo_tuprolog_solve.$_$.e;
133
- var currentTimeInstant = kotlin_it_unibo_tuprolog_solve.$_$.a4;
134
- var lazy = kotlin_kotlin.$_$.ta;
135
- var collectionSizeOrDefault = kotlin_kotlin.$_$.d2;
136
- var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.n;
137
- var KProperty1 = kotlin_kotlin.$_$.g7;
138
- var getPropertyCallableRef = kotlin_kotlin.$_$.x5;
139
- var createSolver = kotlin_it_unibo_tuprolog_solve.$_$.z;
140
- var createMutableSolver = kotlin_it_unibo_tuprolog_solve.$_$.y;
141
- var apply = kotlin_it_unibo_tuprolog_solve.$_$.l2;
142
- var applyIterable = kotlin_it_unibo_tuprolog_solve.$_$.k2;
143
- var applySequence = kotlin_it_unibo_tuprolog_solve.$_$.m2;
144
- var update = kotlin_it_unibo_tuprolog_solve.$_$.a1;
145
- var getBigIntHashCode = kotlin_kotlin.$_$.u5;
146
- var get_endTime = kotlin_it_unibo_tuprolog_solve.$_$.i2;
147
- var get_remainingTime = kotlin_it_unibo_tuprolog_solve.$_$.j2;
148
- var get_elapsedTime = kotlin_it_unibo_tuprolog_solve.$_$.h2;
149
- var ExecutionContext = kotlin_it_unibo_tuprolog_solve.$_$.r2;
150
- var initMetadataForInterface = kotlin_kotlin.$_$.d6;
151
- var sequenceOf = kotlin_kotlin.$_$.n8;
152
- var drop_0 = kotlin_kotlin.$_$.p7;
153
- var TimeOutException_init_$Create$ = kotlin_it_unibo_tuprolog_solve.$_$.l1;
154
- var subtract = kotlin_kotlin.$_$.g5;
155
- var getKClassFromExpression = kotlin_kotlin.$_$.e7;
156
- var Halt = kotlin_it_unibo_tuprolog_solve.$_$.a3;
157
- var Yes = kotlin_it_unibo_tuprolog_solve.$_$.c3;
158
- var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.b1;
159
- var No = kotlin_it_unibo_tuprolog_solve.$_$.b3;
160
- var Companion_getInstance_3 = kotlin_it_unibo_tuprolog_core.$_$.o;
161
- var LogicError = kotlin_it_unibo_tuprolog_solve.$_$.r1;
162
- var HaltException = kotlin_it_unibo_tuprolog_solve.$_$.q1;
163
- var sequenceOf_0 = kotlin_kotlin.$_$.m8;
164
- var flatMap = kotlin_kotlin.$_$.x7;
165
- var asIterable = kotlin_kotlin.$_$.k7;
166
- var Rule = kotlin_it_unibo_tuprolog_core.$_$.o1;
167
- var none = kotlin_kotlin.$_$.i8;
168
- var Struct = kotlin_it_unibo_tuprolog_core.$_$.p1;
169
- var ExtensionLibrary = kotlin_it_unibo_tuprolog_solve.$_$.v1;
170
- var CommonBuiltins_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.u;
171
- var listOf_0 = kotlin_kotlin.$_$.c3;
172
- var PrimitiveWrapper = kotlin_it_unibo_tuprolog_solve.$_$.y1;
173
- var PrimitiveWrapper_init_$Init$ = kotlin_it_unibo_tuprolog_solve.$_$.m1;
174
- var Companion_getInstance_4 = kotlin_it_unibo_tuprolog_solve.$_$.r;
175
- var Expected_CALLABLE_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.x;
176
- var TypeError_init_$Create$ = kotlin_it_unibo_tuprolog_solve.$_$.i1;
177
- var last = kotlin_kotlin.$_$.y2;
178
- var first_1 = kotlin_kotlin.$_$.q2;
179
- var Pair = kotlin_kotlin.$_$.la;
180
- var initMetadataForCoroutine = kotlin_kotlin.$_$.c6;
181
- var Companion_instance_8 = kotlin_it_unibo_tuprolog_solve.$_$.k;
182
- var NonBacktrackable = kotlin_it_unibo_tuprolog_solve.$_$.d2;
183
- var Companion_instance_9 = kotlin_it_unibo_tuprolog_solve.$_$.i;
184
- //endregion
185
- //region block: pre-declaration
186
- initMetadataForClass(SolverStrategies$Companion$prologStandard$1);
187
- initMetadataForCompanion(Companion);
188
- initMetadataForCompanion(Companion_0);
189
- initMetadataForClass(StreamsSolver, 'StreamsSolver', VOID, VOID, [Solver]);
190
- initMetadataForObject(StreamsSolverFactory, 'StreamsSolverFactory', VOID, VOID, [SolverFactory]);
191
- initMetadataForClass(SideEffectManagerImpl, 'SideEffectManagerImpl', SideEffectManagerImpl);
192
- initMetadataForLambda(orderWithStrategy$slambda, CoroutineImpl, VOID, [1]);
193
- initMetadataForClass(StreamsExecutionContext, 'StreamsExecutionContext', StreamsExecutionContext, VOID, [ExecutionContext]);
194
- initMetadataForClass(AbstractState, 'AbstractState');
195
- initMetadataForClass(AlreadyExecutedState, 'AlreadyExecutedState');
196
- initMetadataForInterface(FinalState, 'FinalState');
197
- function get_context() {
198
- var tmp = this.f3d().context;
199
- return tmp instanceof StreamsExecutionContext ? tmp : THROW_CCE();
200
- }
201
- initMetadataForInterface(IntermediateState, 'IntermediateState');
202
- initMetadataForLambda(StateMachineExecutor$internalExecute$slambda, CoroutineImpl, VOID, [1]);
203
- initMetadataForObject(StateMachineExecutor, 'StateMachineExecutor');
204
- initMetadataForCompanion(Companion_1);
205
- initMetadataForClass(AbstractTimedState, 'AbstractTimedState', VOID, AbstractState, [IntermediateState]);
206
- initMetadataForClass(StateEnd, 'StateEnd', VOID, AbstractState, [FinalState]);
207
- initMetadataForClass(True, 'True', VOID, StateEnd, [FinalState]);
208
- initMetadataForClass(False, 'False', VOID, StateEnd, [FinalState]);
209
- initMetadataForClass(Halt_0, 'Halt', VOID, StateEnd, [FinalState]);
210
- initMetadataForCompanion(Companion_2);
211
- initMetadataForLambda(StateGoalEvaluation$behaveTimed$slambda, CoroutineImpl, VOID, [1]);
212
- initMetadataForClass(StateGoalEvaluation, 'StateGoalEvaluation', VOID, AbstractTimedState);
213
- initMetadataForLambda(StateInit$behaveTimed$slambda, CoroutineImpl, VOID, [1]);
214
- initMetadataForClass(StateInit, 'StateInit', VOID, AbstractTimedState);
215
- initMetadataForCompanion(Companion_3);
216
- initMetadataForLambda(StateRuleSelection$behaveTimed$slambda, CoroutineImpl, VOID, [1]);
217
- initMetadataForClass(StateRuleSelection, 'StateRuleSelection', VOID, AbstractTimedState);
218
- initMetadataForObject(DefaultBuiltins, 'DefaultBuiltins', VOID, ExtensionLibrary);
219
- initMetadataForObject(Call, 'Call', VOID, PrimitiveWrapper);
220
- initMetadataForLambda(Catch$uncheckedImplementation$slambda, CoroutineImpl, VOID, [1]);
221
- initMetadataForObject(Catch, 'Catch', VOID, PrimitiveWrapper);
222
- initMetadataForLambda(Conjunction$uncheckedImplementation$slambda, CoroutineImpl, VOID, [1]);
223
- initMetadataForCoroutine($solveConjunctionGoalsCOROUTINE$, CoroutineImpl);
224
- initMetadataForObject(Conjunction, 'Conjunction', VOID, PrimitiveWrapper, VOID, [8]);
225
- initMetadataForObject(Cut, 'Cut', VOID, PrimitiveWrapper);
226
- initMetadataForLambda(Not$uncheckedImplementation$slambda, CoroutineImpl, VOID, [1]);
227
- initMetadataForObject(Not, 'Not', VOID, PrimitiveWrapper);
228
- initMetadataForObject(Throw, 'Throw', VOID, NonBacktrackable);
229
- //endregion
230
- function SolverStrategies$Companion$prologStandard$1() {
231
- }
232
- protoOf(SolverStrategies$Companion$prologStandard$1).b3d = function (predicationSequence, context) {
233
- return first(predicationSequence);
234
- };
235
- protoOf(SolverStrategies$Companion$prologStandard$1).c3d = function (unifiableClauses, context) {
236
- return first(unifiableClauses);
237
- };
238
- protoOf(SolverStrategies$Companion$prologStandard$1).d3d = function (term, context) {
239
- return term.yt();
240
- };
241
- function Companion() {
242
- Companion_instance_10 = this;
243
- var tmp = this;
244
- tmp.e3d_1 = new SolverStrategies$Companion$prologStandard$1();
245
- }
246
- var Companion_instance_10;
247
- function Companion_getInstance_5() {
248
- if (Companion_instance_10 == null)
249
- new Companion();
250
- return Companion_instance_10;
251
- }
252
- function SolverStrategies$clauseChoiceStrategy$ref(p0) {
253
- return constructCallableReference(function (p0_0, p1) {
254
- return p0.c3d(p0_0, p1);
255
- }, 2, 0, 94, 'clauseChoiceStrategy', [p0]);
256
- }
257
- function SolverStrategies$predicationChoiceStrategy$ref(p0) {
258
- return constructCallableReference(function (p0_0, p1) {
259
- return p0.b3d(p0_0, p1);
260
- }, 2, 0, 95, 'predicationChoiceStrategy', [p0]);
261
- }
262
- function StreamsSolver$Companion$solveToFinalStates$lambda(it) {
263
- return !(it == null) ? isInterface(it, FinalState) : false;
264
- }
265
- function StreamsSolver$Companion$solveToFinalStates$lambda_0($goalRequest) {
266
- return function (it) {
267
- return it.f3d().solution.q1v().equals($goalRequest.q1v());
268
- };
269
- }
270
- function StreamsSolver$Companion$solveToResponses$lambda(it) {
271
- return it.f3d();
272
- }
273
- function StreamsSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $this) {
274
- unificator = unificator === VOID ? Companion_getInstance().n1k() : unificator;
275
- libraries = libraries === VOID ? Companion_instance.empty() : libraries;
276
- flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
277
- staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
278
- dynamicKb = dynamicKb === VOID ? Companion_instance_1.empty(unificator) : dynamicKb;
279
- stdIn = stdIn === VOID ? Companion_instance_2.stdIn() : stdIn;
280
- stdOut = stdOut === VOID ? Companion_instance_3.stdOut() : stdOut;
281
- stdErr = stdErr === VOID ? Companion_instance_3.stdErr() : stdErr;
282
- warnings = warnings === VOID ? Companion_instance_3.warning() : warnings;
283
- StreamsSolver.call($this, unificator, libraries, flags, staticKb, dynamicKb, Companion_instance_4.q1x(stdIn), Companion_instance_5.t1x(stdOut, stdErr, warnings));
284
- return $this;
285
- }
286
- function StreamsSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
287
- return StreamsSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, objectCreate(protoOf(StreamsSolver)));
288
- }
289
- function Companion_0() {
290
- }
291
- protoOf(Companion_0).g3d = function (goalRequest) {
292
- // Inline function 'kotlin.sequences.filterIsInstance' call
293
- var this_0 = StateMachineExecutor_instance.h3d(new StateInit(goalRequest));
294
- var tmp = filter(this_0, StreamsSolver$Companion$solveToFinalStates$lambda);
295
- var tmp_0 = isInterface(tmp, Sequence) ? tmp : THROW_CCE();
296
- return filter(tmp_0, StreamsSolver$Companion$solveToFinalStates$lambda_0(goalRequest));
297
- };
298
- protoOf(Companion_0).i3d = function (goalRequest) {
299
- var tmp = this.g3d(goalRequest);
300
- return map(tmp, StreamsSolver$Companion$solveToResponses$lambda);
301
- };
302
- var Companion_instance_11;
303
- function Companion_getInstance_6() {
304
- return Companion_instance_11;
305
- }
306
- function StreamsSolver$solve$lambda(this$0) {
307
- return function (it) {
308
- this$0.j3d_1 = it.i8().z30(it.f3d().sideEffects);
309
- return it.f3d().solution.cleanUp();
310
- };
311
- }
312
- function StreamsSolver(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels) {
313
- unificator = unificator === VOID ? Companion_getInstance().n1k() : unificator;
314
- libraries = libraries === VOID ? Companion_instance.empty() : libraries;
315
- flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
316
- staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
317
- dynamicKb = dynamicKb === VOID ? Companion_instance_0.empty(unificator) : dynamicKb;
318
- inputChannels = inputChannels === VOID ? Companion_instance_4.fromStandard() : inputChannels;
319
- outputChannels = outputChannels === VOID ? Companion_instance_5.fromStandard() : outputChannels;
320
- this.j3d_1 = new StreamsExecutionContext(unificator, libraries, flags, staticKb, dynamicKb, toOperatorSet(getAllOperators(libraries, [staticKb, dynamicKb])), inputChannels, outputChannels);
321
- }
322
- protoOf(StreamsSolver).o2a = function (goal, options) {
323
- this.j3d_1 = new StreamsExecutionContext(this.u1k(), this.r1u(), this.s1u(), this.t1u(), this.u1u(), VOID, this.v1u(), this.w1u(), VOID, VOID, VOID, options.y1w());
324
- var tmp = Companion_instance_11.g3d(new Request(extractSignature(goal), goal.bu(), this.j3d_1));
325
- var solutionSequence = map(tmp, StreamsSolver$solve$lambda(this));
326
- if (options.z1w() > 0) {
327
- solutionSequence = take(solutionSequence, options.z1w());
328
- }
329
- if (options.x1w()) {
330
- solutionSequence = buffered(solutionSequence);
331
- }
332
- return solutionSequence;
333
- };
334
- protoOf(StreamsSolver).solveWithOptions = function (goal, options) {
335
- return this.o2a(goal, options);
336
- };
337
- protoOf(StreamsSolver).i1v = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
338
- return StreamsSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
339
- };
340
- protoOf(StreamsSolver).copy = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
341
- return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof StreamsSolver) ? $super : THROW_CCE());
342
- };
343
- protoOf(StreamsSolver).u1k = function () {
344
- return this.j3d_1.k3d_1;
345
- };
346
- protoOf(StreamsSolver).r1u = function () {
347
- return this.j3d_1.l3d_1;
348
- };
349
- protoOf(StreamsSolver).s1u = function () {
350
- return this.j3d_1.m3d_1;
351
- };
352
- protoOf(StreamsSolver).t1u = function () {
353
- return this.j3d_1.n3d_1;
354
- };
355
- protoOf(StreamsSolver).u1u = function () {
356
- return this.j3d_1.o3d_1;
357
- };
358
- protoOf(StreamsSolver).v1u = function () {
359
- return this.j3d_1.q3d_1;
360
- };
361
- protoOf(StreamsSolver).w1u = function () {
362
- return this.j3d_1.r3d_1;
363
- };
364
- protoOf(StreamsSolver).a1v = function () {
365
- return this.j3d_1.p3d_1;
366
- };
367
- function StreamsSolverFactory() {
368
- }
369
- protoOf(StreamsSolverFactory).d1x = function () {
370
- return DefaultBuiltins_getInstance();
371
- };
372
- protoOf(StreamsSolverFactory).o1x = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
373
- return new StreamsSolver(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs);
374
- };
375
- protoOf(StreamsSolverFactory).rawSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, $super) {
376
- return this.rawSolverOf(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, ($super == null ? true : $super instanceof StreamsSolverFactory) ? $super : THROW_CCE());
377
- };
378
- protoOf(StreamsSolverFactory).u1x = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
379
- return new StreamsSolver(unificator, libraries, flags, staticKb, dynamicKb, Companion_instance_4.q1x(stdIn), Companion_instance_5.t1x(stdOut, stdErr, warnings));
380
- };
381
- protoOf(StreamsSolverFactory).solverOf = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
382
- return this.solverOf(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof StreamsSolverFactory) ? $super : THROW_CCE());
383
- };
384
- protoOf(StreamsSolverFactory).w1x = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
385
- // Inline function 'kotlin.TODO' call
386
- var reason = 'Mutable stream solver is not supported yet';
387
- throw new NotImplementedError('An operation is not implemented: ' + reason);
388
- };
389
- protoOf(StreamsSolverFactory).mutableSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
390
- return this.mutableSolverOf(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof StreamsSolverFactory) ? $super : THROW_CCE());
391
- };
392
- protoOf(StreamsSolverFactory).y1x = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
393
- // Inline function 'kotlin.TODO' call
394
- var reason = 'Mutable stream solver is not supported yet';
395
- throw new NotImplementedError('An operation is not implemented: ' + reason);
396
- };
397
- protoOf(StreamsSolverFactory).rawMutableSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, $super) {
398
- return this.rawMutableSolverOf(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, ($super == null ? true : $super instanceof StreamsSolverFactory) ? $super : THROW_CCE());
399
- };
400
- var StreamsSolverFactory_instance;
401
- function StreamsSolverFactory_getInstance() {
402
- return StreamsSolverFactory_instance;
403
- }
404
- function getFirstChoicePointContext($this) {
405
- // Inline function 'kotlin.collections.filter' call
406
- var tmp0 = $this.z3d_1;
407
- // Inline function 'kotlin.collections.filterTo' call
408
- var destination = ArrayList_init_$Create$();
409
- var _iterator__ex2g4s = tmp0.n();
410
- while (_iterator__ex2g4s.q()) {
411
- var element = _iterator__ex2g4s.r();
412
- if (element.x3d_1.a3e_1) {
413
- destination.l(element);
414
- }
415
- }
416
- // Inline function 'kotlin.collections.mapNotNull' call
417
- // Inline function 'kotlin.collections.mapNotNullTo' call
418
- var destination_0 = ArrayList_init_$Create$();
419
- // Inline function 'kotlin.collections.forEach' call
420
- var _iterator__ex2g4s_0 = destination.n();
421
- while (_iterator__ex2g4s_0.q()) {
422
- var element_0 = _iterator__ex2g4s_0.r();
423
- var tmp0_safe_receiver = firstOrNull(element_0.x3d_1.z3d_1);
424
- if (tmp0_safe_receiver == null)
425
- null;
426
- else {
427
- // Inline function 'kotlin.let' call
428
- destination_0.l(tmp0_safe_receiver);
429
- }
430
- }
431
- return destination_0;
432
- }
433
- function SideEffectManagerImpl(clauseScopedParents, isChoicePointChild, toCutContextsParent, logicalParentRequests, throwNonSelectableParentContexts, throwRelatedToCutContextsParent) {
434
- clauseScopedParents = clauseScopedParents === VOID ? emptyList() : clauseScopedParents;
435
- isChoicePointChild = isChoicePointChild === VOID ? false : isChoicePointChild;
436
- toCutContextsParent = toCutContextsParent === VOID ? emptySequence() : toCutContextsParent;
437
- logicalParentRequests = logicalParentRequests === VOID ? emptyList() : logicalParentRequests;
438
- throwNonSelectableParentContexts = throwNonSelectableParentContexts === VOID ? emptySequence() : throwNonSelectableParentContexts;
439
- throwRelatedToCutContextsParent = throwRelatedToCutContextsParent === VOID ? null : throwRelatedToCutContextsParent;
440
- this.z3d_1 = clauseScopedParents;
441
- this.a3e_1 = isChoicePointChild;
442
- this.b3e_1 = toCutContextsParent;
443
- this.c3e_1 = logicalParentRequests;
444
- this.d3e_1 = throwNonSelectableParentContexts;
445
- this.e3e_1 = throwRelatedToCutContextsParent;
446
- }
447
- protoOf(SideEffectManagerImpl).f3e = function () {
448
- return this.g3e(VOID, VOID, plus(this.b3e_1, getFirstChoicePointContext(this)));
449
- };
450
- protoOf(SideEffectManagerImpl).cut = function () {
451
- return this.f3e();
452
- };
453
- protoOf(SideEffectManagerImpl).h3e = function (currentContext) {
454
- // Inline function 'kotlin.apply' call
455
- var this_0 = toMutableList(this.z3d_1);
456
- this_0.s3(0, currentContext);
457
- return this.g3e(this_0, false);
458
- };
459
- protoOf(SideEffectManagerImpl).i3e = function (currentContext, isChoicePointChild, logicalParentRequest) {
460
- // Inline function 'kotlin.apply' call
461
- var this_0 = toMutableList(this.z3d_1);
462
- this_0.s3(0, currentContext);
463
- var tmp = this_0;
464
- var tmp_0;
465
- if (this.c3e_1.y(logicalParentRequest)) {
466
- // Inline function 'kotlin.collections.dropWhile' call
467
- var this_1 = this.c3e_1;
468
- var yielding = false;
469
- var list = ArrayList_init_$Create$();
470
- var _iterator__ex2g4s = this_1.n();
471
- while (_iterator__ex2g4s.q()) {
472
- var item = _iterator__ex2g4s.r();
473
- if (yielding) {
474
- list.l(item);
475
- } else {
476
- if (!!item.equals(logicalParentRequest)) {
477
- list.l(item);
478
- yielding = true;
479
- }
480
- }
481
- }
482
- tmp_0 = list;
483
- } else {
484
- // Inline function 'kotlin.apply' call
485
- var this_2 = toMutableList(this.c3e_1);
486
- this_2.s3(0, logicalParentRequest);
487
- tmp_0 = this_2;
488
- }
489
- return this.g3e(tmp, isChoicePointChild, VOID, tmp_0);
490
- };
491
- protoOf(SideEffectManagerImpl).j3e = function () {
492
- return this.g3e(listOf(first_0(this.z3d_1)));
493
- };
494
- protoOf(SideEffectManagerImpl).k3e = function (upperScopeSideEffectsManager) {
495
- // Inline function 'kotlin.apply' call
496
- var this_0 = toMutableList(this.z3d_1);
497
- this_0.w(upperScopeSideEffectsManager.z3d_1);
498
- return this.g3e(this_0);
499
- };
500
- protoOf(SideEffectManagerImpl).l3e = function () {
501
- return contains(this.b3e_1, lastOrNull(this.z3d_1)) || this.m3e();
502
- };
503
- protoOf(SideEffectManagerImpl).n3e = function (toUnifyArgument) {
504
- // Inline function 'kotlin.collections.filter' call
505
- var tmp0 = this.c3e_1;
506
- // Inline function 'kotlin.collections.filterTo' call
507
- var destination = ArrayList_init_$Create$();
508
- var _iterator__ex2g4s = tmp0.n();
509
- while (_iterator__ex2g4s.q()) {
510
- var element = _iterator__ex2g4s.r();
511
- if (element.signature.equals(Catch_getInstance().signature)) {
512
- destination.l(element);
513
- }
514
- }
515
- // Inline function 'kotlin.collections.filterNot' call
516
- // Inline function 'kotlin.collections.filterNotTo' call
517
- var destination_0 = ArrayList_init_$Create$();
518
- var _iterator__ex2g4s_0 = destination.n();
519
- while (_iterator__ex2g4s_0.q()) {
520
- var element_0 = _iterator__ex2g4s_0.r();
521
- if (!contains(this.d3e_1, element_0.context)) {
522
- destination_0.l(element_0);
523
- }
524
- }
525
- var ancestorCatchesRequests = destination_0;
526
- // Inline function 'kotlin.collections.find' call
527
- var tmp$ret$7;
528
- $l$block: {
529
- // Inline function 'kotlin.collections.firstOrNull' call
530
- var _iterator__ex2g4s_1 = ancestorCatchesRequests.n();
531
- while (_iterator__ex2g4s_1.q()) {
532
- var element_1 = _iterator__ex2g4s_1.r();
533
- if (Companion_getInstance().matches(element_1.arguments.x(1), toUnifyArgument)) {
534
- tmp$ret$7 = element_1;
535
- break $l$block;
536
- }
537
- }
538
- tmp$ret$7 = null;
539
- }
540
- return tmp$ret$7;
541
- };
542
- protoOf(SideEffectManagerImpl).o3e = function (ancestorCatchContext) {
543
- return this.g3e(VOID, VOID, VOID, VOID, VOID, ancestorCatchContext);
544
- };
545
- protoOf(SideEffectManagerImpl).p3e = function (contextImpl) {
546
- return equals(this.e3e_1, contextImpl);
547
- };
548
- protoOf(SideEffectManagerImpl).q3e = function (contextImpl) {
549
- return this.g3e(VOID, VOID, VOID, VOID, plus_0(this.d3e_1, contextImpl));
550
- };
551
- protoOf(SideEffectManagerImpl).r3e = function (toRecoverSituation) {
552
- return this.g3e(VOID, VOID, toRecoverSituation.b3e_1);
553
- };
554
- protoOf(SideEffectManagerImpl).m3e = function () {
555
- var tmp0 = this.c3e_1;
556
- var tmp$ret$0;
557
- $l$block_0: {
558
- // Inline function 'kotlin.collections.any' call
559
- var tmp;
560
- if (isInterface(tmp0, Collection)) {
561
- tmp = tmp0.h();
562
- } else {
563
- tmp = false;
564
- }
565
- if (tmp) {
566
- tmp$ret$0 = false;
567
- break $l$block_0;
568
- }
569
- var _iterator__ex2g4s = tmp0.n();
570
- while (_iterator__ex2g4s.q()) {
571
- var element = _iterator__ex2g4s.r();
572
- if (element.context.equals(this.e3e_1)) {
573
- tmp$ret$0 = true;
574
- break $l$block_0;
575
- }
576
- }
577
- tmp$ret$0 = false;
578
- }
579
- return tmp$ret$0;
580
- };
581
- protoOf(SideEffectManagerImpl).s3e = function (clauseScopedParents, isChoicePointChild, toCutContextsParent, logicalParentRequests, throwNonSelectableParentContexts, throwRelatedToCutContextsParent) {
582
- return new SideEffectManagerImpl(clauseScopedParents, isChoicePointChild, toCutContextsParent, logicalParentRequests, throwNonSelectableParentContexts, throwRelatedToCutContextsParent);
583
- };
584
- protoOf(SideEffectManagerImpl).g3e = function (clauseScopedParents, isChoicePointChild, toCutContextsParent, logicalParentRequests, throwNonSelectableParentContexts, throwRelatedToCutContextsParent, $super) {
585
- clauseScopedParents = clauseScopedParents === VOID ? this.z3d_1 : clauseScopedParents;
586
- isChoicePointChild = isChoicePointChild === VOID ? this.a3e_1 : isChoicePointChild;
587
- toCutContextsParent = toCutContextsParent === VOID ? this.b3e_1 : toCutContextsParent;
588
- logicalParentRequests = logicalParentRequests === VOID ? this.c3e_1 : logicalParentRequests;
589
- throwNonSelectableParentContexts = throwNonSelectableParentContexts === VOID ? this.d3e_1 : throwNonSelectableParentContexts;
590
- throwRelatedToCutContextsParent = throwRelatedToCutContextsParent === VOID ? this.e3e_1 : throwRelatedToCutContextsParent;
591
- return $super === VOID ? this.s3e(clauseScopedParents, isChoicePointChild, toCutContextsParent, logicalParentRequests, throwNonSelectableParentContexts, throwRelatedToCutContextsParent) : $super.s3e.call(this, clauseScopedParents, isChoicePointChild, toCutContextsParent, logicalParentRequests, throwNonSelectableParentContexts, throwRelatedToCutContextsParent);
592
- };
593
- protoOf(SideEffectManagerImpl).toString = function () {
594
- return 'SideEffectManagerImpl(clauseScopedParents=' + toString(this.z3d_1) + ', isChoicePointChild=' + this.a3e_1 + ', toCutContextsParent=' + toString(this.b3e_1) + ', logicalParentRequests=' + toString(this.c3e_1) + ', throwNonSelectableParentContexts=' + toString(this.d3e_1) + ', throwRelatedToCutContextsParent=' + toString_0(this.e3e_1) + ')';
595
- };
596
- protoOf(SideEffectManagerImpl).hashCode = function () {
597
- var result = hashCode(this.z3d_1);
598
- result = imul(result, 31) + getBooleanHashCode(this.a3e_1) | 0;
599
- result = imul(result, 31) + hashCode(this.b3e_1) | 0;
600
- result = imul(result, 31) + hashCode(this.c3e_1) | 0;
601
- result = imul(result, 31) + hashCode(this.d3e_1) | 0;
602
- result = imul(result, 31) + (this.e3e_1 == null ? 0 : this.e3e_1.hashCode()) | 0;
603
- return result;
604
- };
605
- protoOf(SideEffectManagerImpl).equals = function (other) {
606
- if (this === other)
607
- return true;
608
- if (!(other instanceof SideEffectManagerImpl))
609
- return false;
610
- if (!equals(this.z3d_1, other.z3d_1))
611
- return false;
612
- if (!(this.a3e_1 === other.a3e_1))
613
- return false;
614
- if (!equals(this.b3e_1, other.b3e_1))
615
- return false;
616
- if (!equals(this.c3e_1, other.c3e_1))
617
- return false;
618
- if (!equals(this.d3e_1, other.d3e_1))
619
- return false;
620
- if (!equals(this.e3e_1, other.e3e_1))
621
- return false;
622
- return true;
623
- };
624
- function resetCutWorkChanges(_this__u8e3s4, toRecoverSituation) {
625
- var tmp0_safe_receiver = _this__u8e3s4 instanceof SideEffectManagerImpl ? _this__u8e3s4 : null;
626
- return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.r3e(toRecoverSituation);
627
- }
628
- function isSelectedThrowCatch(_this__u8e3s4, context) {
629
- var tmp0_safe_receiver = _this__u8e3s4 instanceof SideEffectManagerImpl ? _this__u8e3s4 : null;
630
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p3e(context);
631
- return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
632
- }
633
- function shouldExecuteThrowCut(_this__u8e3s4) {
634
- var tmp0_safe_receiver = _this__u8e3s4 instanceof SideEffectManagerImpl ? _this__u8e3s4 : null;
635
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m3e();
636
- return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
637
- }
638
- function shouldCutExecuteInRuleSelection(_this__u8e3s4) {
639
- var tmp0_safe_receiver = _this__u8e3s4 instanceof SideEffectManagerImpl ? _this__u8e3s4 : null;
640
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l3e();
641
- return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
642
- }
643
- function extendParentScopeWith(_this__u8e3s4, upperScopeSideEffectsManager) {
644
- var tmp0_safe_receiver = _this__u8e3s4 instanceof SideEffectManagerImpl ? _this__u8e3s4 : null;
645
- return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.k3e(upperScopeSideEffectsManager);
646
- }
647
- function isWellFormed(_this__u8e3s4) {
648
- return _this__u8e3s4.accept(Companion_getInstance_1().bodyWellFormedVisitor);
649
- }
650
- function newSolveRequest(_this__u8e3s4, newGoal, toAddSubstitutions, toPropagateContextData, baseSideEffectManager, requestIssuingInstant, isChoicePointChild) {
651
- toAddSubstitutions = toAddSubstitutions === VOID ? Companion_getInstance_2().empty() : toAddSubstitutions;
652
- toPropagateContextData = toPropagateContextData === VOID ? _this__u8e3s4.context : toPropagateContextData;
653
- baseSideEffectManager = baseSideEffectManager === VOID ? _this__u8e3s4.context.x3d_1 : baseSideEffectManager;
654
- requestIssuingInstant = requestIssuingInstant === VOID ? _this__u8e3s4.p28_1 : requestIssuingInstant;
655
- isChoicePointChild = isChoicePointChild === VOID ? false : isChoicePointChild;
656
- var tmp = extractSignature(newGoal);
657
- var tmp_0 = newGoal.bu();
658
- var tmp_1 = toPropagateContextData.r1u();
659
- var tmp_2 = toPropagateContextData.s1u();
660
- var tmp_3 = toPropagateContextData.t1u();
661
- var tmp_4 = toPropagateContextData.u1u();
662
- var tmp_5 = toPropagateContextData.v1u();
663
- var tmp_6 = toPropagateContextData.w1u();
664
- var tmp_7 = _this__u8e3s4.context.t3d_1.plus(toAddSubstitutions);
665
- return _this__u8e3s4.l2h(tmp, tmp_0, _this__u8e3s4.context.t3e(VOID, tmp_1, tmp_2, tmp_3, tmp_4, VOID, tmp_5, tmp_6, VOID, isInterface(tmp_7, Unifier) ? tmp_7 : THROW_CCE(), VOID, VOID, VOID, baseSideEffectManager.i3e(_this__u8e3s4.context, isChoicePointChild, _this__u8e3s4)), requestIssuingInstant);
666
- }
667
- function prepareForExecutionAsGoal(_this__u8e3s4) {
668
- return single(prepareForExecution(Companion_instance_6.of(_this__u8e3s4, [])).bu()).uu();
669
- }
670
- function replyWith(_this__u8e3s4, otherResponse) {
671
- // Inline function 'kotlin.with' call
672
- var tmp0_elvis_lhs = otherResponse.sideEffectManager;
673
- var tmp = tmp0_elvis_lhs == null ? getSideEffectManager(_this__u8e3s4.context) : tmp0_elvis_lhs;
674
- // Inline function 'kotlin.collections.toTypedArray' call
675
- var this_0 = otherResponse.sideEffects;
676
- var tmp$ret$2 = copyToArray(this_0);
677
- return _this__u8e3s4.e2h(otherResponse.solution, tmp, tmp$ret$2.slice());
678
- }
679
- function orderWithStrategy(_this__u8e3s4, context, selectionStrategy) {
680
- var tmp;
681
- if (any(_this__u8e3s4) === true) {
682
- tmp = sequence(orderWithStrategy$slambda_0(selectionStrategy, _this__u8e3s4, context, null));
683
- } else {
684
- tmp = emptySequence();
685
- }
686
- return tmp;
687
- }
688
- function addWithNoDuplicates(_this__u8e3s4, toAddSideEffects) {
689
- var duplicatedCount = 0;
690
- // Inline function 'kotlin.collections.forEach' call
691
- var _iterator__ex2g4s = _this__u8e3s4.n();
692
- while (_iterator__ex2g4s.q()) {
693
- var element = _iterator__ex2g4s.r();
694
- // Inline function 'kotlin.collections.find' call
695
- var tmp$ret$3;
696
- $l$block: {
697
- // Inline function 'kotlin.collections.firstOrNull' call
698
- var _iterator__ex2g4s_0 = toAddSideEffects.n();
699
- while (_iterator__ex2g4s_0.q()) {
700
- var element_0 = _iterator__ex2g4s_0.r();
701
- if (element === element_0) {
702
- tmp$ret$3 = element_0;
703
- break $l$block;
704
- }
705
- }
706
- tmp$ret$3 = null;
707
- }
708
- if (!(tmp$ret$3 === null)) {
709
- duplicatedCount = duplicatedCount + 1 | 0;
710
- }
711
- }
712
- return plus_1(_this__u8e3s4, drop(toAddSideEffects, duplicatedCount));
713
- }
714
- function moreThanOne(elements) {
715
- // Inline function 'kotlin.with' call
716
- var $this$with = elements.n();
717
- var tmp;
718
- if (!$this$with.q()) {
719
- tmp = false;
720
- } else {
721
- $this$with.r();
722
- tmp = $this$with.q();
723
- }
724
- return tmp;
725
- }
726
- function orderWithStrategy$slambda$lambda($this_orderWithStrategy, $selected) {
727
- return function (index, _unused_var__etf5q3) {
728
- return !(index === indexOf($this_orderWithStrategy, $selected));
729
- };
730
- }
731
- function orderWithStrategy$slambda($selectionStrategy, $this_orderWithStrategy, $context, resultContinuation) {
732
- this.c3f_1 = $selectionStrategy;
733
- this.d3f_1 = $this_orderWithStrategy;
734
- this.e3f_1 = $context;
735
- CoroutineImpl.call(this, resultContinuation);
736
- }
737
- protoOf(orderWithStrategy$slambda).h3f = function ($this$sequence, $completion) {
738
- var tmp = this.i3f($this$sequence, $completion);
739
- tmp.e8_1 = Unit_instance;
740
- tmp.f8_1 = null;
741
- return tmp.k8();
742
- };
743
- protoOf(orderWithStrategy$slambda).b9 = function (p1, $completion) {
744
- return this.h3f(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
745
- };
746
- protoOf(orderWithStrategy$slambda).k8 = function () {
747
- var suspendResult = this.e8_1;
748
- $sm: do
749
- try {
750
- var tmp = this.c8_1;
751
- switch (tmp) {
752
- case 0:
753
- this.d8_1 = 3;
754
- this.g3f_1 = this.c3f_1(this.d3f_1, this.e3f_1);
755
- this.c8_1 = 1;
756
- suspendResult = this.f3f_1.cd(this.g3f_1, this);
757
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
758
- return suspendResult;
759
- }
760
-
761
- continue $sm;
762
- case 1:
763
- this.c8_1 = 2;
764
- suspendResult = this.f3f_1.fd(orderWithStrategy(filterIndexed(this.d3f_1, orderWithStrategy$slambda$lambda(this.d3f_1, this.g3f_1)), this.e3f_1, this.c3f_1), this);
765
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
766
- return suspendResult;
767
- }
768
-
769
- continue $sm;
770
- case 2:
771
- return Unit_instance;
772
- case 3:
773
- throw this.f8_1;
774
- }
775
- } catch ($p) {
776
- var e = $p;
777
- if (this.d8_1 === 3) {
778
- throw e;
779
- } else {
780
- this.c8_1 = this.d8_1;
781
- this.f8_1 = e;
782
- }
783
- }
784
- while (true);
785
- };
786
- protoOf(orderWithStrategy$slambda).i3f = function ($this$sequence, completion) {
787
- var i = new orderWithStrategy$slambda(this.c3f_1, this.d3f_1, this.e3f_1, completion);
788
- i.f3f_1 = $this$sequence;
789
- return i;
790
- };
791
- function orderWithStrategy$slambda_0($selectionStrategy, $this_orderWithStrategy, $context, resultContinuation) {
792
- var i = new orderWithStrategy$slambda($selectionStrategy, $this_orderWithStrategy, $context, resultContinuation);
793
- return constructCallableReference(function ($this$sequence, $completion) {
794
- return i.h3f($this$sequence, $completion);
795
- }, 1);
796
- }
797
- function StreamsExecutionContext_init_$Init$(context, newCurrentSubstitution, $this) {
798
- var tmp = context.u1k();
799
- var tmp_0 = context.r1u();
800
- var tmp_1 = context.s1u();
801
- var tmp_2 = context.t1u();
802
- var tmp_3 = context.u1u();
803
- var tmp_4 = context.a1v();
804
- var tmp_5 = context.v1u();
805
- var tmp_6 = context.w1u();
806
- var tmp_7 = context.p1u();
807
- var tmp0_safe_receiver = context instanceof StreamsExecutionContext ? context : null;
808
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w3d_1;
809
- var tmp_8 = tmp1_elvis_lhs == null ? Companion_getInstance_5().e3d_1 : tmp1_elvis_lhs;
810
- var tmp2_safe_receiver = context instanceof StreamsExecutionContext ? context : null;
811
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.x3d_1;
812
- StreamsExecutionContext.call($this, tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tmp_7, newCurrentSubstitution, VOID, VOID, tmp_8, tmp3_elvis_lhs == null ? new SideEffectManagerImpl() : tmp3_elvis_lhs);
813
- return $this;
814
- }
815
- function StreamsExecutionContext_init_$Create$(context, newCurrentSubstitution) {
816
- return StreamsExecutionContext_init_$Init$(context, newCurrentSubstitution, objectCreate(protoOf(StreamsExecutionContext)));
817
- }
818
- function StreamsExecutionContext$logicStackTrace$delegate$lambda$lambda(it) {
819
- return it.q1v();
820
- }
821
- function StreamsExecutionContext$logicStackTrace$delegate$lambda(this$0) {
822
- return function () {
823
- var tmp = asSequence(this$0.x3d_1.c3e_1);
824
- return toList(map(tmp, StreamsExecutionContext$logicStackTrace$delegate$lambda$lambda));
825
- };
826
- }
827
- function StreamsExecutionContext$_get_logicStackTrace_$ref_tj4lit() {
828
- return constructCallableReference(function (p0) {
829
- return p0.o1u();
830
- }, 1, 0, 96);
831
- }
832
- function StreamsExecutionContext(unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, startTime, maxDuration, solverStrategies, sideEffectManager) {
833
- unificator = unificator === VOID ? Companion_getInstance().n1k() : unificator;
834
- libraries = libraries === VOID ? Companion_instance.empty() : libraries;
835
- flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
836
- staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
837
- dynamicKb = dynamicKb === VOID ? Companion_instance_0.empty(unificator) : dynamicKb;
838
- operators = operators === VOID ? toOperatorSet(getAllOperators(libraries, [staticKb, dynamicKb])) : operators;
839
- inputChannels = inputChannels === VOID ? Companion_instance_4.fromStandard() : inputChannels;
840
- outputChannels = outputChannels === VOID ? Companion_instance_5.fromStandard() : outputChannels;
841
- customData = customData === VOID ? Companion_instance_7.empty() : customData;
842
- substitution = substitution === VOID ? Companion_getInstance_2().empty() : substitution;
843
- startTime = startTime === VOID ? currentTimeInstant() : startTime;
844
- maxDuration = maxDuration === VOID ? 9223372036854775807n : maxDuration;
845
- solverStrategies = solverStrategies === VOID ? Companion_getInstance_5().e3d_1 : solverStrategies;
846
- sideEffectManager = sideEffectManager === VOID ? new SideEffectManagerImpl() : sideEffectManager;
847
- this.k3d_1 = unificator;
848
- this.l3d_1 = libraries;
849
- this.m3d_1 = flags;
850
- this.n3d_1 = staticKb;
851
- this.o3d_1 = dynamicKb;
852
- this.p3d_1 = operators;
853
- this.q3d_1 = inputChannels;
854
- this.r3d_1 = outputChannels;
855
- this.s3d_1 = customData;
856
- this.t3d_1 = substitution;
857
- this.u3d_1 = startTime;
858
- this.v3d_1 = maxDuration;
859
- this.w3d_1 = solverStrategies;
860
- this.x3d_1 = sideEffectManager;
861
- var tmp = this;
862
- tmp.y3d_1 = lazy(StreamsExecutionContext$logicStackTrace$delegate$lambda(this));
863
- }
864
- protoOf(StreamsExecutionContext).u1k = function () {
865
- return this.k3d_1;
866
- };
867
- protoOf(StreamsExecutionContext).r1u = function () {
868
- return this.l3d_1;
869
- };
870
- protoOf(StreamsExecutionContext).s1u = function () {
871
- return this.m3d_1;
872
- };
873
- protoOf(StreamsExecutionContext).t1u = function () {
874
- return this.n3d_1;
875
- };
876
- protoOf(StreamsExecutionContext).u1u = function () {
877
- return this.o3d_1;
878
- };
879
- protoOf(StreamsExecutionContext).a1v = function () {
880
- return this.p3d_1;
881
- };
882
- protoOf(StreamsExecutionContext).v1u = function () {
883
- return this.q3d_1;
884
- };
885
- protoOf(StreamsExecutionContext).w1u = function () {
886
- return this.r3d_1;
887
- };
888
- protoOf(StreamsExecutionContext).p1u = function () {
889
- return this.s3d_1;
890
- };
891
- protoOf(StreamsExecutionContext).n1u = function () {
892
- return this.t3d_1;
893
- };
894
- protoOf(StreamsExecutionContext).h1u = function () {
895
- return this.u3d_1;
896
- };
897
- protoOf(StreamsExecutionContext).j1u = function () {
898
- return this.v3d_1;
899
- };
900
- protoOf(StreamsExecutionContext).m1u = function () {
901
- // Inline function 'kotlin.collections.map' call
902
- var this_0 = this.x3d_1.c3e_1;
903
- // Inline function 'kotlin.collections.mapTo' call
904
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
905
- var _iterator__ex2g4s = this_0.n();
906
- while (_iterator__ex2g4s.q()) {
907
- var item = _iterator__ex2g4s.r();
908
- var tmp$ret$2 = item.q1v();
909
- destination.l(tmp$ret$2);
910
- }
911
- return firstOrNull(destination);
912
- };
913
- protoOf(StreamsExecutionContext).o1u = function () {
914
- var tmp0 = this.y3d_1;
915
- var tmp = KProperty1;
916
- // Inline function 'kotlin.getValue' call
917
- getPropertyCallableRef('logicStackTrace', 1, tmp, StreamsExecutionContext$_get_logicStackTrace_$ref_tj4lit(), null);
918
- return tmp0.f2();
919
- };
920
- protoOf(StreamsExecutionContext).q1u = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels) {
921
- return new StreamsSolver(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels);
922
- };
923
- protoOf(StreamsExecutionContext).createSolver = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, $super) {
924
- return this.createSolver(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, ($super == null ? true : $super instanceof StreamsExecutionContext) ? $super : THROW_CCE());
925
- };
926
- protoOf(StreamsExecutionContext).x1u = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels) {
927
- // Inline function 'kotlin.TODO' call
928
- var reason = 'Not yet implemented';
929
- throw new NotImplementedError('An operation is not implemented: ' + reason);
930
- };
931
- protoOf(StreamsExecutionContext).createMutableSolver = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, $super) {
932
- return this.createMutableSolver(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, ($super == null ? true : $super instanceof StreamsExecutionContext) ? $super : THROW_CCE());
933
- };
934
- protoOf(StreamsExecutionContext).y30 = function (sideEffect) {
935
- var tmp = apply.call(this, sideEffect);
936
- return tmp instanceof StreamsExecutionContext ? tmp : THROW_CCE();
937
- };
938
- protoOf(StreamsExecutionContext).apply = function (sideEffect) {
939
- return this.y30(sideEffect);
940
- };
941
- protoOf(StreamsExecutionContext).z30 = function (sideEffects) {
942
- var tmp = applyIterable.call(this, sideEffects);
943
- return tmp instanceof StreamsExecutionContext ? tmp : THROW_CCE();
944
- };
945
- protoOf(StreamsExecutionContext).applyIterable = function (sideEffects) {
946
- return this.z30(sideEffects);
947
- };
948
- protoOf(StreamsExecutionContext).a31 = function (sideEffects) {
949
- var tmp = applySequence.call(this, sideEffects);
950
- return tmp instanceof StreamsExecutionContext ? tmp : THROW_CCE();
951
- };
952
- protoOf(StreamsExecutionContext).applySequence = function (sideEffects) {
953
- return this.a31(sideEffects);
954
- };
955
- protoOf(StreamsExecutionContext).z1u = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData) {
956
- return this.t3e(unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData);
957
- };
958
- protoOf(StreamsExecutionContext).update = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, $super) {
959
- return this.update(unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, ($super == null ? true : $super instanceof StreamsExecutionContext) ? $super : THROW_CCE());
960
- };
961
- protoOf(StreamsExecutionContext).j3f = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, startTime, maxDuration, solverStrategies, sideEffectManager) {
962
- return new StreamsExecutionContext(unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, startTime, maxDuration, solverStrategies, sideEffectManager);
963
- };
964
- protoOf(StreamsExecutionContext).t3e = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, startTime, maxDuration, solverStrategies, sideEffectManager, $super) {
965
- unificator = unificator === VOID ? this.k3d_1 : unificator;
966
- libraries = libraries === VOID ? this.l3d_1 : libraries;
967
- flags = flags === VOID ? this.m3d_1 : flags;
968
- staticKb = staticKb === VOID ? this.n3d_1 : staticKb;
969
- dynamicKb = dynamicKb === VOID ? this.o3d_1 : dynamicKb;
970
- operators = operators === VOID ? this.p3d_1 : operators;
971
- inputChannels = inputChannels === VOID ? this.q3d_1 : inputChannels;
972
- outputChannels = outputChannels === VOID ? this.r3d_1 : outputChannels;
973
- customData = customData === VOID ? this.s3d_1 : customData;
974
- substitution = substitution === VOID ? this.t3d_1 : substitution;
975
- startTime = startTime === VOID ? this.u3d_1 : startTime;
976
- maxDuration = maxDuration === VOID ? this.v3d_1 : maxDuration;
977
- solverStrategies = solverStrategies === VOID ? this.w3d_1 : solverStrategies;
978
- sideEffectManager = sideEffectManager === VOID ? this.x3d_1 : sideEffectManager;
979
- return $super === VOID ? this.j3f(unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, startTime, maxDuration, solverStrategies, sideEffectManager) : $super.j3f.call(this, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, startTime, maxDuration, solverStrategies, sideEffectManager);
980
- };
981
- protoOf(StreamsExecutionContext).toString = function () {
982
- return 'StreamsExecutionContext(unificator=' + toString(this.k3d_1) + ', libraries=' + toString(this.l3d_1) + ', flags=' + this.m3d_1.toString() + ', staticKb=' + toString(this.n3d_1) + ', dynamicKb=' + toString(this.o3d_1) + ', operators=' + this.p3d_1.toString() + ', inputChannels=' + toString(this.q3d_1) + ', outputChannels=' + toString(this.r3d_1) + ', customData=' + this.s3d_1.toString() + ', substitution=' + toString(this.t3d_1) + ', startTime=' + this.u3d_1.toString() + ', maxDuration=' + this.v3d_1.toString() + ', solverStrategies=' + toString(this.w3d_1) + ', sideEffectManager=' + this.x3d_1.toString() + ')';
983
- };
984
- protoOf(StreamsExecutionContext).hashCode = function () {
985
- var result = hashCode(this.k3d_1);
986
- result = imul(result, 31) + hashCode(this.l3d_1) | 0;
987
- result = imul(result, 31) + this.m3d_1.hashCode() | 0;
988
- result = imul(result, 31) + hashCode(this.n3d_1) | 0;
989
- result = imul(result, 31) + hashCode(this.o3d_1) | 0;
990
- result = imul(result, 31) + this.p3d_1.hashCode() | 0;
991
- result = imul(result, 31) + hashCode(this.q3d_1) | 0;
992
- result = imul(result, 31) + hashCode(this.r3d_1) | 0;
993
- result = imul(result, 31) + this.s3d_1.hashCode() | 0;
994
- result = imul(result, 31) + hashCode(this.t3d_1) | 0;
995
- result = imul(result, 31) + getBigIntHashCode(this.u3d_1) | 0;
996
- result = imul(result, 31) + getBigIntHashCode(this.v3d_1) | 0;
997
- result = imul(result, 31) + hashCode(this.w3d_1) | 0;
998
- result = imul(result, 31) + this.x3d_1.hashCode() | 0;
999
- return result;
1000
- };
1001
- protoOf(StreamsExecutionContext).equals = function (other) {
1002
- if (this === other)
1003
- return true;
1004
- if (!(other instanceof StreamsExecutionContext))
1005
- return false;
1006
- if (!equals(this.k3d_1, other.k3d_1))
1007
- return false;
1008
- if (!equals(this.l3d_1, other.l3d_1))
1009
- return false;
1010
- if (!this.m3d_1.equals(other.m3d_1))
1011
- return false;
1012
- if (!equals(this.n3d_1, other.n3d_1))
1013
- return false;
1014
- if (!equals(this.o3d_1, other.o3d_1))
1015
- return false;
1016
- if (!this.p3d_1.equals(other.p3d_1))
1017
- return false;
1018
- if (!equals(this.q3d_1, other.q3d_1))
1019
- return false;
1020
- if (!equals(this.r3d_1, other.r3d_1))
1021
- return false;
1022
- if (!this.s3d_1.equals(other.s3d_1))
1023
- return false;
1024
- if (!equals(this.t3d_1, other.t3d_1))
1025
- return false;
1026
- if (!(this.u3d_1 === other.u3d_1))
1027
- return false;
1028
- if (!(this.v3d_1 === other.v3d_1))
1029
- return false;
1030
- if (!equals(this.w3d_1, other.w3d_1))
1031
- return false;
1032
- if (!this.x3d_1.equals(other.x3d_1))
1033
- return false;
1034
- return true;
1035
- };
1036
- function getSideEffectManager(_this__u8e3s4) {
1037
- var tmp0_safe_receiver = _this__u8e3s4 instanceof StreamsExecutionContext ? _this__u8e3s4 : null;
1038
- return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x3d_1;
1039
- }
1040
- function AbstractState(solve) {
1041
- this.k3f_1 = solve;
1042
- this.l3f_1 = false;
1043
- }
1044
- protoOf(AbstractState).m3f = function () {
1045
- return this.l3f_1;
1046
- };
1047
- function AlreadyExecutedState(wrappedState) {
1048
- this.o3f_1 = wrappedState;
1049
- this.p3f_1 = true;
1050
- }
1051
- protoOf(AlreadyExecutedState).m3f = function () {
1052
- return this.p3f_1;
1053
- };
1054
- protoOf(AlreadyExecutedState).toString = function () {
1055
- return 'AlreadyExecutedState of: ' + toString(this.o3f_1);
1056
- };
1057
- protoOf(AlreadyExecutedState).n3f = function () {
1058
- return this.o3f_1.n3f();
1059
- };
1060
- protoOf(AlreadyExecutedState).i8 = function () {
1061
- return this.o3f_1.i8();
1062
- };
1063
- function asAlreadyExecuted(_this__u8e3s4) {
1064
- var tmp0_safe_receiver = _this__u8e3s4 instanceof AlreadyExecutedState ? _this__u8e3s4 : null;
1065
- var tmp;
1066
- if (tmp0_safe_receiver == null) {
1067
- tmp = null;
1068
- } else {
1069
- // Inline function 'kotlin.let' call
1070
- tmp = tmp0_safe_receiver;
1071
- }
1072
- var tmp1_elvis_lhs = tmp;
1073
- return tmp1_elvis_lhs == null ? new AlreadyExecutedState(_this__u8e3s4) : tmp1_elvis_lhs;
1074
- }
1075
- function FinalState() {
1076
- }
1077
- function IntermediateState() {
1078
- }
1079
- function internalExecute($this, state) {
1080
- var tmp;
1081
- if (state.m3f()) {
1082
- tmp = sequenceOf(state);
1083
- } else {
1084
- tmp = sequence(StateMachineExecutor$internalExecute$slambda_0(state, null));
1085
- }
1086
- return tmp;
1087
- }
1088
- function StateMachineExecutor$execute$lambda(it) {
1089
- return StateMachineExecutor_instance.q3f(it);
1090
- }
1091
- function StateMachineExecutor$executeWrapping$lambda(it) {
1092
- return asAlreadyExecuted(it);
1093
- }
1094
- function StateMachineExecutor$internalExecute$slambda($state, resultContinuation) {
1095
- this.z3f_1 = $state;
1096
- CoroutineImpl.call(this, resultContinuation);
1097
- }
1098
- protoOf(StateMachineExecutor$internalExecute$slambda).c3g = function ($this$sequence, $completion) {
1099
- var tmp = this.d3g($this$sequence, $completion);
1100
- tmp.e8_1 = Unit_instance;
1101
- tmp.f8_1 = null;
1102
- return tmp.k8();
1103
- };
1104
- protoOf(StateMachineExecutor$internalExecute$slambda).b9 = function (p1, $completion) {
1105
- return this.c3g(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
1106
- };
1107
- protoOf(StateMachineExecutor$internalExecute$slambda).k8 = function () {
1108
- var suspendResult = this.e8_1;
1109
- $sm: do
1110
- try {
1111
- var tmp = this.c8_1;
1112
- switch (tmp) {
1113
- case 0:
1114
- this.d8_1 = 5;
1115
- this.c8_1 = 1;
1116
- suspendResult = this.a3g_1.cd(this.z3f_1, this);
1117
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1118
- return suspendResult;
1119
- }
1120
-
1121
- continue $sm;
1122
- case 1:
1123
- this.b3g_1 = this.z3f_1.n3f().n();
1124
- this.c8_1 = 2;
1125
- continue $sm;
1126
- case 2:
1127
- if (!this.b3g_1.q()) {
1128
- this.c8_1 = 4;
1129
- continue $sm;
1130
- }
1131
-
1132
- var element = this.b3g_1.r();
1133
- this.c8_1 = 3;
1134
- suspendResult = this.a3g_1.fd(internalExecute(StateMachineExecutor_instance, element), this);
1135
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1136
- return suspendResult;
1137
- }
1138
-
1139
- continue $sm;
1140
- case 3:
1141
- this.c8_1 = 2;
1142
- continue $sm;
1143
- case 4:
1144
- return Unit_instance;
1145
- case 5:
1146
- throw this.f8_1;
1147
- }
1148
- } catch ($p) {
1149
- var e = $p;
1150
- if (this.d8_1 === 5) {
1151
- throw e;
1152
- } else {
1153
- this.c8_1 = this.d8_1;
1154
- this.f8_1 = e;
1155
- }
1156
- }
1157
- while (true);
1158
- };
1159
- protoOf(StateMachineExecutor$internalExecute$slambda).d3g = function ($this$sequence, completion) {
1160
- var i = new StateMachineExecutor$internalExecute$slambda(this.z3f_1, completion);
1161
- i.a3g_1 = $this$sequence;
1162
- return i;
1163
- };
1164
- function StateMachineExecutor$internalExecute$slambda_0($state, resultContinuation) {
1165
- var i = new StateMachineExecutor$internalExecute$slambda($state, resultContinuation);
1166
- return constructCallableReference(function ($this$sequence, $completion) {
1167
- return i.c3g($this$sequence, $completion);
1168
- }, 1);
1169
- }
1170
- function StateMachineExecutor() {
1171
- }
1172
- protoOf(StateMachineExecutor).h3d = function (state) {
1173
- var tmp;
1174
- if (state.m3f()) {
1175
- tmp = emptySequence();
1176
- } else {
1177
- var tmp_0 = drop_0(internalExecute(this, state), 1);
1178
- tmp = map(tmp_0, StateMachineExecutor$execute$lambda);
1179
- }
1180
- return tmp;
1181
- };
1182
- protoOf(StateMachineExecutor).e3g = function (state) {
1183
- var tmp = this.h3d(state);
1184
- return map(tmp, StateMachineExecutor$executeWrapping$lambda);
1185
- };
1186
- protoOf(StateMachineExecutor).q3f = function (_this__u8e3s4) {
1187
- var tmp;
1188
- if (_this__u8e3s4 instanceof AlreadyExecutedState) {
1189
- tmp = _this__u8e3s4.o3f_1;
1190
- } else {
1191
- tmp = _this__u8e3s4;
1192
- }
1193
- return tmp;
1194
- };
1195
- var StateMachineExecutor_instance;
1196
- function StateMachineExecutor_getInstance() {
1197
- return StateMachineExecutor_instance;
1198
- }
1199
- function StateMachineExecutor$executeWrapping$ref(p0) {
1200
- return constructCallableReference(function (p0_0) {
1201
- return p0.e3g(p0_0);
1202
- }, 1, 0, 97, 'executeWrapping', [p0]);
1203
- }
1204
- function statEndHaltTimeout($this, $receiver) {
1205
- return stateEndHalt($receiver, TimeOutException_init_$Create$('Given time for `' + $receiver.f3d().q1v().toString() + '` computation (' + $receiver.f3d().q28_1.toString() + ") wasn't enough for completion", VOID, $receiver.f3d().context, $receiver.f3d().q28_1), VOID, []);
1206
- }
1207
- function _get_stateCurrentTime__3c8uza($this) {
1208
- var tmp0 = $this.i3g_1;
1209
- var tmp = KProperty1;
1210
- // Inline function 'kotlin.getValue' call
1211
- getPropertyCallableRef('stateCurrentTime', 1, tmp, AbstractTimedState$_get_stateCurrentTime_$ref_pw5vcd(), null);
1212
- return tmp0.f2();
1213
- }
1214
- function timeIsOver($this, currentDuration, maxDuration) {
1215
- return currentDuration >= maxDuration;
1216
- }
1217
- function Companion_1() {
1218
- }
1219
- var Companion_instance_12;
1220
- function Companion_getInstance_7() {
1221
- return Companion_instance_12;
1222
- }
1223
- function AbstractTimedState$stateCurrentTime$delegate$lambda() {
1224
- return currentTimeInstant();
1225
- }
1226
- function AbstractTimedState$_get_stateCurrentTime_$ref_pw5vcd() {
1227
- return constructCallableReference(function (p0) {
1228
- return _get_stateCurrentTime__3c8uza(p0);
1229
- }, 1, 0, 98);
1230
- }
1231
- function AbstractTimedState(solve) {
1232
- AbstractState.call(this, solve);
1233
- this.h3g_1 = solve;
1234
- var tmp = this;
1235
- tmp.i3g_1 = lazy(AbstractTimedState$stateCurrentTime$delegate$lambda);
1236
- }
1237
- protoOf(AbstractTimedState).f3d = function () {
1238
- return this.h3g_1;
1239
- };
1240
- protoOf(AbstractTimedState).n3f = function () {
1241
- return this.f3d().q28_1 === 9223372036854775807n ? this.j3g() : timeIsOver(this, subtract(_get_stateCurrentTime__3c8uza(this), this.f3d().p28_1), this.f3d().q28_1) ? sequenceOf(statEndHaltTimeout(Companion_instance_12, this)) : this.j3g();
1242
- };
1243
- protoOf(AbstractTimedState).k3g = function (_this__u8e3s4, toYieldState) {
1244
- return timeIsOver(this, subtract(currentTimeInstant(), _this__u8e3s4.f3d().p28_1), _this__u8e3s4.f3d().q28_1) ? statEndHaltTimeout(Companion_instance_12, _this__u8e3s4) : toYieldState;
1245
- };
1246
- protoOf(AbstractTimedState).toString = function () {
1247
- return toString(getKClassFromExpression(this)) + ' with ' + this.f3d().toString();
1248
- };
1249
- function StateEnd$Halt$exception$delegate$lambda(this$0) {
1250
- return function () {
1251
- var tmp = this$0.r3g_1.solution;
1252
- return (isInterface(tmp, Halt) ? tmp : THROW_CCE()).t1v();
1253
- };
1254
- }
1255
- function True(sourceContext, solve) {
1256
- StateEnd.call(this, sourceContext, solve);
1257
- this.y3g_1 = sourceContext;
1258
- this.z3g_1 = solve;
1259
- var tmp = this.z3g_1.solution;
1260
- // Inline function 'kotlin.require' call
1261
- if (!isInterface(tmp, Yes)) {
1262
- var message = 'True end state can be created only with Solution.Yes. Current: `' + toString(this.z3g_1.solution) + '`';
1263
- throw IllegalArgumentException_init_$Create$(toString(message));
1264
- }
1265
- }
1266
- protoOf(True).f3d = function () {
1267
- return this.z3g_1;
1268
- };
1269
- protoOf(True).toString = function () {
1270
- return 'True(sourceContext=' + toString(this.y3g_1) + ', solve=' + this.z3g_1.toString() + ')';
1271
- };
1272
- protoOf(True).hashCode = function () {
1273
- var result = hashCode(this.y3g_1);
1274
- result = imul(result, 31) + this.z3g_1.hashCode() | 0;
1275
- return result;
1276
- };
1277
- protoOf(True).equals = function (other) {
1278
- if (this === other)
1279
- return true;
1280
- if (!(other instanceof True))
1281
- return false;
1282
- if (!equals(this.y3g_1, other.y3g_1))
1283
- return false;
1284
- if (!this.z3g_1.equals(other.z3g_1))
1285
- return false;
1286
- return true;
1287
- };
1288
- function False(sourceContext, solve) {
1289
- StateEnd.call(this, sourceContext, solve);
1290
- this.k3h_1 = sourceContext;
1291
- this.l3h_1 = solve;
1292
- var tmp = this.l3h_1.solution;
1293
- // Inline function 'kotlin.require' call
1294
- if (!isInterface(tmp, No)) {
1295
- var message = 'False end state can be created only with Solution.No. Current: `' + toString(this.l3h_1.solution) + '`';
1296
- throw IllegalArgumentException_init_$Create$(toString(message));
1297
- }
1298
- }
1299
- protoOf(False).f3d = function () {
1300
- return this.l3h_1;
1301
- };
1302
- protoOf(False).toString = function () {
1303
- return 'False(sourceContext=' + toString(this.k3h_1) + ', solve=' + this.l3h_1.toString() + ')';
1304
- };
1305
- protoOf(False).hashCode = function () {
1306
- var result = hashCode(this.k3h_1);
1307
- result = imul(result, 31) + this.l3h_1.hashCode() | 0;
1308
- return result;
1309
- };
1310
- protoOf(False).equals = function (other) {
1311
- if (this === other)
1312
- return true;
1313
- if (!(other instanceof False))
1314
- return false;
1315
- if (!equals(this.k3h_1, other.k3h_1))
1316
- return false;
1317
- if (!this.l3h_1.equals(other.l3h_1))
1318
- return false;
1319
- return true;
1320
- };
1321
- function Halt_0(sourceContext, solve) {
1322
- StateEnd.call(this, sourceContext, solve);
1323
- this.q3g_1 = sourceContext;
1324
- this.r3g_1 = solve;
1325
- var tmp = this.r3g_1.solution;
1326
- // Inline function 'kotlin.require' call
1327
- if (!isInterface(tmp, Halt)) {
1328
- var message = 'Halt end state can be created only with Solution.Halt. Current: `' + toString(this.r3g_1.solution) + '`';
1329
- throw IllegalArgumentException_init_$Create$(toString(message));
1330
- }
1331
- var tmp_0 = this;
1332
- tmp_0.s3g_1 = lazy(StateEnd$Halt$exception$delegate$lambda(this));
1333
- }
1334
- protoOf(Halt_0).f3d = function () {
1335
- return this.r3g_1;
1336
- };
1337
- protoOf(Halt_0).toString = function () {
1338
- return 'Halt(sourceContext=' + toString(this.q3g_1) + ', solve=' + this.r3g_1.toString() + ')';
1339
- };
1340
- protoOf(Halt_0).hashCode = function () {
1341
- var result = hashCode(this.q3g_1);
1342
- result = imul(result, 31) + this.r3g_1.hashCode() | 0;
1343
- return result;
1344
- };
1345
- protoOf(Halt_0).equals = function (other) {
1346
- if (this === other)
1347
- return true;
1348
- if (!(other instanceof Halt_0))
1349
- return false;
1350
- if (!equals(this.q3g_1, other.q3g_1))
1351
- return false;
1352
- if (!this.r3g_1.equals(other.r3g_1))
1353
- return false;
1354
- return true;
1355
- };
1356
- function StateEnd$context$delegate$lambda(this$0) {
1357
- return function () {
1358
- var tmp = this$0.f3d().solution.n1u();
1359
- var tmp0_elvis_lhs = isInterface(tmp, Unifier) ? tmp : null;
1360
- return StreamsExecutionContext_init_$Create$(this$0.c3h_1, tmp0_elvis_lhs == null ? Companion_getInstance_2().empty() : tmp0_elvis_lhs);
1361
- };
1362
- }
1363
- function StateEnd$_get_context_$ref_fll2gn() {
1364
- return constructCallableReference(function (p0) {
1365
- return p0.i8();
1366
- }, 1, 0, 99);
1367
- }
1368
- function StateEnd(sourceContext, solve) {
1369
- AbstractState.call(this, solve);
1370
- this.c3h_1 = sourceContext;
1371
- this.d3h_1 = solve;
1372
- var tmp = this;
1373
- tmp.e3h_1 = lazy(StateEnd$context$delegate$lambda(this));
1374
- }
1375
- protoOf(StateEnd).f3d = function () {
1376
- return this.d3h_1;
1377
- };
1378
- protoOf(StateEnd).n3f = function () {
1379
- return emptySequence();
1380
- };
1381
- protoOf(StateEnd).i8 = function () {
1382
- var tmp0 = this.e3h_1;
1383
- var tmp = KProperty1;
1384
- // Inline function 'kotlin.getValue' call
1385
- getPropertyCallableRef('context', 1, tmp, StateEnd$_get_context_$ref_fll2gn(), null);
1386
- return tmp0.f2();
1387
- };
1388
- function stateEndTrue(_this__u8e3s4, substitution, sideEffectManager, sideEffects) {
1389
- substitution = substitution === VOID ? Companion_getInstance_2().empty() : substitution;
1390
- sideEffectManager = sideEffectManager === VOID ? null : sideEffectManager;
1391
- var tmp = _this__u8e3s4.i8();
1392
- var tmp_0 = _this__u8e3s4.f3d();
1393
- return new True(tmp, tmp_0.w2g(substitution, sideEffectManager == null ? getSideEffectManager(_this__u8e3s4.f3d().context) : sideEffectManager, sideEffects.slice()));
1394
- }
1395
- function stateEndFalse(_this__u8e3s4, sideEffectManager, sideEffects) {
1396
- sideEffectManager = sideEffectManager === VOID ? null : sideEffectManager;
1397
- var tmp = _this__u8e3s4.i8();
1398
- var tmp_0 = _this__u8e3s4.f3d();
1399
- return new False(tmp, tmp_0.x2g(sideEffectManager == null ? getSideEffectManager(_this__u8e3s4.f3d().context) : sideEffectManager, sideEffects.slice()));
1400
- }
1401
- function stateEndHalt(_this__u8e3s4, exception, sideEffectManager, sideEffects) {
1402
- sideEffectManager = sideEffectManager === VOID ? null : sideEffectManager;
1403
- var tmp = _this__u8e3s4.i8();
1404
- var tmp_0 = _this__u8e3s4.f3d();
1405
- var tmp1_elvis_lhs = sideEffectManager == null ? getSideEffectManager(exception.i8()) : sideEffectManager;
1406
- return new Halt_0(tmp, tmp_0.y2g(exception, tmp1_elvis_lhs == null ? getSideEffectManager(_this__u8e3s4.f3d().context) : tmp1_elvis_lhs, sideEffects.slice()));
1407
- }
1408
- function stateEnd(_this__u8e3s4, response) {
1409
- // Inline function 'kotlin.with' call
1410
- // Inline function 'kotlin.collections.toTypedArray' call
1411
- var this_0 = response.sideEffects;
1412
- var tmp$ret$2 = copyToArray(this_0);
1413
- return stateEnd_0(_this__u8e3s4, response.solution, response.sideEffectManager, tmp$ret$2.slice());
1414
- }
1415
- function stateEnd_0(_this__u8e3s4, solution, sideEffectManager, sideEffects) {
1416
- sideEffectManager = sideEffectManager === VOID ? null : sideEffectManager;
1417
- var tmp = stateEnd$lambda(_this__u8e3s4, sideEffectManager, sideEffects);
1418
- var tmp_0 = stateEnd$lambda_0(_this__u8e3s4, sideEffectManager, sideEffects);
1419
- return solution.whenIs(tmp, tmp_0, stateEnd$lambda_1(_this__u8e3s4, sideEffectManager, sideEffects));
1420
- }
1421
- function stateEnd$lambda($this_stateEnd, $sideEffectManager, $sideEffects) {
1422
- return function (sol) {
1423
- // Inline function 'kotlin.takeUnless' call
1424
- var this_0 = sol.n1u();
1425
- var tmp;
1426
- if (!this_0.h()) {
1427
- tmp = this_0;
1428
- } else {
1429
- tmp = null;
1430
- }
1431
- var tmp0_elvis_lhs = tmp;
1432
- return stateEndTrue($this_stateEnd, tmp0_elvis_lhs == null ? $this_stateEnd.f3d().context.n1u() : tmp0_elvis_lhs, $sideEffectManager, $sideEffects.slice());
1433
- };
1434
- }
1435
- function stateEnd$lambda_0($this_stateEnd, $sideEffectManager, $sideEffects) {
1436
- return function (it) {
1437
- return stateEndFalse($this_stateEnd, $sideEffectManager, $sideEffects.slice());
1438
- };
1439
- }
1440
- function stateEnd$lambda_1($this_stateEnd, $sideEffectManager, $sideEffects) {
1441
- return function (it) {
1442
- return stateEndHalt($this_stateEnd, it.t1v(), $sideEffectManager, $sideEffects.slice());
1443
- };
1444
- }
1445
- function newThrowSolveRequest($this, $receiver, error) {
1446
- var tmp = Companion_getInstance_3();
1447
- // Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
1448
- var tmp$ret$0 = Throw_getInstance().signature.name;
1449
- var tmp_0 = tmp.of(tmp$ret$0, [error.b24()]);
1450
- var tmp0_elvis_lhs = getSideEffectManager(error.i8());
1451
- return newSolveRequest($receiver, tmp_0, VOID, VOID, tmp0_elvis_lhs == null ? $receiver.context.x3d_1 : tmp0_elvis_lhs, currentTimeInstant());
1452
- }
1453
- function Companion_2() {
1454
- }
1455
- var Companion_instance_13;
1456
- function Companion_getInstance_8() {
1457
- return Companion_instance_13;
1458
- }
1459
- function StateGoalEvaluation$behaveTimed$slambda(this$0, resultContinuation) {
1460
- this.u3h_1 = this$0;
1461
- CoroutineImpl.call(this, resultContinuation);
1462
- }
1463
- protoOf(StateGoalEvaluation$behaveTimed$slambda).c3g = function ($this$sequence, $completion) {
1464
- var tmp = this.d3g($this$sequence, $completion);
1465
- tmp.e8_1 = Unit_instance;
1466
- tmp.f8_1 = null;
1467
- return tmp.k8();
1468
- };
1469
- protoOf(StateGoalEvaluation$behaveTimed$slambda).b9 = function (p1, $completion) {
1470
- return this.c3g(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
1471
- };
1472
- protoOf(StateGoalEvaluation$behaveTimed$slambda).k8 = function () {
1473
- var suspendResult = this.e8_1;
1474
- $sm: do
1475
- try {
1476
- var tmp = this.c8_1;
1477
- switch (tmp) {
1478
- case 0:
1479
- this.d8_1 = 11;
1480
- var $this$with = this.u3h_1.i3i_1;
1481
- var primitive = $this$with.context.l3d_1.e2d().i2($this$with.signature);
1482
- if (primitive == null) {
1483
- this.x3h_1 = null;
1484
- this.c8_1 = 8;
1485
- continue $sm;
1486
- } else {
1487
- this.y3h_1 = primitive;
1488
- this.y3h_1;
1489
- this.d3i_1 = null;
1490
- this.d8_1 = 1;
1491
- this.d3i_1 = primitive.solve(this.u3h_1.i3i_1);
1492
- this.d8_1 = 11;
1493
- this.c8_1 = 3;
1494
- continue $sm;
1495
- }
1496
-
1497
- case 1:
1498
- this.d8_1 = 11;
1499
- var tmp_0 = this.f8_1;
1500
- if (tmp_0 instanceof HaltException) {
1501
- var exception = this.f8_1;
1502
- this.c8_1 = 2;
1503
- suspendResult = this.v3h_1.cd(stateEndHalt(this.u3h_1, exception, VOID, []), this);
1504
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1505
- return suspendResult;
1506
- }
1507
- continue $sm;
1508
- } else {
1509
- var tmp_1 = this.f8_1;
1510
- if (tmp_1 instanceof LogicError) {
1511
- var logicError = this.f8_1;
1512
- this.d3i_1 = Companion_instance_11.i3d(newThrowSolveRequest(Companion_instance_13, this.u3h_1.i3i_1, logicError));
1513
- this.c8_1 = 3;
1514
- continue $sm;
1515
- } else {
1516
- throw this.f8_1;
1517
- }
1518
- }
1519
-
1520
- case 2:
1521
- this.c8_1 = 3;
1522
- continue $sm;
1523
- case 3:
1524
- this.d8_1 = 11;
1525
- this.b3i_1 = emptyList();
1526
- var tmp0_safe_receiver = this.d3i_1;
1527
- if (tmp0_safe_receiver == null) {
1528
- this.z3h_1 = null;
1529
- this.c8_1 = 7;
1530
- continue $sm;
1531
- } else {
1532
- this.c3i_1 = tmp0_safe_receiver.n();
1533
- this.c8_1 = 4;
1534
- continue $sm;
1535
- }
1536
-
1537
- case 4:
1538
- if (!this.c3i_1.q()) {
1539
- this.c8_1 = 6;
1540
- continue $sm;
1541
- }
1542
-
1543
- var element = this.c3i_1.r();
1544
- this.a3i_1 = element;
1545
- this.b3i_1 = addWithNoDuplicates(this.b3i_1, this.a3i_1.sideEffects);
1546
- this.c8_1 = 5;
1547
- suspendResult = this.v3h_1.cd(this.u3h_1.k3g(this.u3h_1, stateEnd(this.u3h_1, this.a3i_1.q2h(VOID, VOID, this.b3i_1))), this);
1548
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1549
- return suspendResult;
1550
- }
1551
-
1552
- continue $sm;
1553
- case 5:
1554
- var tmp_2 = this.a3i_1.solution;
1555
- if (isInterface(tmp_2, Halt))
1556
- return Unit_instance;
1557
- this.c8_1 = 4;
1558
- continue $sm;
1559
- case 6:
1560
- this.z3h_1 = Unit_instance;
1561
- this.c8_1 = 7;
1562
- continue $sm;
1563
- case 7:
1564
- this.x3h_1 = this.y3h_1;
1565
- this.c8_1 = 8;
1566
- continue $sm;
1567
- case 8:
1568
- var tmp1_elvis_lhs = this.x3h_1;
1569
- if (tmp1_elvis_lhs == null) {
1570
- this.c8_1 = 9;
1571
- suspendResult = this.v3h_1.cd(new StateRuleSelection(this.u3h_1.i3i_1), this);
1572
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1573
- return suspendResult;
1574
- }
1575
- continue $sm;
1576
- } else {
1577
- this.w3h_1 = tmp1_elvis_lhs;
1578
- this.c8_1 = 10;
1579
- continue $sm;
1580
- }
1581
-
1582
- case 9:
1583
- var tmp_3 = this;
1584
- tmp_3.w3h_1 = Unit_instance;
1585
- this.c8_1 = 10;
1586
- continue $sm;
1587
- case 10:
1588
- return Unit_instance;
1589
- case 11:
1590
- throw this.f8_1;
1591
- }
1592
- } catch ($p) {
1593
- var e = $p;
1594
- if (this.d8_1 === 11) {
1595
- throw e;
1596
- } else {
1597
- this.c8_1 = this.d8_1;
1598
- this.f8_1 = e;
1599
- }
1600
- }
1601
- while (true);
1602
- };
1603
- protoOf(StateGoalEvaluation$behaveTimed$slambda).d3g = function ($this$sequence, completion) {
1604
- var i = new StateGoalEvaluation$behaveTimed$slambda(this.u3h_1, completion);
1605
- i.v3h_1 = $this$sequence;
1606
- return i;
1607
- };
1608
- function StateGoalEvaluation$behaveTimed$slambda_0(this$0, resultContinuation) {
1609
- var i = new StateGoalEvaluation$behaveTimed$slambda(this$0, resultContinuation);
1610
- return constructCallableReference(function ($this$sequence, $completion) {
1611
- return i.c3g($this$sequence, $completion);
1612
- }, 1);
1613
- }
1614
- function StateGoalEvaluation(solve) {
1615
- AbstractTimedState.call(this, solve);
1616
- this.i3i_1 = solve;
1617
- }
1618
- protoOf(StateGoalEvaluation).f3d = function () {
1619
- return this.i3i_1;
1620
- };
1621
- protoOf(StateGoalEvaluation).j3g = function () {
1622
- return sequence(StateGoalEvaluation$behaveTimed$slambda_0(this, null));
1623
- };
1624
- function StateInit$behaveTimed$slambda(this$0, resultContinuation) {
1625
- this.r3i_1 = this$0;
1626
- CoroutineImpl.call(this, resultContinuation);
1627
- }
1628
- protoOf(StateInit$behaveTimed$slambda).c3g = function ($this$sequence, $completion) {
1629
- var tmp = this.d3g($this$sequence, $completion);
1630
- tmp.e8_1 = Unit_instance;
1631
- tmp.f8_1 = null;
1632
- return tmp.k8();
1633
- };
1634
- protoOf(StateInit$behaveTimed$slambda).b9 = function (p1, $completion) {
1635
- return this.c3g(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
1636
- };
1637
- protoOf(StateInit$behaveTimed$slambda).k8 = function () {
1638
- var suspendResult = this.e8_1;
1639
- $sm: do
1640
- try {
1641
- var tmp = this.c8_1;
1642
- switch (tmp) {
1643
- case 0:
1644
- this.d8_1 = 6;
1645
- var $this$with = this.r3i_1.a3j_1.context;
1646
- var initializedSideEffectsManager = $this$with.x3d_1.h3e($this$with);
1647
- var currentGoal = this.r3i_1.a3j_1.q1v();
1648
- var $this$with_0 = this.r3i_1.a3j_1.context;
1649
- if ($this$with_0.w3d_1.d3d(currentGoal, $this$with_0)) {
1650
- this.c8_1 = 4;
1651
- suspendResult = this.s3i_1.cd(this.r3i_1.k3g(this.r3i_1, stateEndTrue(this.r3i_1, this.r3i_1.a3j_1.context.t3d_1, initializedSideEffectsManager, [])), this);
1652
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1653
- return suspendResult;
1654
- }
1655
- continue $sm;
1656
- } else {
1657
- if (isWellFormed(currentGoal)) {
1658
- this.v3i_1 = prepareForExecutionAsGoal(currentGoal);
1659
- var preparedGoal = this.v3i_1;
1660
- this.c8_1 = 2;
1661
- var tmp_0 = extractSignature(preparedGoal);
1662
- var tmp_1 = preparedGoal.bu();
1663
- var $this$with_1 = this.r3i_1.a3j_1.context;
1664
- suspendResult = this.s3i_1.cd(new StateGoalEvaluation(this.r3i_1.a3j_1.l2h(tmp_0, tmp_1, $this$with_1.t3e(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, initializedSideEffectsManager))), this);
1665
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1666
- return suspendResult;
1667
- }
1668
- continue $sm;
1669
- } else {
1670
- this.c8_1 = 1;
1671
- suspendResult = this.s3i_1.cd(stateEndFalse(this.r3i_1, initializedSideEffectsManager, []), this);
1672
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1673
- return suspendResult;
1674
- }
1675
- continue $sm;
1676
- }
1677
- }
1678
-
1679
- case 1:
1680
- var tmp_2 = this;
1681
- tmp_2.u3i_1 = Unit_instance;
1682
- this.c8_1 = 3;
1683
- continue $sm;
1684
- case 2:
1685
- this.u3i_1 = this.v3i_1;
1686
- this.c8_1 = 3;
1687
- continue $sm;
1688
- case 3:
1689
- this.t3i_1 = this.u3i_1;
1690
- this.c8_1 = 5;
1691
- continue $sm;
1692
- case 4:
1693
- var tmp_3 = this;
1694
- tmp_3.t3i_1 = Unit_instance;
1695
- this.c8_1 = 5;
1696
- continue $sm;
1697
- case 5:
1698
- return Unit_instance;
1699
- case 6:
1700
- throw this.f8_1;
1701
- }
1702
- } catch ($p) {
1703
- var e = $p;
1704
- if (this.d8_1 === 6) {
1705
- throw e;
1706
- } else {
1707
- this.c8_1 = this.d8_1;
1708
- this.f8_1 = e;
1709
- }
1710
- }
1711
- while (true);
1712
- };
1713
- protoOf(StateInit$behaveTimed$slambda).d3g = function ($this$sequence, completion) {
1714
- var i = new StateInit$behaveTimed$slambda(this.r3i_1, completion);
1715
- i.s3i_1 = $this$sequence;
1716
- return i;
1717
- };
1718
- function StateInit$behaveTimed$slambda_0(this$0, resultContinuation) {
1719
- var i = new StateInit$behaveTimed$slambda(this$0, resultContinuation);
1720
- return constructCallableReference(function ($this$sequence, $completion) {
1721
- return i.c3g($this$sequence, $completion);
1722
- }, 1);
1723
- }
1724
- function StateInit(solve) {
1725
- AbstractTimedState.call(this, solve);
1726
- this.a3j_1 = solve;
1727
- }
1728
- protoOf(StateInit).f3d = function () {
1729
- return this.a3j_1;
1730
- };
1731
- protoOf(StateInit).j3g = function () {
1732
- return sequence(StateInit$behaveTimed$slambda_0(this, null));
1733
- };
1734
- function retrieveRulesMatching($this, $receiver, currentGoal) {
1735
- // Inline function 'kotlin.let' call
1736
- var refreshedGoal = currentGoal.du();
1737
- // Inline function 'kotlin.takeIf' call
1738
- var this_0 = $receiver.r1u().asTheory($receiver.u1k()).getByHead(refreshedGoal);
1739
- var tmp;
1740
- if (any(this_0)) {
1741
- tmp = this_0;
1742
- } else {
1743
- tmp = null;
1744
- }
1745
- var tmp0_elvis_lhs = tmp;
1746
- var tmp_0;
1747
- if (tmp0_elvis_lhs == null) {
1748
- var tmp_1 = sequenceOf_0([$receiver.t1u(), $receiver.u1u()]);
1749
- tmp_0 = flatMap(tmp_1, StateRuleSelection$Companion$retrieveRulesMatching$lambda(refreshedGoal));
1750
- } else {
1751
- tmp_0 = tmp0_elvis_lhs;
1752
- }
1753
- return tmp_0;
1754
- }
1755
- function initializeForSubRuleScope($this, $receiver) {
1756
- // Inline function 'kotlin.with' call
1757
- var $this$with = $receiver.context;
1758
- var tmp$ret$0 = $this$with.t3e(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this$with.x3d_1.j3e());
1759
- return $receiver.l2h(VOID, VOID, tmp$ret$0);
1760
- }
1761
- function removeSubstitutionFor($this, $receiver, unusedVariables) {
1762
- var tmp;
1763
- if (isInterface($receiver, Yes)) {
1764
- tmp = $receiver.copy(VOID, $receiver.n1u().yz(asIterable(unusedVariables)));
1765
- } else {
1766
- tmp = $receiver;
1767
- }
1768
- return tmp;
1769
- }
1770
- function StateRuleSelection$Companion$retrieveRulesMatching$lambda($refreshedGoal) {
1771
- return function (it) {
1772
- return it.getByHead($refreshedGoal);
1773
- };
1774
- }
1775
- function StateRuleSelection$behaveTimed$slambda$lambda(it) {
1776
- var tmp = prepareForExecution(it).du();
1777
- return isInterface(tmp, Rule) ? tmp : THROW_CCE();
1778
- }
1779
- function Companion_3() {
1780
- }
1781
- var Companion_instance_14;
1782
- function Companion_getInstance_9() {
1783
- return Companion_instance_14;
1784
- }
1785
- function StateRuleSelection$behaveTimed$slambda(this$0, resultContinuation) {
1786
- this.j3j_1 = this$0;
1787
- CoroutineImpl.call(this, resultContinuation);
1788
- }
1789
- protoOf(StateRuleSelection$behaveTimed$slambda).c3g = function ($this$sequence, $completion) {
1790
- var tmp = this.d3g($this$sequence, $completion);
1791
- tmp.e8_1 = Unit_instance;
1792
- tmp.f8_1 = null;
1793
- return tmp.k8();
1794
- };
1795
- protoOf(StateRuleSelection$behaveTimed$slambda).b9 = function (p1, $completion) {
1796
- return this.c3g(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
1797
- };
1798
- protoOf(StateRuleSelection$behaveTimed$slambda).k8 = function () {
1799
- var suspendResult = this.e8_1;
1800
- $sm: do
1801
- try {
1802
- var tmp = this.c8_1;
1803
- switch (tmp) {
1804
- case 0:
1805
- this.d8_1 = 12;
1806
- this.t3j_1 = this.j3j_1.z3j_1.q1v();
1807
- var matchingRules = retrieveRulesMatching(Companion_instance_14, this.j3j_1.z3j_1.context, this.t3j_1);
1808
- this.s3j_1 = moreThanOne(matchingRules);
1809
- if (none(matchingRules)) {
1810
- this.c8_1 = 10;
1811
- suspendResult = this.k3j_1.cd(stateEndFalse(this.j3j_1, VOID, []), this);
1812
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1813
- return suspendResult;
1814
- }
1815
- continue $sm;
1816
- } else {
1817
- var $this$with = this.j3j_1.z3j_1.context;
1818
- var tmp_0 = orderWithStrategy(matchingRules, $this$with, SolverStrategies$clauseChoiceStrategy$ref($this$with.w3d_1));
1819
- this.u3j_1 = map(tmp_0, StateRuleSelection$behaveTimed$slambda$lambda).n();
1820
- this.c8_1 = 1;
1821
- continue $sm;
1822
- }
1823
-
1824
- case 1:
1825
- if (!this.u3j_1.q()) {
1826
- this.c8_1 = 9;
1827
- continue $sm;
1828
- }
1829
-
1830
- var tmp0 = this.u3j_1.r();
1831
- var tmp2 = this.u3j_1.q();
1832
- this.n3j_1 = tmp0;
1833
- this.o3j_1 = tmp2;
1834
- var unifyingSubstitution = this.j3j_1.i8().k3d_1.mgu(this.t3j_1, this.n3j_1.gw());
1835
- var tmp_1 = this.n3j_1.hw().applySubstitution(unifyingSubstitution);
1836
- var wellFormedRuleBody = isInterface(tmp_1, Struct) ? tmp_1 : THROW_CCE();
1837
- var tmp_2 = this;
1838
- var tmp0_$receiver = this.j3j_1.z3j_1;
1839
- var tmp1_requestIssuingInstant = currentTimeInstant();
1840
- tmp_2.p3j_1 = newSolveRequest(tmp0_$receiver, wellFormedRuleBody, unifyingSubstitution, VOID, VOID, tmp1_requestIssuingInstant, this.s3j_1);
1841
- this.r3j_1 = new StateInit(initializeForSubRuleScope(Companion_instance_14, this.p3j_1));
1842
- var it = this.r3j_1;
1843
- this.c8_1 = 2;
1844
- suspendResult = this.k3j_1.cd(asAlreadyExecuted(it), this);
1845
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1846
- return suspendResult;
1847
- }
1848
-
1849
- continue $sm;
1850
- case 2:
1851
- var subInitialState = this.r3j_1;
1852
- this.l3j_1 = false;
1853
- this.q3j_1 = this.j3j_1.a3k_1(subInitialState).n();
1854
- this.c8_1 = 3;
1855
- continue $sm;
1856
- case 3:
1857
- if (!this.q3j_1.q()) {
1858
- this.c8_1 = 8;
1859
- continue $sm;
1860
- }
1861
-
1862
- var element = this.q3j_1.r();
1863
- this.m3j_1 = element.o3f_1;
1864
- var tmp_3;
1865
- var tmp_4 = this.m3j_1;
1866
- if (isInterface(tmp_4, FinalState)) {
1867
- tmp_3 = this.m3j_1.f3d().solution.q1v().equals(this.p3j_1.q1v());
1868
- } else {
1869
- tmp_3 = false;
1870
- }
1871
-
1872
- if (tmp_3) {
1873
- if (shouldCutExecuteInRuleSelection(this.m3j_1.f3d().sideEffectManager)) {
1874
- this.l3j_1 = true;
1875
- }
1876
- var tmp_5;
1877
- var tmp_6;
1878
- var tmp_7 = this.m3j_1;
1879
- if (!(tmp_7 instanceof False)) {
1880
- tmp_6 = true;
1881
- } else {
1882
- tmp_6 = !this.o3j_1;
1883
- }
1884
- if (tmp_6) {
1885
- tmp_5 = true;
1886
- } else {
1887
- tmp_5 = this.l3j_1;
1888
- }
1889
- if (tmp_5) {
1890
- var extendedScopeSideEffectManager = extendParentScopeWith(this.m3j_1.f3d().sideEffectManager, this.j3j_1.z3j_1.context.x3d_1);
1891
- this.c8_1 = 5;
1892
- suspendResult = this.k3j_1.cd(stateEnd(this.j3j_1, this.m3j_1.f3d().q2h(removeSubstitutionFor(Companion_instance_14, this.m3j_1.f3d().solution, this.n3j_1.cu()), extendedScopeSideEffectManager)), this);
1893
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1894
- return suspendResult;
1895
- }
1896
- continue $sm;
1897
- } else {
1898
- this.c8_1 = 6;
1899
- continue $sm;
1900
- }
1901
- } else {
1902
- this.c8_1 = 4;
1903
- suspendResult = this.k3j_1.cd(element, this);
1904
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1905
- return suspendResult;
1906
- }
1907
- continue $sm;
1908
- }
1909
-
1910
- case 4:
1911
- this.c8_1 = 7;
1912
- continue $sm;
1913
- case 5:
1914
- this.c8_1 = 6;
1915
- continue $sm;
1916
- case 6:
1917
- var tmp_8 = this.m3j_1;
1918
- if (tmp_8 instanceof Halt_0)
1919
- return Unit_instance;
1920
- this.c8_1 = 7;
1921
- continue $sm;
1922
- case 7:
1923
- this.c8_1 = 3;
1924
- continue $sm;
1925
- case 8:
1926
- if (this.l3j_1)
1927
- return Unit_instance;
1928
- this.c8_1 = 1;
1929
- continue $sm;
1930
- case 9:
1931
- this.c8_1 = 11;
1932
- continue $sm;
1933
- case 10:
1934
- this.c8_1 = 11;
1935
- continue $sm;
1936
- case 11:
1937
- return Unit_instance;
1938
- case 12:
1939
- throw this.f8_1;
1940
- }
1941
- } catch ($p) {
1942
- var e = $p;
1943
- if (this.d8_1 === 12) {
1944
- throw e;
1945
- } else {
1946
- this.c8_1 = this.d8_1;
1947
- this.f8_1 = e;
1948
- }
1949
- }
1950
- while (true);
1951
- };
1952
- protoOf(StateRuleSelection$behaveTimed$slambda).d3g = function ($this$sequence, completion) {
1953
- var i = new StateRuleSelection$behaveTimed$slambda(this.j3j_1, completion);
1954
- i.k3j_1 = $this$sequence;
1955
- return i;
1956
- };
1957
- function StateRuleSelection$behaveTimed$slambda_0(this$0, resultContinuation) {
1958
- var i = new StateRuleSelection$behaveTimed$slambda(this$0, resultContinuation);
1959
- return constructCallableReference(function ($this$sequence, $completion) {
1960
- return i.c3g($this$sequence, $completion);
1961
- }, 1);
1962
- }
1963
- function StateRuleSelection(solve) {
1964
- AbstractTimedState.call(this, solve);
1965
- this.z3j_1 = solve;
1966
- var tmp = this;
1967
- tmp.a3k_1 = StateMachineExecutor$executeWrapping$ref(StateMachineExecutor_instance);
1968
- }
1969
- protoOf(StateRuleSelection).f3d = function () {
1970
- return this.z3j_1;
1971
- };
1972
- protoOf(StateRuleSelection).j3g = function () {
1973
- return sequence(StateRuleSelection$behaveTimed$slambda_0(this, null));
1974
- };
1975
- function DefaultBuiltins() {
1976
- DefaultBuiltins_instance = this;
1977
- ExtensionLibrary.call(this, CommonBuiltins_getInstance());
1978
- }
1979
- protoOf(DefaultBuiltins).s2d = function () {
1980
- return listOf_0([Call_getInstance(), Catch_getInstance(), Conjunction_getInstance(), Cut_getInstance(), Throw_getInstance(), Not_getInstance()]);
1981
- };
1982
- var DefaultBuiltins_instance;
1983
- function DefaultBuiltins_getInstance() {
1984
- if (DefaultBuiltins_instance == null)
1985
- new DefaultBuiltins();
1986
- return DefaultBuiltins_instance;
1987
- }
1988
- function Call$uncheckedImplementation$lambda($request) {
1989
- return function (it) {
1990
- return replyWith($request, it.q2h(VOID, resetCutWorkChanges(it.sideEffectManager, $request.context.x3d_1)));
1991
- };
1992
- }
1993
- function Call() {
1994
- Call_instance = this;
1995
- PrimitiveWrapper_init_$Init$('call', 1, VOID, this);
1996
- }
1997
- protoOf(Call).i3k = function (request) {
1998
- // Inline function 'kotlin.let' call
1999
- var toBeCalledGoal = single(Companion_getInstance_4().s2e(request).arguments);
2000
- var tmp;
2001
- if (isWellFormed(toBeCalledGoal)) {
2002
- var tmp_0 = Companion_instance_11.i3d(newSolveRequest(request, prepareForExecutionAsGoal(toBeCalledGoal)));
2003
- tmp = map(tmp_0, Call$uncheckedImplementation$lambda(request));
2004
- } else {
2005
- throw TypeError_init_$Create$('call/1 argument is neither a Variable nor a well-formed goal', VOID, request.context, Expected_CALLABLE_getInstance(), toBeCalledGoal);
2006
- }
2007
- return tmp;
2008
- };
2009
- protoOf(Call).e2f = function (request) {
2010
- return this.i3k(request);
2011
- };
2012
- var Call_instance;
2013
- function Call_getInstance() {
2014
- if (Call_instance == null)
2015
- new Call();
2016
- return Call_instance;
2017
- }
2018
- function Catch$uncheckedImplementation$slambda$lambda($request) {
2019
- return function (it) {
2020
- return replyWith($request, it);
2021
- };
2022
- }
2023
- function call($this, goal) {
2024
- var tmp = Companion_getInstance_3();
2025
- // Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
2026
- var tmp$ret$0 = Call_getInstance().signature.name;
2027
- return tmp.of(tmp$ret$0, [goal]);
2028
- }
2029
- function ensureNoMoreSelectableCatch($this, $receiver, notSelectableContext) {
2030
- return $receiver.l2h(VOID, VOID, $receiver.context.t3e(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $receiver.context.x3d_1.q3e(notSelectableContext)));
2031
- }
2032
- function Catch$uncheckedImplementation$slambda($request, resultContinuation) {
2033
- this.r3k_1 = $request;
2034
- CoroutineImpl.call(this, resultContinuation);
2035
- }
2036
- protoOf(Catch$uncheckedImplementation$slambda).n2p = function ($this$sequence, $completion) {
2037
- var tmp = this.o2p($this$sequence, $completion);
2038
- tmp.e8_1 = Unit_instance;
2039
- tmp.f8_1 = null;
2040
- return tmp.k8();
2041
- };
2042
- protoOf(Catch$uncheckedImplementation$slambda).b9 = function (p1, $completion) {
2043
- return this.n2p(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
2044
- };
2045
- protoOf(Catch$uncheckedImplementation$slambda).k8 = function () {
2046
- var suspendResult = this.e8_1;
2047
- $sm: do
2048
- try {
2049
- var tmp = this.c8_1;
2050
- switch (tmp) {
2051
- case 0:
2052
- this.d8_1 = 6;
2053
- var goalArgument = first_0(this.r3k_1.arguments);
2054
- this.t3k_1 = Companion_instance_11.i3d(newSolveRequest(this.r3k_1, call(Catch_getInstance(), goalArgument))).n();
2055
- this.c8_1 = 1;
2056
- continue $sm;
2057
- case 1:
2058
- if (!this.t3k_1.q()) {
2059
- this.c8_1 = 5;
2060
- continue $sm;
2061
- }
2062
-
2063
- var element = this.t3k_1.r();
2064
- if (isSelectedThrowCatch(element.sideEffectManager, this.r3k_1.context)) {
2065
- var recoverGoalArgument = last(this.r3k_1.arguments).applySubstitution(element.solution.n1u());
2066
- var recoverGoalSolveRequest = ensureNoMoreSelectableCatch(Catch_getInstance(), newSolveRequest(this.r3k_1, call(Catch_getInstance(), recoverGoalArgument), element.solution.n1u().minus(this.r3k_1.context.t3d_1), VOID, VOID, currentTimeInstant()), this.r3k_1.context);
2067
- this.c8_1 = 3;
2068
- var tmp_0 = Companion_instance_11.i3d(recoverGoalSolveRequest);
2069
- suspendResult = this.s3k_1.fd(map(tmp_0, Catch$uncheckedImplementation$slambda$lambda(this.r3k_1)), this);
2070
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
2071
- return suspendResult;
2072
- }
2073
- continue $sm;
2074
- } else {
2075
- this.c8_1 = 2;
2076
- suspendResult = this.s3k_1.cd(replyWith(this.r3k_1, element), this);
2077
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
2078
- return suspendResult;
2079
- }
2080
- continue $sm;
2081
- }
2082
-
2083
- case 2:
2084
- this.c8_1 = 4;
2085
- continue $sm;
2086
- case 3:
2087
- this.c8_1 = 4;
2088
- continue $sm;
2089
- case 4:
2090
- this.c8_1 = 1;
2091
- continue $sm;
2092
- case 5:
2093
- return Unit_instance;
2094
- case 6:
2095
- throw this.f8_1;
2096
- }
2097
- } catch ($p) {
2098
- var e = $p;
2099
- if (this.d8_1 === 6) {
2100
- throw e;
2101
- } else {
2102
- this.c8_1 = this.d8_1;
2103
- this.f8_1 = e;
2104
- }
2105
- }
2106
- while (true);
2107
- };
2108
- protoOf(Catch$uncheckedImplementation$slambda).o2p = function ($this$sequence, completion) {
2109
- var i = new Catch$uncheckedImplementation$slambda(this.r3k_1, completion);
2110
- i.s3k_1 = $this$sequence;
2111
- return i;
2112
- };
2113
- function Catch$uncheckedImplementation$slambda_0($request, resultContinuation) {
2114
- var i = new Catch$uncheckedImplementation$slambda($request, resultContinuation);
2115
- return constructCallableReference(function ($this$sequence, $completion) {
2116
- return i.n2p($this$sequence, $completion);
2117
- }, 1);
2118
- }
2119
- function Catch() {
2120
- Catch_instance = this;
2121
- PrimitiveWrapper_init_$Init$('catch', 3, VOID, this);
2122
- }
2123
- protoOf(Catch).i3k = function (request) {
2124
- return sequence(Catch$uncheckedImplementation$slambda_0(request, null));
2125
- };
2126
- protoOf(Catch).e2f = function (request) {
2127
- return this.i3k(request);
2128
- };
2129
- var Catch_instance;
2130
- function Catch_getInstance() {
2131
- if (Catch_instance == null)
2132
- new Catch();
2133
- return Catch_instance;
2134
- }
2135
- function solveConjunctionGoals($this, $receiver, mainRequest, goals, toPropagateContext, accumulatedSubstitutions, accumulatedSideEffects, previousResponseSideEffectManager, previousGoalsHadAlternatives, $completion) {
2136
- var tmp = new $solveConjunctionGoalsCOROUTINE$($this, $receiver, mainRequest, goals, toPropagateContext, accumulatedSubstitutions, accumulatedSideEffects, previousResponseSideEffectManager, previousGoalsHadAlternatives, $completion);
2137
- tmp.e8_1 = Unit_instance;
2138
- tmp.f8_1 = null;
2139
- return tmp.k8();
2140
- }
2141
- function Conjunction$uncheckedImplementation$slambda($request, resultContinuation) {
2142
- this.z3l_1 = $request;
2143
- CoroutineImpl.call(this, resultContinuation);
2144
- }
2145
- protoOf(Conjunction$uncheckedImplementation$slambda).n2p = function ($this$sequence, $completion) {
2146
- var tmp = this.o2p($this$sequence, $completion);
2147
- tmp.e8_1 = Unit_instance;
2148
- tmp.f8_1 = null;
2149
- return tmp.k8();
2150
- };
2151
- protoOf(Conjunction$uncheckedImplementation$slambda).b9 = function (p1, $completion) {
2152
- return this.n2p(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
2153
- };
2154
- protoOf(Conjunction$uncheckedImplementation$slambda).k8 = function () {
2155
- var suspendResult = this.e8_1;
2156
- $sm: do
2157
- try {
2158
- var tmp = this.c8_1;
2159
- switch (tmp) {
2160
- case 0:
2161
- this.d8_1 = 2;
2162
- var $this$with = this.z3l_1;
2163
- var tmp_0 = $this$with.q1v().castToTuple().qs();
2164
- var subGoals = toList(orderWithStrategy(tmp_0, $this$with.context, SolverStrategies$predicationChoiceStrategy$ref($this$with.context.w3d_1)));
2165
- this.c8_1 = 1;
2166
- suspendResult = solveConjunctionGoals(Conjunction_getInstance(), this.a3m_1, this.z3l_1, subGoals, this.z3l_1.context, Companion_getInstance_2().empty(), emptyList(), this.z3l_1.context.x3d_1, false, this);
2167
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
2168
- return suspendResult;
2169
- }
2170
-
2171
- continue $sm;
2172
- case 1:
2173
- return Unit_instance;
2174
- case 2:
2175
- throw this.f8_1;
2176
- }
2177
- } catch ($p) {
2178
- var e = $p;
2179
- if (this.d8_1 === 2) {
2180
- throw e;
2181
- } else {
2182
- this.c8_1 = this.d8_1;
2183
- this.f8_1 = e;
2184
- }
2185
- }
2186
- while (true);
2187
- };
2188
- protoOf(Conjunction$uncheckedImplementation$slambda).o2p = function ($this$sequence, completion) {
2189
- var i = new Conjunction$uncheckedImplementation$slambda(this.z3l_1, completion);
2190
- i.a3m_1 = $this$sequence;
2191
- return i;
2192
- };
2193
- function Conjunction$uncheckedImplementation$slambda_0($request, resultContinuation) {
2194
- var i = new Conjunction$uncheckedImplementation$slambda($request, resultContinuation);
2195
- return constructCallableReference(function ($this$sequence, $completion) {
2196
- return i.n2p($this$sequence, $completion);
2197
- }, 1);
2198
- }
2199
- function $solveConjunctionGoalsCOROUTINE$(_this__u8e3s4, _this__u8e3s4_0, mainRequest, goals, toPropagateContext, accumulatedSubstitutions, accumulatedSideEffects, previousResponseSideEffectManager, previousGoalsHadAlternatives, resultContinuation) {
2200
- CoroutineImpl.call(this, resultContinuation);
2201
- this.d3l_1 = _this__u8e3s4;
2202
- this.e3l_1 = _this__u8e3s4_0;
2203
- this.f3l_1 = mainRequest;
2204
- this.g3l_1 = goals;
2205
- this.h3l_1 = toPropagateContext;
2206
- this.i3l_1 = accumulatedSubstitutions;
2207
- this.j3l_1 = accumulatedSideEffects;
2208
- this.k3l_1 = previousResponseSideEffectManager;
2209
- this.l3l_1 = previousGoalsHadAlternatives;
2210
- }
2211
- protoOf($solveConjunctionGoalsCOROUTINE$).k8 = function () {
2212
- var suspendResult = this.e8_1;
2213
- $sm: do
2214
- try {
2215
- var tmp = this.c8_1;
2216
- switch (tmp) {
2217
- case 0:
2218
- this.d8_1 = 7;
2219
- this.p3l_1 = prepareForExecutionAsGoal(first_1(this.g3l_1).applySubstitution(this.i3l_1));
2220
- var tmp0_elvis_lhs = this.k3l_1;
2221
- var goalRequest = newSolveRequest(this.f3l_1, this.p3l_1, this.i3l_1, this.h3l_1, tmp0_elvis_lhs == null ? this.f3l_1.context.x3d_1 : tmp0_elvis_lhs);
2222
- this.n3l_1 = false;
2223
- this.m3l_1 = emptyList();
2224
- this.q3l_1 = Companion_instance_11.g3d(goalRequest).n();
2225
- this.c8_1 = 1;
2226
- continue $sm;
2227
- case 1:
2228
- if (!this.q3l_1.q()) {
2229
- this.c8_1 = 6;
2230
- continue $sm;
2231
- }
2232
-
2233
- var tmp0 = this.q3l_1.r();
2234
- var currentHasAlternatives = this.q3l_1.q();
2235
- this.o3l_1 = tmp0.f3d();
2236
- var tmp_0;
2237
- if (Cut_getInstance().signature.name === this.p3l_1.au()) {
2238
- tmp_0 = true;
2239
- } else {
2240
- var tmp0_safe_receiver = this.o3l_1.sideEffectManager;
2241
- tmp_0 = (tmp0_safe_receiver == null ? null : shouldExecuteThrowCut(tmp0_safe_receiver)) === true;
2242
- }
2243
-
2244
- if (tmp_0) {
2245
- this.n3l_1 = true;
2246
- }
2247
-
2248
- this.m3l_1 = addWithNoDuplicates(this.m3l_1, this.o3l_1.sideEffects);
2249
- var tmp_1;
2250
- var tmp_2;
2251
- var tmp1_safe_receiver = this.o3l_1.sideEffectManager;
2252
- if ((tmp1_safe_receiver == null ? null : shouldExecuteThrowCut(tmp1_safe_receiver)) === false) {
2253
- var tmp_3 = this.o3l_1.solution;
2254
- tmp_2 = isInterface(tmp_3, Yes);
2255
- } else {
2256
- tmp_2 = false;
2257
- }
2258
-
2259
- if (tmp_2) {
2260
- tmp_1 = moreThanOne(asSequence(this.g3l_1));
2261
- } else {
2262
- tmp_1 = false;
2263
- }
2264
-
2265
- if (tmp_1) {
2266
- this.c8_1 = 4;
2267
- var tmp_4 = Conjunction_getInstance();
2268
- var tmp_5 = drop(this.g3l_1, 1);
2269
- var tmp_6 = tmp0.i8().z30(this.m3l_1);
2270
- var tmp_7 = this.o3l_1.solution.n1u().minus(this.f3l_1.context.t3d_1);
2271
- var tmp_8 = this.m3l_1;
2272
- var tmp_9 = this.o3l_1.sideEffectManager;
2273
- suspendResult = solveConjunctionGoals(tmp_4, this.e3l_1, this.f3l_1, tmp_5, tmp_6, tmp_7, tmp_8, tmp_9 instanceof SideEffectManagerImpl ? tmp_9 : null, this.l3l_1 || currentHasAlternatives, this);
2274
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
2275
- return suspendResult;
2276
- }
2277
- continue $sm;
2278
- } else {
2279
- var tmp_10;
2280
- var tmp_11;
2281
- var tmp_12 = this.o3l_1.solution;
2282
- if (!isInterface(tmp_12, No)) {
2283
- tmp_11 = true;
2284
- } else {
2285
- tmp_11 = (!this.l3l_1 && !currentHasAlternatives);
2286
- }
2287
- if (tmp_11) {
2288
- tmp_10 = true;
2289
- } else {
2290
- tmp_10 = this.n3l_1;
2291
- }
2292
- if (tmp_10) {
2293
- this.c8_1 = 2;
2294
- suspendResult = this.e3l_1.cd(replyWith(this.f3l_1, this.o3l_1.q2h(VOID, VOID, plus_1(this.j3l_1, this.m3l_1))), this);
2295
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
2296
- return suspendResult;
2297
- }
2298
- continue $sm;
2299
- } else {
2300
- this.c8_1 = 3;
2301
- continue $sm;
2302
- }
2303
- }
2304
-
2305
- case 2:
2306
- this.c8_1 = 3;
2307
- continue $sm;
2308
- case 3:
2309
- this.c8_1 = 5;
2310
- continue $sm;
2311
- case 4:
2312
- var sideEffectPair = suspendResult;
2313
- if (sideEffectPair.first) {
2314
- this.n3l_1 = true;
2315
- }
2316
-
2317
- this.m3l_1 = sideEffectPair.second;
2318
- this.c8_1 = 5;
2319
- continue $sm;
2320
- case 5:
2321
- var tmp_13;
2322
- if (this.n3l_1) {
2323
- tmp_13 = true;
2324
- } else {
2325
- var tmp_14 = this.o3l_1.solution;
2326
- tmp_13 = isInterface(tmp_14, Halt);
2327
- }
2328
-
2329
- if (tmp_13) {
2330
- return new Pair(true, plus_1(this.j3l_1, this.m3l_1));
2331
- }
2332
-
2333
- this.c8_1 = 1;
2334
- continue $sm;
2335
- case 6:
2336
- return new Pair(this.n3l_1, plus_1(this.j3l_1, this.m3l_1));
2337
- case 7:
2338
- throw this.f8_1;
2339
- }
2340
- } catch ($p) {
2341
- var e = $p;
2342
- if (this.d8_1 === 7) {
2343
- throw e;
2344
- } else {
2345
- this.c8_1 = this.d8_1;
2346
- this.f8_1 = e;
2347
- }
2348
- }
2349
- while (true);
2350
- };
2351
- function Conjunction() {
2352
- Conjunction_instance = this;
2353
- PrimitiveWrapper_init_$Init$(',', 2, VOID, this);
2354
- }
2355
- protoOf(Conjunction).i3k = function (request) {
2356
- return sequence(Conjunction$uncheckedImplementation$slambda_0(request, null));
2357
- };
2358
- protoOf(Conjunction).e2f = function (request) {
2359
- return this.i3k(request);
2360
- };
2361
- var Conjunction_instance;
2362
- function Conjunction_getInstance() {
2363
- if (Conjunction_instance == null)
2364
- new Conjunction();
2365
- return Conjunction_instance;
2366
- }
2367
- function Cut() {
2368
- Cut_instance = this;
2369
- PrimitiveWrapper_init_$Init$('!', 0, VOID, this);
2370
- }
2371
- protoOf(Cut).i3k = function (request) {
2372
- // Inline function 'kotlin.with' call
2373
- return sequenceOf(request.replySuccess(request.context.t3d_1, request.context.x3d_1.f3e(), []));
2374
- };
2375
- protoOf(Cut).e2f = function (request) {
2376
- return this.i3k(request);
2377
- };
2378
- var Cut_instance;
2379
- function Cut_getInstance() {
2380
- if (Cut_instance == null)
2381
- new Cut();
2382
- return Cut_instance;
2383
- }
2384
- function Not$uncheckedImplementation$slambda($request, resultContinuation) {
2385
- this.l3m_1 = $request;
2386
- CoroutineImpl.call(this, resultContinuation);
2387
- }
2388
- protoOf(Not$uncheckedImplementation$slambda).n2p = function ($this$sequence, $completion) {
2389
- var tmp = this.o2p($this$sequence, $completion);
2390
- tmp.e8_1 = Unit_instance;
2391
- tmp.f8_1 = null;
2392
- return tmp.k8();
2393
- };
2394
- protoOf(Not$uncheckedImplementation$slambda).b9 = function (p1, $completion) {
2395
- return this.n2p(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
2396
- };
2397
- protoOf(Not$uncheckedImplementation$slambda).k8 = function () {
2398
- var suspendResult = this.e8_1;
2399
- $sm: do
2400
- try {
2401
- var tmp = this.c8_1;
2402
- switch (tmp) {
2403
- case 0:
2404
- this.d8_1 = 7;
2405
- var goalArgument = single(this.l3m_1.arguments);
2406
- var tmp_0 = Companion_instance_11;
2407
- var tmp_1 = Companion_getInstance_3();
2408
- var this_0 = Call_getInstance();
2409
- this.n3m_1 = tmp_0.i3d(newSolveRequest(this.l3m_1, tmp_1.of(this_0.signature.name, [goalArgument]))).n();
2410
- this.c8_1 = 1;
2411
- continue $sm;
2412
- case 1:
2413
- if (!this.n3m_1.q()) {
2414
- this.c8_1 = 6;
2415
- continue $sm;
2416
- }
2417
-
2418
- var element = this.n3m_1.r();
2419
- var tmp0_subject = element.solution;
2420
- if (isInterface(tmp0_subject, Yes)) {
2421
- this.c8_1 = 5;
2422
- suspendResult = this.m3m_1.cd(this.l3m_1.replyFail(VOID, []), this);
2423
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
2424
- return suspendResult;
2425
- }
2426
- continue $sm;
2427
- } else {
2428
- if (isInterface(tmp0_subject, No)) {
2429
- this.c8_1 = 3;
2430
- suspendResult = this.m3m_1.cd(this.l3m_1.replySuccess(this.l3m_1.context.t3d_1, VOID, []), this);
2431
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
2432
- return suspendResult;
2433
- }
2434
- continue $sm;
2435
- } else {
2436
- this.c8_1 = 2;
2437
- suspendResult = this.m3m_1.cd(replyWith(this.l3m_1, element), this);
2438
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
2439
- return suspendResult;
2440
- }
2441
- continue $sm;
2442
- }
2443
- }
2444
-
2445
- case 2:
2446
- this.c8_1 = 4;
2447
- continue $sm;
2448
- case 3:
2449
- this.c8_1 = 4;
2450
- continue $sm;
2451
- case 4:
2452
- this.c8_1 = 1;
2453
- continue $sm;
2454
- case 5:
2455
- return Unit_instance;
2456
- case 6:
2457
- return Unit_instance;
2458
- case 7:
2459
- throw this.f8_1;
2460
- }
2461
- } catch ($p) {
2462
- var e = $p;
2463
- if (this.d8_1 === 7) {
2464
- throw e;
2465
- } else {
2466
- this.c8_1 = this.d8_1;
2467
- this.f8_1 = e;
2468
- }
2469
- }
2470
- while (true);
2471
- };
2472
- protoOf(Not$uncheckedImplementation$slambda).o2p = function ($this$sequence, completion) {
2473
- var i = new Not$uncheckedImplementation$slambda(this.l3m_1, completion);
2474
- i.m3m_1 = $this$sequence;
2475
- return i;
2476
- };
2477
- function Not$uncheckedImplementation$slambda_0($request, resultContinuation) {
2478
- var i = new Not$uncheckedImplementation$slambda($request, resultContinuation);
2479
- return constructCallableReference(function ($this$sequence, $completion) {
2480
- return i.n2p($this$sequence, $completion);
2481
- }, 1);
2482
- }
2483
- function Not() {
2484
- Not_instance = this;
2485
- PrimitiveWrapper_init_$Init$('\\+', 1, VOID, this);
2486
- }
2487
- protoOf(Not).i3k = function (request) {
2488
- return sequence(Not$uncheckedImplementation$slambda_0(request, null));
2489
- };
2490
- protoOf(Not).e2f = function (request) {
2491
- return this.i3k(request);
2492
- };
2493
- var Not_instance;
2494
- function Not_getInstance() {
2495
- if (Not_instance == null)
2496
- new Not();
2497
- return Not_instance;
2498
- }
2499
- function extractErrorTypeAndExtra($this, $receiver) {
2500
- // Inline function 'kotlin.with' call
2501
- var $this$with = isInterface($receiver, Struct) ? $receiver : null;
2502
- var tmp;
2503
- var tmp_0;
2504
- if (($this$with == null ? null : $this$with.au()) === 'error') {
2505
- tmp_0 = $this$with.ut() === 2;
2506
- } else {
2507
- tmp_0 = false;
2508
- }
2509
- if (tmp_0) {
2510
- var tmp_1 = firstOrNull($this$with.bu());
2511
- var tmp0_safe_receiver = (!(tmp_1 == null) ? isInterface(tmp_1, Struct) : false) ? tmp_1 : null;
2512
- var tmp_2;
2513
- if (tmp0_safe_receiver == null) {
2514
- tmp_2 = null;
2515
- } else {
2516
- // Inline function 'kotlin.let' call
2517
- tmp_2 = new Pair(tmp0_safe_receiver, $this$with.bu().x(1));
2518
- }
2519
- tmp = tmp_2;
2520
- } else {
2521
- tmp = null;
2522
- }
2523
- return tmp;
2524
- }
2525
- function extractErrorCauseChain($this, $receiver, withContext) {
2526
- var tmp0_safe_receiver = extractErrorTypeAndExtra($this, $receiver);
2527
- var tmp;
2528
- if (tmp0_safe_receiver == null) {
2529
- tmp = null;
2530
- } else {
2531
- // Inline function 'kotlin.let' call
2532
- var type = tmp0_safe_receiver.pc();
2533
- var extra = tmp0_safe_receiver.qc();
2534
- var tmp1_cause = extractErrorCauseChain(Throw_getInstance(), extra, withContext);
2535
- tmp = Companion_instance_8.of(VOID, tmp1_cause, withContext, type, extra);
2536
- }
2537
- return tmp;
2538
- }
2539
- function Throw() {
2540
- Throw_instance = this;
2541
- NonBacktrackable.call(this, 'throw');
2542
- }
2543
- protoOf(Throw).q3m = function (_this__u8e3s4, first) {
2544
- var tmp;
2545
- try {
2546
- // Inline function 'kotlin.let' call
2547
- var throwArgument = single(Companion_getInstance_4().s2e(_this__u8e3s4).arguments).freshCopy();
2548
- var ancestorCatch = _this__u8e3s4.context.x3d_1.n3e(throwArgument);
2549
- var tmp1_safe_receiver = ancestorCatch == null ? null : ancestorCatch.arguments;
2550
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.x(1);
2551
- var tmp_0;
2552
- if (tmp2_safe_receiver == null) {
2553
- tmp_0 = null;
2554
- } else {
2555
- // Inline function 'kotlin.let' call
2556
- tmp_0 = Companion_getInstance_4().q2f(_this__u8e3s4, tmp2_safe_receiver, throwArgument);
2557
- }
2558
- var catcher = tmp_0;
2559
- var tmp_1;
2560
- if (!(catcher == null) ? isInterface(catcher, Unifier) : false) {
2561
- var tmp_2 = _this__u8e3s4.context.t3d_1.plus(catcher);
2562
- var newSubstitution = isInterface(tmp_2, Unifier) ? tmp_2 : THROW_CCE();
2563
- tmp_1 = _this__u8e3s4.replySuccess(newSubstitution, _this__u8e3s4.context.x3d_1.o3e(ancestorCatch.context), []);
2564
- } else {
2565
- var errorCause = extractErrorCauseChain(Throw_getInstance(), throwArgument, _this__u8e3s4.context);
2566
- if (!(errorCause == null))
2567
- throw errorCause;
2568
- else
2569
- throw Companion_instance_9.forUncaughtException(_this__u8e3s4.context, throwArgument);
2570
- }
2571
- tmp = tmp_1;
2572
- } catch ($p) {
2573
- var tmp_3;
2574
- if ($p instanceof LogicError) {
2575
- var logicError = $p;
2576
- tmp_3 = _this__u8e3s4.replyException(logicError, VOID, []);
2577
- } else {
2578
- throw $p;
2579
- }
2580
- tmp = tmp_3;
2581
- }
2582
- return tmp;
2583
- };
2584
- protoOf(Throw).d2i = function (_this__u8e3s4, first) {
2585
- return this.q3m(_this__u8e3s4, first);
2586
- };
2587
- var Throw_instance;
2588
- function Throw_getInstance() {
2589
- if (Throw_instance == null)
2590
- new Throw();
2591
- return Throw_instance;
2592
- }
2593
- //region block: post-declaration
2594
- protoOf(StreamsSolver).copy = copy;
2595
- protoOf(StreamsSolver).solveWithTimeout = solveWithTimeout;
2596
- protoOf(StreamsSolver).solve = solve;
2597
- protoOf(StreamsSolver).solveListWithTimeout = solveListWithTimeout;
2598
- protoOf(StreamsSolver).solveList = solveList;
2599
- protoOf(StreamsSolver).solveListWithOptions = solveListWithOptions;
2600
- protoOf(StreamsSolver).solveOnceWithTimeout = solveOnceWithTimeout;
2601
- protoOf(StreamsSolver).solveOnce = solveOnce;
2602
- protoOf(StreamsSolver).solveOnceWithOptions = solveOnceWithOptions;
2603
- protoOf(StreamsSolver).clone = clone;
2604
- protoOf(StreamsSolver).b1v = get_standardInput;
2605
- protoOf(StreamsSolver).c1v = get_standardOutput;
2606
- protoOf(StreamsSolver).d1v = get_standardError;
2607
- protoOf(StreamsSolver).e1v = get_warnings;
2608
- protoOf(StreamsSolverFactory).rawSolverOf = rawSolverOf;
2609
- protoOf(StreamsSolverFactory).solverOf = solverOf;
2610
- protoOf(StreamsSolverFactory).mutableSolverOf = mutableSolverOf;
2611
- protoOf(StreamsSolverFactory).rawMutableSolverOf = rawMutableSolverOf;
2612
- protoOf(StreamsSolverFactory).newBuilder = newBuilder;
2613
- protoOf(StreamsSolverFactory).c1x = get_defaultRuntime;
2614
- protoOf(StreamsSolverFactory).e1x = get_defaultUnificator;
2615
- protoOf(StreamsSolverFactory).f1x = get_defaultFlags;
2616
- protoOf(StreamsSolverFactory).i1x = get_defaultStaticKb;
2617
- protoOf(StreamsSolverFactory).j1x = get_defaultDynamicKb;
2618
- protoOf(StreamsSolverFactory).k1x = get_defaultInputChannel;
2619
- protoOf(StreamsSolverFactory).l1x = get_defaultOutputChannel;
2620
- protoOf(StreamsSolverFactory).m1x = get_defaultErrorChannel;
2621
- protoOf(StreamsSolverFactory).n1x = get_defaultWarningsChannel;
2622
- protoOf(StreamsSolverFactory).v1x = solverWithDefaultBuiltins;
2623
- protoOf(StreamsSolverFactory).solverWithDefaultBuiltinsAnd = solverWithDefaultBuiltinsAnd;
2624
- protoOf(StreamsSolverFactory).x1x = mutableSolverWithDefaultBuiltins;
2625
- protoOf(StreamsSolverFactory).mutableSolverWithDefaultBuiltinsAnd = mutableSolverWithDefaultBuiltinsAnd;
2626
- protoOf(StreamsExecutionContext).createSolver = createSolver;
2627
- protoOf(StreamsExecutionContext).createMutableSolver = createMutableSolver;
2628
- protoOf(StreamsExecutionContext).update = update;
2629
- protoOf(StreamsExecutionContext).b1v = get_standardInput;
2630
- protoOf(StreamsExecutionContext).c1v = get_standardOutput;
2631
- protoOf(StreamsExecutionContext).d1v = get_standardError;
2632
- protoOf(StreamsExecutionContext).e1v = get_warnings;
2633
- protoOf(StreamsExecutionContext).i1u = get_endTime;
2634
- protoOf(StreamsExecutionContext).k1u = get_remainingTime;
2635
- protoOf(StreamsExecutionContext).l1u = get_elapsedTime;
2636
- protoOf(AbstractTimedState).i8 = get_context;
2637
- //endregion
2638
- //region block: init
2639
- Companion_instance_11 = new Companion_0();
2640
- StreamsSolverFactory_instance = new StreamsSolverFactory();
2641
- StateMachineExecutor_instance = new StateMachineExecutor();
2642
- Companion_instance_12 = new Companion_1();
2643
- Companion_instance_13 = new Companion_2();
2644
- Companion_instance_14 = new Companion_3();
2645
- //endregion
2646
- //region block: exports
2647
- function $jsExportAll$(_) {
2648
- var it = _.it || (_.it = {});
2649
- var unibo = it.unibo || (it.unibo = {});
2650
- var tuprolog = unibo.tuprolog || (unibo.tuprolog = {});
2651
- var solve = tuprolog.solve || (tuprolog.solve = {});
2652
- var streams = solve.streams || (solve.streams = {});
2653
- defineProp(streams, 'StreamsSolverFactory', StreamsSolverFactory_getInstance, VOID, true);
2654
- }
2655
- $jsExportAll$(_);
2656
- _.$jsExportAll$ = $jsExportAll$;
2657
- //endregion
2658
- return _;
2659
- }));
2660
-
2661
- //# sourceMappingURL=2p-solve-streams.js.map