@tuprolog/2p-full 0.30.5-dev01 → 0.31.1
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 +609 -0
- package/2p-bdd.js.map +1 -0
- package/2p-core.js +12057 -0
- package/2p-core.js.map +1 -0
- package/2p-datalog.js +8 -0
- package/2p-datalog.js.map +1 -0
- package/2p-dsl-core.js +8 -0
- package/2p-dsl-core.js.map +1 -0
- package/2p-dsl-solve.js +8 -0
- package/2p-dsl-solve.js.map +1 -0
- package/2p-dsl-theory.js +8 -0
- package/2p-dsl-theory.js.map +1 -0
- package/2p-dsl-unify.js +8 -0
- package/2p-dsl-unify.js.map +1 -0
- package/2p-full.d.ts +270 -0
- package/2p-full.js +21 -0
- package/2p-full.js.map +1 -0
- package/2p-io-lib.js +3600 -0
- package/2p-io-lib.js.map +1 -0
- package/2p-oop-lib.js +3660 -0
- package/2p-oop-lib.js.map +1 -0
- package/2p-parser-core.js +1450 -0
- package/2p-parser-core.js.map +1 -0
- package/2p-parser-js.js +29 -0
- package/2p-parser-js.js.map +1 -0
- package/2p-parser-theory.js +114 -0
- package/2p-parser-theory.js.map +1 -0
- package/2p-repl.js +519 -0
- package/2p-repl.js.map +1 -0
- package/2p-serialize-core.js +8 -0
- package/2p-serialize-core.js.map +1 -0
- package/2p-serialize-theory.js +8 -0
- package/2p-serialize-theory.js.map +1 -0
- package/2p-solve-classic.js +3329 -0
- package/2p-solve-classic.js.map +1 -0
- package/2p-solve-concurrent.js +8 -0
- package/2p-solve-concurrent.js.map +1 -0
- package/2p-solve-plp.js +44 -0
- package/2p-solve-plp.js.map +1 -0
- package/2p-solve-problog.js +4547 -0
- package/2p-solve-problog.js.map +1 -0
- package/2p-solve-streams.js +3028 -0
- package/2p-solve-streams.js.map +1 -0
- package/2p-solve.js +16824 -0
- package/2p-solve.js.map +1 -0
- package/2p-theory.js +4902 -0
- package/2p-theory.js.map +1 -0
- package/2p-unify.js +957 -0
- package/2p-unify.js.map +1 -0
- package/2p-utils.js +1423 -0
- package/2p-utils.js.map +1 -0
- package/88b0986a7186d029-atomicfu-js-ir.js +8 -0
- package/88b0986a7186d029-atomicfu-js-ir.js.map +1 -0
- package/clikt-clikt-js-ir.js +7240 -0
- package/clikt-clikt-js-ir.js.map +1 -0
- package/kotlin-kotlin-stdlib-js-ir.js +11847 -0
- package/kotlin-kotlin-stdlib-js-ir.js.map +1 -0
- package/kotlin-kotlinx-atomicfu-runtime-js-ir.js +8 -0
- package/kotlin-kotlinx-atomicfu-runtime-js-ir.js.map +1 -0
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +8 -0
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +1 -0
- package/kt-math.js +11348 -0
- package/kt-math.js.map +1 -0
- package/package.json +4 -36
- package/CONTRIBUTORS +0 -10
- package/LICENSE +0 -202
- package/kotlin/2p-full/it/unibo/tuprolog/tuprolog.kjsm +0 -0
- package/kotlin/2p-full.js +0 -15
- package/kotlin/2p-full.js.map +0 -1
- package/kotlin/2p-full.meta.js +0 -1
|
@@ -0,0 +1,3329 @@
|
|
|
1
|
+
(function (_, kotlin_it_unibo_tuprolog_solve, kotlin_kotlin, kotlin_it_unibo_tuprolog_theory, kotlin_it_unibo_tuprolog_unify, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_utils) {
|
|
2
|
+
'use strict';
|
|
3
|
+
//region block: imports
|
|
4
|
+
var imul = Math.imul;
|
|
5
|
+
var Companion_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.m1;
|
|
6
|
+
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_solve.$_$.o1;
|
|
7
|
+
var Unit_getInstance = kotlin_kotlin.$_$.r2;
|
|
8
|
+
var toString = kotlin_kotlin.$_$.n7;
|
|
9
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
10
|
+
var AbstractSolver = kotlin_it_unibo_tuprolog_solve.$_$.x2;
|
|
11
|
+
var THROW_CCE = kotlin_kotlin.$_$.sb;
|
|
12
|
+
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.bc;
|
|
13
|
+
var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_theory.$_$.b;
|
|
14
|
+
var Companion_getInstance_2 = kotlin_it_unibo_tuprolog_theory.$_$.a;
|
|
15
|
+
var getAllOperators = kotlin_it_unibo_tuprolog_solve.$_$.t5;
|
|
16
|
+
var toOperatorSet = kotlin_it_unibo_tuprolog_solve.$_$.v5;
|
|
17
|
+
var Long = kotlin_kotlin.$_$.mb;
|
|
18
|
+
var currentTimeInstant = kotlin_it_unibo_tuprolog_solve.$_$.r5;
|
|
19
|
+
var asSequence = kotlin_kotlin.$_$.i8;
|
|
20
|
+
var copy$default = kotlin_it_unibo_tuprolog_solve.$_$.u;
|
|
21
|
+
var solveWithTimeout = kotlin_it_unibo_tuprolog_solve.$_$.b5;
|
|
22
|
+
var solve = kotlin_it_unibo_tuprolog_solve.$_$.c5;
|
|
23
|
+
var solveListWithTimeout = kotlin_it_unibo_tuprolog_solve.$_$.w4;
|
|
24
|
+
var solveList = kotlin_it_unibo_tuprolog_solve.$_$.v4;
|
|
25
|
+
var solveListWithOptions = kotlin_it_unibo_tuprolog_solve.$_$.x4;
|
|
26
|
+
var solveOnceWithTimeout = kotlin_it_unibo_tuprolog_solve.$_$.y4;
|
|
27
|
+
var solveOnce = kotlin_it_unibo_tuprolog_solve.$_$.a5;
|
|
28
|
+
var solveOnceWithOptions = kotlin_it_unibo_tuprolog_solve.$_$.z4;
|
|
29
|
+
var get_standardInput = kotlin_it_unibo_tuprolog_solve.$_$.g4;
|
|
30
|
+
var get_standardOutput = kotlin_it_unibo_tuprolog_solve.$_$.h4;
|
|
31
|
+
var get_standardError = kotlin_it_unibo_tuprolog_solve.$_$.f4;
|
|
32
|
+
var get_warnings = kotlin_it_unibo_tuprolog_solve.$_$.i4;
|
|
33
|
+
var classMeta = kotlin_kotlin.$_$.m6;
|
|
34
|
+
var setMetadataFor = kotlin_kotlin.$_$.j7;
|
|
35
|
+
var ensureNotNull = kotlin_kotlin.$_$.vb;
|
|
36
|
+
var hashCode = kotlin_kotlin.$_$.t6;
|
|
37
|
+
var equals = kotlin_kotlin.$_$.o6;
|
|
38
|
+
var CoroutineImpl = kotlin_kotlin.$_$.c6;
|
|
39
|
+
var SequenceScope = kotlin_kotlin.$_$.e8;
|
|
40
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.b6;
|
|
41
|
+
var sequence = kotlin_kotlin.$_$.j9;
|
|
42
|
+
var Companion_getInstance_3 = kotlin_it_unibo_tuprolog_unify.$_$.a;
|
|
43
|
+
var Companion_getInstance_4 = kotlin_it_unibo_tuprolog_solve.$_$.f2;
|
|
44
|
+
var Companion_getInstance_5 = kotlin_it_unibo_tuprolog_solve.$_$.a2;
|
|
45
|
+
var Companion_getInstance_6 = kotlin_it_unibo_tuprolog_solve.$_$.p1;
|
|
46
|
+
var Companion_getInstance_7 = kotlin_it_unibo_tuprolog_core.$_$.e1;
|
|
47
|
+
var Companion_getInstance_8 = kotlin_it_unibo_tuprolog_core.$_$.g1;
|
|
48
|
+
var Companion_getInstance_9 = kotlin_it_unibo_tuprolog_utils.$_$.c;
|
|
49
|
+
var Companion_getInstance_10 = kotlin_kotlin.$_$.q2;
|
|
50
|
+
var emptySet = kotlin_kotlin.$_$.u3;
|
|
51
|
+
var asSequence_0 = kotlin_kotlin.$_$.g3;
|
|
52
|
+
var emptySequence = kotlin_kotlin.$_$.n8;
|
|
53
|
+
var plus = kotlin_kotlin.$_$.g9;
|
|
54
|
+
var flatMap = kotlin_kotlin.$_$.u8;
|
|
55
|
+
var distinct = kotlin_kotlin.$_$.l8;
|
|
56
|
+
var cached = kotlin_it_unibo_tuprolog_utils.$_$.r;
|
|
57
|
+
var Companion_getInstance_11 = kotlin_it_unibo_tuprolog_core.$_$.d1;
|
|
58
|
+
var filter = kotlin_kotlin.$_$.r8;
|
|
59
|
+
var map = kotlin_kotlin.$_$.c9;
|
|
60
|
+
var toList = kotlin_kotlin.$_$.p9;
|
|
61
|
+
var lazy = kotlin_kotlin.$_$.xb;
|
|
62
|
+
var contains = kotlin_kotlin.$_$.j8;
|
|
63
|
+
var createSolver$default = kotlin_it_unibo_tuprolog_solve.$_$.s;
|
|
64
|
+
var createMutableSolver$default = kotlin_it_unibo_tuprolog_solve.$_$.r;
|
|
65
|
+
var update$default = kotlin_it_unibo_tuprolog_solve.$_$.t;
|
|
66
|
+
var apply = kotlin_it_unibo_tuprolog_solve.$_$.d4;
|
|
67
|
+
var applyIterable = kotlin_it_unibo_tuprolog_solve.$_$.c4;
|
|
68
|
+
var applySequence = kotlin_it_unibo_tuprolog_solve.$_$.e4;
|
|
69
|
+
var get_endTime = kotlin_it_unibo_tuprolog_solve.$_$.a4;
|
|
70
|
+
var get_remainingTime = kotlin_it_unibo_tuprolog_solve.$_$.b4;
|
|
71
|
+
var get_elapsedTime = kotlin_it_unibo_tuprolog_solve.$_$.z3;
|
|
72
|
+
var ExecutionContext = kotlin_it_unibo_tuprolog_solve.$_$.j4;
|
|
73
|
+
var KProperty1 = kotlin_kotlin.$_$.d8;
|
|
74
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.r6;
|
|
75
|
+
var Companion_getInstance_12 = kotlin_it_unibo_tuprolog_solve.$_$.l1;
|
|
76
|
+
var Companion_getInstance_13 = kotlin_it_unibo_tuprolog_solve.$_$.n1;
|
|
77
|
+
var solverOf$default = kotlin_it_unibo_tuprolog_solve.$_$.z;
|
|
78
|
+
var solverOf$default_0 = kotlin_it_unibo_tuprolog_solve.$_$.y;
|
|
79
|
+
var mutableSolverOf$default = kotlin_it_unibo_tuprolog_solve.$_$.v;
|
|
80
|
+
var mutableSolverOf$default_0 = kotlin_it_unibo_tuprolog_solve.$_$.w;
|
|
81
|
+
var newBuilder = kotlin_it_unibo_tuprolog_solve.$_$.n5;
|
|
82
|
+
var get_defaultRuntime = kotlin_it_unibo_tuprolog_solve.$_$.i5;
|
|
83
|
+
var get_defaultUnificator = kotlin_it_unibo_tuprolog_solve.$_$.k5;
|
|
84
|
+
var get_defaultFlags = kotlin_it_unibo_tuprolog_solve.$_$.f5;
|
|
85
|
+
var get_defaultStaticKb = kotlin_it_unibo_tuprolog_solve.$_$.j5;
|
|
86
|
+
var get_defaultDynamicKb = kotlin_it_unibo_tuprolog_solve.$_$.d5;
|
|
87
|
+
var get_defaultInputChannel = kotlin_it_unibo_tuprolog_solve.$_$.g5;
|
|
88
|
+
var get_defaultOutputChannel = kotlin_it_unibo_tuprolog_solve.$_$.h5;
|
|
89
|
+
var get_defaultErrorChannel = kotlin_it_unibo_tuprolog_solve.$_$.e5;
|
|
90
|
+
var get_defaultWarningsChannel = kotlin_it_unibo_tuprolog_solve.$_$.l5;
|
|
91
|
+
var solverWithDefaultBuiltins = kotlin_it_unibo_tuprolog_solve.$_$.o5;
|
|
92
|
+
var solverWithDefaultBuiltins$default = kotlin_it_unibo_tuprolog_solve.$_$.a1;
|
|
93
|
+
var mutableSolverWithDefaultBuiltins = kotlin_it_unibo_tuprolog_solve.$_$.m5;
|
|
94
|
+
var mutableSolverWithDefaultBuiltins$default = kotlin_it_unibo_tuprolog_solve.$_$.x;
|
|
95
|
+
var SolverFactory = kotlin_it_unibo_tuprolog_solve.$_$.p5;
|
|
96
|
+
var objectMeta = kotlin_kotlin.$_$.i7;
|
|
97
|
+
var listOf = kotlin_kotlin.$_$.h4;
|
|
98
|
+
var getAllOperators_0 = kotlin_it_unibo_tuprolog_solve.$_$.u5;
|
|
99
|
+
var to = kotlin_kotlin.$_$.ec;
|
|
100
|
+
var loadStaticClauses = kotlin_it_unibo_tuprolog_solve.$_$.n4;
|
|
101
|
+
var loadStaticClausesIterable = kotlin_it_unibo_tuprolog_solve.$_$.o4;
|
|
102
|
+
var loadStaticClausesSequence = kotlin_it_unibo_tuprolog_solve.$_$.p4;
|
|
103
|
+
var loadDynamicClauses = kotlin_it_unibo_tuprolog_solve.$_$.m4;
|
|
104
|
+
var loadDynamicClausesIterable = kotlin_it_unibo_tuprolog_solve.$_$.k4;
|
|
105
|
+
var loadDynamicClausesSequence = kotlin_it_unibo_tuprolog_solve.$_$.l4;
|
|
106
|
+
var MutableSolver = kotlin_it_unibo_tuprolog_solve.$_$.q4;
|
|
107
|
+
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.v1;
|
|
108
|
+
var TimeOutException_init_$Create$ = kotlin_it_unibo_tuprolog_solve.$_$.d1;
|
|
109
|
+
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.w1;
|
|
110
|
+
var interfaceMeta = kotlin_kotlin.$_$.u6;
|
|
111
|
+
var getKClass = kotlin_kotlin.$_$.c;
|
|
112
|
+
var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.o1;
|
|
113
|
+
var Companion_getInstance_14 = kotlin_it_unibo_tuprolog_solve.$_$.m2;
|
|
114
|
+
var MessageError = kotlin_it_unibo_tuprolog_solve.$_$.s2;
|
|
115
|
+
var Companion_getInstance_15 = kotlin_it_unibo_tuprolog_solve.$_$.x1;
|
|
116
|
+
var plus_0 = kotlin_it_unibo_tuprolog_utils.$_$.h1;
|
|
117
|
+
var LogicError = kotlin_it_unibo_tuprolog_solve.$_$.u2;
|
|
118
|
+
var toSet = kotlin_kotlin.$_$.r9;
|
|
119
|
+
var plus_1 = kotlin_kotlin.$_$.y4;
|
|
120
|
+
var TrackVariables_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.c2;
|
|
121
|
+
var drop = kotlin_kotlin.$_$.m8;
|
|
122
|
+
var first = kotlin_kotlin.$_$.t8;
|
|
123
|
+
var Unifier = kotlin_it_unibo_tuprolog_core.$_$.a2;
|
|
124
|
+
var isInterface = kotlin_kotlin.$_$.y6;
|
|
125
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.s1;
|
|
126
|
+
var ResolutionException = kotlin_it_unibo_tuprolog_solve.$_$.v2;
|
|
127
|
+
var Companion_getInstance_16 = kotlin_it_unibo_tuprolog_solve.$_$.y1;
|
|
128
|
+
var extractSignature = kotlin_it_unibo_tuprolog_solve.$_$.s5;
|
|
129
|
+
var Signature_init_$Create$ = kotlin_it_unibo_tuprolog_solve.$_$.h1;
|
|
130
|
+
var Expected_CALLABLE_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.k;
|
|
131
|
+
var cursor = kotlin_it_unibo_tuprolog_utils.$_$.t;
|
|
132
|
+
var Companion_getInstance_17 = kotlin_it_unibo_tuprolog_solve.$_$.t1;
|
|
133
|
+
var prepareForExecutionWithUnifier = kotlin_it_unibo_tuprolog_core.$_$.d3;
|
|
134
|
+
var setOf = kotlin_kotlin.$_$.e5;
|
|
135
|
+
var Unknown_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.d2;
|
|
136
|
+
var MissingPredicate_init_$Create$ = kotlin_it_unibo_tuprolog_solve.$_$.i1;
|
|
137
|
+
var Companion_getInstance_18 = kotlin_it_unibo_tuprolog_solve.$_$.s1;
|
|
138
|
+
var contains_0 = kotlin_kotlin.$_$.k3;
|
|
139
|
+
var firstOrNull = kotlin_kotlin.$_$.s8;
|
|
140
|
+
var any = kotlin_kotlin.$_$.g8;
|
|
141
|
+
var LastCallOptimization_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.b2;
|
|
142
|
+
var buffered = kotlin_it_unibo_tuprolog_utils.$_$.q;
|
|
143
|
+
var sequenceOf = kotlin_kotlin.$_$.i9;
|
|
144
|
+
var MagicCut = kotlin_it_unibo_tuprolog_solve.$_$.y3;
|
|
145
|
+
var Request_init_$Create$ = kotlin_it_unibo_tuprolog_solve.$_$.f1;
|
|
146
|
+
var ExtensionLibrary = kotlin_it_unibo_tuprolog_solve.$_$.z2;
|
|
147
|
+
var CommonBuiltins_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.l2;
|
|
148
|
+
var listOf_0 = kotlin_kotlin.$_$.i4;
|
|
149
|
+
var containsSignature = kotlin_it_unibo_tuprolog_solve.$_$.b3;
|
|
150
|
+
var containsOperator = kotlin_it_unibo_tuprolog_solve.$_$.a3;
|
|
151
|
+
var hasPrimitive = kotlin_it_unibo_tuprolog_solve.$_$.d3;
|
|
152
|
+
var hasFunction = kotlin_it_unibo_tuprolog_solve.$_$.c3;
|
|
153
|
+
var get_ruleSignatures = kotlin_it_unibo_tuprolog_solve.$_$.f3;
|
|
154
|
+
var hasProtected = kotlin_it_unibo_tuprolog_solve.$_$.e3;
|
|
155
|
+
var Struct = kotlin_it_unibo_tuprolog_core.$_$.z1;
|
|
156
|
+
var Companion_getInstance_19 = kotlin_it_unibo_tuprolog_solve.$_$.u1;
|
|
157
|
+
var Companion_getInstance_20 = kotlin_it_unibo_tuprolog_solve.$_$.z1;
|
|
158
|
+
var UnaryPredicate = kotlin_it_unibo_tuprolog_solve.$_$.w3;
|
|
159
|
+
var Companion_getInstance_21 = kotlin_it_unibo_tuprolog_solve.$_$.g2;
|
|
160
|
+
var RuleWrapper = kotlin_it_unibo_tuprolog_solve.$_$.x3;
|
|
161
|
+
var RuleWrapper_init_$Init$ = kotlin_it_unibo_tuprolog_solve.$_$.g1;
|
|
162
|
+
var EnsureExecutable_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.i2;
|
|
163
|
+
var MagicCut_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.h2;
|
|
164
|
+
//endregion
|
|
165
|
+
//region block: pre-declaration
|
|
166
|
+
setMetadataFor(AbstractClassicSolver, 'AbstractClassicSolver', classMeta, AbstractSolver, undefined, undefined, undefined, []);
|
|
167
|
+
setMetadataFor(ChoicePointContext, 'ChoicePointContext', classMeta, undefined, undefined, undefined, undefined, []);
|
|
168
|
+
setMetadataFor(Primitives, 'Primitives', classMeta, ChoicePointContext, undefined, undefined, undefined, []);
|
|
169
|
+
setMetadataFor(Rules, 'Rules', classMeta, ChoicePointContext, undefined, undefined, undefined, []);
|
|
170
|
+
setMetadataFor(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn, 'ChoicePointContext$<get-pathToRoot>$slambda', classMeta, CoroutineImpl, undefined, undefined, undefined, [1]);
|
|
171
|
+
setMetadataFor(ClassicExecutionContext$pathToRoot$slambda, 'ClassicExecutionContext$pathToRoot$slambda', classMeta, CoroutineImpl, undefined, undefined, undefined, [1]);
|
|
172
|
+
setMetadataFor(ClassicExecutionContext, 'ClassicExecutionContext', classMeta, undefined, [ExecutionContext], undefined, undefined, []);
|
|
173
|
+
setMetadataFor(ClassicSolver, 'ClassicSolver', classMeta, AbstractClassicSolver, undefined, undefined, undefined, []);
|
|
174
|
+
setMetadataFor(ClassicSolverFactory, 'ClassicSolverFactory', objectMeta, undefined, [SolverFactory], undefined, undefined, []);
|
|
175
|
+
setMetadataFor(MutableClassicSolver, 'MutableClassicSolver', classMeta, ClassicSolver, [ClassicSolver, MutableSolver], undefined, undefined, []);
|
|
176
|
+
setMetadataFor(Companion, 'Companion', objectMeta, undefined, undefined, undefined, undefined, []);
|
|
177
|
+
function get_isEndState() {
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
function asEndState() {
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
function castToEndState() {
|
|
184
|
+
var tmp0_elvis_lhs = this.asEndState();
|
|
185
|
+
var tmp;
|
|
186
|
+
if (tmp0_elvis_lhs == null) {
|
|
187
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + this + ' to ' + getKClass(EndState).kd());
|
|
188
|
+
} else {
|
|
189
|
+
tmp = tmp0_elvis_lhs;
|
|
190
|
+
}
|
|
191
|
+
return tmp;
|
|
192
|
+
}
|
|
193
|
+
setMetadataFor(State, 'State', interfaceMeta, undefined, undefined, undefined, undefined, []);
|
|
194
|
+
function get_hasOpenAlternatives() {
|
|
195
|
+
return this.h2j().d1w() ? this.j5().g35() : false;
|
|
196
|
+
}
|
|
197
|
+
function get_isEndState_0() {
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
function asEndState_0() {
|
|
201
|
+
return this;
|
|
202
|
+
}
|
|
203
|
+
function asEndState_1() {
|
|
204
|
+
return this.e38();
|
|
205
|
+
}
|
|
206
|
+
setMetadataFor(EndState, 'EndState', interfaceMeta, undefined, [State], undefined, undefined, []);
|
|
207
|
+
setMetadataFor(AbstractState, 'AbstractState', classMeta, undefined, [State], undefined, undefined, []);
|
|
208
|
+
setMetadataFor(AbstractEndState, 'AbstractEndState', classMeta, AbstractState, [EndState, AbstractState], undefined, undefined, []);
|
|
209
|
+
setMetadataFor(StateBacktracking, 'StateBacktracking', classMeta, AbstractState, undefined, undefined, undefined, []);
|
|
210
|
+
setMetadataFor(StateEnd, 'StateEnd', classMeta, AbstractEndState, undefined, undefined, undefined, []);
|
|
211
|
+
setMetadataFor(StateException, 'StateException', classMeta, AbstractState, [State, AbstractState], undefined, undefined, []);
|
|
212
|
+
setMetadataFor(StateGoalSelection, 'StateGoalSelection', classMeta, AbstractState, undefined, undefined, undefined, []);
|
|
213
|
+
setMetadataFor(StateHalt, 'StateHalt', classMeta, AbstractEndState, [State, AbstractEndState], undefined, undefined, []);
|
|
214
|
+
setMetadataFor(StateInit, 'StateInit', classMeta, AbstractState, undefined, undefined, undefined, []);
|
|
215
|
+
setMetadataFor(StatePrimitiveExecution, 'StatePrimitiveExecution', classMeta, AbstractState, undefined, undefined, undefined, []);
|
|
216
|
+
setMetadataFor(StatePrimitiveSelection, 'StatePrimitiveSelection', classMeta, AbstractState, undefined, undefined, undefined, []);
|
|
217
|
+
setMetadataFor(StateRuleExecution, 'StateRuleExecution', classMeta, AbstractState, undefined, undefined, undefined, []);
|
|
218
|
+
setMetadataFor(CutLimit, 'CutLimit', classMeta, undefined, undefined, undefined, undefined, []);
|
|
219
|
+
setMetadataFor(None, 'None', objectMeta, CutLimit, undefined, undefined, undefined, []);
|
|
220
|
+
setMetadataFor(Actual, 'Actual', classMeta, CutLimit, undefined, undefined, undefined, []);
|
|
221
|
+
setMetadataFor(Companion_0, 'Companion', objectMeta, undefined, undefined, undefined, undefined, []);
|
|
222
|
+
setMetadataFor(StateRuleSelection, 'StateRuleSelection', classMeta, AbstractState, undefined, undefined, undefined, []);
|
|
223
|
+
setMetadataFor(AbstractSolutionIterator, 'AbstractSolutionIterator', classMeta, undefined, undefined, undefined, undefined, []);
|
|
224
|
+
setMetadataFor(SimpleSolutionIterator, 'SimpleSolutionIterator', classMeta, AbstractSolutionIterator, undefined, undefined, undefined, []);
|
|
225
|
+
setMetadataFor(DefaultBuiltins, 'DefaultBuiltins', objectMeta, ExtensionLibrary, undefined, undefined, undefined, []);
|
|
226
|
+
setMetadataFor(Throw, 'Throw', objectMeta, UnaryPredicate, undefined, undefined, undefined, []);
|
|
227
|
+
setMetadataFor(Call, 'Call', objectMeta, RuleWrapper, undefined, undefined, undefined, []);
|
|
228
|
+
setMetadataFor(Catch, 'Catch', objectMeta, RuleWrapper, undefined, undefined, undefined, []);
|
|
229
|
+
setMetadataFor(Comma, 'Comma', objectMeta, RuleWrapper, undefined, undefined, undefined, []);
|
|
230
|
+
setMetadataFor(Cut, 'Cut', objectMeta, RuleWrapper, undefined, undefined, undefined, []);
|
|
231
|
+
setMetadataFor(NegationAsFailure, 'NegationAsFailure', classMeta, RuleWrapper, undefined, undefined, undefined, []);
|
|
232
|
+
setMetadataFor(Fail, 'Fail', objectMeta, NegationAsFailure, undefined, undefined, undefined, []);
|
|
233
|
+
setMetadataFor(Success, 'Success', objectMeta, NegationAsFailure, undefined, undefined, undefined, []);
|
|
234
|
+
setMetadataFor(Companion_1, 'Companion', objectMeta, undefined, undefined, undefined, undefined, []);
|
|
235
|
+
//endregion
|
|
236
|
+
function AbstractClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this) {
|
|
237
|
+
AbstractClassicSolver.call($this, unificator, libraries, flags, staticKb, dynamicKb, Companion_getInstance().p1y(stdIn), Companion_getInstance_0().s1y(stdOut, stdErr, warnings), trustKb);
|
|
238
|
+
return $this;
|
|
239
|
+
}
|
|
240
|
+
function updateCurrentContextAfterStateTransition($this, source, destination, index) {
|
|
241
|
+
// Inline function 'kotlin.require' call
|
|
242
|
+
var tmp0_require = destination.j5().c34_1.equals(index);
|
|
243
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
244
|
+
// Inline function 'kotlin.require' call
|
|
245
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
246
|
+
if (!tmp0_require) {
|
|
247
|
+
var tmp$ret$0;
|
|
248
|
+
// Inline function 'kotlin.require.<anonymous>' call
|
|
249
|
+
tmp$ret$0 = 'Failed requirement.';
|
|
250
|
+
var message = tmp$ret$0;
|
|
251
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
252
|
+
}
|
|
253
|
+
$this.j34(destination.j5());
|
|
254
|
+
}
|
|
255
|
+
function AbstractClassicSolver$updateCurrentContextAfterStateTransition$ref($boundThis) {
|
|
256
|
+
var l = function (p0, p1, p2) {
|
|
257
|
+
updateCurrentContextAfterStateTransition($boundThis, p0, p1, p2);
|
|
258
|
+
return Unit_getInstance();
|
|
259
|
+
};
|
|
260
|
+
l.callableName = 'updateCurrentContextAfterStateTransition';
|
|
261
|
+
return l;
|
|
262
|
+
}
|
|
263
|
+
function AbstractClassicSolver(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb) {
|
|
264
|
+
AbstractSolver.call(this, unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb);
|
|
265
|
+
}
|
|
266
|
+
AbstractClassicSolver.prototype.j34 = function (_set____db54di) {
|
|
267
|
+
this.i34_1 = _set____db54di;
|
|
268
|
+
};
|
|
269
|
+
AbstractClassicSolver.prototype.p2b = function (_set____db54di) {
|
|
270
|
+
return this.j34(_set____db54di instanceof ClassicExecutionContext ? _set____db54di : THROW_CCE());
|
|
271
|
+
};
|
|
272
|
+
AbstractClassicSolver.prototype.n2b = function () {
|
|
273
|
+
var tmp = this.i34_1;
|
|
274
|
+
if (!(tmp == null))
|
|
275
|
+
return tmp;
|
|
276
|
+
else {
|
|
277
|
+
throwUninitializedPropertyAccessException('currentContext');
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
AbstractClassicSolver.prototype.o2b = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, trustKb) {
|
|
281
|
+
var tmp = trustKb ? staticKb.toImmutableTheory() : Companion_getInstance_1().empty(unificator);
|
|
282
|
+
var tmp_0 = trustKb ? dynamicKb.toMutableTheory() : Companion_getInstance_2().empty(unificator);
|
|
283
|
+
var tmp_1 = toOperatorSet(getAllOperators(libraries, []));
|
|
284
|
+
var tmp_2 = new Long(0, 0);
|
|
285
|
+
var tmp_3 = new Long(0, 0);
|
|
286
|
+
var tmp_4 = new Long(0, 0);
|
|
287
|
+
return ClassicExecutionContext_init_$Create$(null, unificator, libraries, flags, tmp, tmp_0, tmp_1, inputChannels, outputChannels, null, null, null, null, null, null, tmp_2, tmp_3, null, null, 0, tmp_4, null, 4161025, null);
|
|
288
|
+
};
|
|
289
|
+
AbstractClassicSolver.prototype.v2b = function (goal, options) {
|
|
290
|
+
var tmp0_unificator = this.k1l();
|
|
291
|
+
var tmp1_libraries = this.w1u();
|
|
292
|
+
var tmp2_flags = this.x1u();
|
|
293
|
+
var tmp3_staticKb = this.y1u().toImmutableTheory();
|
|
294
|
+
var tmp4_dynamicKb = this.z1u().toMutableTheory();
|
|
295
|
+
var tmp5_operators = this.h1v();
|
|
296
|
+
var tmp6_inputChannels = this.a1v();
|
|
297
|
+
var tmp7_outputChannels = this.b1v();
|
|
298
|
+
var tmp8_customData = this.n2b().r33_1;
|
|
299
|
+
var tmp9_startTime = currentTimeInstant();
|
|
300
|
+
var tmp10_maxDuration = options.j1x();
|
|
301
|
+
var tmp = new Long(0, 0);
|
|
302
|
+
this.j34(ClassicExecutionContext_init_$Create$(null, tmp0_unificator, tmp1_libraries, tmp2_flags, tmp3_staticKb, tmp4_dynamicKb, tmp5_operators, tmp6_inputChannels, tmp7_outputChannels, tmp8_customData, null, goal, null, null, null, tmp9_startTime, tmp10_maxDuration, null, null, 0, tmp, null, 4092929, null));
|
|
303
|
+
var tmp_0 = new StateInit(this.n2b());
|
|
304
|
+
return asSequence(this.k34(tmp_0, AbstractClassicSolver$updateCurrentContextAfterStateTransition$ref(this)));
|
|
305
|
+
};
|
|
306
|
+
function Primitives(alternatives, executionContext, parent, depth) {
|
|
307
|
+
ChoicePointContext.call(this, alternatives, executionContext, parent, depth);
|
|
308
|
+
this.p34_1 = alternatives;
|
|
309
|
+
this.q34_1 = executionContext;
|
|
310
|
+
this.r34_1 = parent;
|
|
311
|
+
this.s34_1 = depth;
|
|
312
|
+
}
|
|
313
|
+
Primitives.prototype.t34 = function () {
|
|
314
|
+
return this.p34_1;
|
|
315
|
+
};
|
|
316
|
+
Primitives.prototype.u34 = function () {
|
|
317
|
+
return this.q34_1;
|
|
318
|
+
};
|
|
319
|
+
Primitives.prototype.v34 = function () {
|
|
320
|
+
return this.r34_1;
|
|
321
|
+
};
|
|
322
|
+
Primitives.prototype.w34 = function () {
|
|
323
|
+
return this.s34_1;
|
|
324
|
+
};
|
|
325
|
+
Primitives.prototype.toString = function () {
|
|
326
|
+
return ChoicePointContext.prototype.toString.call(this);
|
|
327
|
+
};
|
|
328
|
+
Primitives.prototype.x34 = function () {
|
|
329
|
+
return 'Primitives';
|
|
330
|
+
};
|
|
331
|
+
Primitives.prototype.y34 = function (context) {
|
|
332
|
+
var tmp0_$this = ensureNotNull(this.q34_1);
|
|
333
|
+
var tmp1_primitives = this.p34_1;
|
|
334
|
+
var tmp$ret$0;
|
|
335
|
+
// Inline function 'kotlin.Long.plus' call
|
|
336
|
+
var tmp0_plus = context.c34_1;
|
|
337
|
+
tmp$ret$0 = tmp0_plus.bh(new Long(1, 0));
|
|
338
|
+
var tmp2_step = tmp$ret$0;
|
|
339
|
+
var tmp3_startTime = context.x33_1;
|
|
340
|
+
var tmp4_flags = context.l33_1;
|
|
341
|
+
var tmp5_dynamicKb = context.n33_1;
|
|
342
|
+
var tmp6_staticKb = context.m33_1;
|
|
343
|
+
var tmp7_operators = context.o33_1;
|
|
344
|
+
var tmp8_inputChannels = context.p33_1;
|
|
345
|
+
var tmp9_outputChannels = context.q33_1;
|
|
346
|
+
var tmp10_libraries = context.k33_1;
|
|
347
|
+
var tmp11_customData = context.r33_1.discardEphemeral();
|
|
348
|
+
var tmp = new Long(0, 0);
|
|
349
|
+
var tempContext = tmp0_$this.z34(null, null, tmp10_libraries, tmp4_flags, tmp6_staticKb, tmp5_dynamicKb, tmp7_operators, tmp8_inputChannels, tmp9_outputChannels, tmp11_customData, null, null, null, null, tmp1_primitives, tmp3_startTime, tmp, null, null, 0, tmp2_step, null, 3095555, null);
|
|
350
|
+
var tmp_0 = this.p34_1.tq();
|
|
351
|
+
var nextChoicePointContext = this.a35(tmp_0, tempContext, null, 0, 12, null);
|
|
352
|
+
var tmp_1 = new Long(0, 0);
|
|
353
|
+
var tmp_2 = new Long(0, 0);
|
|
354
|
+
var tmp_3 = new Long(0, 0);
|
|
355
|
+
return tempContext.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_1, tmp_2, nextChoicePointContext, null, 0, tmp_3, null, 4063231, null);
|
|
356
|
+
};
|
|
357
|
+
Primitives.prototype.b35 = function (alternatives, executionContext, parent, depth) {
|
|
358
|
+
return new Primitives(alternatives, executionContext, parent, depth);
|
|
359
|
+
};
|
|
360
|
+
Primitives.prototype.a35 = function (alternatives, executionContext, parent, depth, $mask0, $handler) {
|
|
361
|
+
if (!(($mask0 & 1) === 0))
|
|
362
|
+
alternatives = this.p34_1;
|
|
363
|
+
if (!(($mask0 & 2) === 0))
|
|
364
|
+
executionContext = this.q34_1;
|
|
365
|
+
if (!(($mask0 & 4) === 0))
|
|
366
|
+
parent = this.r34_1;
|
|
367
|
+
if (!(($mask0 & 8) === 0))
|
|
368
|
+
depth = this.s34_1;
|
|
369
|
+
return this.b35(alternatives, executionContext, parent, depth);
|
|
370
|
+
};
|
|
371
|
+
Primitives.prototype.hashCode = function () {
|
|
372
|
+
var result = hashCode(this.p34_1);
|
|
373
|
+
result = imul(result, 31) + (this.q34_1 == null ? 0 : this.q34_1.hashCode()) | 0;
|
|
374
|
+
result = imul(result, 31) + (this.r34_1 == null ? 0 : hashCode(this.r34_1)) | 0;
|
|
375
|
+
result = imul(result, 31) + this.s34_1 | 0;
|
|
376
|
+
return result;
|
|
377
|
+
};
|
|
378
|
+
Primitives.prototype.equals = function (other) {
|
|
379
|
+
if (this === other)
|
|
380
|
+
return true;
|
|
381
|
+
if (!(other instanceof Primitives))
|
|
382
|
+
return false;
|
|
383
|
+
var tmp0_other_with_cast = other instanceof Primitives ? other : THROW_CCE();
|
|
384
|
+
if (!equals(this.p34_1, tmp0_other_with_cast.p34_1))
|
|
385
|
+
return false;
|
|
386
|
+
if (!equals(this.q34_1, tmp0_other_with_cast.q34_1))
|
|
387
|
+
return false;
|
|
388
|
+
if (!equals(this.r34_1, tmp0_other_with_cast.r34_1))
|
|
389
|
+
return false;
|
|
390
|
+
if (!(this.s34_1 === tmp0_other_with_cast.s34_1))
|
|
391
|
+
return false;
|
|
392
|
+
return true;
|
|
393
|
+
};
|
|
394
|
+
function Rules(alternatives, executionContext, parent, depth) {
|
|
395
|
+
ChoicePointContext.call(this, alternatives, executionContext, parent, depth);
|
|
396
|
+
this.o35_1 = alternatives;
|
|
397
|
+
this.p35_1 = executionContext;
|
|
398
|
+
this.q35_1 = parent;
|
|
399
|
+
this.r35_1 = depth;
|
|
400
|
+
}
|
|
401
|
+
Rules.prototype.t34 = function () {
|
|
402
|
+
return this.o35_1;
|
|
403
|
+
};
|
|
404
|
+
Rules.prototype.u34 = function () {
|
|
405
|
+
return this.p35_1;
|
|
406
|
+
};
|
|
407
|
+
Rules.prototype.v34 = function () {
|
|
408
|
+
return this.q35_1;
|
|
409
|
+
};
|
|
410
|
+
Rules.prototype.w34 = function () {
|
|
411
|
+
return this.r35_1;
|
|
412
|
+
};
|
|
413
|
+
Rules.prototype.toString = function () {
|
|
414
|
+
return ChoicePointContext.prototype.toString.call(this);
|
|
415
|
+
};
|
|
416
|
+
Rules.prototype.x34 = function () {
|
|
417
|
+
return 'Rules';
|
|
418
|
+
};
|
|
419
|
+
Rules.prototype.y34 = function (context) {
|
|
420
|
+
var tmp0_$this = ensureNotNull(this.p35_1);
|
|
421
|
+
var tmp1_rules = this.o35_1;
|
|
422
|
+
var tmp$ret$0;
|
|
423
|
+
// Inline function 'kotlin.Long.plus' call
|
|
424
|
+
var tmp0_plus = context.c34_1;
|
|
425
|
+
tmp$ret$0 = tmp0_plus.bh(new Long(1, 0));
|
|
426
|
+
var tmp2_step = tmp$ret$0;
|
|
427
|
+
var tmp3_startTime = context.x33_1;
|
|
428
|
+
var tmp4_flags = context.l33_1;
|
|
429
|
+
var tmp5_dynamicKb = context.n33_1;
|
|
430
|
+
var tmp6_staticKb = context.m33_1;
|
|
431
|
+
var tmp7_operators = context.o33_1;
|
|
432
|
+
var tmp8_inputChannels = context.p33_1;
|
|
433
|
+
var tmp9_outputChannels = context.q33_1;
|
|
434
|
+
var tmp10_libraries = context.k33_1;
|
|
435
|
+
var tmp11_customData = context.r33_1.discardEphemeral();
|
|
436
|
+
var tmp = new Long(0, 0);
|
|
437
|
+
var tempContext = tmp0_$this.z34(null, null, tmp10_libraries, tmp4_flags, tmp6_staticKb, tmp5_dynamicKb, tmp7_operators, tmp8_inputChannels, tmp9_outputChannels, tmp11_customData, null, null, null, tmp1_rules, null, tmp3_startTime, tmp, null, null, 0, tmp2_step, null, 3103747, null);
|
|
438
|
+
var tmp_0 = this.o35_1.tq();
|
|
439
|
+
var nextChoicePointContext = this.s35(tmp_0, tempContext, null, 0, 12, null);
|
|
440
|
+
var tmp_1 = new Long(0, 0);
|
|
441
|
+
var tmp_2 = new Long(0, 0);
|
|
442
|
+
var tmp_3 = new Long(0, 0);
|
|
443
|
+
return tempContext.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_1, tmp_2, nextChoicePointContext, null, 0, tmp_3, null, 4063231, null);
|
|
444
|
+
};
|
|
445
|
+
Rules.prototype.t35 = function (alternatives, executionContext, parent, depth) {
|
|
446
|
+
return new Rules(alternatives, executionContext, parent, depth);
|
|
447
|
+
};
|
|
448
|
+
Rules.prototype.s35 = function (alternatives, executionContext, parent, depth, $mask0, $handler) {
|
|
449
|
+
if (!(($mask0 & 1) === 0))
|
|
450
|
+
alternatives = this.o35_1;
|
|
451
|
+
if (!(($mask0 & 2) === 0))
|
|
452
|
+
executionContext = this.p35_1;
|
|
453
|
+
if (!(($mask0 & 4) === 0))
|
|
454
|
+
parent = this.q35_1;
|
|
455
|
+
if (!(($mask0 & 8) === 0))
|
|
456
|
+
depth = this.r35_1;
|
|
457
|
+
return this.t35(alternatives, executionContext, parent, depth);
|
|
458
|
+
};
|
|
459
|
+
Rules.prototype.hashCode = function () {
|
|
460
|
+
var result = hashCode(this.o35_1);
|
|
461
|
+
result = imul(result, 31) + (this.p35_1 == null ? 0 : this.p35_1.hashCode()) | 0;
|
|
462
|
+
result = imul(result, 31) + (this.q35_1 == null ? 0 : hashCode(this.q35_1)) | 0;
|
|
463
|
+
result = imul(result, 31) + this.r35_1 | 0;
|
|
464
|
+
return result;
|
|
465
|
+
};
|
|
466
|
+
Rules.prototype.equals = function (other) {
|
|
467
|
+
if (this === other)
|
|
468
|
+
return true;
|
|
469
|
+
if (!(other instanceof Rules))
|
|
470
|
+
return false;
|
|
471
|
+
var tmp0_other_with_cast = other instanceof Rules ? other : THROW_CCE();
|
|
472
|
+
if (!equals(this.o35_1, tmp0_other_with_cast.o35_1))
|
|
473
|
+
return false;
|
|
474
|
+
if (!equals(this.p35_1, tmp0_other_with_cast.p35_1))
|
|
475
|
+
return false;
|
|
476
|
+
if (!equals(this.q35_1, tmp0_other_with_cast.q35_1))
|
|
477
|
+
return false;
|
|
478
|
+
if (!(this.r35_1 === tmp0_other_with_cast.r35_1))
|
|
479
|
+
return false;
|
|
480
|
+
return true;
|
|
481
|
+
};
|
|
482
|
+
function ChoicePointContext$_get_pathToRoot_$slambda_q0myjn(this$0, resultContinuation) {
|
|
483
|
+
this.c36_1 = this$0;
|
|
484
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
485
|
+
}
|
|
486
|
+
ChoicePointContext$_get_pathToRoot_$slambda_q0myjn.prototype.f36 = function ($this$sequence, $cont) {
|
|
487
|
+
var tmp = this.g36($this$sequence, $cont);
|
|
488
|
+
tmp.ei_1 = Unit_getInstance();
|
|
489
|
+
tmp.fi_1 = null;
|
|
490
|
+
return tmp.ki();
|
|
491
|
+
};
|
|
492
|
+
ChoicePointContext$_get_pathToRoot_$slambda_q0myjn.prototype.wi = function (p1, $cont) {
|
|
493
|
+
return this.f36(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $cont);
|
|
494
|
+
};
|
|
495
|
+
ChoicePointContext$_get_pathToRoot_$slambda_q0myjn.prototype.ki = function () {
|
|
496
|
+
var suspendResult = this.ei_1;
|
|
497
|
+
$sm: do
|
|
498
|
+
try {
|
|
499
|
+
var tmp = this.ci_1;
|
|
500
|
+
switch (tmp) {
|
|
501
|
+
case 0:
|
|
502
|
+
this.di_1 = 4;
|
|
503
|
+
this.e36_1 = this.c36_1;
|
|
504
|
+
this.ci_1 = 1;
|
|
505
|
+
continue $sm;
|
|
506
|
+
case 1:
|
|
507
|
+
if (!!(this.e36_1 == null)) {
|
|
508
|
+
this.ci_1 = 3;
|
|
509
|
+
continue $sm;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
this.ci_1 = 2;
|
|
513
|
+
suspendResult = this.d36_1.z4(ensureNotNull(this.e36_1), this);
|
|
514
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
515
|
+
return suspendResult;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
continue $sm;
|
|
519
|
+
case 2:
|
|
520
|
+
this.e36_1 = this.e36_1.v34();
|
|
521
|
+
this.ci_1 = 1;
|
|
522
|
+
continue $sm;
|
|
523
|
+
case 3:
|
|
524
|
+
return Unit_getInstance();
|
|
525
|
+
case 4:
|
|
526
|
+
throw this.fi_1;
|
|
527
|
+
}
|
|
528
|
+
} catch ($p) {
|
|
529
|
+
if (this.di_1 === 4) {
|
|
530
|
+
throw $p;
|
|
531
|
+
} else {
|
|
532
|
+
this.ci_1 = this.di_1;
|
|
533
|
+
this.fi_1 = $p;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
while (true);
|
|
537
|
+
};
|
|
538
|
+
ChoicePointContext$_get_pathToRoot_$slambda_q0myjn.prototype.g36 = function ($this$sequence, completion) {
|
|
539
|
+
var i = new ChoicePointContext$_get_pathToRoot_$slambda_q0myjn(this.c36_1, completion);
|
|
540
|
+
i.d36_1 = $this$sequence;
|
|
541
|
+
return i;
|
|
542
|
+
};
|
|
543
|
+
function ChoicePointContext$_get_pathToRoot_$slambda_q0myjn_0(this$0, resultContinuation) {
|
|
544
|
+
var i = new ChoicePointContext$_get_pathToRoot_$slambda_q0myjn(this$0, resultContinuation);
|
|
545
|
+
var l = function ($this$sequence, $cont) {
|
|
546
|
+
return i.f36($this$sequence, $cont);
|
|
547
|
+
};
|
|
548
|
+
l.$arity = 1;
|
|
549
|
+
return l;
|
|
550
|
+
}
|
|
551
|
+
function ChoicePointContext(alternatives, executionContext, parent, depth) {
|
|
552
|
+
this.c35_1 = alternatives;
|
|
553
|
+
this.d35_1 = executionContext;
|
|
554
|
+
this.e35_1 = parent;
|
|
555
|
+
this.f35_1 = depth;
|
|
556
|
+
}
|
|
557
|
+
ChoicePointContext.prototype.t34 = function () {
|
|
558
|
+
return this.c35_1;
|
|
559
|
+
};
|
|
560
|
+
ChoicePointContext.prototype.u34 = function () {
|
|
561
|
+
return this.d35_1;
|
|
562
|
+
};
|
|
563
|
+
ChoicePointContext.prototype.v34 = function () {
|
|
564
|
+
return this.e35_1;
|
|
565
|
+
};
|
|
566
|
+
ChoicePointContext.prototype.w34 = function () {
|
|
567
|
+
return this.f35_1;
|
|
568
|
+
};
|
|
569
|
+
ChoicePointContext.prototype.g35 = function () {
|
|
570
|
+
var tmp$ret$1;
|
|
571
|
+
$l$block: {
|
|
572
|
+
// Inline function 'kotlin.sequences.any' call
|
|
573
|
+
var tmp0_any = this.h35();
|
|
574
|
+
var tmp0_iterator = tmp0_any.j();
|
|
575
|
+
while (tmp0_iterator.m()) {
|
|
576
|
+
var element = tmp0_iterator.p();
|
|
577
|
+
var tmp$ret$0;
|
|
578
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.ChoicePointContext.<get-hasOpenAlternatives>.<anonymous>' call
|
|
579
|
+
tmp$ret$0 = element.t34().vq();
|
|
580
|
+
if (tmp$ret$0) {
|
|
581
|
+
tmp$ret$1 = true;
|
|
582
|
+
break $l$block;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
tmp$ret$1 = false;
|
|
586
|
+
}
|
|
587
|
+
return tmp$ret$1;
|
|
588
|
+
};
|
|
589
|
+
ChoicePointContext.prototype.h35 = function () {
|
|
590
|
+
return sequence(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn_0(this, null));
|
|
591
|
+
};
|
|
592
|
+
ChoicePointContext.prototype.i35 = function () {
|
|
593
|
+
var tmp0_safe_receiver = this.u34();
|
|
594
|
+
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b34_1;
|
|
595
|
+
};
|
|
596
|
+
ChoicePointContext.prototype.j35 = function () {
|
|
597
|
+
var tmp0_safe_receiver = this.u34();
|
|
598
|
+
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.i33_1;
|
|
599
|
+
};
|
|
600
|
+
ChoicePointContext.prototype.toString = function () {
|
|
601
|
+
var tmp = this.x34() + '(' + ('alternatives=' + this.t34() + ', ');
|
|
602
|
+
var tmp_0;
|
|
603
|
+
if (this.u34() === null) {
|
|
604
|
+
tmp_0 = 'executionContext=' + this.u34() + ', ';
|
|
605
|
+
} else {
|
|
606
|
+
'executionContextDepth=' + this.i35() + ', ';
|
|
607
|
+
tmp_0 = 'executionContextProcedure=' + this.j35() + ', ';
|
|
608
|
+
}
|
|
609
|
+
return tmp + tmp_0 + ('depth=' + this.w34()) + ')';
|
|
610
|
+
};
|
|
611
|
+
function appendRules(_this__u8e3s4, alternatives, executionContext) {
|
|
612
|
+
return new Rules(alternatives, executionContext, _this__u8e3s4, nextDepth(_this__u8e3s4));
|
|
613
|
+
}
|
|
614
|
+
function nextDepth(_this__u8e3s4) {
|
|
615
|
+
return _this__u8e3s4 == null ? 0 : _this__u8e3s4.w34() + 1 | 0;
|
|
616
|
+
}
|
|
617
|
+
function appendPrimitives(_this__u8e3s4, alternatives, executionContext) {
|
|
618
|
+
return new Primitives(alternatives, executionContext, _this__u8e3s4, nextDepth(_this__u8e3s4));
|
|
619
|
+
}
|
|
620
|
+
function ClassicExecutionContext_init_$Init$(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables, $mask0, $marker, $this) {
|
|
621
|
+
if (!(($mask0 & 1) === 0))
|
|
622
|
+
procedure = null;
|
|
623
|
+
if (!(($mask0 & 2) === 0))
|
|
624
|
+
unificator = Companion_getInstance_3().h1l();
|
|
625
|
+
if (!(($mask0 & 4) === 0))
|
|
626
|
+
libraries = Companion_getInstance_4().empty();
|
|
627
|
+
if (!(($mask0 & 8) === 0))
|
|
628
|
+
flags = Companion_getInstance_5().empty();
|
|
629
|
+
if (!(($mask0 & 16) === 0))
|
|
630
|
+
staticKb = Companion_getInstance_1().empty(unificator);
|
|
631
|
+
if (!(($mask0 & 32) === 0))
|
|
632
|
+
dynamicKb = Companion_getInstance_2().empty(unificator);
|
|
633
|
+
if (!(($mask0 & 64) === 0))
|
|
634
|
+
operators = toOperatorSet(getAllOperators(libraries, [staticKb, dynamicKb]));
|
|
635
|
+
if (!(($mask0 & 128) === 0)) {
|
|
636
|
+
var tmp = Companion_getInstance();
|
|
637
|
+
inputChannels = tmp.n1z(null, 1, null);
|
|
638
|
+
}
|
|
639
|
+
if (!(($mask0 & 256) === 0)) {
|
|
640
|
+
var tmp_0 = Companion_getInstance_0();
|
|
641
|
+
outputChannels = tmp_0.o1z(null, null, null, 7, null);
|
|
642
|
+
}
|
|
643
|
+
if (!(($mask0 & 512) === 0))
|
|
644
|
+
customData = Companion_getInstance_6().empty();
|
|
645
|
+
if (!(($mask0 & 1024) === 0))
|
|
646
|
+
substitution = Companion_getInstance_7().empty();
|
|
647
|
+
if (!(($mask0 & 2048) === 0))
|
|
648
|
+
query = Companion_getInstance_8().wv_1;
|
|
649
|
+
if (!(($mask0 & 4096) === 0))
|
|
650
|
+
goals = Companion_getInstance_9().empty();
|
|
651
|
+
if (!(($mask0 & 8192) === 0))
|
|
652
|
+
rules = Companion_getInstance_9().empty();
|
|
653
|
+
if (!(($mask0 & 16384) === 0))
|
|
654
|
+
primitives = Companion_getInstance_9().empty();
|
|
655
|
+
if (!(($mask0 & 65536) === 0)) {
|
|
656
|
+
Companion_getInstance_10();
|
|
657
|
+
maxDuration = new Long(-1, 2147483647);
|
|
658
|
+
}
|
|
659
|
+
if (!(($mask0 & 131072) === 0))
|
|
660
|
+
choicePoints = null;
|
|
661
|
+
if (!(($mask0 & 262144) === 0))
|
|
662
|
+
parent = null;
|
|
663
|
+
if (!(($mask0 & 524288) === 0))
|
|
664
|
+
depth = 0;
|
|
665
|
+
if (!(($mask0 & 1048576) === 0))
|
|
666
|
+
step = new Long(0, 0);
|
|
667
|
+
if (!(($mask0 & 2097152) === 0))
|
|
668
|
+
relevantVariables = emptySet();
|
|
669
|
+
ClassicExecutionContext.call($this, procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables);
|
|
670
|
+
return $this;
|
|
671
|
+
}
|
|
672
|
+
function ClassicExecutionContext_init_$Create$(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables, $mask0, $marker) {
|
|
673
|
+
return ClassicExecutionContext_init_$Init$(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables, $mask0, $marker, Object.create(ClassicExecutionContext.prototype));
|
|
674
|
+
}
|
|
675
|
+
function _get_locallyInterestingVariables__39cqti($this) {
|
|
676
|
+
var tmp = asSequence_0($this.d34_1);
|
|
677
|
+
var tmp0_safe_receiver = $this.u33_1.uq();
|
|
678
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hw();
|
|
679
|
+
return plus(tmp, tmp1_elvis_lhs == null ? emptySequence() : tmp1_elvis_lhs);
|
|
680
|
+
}
|
|
681
|
+
function _get_interestingVariables__k6uw5o($this) {
|
|
682
|
+
var tmp$ret$0;
|
|
683
|
+
// Inline function 'kotlin.getValue' call
|
|
684
|
+
var tmp0_getValue = interestingVariables$factory();
|
|
685
|
+
tmp$ret$0 = $this.g34_1.b1();
|
|
686
|
+
return tmp$ret$0;
|
|
687
|
+
}
|
|
688
|
+
function ClassicExecutionContext$pathToRoot$slambda(this$0, resultContinuation) {
|
|
689
|
+
this.p36_1 = this$0;
|
|
690
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
691
|
+
}
|
|
692
|
+
ClassicExecutionContext$pathToRoot$slambda.prototype.s36 = function ($this$sequence, $cont) {
|
|
693
|
+
var tmp = this.t36($this$sequence, $cont);
|
|
694
|
+
tmp.ei_1 = Unit_getInstance();
|
|
695
|
+
tmp.fi_1 = null;
|
|
696
|
+
return tmp.ki();
|
|
697
|
+
};
|
|
698
|
+
ClassicExecutionContext$pathToRoot$slambda.prototype.wi = function (p1, $cont) {
|
|
699
|
+
return this.s36(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $cont);
|
|
700
|
+
};
|
|
701
|
+
ClassicExecutionContext$pathToRoot$slambda.prototype.ki = function () {
|
|
702
|
+
var suspendResult = this.ei_1;
|
|
703
|
+
$sm: do
|
|
704
|
+
try {
|
|
705
|
+
var tmp = this.ci_1;
|
|
706
|
+
switch (tmp) {
|
|
707
|
+
case 0:
|
|
708
|
+
this.di_1 = 4;
|
|
709
|
+
this.r36_1 = this.p36_1;
|
|
710
|
+
this.ci_1 = 1;
|
|
711
|
+
continue $sm;
|
|
712
|
+
case 1:
|
|
713
|
+
if (!!(this.r36_1 == null)) {
|
|
714
|
+
this.ci_1 = 3;
|
|
715
|
+
continue $sm;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
this.ci_1 = 2;
|
|
719
|
+
suspendResult = this.q36_1.z4(this.r36_1, this);
|
|
720
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
721
|
+
return suspendResult;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
continue $sm;
|
|
725
|
+
case 2:
|
|
726
|
+
this.r36_1 = this.r36_1.a34_1;
|
|
727
|
+
this.ci_1 = 1;
|
|
728
|
+
continue $sm;
|
|
729
|
+
case 3:
|
|
730
|
+
return Unit_getInstance();
|
|
731
|
+
case 4:
|
|
732
|
+
throw this.fi_1;
|
|
733
|
+
}
|
|
734
|
+
} catch ($p) {
|
|
735
|
+
if (this.di_1 === 4) {
|
|
736
|
+
throw $p;
|
|
737
|
+
} else {
|
|
738
|
+
this.ci_1 = this.di_1;
|
|
739
|
+
this.fi_1 = $p;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
while (true);
|
|
743
|
+
};
|
|
744
|
+
ClassicExecutionContext$pathToRoot$slambda.prototype.t36 = function ($this$sequence, completion) {
|
|
745
|
+
var i = new ClassicExecutionContext$pathToRoot$slambda(this.p36_1, completion);
|
|
746
|
+
i.q36_1 = $this$sequence;
|
|
747
|
+
return i;
|
|
748
|
+
};
|
|
749
|
+
function ClassicExecutionContext$pathToRoot$slambda_0(this$0, resultContinuation) {
|
|
750
|
+
var i = new ClassicExecutionContext$pathToRoot$slambda(this$0, resultContinuation);
|
|
751
|
+
var l = function ($this$sequence, $cont) {
|
|
752
|
+
return i.s36($this$sequence, $cont);
|
|
753
|
+
};
|
|
754
|
+
l.$arity = 1;
|
|
755
|
+
return l;
|
|
756
|
+
}
|
|
757
|
+
function ClassicExecutionContext$currentGoal$delegate$lambda(this$0) {
|
|
758
|
+
return function () {
|
|
759
|
+
var tmp;
|
|
760
|
+
if (this$0.u33_1.wq()) {
|
|
761
|
+
tmp = null;
|
|
762
|
+
} else {
|
|
763
|
+
var tmp0_safe_receiver = this$0.u33_1.uq();
|
|
764
|
+
tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.applySubstitution(this$0.s33_1);
|
|
765
|
+
}
|
|
766
|
+
return tmp;
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
function ClassicExecutionContext$interestingVariables$delegate$lambda$lambda(it) {
|
|
770
|
+
return _get_locallyInterestingVariables__39cqti(it);
|
|
771
|
+
}
|
|
772
|
+
function ClassicExecutionContext$interestingVariables$delegate$lambda(this$0) {
|
|
773
|
+
return function () {
|
|
774
|
+
var tmp = plus(_get_locallyInterestingVariables__39cqti(this$0), this$0.t33_1.hw());
|
|
775
|
+
return cached(distinct(plus(tmp, flatMap(this$0.e34_1, ClassicExecutionContext$interestingVariables$delegate$lambda$lambda))));
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
function ClassicExecutionContext$logicStackTrace$delegate$lambda$lambda(it) {
|
|
779
|
+
return it.u36();
|
|
780
|
+
}
|
|
781
|
+
function ClassicExecutionContext$logicStackTrace$delegate$lambda$lambda_0(this$0) {
|
|
782
|
+
return function (it) {
|
|
783
|
+
var tmp0_elvis_lhs = it.i33_1;
|
|
784
|
+
return tmp0_elvis_lhs == null ? Companion_getInstance_11().of('?-', [this$0.t33_1]) : tmp0_elvis_lhs;
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
function ClassicExecutionContext$logicStackTrace$delegate$lambda(this$0) {
|
|
788
|
+
return function () {
|
|
789
|
+
var tmp = filter(this$0.e34_1, ClassicExecutionContext$logicStackTrace$delegate$lambda$lambda);
|
|
790
|
+
return toList(map(tmp, ClassicExecutionContext$logicStackTrace$delegate$lambda$lambda_0(this$0)));
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
function ClassicExecutionContext(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables) {
|
|
794
|
+
this.i33_1 = procedure;
|
|
795
|
+
this.j33_1 = unificator;
|
|
796
|
+
this.k33_1 = libraries;
|
|
797
|
+
this.l33_1 = flags;
|
|
798
|
+
this.m33_1 = staticKb;
|
|
799
|
+
this.n33_1 = dynamicKb;
|
|
800
|
+
this.o33_1 = operators;
|
|
801
|
+
this.p33_1 = inputChannels;
|
|
802
|
+
this.q33_1 = outputChannels;
|
|
803
|
+
this.r33_1 = customData;
|
|
804
|
+
this.s33_1 = substitution;
|
|
805
|
+
this.t33_1 = query;
|
|
806
|
+
this.u33_1 = goals;
|
|
807
|
+
this.v33_1 = rules;
|
|
808
|
+
this.w33_1 = primitives;
|
|
809
|
+
this.x33_1 = startTime;
|
|
810
|
+
this.y33_1 = maxDuration;
|
|
811
|
+
this.z33_1 = choicePoints;
|
|
812
|
+
this.a34_1 = parent;
|
|
813
|
+
this.b34_1 = depth;
|
|
814
|
+
this.c34_1 = step;
|
|
815
|
+
this.d34_1 = relevantVariables;
|
|
816
|
+
// Inline function 'kotlin.require' call
|
|
817
|
+
var tmp0_require = (this.b34_1 === 0 ? this.a34_1 == null : false) ? true : this.b34_1 > 0 ? !(this.a34_1 == null) : false;
|
|
818
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
819
|
+
// Inline function 'kotlin.require' call
|
|
820
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
821
|
+
if (!tmp0_require) {
|
|
822
|
+
var tmp$ret$0;
|
|
823
|
+
// Inline function 'kotlin.require.<anonymous>' call
|
|
824
|
+
tmp$ret$0 = 'Failed requirement.';
|
|
825
|
+
var message = tmp$ret$0;
|
|
826
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
827
|
+
}
|
|
828
|
+
// Inline function 'kotlin.require' call
|
|
829
|
+
var tmp1_require = this.x33_1.jd(new Long(0, 0)) >= 0;
|
|
830
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
831
|
+
// Inline function 'kotlin.require' call
|
|
832
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
833
|
+
if (!tmp1_require) {
|
|
834
|
+
var tmp$ret$1;
|
|
835
|
+
// Inline function 'kotlin.require.<anonymous>' call
|
|
836
|
+
tmp$ret$1 = 'Failed requirement.';
|
|
837
|
+
var message_0 = tmp$ret$1;
|
|
838
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
839
|
+
}
|
|
840
|
+
// Inline function 'kotlin.require' call
|
|
841
|
+
var tmp2_require = this.y33_1.jd(new Long(0, 0)) >= 0;
|
|
842
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
843
|
+
// Inline function 'kotlin.require' call
|
|
844
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
845
|
+
if (!tmp2_require) {
|
|
846
|
+
var tmp$ret$2;
|
|
847
|
+
// Inline function 'kotlin.require.<anonymous>' call
|
|
848
|
+
tmp$ret$2 = 'Failed requirement.';
|
|
849
|
+
var message_1 = tmp$ret$2;
|
|
850
|
+
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
851
|
+
}
|
|
852
|
+
var tmp = this;
|
|
853
|
+
tmp.e34_1 = sequence(ClassicExecutionContext$pathToRoot$slambda_0(this, null));
|
|
854
|
+
var tmp_0 = this;
|
|
855
|
+
tmp_0.f34_1 = lazy(ClassicExecutionContext$currentGoal$delegate$lambda(this));
|
|
856
|
+
var tmp_1 = this;
|
|
857
|
+
tmp_1.g34_1 = lazy(ClassicExecutionContext$interestingVariables$delegate$lambda(this));
|
|
858
|
+
var tmp_2 = this;
|
|
859
|
+
tmp_2.h34_1 = lazy(ClassicExecutionContext$logicStackTrace$delegate$lambda(this));
|
|
860
|
+
}
|
|
861
|
+
ClassicExecutionContext.prototype.q1u = function () {
|
|
862
|
+
return this.i33_1;
|
|
863
|
+
};
|
|
864
|
+
ClassicExecutionContext.prototype.k1l = function () {
|
|
865
|
+
return this.j33_1;
|
|
866
|
+
};
|
|
867
|
+
ClassicExecutionContext.prototype.w1u = function () {
|
|
868
|
+
return this.k33_1;
|
|
869
|
+
};
|
|
870
|
+
ClassicExecutionContext.prototype.x1u = function () {
|
|
871
|
+
return this.l33_1;
|
|
872
|
+
};
|
|
873
|
+
ClassicExecutionContext.prototype.y1u = function () {
|
|
874
|
+
return this.m33_1;
|
|
875
|
+
};
|
|
876
|
+
ClassicExecutionContext.prototype.z1u = function () {
|
|
877
|
+
return this.n33_1;
|
|
878
|
+
};
|
|
879
|
+
ClassicExecutionContext.prototype.h1v = function () {
|
|
880
|
+
return this.o33_1;
|
|
881
|
+
};
|
|
882
|
+
ClassicExecutionContext.prototype.a1v = function () {
|
|
883
|
+
return this.p33_1;
|
|
884
|
+
};
|
|
885
|
+
ClassicExecutionContext.prototype.b1v = function () {
|
|
886
|
+
return this.q33_1;
|
|
887
|
+
};
|
|
888
|
+
ClassicExecutionContext.prototype.t1u = function () {
|
|
889
|
+
return this.r33_1;
|
|
890
|
+
};
|
|
891
|
+
ClassicExecutionContext.prototype.r1u = function () {
|
|
892
|
+
return this.s33_1;
|
|
893
|
+
};
|
|
894
|
+
ClassicExecutionContext.prototype.l1u = function () {
|
|
895
|
+
return this.x33_1;
|
|
896
|
+
};
|
|
897
|
+
ClassicExecutionContext.prototype.n1u = function () {
|
|
898
|
+
return this.y33_1;
|
|
899
|
+
};
|
|
900
|
+
ClassicExecutionContext.prototype.v36 = function () {
|
|
901
|
+
return this.b34_1 === 0;
|
|
902
|
+
};
|
|
903
|
+
ClassicExecutionContext.prototype.g35 = function () {
|
|
904
|
+
var tmp0_safe_receiver = this.z33_1;
|
|
905
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g35();
|
|
906
|
+
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
907
|
+
};
|
|
908
|
+
ClassicExecutionContext.prototype.u36 = function () {
|
|
909
|
+
return this.a34_1 == null ? true : (this.b34_1 - this.a34_1.b34_1 | 0) >= 1;
|
|
910
|
+
};
|
|
911
|
+
ClassicExecutionContext.prototype.w36 = function () {
|
|
912
|
+
var tmp$ret$0;
|
|
913
|
+
// Inline function 'kotlin.getValue' call
|
|
914
|
+
var tmp0_getValue = currentGoal$factory();
|
|
915
|
+
tmp$ret$0 = this.f34_1.b1();
|
|
916
|
+
return tmp$ret$0;
|
|
917
|
+
};
|
|
918
|
+
ClassicExecutionContext.prototype.x36 = function (variable) {
|
|
919
|
+
return contains(_get_interestingVariables__k6uw5o(this), variable);
|
|
920
|
+
};
|
|
921
|
+
ClassicExecutionContext.prototype.s1u = function () {
|
|
922
|
+
var tmp$ret$0;
|
|
923
|
+
// Inline function 'kotlin.getValue' call
|
|
924
|
+
var tmp0_getValue = logicStackTrace$factory();
|
|
925
|
+
tmp$ret$0 = this.h34_1.b1();
|
|
926
|
+
return tmp$ret$0;
|
|
927
|
+
};
|
|
928
|
+
ClassicExecutionContext.prototype.u1u = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels) {
|
|
929
|
+
return ClassicSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, true);
|
|
930
|
+
};
|
|
931
|
+
ClassicExecutionContext.prototype.c1v = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels) {
|
|
932
|
+
return MutableClassicSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, true);
|
|
933
|
+
};
|
|
934
|
+
ClassicExecutionContext.prototype.f1v = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData) {
|
|
935
|
+
var tmp = dynamicKb.toMutableTheory();
|
|
936
|
+
var tmp_0 = new Long(0, 0);
|
|
937
|
+
var tmp_1 = new Long(0, 0);
|
|
938
|
+
var tmp_2 = new Long(0, 0);
|
|
939
|
+
return this.z34(null, unificator, libraries, flags, staticKb, tmp, operators, inputChannels, outputChannels, customData, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4193281, null);
|
|
940
|
+
};
|
|
941
|
+
ClassicExecutionContext.prototype.y36 = function (sideEffect) {
|
|
942
|
+
var tmp = apply.call(this, sideEffect);
|
|
943
|
+
return tmp instanceof ClassicExecutionContext ? tmp : THROW_CCE();
|
|
944
|
+
};
|
|
945
|
+
ClassicExecutionContext.prototype.apply = function (sideEffect) {
|
|
946
|
+
return this.y36(sideEffect);
|
|
947
|
+
};
|
|
948
|
+
ClassicExecutionContext.prototype.z36 = function (sideEffects) {
|
|
949
|
+
var tmp = applyIterable.call(this, sideEffects);
|
|
950
|
+
return tmp instanceof ClassicExecutionContext ? tmp : THROW_CCE();
|
|
951
|
+
};
|
|
952
|
+
ClassicExecutionContext.prototype.applyIterable = function (sideEffects) {
|
|
953
|
+
return this.z36(sideEffects);
|
|
954
|
+
};
|
|
955
|
+
ClassicExecutionContext.prototype.a37 = function (sideEffects) {
|
|
956
|
+
var tmp = applySequence.call(this, sideEffects);
|
|
957
|
+
return tmp instanceof ClassicExecutionContext ? tmp : THROW_CCE();
|
|
958
|
+
};
|
|
959
|
+
ClassicExecutionContext.prototype.applySequence = function (sideEffects) {
|
|
960
|
+
return this.a37(sideEffects);
|
|
961
|
+
};
|
|
962
|
+
ClassicExecutionContext.prototype.toString = function () {
|
|
963
|
+
return 'ClassicExecutionContext(' + ('step=' + toString(this.c34_1) + ', ') + ('depth=' + this.b34_1 + ', ') + ('substitution=' + this.s33_1 + ', ') + ('logicStackTrace=' + this.s1u() + ', ') + ('goals=' + this.u33_1 + ', ') + ('rules=' + this.v33_1 + ', ') + ('primitives=' + this.w33_1 + ', ') + ('startTime=' + toString(this.x33_1) + ', ') + ('endTime=' + toString(this.m1u()) + ', ') + ('maxDuration=' + toString(this.y33_1) + ', ') + ('unificator=' + this.j33_1 + ', ') + ('choicePoints=' + this.z33_1) + ')';
|
|
964
|
+
};
|
|
965
|
+
ClassicExecutionContext.prototype.b37 = function (procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables) {
|
|
966
|
+
return new ClassicExecutionContext(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables);
|
|
967
|
+
};
|
|
968
|
+
ClassicExecutionContext.prototype.z34 = function (procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables, $mask0, $handler) {
|
|
969
|
+
if (!(($mask0 & 1) === 0))
|
|
970
|
+
procedure = this.i33_1;
|
|
971
|
+
if (!(($mask0 & 2) === 0))
|
|
972
|
+
unificator = this.j33_1;
|
|
973
|
+
if (!(($mask0 & 4) === 0))
|
|
974
|
+
libraries = this.k33_1;
|
|
975
|
+
if (!(($mask0 & 8) === 0))
|
|
976
|
+
flags = this.l33_1;
|
|
977
|
+
if (!(($mask0 & 16) === 0))
|
|
978
|
+
staticKb = this.m33_1;
|
|
979
|
+
if (!(($mask0 & 32) === 0))
|
|
980
|
+
dynamicKb = this.n33_1;
|
|
981
|
+
if (!(($mask0 & 64) === 0))
|
|
982
|
+
operators = this.o33_1;
|
|
983
|
+
if (!(($mask0 & 128) === 0))
|
|
984
|
+
inputChannels = this.p33_1;
|
|
985
|
+
if (!(($mask0 & 256) === 0))
|
|
986
|
+
outputChannels = this.q33_1;
|
|
987
|
+
if (!(($mask0 & 512) === 0))
|
|
988
|
+
customData = this.r33_1;
|
|
989
|
+
if (!(($mask0 & 1024) === 0))
|
|
990
|
+
substitution = this.s33_1;
|
|
991
|
+
if (!(($mask0 & 2048) === 0))
|
|
992
|
+
query = this.t33_1;
|
|
993
|
+
if (!(($mask0 & 4096) === 0))
|
|
994
|
+
goals = this.u33_1;
|
|
995
|
+
if (!(($mask0 & 8192) === 0))
|
|
996
|
+
rules = this.v33_1;
|
|
997
|
+
if (!(($mask0 & 16384) === 0))
|
|
998
|
+
primitives = this.w33_1;
|
|
999
|
+
if (!(($mask0 & 32768) === 0))
|
|
1000
|
+
startTime = this.x33_1;
|
|
1001
|
+
if (!(($mask0 & 65536) === 0))
|
|
1002
|
+
maxDuration = this.y33_1;
|
|
1003
|
+
if (!(($mask0 & 131072) === 0))
|
|
1004
|
+
choicePoints = this.z33_1;
|
|
1005
|
+
if (!(($mask0 & 262144) === 0))
|
|
1006
|
+
parent = this.a34_1;
|
|
1007
|
+
if (!(($mask0 & 524288) === 0))
|
|
1008
|
+
depth = this.b34_1;
|
|
1009
|
+
if (!(($mask0 & 1048576) === 0))
|
|
1010
|
+
step = this.c34_1;
|
|
1011
|
+
if (!(($mask0 & 2097152) === 0))
|
|
1012
|
+
relevantVariables = this.d34_1;
|
|
1013
|
+
return this.b37(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables);
|
|
1014
|
+
};
|
|
1015
|
+
ClassicExecutionContext.prototype.hashCode = function () {
|
|
1016
|
+
var result = this.i33_1 == null ? 0 : this.i33_1.hashCode();
|
|
1017
|
+
result = imul(result, 31) + hashCode(this.j33_1) | 0;
|
|
1018
|
+
result = imul(result, 31) + hashCode(this.k33_1) | 0;
|
|
1019
|
+
result = imul(result, 31) + this.l33_1.hashCode() | 0;
|
|
1020
|
+
result = imul(result, 31) + hashCode(this.m33_1) | 0;
|
|
1021
|
+
result = imul(result, 31) + hashCode(this.n33_1) | 0;
|
|
1022
|
+
result = imul(result, 31) + this.o33_1.hashCode() | 0;
|
|
1023
|
+
result = imul(result, 31) + hashCode(this.p33_1) | 0;
|
|
1024
|
+
result = imul(result, 31) + hashCode(this.q33_1) | 0;
|
|
1025
|
+
result = imul(result, 31) + this.r33_1.hashCode() | 0;
|
|
1026
|
+
result = imul(result, 31) + hashCode(this.s33_1) | 0;
|
|
1027
|
+
result = imul(result, 31) + this.t33_1.hashCode() | 0;
|
|
1028
|
+
result = imul(result, 31) + hashCode(this.u33_1) | 0;
|
|
1029
|
+
result = imul(result, 31) + hashCode(this.v33_1) | 0;
|
|
1030
|
+
result = imul(result, 31) + hashCode(this.w33_1) | 0;
|
|
1031
|
+
result = imul(result, 31) + this.x33_1.hashCode() | 0;
|
|
1032
|
+
result = imul(result, 31) + this.y33_1.hashCode() | 0;
|
|
1033
|
+
result = imul(result, 31) + (this.z33_1 == null ? 0 : hashCode(this.z33_1)) | 0;
|
|
1034
|
+
result = imul(result, 31) + (this.a34_1 == null ? 0 : this.a34_1.hashCode()) | 0;
|
|
1035
|
+
result = imul(result, 31) + this.b34_1 | 0;
|
|
1036
|
+
result = imul(result, 31) + this.c34_1.hashCode() | 0;
|
|
1037
|
+
result = imul(result, 31) + hashCode(this.d34_1) | 0;
|
|
1038
|
+
return result;
|
|
1039
|
+
};
|
|
1040
|
+
ClassicExecutionContext.prototype.equals = function (other) {
|
|
1041
|
+
if (this === other)
|
|
1042
|
+
return true;
|
|
1043
|
+
if (!(other instanceof ClassicExecutionContext))
|
|
1044
|
+
return false;
|
|
1045
|
+
var tmp0_other_with_cast = other instanceof ClassicExecutionContext ? other : THROW_CCE();
|
|
1046
|
+
if (!equals(this.i33_1, tmp0_other_with_cast.i33_1))
|
|
1047
|
+
return false;
|
|
1048
|
+
if (!equals(this.j33_1, tmp0_other_with_cast.j33_1))
|
|
1049
|
+
return false;
|
|
1050
|
+
if (!equals(this.k33_1, tmp0_other_with_cast.k33_1))
|
|
1051
|
+
return false;
|
|
1052
|
+
if (!this.l33_1.equals(tmp0_other_with_cast.l33_1))
|
|
1053
|
+
return false;
|
|
1054
|
+
if (!equals(this.m33_1, tmp0_other_with_cast.m33_1))
|
|
1055
|
+
return false;
|
|
1056
|
+
if (!equals(this.n33_1, tmp0_other_with_cast.n33_1))
|
|
1057
|
+
return false;
|
|
1058
|
+
if (!this.o33_1.equals(tmp0_other_with_cast.o33_1))
|
|
1059
|
+
return false;
|
|
1060
|
+
if (!equals(this.p33_1, tmp0_other_with_cast.p33_1))
|
|
1061
|
+
return false;
|
|
1062
|
+
if (!equals(this.q33_1, tmp0_other_with_cast.q33_1))
|
|
1063
|
+
return false;
|
|
1064
|
+
if (!this.r33_1.equals(tmp0_other_with_cast.r33_1))
|
|
1065
|
+
return false;
|
|
1066
|
+
if (!equals(this.s33_1, tmp0_other_with_cast.s33_1))
|
|
1067
|
+
return false;
|
|
1068
|
+
if (!this.t33_1.equals(tmp0_other_with_cast.t33_1))
|
|
1069
|
+
return false;
|
|
1070
|
+
if (!equals(this.u33_1, tmp0_other_with_cast.u33_1))
|
|
1071
|
+
return false;
|
|
1072
|
+
if (!equals(this.v33_1, tmp0_other_with_cast.v33_1))
|
|
1073
|
+
return false;
|
|
1074
|
+
if (!equals(this.w33_1, tmp0_other_with_cast.w33_1))
|
|
1075
|
+
return false;
|
|
1076
|
+
if (!this.x33_1.equals(tmp0_other_with_cast.x33_1))
|
|
1077
|
+
return false;
|
|
1078
|
+
if (!this.y33_1.equals(tmp0_other_with_cast.y33_1))
|
|
1079
|
+
return false;
|
|
1080
|
+
if (!equals(this.z33_1, tmp0_other_with_cast.z33_1))
|
|
1081
|
+
return false;
|
|
1082
|
+
if (!equals(this.a34_1, tmp0_other_with_cast.a34_1))
|
|
1083
|
+
return false;
|
|
1084
|
+
if (!(this.b34_1 === tmp0_other_with_cast.b34_1))
|
|
1085
|
+
return false;
|
|
1086
|
+
if (!this.c34_1.equals(tmp0_other_with_cast.c34_1))
|
|
1087
|
+
return false;
|
|
1088
|
+
if (!equals(this.d34_1, tmp0_other_with_cast.d34_1))
|
|
1089
|
+
return false;
|
|
1090
|
+
return true;
|
|
1091
|
+
};
|
|
1092
|
+
function currentGoal$factory() {
|
|
1093
|
+
return getPropertyCallableRef('currentGoal', 1, KProperty1, function (receiver) {
|
|
1094
|
+
return receiver.w36();
|
|
1095
|
+
}, null);
|
|
1096
|
+
}
|
|
1097
|
+
function interestingVariables$factory() {
|
|
1098
|
+
return getPropertyCallableRef('interestingVariables', 1, KProperty1, function (receiver) {
|
|
1099
|
+
return _get_interestingVariables__k6uw5o(receiver);
|
|
1100
|
+
}, null);
|
|
1101
|
+
}
|
|
1102
|
+
function logicStackTrace$factory() {
|
|
1103
|
+
return getPropertyCallableRef('logicStackTrace', 1, KProperty1, function (receiver) {
|
|
1104
|
+
return receiver.s1u();
|
|
1105
|
+
}, null);
|
|
1106
|
+
}
|
|
1107
|
+
function ClassicSolver_init_$Init$(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb, $this) {
|
|
1108
|
+
AbstractClassicSolver.call($this, unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb);
|
|
1109
|
+
ClassicSolver.call($this);
|
|
1110
|
+
return $this;
|
|
1111
|
+
}
|
|
1112
|
+
function ClassicSolver_init_$Create$(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb) {
|
|
1113
|
+
return ClassicSolver_init_$Init$(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb, Object.create(ClassicSolver.prototype));
|
|
1114
|
+
}
|
|
1115
|
+
function ClassicSolver_init_$Init$_0(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb, $mask0, $marker, $this) {
|
|
1116
|
+
if (!(($mask0 & 1) === 0))
|
|
1117
|
+
unificator = Companion_getInstance_3().h1l();
|
|
1118
|
+
if (!(($mask0 & 2) === 0))
|
|
1119
|
+
libraries = Companion_getInstance_4().empty();
|
|
1120
|
+
if (!(($mask0 & 4) === 0))
|
|
1121
|
+
flags = Companion_getInstance_5().empty();
|
|
1122
|
+
if (!(($mask0 & 8) === 0))
|
|
1123
|
+
initialStaticKb = Companion_getInstance_1().empty(unificator);
|
|
1124
|
+
if (!(($mask0 & 16) === 0))
|
|
1125
|
+
initialDynamicKb = Companion_getInstance_2().empty(unificator);
|
|
1126
|
+
if (!(($mask0 & 32) === 0)) {
|
|
1127
|
+
var tmp = Companion_getInstance();
|
|
1128
|
+
inputChannels = tmp.n1z(null, 1, null);
|
|
1129
|
+
}
|
|
1130
|
+
if (!(($mask0 & 64) === 0)) {
|
|
1131
|
+
var tmp_0 = Companion_getInstance_0();
|
|
1132
|
+
outputChannels = tmp_0.o1z(null, null, null, 7, null);
|
|
1133
|
+
}
|
|
1134
|
+
if (!(($mask0 & 128) === 0))
|
|
1135
|
+
trustKb = false;
|
|
1136
|
+
ClassicSolver_init_$Init$(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb, $this);
|
|
1137
|
+
return $this;
|
|
1138
|
+
}
|
|
1139
|
+
function ClassicSolver_init_$Create$_0(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb, $mask0, $marker) {
|
|
1140
|
+
return ClassicSolver_init_$Init$_0(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb, $mask0, $marker, Object.create(ClassicSolver.prototype));
|
|
1141
|
+
}
|
|
1142
|
+
function ClassicSolver_init_$Init$_1(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this) {
|
|
1143
|
+
AbstractClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this);
|
|
1144
|
+
ClassicSolver.call($this);
|
|
1145
|
+
return $this;
|
|
1146
|
+
}
|
|
1147
|
+
function ClassicSolver_init_$Init$_2(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $mask0, $marker, $this) {
|
|
1148
|
+
if (!(($mask0 & 1) === 0))
|
|
1149
|
+
unificator = Companion_getInstance_3().h1l();
|
|
1150
|
+
if (!(($mask0 & 2) === 0))
|
|
1151
|
+
libraries = Companion_getInstance_4().empty();
|
|
1152
|
+
if (!(($mask0 & 4) === 0))
|
|
1153
|
+
flags = Companion_getInstance_5().empty();
|
|
1154
|
+
if (!(($mask0 & 8) === 0))
|
|
1155
|
+
staticKb = Companion_getInstance_1().empty(unificator);
|
|
1156
|
+
if (!(($mask0 & 16) === 0))
|
|
1157
|
+
dynamicKb = Companion_getInstance_2().empty(unificator);
|
|
1158
|
+
if (!(($mask0 & 32) === 0))
|
|
1159
|
+
stdIn = Companion_getInstance_12().stdIn();
|
|
1160
|
+
if (!(($mask0 & 64) === 0))
|
|
1161
|
+
stdOut = Companion_getInstance_13().stdOut();
|
|
1162
|
+
if (!(($mask0 & 128) === 0))
|
|
1163
|
+
stdErr = Companion_getInstance_13().stdErr();
|
|
1164
|
+
if (!(($mask0 & 256) === 0))
|
|
1165
|
+
warnings = Companion_getInstance_13().warning();
|
|
1166
|
+
if (!(($mask0 & 512) === 0))
|
|
1167
|
+
trustKb = false;
|
|
1168
|
+
ClassicSolver_init_$Init$_1(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this);
|
|
1169
|
+
return $this;
|
|
1170
|
+
}
|
|
1171
|
+
function ClassicSolver_init_$Create$_1(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $mask0, $marker) {
|
|
1172
|
+
return ClassicSolver_init_$Init$_2(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $mask0, $marker, Object.create(ClassicSolver.prototype));
|
|
1173
|
+
}
|
|
1174
|
+
ClassicSolver.prototype.k34 = function (initialState, onStateTransition) {
|
|
1175
|
+
return Companion_getInstance_22().d37(initialState, onStateTransition);
|
|
1176
|
+
};
|
|
1177
|
+
ClassicSolver.prototype.p1v = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
1178
|
+
return ClassicSolver_init_$Create$_1(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, false, 512, null);
|
|
1179
|
+
};
|
|
1180
|
+
ClassicSolver.prototype.z1s = function () {
|
|
1181
|
+
return this.x1x(null, null, null, null, null, null, null, null, null, 511, null);
|
|
1182
|
+
};
|
|
1183
|
+
ClassicSolver.prototype.clone = function () {
|
|
1184
|
+
return this.z1s();
|
|
1185
|
+
};
|
|
1186
|
+
function ClassicSolver() {
|
|
1187
|
+
}
|
|
1188
|
+
function ClassicSolverFactory() {
|
|
1189
|
+
ClassicSolverFactory_instance = this;
|
|
1190
|
+
}
|
|
1191
|
+
ClassicSolverFactory.prototype.d1y = function () {
|
|
1192
|
+
return DefaultBuiltins_getInstance();
|
|
1193
|
+
};
|
|
1194
|
+
ClassicSolverFactory.prototype.t1y = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
|
|
1195
|
+
return ClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, false, 128, null);
|
|
1196
|
+
};
|
|
1197
|
+
ClassicSolverFactory.prototype.v1y = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
1198
|
+
return ClassicSolver_init_$Create$_1(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, false, 512, null);
|
|
1199
|
+
};
|
|
1200
|
+
ClassicSolverFactory.prototype.z1y = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
1201
|
+
return MutableClassicSolver_init_$Create$_1(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, false, 512, null);
|
|
1202
|
+
};
|
|
1203
|
+
ClassicSolverFactory.prototype.d1z = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
|
|
1204
|
+
return MutableClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, false, 128, null);
|
|
1205
|
+
};
|
|
1206
|
+
var ClassicSolverFactory_instance;
|
|
1207
|
+
function ClassicSolverFactory_getInstance() {
|
|
1208
|
+
if (ClassicSolverFactory_instance == null)
|
|
1209
|
+
new ClassicSolverFactory();
|
|
1210
|
+
return ClassicSolverFactory_instance;
|
|
1211
|
+
}
|
|
1212
|
+
function MutableClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $this) {
|
|
1213
|
+
ClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $this);
|
|
1214
|
+
MutableClassicSolver.call($this);
|
|
1215
|
+
return $this;
|
|
1216
|
+
}
|
|
1217
|
+
function MutableClassicSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb) {
|
|
1218
|
+
return MutableClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, Object.create(MutableClassicSolver.prototype));
|
|
1219
|
+
}
|
|
1220
|
+
function MutableClassicSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $mask0, $marker, $this) {
|
|
1221
|
+
if (!(($mask0 & 1) === 0))
|
|
1222
|
+
unificator = Companion_getInstance_3().h1l();
|
|
1223
|
+
if (!(($mask0 & 2) === 0))
|
|
1224
|
+
libraries = Companion_getInstance_4().empty();
|
|
1225
|
+
if (!(($mask0 & 4) === 0))
|
|
1226
|
+
flags = Companion_getInstance_5().empty();
|
|
1227
|
+
if (!(($mask0 & 8) === 0))
|
|
1228
|
+
staticKb = Companion_getInstance_1().empty(unificator);
|
|
1229
|
+
if (!(($mask0 & 16) === 0))
|
|
1230
|
+
dynamicKb = Companion_getInstance_2().empty(unificator);
|
|
1231
|
+
if (!(($mask0 & 32) === 0)) {
|
|
1232
|
+
var tmp = Companion_getInstance();
|
|
1233
|
+
inputChannels = tmp.n1z(null, 1, null);
|
|
1234
|
+
}
|
|
1235
|
+
if (!(($mask0 & 64) === 0)) {
|
|
1236
|
+
var tmp_0 = Companion_getInstance_0();
|
|
1237
|
+
outputChannels = tmp_0.o1z(null, null, null, 7, null);
|
|
1238
|
+
}
|
|
1239
|
+
if (!(($mask0 & 128) === 0))
|
|
1240
|
+
trustKb = false;
|
|
1241
|
+
MutableClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $this);
|
|
1242
|
+
return $this;
|
|
1243
|
+
}
|
|
1244
|
+
function MutableClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $mask0, $marker) {
|
|
1245
|
+
return MutableClassicSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $mask0, $marker, Object.create(MutableClassicSolver.prototype));
|
|
1246
|
+
}
|
|
1247
|
+
function MutableClassicSolver_init_$Init$_1(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this) {
|
|
1248
|
+
ClassicSolver_init_$Init$_1(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this);
|
|
1249
|
+
MutableClassicSolver.call($this);
|
|
1250
|
+
return $this;
|
|
1251
|
+
}
|
|
1252
|
+
function MutableClassicSolver_init_$Init$_2(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $mask0, $marker, $this) {
|
|
1253
|
+
if (!(($mask0 & 1) === 0))
|
|
1254
|
+
unificator = Companion_getInstance_3().h1l();
|
|
1255
|
+
if (!(($mask0 & 2) === 0))
|
|
1256
|
+
libraries = Companion_getInstance_4().empty();
|
|
1257
|
+
if (!(($mask0 & 4) === 0))
|
|
1258
|
+
flags = Companion_getInstance_5().empty();
|
|
1259
|
+
if (!(($mask0 & 8) === 0))
|
|
1260
|
+
staticKb = Companion_getInstance_1().empty(unificator);
|
|
1261
|
+
if (!(($mask0 & 16) === 0))
|
|
1262
|
+
dynamicKb = Companion_getInstance_2().empty(unificator);
|
|
1263
|
+
if (!(($mask0 & 32) === 0))
|
|
1264
|
+
stdIn = Companion_getInstance_12().stdIn();
|
|
1265
|
+
if (!(($mask0 & 64) === 0))
|
|
1266
|
+
stdOut = Companion_getInstance_13().stdOut();
|
|
1267
|
+
if (!(($mask0 & 128) === 0))
|
|
1268
|
+
stdErr = Companion_getInstance_13().stdErr();
|
|
1269
|
+
if (!(($mask0 & 256) === 0))
|
|
1270
|
+
warnings = Companion_getInstance_13().warning();
|
|
1271
|
+
if (!(($mask0 & 512) === 0))
|
|
1272
|
+
trustKb = false;
|
|
1273
|
+
MutableClassicSolver_init_$Init$_1(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this);
|
|
1274
|
+
return $this;
|
|
1275
|
+
}
|
|
1276
|
+
function MutableClassicSolver_init_$Create$_1(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $mask0, $marker) {
|
|
1277
|
+
return MutableClassicSolver_init_$Init$_2(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $mask0, $marker, Object.create(MutableClassicSolver.prototype));
|
|
1278
|
+
}
|
|
1279
|
+
function MutableClassicSolver$loadLibrary$lambda($library) {
|
|
1280
|
+
return function ($this$updateContext) {
|
|
1281
|
+
var newRuntime = $this$updateContext.k33_1.plusLibrary($library);
|
|
1282
|
+
var tmp = $this$updateContext.o33_1.plusOperatorSet(toOperatorSet(getAllOperators(newRuntime, [])));
|
|
1283
|
+
var tmp_0 = new Long(0, 0);
|
|
1284
|
+
var tmp_1 = new Long(0, 0);
|
|
1285
|
+
var tmp_2 = new Long(0, 0);
|
|
1286
|
+
return $this$updateContext.z34(null, null, newRuntime, null, null, null, tmp, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194235, null);
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
function MutableClassicSolver$unloadLibrary$lambda($library) {
|
|
1290
|
+
return function ($this$updateContext) {
|
|
1291
|
+
var newRuntime = $this$updateContext.k33_1.plusLibrary($library);
|
|
1292
|
+
var tmp = toOperatorSet(getAllOperators(newRuntime, [$this$updateContext.m33_1, $this$updateContext.n33_1]));
|
|
1293
|
+
var tmp_0 = new Long(0, 0);
|
|
1294
|
+
var tmp_1 = new Long(0, 0);
|
|
1295
|
+
var tmp_2 = new Long(0, 0);
|
|
1296
|
+
return $this$updateContext.z34(null, null, newRuntime, null, null, null, tmp, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194235, null);
|
|
1297
|
+
};
|
|
1298
|
+
}
|
|
1299
|
+
function MutableClassicSolver$setRuntime$lambda($libraries) {
|
|
1300
|
+
return function ($this$updateContext) {
|
|
1301
|
+
var tmp = toOperatorSet(getAllOperators($libraries, [$this$updateContext.m33_1, $this$updateContext.n33_1]));
|
|
1302
|
+
var tmp_0 = new Long(0, 0);
|
|
1303
|
+
var tmp_1 = new Long(0, 0);
|
|
1304
|
+
var tmp_2 = new Long(0, 0);
|
|
1305
|
+
return $this$updateContext.z34(null, null, $libraries, null, null, null, tmp, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194235, null);
|
|
1306
|
+
};
|
|
1307
|
+
}
|
|
1308
|
+
function MutableClassicSolver$resetStaticKb$lambda($this$updateContext) {
|
|
1309
|
+
var tmp = Companion_getInstance_1().empty($this$updateContext.j33_1);
|
|
1310
|
+
var tmp_0 = toOperatorSet(getAllOperators($this$updateContext.k33_1, [$this$updateContext.n33_1]));
|
|
1311
|
+
var tmp_1 = new Long(0, 0);
|
|
1312
|
+
var tmp_2 = new Long(0, 0);
|
|
1313
|
+
var tmp_3 = new Long(0, 0);
|
|
1314
|
+
return $this$updateContext.z34(null, null, null, null, tmp, null, tmp_0, null, null, null, null, null, null, null, null, tmp_1, tmp_2, null, null, 0, tmp_3, null, 4194223, null);
|
|
1315
|
+
}
|
|
1316
|
+
function MutableClassicSolver$resetDynamicKb$lambda($this$updateContext) {
|
|
1317
|
+
var tmp = Companion_getInstance_2().empty($this$updateContext.j33_1);
|
|
1318
|
+
var tmp_0 = toOperatorSet(getAllOperators($this$updateContext.k33_1, [$this$updateContext.m33_1]));
|
|
1319
|
+
var tmp_1 = new Long(0, 0);
|
|
1320
|
+
var tmp_2 = new Long(0, 0);
|
|
1321
|
+
var tmp_3 = new Long(0, 0);
|
|
1322
|
+
return $this$updateContext.z34(null, null, null, null, null, tmp, tmp_0, null, null, null, null, null, null, null, null, tmp_1, tmp_2, null, null, 0, tmp_3, null, 4194207, null);
|
|
1323
|
+
}
|
|
1324
|
+
function MutableClassicSolver$assertA$lambda($clause) {
|
|
1325
|
+
return function ($this$updateContext) {
|
|
1326
|
+
var tmp = $this$updateContext.n33_1.p1s($clause);
|
|
1327
|
+
var tmp_0 = $this$updateContext.o33_1.plusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause))));
|
|
1328
|
+
var tmp_1 = new Long(0, 0);
|
|
1329
|
+
var tmp_2 = new Long(0, 0);
|
|
1330
|
+
var tmp_3 = new Long(0, 0);
|
|
1331
|
+
return $this$updateContext.z34(null, null, null, null, null, tmp, tmp_0, null, null, null, null, null, null, null, null, tmp_1, tmp_2, null, null, 0, tmp_3, null, 4194207, null);
|
|
1332
|
+
};
|
|
1333
|
+
}
|
|
1334
|
+
function MutableClassicSolver$assertA$lambda_0($fact) {
|
|
1335
|
+
return function ($this$updateContext) {
|
|
1336
|
+
var tmp = $this$updateContext.n33_1.c1t($fact);
|
|
1337
|
+
var tmp_0 = new Long(0, 0);
|
|
1338
|
+
var tmp_1 = new Long(0, 0);
|
|
1339
|
+
var tmp_2 = new Long(0, 0);
|
|
1340
|
+
return $this$updateContext.z34(null, null, null, null, null, tmp, null, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194271, null);
|
|
1341
|
+
};
|
|
1342
|
+
}
|
|
1343
|
+
function MutableClassicSolver$assertZ$lambda($clause) {
|
|
1344
|
+
return function ($this$updateContext) {
|
|
1345
|
+
var tmp = $this$updateContext.n33_1.t1s($clause);
|
|
1346
|
+
var tmp_0 = $this$updateContext.o33_1.plusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause))));
|
|
1347
|
+
var tmp_1 = new Long(0, 0);
|
|
1348
|
+
var tmp_2 = new Long(0, 0);
|
|
1349
|
+
var tmp_3 = new Long(0, 0);
|
|
1350
|
+
return $this$updateContext.z34(null, null, null, null, null, tmp, tmp_0, null, null, null, null, null, null, null, null, tmp_1, tmp_2, null, null, 0, tmp_3, null, 4194207, null);
|
|
1351
|
+
};
|
|
1352
|
+
}
|
|
1353
|
+
function MutableClassicSolver$assertZ$lambda_0($fact) {
|
|
1354
|
+
return function ($this$updateContext) {
|
|
1355
|
+
var tmp = $this$updateContext.n33_1.d1t($fact);
|
|
1356
|
+
var tmp_0 = new Long(0, 0);
|
|
1357
|
+
var tmp_1 = new Long(0, 0);
|
|
1358
|
+
var tmp_2 = new Long(0, 0);
|
|
1359
|
+
return $this$updateContext.z34(null, null, null, null, null, tmp, null, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194271, null);
|
|
1360
|
+
};
|
|
1361
|
+
}
|
|
1362
|
+
function MutableClassicSolver$retract$lambda($result, $clause) {
|
|
1363
|
+
return function ($this$updateContext) {
|
|
1364
|
+
var tmp = $result.h1s().toMutableTheory();
|
|
1365
|
+
var tmp_0 = $this$updateContext.o33_1.minusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause))));
|
|
1366
|
+
var tmp_1 = new Long(0, 0);
|
|
1367
|
+
var tmp_2 = new Long(0, 0);
|
|
1368
|
+
var tmp_3 = new Long(0, 0);
|
|
1369
|
+
return $this$updateContext.z34(null, null, null, null, null, tmp, tmp_0, null, null, null, null, null, null, null, null, tmp_1, tmp_2, null, null, 0, tmp_3, null, 4194207, null);
|
|
1370
|
+
};
|
|
1371
|
+
}
|
|
1372
|
+
function MutableClassicSolver$retract$lambda_0($result) {
|
|
1373
|
+
return function ($this$updateContext) {
|
|
1374
|
+
var tmp = $result.h1s().toMutableTheory();
|
|
1375
|
+
var tmp_0 = new Long(0, 0);
|
|
1376
|
+
var tmp_1 = new Long(0, 0);
|
|
1377
|
+
var tmp_2 = new Long(0, 0);
|
|
1378
|
+
return $this$updateContext.z34(null, null, null, null, null, tmp, null, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194271, null);
|
|
1379
|
+
};
|
|
1380
|
+
}
|
|
1381
|
+
function MutableClassicSolver$retractAll$lambda($result) {
|
|
1382
|
+
return function ($this$updateContext) {
|
|
1383
|
+
var tmp = $result.h1s().toMutableTheory();
|
|
1384
|
+
var tmp_0 = $this$updateContext.o33_1.minusOperatorSet(toOperatorSet(getAllOperators_0($result.h1s())));
|
|
1385
|
+
var tmp_1 = new Long(0, 0);
|
|
1386
|
+
var tmp_2 = new Long(0, 0);
|
|
1387
|
+
var tmp_3 = new Long(0, 0);
|
|
1388
|
+
return $this$updateContext.z34(null, null, null, null, null, tmp, tmp_0, null, null, null, null, null, null, null, null, tmp_1, tmp_2, null, null, 0, tmp_3, null, 4194207, null);
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1391
|
+
function MutableClassicSolver$retractAll$lambda_0($result) {
|
|
1392
|
+
return function ($this$updateContext) {
|
|
1393
|
+
var tmp = $result.h1s().toMutableTheory();
|
|
1394
|
+
var tmp_0 = new Long(0, 0);
|
|
1395
|
+
var tmp_1 = new Long(0, 0);
|
|
1396
|
+
var tmp_2 = new Long(0, 0);
|
|
1397
|
+
return $this$updateContext.z34(null, null, null, null, null, tmp, null, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194271, null);
|
|
1398
|
+
};
|
|
1399
|
+
}
|
|
1400
|
+
function MutableClassicSolver$setFlag$lambda($name, $value) {
|
|
1401
|
+
return function ($this$updateContext) {
|
|
1402
|
+
var tmp = $this$updateContext.l33_1.set($name, $value);
|
|
1403
|
+
var tmp_0 = new Long(0, 0);
|
|
1404
|
+
var tmp_1 = new Long(0, 0);
|
|
1405
|
+
var tmp_2 = new Long(0, 0);
|
|
1406
|
+
return $this$updateContext.z34(null, null, null, tmp, null, null, null, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194295, null);
|
|
1407
|
+
};
|
|
1408
|
+
}
|
|
1409
|
+
function MutableClassicSolver$setFlag$lambda_0($flag) {
|
|
1410
|
+
return function ($this$updateContext) {
|
|
1411
|
+
var tmp = $this$updateContext.l33_1.plusPair($flag);
|
|
1412
|
+
var tmp_0 = new Long(0, 0);
|
|
1413
|
+
var tmp_1 = new Long(0, 0);
|
|
1414
|
+
var tmp_2 = new Long(0, 0);
|
|
1415
|
+
return $this$updateContext.z34(null, null, null, tmp, null, null, null, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194295, null);
|
|
1416
|
+
};
|
|
1417
|
+
}
|
|
1418
|
+
function MutableClassicSolver$setFlag$lambda_1($flag) {
|
|
1419
|
+
return function ($this$updateContext) {
|
|
1420
|
+
var tmp = $this$updateContext.l33_1.plusNotable($flag);
|
|
1421
|
+
var tmp_0 = new Long(0, 0);
|
|
1422
|
+
var tmp_1 = new Long(0, 0);
|
|
1423
|
+
var tmp_2 = new Long(0, 0);
|
|
1424
|
+
return $this$updateContext.z34(null, null, null, tmp, null, null, null, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194295, null);
|
|
1425
|
+
};
|
|
1426
|
+
}
|
|
1427
|
+
function MutableClassicSolver$setStandardInput$lambda($stdIn) {
|
|
1428
|
+
return function ($this$updateContext) {
|
|
1429
|
+
Companion_getInstance();
|
|
1430
|
+
var tmp = $this$updateContext.p33_1.plus(to('stdin', $stdIn));
|
|
1431
|
+
var tmp_0 = new Long(0, 0);
|
|
1432
|
+
var tmp_1 = new Long(0, 0);
|
|
1433
|
+
var tmp_2 = new Long(0, 0);
|
|
1434
|
+
return $this$updateContext.z34(null, null, null, null, null, null, null, tmp, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194175, null);
|
|
1435
|
+
};
|
|
1436
|
+
}
|
|
1437
|
+
function MutableClassicSolver$setStandardError$lambda($stdErr) {
|
|
1438
|
+
return function ($this$updateContext) {
|
|
1439
|
+
Companion_getInstance_0();
|
|
1440
|
+
var tmp = $this$updateContext.q33_1.plus(to('stderr', $stdErr));
|
|
1441
|
+
var tmp_0 = new Long(0, 0);
|
|
1442
|
+
var tmp_1 = new Long(0, 0);
|
|
1443
|
+
var tmp_2 = new Long(0, 0);
|
|
1444
|
+
return $this$updateContext.z34(null, null, null, null, null, null, null, null, tmp, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194047, null);
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
function MutableClassicSolver$setStandardOutput$lambda($stdOut) {
|
|
1448
|
+
return function ($this$updateContext) {
|
|
1449
|
+
Companion_getInstance_0();
|
|
1450
|
+
var tmp = $this$updateContext.q33_1.plus(to('stdout', $stdOut));
|
|
1451
|
+
var tmp_0 = new Long(0, 0);
|
|
1452
|
+
var tmp_1 = new Long(0, 0);
|
|
1453
|
+
var tmp_2 = new Long(0, 0);
|
|
1454
|
+
return $this$updateContext.z34(null, null, null, null, null, null, null, null, tmp, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194047, null);
|
|
1455
|
+
};
|
|
1456
|
+
}
|
|
1457
|
+
function MutableClassicSolver$setWarnings$lambda($warnings) {
|
|
1458
|
+
return function ($this$updateContext) {
|
|
1459
|
+
var tmp = Companion_getInstance_0().p1z($this$updateContext.q33_1, $warnings);
|
|
1460
|
+
var tmp_0 = new Long(0, 0);
|
|
1461
|
+
var tmp_1 = new Long(0, 0);
|
|
1462
|
+
var tmp_2 = new Long(0, 0);
|
|
1463
|
+
return $this$updateContext.z34(null, null, null, null, null, null, null, null, tmp, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 4194047, null);
|
|
1464
|
+
};
|
|
1465
|
+
}
|
|
1466
|
+
MutableClassicSolver.prototype.f37 = function (library) {
|
|
1467
|
+
this.m2b(MutableClassicSolver$loadLibrary$lambda(library));
|
|
1468
|
+
};
|
|
1469
|
+
MutableClassicSolver.prototype.loadLibrary = function (library) {
|
|
1470
|
+
return this.f37(library);
|
|
1471
|
+
};
|
|
1472
|
+
MutableClassicSolver.prototype.g37 = function (library) {
|
|
1473
|
+
this.m2b(MutableClassicSolver$unloadLibrary$lambda(library));
|
|
1474
|
+
};
|
|
1475
|
+
MutableClassicSolver.prototype.unloadLibrary = function (library) {
|
|
1476
|
+
return this.g37(library);
|
|
1477
|
+
};
|
|
1478
|
+
MutableClassicSolver.prototype.h37 = function (libraries) {
|
|
1479
|
+
this.m2b(MutableClassicSolver$setRuntime$lambda(libraries));
|
|
1480
|
+
};
|
|
1481
|
+
MutableClassicSolver.prototype.setLibraries = function (libraries) {
|
|
1482
|
+
return this.h37(libraries);
|
|
1483
|
+
};
|
|
1484
|
+
MutableClassicSolver.prototype.i37 = function (theory) {
|
|
1485
|
+
this.q2b(theory, null, false, false, 10, null);
|
|
1486
|
+
};
|
|
1487
|
+
MutableClassicSolver.prototype.loadStaticKb = function (theory) {
|
|
1488
|
+
return this.i37(theory);
|
|
1489
|
+
};
|
|
1490
|
+
MutableClassicSolver.prototype.j37 = function (theory) {
|
|
1491
|
+
this.q2b(theory, null, false, false, 14, null);
|
|
1492
|
+
};
|
|
1493
|
+
MutableClassicSolver.prototype.appendStaticKb = function (theory) {
|
|
1494
|
+
return this.j37(theory);
|
|
1495
|
+
};
|
|
1496
|
+
MutableClassicSolver.prototype.k37 = function () {
|
|
1497
|
+
this.m2b(MutableClassicSolver$resetStaticKb$lambda);
|
|
1498
|
+
};
|
|
1499
|
+
MutableClassicSolver.prototype.resetStaticKb = function () {
|
|
1500
|
+
return this.k37();
|
|
1501
|
+
};
|
|
1502
|
+
MutableClassicSolver.prototype.l37 = function (theory) {
|
|
1503
|
+
this.q2b(null, theory, false, false, 5, null);
|
|
1504
|
+
};
|
|
1505
|
+
MutableClassicSolver.prototype.loadDynamicKb = function (theory) {
|
|
1506
|
+
return this.l37(theory);
|
|
1507
|
+
};
|
|
1508
|
+
MutableClassicSolver.prototype.m37 = function (theory) {
|
|
1509
|
+
this.q2b(null, theory, false, false, 13, null);
|
|
1510
|
+
};
|
|
1511
|
+
MutableClassicSolver.prototype.appendDynamicKb = function (theory) {
|
|
1512
|
+
return this.m37(theory);
|
|
1513
|
+
};
|
|
1514
|
+
MutableClassicSolver.prototype.n37 = function () {
|
|
1515
|
+
this.m2b(MutableClassicSolver$resetDynamicKb$lambda);
|
|
1516
|
+
};
|
|
1517
|
+
MutableClassicSolver.prototype.resetDynamicKb = function () {
|
|
1518
|
+
return this.n37();
|
|
1519
|
+
};
|
|
1520
|
+
MutableClassicSolver.prototype.w1m = function (clause) {
|
|
1521
|
+
this.m2b(MutableClassicSolver$assertA$lambda(clause));
|
|
1522
|
+
};
|
|
1523
|
+
MutableClassicSolver.prototype.assertA = function (clause) {
|
|
1524
|
+
return this.w1m(clause);
|
|
1525
|
+
};
|
|
1526
|
+
MutableClassicSolver.prototype.o37 = function (fact) {
|
|
1527
|
+
this.m2b(MutableClassicSolver$assertA$lambda_0(fact));
|
|
1528
|
+
};
|
|
1529
|
+
MutableClassicSolver.prototype.assertAFact = function (fact) {
|
|
1530
|
+
return this.o37(fact);
|
|
1531
|
+
};
|
|
1532
|
+
MutableClassicSolver.prototype.w1l = function (clause) {
|
|
1533
|
+
this.m2b(MutableClassicSolver$assertZ$lambda(clause));
|
|
1534
|
+
};
|
|
1535
|
+
MutableClassicSolver.prototype.assertZ = function (clause) {
|
|
1536
|
+
return this.w1l(clause);
|
|
1537
|
+
};
|
|
1538
|
+
MutableClassicSolver.prototype.p37 = function (fact) {
|
|
1539
|
+
this.m2b(MutableClassicSolver$assertZ$lambda_0(fact));
|
|
1540
|
+
};
|
|
1541
|
+
MutableClassicSolver.prototype.assertZFact = function (fact) {
|
|
1542
|
+
return this.p37(fact);
|
|
1543
|
+
};
|
|
1544
|
+
MutableClassicSolver.prototype.e1t = function (clause) {
|
|
1545
|
+
var result = this.z1u().retract(clause);
|
|
1546
|
+
this.m2b(MutableClassicSolver$retract$lambda(result, clause));
|
|
1547
|
+
return result;
|
|
1548
|
+
};
|
|
1549
|
+
MutableClassicSolver.prototype.retract = function (clause) {
|
|
1550
|
+
return this.e1t(clause);
|
|
1551
|
+
};
|
|
1552
|
+
MutableClassicSolver.prototype.f1t = function (fact) {
|
|
1553
|
+
var result = this.z1u().retractByHead(fact);
|
|
1554
|
+
this.m2b(MutableClassicSolver$retract$lambda_0(result));
|
|
1555
|
+
return result;
|
|
1556
|
+
};
|
|
1557
|
+
MutableClassicSolver.prototype.retractByHead = function (fact) {
|
|
1558
|
+
return this.f1t(fact);
|
|
1559
|
+
};
|
|
1560
|
+
MutableClassicSolver.prototype.c1m = function (clause) {
|
|
1561
|
+
var result = this.z1u().retractAll(clause);
|
|
1562
|
+
this.m2b(MutableClassicSolver$retractAll$lambda(result));
|
|
1563
|
+
return result;
|
|
1564
|
+
};
|
|
1565
|
+
MutableClassicSolver.prototype.retractAll = function (clause) {
|
|
1566
|
+
return this.c1m(clause);
|
|
1567
|
+
};
|
|
1568
|
+
MutableClassicSolver.prototype.q37 = function (fact) {
|
|
1569
|
+
var result = this.z1u().retractAllByHead(fact);
|
|
1570
|
+
this.m2b(MutableClassicSolver$retractAll$lambda_0(result));
|
|
1571
|
+
return result;
|
|
1572
|
+
};
|
|
1573
|
+
MutableClassicSolver.prototype.retractAllBeHead = function (fact) {
|
|
1574
|
+
return this.q37(fact);
|
|
1575
|
+
};
|
|
1576
|
+
MutableClassicSolver.prototype.r37 = function (name, value) {
|
|
1577
|
+
this.m2b(MutableClassicSolver$setFlag$lambda(name, value));
|
|
1578
|
+
};
|
|
1579
|
+
MutableClassicSolver.prototype.setFlag = function (name, value) {
|
|
1580
|
+
return this.r37(name, value);
|
|
1581
|
+
};
|
|
1582
|
+
MutableClassicSolver.prototype.s37 = function (flag) {
|
|
1583
|
+
this.m2b(MutableClassicSolver$setFlag$lambda_0(flag));
|
|
1584
|
+
};
|
|
1585
|
+
MutableClassicSolver.prototype.setFlagPair = function (flag) {
|
|
1586
|
+
return this.s37(flag);
|
|
1587
|
+
};
|
|
1588
|
+
MutableClassicSolver.prototype.t37 = function (flag) {
|
|
1589
|
+
this.m2b(MutableClassicSolver$setFlag$lambda_1(flag));
|
|
1590
|
+
};
|
|
1591
|
+
MutableClassicSolver.prototype.setFlagNotable = function (flag) {
|
|
1592
|
+
return this.t37(flag);
|
|
1593
|
+
};
|
|
1594
|
+
MutableClassicSolver.prototype.u37 = function (stdIn) {
|
|
1595
|
+
this.m2b(MutableClassicSolver$setStandardInput$lambda(stdIn));
|
|
1596
|
+
};
|
|
1597
|
+
MutableClassicSolver.prototype.setStandardInput = function (stdIn) {
|
|
1598
|
+
return this.u37(stdIn);
|
|
1599
|
+
};
|
|
1600
|
+
MutableClassicSolver.prototype.v37 = function (stdErr) {
|
|
1601
|
+
this.m2b(MutableClassicSolver$setStandardError$lambda(stdErr));
|
|
1602
|
+
};
|
|
1603
|
+
MutableClassicSolver.prototype.setStandardError = function (stdErr) {
|
|
1604
|
+
return this.v37(stdErr);
|
|
1605
|
+
};
|
|
1606
|
+
MutableClassicSolver.prototype.w37 = function (stdOut) {
|
|
1607
|
+
this.m2b(MutableClassicSolver$setStandardOutput$lambda(stdOut));
|
|
1608
|
+
};
|
|
1609
|
+
MutableClassicSolver.prototype.setStandardOutput = function (stdOut) {
|
|
1610
|
+
return this.w37(stdOut);
|
|
1611
|
+
};
|
|
1612
|
+
MutableClassicSolver.prototype.x37 = function (warnings) {
|
|
1613
|
+
this.m2b(MutableClassicSolver$setWarnings$lambda(warnings));
|
|
1614
|
+
};
|
|
1615
|
+
MutableClassicSolver.prototype.setWarnings = function (warnings) {
|
|
1616
|
+
return this.x37(warnings);
|
|
1617
|
+
};
|
|
1618
|
+
MutableClassicSolver.prototype.p1v = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
1619
|
+
return MutableClassicSolver_init_$Create$_1(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, false, 512, null);
|
|
1620
|
+
};
|
|
1621
|
+
MutableClassicSolver.prototype.z1s = function () {
|
|
1622
|
+
return this.x1x(null, null, null, null, null, null, null, null, null, 511, null);
|
|
1623
|
+
};
|
|
1624
|
+
MutableClassicSolver.prototype.clone = function () {
|
|
1625
|
+
return this.z1s();
|
|
1626
|
+
};
|
|
1627
|
+
function MutableClassicSolver() {
|
|
1628
|
+
}
|
|
1629
|
+
function SolutionIterator$Companion$of$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd, _anonymous_parameter_2__qggqfi) {
|
|
1630
|
+
return Unit_getInstance();
|
|
1631
|
+
}
|
|
1632
|
+
function Companion() {
|
|
1633
|
+
Companion_instance = this;
|
|
1634
|
+
}
|
|
1635
|
+
Companion.prototype.of = function (initialState, onStateTransition) {
|
|
1636
|
+
var tmp;
|
|
1637
|
+
if (onStateTransition === void 1) {
|
|
1638
|
+
tmp = SolutionIterator$Companion$of$lambda;
|
|
1639
|
+
} else {
|
|
1640
|
+
tmp = onStateTransition;
|
|
1641
|
+
}
|
|
1642
|
+
return this.d37(initialState, tmp);
|
|
1643
|
+
};
|
|
1644
|
+
Companion.prototype.d37 = function (initialState, onStateTransition) {
|
|
1645
|
+
return new SimpleSolutionIterator(initialState, onStateTransition);
|
|
1646
|
+
};
|
|
1647
|
+
var Companion_instance;
|
|
1648
|
+
function Companion_getInstance_22() {
|
|
1649
|
+
if (Companion_instance == null)
|
|
1650
|
+
new Companion();
|
|
1651
|
+
return Companion_instance;
|
|
1652
|
+
}
|
|
1653
|
+
function AbstractEndState(solution, context) {
|
|
1654
|
+
AbstractState.call(this, context);
|
|
1655
|
+
this.a38_1 = solution;
|
|
1656
|
+
this.b38_1 = context;
|
|
1657
|
+
}
|
|
1658
|
+
AbstractEndState.prototype.h2j = function () {
|
|
1659
|
+
return this.a38_1;
|
|
1660
|
+
};
|
|
1661
|
+
AbstractEndState.prototype.j5 = function () {
|
|
1662
|
+
return this.b38_1;
|
|
1663
|
+
};
|
|
1664
|
+
AbstractEndState.prototype.c38 = function () {
|
|
1665
|
+
throw NoSuchElementException_init_$Create$();
|
|
1666
|
+
};
|
|
1667
|
+
AbstractEndState.prototype.asEndState = function () {
|
|
1668
|
+
return this.e38();
|
|
1669
|
+
};
|
|
1670
|
+
function AbstractState$executionTime$delegate$lambda(this$0) {
|
|
1671
|
+
return function () {
|
|
1672
|
+
return this$0.k38();
|
|
1673
|
+
};
|
|
1674
|
+
}
|
|
1675
|
+
function AbstractState(context) {
|
|
1676
|
+
this.f38_1 = context;
|
|
1677
|
+
var tmp = this;
|
|
1678
|
+
tmp.g38_1 = lazy(AbstractState$executionTime$delegate$lambda(this));
|
|
1679
|
+
}
|
|
1680
|
+
AbstractState.prototype.j5 = function () {
|
|
1681
|
+
return this.f38_1;
|
|
1682
|
+
};
|
|
1683
|
+
AbstractState.prototype.i38 = function () {
|
|
1684
|
+
var tmp$ret$0;
|
|
1685
|
+
// Inline function 'kotlin.getValue' call
|
|
1686
|
+
var tmp0_getValue = executionTime$factory();
|
|
1687
|
+
tmp$ret$0 = this.g38_1.b1();
|
|
1688
|
+
return tmp$ret$0;
|
|
1689
|
+
};
|
|
1690
|
+
AbstractState.prototype.j38 = function () {
|
|
1691
|
+
return this.i38().ch(this.j5().x33_1).jd(this.j5().y33_1) > 0;
|
|
1692
|
+
};
|
|
1693
|
+
AbstractState.prototype.p = function () {
|
|
1694
|
+
var tmp;
|
|
1695
|
+
if (this.j38()) {
|
|
1696
|
+
var tmp0_exceededDuration = this.j5().y33_1;
|
|
1697
|
+
var tmp1_context = this.j5();
|
|
1698
|
+
var tmp_0 = TimeOutException_init_$Create$(null, null, tmp1_context, tmp0_exceededDuration, 3, null);
|
|
1699
|
+
var tmp_1 = this.j5();
|
|
1700
|
+
var tmp_2 = new Long(0, 0);
|
|
1701
|
+
var tmp_3 = new Long(0, 0);
|
|
1702
|
+
var tmp_4 = this.l38();
|
|
1703
|
+
tmp = new StateHalt(tmp_0, tmp_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_2, tmp_3, null, null, 0, tmp_4, null, 3145727, null));
|
|
1704
|
+
} else {
|
|
1705
|
+
tmp = this.c38();
|
|
1706
|
+
}
|
|
1707
|
+
return tmp;
|
|
1708
|
+
};
|
|
1709
|
+
AbstractState.prototype.next = function () {
|
|
1710
|
+
return this.p();
|
|
1711
|
+
};
|
|
1712
|
+
AbstractState.prototype.k38 = function () {
|
|
1713
|
+
return currentTimeInstant();
|
|
1714
|
+
};
|
|
1715
|
+
AbstractState.prototype.l38 = function () {
|
|
1716
|
+
var tmp$ret$0;
|
|
1717
|
+
// Inline function 'kotlin.Long.plus' call
|
|
1718
|
+
var tmp0_plus = this.j5().c34_1;
|
|
1719
|
+
tmp$ret$0 = tmp0_plus.bh(new Long(1, 0));
|
|
1720
|
+
return tmp$ret$0;
|
|
1721
|
+
};
|
|
1722
|
+
AbstractState.prototype.m38 = function (_this__u8e3s4) {
|
|
1723
|
+
var tmp$ret$2;
|
|
1724
|
+
$l$block: {
|
|
1725
|
+
// Inline function 'kotlin.sequences.first' call
|
|
1726
|
+
var tmp0_first = _this__u8e3s4.e34_1;
|
|
1727
|
+
var tmp0_iterator = tmp0_first.j();
|
|
1728
|
+
while (tmp0_iterator.m()) {
|
|
1729
|
+
var element = tmp0_iterator.p();
|
|
1730
|
+
var tmp$ret$1;
|
|
1731
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.AbstractState.skipThrow.<anonymous>' call
|
|
1732
|
+
var tmp0_safe_receiver = element.i33_1;
|
|
1733
|
+
var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fw();
|
|
1734
|
+
var tmp$ret$0;
|
|
1735
|
+
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
1736
|
+
var tmp0__get_functor__thl4dk = Throw_getInstance();
|
|
1737
|
+
tmp$ret$0 = tmp0__get_functor__thl4dk.signature.name;
|
|
1738
|
+
tmp$ret$1 = !(tmp === tmp$ret$0);
|
|
1739
|
+
if (tmp$ret$1) {
|
|
1740
|
+
tmp$ret$2 = element;
|
|
1741
|
+
break $l$block;
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
throw NoSuchElementException_init_$Create$_0('Sequence contains no element matching the predicate.');
|
|
1745
|
+
}
|
|
1746
|
+
return tmp$ret$2;
|
|
1747
|
+
};
|
|
1748
|
+
function executionTime$factory() {
|
|
1749
|
+
return getPropertyCallableRef('executionTime', 1, KProperty1, function (receiver) {
|
|
1750
|
+
return receiver.i38();
|
|
1751
|
+
}, null);
|
|
1752
|
+
}
|
|
1753
|
+
function EndState() {
|
|
1754
|
+
}
|
|
1755
|
+
function State() {
|
|
1756
|
+
}
|
|
1757
|
+
function StateBacktracking(context) {
|
|
1758
|
+
AbstractState.call(this, context);
|
|
1759
|
+
this.p38_1 = context;
|
|
1760
|
+
}
|
|
1761
|
+
StateBacktracking.prototype.j5 = function () {
|
|
1762
|
+
return this.p38_1;
|
|
1763
|
+
};
|
|
1764
|
+
StateBacktracking.prototype.c38 = function () {
|
|
1765
|
+
var choicePoints = this.p38_1.z33_1;
|
|
1766
|
+
var tmp;
|
|
1767
|
+
var tmp$ret$1;
|
|
1768
|
+
// Inline function 'kotlin.let' call
|
|
1769
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1770
|
+
var tmp$ret$0;
|
|
1771
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateBacktracking.computeNext.<anonymous>' call
|
|
1772
|
+
tmp$ret$0 = choicePoints === null ? true : !choicePoints.g35();
|
|
1773
|
+
tmp$ret$1 = tmp$ret$0;
|
|
1774
|
+
if (tmp$ret$1) {
|
|
1775
|
+
var tmp_0 = Companion_getInstance_14().no(this.p38_1.t33_1);
|
|
1776
|
+
var tmp_1 = new Long(0, 0);
|
|
1777
|
+
var tmp_2 = new Long(0, 0);
|
|
1778
|
+
var tmp_3 = this.l38();
|
|
1779
|
+
tmp = new StateEnd(tmp_0, this.p38_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_1, tmp_2, null, null, 0, tmp_3, null, 3145727, null));
|
|
1780
|
+
} else {
|
|
1781
|
+
var tmp$ret$3;
|
|
1782
|
+
$l$block: {
|
|
1783
|
+
// Inline function 'kotlin.sequences.first' call
|
|
1784
|
+
var tmp0_first = ensureNotNull(choicePoints).h35();
|
|
1785
|
+
var tmp0_iterator = tmp0_first.j();
|
|
1786
|
+
while (tmp0_iterator.m()) {
|
|
1787
|
+
var element = tmp0_iterator.p();
|
|
1788
|
+
var tmp$ret$2;
|
|
1789
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateBacktracking.computeNext.<anonymous>' call
|
|
1790
|
+
tmp$ret$2 = element.t34().vq();
|
|
1791
|
+
if (tmp$ret$2) {
|
|
1792
|
+
tmp$ret$3 = element;
|
|
1793
|
+
break $l$block;
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
throw NoSuchElementException_init_$Create$_0('Sequence contains no element matching the predicate.');
|
|
1797
|
+
}
|
|
1798
|
+
var choicePointContext = tmp$ret$3;
|
|
1799
|
+
var nextContext = choicePointContext.y34(this.p38_1);
|
|
1800
|
+
var tmp_4;
|
|
1801
|
+
if (nextContext.w33_1.vq()) {
|
|
1802
|
+
tmp_4 = new StatePrimitiveExecution(nextContext);
|
|
1803
|
+
} else {
|
|
1804
|
+
tmp_4 = new StateRuleExecution(nextContext);
|
|
1805
|
+
}
|
|
1806
|
+
tmp = tmp_4;
|
|
1807
|
+
}
|
|
1808
|
+
return tmp;
|
|
1809
|
+
};
|
|
1810
|
+
StateBacktracking.prototype.h38 = function (context) {
|
|
1811
|
+
return this.q38(context);
|
|
1812
|
+
};
|
|
1813
|
+
StateBacktracking.prototype.q38 = function (context) {
|
|
1814
|
+
return new StateBacktracking(context);
|
|
1815
|
+
};
|
|
1816
|
+
StateBacktracking.prototype.toString = function () {
|
|
1817
|
+
return 'StateBacktracking(context=' + this.p38_1 + ')';
|
|
1818
|
+
};
|
|
1819
|
+
StateBacktracking.prototype.hashCode = function () {
|
|
1820
|
+
return this.p38_1.hashCode();
|
|
1821
|
+
};
|
|
1822
|
+
StateBacktracking.prototype.equals = function (other) {
|
|
1823
|
+
if (this === other)
|
|
1824
|
+
return true;
|
|
1825
|
+
if (!(other instanceof StateBacktracking))
|
|
1826
|
+
return false;
|
|
1827
|
+
var tmp0_other_with_cast = other instanceof StateBacktracking ? other : THROW_CCE();
|
|
1828
|
+
if (!this.p38_1.equals(tmp0_other_with_cast.p38_1))
|
|
1829
|
+
return false;
|
|
1830
|
+
return true;
|
|
1831
|
+
};
|
|
1832
|
+
function StateEnd(solution, context) {
|
|
1833
|
+
AbstractEndState.call(this, solution, context);
|
|
1834
|
+
this.v38_1 = solution;
|
|
1835
|
+
this.w38_1 = context;
|
|
1836
|
+
}
|
|
1837
|
+
StateEnd.prototype.h2j = function () {
|
|
1838
|
+
return this.v38_1;
|
|
1839
|
+
};
|
|
1840
|
+
StateEnd.prototype.j5 = function () {
|
|
1841
|
+
return this.w38_1;
|
|
1842
|
+
};
|
|
1843
|
+
StateEnd.prototype.j38 = function () {
|
|
1844
|
+
return false;
|
|
1845
|
+
};
|
|
1846
|
+
StateEnd.prototype.c38 = function () {
|
|
1847
|
+
var tmp;
|
|
1848
|
+
if (this.w38_1.g35()) {
|
|
1849
|
+
var tmp0_$this = this.w38_1;
|
|
1850
|
+
var tmp1_step = this.l38();
|
|
1851
|
+
var tmp2_startTime = this.k38();
|
|
1852
|
+
var tmp_0 = new Long(0, 0);
|
|
1853
|
+
tmp = new StateBacktracking(tmp0_$this.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp2_startTime, tmp_0, null, null, 0, tmp1_step, null, 3112959, null));
|
|
1854
|
+
} else {
|
|
1855
|
+
tmp = AbstractEndState.prototype.c38.call(this);
|
|
1856
|
+
}
|
|
1857
|
+
return tmp;
|
|
1858
|
+
};
|
|
1859
|
+
StateEnd.prototype.h38 = function (context) {
|
|
1860
|
+
return this.x38(this.v38_1, context);
|
|
1861
|
+
};
|
|
1862
|
+
StateEnd.prototype.x38 = function (solution, context) {
|
|
1863
|
+
return new StateEnd(solution, context);
|
|
1864
|
+
};
|
|
1865
|
+
StateEnd.prototype.toString = function () {
|
|
1866
|
+
return 'StateEnd(solution=' + this.v38_1 + ', context=' + this.w38_1 + ')';
|
|
1867
|
+
};
|
|
1868
|
+
StateEnd.prototype.hashCode = function () {
|
|
1869
|
+
var result = hashCode(this.v38_1);
|
|
1870
|
+
result = imul(result, 31) + this.w38_1.hashCode() | 0;
|
|
1871
|
+
return result;
|
|
1872
|
+
};
|
|
1873
|
+
StateEnd.prototype.equals = function (other) {
|
|
1874
|
+
if (this === other)
|
|
1875
|
+
return true;
|
|
1876
|
+
if (!(other instanceof StateEnd))
|
|
1877
|
+
return false;
|
|
1878
|
+
var tmp0_other_with_cast = other instanceof StateEnd ? other : THROW_CCE();
|
|
1879
|
+
if (!equals(this.v38_1, tmp0_other_with_cast.v38_1))
|
|
1880
|
+
return false;
|
|
1881
|
+
if (!this.w38_1.equals(tmp0_other_with_cast.w38_1))
|
|
1882
|
+
return false;
|
|
1883
|
+
return true;
|
|
1884
|
+
};
|
|
1885
|
+
StateEnd.prototype.asEndState = function () {
|
|
1886
|
+
return this.e38();
|
|
1887
|
+
};
|
|
1888
|
+
function isCatch(_this__u8e3s4, $this) {
|
|
1889
|
+
var tmp;
|
|
1890
|
+
if (_this__u8e3s4.zv() === 3) {
|
|
1891
|
+
var tmp_0 = _this__u8e3s4.fw();
|
|
1892
|
+
var tmp$ret$0;
|
|
1893
|
+
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
1894
|
+
var tmp0__get_functor__thl4dk = Catch_getInstance();
|
|
1895
|
+
tmp$ret$0 = tmp0__get_functor__thl4dk.signature.name;
|
|
1896
|
+
tmp = tmp_0 === tmp$ret$0;
|
|
1897
|
+
} else {
|
|
1898
|
+
tmp = false;
|
|
1899
|
+
}
|
|
1900
|
+
return tmp;
|
|
1901
|
+
}
|
|
1902
|
+
function getExceptionContent(_this__u8e3s4, $this) {
|
|
1903
|
+
var tmp0_subject = _this__u8e3s4;
|
|
1904
|
+
var tmp;
|
|
1905
|
+
if (tmp0_subject instanceof MessageError) {
|
|
1906
|
+
tmp = _this__u8e3s4.e27();
|
|
1907
|
+
} else {
|
|
1908
|
+
tmp = _this__u8e3s4.f25();
|
|
1909
|
+
}
|
|
1910
|
+
return tmp;
|
|
1911
|
+
}
|
|
1912
|
+
function toPublicException(_this__u8e3s4, $this) {
|
|
1913
|
+
var tmp0_subject = _this__u8e3s4;
|
|
1914
|
+
var tmp;
|
|
1915
|
+
if (tmp0_subject instanceof MessageError) {
|
|
1916
|
+
tmp = Companion_getInstance_15().forUncaughtError(_this__u8e3s4);
|
|
1917
|
+
} else {
|
|
1918
|
+
tmp = _this__u8e3s4;
|
|
1919
|
+
}
|
|
1920
|
+
return tmp;
|
|
1921
|
+
}
|
|
1922
|
+
function _get_finalState__3aigq8($this) {
|
|
1923
|
+
var tmp = toPublicException($this.a39_1, $this);
|
|
1924
|
+
var tmp_0 = new Long(0, 0);
|
|
1925
|
+
var tmp_1 = new Long(0, 0);
|
|
1926
|
+
var tmp_2 = $this.l38();
|
|
1927
|
+
return new StateHalt(tmp, $this.b39_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 3145727, null));
|
|
1928
|
+
}
|
|
1929
|
+
function _get_handleExceptionInParentContext__yj3v4e($this) {
|
|
1930
|
+
var tmp = ensureNotNull($this.b39_1.a34_1);
|
|
1931
|
+
var tmp_0 = new Long(0, 0);
|
|
1932
|
+
var tmp_1 = new Long(0, 0);
|
|
1933
|
+
var tmp_2 = $this.l38();
|
|
1934
|
+
return new StateException($this.a39_1, tmp.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 3145727, null));
|
|
1935
|
+
}
|
|
1936
|
+
function handleStruct($this, unificator, catchGoal, error) {
|
|
1937
|
+
var tmp;
|
|
1938
|
+
if (isCatch(catchGoal, $this)) {
|
|
1939
|
+
var catcher = unificator.mgu(catchGoal.get(1), getExceptionContent(error, $this));
|
|
1940
|
+
tmp = handleCatch($this, catchGoal, catcher);
|
|
1941
|
+
} else if ($this.b39_1.v36()) {
|
|
1942
|
+
tmp = _get_finalState__3aigq8($this);
|
|
1943
|
+
} else {
|
|
1944
|
+
tmp = _get_handleExceptionInParentContext__yj3v4e($this);
|
|
1945
|
+
}
|
|
1946
|
+
return tmp;
|
|
1947
|
+
}
|
|
1948
|
+
function handleCatch($this, catchGoal, catcher) {
|
|
1949
|
+
var tmp;
|
|
1950
|
+
if (catcher.q12()) {
|
|
1951
|
+
var tmp_0 = $this.b39_1.s33_1.plus(catcher);
|
|
1952
|
+
var newSubstitution = tmp_0.filterEntry(StateException$handleCatch$lambda($this));
|
|
1953
|
+
var subGoals = catchGoal.get(2).getSubstituted(newSubstitution, []);
|
|
1954
|
+
var newGoals = plus_0(toGoals(subGoals), $this.b39_1.u33_1.tq());
|
|
1955
|
+
var tmp0_$this = $this.b39_1;
|
|
1956
|
+
var tmp1_rules = Companion_getInstance_9().empty();
|
|
1957
|
+
var tmp2_primitives = Companion_getInstance_9().empty();
|
|
1958
|
+
var tmp3_substitution = newSubstitution.castToUnifier();
|
|
1959
|
+
var tmp4_step = $this.l38();
|
|
1960
|
+
var tmp_1 = new Long(0, 0);
|
|
1961
|
+
var tmp_2 = new Long(0, 0);
|
|
1962
|
+
tmp = new StateGoalSelection(tmp0_$this.z34(null, null, null, null, null, null, null, null, null, null, tmp3_substitution, null, newGoals, tmp1_rules, tmp2_primitives, tmp_1, tmp_2, null, null, 0, tmp4_step, null, 3116031, null));
|
|
1963
|
+
} else if ($this.b39_1.v36()) {
|
|
1964
|
+
tmp = _get_finalState__3aigq8($this);
|
|
1965
|
+
} else {
|
|
1966
|
+
tmp = _get_handleExceptionInParentContext__yj3v4e($this);
|
|
1967
|
+
}
|
|
1968
|
+
return tmp;
|
|
1969
|
+
}
|
|
1970
|
+
function StateException$handleCatch$lambda(this$0) {
|
|
1971
|
+
return function (_name_for_destructuring_parameter_0__wldtmu) {
|
|
1972
|
+
var tmp$ret$0;
|
|
1973
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1974
|
+
tmp$ret$0 = _name_for_destructuring_parameter_0__wldtmu.a1();
|
|
1975
|
+
var it = tmp$ret$0;
|
|
1976
|
+
return this$0.b39_1.x36(it);
|
|
1977
|
+
};
|
|
1978
|
+
}
|
|
1979
|
+
function StateException(exception, context) {
|
|
1980
|
+
AbstractState.call(this, context);
|
|
1981
|
+
this.a39_1 = exception;
|
|
1982
|
+
this.b39_1 = context;
|
|
1983
|
+
}
|
|
1984
|
+
StateException.prototype.j5 = function () {
|
|
1985
|
+
return this.b39_1;
|
|
1986
|
+
};
|
|
1987
|
+
StateException.prototype.c38 = function () {
|
|
1988
|
+
var tmp0_subject = this.a39_1;
|
|
1989
|
+
var tmp;
|
|
1990
|
+
if (tmp0_subject instanceof LogicError) {
|
|
1991
|
+
var catchGoal = ensureNotNull(this.b39_1.w36());
|
|
1992
|
+
tmp = catchGoal.lw() ? handleStruct(this, this.b39_1.j33_1, catchGoal.castToStruct(), this.a39_1) : this.b39_1.v36() ? _get_finalState__3aigq8(this) : _get_handleExceptionInParentContext__yj3v4e(this);
|
|
1993
|
+
} else {
|
|
1994
|
+
tmp = _get_finalState__3aigq8(this);
|
|
1995
|
+
}
|
|
1996
|
+
return tmp;
|
|
1997
|
+
};
|
|
1998
|
+
StateException.prototype.h38 = function (context) {
|
|
1999
|
+
return this.c39(this.a39_1, context);
|
|
2000
|
+
};
|
|
2001
|
+
StateException.prototype.c39 = function (exception, context) {
|
|
2002
|
+
return new StateException(exception, context);
|
|
2003
|
+
};
|
|
2004
|
+
StateException.prototype.toString = function () {
|
|
2005
|
+
return 'StateException(exception=' + this.a39_1 + ', context=' + this.b39_1 + ')';
|
|
2006
|
+
};
|
|
2007
|
+
StateException.prototype.hashCode = function () {
|
|
2008
|
+
var result = hashCode(this.a39_1);
|
|
2009
|
+
result = imul(result, 31) + this.b39_1.hashCode() | 0;
|
|
2010
|
+
return result;
|
|
2011
|
+
};
|
|
2012
|
+
StateException.prototype.equals = function (other) {
|
|
2013
|
+
if (this === other)
|
|
2014
|
+
return true;
|
|
2015
|
+
if (!(other instanceof StateException))
|
|
2016
|
+
return false;
|
|
2017
|
+
var tmp0_other_with_cast = other instanceof StateException ? other : THROW_CCE();
|
|
2018
|
+
if (!equals(this.a39_1, tmp0_other_with_cast.a39_1))
|
|
2019
|
+
return false;
|
|
2020
|
+
if (!this.b39_1.equals(tmp0_other_with_cast.b39_1))
|
|
2021
|
+
return false;
|
|
2022
|
+
return true;
|
|
2023
|
+
};
|
|
2024
|
+
function StateGoalSelection$computeNext$lambda(this$0) {
|
|
2025
|
+
return function (_name_for_destructuring_parameter_0__wldtmu) {
|
|
2026
|
+
var tmp$ret$0;
|
|
2027
|
+
// Inline function 'kotlin.collections.component1' call
|
|
2028
|
+
tmp$ret$0 = _name_for_destructuring_parameter_0__wldtmu.a1();
|
|
2029
|
+
var it = tmp$ret$0;
|
|
2030
|
+
return this$0.f39_1.x36(it);
|
|
2031
|
+
};
|
|
2032
|
+
}
|
|
2033
|
+
function StateGoalSelection(context) {
|
|
2034
|
+
AbstractState.call(this, context);
|
|
2035
|
+
this.f39_1 = context;
|
|
2036
|
+
}
|
|
2037
|
+
StateGoalSelection.prototype.j5 = function () {
|
|
2038
|
+
return this.f39_1;
|
|
2039
|
+
};
|
|
2040
|
+
StateGoalSelection.prototype.c38 = function () {
|
|
2041
|
+
var tmp;
|
|
2042
|
+
if (this.f39_1.u33_1.wq()) {
|
|
2043
|
+
var tmp_0;
|
|
2044
|
+
if (this.f39_1.v36()) {
|
|
2045
|
+
var tmp_1 = Companion_getInstance_14().m1w(this.f39_1.t33_1, this.f39_1.s33_1);
|
|
2046
|
+
var tmp_2 = new Long(0, 0);
|
|
2047
|
+
var tmp_3 = new Long(0, 0);
|
|
2048
|
+
var tmp_4 = this.l38();
|
|
2049
|
+
tmp_0 = new StateEnd(tmp_1, this.f39_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_2, tmp_3, null, null, 0, tmp_4, null, 3145727, null));
|
|
2050
|
+
} else {
|
|
2051
|
+
var tmp$ret$1;
|
|
2052
|
+
// Inline function 'kotlin.let' call
|
|
2053
|
+
var tmp0_let = ensureNotNull(this.f39_1.a34_1);
|
|
2054
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2055
|
+
var tmp$ret$0;
|
|
2056
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateGoalSelection.computeNext.<anonymous>' call
|
|
2057
|
+
var tmp0_choicePoints = this.f39_1.z33_1;
|
|
2058
|
+
var tmp1_flags = this.f39_1.l33_1;
|
|
2059
|
+
var tmp2_dynamicKb = this.f39_1.n33_1;
|
|
2060
|
+
var tmp3_staticKb = this.f39_1.m33_1;
|
|
2061
|
+
var tmp4_substitution = this.f39_1.s33_1.k12(StateGoalSelection$computeNext$lambda(this));
|
|
2062
|
+
var tmp5_goals = tmp0_let.u33_1.tq();
|
|
2063
|
+
var tmp6_procedure = tmp0_let.i33_1;
|
|
2064
|
+
var tmp7_step = this.l38();
|
|
2065
|
+
var tmp8_startTime = this.f39_1.x33_1;
|
|
2066
|
+
var tmp9_operators = this.f39_1.o33_1;
|
|
2067
|
+
var tmp10_inputChannels = this.f39_1.p33_1;
|
|
2068
|
+
var tmp11_outputChannels = this.f39_1.q33_1;
|
|
2069
|
+
var tmp12_libraries = this.f39_1.k33_1;
|
|
2070
|
+
var tmp13_customData = this.f39_1.r33_1;
|
|
2071
|
+
var tmp_5 = new Long(0, 0);
|
|
2072
|
+
tmp$ret$0 = tmp0_let.z34(tmp6_procedure, null, tmp12_libraries, tmp1_flags, tmp3_staticKb, tmp2_dynamicKb, tmp9_operators, tmp10_inputChannels, tmp11_outputChannels, tmp13_customData, tmp4_substitution, null, tmp5_goals, null, null, tmp8_startTime, tmp_5, tmp0_choicePoints, null, 0, tmp7_step, null, 2975746, null);
|
|
2073
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2074
|
+
tmp_0 = new StateGoalSelection(tmp$ret$1);
|
|
2075
|
+
}
|
|
2076
|
+
tmp = tmp_0;
|
|
2077
|
+
} else if (equals(this.f39_1.l33_1.get(TrackVariables_getInstance()), TrackVariables_getInstance().m29_1)) {
|
|
2078
|
+
var tmp_6 = new Long(0, 0);
|
|
2079
|
+
var tmp_7 = new Long(0, 0);
|
|
2080
|
+
tmp = new StatePrimitiveSelection(this.f39_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_6, tmp_7, null, null, 0, this.l38(), plus_1(this.f39_1.d34_1, toSet(ensureNotNull(this.f39_1.u33_1.uq()).hw())), 1048575, null));
|
|
2081
|
+
} else {
|
|
2082
|
+
var tmp_8 = new Long(0, 0);
|
|
2083
|
+
var tmp_9 = new Long(0, 0);
|
|
2084
|
+
var tmp_10 = this.l38();
|
|
2085
|
+
tmp = new StatePrimitiveSelection(this.f39_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_8, tmp_9, null, null, 0, tmp_10, null, 3145727, null));
|
|
2086
|
+
}
|
|
2087
|
+
return tmp;
|
|
2088
|
+
};
|
|
2089
|
+
StateGoalSelection.prototype.h38 = function (context) {
|
|
2090
|
+
return this.q38(context);
|
|
2091
|
+
};
|
|
2092
|
+
StateGoalSelection.prototype.q38 = function (context) {
|
|
2093
|
+
return new StateGoalSelection(context);
|
|
2094
|
+
};
|
|
2095
|
+
StateGoalSelection.prototype.toString = function () {
|
|
2096
|
+
return 'StateGoalSelection(context=' + this.f39_1 + ')';
|
|
2097
|
+
};
|
|
2098
|
+
StateGoalSelection.prototype.hashCode = function () {
|
|
2099
|
+
return this.f39_1.hashCode();
|
|
2100
|
+
};
|
|
2101
|
+
StateGoalSelection.prototype.equals = function (other) {
|
|
2102
|
+
if (this === other)
|
|
2103
|
+
return true;
|
|
2104
|
+
if (!(other instanceof StateGoalSelection))
|
|
2105
|
+
return false;
|
|
2106
|
+
var tmp0_other_with_cast = other instanceof StateGoalSelection ? other : THROW_CCE();
|
|
2107
|
+
if (!this.f39_1.equals(tmp0_other_with_cast.f39_1))
|
|
2108
|
+
return false;
|
|
2109
|
+
return true;
|
|
2110
|
+
};
|
|
2111
|
+
function StateHalt(exception, context) {
|
|
2112
|
+
AbstractEndState.call(this, Companion_getInstance_14().halt(context.t33_1, exception), context);
|
|
2113
|
+
this.k39_1 = exception;
|
|
2114
|
+
this.l39_1 = context;
|
|
2115
|
+
}
|
|
2116
|
+
StateHalt.prototype.j5 = function () {
|
|
2117
|
+
return this.l39_1;
|
|
2118
|
+
};
|
|
2119
|
+
StateHalt.prototype.h38 = function (context) {
|
|
2120
|
+
return this.c39(this.k39_1, context);
|
|
2121
|
+
};
|
|
2122
|
+
StateHalt.prototype.c39 = function (exception, context) {
|
|
2123
|
+
return new StateHalt(exception, context);
|
|
2124
|
+
};
|
|
2125
|
+
StateHalt.prototype.toString = function () {
|
|
2126
|
+
return 'StateHalt(exception=' + this.k39_1 + ', context=' + this.l39_1 + ')';
|
|
2127
|
+
};
|
|
2128
|
+
StateHalt.prototype.hashCode = function () {
|
|
2129
|
+
var result = hashCode(this.k39_1);
|
|
2130
|
+
result = imul(result, 31) + this.l39_1.hashCode() | 0;
|
|
2131
|
+
return result;
|
|
2132
|
+
};
|
|
2133
|
+
StateHalt.prototype.equals = function (other) {
|
|
2134
|
+
if (this === other)
|
|
2135
|
+
return true;
|
|
2136
|
+
if (!(other instanceof StateHalt))
|
|
2137
|
+
return false;
|
|
2138
|
+
var tmp0_other_with_cast = other instanceof StateHalt ? other : THROW_CCE();
|
|
2139
|
+
if (!equals(this.k39_1, tmp0_other_with_cast.k39_1))
|
|
2140
|
+
return false;
|
|
2141
|
+
if (!this.l39_1.equals(tmp0_other_with_cast.l39_1))
|
|
2142
|
+
return false;
|
|
2143
|
+
return true;
|
|
2144
|
+
};
|
|
2145
|
+
StateHalt.prototype.asEndState = function () {
|
|
2146
|
+
return this.e38();
|
|
2147
|
+
};
|
|
2148
|
+
function StateInit(context) {
|
|
2149
|
+
AbstractState.call(this, context);
|
|
2150
|
+
this.o39_1 = context;
|
|
2151
|
+
}
|
|
2152
|
+
StateInit.prototype.j5 = function () {
|
|
2153
|
+
return this.o39_1;
|
|
2154
|
+
};
|
|
2155
|
+
StateInit.prototype.c38 = function () {
|
|
2156
|
+
var tmp0_$this = this.o39_1;
|
|
2157
|
+
var tmp1_goals = toGoals(this.o39_1.t33_1);
|
|
2158
|
+
var tmp2_rules = Companion_getInstance_9().empty();
|
|
2159
|
+
var tmp3_primitives = Companion_getInstance_9().empty();
|
|
2160
|
+
var tmp4_substitution = Companion_getInstance_7().empty();
|
|
2161
|
+
var tmp5_customData = this.o39_1.r33_1.preservePersistent();
|
|
2162
|
+
var tmp6_relevantVariables = emptySet();
|
|
2163
|
+
var tmp = new Long(0, 0);
|
|
2164
|
+
return new StateGoalSelection(appendRulesAndChoicePoints(tmp0_$this.z34(null, null, null, null, null, null, null, null, null, tmp5_customData, tmp4_substitution, null, tmp1_goals, tmp2_rules, tmp3_primitives, tmp, new Long(0, 0), null, null, 0, new Long(1, 0), tmp6_relevantVariables, 100863, null), Companion_getInstance_9().empty()));
|
|
2165
|
+
};
|
|
2166
|
+
StateInit.prototype.h38 = function (context) {
|
|
2167
|
+
return this.q38(context);
|
|
2168
|
+
};
|
|
2169
|
+
StateInit.prototype.q38 = function (context) {
|
|
2170
|
+
return new StateInit(context);
|
|
2171
|
+
};
|
|
2172
|
+
StateInit.prototype.toString = function () {
|
|
2173
|
+
return 'StateInit(context=' + this.o39_1 + ')';
|
|
2174
|
+
};
|
|
2175
|
+
StateInit.prototype.hashCode = function () {
|
|
2176
|
+
return this.o39_1.hashCode();
|
|
2177
|
+
};
|
|
2178
|
+
StateInit.prototype.equals = function (other) {
|
|
2179
|
+
if (this === other)
|
|
2180
|
+
return true;
|
|
2181
|
+
if (!(other instanceof StateInit))
|
|
2182
|
+
return false;
|
|
2183
|
+
var tmp0_other_with_cast = other instanceof StateInit ? other : THROW_CCE();
|
|
2184
|
+
if (!this.o39_1.equals(tmp0_other_with_cast.o39_1))
|
|
2185
|
+
return false;
|
|
2186
|
+
return true;
|
|
2187
|
+
};
|
|
2188
|
+
function copyFromCurrentPrimitive(_this__u8e3s4, $this, goals, procedureFromAncestor, substitution) {
|
|
2189
|
+
var tmp0_safe_receiver = _this__u8e3s4.w33_1.uq();
|
|
2190
|
+
var tmp;
|
|
2191
|
+
if (tmp0_safe_receiver == null) {
|
|
2192
|
+
tmp = null;
|
|
2193
|
+
} else {
|
|
2194
|
+
var tmp$ret$1;
|
|
2195
|
+
// Inline function 'kotlin.let' call
|
|
2196
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2197
|
+
var tmp$ret$0;
|
|
2198
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StatePrimitiveExecution.copyFromCurrentPrimitive.<anonymous>' call
|
|
2199
|
+
tmp$ret$0 = _this__u8e3s4.z36(tmp0_safe_receiver.sideEffects);
|
|
2200
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2201
|
+
tmp = tmp$ret$1;
|
|
2202
|
+
}
|
|
2203
|
+
var tmp1_elvis_lhs = tmp;
|
|
2204
|
+
var ctx = tmp1_elvis_lhs == null ? _this__u8e3s4 : tmp1_elvis_lhs;
|
|
2205
|
+
var tmp3_elvis_lhs = goals;
|
|
2206
|
+
var tmp4_goals = tmp3_elvis_lhs == null ? _this__u8e3s4.u33_1 : tmp3_elvis_lhs;
|
|
2207
|
+
var tmp_0 = drop(_this__u8e3s4.e34_1, procedureFromAncestor);
|
|
2208
|
+
var tmp5_procedure = first(map(tmp_0, StatePrimitiveExecution$copyFromCurrentPrimitive$lambda));
|
|
2209
|
+
var tmp6_primitives = Companion_getInstance_9().empty();
|
|
2210
|
+
var tmp2_elvis_lhs = substitution;
|
|
2211
|
+
var tmp_1 = tmp2_elvis_lhs == null ? _this__u8e3s4.s33_1 : tmp2_elvis_lhs;
|
|
2212
|
+
var tmp7_substitution = isInterface(tmp_1, Unifier) ? tmp_1 : THROW_CCE();
|
|
2213
|
+
var tmp8_step = $this.l38();
|
|
2214
|
+
var tmp_2 = new Long(0, 0);
|
|
2215
|
+
var tmp_3 = new Long(0, 0);
|
|
2216
|
+
return ctx.z34(tmp5_procedure, null, null, null, null, null, null, null, null, null, tmp7_substitution, null, tmp4_goals, null, tmp6_primitives, tmp_2, tmp_3, null, null, 0, tmp8_step, null, 3124222, null);
|
|
2217
|
+
}
|
|
2218
|
+
function copyFromCurrentPrimitive$default(_this__u8e3s4, $this, goals, procedureFromAncestor, substitution, $mask0, $handler) {
|
|
2219
|
+
if (!(($mask0 & 2) === 0))
|
|
2220
|
+
goals = null;
|
|
2221
|
+
if (!(($mask0 & 4) === 0))
|
|
2222
|
+
procedureFromAncestor = 0;
|
|
2223
|
+
if (!(($mask0 & 8) === 0))
|
|
2224
|
+
substitution = null;
|
|
2225
|
+
return copyFromCurrentPrimitive(_this__u8e3s4, $this, goals, procedureFromAncestor, substitution);
|
|
2226
|
+
}
|
|
2227
|
+
function StatePrimitiveExecution$copyFromCurrentPrimitive$lambda(it) {
|
|
2228
|
+
return it.i33_1;
|
|
2229
|
+
}
|
|
2230
|
+
function StatePrimitiveExecution$computeNext$lambda(this$0) {
|
|
2231
|
+
return function (it) {
|
|
2232
|
+
return new StateGoalSelection(copyFromCurrentPrimitive(this$0.r39_1, this$0, this$0.r39_1.u33_1.tq(), 1, this$0.r39_1.j33_1.mergeWithOccurCheck(this$0.r39_1.s33_1, it.r1u(), false)));
|
|
2233
|
+
};
|
|
2234
|
+
}
|
|
2235
|
+
function StatePrimitiveExecution$computeNext$lambda_0(this$0) {
|
|
2236
|
+
return function (it) {
|
|
2237
|
+
var tmp = ensureNotNull(this$0.r39_1.a34_1);
|
|
2238
|
+
return new StateBacktracking(copyFromCurrentPrimitive$default(tmp, this$0, null, 0, null, 14, null));
|
|
2239
|
+
};
|
|
2240
|
+
}
|
|
2241
|
+
function StatePrimitiveExecution$computeNext$lambda_1(this$0) {
|
|
2242
|
+
return function (it) {
|
|
2243
|
+
var tmp = it.c1w().updateLastContext(this$0.m38(this$0.r39_1));
|
|
2244
|
+
return new StateException(tmp, copyFromCurrentPrimitive$default(this$0.r39_1, this$0, null, 0, null, 14, null));
|
|
2245
|
+
};
|
|
2246
|
+
}
|
|
2247
|
+
function StatePrimitiveExecution$computeNext$lambda_2(it) {
|
|
2248
|
+
throw IllegalStateException_init_$Create$('This should never happen');
|
|
2249
|
+
}
|
|
2250
|
+
function StatePrimitiveExecution(context) {
|
|
2251
|
+
AbstractState.call(this, context);
|
|
2252
|
+
this.r39_1 = context;
|
|
2253
|
+
}
|
|
2254
|
+
StatePrimitiveExecution.prototype.j5 = function () {
|
|
2255
|
+
return this.r39_1;
|
|
2256
|
+
};
|
|
2257
|
+
StatePrimitiveExecution.prototype.c38 = function () {
|
|
2258
|
+
var tmp;
|
|
2259
|
+
try {
|
|
2260
|
+
var tmp0_safe_receiver = this.r39_1.w33_1.uq();
|
|
2261
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.solution;
|
|
2262
|
+
var tmp_0;
|
|
2263
|
+
if (tmp1_safe_receiver == null) {
|
|
2264
|
+
tmp_0 = null;
|
|
2265
|
+
} else {
|
|
2266
|
+
var tmp_1 = StatePrimitiveExecution$computeNext$lambda(this);
|
|
2267
|
+
var tmp_2 = StatePrimitiveExecution$computeNext$lambda_0(this);
|
|
2268
|
+
var tmp_3 = StatePrimitiveExecution$computeNext$lambda_1(this);
|
|
2269
|
+
tmp_0 = tmp1_safe_receiver.g1w(tmp_1, tmp_2, tmp_3, StatePrimitiveExecution$computeNext$lambda_2);
|
|
2270
|
+
}
|
|
2271
|
+
var tmp2_elvis_lhs = tmp_0;
|
|
2272
|
+
var tmp_4;
|
|
2273
|
+
if (tmp2_elvis_lhs == null) {
|
|
2274
|
+
tmp_4 = new StateBacktracking(copyFromCurrentPrimitive$default(this.r39_1, this, null, 0, null, 14, null));
|
|
2275
|
+
} else {
|
|
2276
|
+
tmp_4 = tmp2_elvis_lhs;
|
|
2277
|
+
}
|
|
2278
|
+
tmp = tmp_4;
|
|
2279
|
+
} catch ($p) {
|
|
2280
|
+
var tmp_5;
|
|
2281
|
+
if ($p instanceof ResolutionException) {
|
|
2282
|
+
var tmp_6 = $p.updateLastContext(this.m38(this.r39_1));
|
|
2283
|
+
var tmp_7 = new Long(0, 0);
|
|
2284
|
+
var tmp_8 = new Long(0, 0);
|
|
2285
|
+
var tmp_9 = this.l38();
|
|
2286
|
+
tmp_5 = new StateException(tmp_6, this.r39_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_7, tmp_8, null, null, 0, tmp_9, null, 3145727, null));
|
|
2287
|
+
} else {
|
|
2288
|
+
throw $p;
|
|
2289
|
+
}
|
|
2290
|
+
tmp = tmp_5;
|
|
2291
|
+
}
|
|
2292
|
+
return tmp;
|
|
2293
|
+
};
|
|
2294
|
+
StatePrimitiveExecution.prototype.h38 = function (context) {
|
|
2295
|
+
return this.q38(context);
|
|
2296
|
+
};
|
|
2297
|
+
StatePrimitiveExecution.prototype.q38 = function (context) {
|
|
2298
|
+
return new StatePrimitiveExecution(context);
|
|
2299
|
+
};
|
|
2300
|
+
StatePrimitiveExecution.prototype.toString = function () {
|
|
2301
|
+
return 'StatePrimitiveExecution(context=' + this.r39_1 + ')';
|
|
2302
|
+
};
|
|
2303
|
+
StatePrimitiveExecution.prototype.hashCode = function () {
|
|
2304
|
+
return this.r39_1.hashCode();
|
|
2305
|
+
};
|
|
2306
|
+
StatePrimitiveExecution.prototype.equals = function (other) {
|
|
2307
|
+
if (this === other)
|
|
2308
|
+
return true;
|
|
2309
|
+
if (!(other instanceof StatePrimitiveExecution))
|
|
2310
|
+
return false;
|
|
2311
|
+
var tmp0_other_with_cast = other instanceof StatePrimitiveExecution ? other : THROW_CCE();
|
|
2312
|
+
if (!this.r39_1.equals(tmp0_other_with_cast.r39_1))
|
|
2313
|
+
return false;
|
|
2314
|
+
return true;
|
|
2315
|
+
};
|
|
2316
|
+
function exceptionalState($this, exception) {
|
|
2317
|
+
var tmp = new Long(0, 0);
|
|
2318
|
+
var tmp_0 = new Long(0, 0);
|
|
2319
|
+
var tmp_1 = $this.l38();
|
|
2320
|
+
return new StateException(exception, $this.u39_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp, tmp_0, null, null, 0, tmp_1, null, 3145727, null));
|
|
2321
|
+
}
|
|
2322
|
+
function StatePrimitiveSelection(context) {
|
|
2323
|
+
AbstractState.call(this, context);
|
|
2324
|
+
this.u39_1 = context;
|
|
2325
|
+
}
|
|
2326
|
+
StatePrimitiveSelection.prototype.j5 = function () {
|
|
2327
|
+
return this.u39_1;
|
|
2328
|
+
};
|
|
2329
|
+
StatePrimitiveSelection.prototype.c38 = function () {
|
|
2330
|
+
var tmp$ret$1;
|
|
2331
|
+
// Inline function 'kotlin.with' call
|
|
2332
|
+
var tmp0_with = this.u39_1;
|
|
2333
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2334
|
+
var tmp$ret$0;
|
|
2335
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StatePrimitiveSelection.computeNext.<anonymous>' call
|
|
2336
|
+
var goal = ensureNotNull(tmp0_with.w36());
|
|
2337
|
+
var tmp;
|
|
2338
|
+
if (goal.bx()) {
|
|
2339
|
+
tmp = exceptionalState(this, Companion_getInstance_17().forGoal(this.u39_1, extractSignature(ensureNotNull(this.u39_1.i33_1)), goal.castToVar()));
|
|
2340
|
+
} else if (goal.lw()) {
|
|
2341
|
+
var goalStruct = goal.castToStruct();
|
|
2342
|
+
var signature = extractSignature(goalStruct);
|
|
2343
|
+
var tmp_0;
|
|
2344
|
+
if (tmp0_with.k33_1.hasPrimitive(signature)) {
|
|
2345
|
+
var childContext = createChild$default(tmp0_with, false, 1, null);
|
|
2346
|
+
var tmp_1;
|
|
2347
|
+
try {
|
|
2348
|
+
var request = toRequest(childContext, goalStruct, signature, this.i38());
|
|
2349
|
+
var tmp0_elvis_lhs = tmp0_with.k33_1.h2e().a3(signature);
|
|
2350
|
+
var tmp_2;
|
|
2351
|
+
if (tmp0_elvis_lhs == null) {
|
|
2352
|
+
throw IllegalStateException_init_$Create$('Inconsistent behaviour of Library.contains and Library.get');
|
|
2353
|
+
} else {
|
|
2354
|
+
tmp_2 = tmp0_elvis_lhs;
|
|
2355
|
+
}
|
|
2356
|
+
var primitive = tmp_2;
|
|
2357
|
+
var primitiveExecutions = cursor(primitive.solve(request));
|
|
2358
|
+
tmp_1 = new StatePrimitiveExecution(appendPrimitivesAndChoicePoints(childContext, primitiveExecutions));
|
|
2359
|
+
} catch ($p) {
|
|
2360
|
+
var tmp_3;
|
|
2361
|
+
if ($p instanceof ResolutionException) {
|
|
2362
|
+
tmp_3 = exceptionalState(this, $p.updateLastContext(this.m38(childContext)));
|
|
2363
|
+
} else {
|
|
2364
|
+
throw $p;
|
|
2365
|
+
}
|
|
2366
|
+
tmp_1 = tmp_3;
|
|
2367
|
+
}
|
|
2368
|
+
tmp_0 = tmp_1;
|
|
2369
|
+
} else {
|
|
2370
|
+
var tmp_4 = new Long(0, 0);
|
|
2371
|
+
var tmp_5 = new Long(0, 0);
|
|
2372
|
+
var tmp_6 = this.l38();
|
|
2373
|
+
tmp_0 = new StateRuleSelection(this.u39_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_4, tmp_5, null, null, 0, tmp_6, null, 3145727, null));
|
|
2374
|
+
}
|
|
2375
|
+
tmp = tmp_0;
|
|
2376
|
+
} else {
|
|
2377
|
+
var tmp_7 = Companion_getInstance_16();
|
|
2378
|
+
var tmp1_safe_receiver = this.u39_1.i33_1;
|
|
2379
|
+
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : extractSignature(tmp1_safe_receiver);
|
|
2380
|
+
var tmp_8;
|
|
2381
|
+
if (tmp2_elvis_lhs == null) {
|
|
2382
|
+
tmp_8 = Signature_init_$Create$('?-', 1, false, 4, null);
|
|
2383
|
+
} else {
|
|
2384
|
+
tmp_8 = tmp2_elvis_lhs;
|
|
2385
|
+
}
|
|
2386
|
+
tmp = exceptionalState(this, tmp_7.forGoal(this.u39_1, tmp_8, Expected_CALLABLE_getInstance(), goal));
|
|
2387
|
+
}
|
|
2388
|
+
tmp$ret$0 = tmp;
|
|
2389
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2390
|
+
return tmp$ret$1;
|
|
2391
|
+
};
|
|
2392
|
+
StatePrimitiveSelection.prototype.h38 = function (context) {
|
|
2393
|
+
return this.q38(context);
|
|
2394
|
+
};
|
|
2395
|
+
StatePrimitiveSelection.prototype.q38 = function (context) {
|
|
2396
|
+
return new StatePrimitiveSelection(context);
|
|
2397
|
+
};
|
|
2398
|
+
StatePrimitiveSelection.prototype.toString = function () {
|
|
2399
|
+
return 'StatePrimitiveSelection(context=' + this.u39_1 + ')';
|
|
2400
|
+
};
|
|
2401
|
+
StatePrimitiveSelection.prototype.hashCode = function () {
|
|
2402
|
+
return this.u39_1.hashCode();
|
|
2403
|
+
};
|
|
2404
|
+
StatePrimitiveSelection.prototype.equals = function (other) {
|
|
2405
|
+
if (this === other)
|
|
2406
|
+
return true;
|
|
2407
|
+
if (!(other instanceof StatePrimitiveSelection))
|
|
2408
|
+
return false;
|
|
2409
|
+
var tmp0_other_with_cast = other instanceof StatePrimitiveSelection ? other : THROW_CCE();
|
|
2410
|
+
if (!this.u39_1.equals(tmp0_other_with_cast.u39_1))
|
|
2411
|
+
return false;
|
|
2412
|
+
return true;
|
|
2413
|
+
};
|
|
2414
|
+
function _get_failureState__yid9tw($this) {
|
|
2415
|
+
var tmp = Companion_getInstance_9().empty();
|
|
2416
|
+
var tmp_0 = new Long(0, 0);
|
|
2417
|
+
var tmp_1 = new Long(0, 0);
|
|
2418
|
+
var tmp_2 = $this.l38();
|
|
2419
|
+
return new StateBacktracking($this.x39_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, tmp, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 3137535, null));
|
|
2420
|
+
}
|
|
2421
|
+
function StateRuleExecution(context) {
|
|
2422
|
+
AbstractState.call(this, context);
|
|
2423
|
+
this.x39_1 = context;
|
|
2424
|
+
}
|
|
2425
|
+
StateRuleExecution.prototype.j5 = function () {
|
|
2426
|
+
return this.x39_1;
|
|
2427
|
+
};
|
|
2428
|
+
StateRuleExecution.prototype.c38 = function () {
|
|
2429
|
+
var tmp$ret$1;
|
|
2430
|
+
// Inline function 'kotlin.with' call
|
|
2431
|
+
var tmp0_with = this.x39_1;
|
|
2432
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2433
|
+
var tmp$ret$0;
|
|
2434
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateRuleExecution.computeNext.<anonymous>' call
|
|
2435
|
+
tmp$ret$0 = tmp0_with.j33_1.mgu(ensureNotNull(tmp0_with.w36()), ensureNotNull(tmp0_with.v33_1.uq()).ly());
|
|
2436
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2437
|
+
var substitution = tmp$ret$1;
|
|
2438
|
+
var tmp;
|
|
2439
|
+
if (substitution.q12()) {
|
|
2440
|
+
var newSubstitution = this.x39_1.s33_1.plus(substitution).castToUnifier();
|
|
2441
|
+
var subGoals = prepareForExecutionWithUnifier(ensureNotNull(this.x39_1.v33_1.uq()), newSubstitution).my().getSubstituted(newSubstitution, []);
|
|
2442
|
+
var tmp0_$this = this.x39_1;
|
|
2443
|
+
var tmp1_goals = toGoals(subGoals);
|
|
2444
|
+
var tmp2_rules = Companion_getInstance_9().empty();
|
|
2445
|
+
var tmp3_step = this.l38();
|
|
2446
|
+
var tmp_0 = new Long(0, 0);
|
|
2447
|
+
var tmp_1 = new Long(0, 0);
|
|
2448
|
+
tmp = new StateGoalSelection(tmp0_$this.z34(null, null, null, null, null, null, null, null, null, null, newSubstitution, null, tmp1_goals, tmp2_rules, null, tmp_0, tmp_1, null, null, 0, tmp3_step, null, 3132415, null));
|
|
2449
|
+
} else {
|
|
2450
|
+
tmp = _get_failureState__yid9tw(this);
|
|
2451
|
+
}
|
|
2452
|
+
return tmp;
|
|
2453
|
+
};
|
|
2454
|
+
StateRuleExecution.prototype.h38 = function (context) {
|
|
2455
|
+
return this.q38(context);
|
|
2456
|
+
};
|
|
2457
|
+
StateRuleExecution.prototype.q38 = function (context) {
|
|
2458
|
+
return new StateRuleExecution(context);
|
|
2459
|
+
};
|
|
2460
|
+
StateRuleExecution.prototype.toString = function () {
|
|
2461
|
+
return 'StateRuleExecution(context=' + this.x39_1 + ')';
|
|
2462
|
+
};
|
|
2463
|
+
StateRuleExecution.prototype.hashCode = function () {
|
|
2464
|
+
return this.x39_1.hashCode();
|
|
2465
|
+
};
|
|
2466
|
+
StateRuleExecution.prototype.equals = function (other) {
|
|
2467
|
+
if (this === other)
|
|
2468
|
+
return true;
|
|
2469
|
+
if (!(other instanceof StateRuleExecution))
|
|
2470
|
+
return false;
|
|
2471
|
+
var tmp0_other_with_cast = other instanceof StateRuleExecution ? other : THROW_CCE();
|
|
2472
|
+
if (!this.x39_1.equals(tmp0_other_with_cast.x39_1))
|
|
2473
|
+
return false;
|
|
2474
|
+
return true;
|
|
2475
|
+
};
|
|
2476
|
+
function None() {
|
|
2477
|
+
None_instance = this;
|
|
2478
|
+
CutLimit.call(this);
|
|
2479
|
+
this.y39_1 = -1;
|
|
2480
|
+
this.z39_1 = null;
|
|
2481
|
+
}
|
|
2482
|
+
None.prototype.a3a = function () {
|
|
2483
|
+
return this.y39_1;
|
|
2484
|
+
};
|
|
2485
|
+
None.prototype.q1u = function () {
|
|
2486
|
+
return this.z39_1;
|
|
2487
|
+
};
|
|
2488
|
+
None.prototype.b3a = function () {
|
|
2489
|
+
return true;
|
|
2490
|
+
};
|
|
2491
|
+
var None_instance;
|
|
2492
|
+
function None_getInstance() {
|
|
2493
|
+
if (None_instance == null)
|
|
2494
|
+
new None();
|
|
2495
|
+
return None_instance;
|
|
2496
|
+
}
|
|
2497
|
+
function Actual(depthToCut, procedure) {
|
|
2498
|
+
CutLimit.call(this);
|
|
2499
|
+
this.c3a_1 = depthToCut;
|
|
2500
|
+
this.d3a_1 = procedure;
|
|
2501
|
+
}
|
|
2502
|
+
Actual.prototype.a3a = function () {
|
|
2503
|
+
return this.c3a_1;
|
|
2504
|
+
};
|
|
2505
|
+
Actual.prototype.q1u = function () {
|
|
2506
|
+
return this.d3a_1;
|
|
2507
|
+
};
|
|
2508
|
+
function CutLimit() {
|
|
2509
|
+
}
|
|
2510
|
+
CutLimit.prototype.b3a = function () {
|
|
2511
|
+
return false;
|
|
2512
|
+
};
|
|
2513
|
+
function Companion_0() {
|
|
2514
|
+
Companion_instance_0 = this;
|
|
2515
|
+
this.e3a_1 = Catch_getInstance().signature;
|
|
2516
|
+
var tmp = this;
|
|
2517
|
+
var tmp_0 = Signature_init_$Create$(',', 2, false, 4, null);
|
|
2518
|
+
var tmp_1 = Signature_init_$Create$(';', 2, false, 4, null);
|
|
2519
|
+
tmp.f3a_1 = setOf([tmp_0, tmp_1, Signature_init_$Create$('->', 2, false, 4, null)]);
|
|
2520
|
+
}
|
|
2521
|
+
var Companion_instance_0;
|
|
2522
|
+
function Companion_getInstance_23() {
|
|
2523
|
+
if (Companion_instance_0 == null)
|
|
2524
|
+
new Companion_0();
|
|
2525
|
+
return Companion_instance_0;
|
|
2526
|
+
}
|
|
2527
|
+
function _get_failureState__yid9tw_0($this) {
|
|
2528
|
+
var tmp = new Long(0, 0);
|
|
2529
|
+
var tmp_0 = new Long(0, 0);
|
|
2530
|
+
var tmp_1 = $this.l38();
|
|
2531
|
+
return new StateBacktracking($this.i3a_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp, tmp_0, null, null, 0, tmp_1, null, 3145727, null));
|
|
2532
|
+
}
|
|
2533
|
+
function exceptionalState_0($this, exception) {
|
|
2534
|
+
var tmp = new Long(0, 0);
|
|
2535
|
+
var tmp_0 = new Long(0, 0);
|
|
2536
|
+
var tmp_1 = $this.l38();
|
|
2537
|
+
return new StateException(exception, $this.i3a_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp, tmp_0, null, null, 0, tmp_1, null, 3145727, null));
|
|
2538
|
+
}
|
|
2539
|
+
function missingProcedure($this, ruleSources, missing) {
|
|
2540
|
+
var unknown = $this.i3a_1.l33_1.get(Unknown_getInstance());
|
|
2541
|
+
var tmp;
|
|
2542
|
+
if (equals(unknown, Unknown_getInstance().s29_1)) {
|
|
2543
|
+
tmp = _get_failureState__yid9tw_0($this);
|
|
2544
|
+
} else {
|
|
2545
|
+
var tmp_0;
|
|
2546
|
+
var tmp$ret$1;
|
|
2547
|
+
$l$block: {
|
|
2548
|
+
// Inline function 'kotlin.sequences.none' call
|
|
2549
|
+
var tmp0_iterator = ruleSources.j();
|
|
2550
|
+
while (tmp0_iterator.m()) {
|
|
2551
|
+
var element = tmp0_iterator.p();
|
|
2552
|
+
var tmp$ret$0;
|
|
2553
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateRuleSelection.missingProcedure.<anonymous>' call
|
|
2554
|
+
tmp$ret$0 = element.containsIndicator(missing.toIndicator());
|
|
2555
|
+
if (tmp$ret$0) {
|
|
2556
|
+
tmp$ret$1 = false;
|
|
2557
|
+
break $l$block;
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
tmp$ret$1 = true;
|
|
2561
|
+
}
|
|
2562
|
+
if (tmp$ret$1) {
|
|
2563
|
+
var tmp0_subject = unknown;
|
|
2564
|
+
var tmp_1;
|
|
2565
|
+
if (equals(tmp0_subject, Unknown_getInstance().q29_1)) {
|
|
2566
|
+
tmp_1 = exceptionalState_0($this, Companion_getInstance_18().forProcedure($this.i3a_1, missing));
|
|
2567
|
+
} else if (equals(tmp0_subject, Unknown_getInstance().r29_1)) {
|
|
2568
|
+
var tmp$ret$2;
|
|
2569
|
+
// Inline function 'kotlin.also' call
|
|
2570
|
+
var tmp0_also = _get_failureState__yid9tw_0($this);
|
|
2571
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2572
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateRuleSelection.missingProcedure.<anonymous>' call
|
|
2573
|
+
$this.i3a_1.o1v().write(MissingPredicate_init_$Create$($this.i3a_1, missing));
|
|
2574
|
+
tmp$ret$2 = tmp0_also;
|
|
2575
|
+
tmp_1 = tmp$ret$2;
|
|
2576
|
+
} else {
|
|
2577
|
+
tmp_1 = _get_failureState__yid9tw_0($this);
|
|
2578
|
+
}
|
|
2579
|
+
tmp_0 = tmp_1;
|
|
2580
|
+
} else {
|
|
2581
|
+
tmp_0 = _get_failureState__yid9tw_0($this);
|
|
2582
|
+
}
|
|
2583
|
+
tmp = tmp_0;
|
|
2584
|
+
}
|
|
2585
|
+
return tmp;
|
|
2586
|
+
}
|
|
2587
|
+
function _get_ignoreState__t4wl8y($this) {
|
|
2588
|
+
var tmp = $this.i3a_1.u33_1.tq();
|
|
2589
|
+
var tmp_0 = new Long(0, 0);
|
|
2590
|
+
var tmp_1 = new Long(0, 0);
|
|
2591
|
+
var tmp_2 = $this.l38();
|
|
2592
|
+
return new StateGoalSelection($this.i3a_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, tmp, null, null, tmp_0, tmp_1, null, null, 0, tmp_2, null, 3141631, null));
|
|
2593
|
+
}
|
|
2594
|
+
function isCut(_this__u8e3s4, $this) {
|
|
2595
|
+
return _this__u8e3s4.aw() ? _this__u8e3s4.castToAtom().b1() === '!' : false;
|
|
2596
|
+
}
|
|
2597
|
+
function computeCutLimit(_this__u8e3s4, $this, magicCut) {
|
|
2598
|
+
var tmp;
|
|
2599
|
+
if (magicCut) {
|
|
2600
|
+
tmp = firstOrNull(_this__u8e3s4.e34_1);
|
|
2601
|
+
} else {
|
|
2602
|
+
var tmp$ret$1;
|
|
2603
|
+
$l$block: {
|
|
2604
|
+
// Inline function 'kotlin.sequences.firstOrNull' call
|
|
2605
|
+
var tmp0_firstOrNull = _this__u8e3s4.e34_1;
|
|
2606
|
+
var tmp0_iterator = tmp0_firstOrNull.j();
|
|
2607
|
+
while (tmp0_iterator.m()) {
|
|
2608
|
+
var element = tmp0_iterator.p();
|
|
2609
|
+
var tmp$ret$0;
|
|
2610
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateRuleSelection.computeCutLimit.<anonymous>' call
|
|
2611
|
+
var tmp_0 = Companion_getInstance_23().f3a_1;
|
|
2612
|
+
var tmp0_safe_receiver = element.i33_1;
|
|
2613
|
+
tmp$ret$0 = !contains_0(tmp_0, tmp0_safe_receiver == null ? null : extractSignature(tmp0_safe_receiver));
|
|
2614
|
+
if (tmp$ret$0) {
|
|
2615
|
+
tmp$ret$1 = element;
|
|
2616
|
+
break $l$block;
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
tmp$ret$1 = null;
|
|
2620
|
+
}
|
|
2621
|
+
tmp = tmp$ret$1;
|
|
2622
|
+
}
|
|
2623
|
+
var cutLimit = tmp;
|
|
2624
|
+
var tmp_1;
|
|
2625
|
+
if (cutLimit == null) {
|
|
2626
|
+
tmp_1 = None_getInstance();
|
|
2627
|
+
} else {
|
|
2628
|
+
tmp_1 = new Actual(cutLimit.b34_1, cutLimit.i33_1);
|
|
2629
|
+
}
|
|
2630
|
+
return tmp_1;
|
|
2631
|
+
}
|
|
2632
|
+
function cutCanBeSkipped($this, cutLimit, executionContext) {
|
|
2633
|
+
return (cutLimit.b3a() ? true : cutLimit.a3a() > executionContext.b34_1) ? true : cutLimit.a3a() === executionContext.b34_1 ? !equals(cutLimit.q1u(), executionContext.i33_1) : false;
|
|
2634
|
+
}
|
|
2635
|
+
function performCut(_this__u8e3s4, $this, cutLimit) {
|
|
2636
|
+
var tmp;
|
|
2637
|
+
if (_this__u8e3s4 === null) {
|
|
2638
|
+
tmp = null;
|
|
2639
|
+
} else if (cutCanBeSkipped($this, cutLimit, ensureNotNull(_this__u8e3s4.u34()))) {
|
|
2640
|
+
tmp = _this__u8e3s4;
|
|
2641
|
+
} else {
|
|
2642
|
+
var tmp_0 = _this__u8e3s4.h35();
|
|
2643
|
+
var cutCandidates = filter(tmp_0, StateRuleSelection$performCut$lambda(cutLimit));
|
|
2644
|
+
var tmp_1;
|
|
2645
|
+
if (any(cutCandidates)) {
|
|
2646
|
+
var tmp$ret$1;
|
|
2647
|
+
$l$block: {
|
|
2648
|
+
// Inline function 'kotlin.sequences.firstOrNull' call
|
|
2649
|
+
var tmp0_iterator = cutCandidates.j();
|
|
2650
|
+
while (tmp0_iterator.m()) {
|
|
2651
|
+
var element = tmp0_iterator.p();
|
|
2652
|
+
var tmp$ret$0;
|
|
2653
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateRuleSelection.performCut.<anonymous>' call
|
|
2654
|
+
tmp$ret$0 = ensureNotNull(element.u34()).b34_1 <= cutLimit.a3a();
|
|
2655
|
+
if (tmp$ret$0) {
|
|
2656
|
+
tmp$ret$1 = element;
|
|
2657
|
+
break $l$block;
|
|
2658
|
+
}
|
|
2659
|
+
}
|
|
2660
|
+
tmp$ret$1 = null;
|
|
2661
|
+
}
|
|
2662
|
+
var tmp0_safe_receiver = tmp$ret$1;
|
|
2663
|
+
tmp_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v34();
|
|
2664
|
+
} else {
|
|
2665
|
+
tmp_1 = _this__u8e3s4;
|
|
2666
|
+
}
|
|
2667
|
+
tmp = tmp_1;
|
|
2668
|
+
}
|
|
2669
|
+
return tmp;
|
|
2670
|
+
}
|
|
2671
|
+
function _get_isTailRecursive__h5eso7(_this__u8e3s4, $this) {
|
|
2672
|
+
var tmp;
|
|
2673
|
+
if (_this__u8e3s4.u33_1.tq().wq() ? equals(_this__u8e3s4.l33_1.get(LastCallOptimization_getInstance()), LastCallOptimization_getInstance().f29_1) : false) {
|
|
2674
|
+
var tmp$ret$3;
|
|
2675
|
+
// Inline function 'kotlin.let' call
|
|
2676
|
+
var tmp0_let = ensureNotNull(_this__u8e3s4.w36());
|
|
2677
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2678
|
+
var tmp$ret$2;
|
|
2679
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateRuleSelection.<get-isTailRecursive>.<anonymous>' call
|
|
2680
|
+
var tmp0_safe_receiver = tmp0_let.asStruct();
|
|
2681
|
+
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : extractSignature(tmp0_safe_receiver);
|
|
2682
|
+
var tmp_0;
|
|
2683
|
+
if (tmp1_safe_receiver == null) {
|
|
2684
|
+
tmp_0 = null;
|
|
2685
|
+
} else {
|
|
2686
|
+
var tmp$ret$1;
|
|
2687
|
+
// Inline function 'kotlin.let' call
|
|
2688
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2689
|
+
var tmp$ret$0;
|
|
2690
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateRuleSelection.<get-isTailRecursive>.<anonymous>.<anonymous>' call
|
|
2691
|
+
var tmp_1;
|
|
2692
|
+
var tmp0_safe_receiver_0 = _this__u8e3s4.i33_1;
|
|
2693
|
+
if (equals(tmp1_safe_receiver, tmp0_safe_receiver_0 == null ? null : extractSignature(tmp0_safe_receiver_0))) {
|
|
2694
|
+
tmp_1 = !equals(tmp1_safe_receiver, Companion_getInstance_23().e3a_1);
|
|
2695
|
+
} else {
|
|
2696
|
+
tmp_1 = false;
|
|
2697
|
+
}
|
|
2698
|
+
tmp$ret$0 = tmp_1;
|
|
2699
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2700
|
+
tmp_0 = tmp$ret$1;
|
|
2701
|
+
}
|
|
2702
|
+
var tmp2_elvis_lhs = tmp_0;
|
|
2703
|
+
tmp$ret$2 = tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs;
|
|
2704
|
+
tmp$ret$3 = tmp$ret$2;
|
|
2705
|
+
tmp = tmp$ret$3;
|
|
2706
|
+
} else {
|
|
2707
|
+
tmp = false;
|
|
2708
|
+
}
|
|
2709
|
+
return tmp;
|
|
2710
|
+
}
|
|
2711
|
+
function selectClauses(_this__u8e3s4, $this, term) {
|
|
2712
|
+
var tmp$ret$1;
|
|
2713
|
+
// Inline function 'kotlin.let' call
|
|
2714
|
+
var tmp = _this__u8e3s4.getByHead(term);
|
|
2715
|
+
var tmp0_let = ensureRules(map(tmp, StateRuleSelection$selectClauses$lambda));
|
|
2716
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2717
|
+
var tmp$ret$0;
|
|
2718
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateRuleSelection.selectClauses.<anonymous>' call
|
|
2719
|
+
var tmp_0;
|
|
2720
|
+
if (_this__u8e3s4.a1t()) {
|
|
2721
|
+
tmp_0 = buffered(tmp0_let);
|
|
2722
|
+
} else {
|
|
2723
|
+
tmp_0 = tmp0_let;
|
|
2724
|
+
}
|
|
2725
|
+
tmp$ret$0 = tmp_0;
|
|
2726
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2727
|
+
return tmp$ret$1;
|
|
2728
|
+
}
|
|
2729
|
+
function StateRuleSelection$performCut$lambda($cutLimit) {
|
|
2730
|
+
return function (it) {
|
|
2731
|
+
return equals(ensureNotNull(it.u34()).i33_1, $cutLimit.q1u());
|
|
2732
|
+
};
|
|
2733
|
+
}
|
|
2734
|
+
function StateRuleSelection$computeNext$lambda(this$0, $currentGoalStruct) {
|
|
2735
|
+
return function (it) {
|
|
2736
|
+
return selectClauses(it, this$0, $currentGoalStruct);
|
|
2737
|
+
};
|
|
2738
|
+
}
|
|
2739
|
+
function StateRuleSelection$selectClauses$lambda(it) {
|
|
2740
|
+
return it.iw();
|
|
2741
|
+
}
|
|
2742
|
+
function StateRuleSelection(context) {
|
|
2743
|
+
Companion_getInstance_23();
|
|
2744
|
+
AbstractState.call(this, context);
|
|
2745
|
+
this.i3a_1 = context;
|
|
2746
|
+
}
|
|
2747
|
+
StateRuleSelection.prototype.j5 = function () {
|
|
2748
|
+
return this.i3a_1;
|
|
2749
|
+
};
|
|
2750
|
+
StateRuleSelection.prototype.c38 = function () {
|
|
2751
|
+
var currentGoal = ensureNotNull(this.i3a_1.w36());
|
|
2752
|
+
var tmp;
|
|
2753
|
+
if (currentGoal.bx()) {
|
|
2754
|
+
tmp = exceptionalState_0(this, Companion_getInstance_17().forGoal(this.i3a_1, extractSignature(ensureNotNull(this.i3a_1.i33_1)), currentGoal.castToVar()));
|
|
2755
|
+
} else if (currentGoal.lw()) {
|
|
2756
|
+
var tmp$ret$5;
|
|
2757
|
+
// Inline function 'kotlin.with' call
|
|
2758
|
+
var tmp0_with = this.i3a_1;
|
|
2759
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2760
|
+
var tmp$ret$4;
|
|
2761
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateRuleSelection.computeNext.<anonymous>' call
|
|
2762
|
+
var currentGoalStruct = currentGoal.castToStruct();
|
|
2763
|
+
var ruleSources = sequenceOf([tmp0_with.k33_1.asTheory(tmp0_with.j33_1), tmp0_with.m33_1, tmp0_with.n33_1]);
|
|
2764
|
+
var tmp_0;
|
|
2765
|
+
if (currentGoalStruct.cx()) {
|
|
2766
|
+
var tmp_1;
|
|
2767
|
+
if (currentGoalStruct.dw()) {
|
|
2768
|
+
tmp_1 = _get_ignoreState__t4wl8y(this);
|
|
2769
|
+
} else {
|
|
2770
|
+
tmp_1 = _get_failureState__yid9tw_0(this);
|
|
2771
|
+
}
|
|
2772
|
+
tmp_0 = tmp_1;
|
|
2773
|
+
} else {
|
|
2774
|
+
if (isCut(currentGoalStruct, this)) {
|
|
2775
|
+
var cutLimit = computeCutLimit(tmp0_with, this, currentGoalStruct instanceof MagicCut);
|
|
2776
|
+
var tmp$ret$1;
|
|
2777
|
+
// Inline function 'kotlin.let' call
|
|
2778
|
+
var tmp0_let = _get_ignoreState__t4wl8y(this);
|
|
2779
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2780
|
+
var tmp$ret$0;
|
|
2781
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateRuleSelection.computeNext.<anonymous>.<anonymous>' call
|
|
2782
|
+
var tmp_2 = new Long(0, 0);
|
|
2783
|
+
var tmp_3 = new Long(0, 0);
|
|
2784
|
+
var tmp_4 = performCut(tmp0_let.f39_1.z33_1, this, cutLimit);
|
|
2785
|
+
var tmp_5 = new Long(0, 0);
|
|
2786
|
+
tmp$ret$0 = tmp0_let.q38(tmp0_let.f39_1.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, tmp_2, tmp_3, tmp_4, null, 0, tmp_5, null, 4063231, null));
|
|
2787
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2788
|
+
tmp_0 = tmp$ret$1;
|
|
2789
|
+
} else {
|
|
2790
|
+
var tmp$ret$3;
|
|
2791
|
+
$l$block: {
|
|
2792
|
+
// Inline function 'kotlin.sequences.any' call
|
|
2793
|
+
var tmp0_iterator = ruleSources.j();
|
|
2794
|
+
while (tmp0_iterator.m()) {
|
|
2795
|
+
var element = tmp0_iterator.p();
|
|
2796
|
+
var tmp$ret$2;
|
|
2797
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.fsm.StateRuleSelection.computeNext.<anonymous>.<anonymous>' call
|
|
2798
|
+
tmp$ret$2 = element.containsHead(currentGoalStruct);
|
|
2799
|
+
if (tmp$ret$2) {
|
|
2800
|
+
tmp$ret$3 = true;
|
|
2801
|
+
break $l$block;
|
|
2802
|
+
}
|
|
2803
|
+
}
|
|
2804
|
+
tmp$ret$3 = false;
|
|
2805
|
+
}
|
|
2806
|
+
if (tmp$ret$3) {
|
|
2807
|
+
var rules = cursor(flatMap(ruleSources, StateRuleSelection$computeNext$lambda(this, currentGoalStruct)));
|
|
2808
|
+
var tmp_6;
|
|
2809
|
+
if (_get_isTailRecursive__h5eso7(this.i3a_1, this)) {
|
|
2810
|
+
tmp_6 = new StateRuleExecution(replaceWithChildAppendingRulesAndChoicePoints$default(this.i3a_1, rules, false, 2, null));
|
|
2811
|
+
} else {
|
|
2812
|
+
tmp_6 = new StateRuleExecution(createChildAppendingRulesAndChoicePoints$default(this.i3a_1, rules, false, 2, null));
|
|
2813
|
+
}
|
|
2814
|
+
tmp_0 = tmp_6;
|
|
2815
|
+
} else {
|
|
2816
|
+
tmp_0 = missingProcedure(this, ruleSources, extractSignature(currentGoalStruct));
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
tmp$ret$4 = tmp_0;
|
|
2821
|
+
tmp$ret$5 = tmp$ret$4;
|
|
2822
|
+
tmp = tmp$ret$5;
|
|
2823
|
+
} else {
|
|
2824
|
+
tmp = exceptionalState_0(this, Companion_getInstance_16().forGoal(this.i3a_1, extractSignature(ensureNotNull(this.i3a_1.i33_1)), Expected_CALLABLE_getInstance(), currentGoal));
|
|
2825
|
+
}
|
|
2826
|
+
return tmp;
|
|
2827
|
+
};
|
|
2828
|
+
StateRuleSelection.prototype.h38 = function (context) {
|
|
2829
|
+
return this.q38(context);
|
|
2830
|
+
};
|
|
2831
|
+
StateRuleSelection.prototype.q38 = function (context) {
|
|
2832
|
+
return new StateRuleSelection(context);
|
|
2833
|
+
};
|
|
2834
|
+
StateRuleSelection.prototype.toString = function () {
|
|
2835
|
+
return 'StateRuleSelection(context=' + this.i3a_1 + ')';
|
|
2836
|
+
};
|
|
2837
|
+
StateRuleSelection.prototype.hashCode = function () {
|
|
2838
|
+
return this.i3a_1.hashCode();
|
|
2839
|
+
};
|
|
2840
|
+
StateRuleSelection.prototype.equals = function (other) {
|
|
2841
|
+
if (this === other)
|
|
2842
|
+
return true;
|
|
2843
|
+
if (!(other instanceof StateRuleSelection))
|
|
2844
|
+
return false;
|
|
2845
|
+
var tmp0_other_with_cast = other instanceof StateRuleSelection ? other : THROW_CCE();
|
|
2846
|
+
if (!this.i3a_1.equals(tmp0_other_with_cast.i3a_1))
|
|
2847
|
+
return false;
|
|
2848
|
+
return true;
|
|
2849
|
+
};
|
|
2850
|
+
function appendRulesAndChoicePoints(_this__u8e3s4, rules) {
|
|
2851
|
+
var tmp;
|
|
2852
|
+
if (rules.vq()) {
|
|
2853
|
+
tmp = appendRules(_this__u8e3s4.z33_1, rules.tq(), _this__u8e3s4);
|
|
2854
|
+
} else {
|
|
2855
|
+
tmp = appendRules(_this__u8e3s4.z33_1, Companion_getInstance_9().empty(), _this__u8e3s4);
|
|
2856
|
+
}
|
|
2857
|
+
var newChoicePointContext = tmp;
|
|
2858
|
+
var tmp_0 = new Long(0, 0);
|
|
2859
|
+
var tmp_1 = new Long(0, 0);
|
|
2860
|
+
var tmp_2 = new Long(0, 0);
|
|
2861
|
+
return _this__u8e3s4.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, rules, null, tmp_0, tmp_1, newChoicePointContext, null, 0, tmp_2, null, 4055039, null);
|
|
2862
|
+
}
|
|
2863
|
+
function toGoals(_this__u8e3s4) {
|
|
2864
|
+
var tmp = unfoldGoals(_this__u8e3s4);
|
|
2865
|
+
return cursor(map(tmp, toGoals$lambda));
|
|
2866
|
+
}
|
|
2867
|
+
function unfoldGoals(_this__u8e3s4) {
|
|
2868
|
+
var tmp;
|
|
2869
|
+
if (_this__u8e3s4.qw()) {
|
|
2870
|
+
var tmp_0 = _this__u8e3s4.castToTuple().ju();
|
|
2871
|
+
tmp = flatMap(tmp_0, unfoldGoals$lambda);
|
|
2872
|
+
} else {
|
|
2873
|
+
tmp = sequenceOf([_this__u8e3s4]);
|
|
2874
|
+
}
|
|
2875
|
+
return tmp;
|
|
2876
|
+
}
|
|
2877
|
+
function createChild(_this__u8e3s4, inferProcedureFromGoals) {
|
|
2878
|
+
var currentGoal = ensureNotNull(_this__u8e3s4.w36()).castToStruct();
|
|
2879
|
+
var tmp0_goals = toGoals(currentGoal);
|
|
2880
|
+
var tmp1_procedure = inferProcedureFromGoals ? currentGoal : _this__u8e3s4.i33_1;
|
|
2881
|
+
var tmp2_depth = _this__u8e3s4.b34_1 + 1 | 0;
|
|
2882
|
+
var tmp$ret$0;
|
|
2883
|
+
// Inline function 'kotlin.Long.plus' call
|
|
2884
|
+
var tmp0_plus = _this__u8e3s4.c34_1;
|
|
2885
|
+
tmp$ret$0 = tmp0_plus.bh(new Long(1, 0));
|
|
2886
|
+
var tmp3_step = tmp$ret$0;
|
|
2887
|
+
var tmp4_relevantVariables = emptySet();
|
|
2888
|
+
var tmp = new Long(0, 0);
|
|
2889
|
+
var tmp_0 = new Long(0, 0);
|
|
2890
|
+
return _this__u8e3s4.z34(tmp1_procedure, null, null, null, null, null, null, null, null, null, null, null, tmp0_goals, null, null, tmp, tmp_0, null, _this__u8e3s4, tmp2_depth, tmp3_step, tmp4_relevantVariables, 258046, null);
|
|
2891
|
+
}
|
|
2892
|
+
function createChild$default(_this__u8e3s4, inferProcedureFromGoals, $mask0, $handler) {
|
|
2893
|
+
if (!(($mask0 & 1) === 0))
|
|
2894
|
+
inferProcedureFromGoals = true;
|
|
2895
|
+
return createChild(_this__u8e3s4, inferProcedureFromGoals);
|
|
2896
|
+
}
|
|
2897
|
+
function toRequest(_this__u8e3s4, goal, signature, startTime) {
|
|
2898
|
+
var tmp = goal.gw();
|
|
2899
|
+
return Request_init_$Create$(signature, tmp, _this__u8e3s4, startTime, new Long(0, 0), 16, null);
|
|
2900
|
+
}
|
|
2901
|
+
function appendPrimitivesAndChoicePoints(_this__u8e3s4, primitiveExecutions) {
|
|
2902
|
+
var tmp;
|
|
2903
|
+
if (primitiveExecutions.vq()) {
|
|
2904
|
+
tmp = appendPrimitives(_this__u8e3s4.z33_1, primitiveExecutions.tq(), _this__u8e3s4);
|
|
2905
|
+
} else {
|
|
2906
|
+
tmp = appendPrimitives(_this__u8e3s4.z33_1, Companion_getInstance_9().empty(), _this__u8e3s4);
|
|
2907
|
+
}
|
|
2908
|
+
var newChoicePointContext = tmp;
|
|
2909
|
+
var tmp_0 = new Long(0, 0);
|
|
2910
|
+
var tmp_1 = new Long(0, 0);
|
|
2911
|
+
var tmp_2 = new Long(0, 0);
|
|
2912
|
+
return _this__u8e3s4.z34(null, null, null, null, null, null, null, null, null, null, null, null, null, null, primitiveExecutions, tmp_0, tmp_1, newChoicePointContext, null, 0, tmp_2, null, 4046847, null);
|
|
2913
|
+
}
|
|
2914
|
+
function replaceWithChildAppendingRulesAndChoicePoints(_this__u8e3s4, rules, inferProcedureFromGoals) {
|
|
2915
|
+
var tempExecutionContext = replaceWithChild(_this__u8e3s4, inferProcedureFromGoals);
|
|
2916
|
+
return appendRulesAndChoicePoints(tempExecutionContext, rules);
|
|
2917
|
+
}
|
|
2918
|
+
function replaceWithChildAppendingRulesAndChoicePoints$default(_this__u8e3s4, rules, inferProcedureFromGoals, $mask0, $handler) {
|
|
2919
|
+
if (!(($mask0 & 2) === 0))
|
|
2920
|
+
inferProcedureFromGoals = true;
|
|
2921
|
+
return replaceWithChildAppendingRulesAndChoicePoints(_this__u8e3s4, rules, inferProcedureFromGoals);
|
|
2922
|
+
}
|
|
2923
|
+
function createChildAppendingRulesAndChoicePoints(_this__u8e3s4, rules, inferProcedureFromGoals) {
|
|
2924
|
+
var tempExecutionContext = createChild(_this__u8e3s4, inferProcedureFromGoals);
|
|
2925
|
+
return appendRulesAndChoicePoints(tempExecutionContext, rules);
|
|
2926
|
+
}
|
|
2927
|
+
function createChildAppendingRulesAndChoicePoints$default(_this__u8e3s4, rules, inferProcedureFromGoals, $mask0, $handler) {
|
|
2928
|
+
if (!(($mask0 & 2) === 0))
|
|
2929
|
+
inferProcedureFromGoals = true;
|
|
2930
|
+
return createChildAppendingRulesAndChoicePoints(_this__u8e3s4, rules, inferProcedureFromGoals);
|
|
2931
|
+
}
|
|
2932
|
+
function ensureRules(_this__u8e3s4) {
|
|
2933
|
+
return map(_this__u8e3s4, ensureRules$lambda);
|
|
2934
|
+
}
|
|
2935
|
+
function replaceWithChild(_this__u8e3s4, inferProcedureFromGoals) {
|
|
2936
|
+
var currentGoal = ensureNotNull(_this__u8e3s4.w36()).castToStruct();
|
|
2937
|
+
var tmp0_goals = toGoals(currentGoal);
|
|
2938
|
+
var tmp1_procedure = inferProcedureFromGoals ? currentGoal : _this__u8e3s4.i33_1;
|
|
2939
|
+
var tmp2_depth = _this__u8e3s4.b34_1 + 1 | 0;
|
|
2940
|
+
var tmp$ret$0;
|
|
2941
|
+
// Inline function 'kotlin.Long.plus' call
|
|
2942
|
+
var tmp0_plus = _this__u8e3s4.c34_1;
|
|
2943
|
+
tmp$ret$0 = tmp0_plus.bh(new Long(1, 0));
|
|
2944
|
+
var tmp3_step = tmp$ret$0;
|
|
2945
|
+
var tmp = new Long(0, 0);
|
|
2946
|
+
var tmp_0 = new Long(0, 0);
|
|
2947
|
+
return _this__u8e3s4.z34(tmp1_procedure, null, null, null, null, null, null, null, null, null, null, null, tmp0_goals, null, null, tmp, tmp_0, null, null, tmp2_depth, tmp3_step, null, 2617342, null);
|
|
2948
|
+
}
|
|
2949
|
+
function toGoals$lambda(it) {
|
|
2950
|
+
return it.bx() ? Companion_getInstance_11().of('call', [it]) : it;
|
|
2951
|
+
}
|
|
2952
|
+
function unfoldGoals$lambda(it) {
|
|
2953
|
+
return unfoldGoals(it);
|
|
2954
|
+
}
|
|
2955
|
+
function ensureRules$lambda(it) {
|
|
2956
|
+
// Inline function 'kotlin.require' call
|
|
2957
|
+
var tmp0_require = it.nw();
|
|
2958
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2959
|
+
// Inline function 'kotlin.require' call
|
|
2960
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2961
|
+
if (!tmp0_require) {
|
|
2962
|
+
var tmp$ret$0;
|
|
2963
|
+
// Inline function 'kotlin.require.<anonymous>' call
|
|
2964
|
+
tmp$ret$0 = 'Failed requirement.';
|
|
2965
|
+
var message = tmp$ret$0;
|
|
2966
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2967
|
+
}
|
|
2968
|
+
return it.castToRule();
|
|
2969
|
+
}
|
|
2970
|
+
function AbstractSolutionIterator(state) {
|
|
2971
|
+
this.j3a_1 = state;
|
|
2972
|
+
this.k3a_1 = new Long(0, 0);
|
|
2973
|
+
}
|
|
2974
|
+
AbstractSolutionIterator.prototype.m = function () {
|
|
2975
|
+
var tmp$ret$1;
|
|
2976
|
+
// Inline function 'kotlin.let' call
|
|
2977
|
+
var tmp0_let = this.j3a_1;
|
|
2978
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2979
|
+
var tmp$ret$0;
|
|
2980
|
+
// Inline function 'it.unibo.tuprolog.solve.classic.impl.AbstractSolutionIterator.hasNext.<anonymous>' call
|
|
2981
|
+
tmp$ret$0 = !tmp0_let.d38() ? true : tmp0_let.castToEndState().g35();
|
|
2982
|
+
tmp$ret$1 = tmp$ret$0;
|
|
2983
|
+
return tmp$ret$1;
|
|
2984
|
+
};
|
|
2985
|
+
AbstractSolutionIterator.prototype.p = function () {
|
|
2986
|
+
do {
|
|
2987
|
+
var previousState = this.j3a_1;
|
|
2988
|
+
var tmp = this;
|
|
2989
|
+
var tmp_0 = this.j3a_1;
|
|
2990
|
+
var tmp0_this = this;
|
|
2991
|
+
tmp0_this.k3a_1 = tmp0_this.k3a_1.gh();
|
|
2992
|
+
tmp.j3a_1 = this.l3a(tmp_0, tmp0_this.k3a_1);
|
|
2993
|
+
this.onStateTransition(previousState, this.j3a_1, this.k3a_1);
|
|
2994
|
+
}
|
|
2995
|
+
while (!this.j3a_1.d38());
|
|
2996
|
+
return this.j3a_1.castToEndState().h2j().cleanUp();
|
|
2997
|
+
};
|
|
2998
|
+
function SimpleSolutionIterator(state, onStateTransitionCallback) {
|
|
2999
|
+
AbstractSolutionIterator.call(this, state);
|
|
3000
|
+
this.o3a_1 = onStateTransitionCallback;
|
|
3001
|
+
}
|
|
3002
|
+
SimpleSolutionIterator.prototype.l3a = function (state, step) {
|
|
3003
|
+
return state.next();
|
|
3004
|
+
};
|
|
3005
|
+
SimpleSolutionIterator.prototype.p3a = function (source, destination, index) {
|
|
3006
|
+
return this.o3a_1(source, destination, index);
|
|
3007
|
+
};
|
|
3008
|
+
SimpleSolutionIterator.prototype.onStateTransition = function (source, destination, index) {
|
|
3009
|
+
return this.p3a(source, destination, index);
|
|
3010
|
+
};
|
|
3011
|
+
function DefaultBuiltins() {
|
|
3012
|
+
DefaultBuiltins_instance = this;
|
|
3013
|
+
ExtensionLibrary.call(this, CommonBuiltins_getInstance());
|
|
3014
|
+
}
|
|
3015
|
+
DefaultBuiltins.prototype.y2e = function () {
|
|
3016
|
+
return listOf(Throw_getInstance());
|
|
3017
|
+
};
|
|
3018
|
+
DefaultBuiltins.prototype.x2e = function () {
|
|
3019
|
+
return listOf_0([Catch_getInstance(), Call_getInstance(), Comma_getInstance(), Cut_getInstance(), Fail_getInstance(), Success_getInstance()]);
|
|
3020
|
+
};
|
|
3021
|
+
var DefaultBuiltins_instance;
|
|
3022
|
+
function DefaultBuiltins_getInstance() {
|
|
3023
|
+
if (DefaultBuiltins_instance == null)
|
|
3024
|
+
new DefaultBuiltins();
|
|
3025
|
+
return DefaultBuiltins_instance;
|
|
3026
|
+
}
|
|
3027
|
+
function handleError($this, context, error) {
|
|
3028
|
+
var tmp;
|
|
3029
|
+
var tmp_0;
|
|
3030
|
+
var tmp_1;
|
|
3031
|
+
if (isInterface(error, Struct)) {
|
|
3032
|
+
tmp_1 = error.fw() === 'error';
|
|
3033
|
+
} else {
|
|
3034
|
+
tmp_1 = false;
|
|
3035
|
+
}
|
|
3036
|
+
if (tmp_1) {
|
|
3037
|
+
var containsArg = error.zv();
|
|
3038
|
+
tmp_0 = 1 <= containsArg ? containsArg <= 2 : false;
|
|
3039
|
+
} else {
|
|
3040
|
+
tmp_0 = false;
|
|
3041
|
+
}
|
|
3042
|
+
if (tmp_0) {
|
|
3043
|
+
var tmp_2 = Companion_getInstance_20();
|
|
3044
|
+
var tmp_3 = error.get(0);
|
|
3045
|
+
tmp = tmp_2.m25(null, null, context, isInterface(tmp_3, Struct) ? tmp_3 : THROW_CCE(), error.zv() > 1 ? error.get(1) : null, 3, null);
|
|
3046
|
+
} else {
|
|
3047
|
+
var tmp_4 = Companion_getInstance_19();
|
|
3048
|
+
tmp = tmp_4.z26(error, context, null, 4, null);
|
|
3049
|
+
}
|
|
3050
|
+
return tmp;
|
|
3051
|
+
}
|
|
3052
|
+
function Throw() {
|
|
3053
|
+
Throw_instance = this;
|
|
3054
|
+
UnaryPredicate.call(this, 'throw');
|
|
3055
|
+
}
|
|
3056
|
+
Throw.prototype.q2r = function (_this__u8e3s4, first) {
|
|
3057
|
+
var tmp = Companion_getInstance_21().y2f(_this__u8e3s4);
|
|
3058
|
+
var tmp_0 = handleError(this, _this__u8e3s4.context, _this__u8e3s4.arguments.n(0));
|
|
3059
|
+
return sequenceOf([tmp.c2j(tmp_0, null, [], 6, null)]);
|
|
3060
|
+
};
|
|
3061
|
+
Throw.prototype.c2k = function (_this__u8e3s4, first) {
|
|
3062
|
+
return this.q2r(_this__u8e3s4, first);
|
|
3063
|
+
};
|
|
3064
|
+
var Throw_instance;
|
|
3065
|
+
function Throw_getInstance() {
|
|
3066
|
+
if (Throw_instance == null)
|
|
3067
|
+
new Throw();
|
|
3068
|
+
return Throw_instance;
|
|
3069
|
+
}
|
|
3070
|
+
function Call() {
|
|
3071
|
+
Call_instance = this;
|
|
3072
|
+
RuleWrapper_init_$Init$('call', 1, false, 4, null, this);
|
|
3073
|
+
}
|
|
3074
|
+
Call.prototype.g2k = function (_this__u8e3s4) {
|
|
3075
|
+
return _this__u8e3s4.ktListOf([_this__u8e3s4.varOf('G')]);
|
|
3076
|
+
};
|
|
3077
|
+
Call.prototype.h2k = function (_this__u8e3s4) {
|
|
3078
|
+
var tmp$ret$0;
|
|
3079
|
+
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3080
|
+
var tmp0__get_functor__thl4dk = EnsureExecutable_getInstance();
|
|
3081
|
+
tmp$ret$0 = tmp0__get_functor__thl4dk.signature.name;
|
|
3082
|
+
return _this__u8e3s4.tupleOf([_this__u8e3s4.structOf(tmp$ret$0, [_this__u8e3s4.varOf('G')]), _this__u8e3s4.varOf('G')]);
|
|
3083
|
+
};
|
|
3084
|
+
var Call_instance;
|
|
3085
|
+
function Call_getInstance() {
|
|
3086
|
+
if (Call_instance == null)
|
|
3087
|
+
new Call();
|
|
3088
|
+
return Call_instance;
|
|
3089
|
+
}
|
|
3090
|
+
function Catch() {
|
|
3091
|
+
Catch_instance = this;
|
|
3092
|
+
RuleWrapper_init_$Init$('catch', 3, false, 4, null, this);
|
|
3093
|
+
}
|
|
3094
|
+
Catch.prototype.g2k = function (_this__u8e3s4) {
|
|
3095
|
+
return _this__u8e3s4.ktListOf([_this__u8e3s4.varOf('G'), _this__u8e3s4.varOf('E'), _this__u8e3s4.varOf('C')]);
|
|
3096
|
+
};
|
|
3097
|
+
Catch.prototype.h2k = function (_this__u8e3s4) {
|
|
3098
|
+
return _this__u8e3s4.varOf('G');
|
|
3099
|
+
};
|
|
3100
|
+
var Catch_instance;
|
|
3101
|
+
function Catch_getInstance() {
|
|
3102
|
+
if (Catch_instance == null)
|
|
3103
|
+
new Catch();
|
|
3104
|
+
return Catch_instance;
|
|
3105
|
+
}
|
|
3106
|
+
function Comma() {
|
|
3107
|
+
Comma_instance = this;
|
|
3108
|
+
RuleWrapper_init_$Init$(',', 2, false, 4, null, this);
|
|
3109
|
+
}
|
|
3110
|
+
Comma.prototype.g2k = function (_this__u8e3s4) {
|
|
3111
|
+
return _this__u8e3s4.ktListOf([_this__u8e3s4.varOf('A'), _this__u8e3s4.varOf('B')]);
|
|
3112
|
+
};
|
|
3113
|
+
Comma.prototype.h2k = function (_this__u8e3s4) {
|
|
3114
|
+
return _this__u8e3s4.tupleOf([_this__u8e3s4.varOf('A'), _this__u8e3s4.varOf('B')]);
|
|
3115
|
+
};
|
|
3116
|
+
var Comma_instance;
|
|
3117
|
+
function Comma_getInstance() {
|
|
3118
|
+
if (Comma_instance == null)
|
|
3119
|
+
new Comma();
|
|
3120
|
+
return Comma_instance;
|
|
3121
|
+
}
|
|
3122
|
+
function Cut() {
|
|
3123
|
+
Cut_instance = this;
|
|
3124
|
+
RuleWrapper_init_$Init$('!', 0, false, 4, null, this);
|
|
3125
|
+
}
|
|
3126
|
+
var Cut_instance;
|
|
3127
|
+
function Cut_getInstance() {
|
|
3128
|
+
if (Cut_instance == null)
|
|
3129
|
+
new Cut();
|
|
3130
|
+
return Cut_instance;
|
|
3131
|
+
}
|
|
3132
|
+
function Fail() {
|
|
3133
|
+
Fail_instance = this;
|
|
3134
|
+
NegationAsFailure.call(this);
|
|
3135
|
+
}
|
|
3136
|
+
Fail.prototype.h2k = function (_this__u8e3s4) {
|
|
3137
|
+
var tmp$ret$0;
|
|
3138
|
+
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3139
|
+
var tmp0__get_functor__thl4dk = EnsureExecutable_getInstance();
|
|
3140
|
+
tmp$ret$0 = tmp0__get_functor__thl4dk.signature.name;
|
|
3141
|
+
var tmp = _this__u8e3s4.structOf(tmp$ret$0, [_this__u8e3s4.varOf('X')]);
|
|
3142
|
+
var tmp$ret$1;
|
|
3143
|
+
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3144
|
+
var tmp1__get_functor__4k11yf = Call_getInstance();
|
|
3145
|
+
tmp$ret$1 = tmp1__get_functor__4k11yf.signature.name;
|
|
3146
|
+
return _this__u8e3s4.tupleOf([tmp, _this__u8e3s4.structOf(tmp$ret$1, [_this__u8e3s4.varOf('X')]), MagicCut_getInstance(), _this__u8e3s4.truthOf(false)]);
|
|
3147
|
+
};
|
|
3148
|
+
var Fail_instance;
|
|
3149
|
+
function Fail_getInstance() {
|
|
3150
|
+
if (Fail_instance == null)
|
|
3151
|
+
new Fail();
|
|
3152
|
+
return Fail_instance;
|
|
3153
|
+
}
|
|
3154
|
+
function Success() {
|
|
3155
|
+
Success_instance = this;
|
|
3156
|
+
NegationAsFailure.call(this);
|
|
3157
|
+
}
|
|
3158
|
+
Success.prototype.h2k = function (_this__u8e3s4) {
|
|
3159
|
+
return _this__u8e3s4.truthOf(true);
|
|
3160
|
+
};
|
|
3161
|
+
var Success_instance;
|
|
3162
|
+
function Success_getInstance() {
|
|
3163
|
+
if (Success_instance == null)
|
|
3164
|
+
new Success();
|
|
3165
|
+
return Success_instance;
|
|
3166
|
+
}
|
|
3167
|
+
function Companion_1() {
|
|
3168
|
+
Companion_instance_1 = this;
|
|
3169
|
+
this.p3b_1 = '\\+';
|
|
3170
|
+
this.q3b_1 = 1;
|
|
3171
|
+
}
|
|
3172
|
+
var Companion_instance_1;
|
|
3173
|
+
function Companion_getInstance_24() {
|
|
3174
|
+
if (Companion_instance_1 == null)
|
|
3175
|
+
new Companion_1();
|
|
3176
|
+
return Companion_instance_1;
|
|
3177
|
+
}
|
|
3178
|
+
function NegationAsFailure() {
|
|
3179
|
+
Companion_getInstance_24();
|
|
3180
|
+
Companion_getInstance_24();
|
|
3181
|
+
Companion_getInstance_24();
|
|
3182
|
+
RuleWrapper_init_$Init$('\\+', 1, false, 4, null, this);
|
|
3183
|
+
}
|
|
3184
|
+
NegationAsFailure.prototype.g2k = function (_this__u8e3s4) {
|
|
3185
|
+
return _this__u8e3s4.ktListOf([_this__u8e3s4.varOf('X')]);
|
|
3186
|
+
};
|
|
3187
|
+
//region block: post-declaration
|
|
3188
|
+
AbstractClassicSolver.prototype.x1x = copy$default;
|
|
3189
|
+
AbstractClassicSolver.prototype.solveWithTimeout = solveWithTimeout;
|
|
3190
|
+
AbstractClassicSolver.prototype.solve = solve;
|
|
3191
|
+
AbstractClassicSolver.prototype.solveListWithTimeout = solveListWithTimeout;
|
|
3192
|
+
AbstractClassicSolver.prototype.solveList = solveList;
|
|
3193
|
+
AbstractClassicSolver.prototype.solveListWithOptions = solveListWithOptions;
|
|
3194
|
+
AbstractClassicSolver.prototype.solveOnceWithTimeout = solveOnceWithTimeout;
|
|
3195
|
+
AbstractClassicSolver.prototype.solveOnce = solveOnce;
|
|
3196
|
+
AbstractClassicSolver.prototype.solveOnceWithOptions = solveOnceWithOptions;
|
|
3197
|
+
AbstractClassicSolver.prototype.i1v = get_standardInput;
|
|
3198
|
+
AbstractClassicSolver.prototype.k1v = get_standardOutput;
|
|
3199
|
+
AbstractClassicSolver.prototype.m1v = get_standardError;
|
|
3200
|
+
AbstractClassicSolver.prototype.o1v = get_warnings;
|
|
3201
|
+
ClassicExecutionContext.prototype.v1u = createSolver$default;
|
|
3202
|
+
ClassicExecutionContext.prototype.d1v = createMutableSolver$default;
|
|
3203
|
+
ClassicExecutionContext.prototype.g1v = update$default;
|
|
3204
|
+
ClassicExecutionContext.prototype.i1v = get_standardInput;
|
|
3205
|
+
ClassicExecutionContext.prototype.k1v = get_standardOutput;
|
|
3206
|
+
ClassicExecutionContext.prototype.m1v = get_standardError;
|
|
3207
|
+
ClassicExecutionContext.prototype.o1v = get_warnings;
|
|
3208
|
+
ClassicExecutionContext.prototype.m1u = get_endTime;
|
|
3209
|
+
ClassicExecutionContext.prototype.o1u = get_remainingTime;
|
|
3210
|
+
ClassicExecutionContext.prototype.p1u = get_elapsedTime;
|
|
3211
|
+
ClassicSolver.prototype.x1x = copy$default;
|
|
3212
|
+
ClassicSolver.prototype.solveWithTimeout = solveWithTimeout;
|
|
3213
|
+
ClassicSolver.prototype.solve = solve;
|
|
3214
|
+
ClassicSolver.prototype.solveListWithTimeout = solveListWithTimeout;
|
|
3215
|
+
ClassicSolver.prototype.solveList = solveList;
|
|
3216
|
+
ClassicSolver.prototype.solveListWithOptions = solveListWithOptions;
|
|
3217
|
+
ClassicSolver.prototype.solveOnceWithTimeout = solveOnceWithTimeout;
|
|
3218
|
+
ClassicSolver.prototype.solveOnce = solveOnce;
|
|
3219
|
+
ClassicSolver.prototype.solveOnceWithOptions = solveOnceWithOptions;
|
|
3220
|
+
ClassicSolver.prototype.i1v = get_standardInput;
|
|
3221
|
+
ClassicSolver.prototype.k1v = get_standardOutput;
|
|
3222
|
+
ClassicSolver.prototype.m1v = get_standardError;
|
|
3223
|
+
ClassicSolver.prototype.o1v = get_warnings;
|
|
3224
|
+
ClassicSolverFactory.prototype.u1y = solverOf$default;
|
|
3225
|
+
ClassicSolverFactory.prototype.w1y = solverOf$default_0;
|
|
3226
|
+
ClassicSolverFactory.prototype.a1z = mutableSolverOf$default;
|
|
3227
|
+
ClassicSolverFactory.prototype.e1z = mutableSolverOf$default_0;
|
|
3228
|
+
ClassicSolverFactory.prototype.newBuilder = newBuilder;
|
|
3229
|
+
ClassicSolverFactory.prototype.c1y = get_defaultRuntime;
|
|
3230
|
+
ClassicSolverFactory.prototype.e1y = get_defaultUnificator;
|
|
3231
|
+
ClassicSolverFactory.prototype.f1y = get_defaultFlags;
|
|
3232
|
+
ClassicSolverFactory.prototype.i1y = get_defaultStaticKb;
|
|
3233
|
+
ClassicSolverFactory.prototype.j1y = get_defaultDynamicKb;
|
|
3234
|
+
ClassicSolverFactory.prototype.k1y = get_defaultInputChannel;
|
|
3235
|
+
ClassicSolverFactory.prototype.l1y = get_defaultOutputChannel;
|
|
3236
|
+
ClassicSolverFactory.prototype.m1y = get_defaultErrorChannel;
|
|
3237
|
+
ClassicSolverFactory.prototype.n1y = get_defaultWarningsChannel;
|
|
3238
|
+
ClassicSolverFactory.prototype.x1y = solverWithDefaultBuiltins;
|
|
3239
|
+
ClassicSolverFactory.prototype.y1y = solverWithDefaultBuiltins$default;
|
|
3240
|
+
ClassicSolverFactory.prototype.b1z = mutableSolverWithDefaultBuiltins;
|
|
3241
|
+
ClassicSolverFactory.prototype.c1z = mutableSolverWithDefaultBuiltins$default;
|
|
3242
|
+
MutableClassicSolver.prototype.x1x = copy$default;
|
|
3243
|
+
MutableClassicSolver.prototype.solveWithTimeout = solveWithTimeout;
|
|
3244
|
+
MutableClassicSolver.prototype.solve = solve;
|
|
3245
|
+
MutableClassicSolver.prototype.solveListWithTimeout = solveListWithTimeout;
|
|
3246
|
+
MutableClassicSolver.prototype.solveList = solveList;
|
|
3247
|
+
MutableClassicSolver.prototype.solveListWithOptions = solveListWithOptions;
|
|
3248
|
+
MutableClassicSolver.prototype.solveOnceWithTimeout = solveOnceWithTimeout;
|
|
3249
|
+
MutableClassicSolver.prototype.solveOnce = solveOnce;
|
|
3250
|
+
MutableClassicSolver.prototype.solveOnceWithOptions = solveOnceWithOptions;
|
|
3251
|
+
MutableClassicSolver.prototype.i1v = get_standardInput;
|
|
3252
|
+
MutableClassicSolver.prototype.k1v = get_standardOutput;
|
|
3253
|
+
MutableClassicSolver.prototype.m1v = get_standardError;
|
|
3254
|
+
MutableClassicSolver.prototype.o1v = get_warnings;
|
|
3255
|
+
MutableClassicSolver.prototype.loadStaticClauses = loadStaticClauses;
|
|
3256
|
+
MutableClassicSolver.prototype.loadStaticClausesIterable = loadStaticClausesIterable;
|
|
3257
|
+
MutableClassicSolver.prototype.loadStaticClausesSequence = loadStaticClausesSequence;
|
|
3258
|
+
MutableClassicSolver.prototype.loadDynamicClauses = loadDynamicClauses;
|
|
3259
|
+
MutableClassicSolver.prototype.loadDynamicClausesIterable = loadDynamicClausesIterable;
|
|
3260
|
+
MutableClassicSolver.prototype.loadDynamicClausesSequence = loadDynamicClausesSequence;
|
|
3261
|
+
AbstractState.prototype.d38 = get_isEndState;
|
|
3262
|
+
AbstractState.prototype.asEndState = asEndState;
|
|
3263
|
+
AbstractState.prototype.castToEndState = castToEndState;
|
|
3264
|
+
AbstractEndState.prototype.g35 = get_hasOpenAlternatives;
|
|
3265
|
+
AbstractEndState.prototype.d38 = get_isEndState_0;
|
|
3266
|
+
AbstractEndState.prototype.e38 = asEndState_0;
|
|
3267
|
+
AbstractEndState.prototype.castToEndState = castToEndState;
|
|
3268
|
+
StateBacktracking.prototype.d38 = get_isEndState;
|
|
3269
|
+
StateBacktracking.prototype.asEndState = asEndState;
|
|
3270
|
+
StateBacktracking.prototype.castToEndState = castToEndState;
|
|
3271
|
+
StateEnd.prototype.g35 = get_hasOpenAlternatives;
|
|
3272
|
+
StateEnd.prototype.d38 = get_isEndState_0;
|
|
3273
|
+
StateEnd.prototype.e38 = asEndState_0;
|
|
3274
|
+
StateEnd.prototype.castToEndState = castToEndState;
|
|
3275
|
+
StateException.prototype.d38 = get_isEndState;
|
|
3276
|
+
StateException.prototype.asEndState = asEndState;
|
|
3277
|
+
StateException.prototype.castToEndState = castToEndState;
|
|
3278
|
+
StateGoalSelection.prototype.d38 = get_isEndState;
|
|
3279
|
+
StateGoalSelection.prototype.asEndState = asEndState;
|
|
3280
|
+
StateGoalSelection.prototype.castToEndState = castToEndState;
|
|
3281
|
+
StateHalt.prototype.d38 = get_isEndState_0;
|
|
3282
|
+
StateHalt.prototype.e38 = asEndState_0;
|
|
3283
|
+
StateHalt.prototype.castToEndState = castToEndState;
|
|
3284
|
+
StateHalt.prototype.g35 = get_hasOpenAlternatives;
|
|
3285
|
+
StateInit.prototype.d38 = get_isEndState;
|
|
3286
|
+
StateInit.prototype.asEndState = asEndState;
|
|
3287
|
+
StateInit.prototype.castToEndState = castToEndState;
|
|
3288
|
+
StatePrimitiveExecution.prototype.d38 = get_isEndState;
|
|
3289
|
+
StatePrimitiveExecution.prototype.asEndState = asEndState;
|
|
3290
|
+
StatePrimitiveExecution.prototype.castToEndState = castToEndState;
|
|
3291
|
+
StatePrimitiveSelection.prototype.d38 = get_isEndState;
|
|
3292
|
+
StatePrimitiveSelection.prototype.asEndState = asEndState;
|
|
3293
|
+
StatePrimitiveSelection.prototype.castToEndState = castToEndState;
|
|
3294
|
+
StateRuleExecution.prototype.d38 = get_isEndState;
|
|
3295
|
+
StateRuleExecution.prototype.asEndState = asEndState;
|
|
3296
|
+
StateRuleExecution.prototype.castToEndState = castToEndState;
|
|
3297
|
+
StateRuleSelection.prototype.d38 = get_isEndState;
|
|
3298
|
+
StateRuleSelection.prototype.asEndState = asEndState;
|
|
3299
|
+
StateRuleSelection.prototype.castToEndState = castToEndState;
|
|
3300
|
+
DefaultBuiltins.prototype.containsSignature = containsSignature;
|
|
3301
|
+
DefaultBuiltins.prototype.containsOperator = containsOperator;
|
|
3302
|
+
DefaultBuiltins.prototype.hasPrimitive = hasPrimitive;
|
|
3303
|
+
DefaultBuiltins.prototype.hasFunction = hasFunction;
|
|
3304
|
+
DefaultBuiltins.prototype.j2e = get_ruleSignatures;
|
|
3305
|
+
DefaultBuiltins.prototype.hasProtected = hasProtected;
|
|
3306
|
+
//endregion
|
|
3307
|
+
//region block: exports
|
|
3308
|
+
function $jsExportAll$(_) {
|
|
3309
|
+
var $it = _.it || (_.it = {});
|
|
3310
|
+
var $it$unibo = $it.unibo || ($it.unibo = {});
|
|
3311
|
+
var $it$unibo$tuprolog = $it$unibo.tuprolog || ($it$unibo.tuprolog = {});
|
|
3312
|
+
var $it$unibo$tuprolog$solve = $it$unibo$tuprolog.solve || ($it$unibo$tuprolog.solve = {});
|
|
3313
|
+
var $it$unibo$tuprolog$solve$classic = $it$unibo$tuprolog$solve.classic || ($it$unibo$tuprolog$solve.classic = {});
|
|
3314
|
+
Object.defineProperty($it$unibo$tuprolog$solve$classic, 'ClassicSolverFactory', {
|
|
3315
|
+
configurable: true,
|
|
3316
|
+
get: ClassicSolverFactory_getInstance
|
|
3317
|
+
});
|
|
3318
|
+
}
|
|
3319
|
+
$jsExportAll$(_);
|
|
3320
|
+
_.$jsExportAll$ = $jsExportAll$;
|
|
3321
|
+
_.$_$ = _.$_$ || {};
|
|
3322
|
+
_.$_$.a = Call_getInstance;
|
|
3323
|
+
_.$_$.b = DefaultBuiltins_getInstance;
|
|
3324
|
+
_.$_$.c = ClassicSolverFactory_getInstance;
|
|
3325
|
+
//endregion
|
|
3326
|
+
return _;
|
|
3327
|
+
}(module.exports, require('./2p-solve.js'), require('./kotlin-kotlin-stdlib-js-ir.js'), require('./2p-theory.js'), require('./2p-unify.js'), require('./2p-core.js'), require('./2p-utils.js')));
|
|
3328
|
+
|
|
3329
|
+
//# sourceMappingURL=2p-solve-classic.js.map
|