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