@tuprolog/arg2p-core 0.16.5 → 0.16.7
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-core.js +412 -405
- package/2p-core.js.map +1 -1
- package/{2p-solve-classic.js → 2p-solve-prolog.js} +667 -643
- package/2p-solve-prolog.js.map +1 -0
- package/2p-solve.js +2399 -1191
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +81 -81
- package/2p-unify.js +70 -70
- package/2p-unify.js.map +1 -1
- package/2p-utils.js +52 -51
- package/2p-utils.js.map +1 -1
- package/arg2p-core.js +7 -7
- package/kotlin-kotlin-stdlib.js +816 -244
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kt-math.js +165 -164
- package/kt-math.js.map +1 -1
- package/package.json +1 -1
- package/2p-solve-classic.js.map +0 -1
|
@@ -5,24 +5,24 @@
|
|
|
5
5
|
factory(module.exports, require('./2p-unify.js'), require('./kotlin-kotlin-stdlib.js'), require('./2p-solve.js'), require('./2p-theory.js'), require('./2p-utils.js'), require('./2p-core.js'));
|
|
6
6
|
else {
|
|
7
7
|
if (typeof globalThis['2p-unify'] === 'undefined') {
|
|
8
|
-
throw new Error("Error loading module '2p-solve-
|
|
8
|
+
throw new Error("Error loading module '2p-solve-prolog'. Its dependency '2p-unify' was not found. Please, check whether '2p-unify' is loaded prior to '2p-solve-prolog'.");
|
|
9
9
|
}
|
|
10
10
|
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
11
|
-
throw new Error("Error loading module '2p-solve-
|
|
11
|
+
throw new Error("Error loading module '2p-solve-prolog'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to '2p-solve-prolog'.");
|
|
12
12
|
}
|
|
13
13
|
if (typeof globalThis['2p-solve'] === 'undefined') {
|
|
14
|
-
throw new Error("Error loading module '2p-solve-
|
|
14
|
+
throw new Error("Error loading module '2p-solve-prolog'. Its dependency '2p-solve' was not found. Please, check whether '2p-solve' is loaded prior to '2p-solve-prolog'.");
|
|
15
15
|
}
|
|
16
16
|
if (typeof globalThis['2p-theory'] === 'undefined') {
|
|
17
|
-
throw new Error("Error loading module '2p-solve-
|
|
17
|
+
throw new Error("Error loading module '2p-solve-prolog'. Its dependency '2p-theory' was not found. Please, check whether '2p-theory' is loaded prior to '2p-solve-prolog'.");
|
|
18
18
|
}
|
|
19
19
|
if (typeof globalThis['2p-utils'] === 'undefined') {
|
|
20
|
-
throw new Error("Error loading module '2p-solve-
|
|
20
|
+
throw new Error("Error loading module '2p-solve-prolog'. Its dependency '2p-utils' was not found. Please, check whether '2p-utils' is loaded prior to '2p-solve-prolog'.");
|
|
21
21
|
}
|
|
22
22
|
if (typeof globalThis['2p-core'] === 'undefined') {
|
|
23
|
-
throw new Error("Error loading module '2p-solve-
|
|
23
|
+
throw new Error("Error loading module '2p-solve-prolog'. Its dependency '2p-core' was not found. Please, check whether '2p-core' is loaded prior to '2p-solve-prolog'.");
|
|
24
24
|
}
|
|
25
|
-
globalThis['2p-solve-
|
|
25
|
+
globalThis['2p-solve-prolog'] = factory(typeof globalThis['2p-solve-prolog'] === 'undefined' ? {} : globalThis['2p-solve-prolog'], globalThis['2p-unify'], globalThis['kotlin-kotlin-stdlib'], globalThis['2p-solve'], globalThis['2p-theory'], globalThis['2p-utils'], globalThis['2p-core']);
|
|
26
26
|
}
|
|
27
27
|
}(function (_, kotlin_it_unibo_tuprolog_unify, kotlin_kotlin, kotlin_it_unibo_tuprolog_solve, kotlin_it_unibo_tuprolog_theory, kotlin_it_unibo_tuprolog_utils, kotlin_it_unibo_tuprolog_core) {
|
|
28
28
|
'use strict';
|
|
@@ -38,56 +38,67 @@
|
|
|
38
38
|
var Companion_instance_3 = kotlin_it_unibo_tuprolog_solve.$_$.d;
|
|
39
39
|
var Companion_instance_4 = kotlin_it_unibo_tuprolog_solve.$_$.c;
|
|
40
40
|
var Companion_instance_5 = kotlin_it_unibo_tuprolog_solve.$_$.e;
|
|
41
|
-
var toString = kotlin_kotlin.$_$.
|
|
41
|
+
var toString = kotlin_kotlin.$_$.r6;
|
|
42
42
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.c1;
|
|
43
43
|
var Unit_instance = kotlin_kotlin.$_$.n;
|
|
44
|
-
var constructCallableReference = kotlin_kotlin.$_$.
|
|
44
|
+
var constructCallableReference = kotlin_kotlin.$_$.t5;
|
|
45
45
|
var AbstractSolver = kotlin_it_unibo_tuprolog_solve.$_$.l1;
|
|
46
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
47
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
48
|
-
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.
|
|
46
|
+
var protoOf = kotlin_kotlin.$_$.o6;
|
|
47
|
+
var THROW_CCE = kotlin_kotlin.$_$.ka;
|
|
48
|
+
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.s4;
|
|
49
49
|
var getAllOperators = kotlin_it_unibo_tuprolog_solve.$_$.z2;
|
|
50
50
|
var toOperatorSet = kotlin_it_unibo_tuprolog_solve.$_$.b3;
|
|
51
51
|
var currentTimeInstant = kotlin_it_unibo_tuprolog_solve.$_$.x2;
|
|
52
|
-
var asSequence = kotlin_kotlin.$_$.
|
|
53
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
54
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
55
|
-
var fromInt = kotlin_kotlin.$_$.
|
|
56
|
-
var add = kotlin_kotlin.$_$.
|
|
57
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
58
|
-
var equals = kotlin_kotlin.$_$.
|
|
59
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
60
|
-
var SequenceScope = kotlin_kotlin.$_$.
|
|
61
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
62
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
63
|
-
var sequence = kotlin_kotlin.$_$.
|
|
64
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
52
|
+
var asSequence = kotlin_kotlin.$_$.k7;
|
|
53
|
+
var initMetadataForClass = kotlin_kotlin.$_$.b6;
|
|
54
|
+
var ensureNotNull = kotlin_kotlin.$_$.oa;
|
|
55
|
+
var fromInt = kotlin_kotlin.$_$.a5;
|
|
56
|
+
var add = kotlin_kotlin.$_$.v4;
|
|
57
|
+
var hashCode = kotlin_kotlin.$_$.a6;
|
|
58
|
+
var equals = kotlin_kotlin.$_$.v5;
|
|
59
|
+
var CoroutineImpl = kotlin_kotlin.$_$.r4;
|
|
60
|
+
var SequenceScope = kotlin_kotlin.$_$.g7;
|
|
61
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.q4;
|
|
62
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.e6;
|
|
63
|
+
var sequence = kotlin_kotlin.$_$.k8;
|
|
64
|
+
var toString_0 = kotlin_kotlin.$_$.va;
|
|
65
|
+
var objectCreate = kotlin_kotlin.$_$.n6;
|
|
66
|
+
var listOf = kotlin_kotlin.$_$.a3;
|
|
67
|
+
var getAllOperators_0 = kotlin_it_unibo_tuprolog_solve.$_$.a3;
|
|
68
|
+
var to = kotlin_kotlin.$_$.wa;
|
|
69
|
+
var loadStaticClauses = kotlin_it_unibo_tuprolog_solve.$_$.f2;
|
|
70
|
+
var loadStaticClausesIterable = kotlin_it_unibo_tuprolog_solve.$_$.g2;
|
|
71
|
+
var loadStaticClausesSequence = kotlin_it_unibo_tuprolog_solve.$_$.h2;
|
|
72
|
+
var loadDynamicClauses = kotlin_it_unibo_tuprolog_solve.$_$.e2;
|
|
73
|
+
var loadDynamicClausesIterable = kotlin_it_unibo_tuprolog_solve.$_$.c2;
|
|
74
|
+
var loadDynamicClausesSequence = kotlin_it_unibo_tuprolog_solve.$_$.d2;
|
|
75
|
+
var MutableSolver = kotlin_it_unibo_tuprolog_solve.$_$.i2;
|
|
65
76
|
var asSequence_0 = kotlin_kotlin.$_$.b2;
|
|
66
|
-
var emptySequence = kotlin_kotlin.$_$.
|
|
67
|
-
var plus = kotlin_kotlin.$_$.
|
|
68
|
-
var KProperty1 = kotlin_kotlin.$_$.
|
|
69
|
-
var getPropertyCallableRef = kotlin_kotlin.$_$.
|
|
70
|
-
var flatMap = kotlin_kotlin.$_$.
|
|
71
|
-
var distinct = kotlin_kotlin.$_$.
|
|
77
|
+
var emptySequence = kotlin_kotlin.$_$.p7;
|
|
78
|
+
var plus = kotlin_kotlin.$_$.h8;
|
|
79
|
+
var KProperty1 = kotlin_kotlin.$_$.f7;
|
|
80
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.y5;
|
|
81
|
+
var flatMap = kotlin_kotlin.$_$.v7;
|
|
82
|
+
var distinct = kotlin_kotlin.$_$.n7;
|
|
72
83
|
var cached = kotlin_it_unibo_tuprolog_utils.$_$.r;
|
|
73
|
-
var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_core.$_$.
|
|
74
|
-
var filter = kotlin_kotlin.$_$.
|
|
75
|
-
var map = kotlin_kotlin.$_$.
|
|
76
|
-
var toList = kotlin_kotlin.$_$.
|
|
84
|
+
var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_core.$_$.o;
|
|
85
|
+
var filter = kotlin_kotlin.$_$.s7;
|
|
86
|
+
var map = kotlin_kotlin.$_$.d8;
|
|
87
|
+
var toList = kotlin_kotlin.$_$.q8;
|
|
77
88
|
var Companion_instance_6 = kotlin_it_unibo_tuprolog_solve.$_$.f;
|
|
78
|
-
var Companion_getInstance_2 = kotlin_it_unibo_tuprolog_core.$_$.
|
|
79
|
-
var Companion_getInstance_3 = kotlin_it_unibo_tuprolog_core.$_$.
|
|
89
|
+
var Companion_getInstance_2 = kotlin_it_unibo_tuprolog_core.$_$.p;
|
|
90
|
+
var Companion_getInstance_3 = kotlin_it_unibo_tuprolog_core.$_$.r;
|
|
80
91
|
var Companion_instance_7 = kotlin_it_unibo_tuprolog_utils.$_$.c;
|
|
81
|
-
var emptySet = kotlin_kotlin.$_$.
|
|
82
|
-
var lazy = kotlin_kotlin.$_$.
|
|
83
|
-
var contains = kotlin_kotlin.$_$.
|
|
92
|
+
var emptySet = kotlin_kotlin.$_$.n2;
|
|
93
|
+
var lazy = kotlin_kotlin.$_$.ra;
|
|
94
|
+
var contains = kotlin_kotlin.$_$.l7;
|
|
84
95
|
var createSolver = kotlin_it_unibo_tuprolog_solve.$_$.x;
|
|
85
96
|
var createMutableSolver = kotlin_it_unibo_tuprolog_solve.$_$.w;
|
|
86
97
|
var update = kotlin_it_unibo_tuprolog_solve.$_$.y;
|
|
87
98
|
var apply = kotlin_it_unibo_tuprolog_solve.$_$.v1;
|
|
88
99
|
var applyIterable = kotlin_it_unibo_tuprolog_solve.$_$.u1;
|
|
89
100
|
var applySequence = kotlin_it_unibo_tuprolog_solve.$_$.w1;
|
|
90
|
-
var getBigIntHashCode = kotlin_kotlin.$_$.
|
|
101
|
+
var getBigIntHashCode = kotlin_kotlin.$_$.w5;
|
|
91
102
|
var get_standardInput = kotlin_it_unibo_tuprolog_solve.$_$.y1;
|
|
92
103
|
var get_standardOutput = kotlin_it_unibo_tuprolog_solve.$_$.z1;
|
|
93
104
|
var get_standardError = kotlin_it_unibo_tuprolog_solve.$_$.x1;
|
|
@@ -96,7 +107,6 @@
|
|
|
96
107
|
var get_remainingTime = kotlin_it_unibo_tuprolog_solve.$_$.t1;
|
|
97
108
|
var get_elapsedTime = kotlin_it_unibo_tuprolog_solve.$_$.r1;
|
|
98
109
|
var ExecutionContext = kotlin_it_unibo_tuprolog_solve.$_$.b2;
|
|
99
|
-
var objectCreate = kotlin_kotlin.$_$.i6;
|
|
100
110
|
var rawSolverOf = kotlin_it_unibo_tuprolog_solve.$_$.d1;
|
|
101
111
|
var solverOf = kotlin_it_unibo_tuprolog_solve.$_$.c1;
|
|
102
112
|
var mutableSolverOf = kotlin_it_unibo_tuprolog_solve.$_$.z;
|
|
@@ -116,38 +126,28 @@
|
|
|
116
126
|
var mutableSolverWithDefaultBuiltins = kotlin_it_unibo_tuprolog_solve.$_$.t2;
|
|
117
127
|
var mutableSolverWithDefaultBuiltinsAnd = kotlin_it_unibo_tuprolog_solve.$_$.b1;
|
|
118
128
|
var SolverFactory = kotlin_it_unibo_tuprolog_solve.$_$.w2;
|
|
119
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
120
|
-
var defineProp = kotlin_kotlin.$_$.
|
|
121
|
-
var
|
|
122
|
-
var getAllOperators_0 = kotlin_it_unibo_tuprolog_solve.$_$.a3;
|
|
123
|
-
var to = kotlin_kotlin.$_$.na;
|
|
124
|
-
var loadStaticClauses = kotlin_it_unibo_tuprolog_solve.$_$.f2;
|
|
125
|
-
var loadStaticClausesIterable = kotlin_it_unibo_tuprolog_solve.$_$.g2;
|
|
126
|
-
var loadStaticClausesSequence = kotlin_it_unibo_tuprolog_solve.$_$.h2;
|
|
127
|
-
var loadDynamicClauses = kotlin_it_unibo_tuprolog_solve.$_$.e2;
|
|
128
|
-
var loadDynamicClausesIterable = kotlin_it_unibo_tuprolog_solve.$_$.c2;
|
|
129
|
-
var loadDynamicClausesSequence = kotlin_it_unibo_tuprolog_solve.$_$.d2;
|
|
130
|
-
var MutableSolver = kotlin_it_unibo_tuprolog_solve.$_$.i2;
|
|
131
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.x5;
|
|
129
|
+
var initMetadataForObject = kotlin_kotlin.$_$.f6;
|
|
130
|
+
var defineProp = kotlin_kotlin.$_$.u5;
|
|
131
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.c6;
|
|
132
132
|
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.i1;
|
|
133
|
-
var subtract = kotlin_kotlin.$_$.
|
|
133
|
+
var subtract = kotlin_kotlin.$_$.i5;
|
|
134
134
|
var TimeOutException_init_$Create$ = kotlin_it_unibo_tuprolog_solve.$_$.g1;
|
|
135
135
|
var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.j1;
|
|
136
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
137
|
-
var getKClass = kotlin_kotlin.$_$.
|
|
136
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.d6;
|
|
137
|
+
var getKClass = kotlin_kotlin.$_$.e7;
|
|
138
138
|
var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.a1;
|
|
139
139
|
var Companion_instance_8 = kotlin_it_unibo_tuprolog_solve.$_$.v;
|
|
140
140
|
var MessageError = kotlin_it_unibo_tuprolog_solve.$_$.i1;
|
|
141
141
|
var Companion_instance_9 = kotlin_it_unibo_tuprolog_solve.$_$.j;
|
|
142
142
|
var plus_0 = kotlin_it_unibo_tuprolog_utils.$_$.h1;
|
|
143
143
|
var LogicError = kotlin_it_unibo_tuprolog_solve.$_$.j1;
|
|
144
|
-
var toSet = kotlin_kotlin.$_$.
|
|
145
|
-
var plus_1 = kotlin_kotlin.$_$.
|
|
144
|
+
var toSet = kotlin_kotlin.$_$.s8;
|
|
145
|
+
var plus_1 = kotlin_kotlin.$_$.q3;
|
|
146
146
|
var TrackVariables_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.o;
|
|
147
|
-
var drop = kotlin_kotlin.$_$.
|
|
148
|
-
var first = kotlin_kotlin.$_$.
|
|
149
|
-
var Unifier = kotlin_it_unibo_tuprolog_core.$_$.
|
|
150
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
147
|
+
var drop = kotlin_kotlin.$_$.o7;
|
|
148
|
+
var first = kotlin_kotlin.$_$.u7;
|
|
149
|
+
var Unifier = kotlin_it_unibo_tuprolog_core.$_$.m1;
|
|
150
|
+
var isInterface = kotlin_kotlin.$_$.i6;
|
|
151
151
|
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.f1;
|
|
152
152
|
var ResolutionException = kotlin_it_unibo_tuprolog_solve.$_$.k1;
|
|
153
153
|
var Companion_instance_10 = kotlin_it_unibo_tuprolog_solve.$_$.k;
|
|
@@ -156,25 +156,25 @@
|
|
|
156
156
|
var Expected_CALLABLE_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.a;
|
|
157
157
|
var cursor = kotlin_it_unibo_tuprolog_utils.$_$.t;
|
|
158
158
|
var Companion_instance_11 = kotlin_it_unibo_tuprolog_solve.$_$.h;
|
|
159
|
-
var prepareForExecutionWithUnifier = kotlin_it_unibo_tuprolog_core.$_$.
|
|
160
|
-
var setOf = kotlin_kotlin.$_$.
|
|
159
|
+
var prepareForExecutionWithUnifier = kotlin_it_unibo_tuprolog_core.$_$.n2;
|
|
160
|
+
var setOf = kotlin_kotlin.$_$.w3;
|
|
161
161
|
var Unknown_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.p;
|
|
162
162
|
var MissingPredicate_init_$Create$ = kotlin_it_unibo_tuprolog_solve.$_$.f1;
|
|
163
163
|
var Companion_instance_12 = kotlin_it_unibo_tuprolog_solve.$_$.g;
|
|
164
164
|
var contains_0 = kotlin_kotlin.$_$.e2;
|
|
165
|
-
var firstOrNull = kotlin_kotlin.$_$.
|
|
166
|
-
var any = kotlin_kotlin.$_$.
|
|
165
|
+
var firstOrNull = kotlin_kotlin.$_$.t7;
|
|
166
|
+
var any = kotlin_kotlin.$_$.i7;
|
|
167
167
|
var LastCallOptimization_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.n;
|
|
168
168
|
var buffered = kotlin_it_unibo_tuprolog_utils.$_$.q;
|
|
169
|
-
var sequenceOf = kotlin_kotlin.$_$.
|
|
169
|
+
var sequenceOf = kotlin_kotlin.$_$.i8;
|
|
170
170
|
var MagicCut = kotlin_it_unibo_tuprolog_solve.$_$.q1;
|
|
171
|
-
var sequenceOf_0 = kotlin_kotlin.$_$.
|
|
171
|
+
var sequenceOf_0 = kotlin_kotlin.$_$.j8;
|
|
172
172
|
var Request = kotlin_it_unibo_tuprolog_solve.$_$.n1;
|
|
173
|
-
var get_ONE = kotlin_kotlin.$_$.
|
|
173
|
+
var get_ONE = kotlin_kotlin.$_$.u4;
|
|
174
174
|
var ExtensionLibrary = kotlin_it_unibo_tuprolog_solve.$_$.m1;
|
|
175
175
|
var CommonBuiltins_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.u;
|
|
176
|
-
var listOf_0 = kotlin_kotlin.$_$.
|
|
177
|
-
var Struct = kotlin_it_unibo_tuprolog_core.$_$.
|
|
176
|
+
var listOf_0 = kotlin_kotlin.$_$.b3;
|
|
177
|
+
var Struct = kotlin_it_unibo_tuprolog_core.$_$.l1;
|
|
178
178
|
var Companion_instance_13 = kotlin_it_unibo_tuprolog_solve.$_$.i;
|
|
179
179
|
var Companion_instance_14 = kotlin_it_unibo_tuprolog_solve.$_$.l;
|
|
180
180
|
var UnaryPredicate = kotlin_it_unibo_tuprolog_solve.$_$.o1;
|
|
@@ -185,16 +185,16 @@
|
|
|
185
185
|
var MagicCut_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.s;
|
|
186
186
|
//endregion
|
|
187
187
|
//region block: pre-declaration
|
|
188
|
-
initMetadataForClass(
|
|
188
|
+
initMetadataForClass(AbstractPrologSolver, 'AbstractPrologSolver', VOID, AbstractSolver);
|
|
189
189
|
initMetadataForClass(ChoicePointContext, 'ChoicePointContext');
|
|
190
190
|
initMetadataForClass(Primitives, 'Primitives', VOID, ChoicePointContext);
|
|
191
191
|
initMetadataForClass(Rules, 'Rules', VOID, ChoicePointContext);
|
|
192
192
|
initMetadataForLambda(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn, CoroutineImpl, VOID, [1]);
|
|
193
|
-
|
|
194
|
-
initMetadataForClass(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
193
|
+
initMetadataForClass(PrologSolver, 'PrologSolver', VOID, AbstractPrologSolver);
|
|
194
|
+
initMetadataForClass(MutablePrologSolver, 'MutablePrologSolver', VOID, PrologSolver, [MutableSolver]);
|
|
195
|
+
initMetadataForLambda(PrologExecutionContext$pathToRoot$slambda, CoroutineImpl, VOID, [1]);
|
|
196
|
+
initMetadataForClass(PrologExecutionContext, 'PrologExecutionContext', VOID, VOID, [ExecutionContext]);
|
|
197
|
+
initMetadataForObject(PrologSolverFactory, 'PrologSolverFactory', VOID, VOID, [SolverFactory]);
|
|
198
198
|
initMetadataForCompanion(Companion);
|
|
199
199
|
function get_isEndState() {
|
|
200
200
|
return false;
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
}
|
|
215
215
|
function clone(context, $super) {
|
|
216
216
|
context = context === VOID ? this.get_context_h02k06_k$() : context;
|
|
217
|
-
return $super === VOID ? this.
|
|
217
|
+
return $super === VOID ? this.clone_vtwevb_k$(context) : $super.clone_vtwevb_k$.call(this, context);
|
|
218
218
|
}
|
|
219
219
|
initMetadataForInterface(State, 'State');
|
|
220
220
|
initMetadataForClass(AbstractState, 'AbstractState', VOID, VOID, [State]);
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
initMetadataForObject(Success, 'Success', VOID, NegationAsFailure);
|
|
260
260
|
initMetadataForCompanion(Companion_1);
|
|
261
261
|
//endregion
|
|
262
|
-
function
|
|
262
|
+
function AbstractPrologSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this) {
|
|
263
263
|
unificator = unificator === VOID ? Companion_getInstance().get_default_qtagd4_k$() : unificator;
|
|
264
264
|
libraries = libraries === VOID ? Companion_instance.empty() : libraries;
|
|
265
265
|
flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
stdErr = stdErr === VOID ? Companion_instance_3.stdErr() : stdErr;
|
|
271
271
|
warnings = warnings === VOID ? Companion_instance_3.warning() : warnings;
|
|
272
272
|
trustKb = trustKb === VOID ? false : trustKb;
|
|
273
|
-
|
|
273
|
+
AbstractPrologSolver.call($this, unificator, libraries, flags, staticKb, dynamicKb, Companion_instance_4.fromStandard_im9cmu_k$(stdIn), Companion_instance_5.fromStandard_rfofsy_k$(stdOut, stdErr, warnings), trustKb);
|
|
274
274
|
return $this;
|
|
275
275
|
}
|
|
276
276
|
function updateCurrentContextAfterStateTransition($this, source, destination, index) {
|
|
@@ -280,16 +280,16 @@
|
|
|
280
280
|
var message = 'Failed requirement.';
|
|
281
281
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
282
282
|
}
|
|
283
|
-
$this.
|
|
283
|
+
$this.set_currentContext_izyel_k$(destination.get_context_h02k06_k$());
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function AbstractPrologSolver$updateCurrentContextAfterStateTransition$ref(p0) {
|
|
286
286
|
return constructCallableReference(function (p0_0, p1, p2) {
|
|
287
287
|
var tmp0 = p0;
|
|
288
288
|
updateCurrentContextAfterStateTransition(tmp0, p0_0, p1, p2);
|
|
289
289
|
return Unit_instance;
|
|
290
|
-
}, 3, 0,
|
|
290
|
+
}, 3, 0, 80, 'updateCurrentContextAfterStateTransition', [p0]);
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function AbstractPrologSolver(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb) {
|
|
293
293
|
unificator = unificator === VOID ? Companion_getInstance().get_default_qtagd4_k$() : unificator;
|
|
294
294
|
libraries = libraries === VOID ? Companion_instance.empty() : libraries;
|
|
295
295
|
flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
|
|
@@ -300,13 +300,13 @@
|
|
|
300
300
|
trustKb = trustKb === VOID ? false : trustKb;
|
|
301
301
|
AbstractSolver.call(this, unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb);
|
|
302
302
|
}
|
|
303
|
-
protoOf(
|
|
303
|
+
protoOf(AbstractPrologSolver).set_currentContext_izyel_k$ = function (_set____db54di) {
|
|
304
304
|
this.currentContext_1 = _set____db54di;
|
|
305
305
|
};
|
|
306
|
-
protoOf(
|
|
307
|
-
return this.
|
|
306
|
+
protoOf(AbstractPrologSolver).set_currentContext_mfj1ib_k$ = function (_set____db54di) {
|
|
307
|
+
return this.set_currentContext_izyel_k$(_set____db54di instanceof PrologExecutionContext ? _set____db54di : THROW_CCE());
|
|
308
308
|
};
|
|
309
|
-
protoOf(
|
|
309
|
+
protoOf(AbstractPrologSolver).get_currentContext_mswz5r_k$ = function () {
|
|
310
310
|
var tmp = this.currentContext_1;
|
|
311
311
|
if (!(tmp == null))
|
|
312
312
|
return tmp;
|
|
@@ -314,10 +314,10 @@
|
|
|
314
314
|
throwUninitializedPropertyAccessException('currentContext');
|
|
315
315
|
}
|
|
316
316
|
};
|
|
317
|
-
protoOf(
|
|
318
|
-
return new
|
|
317
|
+
protoOf(AbstractPrologSolver).initializeContext_l70zgd_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, trustKb) {
|
|
318
|
+
return new PrologExecutionContext(VOID, unificator, libraries, flags, trustKb ? staticKb.toImmutableTheory() : Companion_instance_0.empty(unificator), trustKb ? dynamicKb.toMutableTheory() : Companion_instance_1.empty(unificator), toOperatorSet(getAllOperators(libraries, [])), inputChannels, outputChannels, VOID, VOID, VOID, VOID, VOID, VOID, 0n);
|
|
319
319
|
};
|
|
320
|
-
protoOf(
|
|
320
|
+
protoOf(AbstractPrologSolver).solveImpl_b3jlyn_k$ = function (goal, options) {
|
|
321
321
|
var tmp0_unificator = this.get_unificator_xw6v3j_k$();
|
|
322
322
|
var tmp1_libraries = this.get_libraries_lyf10w_k$();
|
|
323
323
|
var tmp2_flags = this.get_flags_irfhb2_k$();
|
|
@@ -329,12 +329,12 @@
|
|
|
329
329
|
var tmp8_customData = this.get_currentContext_mswz5r_k$().customData_1;
|
|
330
330
|
var tmp9_startTime = currentTimeInstant();
|
|
331
331
|
var tmp10_maxDuration = options.get_timeout_kgpqiw_k$();
|
|
332
|
-
this.
|
|
332
|
+
this.set_currentContext_izyel_k$(new PrologExecutionContext(VOID, tmp0_unificator, tmp1_libraries, tmp2_flags, tmp3_staticKb, tmp4_dynamicKb, tmp5_operators, tmp6_inputChannels, tmp7_outputChannels, tmp8_customData, VOID, goal, VOID, VOID, VOID, tmp9_startTime, tmp10_maxDuration));
|
|
333
333
|
var tmp = new StateInit(this.get_currentContext_mswz5r_k$());
|
|
334
|
-
return asSequence(this.
|
|
334
|
+
return asSequence(this.solutionIterator_3eur09_k$(tmp, AbstractPrologSolver$updateCurrentContextAfterStateTransition$ref(this)));
|
|
335
335
|
};
|
|
336
|
-
protoOf(
|
|
337
|
-
return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof
|
|
336
|
+
protoOf(AbstractPrologSolver).copy = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
337
|
+
return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof AbstractPrologSolver) ? $super : THROW_CCE());
|
|
338
338
|
};
|
|
339
339
|
function Primitives(alternatives, executionContext, parent, depth) {
|
|
340
340
|
ChoicePointContext.call(this, alternatives, executionContext, parent, depth);
|
|
@@ -361,7 +361,7 @@
|
|
|
361
361
|
protoOf(Primitives).get_typeName_s1eeum_k$ = function () {
|
|
362
362
|
return 'Primitives';
|
|
363
363
|
};
|
|
364
|
-
protoOf(Primitives).
|
|
364
|
+
protoOf(Primitives).backtrack_4ek2oe_k$ = function (context) {
|
|
365
365
|
var tmp0_$this = ensureNotNull(this.executionContext_2);
|
|
366
366
|
var tmp1_primitives = this.alternatives_2;
|
|
367
367
|
// Inline function 'kotlin.Long.plus' call
|
|
@@ -376,19 +376,19 @@
|
|
|
376
376
|
var tmp9_outputChannels = context.outputChannels_1;
|
|
377
377
|
var tmp10_libraries = context.libraries_1;
|
|
378
378
|
var tmp11_customData = context.customData_1.discardEphemeral();
|
|
379
|
-
var tempContext = tmp0_$this.copy$
|
|
380
|
-
var nextChoicePointContext = this.copy$
|
|
381
|
-
return tempContext.copy$
|
|
379
|
+
var tempContext = tmp0_$this.copy$default_dhd9rp_k$(VOID, VOID, tmp10_libraries, tmp4_flags, tmp6_staticKb, tmp5_dynamicKb, tmp7_operators, tmp8_inputChannels, tmp9_outputChannels, tmp11_customData, VOID, VOID, VOID, VOID, tmp1_primitives, tmp3_startTime, VOID, VOID, VOID, VOID, tmp2_step);
|
|
380
|
+
var nextChoicePointContext = this.copy$default_dv119p_k$(this.alternatives_2.get_next_wor1vg_k$(), tempContext);
|
|
381
|
+
return tempContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, nextChoicePointContext);
|
|
382
382
|
};
|
|
383
|
-
protoOf(Primitives).
|
|
383
|
+
protoOf(Primitives).copy_t04hxo_k$ = function (alternatives, executionContext, parent, depth) {
|
|
384
384
|
return new Primitives(alternatives, executionContext, parent, depth);
|
|
385
385
|
};
|
|
386
|
-
protoOf(Primitives).copy$
|
|
386
|
+
protoOf(Primitives).copy$default_dv119p_k$ = function (alternatives, executionContext, parent, depth, $super) {
|
|
387
387
|
alternatives = alternatives === VOID ? this.alternatives_2 : alternatives;
|
|
388
388
|
executionContext = executionContext === VOID ? this.executionContext_2 : executionContext;
|
|
389
389
|
parent = parent === VOID ? this.parent_2 : parent;
|
|
390
390
|
depth = depth === VOID ? this.depth_2 : depth;
|
|
391
|
-
return $super === VOID ? this.
|
|
391
|
+
return $super === VOID ? this.copy_t04hxo_k$(alternatives, executionContext, parent, depth) : $super.copy_t04hxo_k$.call(this, alternatives, executionContext, parent, depth);
|
|
392
392
|
};
|
|
393
393
|
protoOf(Primitives).hashCode = function () {
|
|
394
394
|
var result = hashCode(this.alternatives_2);
|
|
@@ -437,7 +437,7 @@
|
|
|
437
437
|
protoOf(Rules).get_typeName_s1eeum_k$ = function () {
|
|
438
438
|
return 'Rules';
|
|
439
439
|
};
|
|
440
|
-
protoOf(Rules).
|
|
440
|
+
protoOf(Rules).backtrack_4ek2oe_k$ = function (context) {
|
|
441
441
|
var tmp0_$this = ensureNotNull(this.executionContext_2);
|
|
442
442
|
var tmp1_rules = this.alternatives_2;
|
|
443
443
|
// Inline function 'kotlin.Long.plus' call
|
|
@@ -452,19 +452,19 @@
|
|
|
452
452
|
var tmp9_outputChannels = context.outputChannels_1;
|
|
453
453
|
var tmp10_libraries = context.libraries_1;
|
|
454
454
|
var tmp11_customData = context.customData_1.discardEphemeral();
|
|
455
|
-
var tempContext = tmp0_$this.copy$
|
|
456
|
-
var nextChoicePointContext = this.copy$
|
|
457
|
-
return tempContext.copy$
|
|
455
|
+
var tempContext = tmp0_$this.copy$default_dhd9rp_k$(VOID, VOID, tmp10_libraries, tmp4_flags, tmp6_staticKb, tmp5_dynamicKb, tmp7_operators, tmp8_inputChannels, tmp9_outputChannels, tmp11_customData, VOID, VOID, VOID, tmp1_rules, VOID, tmp3_startTime, VOID, VOID, VOID, VOID, tmp2_step);
|
|
456
|
+
var nextChoicePointContext = this.copy$default_tfu8rc_k$(this.alternatives_2.get_next_wor1vg_k$(), tempContext);
|
|
457
|
+
return tempContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, nextChoicePointContext);
|
|
458
458
|
};
|
|
459
|
-
protoOf(Rules).
|
|
459
|
+
protoOf(Rules).copy_msakpk_k$ = function (alternatives, executionContext, parent, depth) {
|
|
460
460
|
return new Rules(alternatives, executionContext, parent, depth);
|
|
461
461
|
};
|
|
462
|
-
protoOf(Rules).copy$
|
|
462
|
+
protoOf(Rules).copy$default_tfu8rc_k$ = function (alternatives, executionContext, parent, depth, $super) {
|
|
463
463
|
alternatives = alternatives === VOID ? this.alternatives_2 : alternatives;
|
|
464
464
|
executionContext = executionContext === VOID ? this.executionContext_2 : executionContext;
|
|
465
465
|
parent = parent === VOID ? this.parent_2 : parent;
|
|
466
466
|
depth = depth === VOID ? this.depth_2 : depth;
|
|
467
|
-
return $super === VOID ? this.
|
|
467
|
+
return $super === VOID ? this.copy_msakpk_k$(alternatives, executionContext, parent, depth) : $super.copy_msakpk_k$.call(this, alternatives, executionContext, parent, depth);
|
|
468
468
|
};
|
|
469
469
|
protoOf(Rules).hashCode = function () {
|
|
470
470
|
var result = hashCode(this.alternatives_2);
|
|
@@ -492,14 +492,14 @@
|
|
|
492
492
|
this.this$0__1 = this$0;
|
|
493
493
|
CoroutineImpl.call(this, resultContinuation);
|
|
494
494
|
}
|
|
495
|
-
protoOf(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn).
|
|
496
|
-
var tmp = this.
|
|
495
|
+
protoOf(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn).invoke_c0xb8o_k$ = function ($this$sequence, $completion) {
|
|
496
|
+
var tmp = this.create_txzjro_k$($this$sequence, $completion);
|
|
497
497
|
tmp.result_1 = Unit_instance;
|
|
498
498
|
tmp.exception_1 = null;
|
|
499
499
|
return tmp.doResume_5yljmg_k$();
|
|
500
500
|
};
|
|
501
501
|
protoOf(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn).invoke_qns8j1_k$ = function (p1, $completion) {
|
|
502
|
-
return this.
|
|
502
|
+
return this.invoke_c0xb8o_k$(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
503
503
|
};
|
|
504
504
|
protoOf(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn).doResume_5yljmg_k$ = function () {
|
|
505
505
|
var suspendResult = this.result_1;
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
}
|
|
546
546
|
while (true);
|
|
547
547
|
};
|
|
548
|
-
protoOf(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn).
|
|
548
|
+
protoOf(ChoicePointContext$_get_pathToRoot_$slambda_q0myjn).create_txzjro_k$ = function ($this$sequence, completion) {
|
|
549
549
|
var i = new ChoicePointContext$_get_pathToRoot_$slambda_q0myjn(this.this$0__1, completion);
|
|
550
550
|
i.$this$sequence_1 = $this$sequence;
|
|
551
551
|
return i;
|
|
@@ -553,7 +553,7 @@
|
|
|
553
553
|
function ChoicePointContext$_get_pathToRoot_$slambda_q0myjn_0(this$0, resultContinuation) {
|
|
554
554
|
var i = new ChoicePointContext$_get_pathToRoot_$slambda_q0myjn(this$0, resultContinuation);
|
|
555
555
|
return constructCallableReference(function ($this$sequence, $completion) {
|
|
556
|
-
return i.
|
|
556
|
+
return i.invoke_c0xb8o_k$($this$sequence, $completion);
|
|
557
557
|
}, 1);
|
|
558
558
|
}
|
|
559
559
|
function ChoicePointContext(alternatives, executionContext, parent, depth) {
|
|
@@ -625,6 +625,304 @@
|
|
|
625
625
|
executionContext = executionContext === VOID ? null : executionContext;
|
|
626
626
|
return new Primitives(alternatives, executionContext, _this__u8e3s4, nextDepth(_this__u8e3s4));
|
|
627
627
|
}
|
|
628
|
+
function MutablePrologSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $this) {
|
|
629
|
+
unificator = unificator === VOID ? Companion_getInstance().get_default_qtagd4_k$() : unificator;
|
|
630
|
+
libraries = libraries === VOID ? Companion_instance.empty() : libraries;
|
|
631
|
+
flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
|
|
632
|
+
staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
|
|
633
|
+
dynamicKb = dynamicKb === VOID ? Companion_instance_1.empty(unificator) : dynamicKb;
|
|
634
|
+
inputChannels = inputChannels === VOID ? Companion_instance_4.fromStandard() : inputChannels;
|
|
635
|
+
outputChannels = outputChannels === VOID ? Companion_instance_5.fromStandard() : outputChannels;
|
|
636
|
+
trustKb = trustKb === VOID ? false : trustKb;
|
|
637
|
+
PrologSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $this);
|
|
638
|
+
MutablePrologSolver.call($this);
|
|
639
|
+
return $this;
|
|
640
|
+
}
|
|
641
|
+
function MutablePrologSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb) {
|
|
642
|
+
return MutablePrologSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, objectCreate(protoOf(MutablePrologSolver)));
|
|
643
|
+
}
|
|
644
|
+
function MutablePrologSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this) {
|
|
645
|
+
unificator = unificator === VOID ? Companion_getInstance().get_default_qtagd4_k$() : unificator;
|
|
646
|
+
libraries = libraries === VOID ? Companion_instance.empty() : libraries;
|
|
647
|
+
flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
|
|
648
|
+
staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
|
|
649
|
+
dynamicKb = dynamicKb === VOID ? Companion_instance_1.empty(unificator) : dynamicKb;
|
|
650
|
+
stdIn = stdIn === VOID ? Companion_instance_2.stdIn() : stdIn;
|
|
651
|
+
stdOut = stdOut === VOID ? Companion_instance_3.stdOut() : stdOut;
|
|
652
|
+
stdErr = stdErr === VOID ? Companion_instance_3.stdErr() : stdErr;
|
|
653
|
+
warnings = warnings === VOID ? Companion_instance_3.warning() : warnings;
|
|
654
|
+
trustKb = trustKb === VOID ? false : trustKb;
|
|
655
|
+
PrologSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this);
|
|
656
|
+
MutablePrologSolver.call($this);
|
|
657
|
+
return $this;
|
|
658
|
+
}
|
|
659
|
+
function MutablePrologSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb) {
|
|
660
|
+
return MutablePrologSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, objectCreate(protoOf(MutablePrologSolver)));
|
|
661
|
+
}
|
|
662
|
+
function MutablePrologSolver$loadLibrary$lambda($library) {
|
|
663
|
+
return function ($this$updateContext) {
|
|
664
|
+
var newRuntime = $this$updateContext.libraries_1.plusLibrary($library);
|
|
665
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, newRuntime, VOID, VOID, VOID, $this$updateContext.operators_1.plusOperatorSet(toOperatorSet(getAllOperators(newRuntime, []))));
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
function MutablePrologSolver$unloadLibrary$lambda($library) {
|
|
669
|
+
return function ($this$updateContext) {
|
|
670
|
+
var newRuntime = $this$updateContext.libraries_1.plusLibrary($library);
|
|
671
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, newRuntime, VOID, VOID, VOID, toOperatorSet(getAllOperators(newRuntime, [$this$updateContext.staticKb_1, $this$updateContext.dynamicKb_1])));
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
function MutablePrologSolver$setRuntime$lambda($libraries) {
|
|
675
|
+
return function ($this$updateContext) {
|
|
676
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, $libraries, VOID, VOID, VOID, toOperatorSet(getAllOperators($libraries, [$this$updateContext.staticKb_1, $this$updateContext.dynamicKb_1])));
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
function MutablePrologSolver$resetStaticKb$lambda($this$updateContext) {
|
|
680
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, Companion_instance_0.empty($this$updateContext.unificator_1), VOID, toOperatorSet(getAllOperators($this$updateContext.libraries_1, [$this$updateContext.dynamicKb_1])));
|
|
681
|
+
}
|
|
682
|
+
function MutablePrologSolver$resetDynamicKb$lambda($this$updateContext) {
|
|
683
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, Companion_instance_1.empty($this$updateContext.unificator_1), toOperatorSet(getAllOperators($this$updateContext.libraries_1, [$this$updateContext.staticKb_1])));
|
|
684
|
+
}
|
|
685
|
+
function MutablePrologSolver$assertA$lambda($clause) {
|
|
686
|
+
return function ($this$updateContext) {
|
|
687
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, $this$updateContext.dynamicKb_1.assertA_rph7uu_k$($clause), $this$updateContext.operators_1.plusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause)))));
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
function MutablePrologSolver$assertA$lambda_0($fact) {
|
|
691
|
+
return function ($this$updateContext) {
|
|
692
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, $this$updateContext.dynamicKb_1.assertAFact_4uxdq5_k$($fact));
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
function MutablePrologSolver$assertZ$lambda($clause) {
|
|
696
|
+
return function ($this$updateContext) {
|
|
697
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, $this$updateContext.dynamicKb_1.assertZ_cv7m25_k$($clause), $this$updateContext.operators_1.plusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause)))));
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
function MutablePrologSolver$assertZ$lambda_0($fact) {
|
|
701
|
+
return function ($this$updateContext) {
|
|
702
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, $this$updateContext.dynamicKb_1.assertZFact_k45js4_k$($fact));
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
function MutablePrologSolver$retract$lambda($result, $clause) {
|
|
706
|
+
return function ($this$updateContext) {
|
|
707
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, $result.get_theory_jxxpta_k$().toMutableTheory(), $this$updateContext.operators_1.minusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause)))));
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
function MutablePrologSolver$retract$lambda_0($result) {
|
|
711
|
+
return function ($this$updateContext) {
|
|
712
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, $result.get_theory_jxxpta_k$().toMutableTheory());
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
function MutablePrologSolver$retractAll$lambda($result) {
|
|
716
|
+
return function ($this$updateContext) {
|
|
717
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, $result.get_theory_jxxpta_k$().toMutableTheory(), $this$updateContext.operators_1.minusOperatorSet(toOperatorSet(getAllOperators_0($result.get_theory_jxxpta_k$()))));
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
function MutablePrologSolver$retractAll$lambda_0($result) {
|
|
721
|
+
return function ($this$updateContext) {
|
|
722
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, $result.get_theory_jxxpta_k$().toMutableTheory());
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
function MutablePrologSolver$setFlag$lambda($name, $value) {
|
|
726
|
+
return function ($this$updateContext) {
|
|
727
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, $this$updateContext.flags_1.set($name, $value));
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
function MutablePrologSolver$setFlag$lambda_0($flag) {
|
|
731
|
+
return function ($this$updateContext) {
|
|
732
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, $this$updateContext.flags_1.plusPair($flag));
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
function MutablePrologSolver$setFlag$lambda_1($flag) {
|
|
736
|
+
return function ($this$updateContext) {
|
|
737
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, $this$updateContext.flags_1.plusNotable($flag));
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
function MutablePrologSolver$setStandardInput$lambda($stdIn) {
|
|
741
|
+
return function ($this$updateContext) {
|
|
742
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this$updateContext.inputChannels_1.plus(to('stdin', $stdIn)));
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
function MutablePrologSolver$setStandardError$lambda($stdErr) {
|
|
746
|
+
return function ($this$updateContext) {
|
|
747
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this$updateContext.outputChannels_1.plus(to('stderr', $stdErr)));
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
function MutablePrologSolver$setStandardOutput$lambda($stdOut) {
|
|
751
|
+
return function ($this$updateContext) {
|
|
752
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this$updateContext.outputChannels_1.plus(to('stdout', $stdOut)));
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
function MutablePrologSolver$setWarnings$lambda($warnings) {
|
|
756
|
+
return function ($this$updateContext) {
|
|
757
|
+
return $this$updateContext.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_instance_5.of_1naorf_k$($this$updateContext.outputChannels_1, $warnings));
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
protoOf(MutablePrologSolver).loadLibrary_q1n5nu_k$ = function (library) {
|
|
761
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$loadLibrary$lambda(library));
|
|
762
|
+
};
|
|
763
|
+
protoOf(MutablePrologSolver).loadLibrary = function (library) {
|
|
764
|
+
return this.loadLibrary_q1n5nu_k$(library);
|
|
765
|
+
};
|
|
766
|
+
protoOf(MutablePrologSolver).unloadLibrary_v0n1oj_k$ = function (library) {
|
|
767
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$unloadLibrary$lambda(library));
|
|
768
|
+
};
|
|
769
|
+
protoOf(MutablePrologSolver).unloadLibrary = function (library) {
|
|
770
|
+
return this.unloadLibrary_v0n1oj_k$(library);
|
|
771
|
+
};
|
|
772
|
+
protoOf(MutablePrologSolver).setLibraries_6nxae9_k$ = function (libraries) {
|
|
773
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$setRuntime$lambda(libraries));
|
|
774
|
+
};
|
|
775
|
+
protoOf(MutablePrologSolver).setLibraries = function (libraries) {
|
|
776
|
+
return this.setLibraries_6nxae9_k$(libraries);
|
|
777
|
+
};
|
|
778
|
+
protoOf(MutablePrologSolver).loadStaticKb_2i4jai_k$ = function (theory) {
|
|
779
|
+
this.initializeKb$default_3mydqu_k$(theory, VOID, false);
|
|
780
|
+
};
|
|
781
|
+
protoOf(MutablePrologSolver).loadStaticKb = function (theory) {
|
|
782
|
+
return this.loadStaticKb_2i4jai_k$(theory);
|
|
783
|
+
};
|
|
784
|
+
protoOf(MutablePrologSolver).appendStaticKb_uqqmam_k$ = function (theory) {
|
|
785
|
+
this.initializeKb$default_3mydqu_k$(theory);
|
|
786
|
+
};
|
|
787
|
+
protoOf(MutablePrologSolver).appendStaticKb = function (theory) {
|
|
788
|
+
return this.appendStaticKb_uqqmam_k$(theory);
|
|
789
|
+
};
|
|
790
|
+
protoOf(MutablePrologSolver).resetStaticKb_rhuuis_k$ = function () {
|
|
791
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$resetStaticKb$lambda);
|
|
792
|
+
};
|
|
793
|
+
protoOf(MutablePrologSolver).resetStaticKb = function () {
|
|
794
|
+
return this.resetStaticKb_rhuuis_k$();
|
|
795
|
+
};
|
|
796
|
+
protoOf(MutablePrologSolver).loadDynamicKb_5wazkf_k$ = function (theory) {
|
|
797
|
+
this.initializeKb$default_3mydqu_k$(VOID, theory, VOID, false);
|
|
798
|
+
};
|
|
799
|
+
protoOf(MutablePrologSolver).loadDynamicKb = function (theory) {
|
|
800
|
+
return this.loadDynamicKb_5wazkf_k$(theory);
|
|
801
|
+
};
|
|
802
|
+
protoOf(MutablePrologSolver).appendDynamicKb_sxywyj_k$ = function (theory) {
|
|
803
|
+
this.initializeKb$default_3mydqu_k$(VOID, theory);
|
|
804
|
+
};
|
|
805
|
+
protoOf(MutablePrologSolver).appendDynamicKb = function (theory) {
|
|
806
|
+
return this.appendDynamicKb_sxywyj_k$(theory);
|
|
807
|
+
};
|
|
808
|
+
protoOf(MutablePrologSolver).resetDynamicKb_ja5swn_k$ = function () {
|
|
809
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$resetDynamicKb$lambda);
|
|
810
|
+
};
|
|
811
|
+
protoOf(MutablePrologSolver).resetDynamicKb = function () {
|
|
812
|
+
return this.resetDynamicKb_ja5swn_k$();
|
|
813
|
+
};
|
|
814
|
+
protoOf(MutablePrologSolver).assertA_tusqwa_k$ = function (clause) {
|
|
815
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$assertA$lambda(clause));
|
|
816
|
+
};
|
|
817
|
+
protoOf(MutablePrologSolver).assertA = function (clause) {
|
|
818
|
+
return this.assertA_tusqwa_k$(clause);
|
|
819
|
+
};
|
|
820
|
+
protoOf(MutablePrologSolver).assertAFact_a3ln65_k$ = function (fact) {
|
|
821
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$assertA$lambda_0(fact));
|
|
822
|
+
};
|
|
823
|
+
protoOf(MutablePrologSolver).assertAFact = function (fact) {
|
|
824
|
+
return this.assertAFact_a3ln65_k$(fact);
|
|
825
|
+
};
|
|
826
|
+
protoOf(MutablePrologSolver).assertZ_zg84ar_k$ = function (clause) {
|
|
827
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$assertZ$lambda(clause));
|
|
828
|
+
};
|
|
829
|
+
protoOf(MutablePrologSolver).assertZ = function (clause) {
|
|
830
|
+
return this.assertZ_zg84ar_k$(clause);
|
|
831
|
+
};
|
|
832
|
+
protoOf(MutablePrologSolver).assertZFact_vgt1ys_k$ = function (fact) {
|
|
833
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$assertZ$lambda_0(fact));
|
|
834
|
+
};
|
|
835
|
+
protoOf(MutablePrologSolver).assertZFact = function (fact) {
|
|
836
|
+
return this.assertZFact_vgt1ys_k$(fact);
|
|
837
|
+
};
|
|
838
|
+
protoOf(MutablePrologSolver).retract_hfhq2o_k$ = function (clause) {
|
|
839
|
+
var result = this.get_dynamicKb_wvqg8j_k$().retract(clause);
|
|
840
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$retract$lambda(result, clause));
|
|
841
|
+
return result;
|
|
842
|
+
};
|
|
843
|
+
protoOf(MutablePrologSolver).retract = function (clause) {
|
|
844
|
+
return this.retract_hfhq2o_k$(clause);
|
|
845
|
+
};
|
|
846
|
+
protoOf(MutablePrologSolver).retractByHead_iva4y4_k$ = function (fact) {
|
|
847
|
+
var result = this.get_dynamicKb_wvqg8j_k$().retractByHead(fact);
|
|
848
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$retract$lambda_0(result));
|
|
849
|
+
return result;
|
|
850
|
+
};
|
|
851
|
+
protoOf(MutablePrologSolver).retractByHead = function (fact) {
|
|
852
|
+
return this.retractByHead_iva4y4_k$(fact);
|
|
853
|
+
};
|
|
854
|
+
protoOf(MutablePrologSolver).retractAll_ggzq75_k$ = function (clause) {
|
|
855
|
+
var result = this.get_dynamicKb_wvqg8j_k$().retractAll(clause);
|
|
856
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$retractAll$lambda(result));
|
|
857
|
+
return result;
|
|
858
|
+
};
|
|
859
|
+
protoOf(MutablePrologSolver).retractAll = function (clause) {
|
|
860
|
+
return this.retractAll_ggzq75_k$(clause);
|
|
861
|
+
};
|
|
862
|
+
protoOf(MutablePrologSolver).retractAllBeHead_dm84sf_k$ = function (fact) {
|
|
863
|
+
var result = this.get_dynamicKb_wvqg8j_k$().retractAllByHead(fact);
|
|
864
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$retractAll$lambda_0(result));
|
|
865
|
+
return result;
|
|
866
|
+
};
|
|
867
|
+
protoOf(MutablePrologSolver).retractAllBeHead = function (fact) {
|
|
868
|
+
return this.retractAllBeHead_dm84sf_k$(fact);
|
|
869
|
+
};
|
|
870
|
+
protoOf(MutablePrologSolver).setFlag_38uvxd_k$ = function (name, value) {
|
|
871
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$setFlag$lambda(name, value));
|
|
872
|
+
};
|
|
873
|
+
protoOf(MutablePrologSolver).setFlag = function (name, value) {
|
|
874
|
+
return this.setFlag_38uvxd_k$(name, value);
|
|
875
|
+
};
|
|
876
|
+
protoOf(MutablePrologSolver).setFlagPair_5b01qk_k$ = function (flag) {
|
|
877
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$setFlag$lambda_0(flag));
|
|
878
|
+
};
|
|
879
|
+
protoOf(MutablePrologSolver).setFlagPair = function (flag) {
|
|
880
|
+
return this.setFlagPair_5b01qk_k$(flag);
|
|
881
|
+
};
|
|
882
|
+
protoOf(MutablePrologSolver).setFlagNotable_13nuxs_k$ = function (flag) {
|
|
883
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$setFlag$lambda_1(flag));
|
|
884
|
+
};
|
|
885
|
+
protoOf(MutablePrologSolver).setFlagNotable = function (flag) {
|
|
886
|
+
return this.setFlagNotable_13nuxs_k$(flag);
|
|
887
|
+
};
|
|
888
|
+
protoOf(MutablePrologSolver).setStandardInput_4u5ra6_k$ = function (stdIn) {
|
|
889
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$setStandardInput$lambda(stdIn));
|
|
890
|
+
};
|
|
891
|
+
protoOf(MutablePrologSolver).setStandardInput = function (stdIn) {
|
|
892
|
+
return this.setStandardInput_4u5ra6_k$(stdIn);
|
|
893
|
+
};
|
|
894
|
+
protoOf(MutablePrologSolver).setStandardError_7qwifb_k$ = function (stdErr) {
|
|
895
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$setStandardError$lambda(stdErr));
|
|
896
|
+
};
|
|
897
|
+
protoOf(MutablePrologSolver).setStandardError = function (stdErr) {
|
|
898
|
+
return this.setStandardError_7qwifb_k$(stdErr);
|
|
899
|
+
};
|
|
900
|
+
protoOf(MutablePrologSolver).setStandardOutput_apporm_k$ = function (stdOut) {
|
|
901
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$setStandardOutput$lambda(stdOut));
|
|
902
|
+
};
|
|
903
|
+
protoOf(MutablePrologSolver).setStandardOutput = function (stdOut) {
|
|
904
|
+
return this.setStandardOutput_apporm_k$(stdOut);
|
|
905
|
+
};
|
|
906
|
+
protoOf(MutablePrologSolver).setWarnings_9w8les_k$ = function (warnings) {
|
|
907
|
+
this.updateContext_rloucg_k$(MutablePrologSolver$setWarnings$lambda(warnings));
|
|
908
|
+
};
|
|
909
|
+
protoOf(MutablePrologSolver).setWarnings = function (warnings) {
|
|
910
|
+
return this.setWarnings_9w8les_k$(warnings);
|
|
911
|
+
};
|
|
912
|
+
protoOf(MutablePrologSolver).copy_equ050_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
913
|
+
return MutablePrologSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
|
|
914
|
+
};
|
|
915
|
+
protoOf(MutablePrologSolver).copy = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
916
|
+
return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof MutablePrologSolver) ? $super : THROW_CCE());
|
|
917
|
+
};
|
|
918
|
+
protoOf(MutablePrologSolver).clone_1keycd_k$ = function () {
|
|
919
|
+
return this.copy();
|
|
920
|
+
};
|
|
921
|
+
protoOf(MutablePrologSolver).clone = function () {
|
|
922
|
+
return this.clone_1keycd_k$();
|
|
923
|
+
};
|
|
924
|
+
function MutablePrologSolver() {
|
|
925
|
+
}
|
|
628
926
|
function _get_locallyInterestingVariables__39cqti($this) {
|
|
629
927
|
var tmp = asSequence_0($this.relevantVariables_1);
|
|
630
928
|
var tmp0_safe_receiver = $this.goals_1.get_current_jwi6j4_k$();
|
|
@@ -638,20 +936,20 @@
|
|
|
638
936
|
/* dead property reference removed */
|
|
639
937
|
return tmp0.get_value_j01efc_k$();
|
|
640
938
|
}
|
|
641
|
-
function
|
|
939
|
+
function PrologExecutionContext$pathToRoot$slambda(this$0, resultContinuation) {
|
|
642
940
|
this.this$0__1 = this$0;
|
|
643
941
|
CoroutineImpl.call(this, resultContinuation);
|
|
644
942
|
}
|
|
645
|
-
protoOf(
|
|
646
|
-
var tmp = this.
|
|
943
|
+
protoOf(PrologExecutionContext$pathToRoot$slambda).invoke_97j7w6_k$ = function ($this$sequence, $completion) {
|
|
944
|
+
var tmp = this.create_n1gxfe_k$($this$sequence, $completion);
|
|
647
945
|
tmp.result_1 = Unit_instance;
|
|
648
946
|
tmp.exception_1 = null;
|
|
649
947
|
return tmp.doResume_5yljmg_k$();
|
|
650
948
|
};
|
|
651
|
-
protoOf(
|
|
652
|
-
return this.
|
|
949
|
+
protoOf(PrologExecutionContext$pathToRoot$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
|
|
950
|
+
return this.invoke_97j7w6_k$(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
653
951
|
};
|
|
654
|
-
protoOf(
|
|
952
|
+
protoOf(PrologExecutionContext$pathToRoot$slambda).doResume_5yljmg_k$ = function () {
|
|
655
953
|
var suspendResult = this.result_1;
|
|
656
954
|
$sm: do
|
|
657
955
|
try {
|
|
@@ -695,18 +993,18 @@
|
|
|
695
993
|
}
|
|
696
994
|
while (true);
|
|
697
995
|
};
|
|
698
|
-
protoOf(
|
|
699
|
-
var i = new
|
|
996
|
+
protoOf(PrologExecutionContext$pathToRoot$slambda).create_n1gxfe_k$ = function ($this$sequence, completion) {
|
|
997
|
+
var i = new PrologExecutionContext$pathToRoot$slambda(this.this$0__1, completion);
|
|
700
998
|
i.$this$sequence_1 = $this$sequence;
|
|
701
999
|
return i;
|
|
702
1000
|
};
|
|
703
|
-
function
|
|
704
|
-
var i = new
|
|
1001
|
+
function PrologExecutionContext$pathToRoot$slambda_0(this$0, resultContinuation) {
|
|
1002
|
+
var i = new PrologExecutionContext$pathToRoot$slambda(this$0, resultContinuation);
|
|
705
1003
|
return constructCallableReference(function ($this$sequence, $completion) {
|
|
706
|
-
return i.
|
|
1004
|
+
return i.invoke_97j7w6_k$($this$sequence, $completion);
|
|
707
1005
|
}, 1);
|
|
708
1006
|
}
|
|
709
|
-
function
|
|
1007
|
+
function PrologExecutionContext$currentGoal$delegate$lambda(this$0) {
|
|
710
1008
|
return function () {
|
|
711
1009
|
var tmp;
|
|
712
1010
|
if (this$0.goals_1.get_isOver_ew3p5z_k$()) {
|
|
@@ -718,46 +1016,46 @@
|
|
|
718
1016
|
return tmp;
|
|
719
1017
|
};
|
|
720
1018
|
}
|
|
721
|
-
function
|
|
1019
|
+
function PrologExecutionContext$_get_currentGoal_$ref_g1xdum() {
|
|
722
1020
|
return constructCallableReference(function (p0) {
|
|
723
1021
|
return p0.get_currentGoal_ntxmf7_k$();
|
|
724
|
-
}, 1, 0,
|
|
1022
|
+
}, 1, 0, 81);
|
|
725
1023
|
}
|
|
726
|
-
function
|
|
1024
|
+
function PrologExecutionContext$interestingVariables$delegate$lambda$lambda(it) {
|
|
727
1025
|
return _get_locallyInterestingVariables__39cqti(it);
|
|
728
1026
|
}
|
|
729
|
-
function
|
|
1027
|
+
function PrologExecutionContext$interestingVariables$delegate$lambda(this$0) {
|
|
730
1028
|
return function () {
|
|
731
1029
|
var tmp = plus(_get_locallyInterestingVariables__39cqti(this$0), this$0.query_1.get_variables_75f0zy_k$());
|
|
732
|
-
return cached(distinct(plus(tmp, flatMap(this$0.pathToRoot_1,
|
|
1030
|
+
return cached(distinct(plus(tmp, flatMap(this$0.pathToRoot_1, PrologExecutionContext$interestingVariables$delegate$lambda$lambda))));
|
|
733
1031
|
};
|
|
734
1032
|
}
|
|
735
|
-
function
|
|
1033
|
+
function PrologExecutionContext$_get_interestingVariables_$ref_ycsjv3() {
|
|
736
1034
|
return constructCallableReference(function (p0) {
|
|
737
1035
|
return _get_interestingVariables__k6uw5o(p0);
|
|
738
|
-
}, 1, 0,
|
|
1036
|
+
}, 1, 0, 82);
|
|
739
1037
|
}
|
|
740
|
-
function
|
|
1038
|
+
function PrologExecutionContext$logicStackTrace$delegate$lambda$lambda(it) {
|
|
741
1039
|
return it.get_isActivationRecord_gyar4q_k$();
|
|
742
1040
|
}
|
|
743
|
-
function
|
|
1041
|
+
function PrologExecutionContext$logicStackTrace$delegate$lambda$lambda_0(this$0) {
|
|
744
1042
|
return function (it) {
|
|
745
1043
|
var tmp0_elvis_lhs = it.procedure_1;
|
|
746
1044
|
return tmp0_elvis_lhs == null ? Companion_getInstance_1().of('?-', [this$0.query_1]) : tmp0_elvis_lhs;
|
|
747
1045
|
};
|
|
748
1046
|
}
|
|
749
|
-
function
|
|
1047
|
+
function PrologExecutionContext$logicStackTrace$delegate$lambda(this$0) {
|
|
750
1048
|
return function () {
|
|
751
|
-
var tmp = filter(this$0.pathToRoot_1,
|
|
752
|
-
return toList(map(tmp,
|
|
1049
|
+
var tmp = filter(this$0.pathToRoot_1, PrologExecutionContext$logicStackTrace$delegate$lambda$lambda);
|
|
1050
|
+
return toList(map(tmp, PrologExecutionContext$logicStackTrace$delegate$lambda$lambda_0(this$0)));
|
|
753
1051
|
};
|
|
754
1052
|
}
|
|
755
|
-
function
|
|
1053
|
+
function PrologExecutionContext$_get_logicStackTrace_$ref_jddlfz() {
|
|
756
1054
|
return constructCallableReference(function (p0) {
|
|
757
1055
|
return p0.get_logicStackTrace_2ngtyq_k$();
|
|
758
|
-
}, 1, 0,
|
|
1056
|
+
}, 1, 0, 83);
|
|
759
1057
|
}
|
|
760
|
-
function
|
|
1058
|
+
function PrologExecutionContext(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables) {
|
|
761
1059
|
procedure = procedure === VOID ? null : procedure;
|
|
762
1060
|
unificator = unificator === VOID ? Companion_getInstance().get_default_qtagd4_k$() : unificator;
|
|
763
1061
|
libraries = libraries === VOID ? Companion_instance.empty() : libraries;
|
|
@@ -820,127 +1118,127 @@
|
|
|
820
1118
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
821
1119
|
}
|
|
822
1120
|
var tmp = this;
|
|
823
|
-
tmp.pathToRoot_1 = sequence(
|
|
1121
|
+
tmp.pathToRoot_1 = sequence(PrologExecutionContext$pathToRoot$slambda_0(this, null));
|
|
824
1122
|
var tmp_0 = this;
|
|
825
|
-
tmp_0.currentGoal$delegate_1 = lazy(
|
|
1123
|
+
tmp_0.currentGoal$delegate_1 = lazy(PrologExecutionContext$currentGoal$delegate$lambda(this));
|
|
826
1124
|
var tmp_1 = this;
|
|
827
|
-
tmp_1.interestingVariables$delegate_1 = lazy(
|
|
1125
|
+
tmp_1.interestingVariables$delegate_1 = lazy(PrologExecutionContext$interestingVariables$delegate$lambda(this));
|
|
828
1126
|
var tmp_2 = this;
|
|
829
|
-
tmp_2.logicStackTrace$delegate_1 = lazy(
|
|
1127
|
+
tmp_2.logicStackTrace$delegate_1 = lazy(PrologExecutionContext$logicStackTrace$delegate$lambda(this));
|
|
830
1128
|
}
|
|
831
|
-
protoOf(
|
|
1129
|
+
protoOf(PrologExecutionContext).get_procedure_9lj7py_k$ = function () {
|
|
832
1130
|
return this.procedure_1;
|
|
833
1131
|
};
|
|
834
|
-
protoOf(
|
|
1132
|
+
protoOf(PrologExecutionContext).get_unificator_xw6v3j_k$ = function () {
|
|
835
1133
|
return this.unificator_1;
|
|
836
1134
|
};
|
|
837
|
-
protoOf(
|
|
1135
|
+
protoOf(PrologExecutionContext).get_libraries_lyf10w_k$ = function () {
|
|
838
1136
|
return this.libraries_1;
|
|
839
1137
|
};
|
|
840
|
-
protoOf(
|
|
1138
|
+
protoOf(PrologExecutionContext).get_flags_irfhb2_k$ = function () {
|
|
841
1139
|
return this.flags_1;
|
|
842
1140
|
};
|
|
843
|
-
protoOf(
|
|
1141
|
+
protoOf(PrologExecutionContext).get_staticKb_a01l1u_k$ = function () {
|
|
844
1142
|
return this.staticKb_1;
|
|
845
1143
|
};
|
|
846
|
-
protoOf(
|
|
1144
|
+
protoOf(PrologExecutionContext).get_dynamicKb_wvqg8j_k$ = function () {
|
|
847
1145
|
return this.dynamicKb_1;
|
|
848
1146
|
};
|
|
849
|
-
protoOf(
|
|
1147
|
+
protoOf(PrologExecutionContext).get_operators_z0nmfu_k$ = function () {
|
|
850
1148
|
return this.operators_1;
|
|
851
1149
|
};
|
|
852
|
-
protoOf(
|
|
1150
|
+
protoOf(PrologExecutionContext).get_inputChannels_uyf05t_k$ = function () {
|
|
853
1151
|
return this.inputChannels_1;
|
|
854
1152
|
};
|
|
855
|
-
protoOf(
|
|
1153
|
+
protoOf(PrologExecutionContext).get_outputChannels_ffvoca_k$ = function () {
|
|
856
1154
|
return this.outputChannels_1;
|
|
857
1155
|
};
|
|
858
|
-
protoOf(
|
|
1156
|
+
protoOf(PrologExecutionContext).get_customData_oovbd0_k$ = function () {
|
|
859
1157
|
return this.customData_1;
|
|
860
1158
|
};
|
|
861
|
-
protoOf(
|
|
1159
|
+
protoOf(PrologExecutionContext).get_substitution_i7fi9y_k$ = function () {
|
|
862
1160
|
return this.substitution_1;
|
|
863
1161
|
};
|
|
864
|
-
protoOf(
|
|
1162
|
+
protoOf(PrologExecutionContext).get_startTime_qp7d5m_k$ = function () {
|
|
865
1163
|
return this.startTime_1;
|
|
866
1164
|
};
|
|
867
|
-
protoOf(
|
|
1165
|
+
protoOf(PrologExecutionContext).get_maxDuration_ek6oxb_k$ = function () {
|
|
868
1166
|
return this.maxDuration_1;
|
|
869
1167
|
};
|
|
870
|
-
protoOf(
|
|
1168
|
+
protoOf(PrologExecutionContext).get_isRoot_ew5h6d_k$ = function () {
|
|
871
1169
|
return this.depth_1 === 0;
|
|
872
1170
|
};
|
|
873
|
-
protoOf(
|
|
1171
|
+
protoOf(PrologExecutionContext).get_hasOpenAlternatives_bd9sv_k$ = function () {
|
|
874
1172
|
var tmp0_safe_receiver = this.choicePoints_1;
|
|
875
1173
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_hasOpenAlternatives_bd9sv_k$();
|
|
876
1174
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
877
1175
|
};
|
|
878
|
-
protoOf(
|
|
1176
|
+
protoOf(PrologExecutionContext).get_isActivationRecord_gyar4q_k$ = function () {
|
|
879
1177
|
return this.parent_1 == null || (this.depth_1 - this.parent_1.depth_1 | 0) >= 1;
|
|
880
1178
|
};
|
|
881
|
-
protoOf(
|
|
1179
|
+
protoOf(PrologExecutionContext).get_currentGoal_ntxmf7_k$ = function () {
|
|
882
1180
|
var tmp0 = this.currentGoal$delegate_1;
|
|
883
1181
|
var tmp = KProperty1;
|
|
884
1182
|
// Inline function 'kotlin.getValue' call
|
|
885
1183
|
/* dead property reference removed */
|
|
886
1184
|
return tmp0.get_value_j01efc_k$();
|
|
887
1185
|
};
|
|
888
|
-
protoOf(
|
|
1186
|
+
protoOf(PrologExecutionContext).isVariableInteresting_vs25g_k$ = function (variable) {
|
|
889
1187
|
return contains(_get_interestingVariables__k6uw5o(this), variable);
|
|
890
1188
|
};
|
|
891
|
-
protoOf(
|
|
1189
|
+
protoOf(PrologExecutionContext).get_logicStackTrace_2ngtyq_k$ = function () {
|
|
892
1190
|
var tmp0 = this.logicStackTrace$delegate_1;
|
|
893
1191
|
var tmp = KProperty1;
|
|
894
1192
|
// Inline function 'kotlin.getValue' call
|
|
895
1193
|
/* dead property reference removed */
|
|
896
1194
|
return tmp0.get_value_j01efc_k$();
|
|
897
1195
|
};
|
|
898
|
-
protoOf(
|
|
899
|
-
return
|
|
1196
|
+
protoOf(PrologExecutionContext).createSolver_k5yu55_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels) {
|
|
1197
|
+
return PrologSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, true);
|
|
900
1198
|
};
|
|
901
|
-
protoOf(
|
|
902
|
-
return this.createSolver(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, ($super == null ? true : $super instanceof
|
|
1199
|
+
protoOf(PrologExecutionContext).createSolver = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, $super) {
|
|
1200
|
+
return this.createSolver(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, ($super == null ? true : $super instanceof PrologExecutionContext) ? $super : THROW_CCE());
|
|
903
1201
|
};
|
|
904
|
-
protoOf(
|
|
905
|
-
return
|
|
1202
|
+
protoOf(PrologExecutionContext).createMutableSolver_qlofgr_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels) {
|
|
1203
|
+
return MutablePrologSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, true);
|
|
906
1204
|
};
|
|
907
|
-
protoOf(
|
|
908
|
-
return this.createMutableSolver(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, ($super == null ? true : $super instanceof
|
|
1205
|
+
protoOf(PrologExecutionContext).createMutableSolver = function (unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, $super) {
|
|
1206
|
+
return this.createMutableSolver(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, ($super == null ? true : $super instanceof PrologExecutionContext) ? $super : THROW_CCE());
|
|
909
1207
|
};
|
|
910
|
-
protoOf(
|
|
911
|
-
return this.copy$
|
|
1208
|
+
protoOf(PrologExecutionContext).update_7gpjus_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData) {
|
|
1209
|
+
return this.copy$default_dhd9rp_k$(VOID, unificator, libraries, flags, staticKb, dynamicKb.toMutableTheory(), operators, inputChannels, outputChannels, customData);
|
|
912
1210
|
};
|
|
913
|
-
protoOf(
|
|
914
|
-
return this.update(unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, ($super == null ? true : $super instanceof
|
|
1211
|
+
protoOf(PrologExecutionContext).update = function (unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, $super) {
|
|
1212
|
+
return this.update(unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, ($super == null ? true : $super instanceof PrologExecutionContext) ? $super : THROW_CCE());
|
|
915
1213
|
};
|
|
916
|
-
protoOf(
|
|
1214
|
+
protoOf(PrologExecutionContext).apply_xpzu4e_k$ = function (sideEffect) {
|
|
917
1215
|
var tmp = apply.call(this, sideEffect);
|
|
918
|
-
return tmp instanceof
|
|
1216
|
+
return tmp instanceof PrologExecutionContext ? tmp : THROW_CCE();
|
|
919
1217
|
};
|
|
920
|
-
protoOf(
|
|
1218
|
+
protoOf(PrologExecutionContext).apply = function (sideEffect) {
|
|
921
1219
|
return this.apply_xpzu4e_k$(sideEffect);
|
|
922
1220
|
};
|
|
923
|
-
protoOf(
|
|
1221
|
+
protoOf(PrologExecutionContext).applyIterable_lkplre_k$ = function (sideEffects) {
|
|
924
1222
|
var tmp = applyIterable.call(this, sideEffects);
|
|
925
|
-
return tmp instanceof
|
|
1223
|
+
return tmp instanceof PrologExecutionContext ? tmp : THROW_CCE();
|
|
926
1224
|
};
|
|
927
|
-
protoOf(
|
|
1225
|
+
protoOf(PrologExecutionContext).applyIterable = function (sideEffects) {
|
|
928
1226
|
return this.applyIterable_lkplre_k$(sideEffects);
|
|
929
1227
|
};
|
|
930
|
-
protoOf(
|
|
1228
|
+
protoOf(PrologExecutionContext).applySequence_5ojcmh_k$ = function (sideEffects) {
|
|
931
1229
|
var tmp = applySequence.call(this, sideEffects);
|
|
932
|
-
return tmp instanceof
|
|
1230
|
+
return tmp instanceof PrologExecutionContext ? tmp : THROW_CCE();
|
|
933
1231
|
};
|
|
934
|
-
protoOf(
|
|
1232
|
+
protoOf(PrologExecutionContext).applySequence = function (sideEffects) {
|
|
935
1233
|
return this.applySequence_5ojcmh_k$(sideEffects);
|
|
936
1234
|
};
|
|
937
|
-
protoOf(
|
|
938
|
-
return '
|
|
1235
|
+
protoOf(PrologExecutionContext).toString = function () {
|
|
1236
|
+
return 'PrologExecutionContext(' + ('step=' + this.step_1.toString() + ', ') + ('depth=' + this.depth_1 + ', ') + ('substitution=' + toString(this.substitution_1) + ', ') + ('logicStackTrace=' + toString(this.get_logicStackTrace_2ngtyq_k$()) + ', ') + ('goals=' + toString(this.goals_1) + ', ') + ('rules=' + toString(this.rules_1) + ', ') + ('primitives=' + toString(this.primitives_1) + ', ') + ('startTime=' + this.startTime_1.toString() + ', ') + ('endTime=' + this.get_endTime_pbcuqp_k$().toString() + ', ') + ('maxDuration=' + this.maxDuration_1.toString() + ', ') + ('unificator=' + toString(this.unificator_1) + ', ') + ('choicePoints=' + toString_0(this.choicePoints_1)) + ')';
|
|
939
1237
|
};
|
|
940
|
-
protoOf(
|
|
941
|
-
return new
|
|
1238
|
+
protoOf(PrologExecutionContext).copy_pacch5_k$ = function (procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables) {
|
|
1239
|
+
return new PrologExecutionContext(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables);
|
|
942
1240
|
};
|
|
943
|
-
protoOf(
|
|
1241
|
+
protoOf(PrologExecutionContext).copy$default_dhd9rp_k$ = function (procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables, $super) {
|
|
944
1242
|
procedure = procedure === VOID ? this.procedure_1 : procedure;
|
|
945
1243
|
unificator = unificator === VOID ? this.unificator_1 : unificator;
|
|
946
1244
|
libraries = libraries === VOID ? this.libraries_1 : libraries;
|
|
@@ -963,9 +1261,9 @@
|
|
|
963
1261
|
depth = depth === VOID ? this.depth_1 : depth;
|
|
964
1262
|
step = step === VOID ? this.step_1 : step;
|
|
965
1263
|
relevantVariables = relevantVariables === VOID ? this.relevantVariables_1 : relevantVariables;
|
|
966
|
-
return $super === VOID ? this.
|
|
1264
|
+
return $super === VOID ? this.copy_pacch5_k$(procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables) : $super.copy_pacch5_k$.call(this, procedure, unificator, libraries, flags, staticKb, dynamicKb, operators, inputChannels, outputChannels, customData, substitution, query, goals, rules, primitives, startTime, maxDuration, choicePoints, parent, depth, step, relevantVariables);
|
|
967
1265
|
};
|
|
968
|
-
protoOf(
|
|
1266
|
+
protoOf(PrologExecutionContext).hashCode = function () {
|
|
969
1267
|
var result = this.procedure_1 == null ? 0 : this.procedure_1.hashCode();
|
|
970
1268
|
result = imul(result, 31) + hashCode(this.unificator_1) | 0;
|
|
971
1269
|
result = imul(result, 31) + hashCode(this.libraries_1) | 0;
|
|
@@ -990,10 +1288,10 @@
|
|
|
990
1288
|
result = imul(result, 31) + hashCode(this.relevantVariables_1) | 0;
|
|
991
1289
|
return result;
|
|
992
1290
|
};
|
|
993
|
-
protoOf(
|
|
1291
|
+
protoOf(PrologExecutionContext).equals = function (other) {
|
|
994
1292
|
if (this === other)
|
|
995
1293
|
return true;
|
|
996
|
-
if (!(other instanceof
|
|
1294
|
+
if (!(other instanceof PrologExecutionContext))
|
|
997
1295
|
return false;
|
|
998
1296
|
if (!equals(this.procedure_1, other.procedure_1))
|
|
999
1297
|
return false;
|
|
@@ -1041,7 +1339,7 @@
|
|
|
1041
1339
|
return false;
|
|
1042
1340
|
return true;
|
|
1043
1341
|
};
|
|
1044
|
-
function
|
|
1342
|
+
function PrologSolver_init_$Init$(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb, $this) {
|
|
1045
1343
|
unificator = unificator === VOID ? Companion_getInstance().get_default_qtagd4_k$() : unificator;
|
|
1046
1344
|
libraries = libraries === VOID ? Companion_instance.empty() : libraries;
|
|
1047
1345
|
flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
|
|
@@ -1050,14 +1348,14 @@
|
|
|
1050
1348
|
inputChannels = inputChannels === VOID ? Companion_instance_4.fromStandard() : inputChannels;
|
|
1051
1349
|
outputChannels = outputChannels === VOID ? Companion_instance_5.fromStandard() : outputChannels;
|
|
1052
1350
|
trustKb = trustKb === VOID ? false : trustKb;
|
|
1053
|
-
|
|
1054
|
-
|
|
1351
|
+
AbstractPrologSolver.call($this, unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb);
|
|
1352
|
+
PrologSolver.call($this);
|
|
1055
1353
|
return $this;
|
|
1056
1354
|
}
|
|
1057
|
-
function
|
|
1058
|
-
return
|
|
1355
|
+
function PrologSolver_init_$Create$(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb) {
|
|
1356
|
+
return PrologSolver_init_$Init$(unificator, libraries, flags, initialStaticKb, initialDynamicKb, inputChannels, outputChannels, trustKb, objectCreate(protoOf(PrologSolver)));
|
|
1059
1357
|
}
|
|
1060
|
-
function
|
|
1358
|
+
function PrologSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this) {
|
|
1061
1359
|
unificator = unificator === VOID ? Companion_getInstance().get_default_qtagd4_k$() : unificator;
|
|
1062
1360
|
libraries = libraries === VOID ? Companion_instance.empty() : libraries;
|
|
1063
1361
|
flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
|
|
@@ -1068,367 +1366,69 @@
|
|
|
1068
1366
|
stdErr = stdErr === VOID ? Companion_instance_3.stdErr() : stdErr;
|
|
1069
1367
|
warnings = warnings === VOID ? Companion_instance_3.warning() : warnings;
|
|
1070
1368
|
trustKb = trustKb === VOID ? false : trustKb;
|
|
1071
|
-
|
|
1072
|
-
|
|
1369
|
+
AbstractPrologSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this);
|
|
1370
|
+
PrologSolver.call($this);
|
|
1073
1371
|
return $this;
|
|
1074
1372
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return
|
|
1373
|
+
function PrologSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb) {
|
|
1374
|
+
return PrologSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, objectCreate(protoOf(PrologSolver)));
|
|
1077
1375
|
}
|
|
1078
|
-
protoOf(
|
|
1079
|
-
return Companion_instance_15.
|
|
1376
|
+
protoOf(PrologSolver).solutionIterator_3eur09_k$ = function (initialState, onStateTransition) {
|
|
1377
|
+
return Companion_instance_15.of_ufxriv_k$(initialState, onStateTransition);
|
|
1080
1378
|
};
|
|
1081
|
-
protoOf(
|
|
1082
|
-
return
|
|
1379
|
+
protoOf(PrologSolver).copy_equ050_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
1380
|
+
return PrologSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
|
|
1083
1381
|
};
|
|
1084
|
-
protoOf(
|
|
1085
|
-
return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof
|
|
1382
|
+
protoOf(PrologSolver).copy = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
1383
|
+
return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof PrologSolver) ? $super : THROW_CCE());
|
|
1086
1384
|
};
|
|
1087
|
-
protoOf(
|
|
1385
|
+
protoOf(PrologSolver).clone_1keycd_k$ = function () {
|
|
1088
1386
|
return this.copy();
|
|
1089
1387
|
};
|
|
1090
|
-
protoOf(
|
|
1388
|
+
protoOf(PrologSolver).clone = function () {
|
|
1091
1389
|
return this.clone_1keycd_k$();
|
|
1092
1390
|
};
|
|
1093
|
-
function
|
|
1391
|
+
function PrologSolver() {
|
|
1094
1392
|
}
|
|
1095
|
-
function
|
|
1393
|
+
function PrologSolverFactory() {
|
|
1096
1394
|
}
|
|
1097
|
-
protoOf(
|
|
1395
|
+
protoOf(PrologSolverFactory).get_defaultBuiltins_lwij14_k$ = function () {
|
|
1098
1396
|
return DefaultBuiltins_getInstance();
|
|
1099
1397
|
};
|
|
1100
|
-
protoOf(
|
|
1101
|
-
return
|
|
1102
|
-
};
|
|
1103
|
-
protoOf(ClassicSolverFactory).rawSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, $super) {
|
|
1104
|
-
return this.rawSolverOf(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, ($super == null ? true : $super instanceof ClassicSolverFactory) ? $super : THROW_CCE());
|
|
1105
|
-
};
|
|
1106
|
-
protoOf(ClassicSolverFactory).solverOf_dn642x_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
1107
|
-
return ClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
|
|
1108
|
-
};
|
|
1109
|
-
protoOf(ClassicSolverFactory).solverOf = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
1110
|
-
return this.solverOf(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof ClassicSolverFactory) ? $super : THROW_CCE());
|
|
1111
|
-
};
|
|
1112
|
-
protoOf(ClassicSolverFactory).mutableSolverOf_wmp0rz_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
1113
|
-
return MutableClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
|
|
1114
|
-
};
|
|
1115
|
-
protoOf(ClassicSolverFactory).mutableSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
1116
|
-
return this.mutableSolverOf(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof ClassicSolverFactory) ? $super : THROW_CCE());
|
|
1117
|
-
};
|
|
1118
|
-
protoOf(ClassicSolverFactory).mutableSolverOf_16557c_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
|
|
1119
|
-
return MutableClassicSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs);
|
|
1120
|
-
};
|
|
1121
|
-
protoOf(ClassicSolverFactory).rawMutableSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, $super) {
|
|
1122
|
-
return this.rawMutableSolverOf(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, ($super == null ? true : $super instanceof ClassicSolverFactory) ? $super : THROW_CCE());
|
|
1123
|
-
};
|
|
1124
|
-
var ClassicSolverFactory_instance;
|
|
1125
|
-
function ClassicSolverFactory_getInstance() {
|
|
1126
|
-
return ClassicSolverFactory_instance;
|
|
1127
|
-
}
|
|
1128
|
-
function MutableClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $this) {
|
|
1129
|
-
unificator = unificator === VOID ? Companion_getInstance().get_default_qtagd4_k$() : unificator;
|
|
1130
|
-
libraries = libraries === VOID ? Companion_instance.empty() : libraries;
|
|
1131
|
-
flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
|
|
1132
|
-
staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
|
|
1133
|
-
dynamicKb = dynamicKb === VOID ? Companion_instance_1.empty(unificator) : dynamicKb;
|
|
1134
|
-
inputChannels = inputChannels === VOID ? Companion_instance_4.fromStandard() : inputChannels;
|
|
1135
|
-
outputChannels = outputChannels === VOID ? Companion_instance_5.fromStandard() : outputChannels;
|
|
1136
|
-
trustKb = trustKb === VOID ? false : trustKb;
|
|
1137
|
-
ClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, $this);
|
|
1138
|
-
MutableClassicSolver.call($this);
|
|
1139
|
-
return $this;
|
|
1140
|
-
}
|
|
1141
|
-
function MutableClassicSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb) {
|
|
1142
|
-
return MutableClassicSolver_init_$Init$(unificator, libraries, flags, staticKb, dynamicKb, inputChannels, outputChannels, trustKb, objectCreate(protoOf(MutableClassicSolver)));
|
|
1143
|
-
}
|
|
1144
|
-
function MutableClassicSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this) {
|
|
1145
|
-
unificator = unificator === VOID ? Companion_getInstance().get_default_qtagd4_k$() : unificator;
|
|
1146
|
-
libraries = libraries === VOID ? Companion_instance.empty() : libraries;
|
|
1147
|
-
flags = flags === VOID ? Companion_getInstance_0().empty() : flags;
|
|
1148
|
-
staticKb = staticKb === VOID ? Companion_instance_0.empty(unificator) : staticKb;
|
|
1149
|
-
dynamicKb = dynamicKb === VOID ? Companion_instance_1.empty(unificator) : dynamicKb;
|
|
1150
|
-
stdIn = stdIn === VOID ? Companion_instance_2.stdIn() : stdIn;
|
|
1151
|
-
stdOut = stdOut === VOID ? Companion_instance_3.stdOut() : stdOut;
|
|
1152
|
-
stdErr = stdErr === VOID ? Companion_instance_3.stdErr() : stdErr;
|
|
1153
|
-
warnings = warnings === VOID ? Companion_instance_3.warning() : warnings;
|
|
1154
|
-
trustKb = trustKb === VOID ? false : trustKb;
|
|
1155
|
-
ClassicSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, $this);
|
|
1156
|
-
MutableClassicSolver.call($this);
|
|
1157
|
-
return $this;
|
|
1158
|
-
}
|
|
1159
|
-
function MutableClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb) {
|
|
1160
|
-
return MutableClassicSolver_init_$Init$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, trustKb, objectCreate(protoOf(MutableClassicSolver)));
|
|
1161
|
-
}
|
|
1162
|
-
function MutableClassicSolver$loadLibrary$lambda($library) {
|
|
1163
|
-
return function ($this$updateContext) {
|
|
1164
|
-
var newRuntime = $this$updateContext.libraries_1.plusLibrary($library);
|
|
1165
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, newRuntime, VOID, VOID, VOID, $this$updateContext.operators_1.plusOperatorSet(toOperatorSet(getAllOperators(newRuntime, []))));
|
|
1166
|
-
};
|
|
1167
|
-
}
|
|
1168
|
-
function MutableClassicSolver$unloadLibrary$lambda($library) {
|
|
1169
|
-
return function ($this$updateContext) {
|
|
1170
|
-
var newRuntime = $this$updateContext.libraries_1.plusLibrary($library);
|
|
1171
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, newRuntime, VOID, VOID, VOID, toOperatorSet(getAllOperators(newRuntime, [$this$updateContext.staticKb_1, $this$updateContext.dynamicKb_1])));
|
|
1172
|
-
};
|
|
1173
|
-
}
|
|
1174
|
-
function MutableClassicSolver$setRuntime$lambda($libraries) {
|
|
1175
|
-
return function ($this$updateContext) {
|
|
1176
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, $libraries, VOID, VOID, VOID, toOperatorSet(getAllOperators($libraries, [$this$updateContext.staticKb_1, $this$updateContext.dynamicKb_1])));
|
|
1177
|
-
};
|
|
1178
|
-
}
|
|
1179
|
-
function MutableClassicSolver$resetStaticKb$lambda($this$updateContext) {
|
|
1180
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, Companion_instance_0.empty($this$updateContext.unificator_1), VOID, toOperatorSet(getAllOperators($this$updateContext.libraries_1, [$this$updateContext.dynamicKb_1])));
|
|
1181
|
-
}
|
|
1182
|
-
function MutableClassicSolver$resetDynamicKb$lambda($this$updateContext) {
|
|
1183
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, Companion_instance_1.empty($this$updateContext.unificator_1), toOperatorSet(getAllOperators($this$updateContext.libraries_1, [$this$updateContext.staticKb_1])));
|
|
1184
|
-
}
|
|
1185
|
-
function MutableClassicSolver$assertA$lambda($clause) {
|
|
1186
|
-
return function ($this$updateContext) {
|
|
1187
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, $this$updateContext.dynamicKb_1.assertA_rph7uu_k$($clause), $this$updateContext.operators_1.plusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause)))));
|
|
1188
|
-
};
|
|
1189
|
-
}
|
|
1190
|
-
function MutableClassicSolver$assertA$lambda_0($fact) {
|
|
1191
|
-
return function ($this$updateContext) {
|
|
1192
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, $this$updateContext.dynamicKb_1.assertAFact_4uxdq5_k$($fact));
|
|
1193
|
-
};
|
|
1194
|
-
}
|
|
1195
|
-
function MutableClassicSolver$assertZ$lambda($clause) {
|
|
1196
|
-
return function ($this$updateContext) {
|
|
1197
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, $this$updateContext.dynamicKb_1.assertZ_cv7m25_k$($clause), $this$updateContext.operators_1.plusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause)))));
|
|
1198
|
-
};
|
|
1199
|
-
}
|
|
1200
|
-
function MutableClassicSolver$assertZ$lambda_0($fact) {
|
|
1201
|
-
return function ($this$updateContext) {
|
|
1202
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, $this$updateContext.dynamicKb_1.assertZFact_k45js4_k$($fact));
|
|
1203
|
-
};
|
|
1204
|
-
}
|
|
1205
|
-
function MutableClassicSolver$retract$lambda($result, $clause) {
|
|
1206
|
-
return function ($this$updateContext) {
|
|
1207
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, $result.get_theory_jxxpta_k$().toMutableTheory(), $this$updateContext.operators_1.minusOperatorSet(toOperatorSet(getAllOperators_0(listOf($clause)))));
|
|
1208
|
-
};
|
|
1209
|
-
}
|
|
1210
|
-
function MutableClassicSolver$retract$lambda_0($result) {
|
|
1211
|
-
return function ($this$updateContext) {
|
|
1212
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, $result.get_theory_jxxpta_k$().toMutableTheory());
|
|
1213
|
-
};
|
|
1214
|
-
}
|
|
1215
|
-
function MutableClassicSolver$retractAll$lambda($result) {
|
|
1216
|
-
return function ($this$updateContext) {
|
|
1217
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, $result.get_theory_jxxpta_k$().toMutableTheory(), $this$updateContext.operators_1.minusOperatorSet(toOperatorSet(getAllOperators_0($result.get_theory_jxxpta_k$()))));
|
|
1218
|
-
};
|
|
1219
|
-
}
|
|
1220
|
-
function MutableClassicSolver$retractAll$lambda_0($result) {
|
|
1221
|
-
return function ($this$updateContext) {
|
|
1222
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, $result.get_theory_jxxpta_k$().toMutableTheory());
|
|
1223
|
-
};
|
|
1224
|
-
}
|
|
1225
|
-
function MutableClassicSolver$setFlag$lambda($name, $value) {
|
|
1226
|
-
return function ($this$updateContext) {
|
|
1227
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, $this$updateContext.flags_1.set($name, $value));
|
|
1228
|
-
};
|
|
1229
|
-
}
|
|
1230
|
-
function MutableClassicSolver$setFlag$lambda_0($flag) {
|
|
1231
|
-
return function ($this$updateContext) {
|
|
1232
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, $this$updateContext.flags_1.plusPair($flag));
|
|
1233
|
-
};
|
|
1234
|
-
}
|
|
1235
|
-
function MutableClassicSolver$setFlag$lambda_1($flag) {
|
|
1236
|
-
return function ($this$updateContext) {
|
|
1237
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, $this$updateContext.flags_1.plusNotable($flag));
|
|
1238
|
-
};
|
|
1239
|
-
}
|
|
1240
|
-
function MutableClassicSolver$setStandardInput$lambda($stdIn) {
|
|
1241
|
-
return function ($this$updateContext) {
|
|
1242
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this$updateContext.inputChannels_1.plus(to('stdin', $stdIn)));
|
|
1243
|
-
};
|
|
1244
|
-
}
|
|
1245
|
-
function MutableClassicSolver$setStandardError$lambda($stdErr) {
|
|
1246
|
-
return function ($this$updateContext) {
|
|
1247
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this$updateContext.outputChannels_1.plus(to('stderr', $stdErr)));
|
|
1248
|
-
};
|
|
1249
|
-
}
|
|
1250
|
-
function MutableClassicSolver$setStandardOutput$lambda($stdOut) {
|
|
1251
|
-
return function ($this$updateContext) {
|
|
1252
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this$updateContext.outputChannels_1.plus(to('stdout', $stdOut)));
|
|
1253
|
-
};
|
|
1254
|
-
}
|
|
1255
|
-
function MutableClassicSolver$setWarnings$lambda($warnings) {
|
|
1256
|
-
return function ($this$updateContext) {
|
|
1257
|
-
return $this$updateContext.copy$default_jnnbw6_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_instance_5.of_1naorf_k$($this$updateContext.outputChannels_1, $warnings));
|
|
1258
|
-
};
|
|
1259
|
-
}
|
|
1260
|
-
protoOf(MutableClassicSolver).loadLibrary_orxs0q_k$ = function (library) {
|
|
1261
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$loadLibrary$lambda(library));
|
|
1262
|
-
};
|
|
1263
|
-
protoOf(MutableClassicSolver).loadLibrary = function (library) {
|
|
1264
|
-
return this.loadLibrary_orxs0q_k$(library);
|
|
1265
|
-
};
|
|
1266
|
-
protoOf(MutableClassicSolver).unloadLibrary_5p9mvn_k$ = function (library) {
|
|
1267
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$unloadLibrary$lambda(library));
|
|
1268
|
-
};
|
|
1269
|
-
protoOf(MutableClassicSolver).unloadLibrary = function (library) {
|
|
1270
|
-
return this.unloadLibrary_5p9mvn_k$(library);
|
|
1271
|
-
};
|
|
1272
|
-
protoOf(MutableClassicSolver).setLibraries_6nxae9_k$ = function (libraries) {
|
|
1273
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$setRuntime$lambda(libraries));
|
|
1274
|
-
};
|
|
1275
|
-
protoOf(MutableClassicSolver).setLibraries = function (libraries) {
|
|
1276
|
-
return this.setLibraries_6nxae9_k$(libraries);
|
|
1277
|
-
};
|
|
1278
|
-
protoOf(MutableClassicSolver).loadStaticKb_2i4jai_k$ = function (theory) {
|
|
1279
|
-
this.initializeKb$default_3mydqu_k$(theory, VOID, false);
|
|
1280
|
-
};
|
|
1281
|
-
protoOf(MutableClassicSolver).loadStaticKb = function (theory) {
|
|
1282
|
-
return this.loadStaticKb_2i4jai_k$(theory);
|
|
1283
|
-
};
|
|
1284
|
-
protoOf(MutableClassicSolver).appendStaticKb_uqqmam_k$ = function (theory) {
|
|
1285
|
-
this.initializeKb$default_3mydqu_k$(theory);
|
|
1286
|
-
};
|
|
1287
|
-
protoOf(MutableClassicSolver).appendStaticKb = function (theory) {
|
|
1288
|
-
return this.appendStaticKb_uqqmam_k$(theory);
|
|
1289
|
-
};
|
|
1290
|
-
protoOf(MutableClassicSolver).resetStaticKb_rhuuis_k$ = function () {
|
|
1291
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$resetStaticKb$lambda);
|
|
1292
|
-
};
|
|
1293
|
-
protoOf(MutableClassicSolver).resetStaticKb = function () {
|
|
1294
|
-
return this.resetStaticKb_rhuuis_k$();
|
|
1295
|
-
};
|
|
1296
|
-
protoOf(MutableClassicSolver).loadDynamicKb_5wazkf_k$ = function (theory) {
|
|
1297
|
-
this.initializeKb$default_3mydqu_k$(VOID, theory, VOID, false);
|
|
1298
|
-
};
|
|
1299
|
-
protoOf(MutableClassicSolver).loadDynamicKb = function (theory) {
|
|
1300
|
-
return this.loadDynamicKb_5wazkf_k$(theory);
|
|
1301
|
-
};
|
|
1302
|
-
protoOf(MutableClassicSolver).appendDynamicKb_sxywyj_k$ = function (theory) {
|
|
1303
|
-
this.initializeKb$default_3mydqu_k$(VOID, theory);
|
|
1304
|
-
};
|
|
1305
|
-
protoOf(MutableClassicSolver).appendDynamicKb = function (theory) {
|
|
1306
|
-
return this.appendDynamicKb_sxywyj_k$(theory);
|
|
1307
|
-
};
|
|
1308
|
-
protoOf(MutableClassicSolver).resetDynamicKb_ja5swn_k$ = function () {
|
|
1309
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$resetDynamicKb$lambda);
|
|
1310
|
-
};
|
|
1311
|
-
protoOf(MutableClassicSolver).resetDynamicKb = function () {
|
|
1312
|
-
return this.resetDynamicKb_ja5swn_k$();
|
|
1313
|
-
};
|
|
1314
|
-
protoOf(MutableClassicSolver).assertA_tusqwa_k$ = function (clause) {
|
|
1315
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$assertA$lambda(clause));
|
|
1316
|
-
};
|
|
1317
|
-
protoOf(MutableClassicSolver).assertA = function (clause) {
|
|
1318
|
-
return this.assertA_tusqwa_k$(clause);
|
|
1319
|
-
};
|
|
1320
|
-
protoOf(MutableClassicSolver).assertAFact_a3ln65_k$ = function (fact) {
|
|
1321
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$assertA$lambda_0(fact));
|
|
1322
|
-
};
|
|
1323
|
-
protoOf(MutableClassicSolver).assertAFact = function (fact) {
|
|
1324
|
-
return this.assertAFact_a3ln65_k$(fact);
|
|
1325
|
-
};
|
|
1326
|
-
protoOf(MutableClassicSolver).assertZ_zg84ar_k$ = function (clause) {
|
|
1327
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$assertZ$lambda(clause));
|
|
1328
|
-
};
|
|
1329
|
-
protoOf(MutableClassicSolver).assertZ = function (clause) {
|
|
1330
|
-
return this.assertZ_zg84ar_k$(clause);
|
|
1331
|
-
};
|
|
1332
|
-
protoOf(MutableClassicSolver).assertZFact_vgt1ys_k$ = function (fact) {
|
|
1333
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$assertZ$lambda_0(fact));
|
|
1334
|
-
};
|
|
1335
|
-
protoOf(MutableClassicSolver).assertZFact = function (fact) {
|
|
1336
|
-
return this.assertZFact_vgt1ys_k$(fact);
|
|
1398
|
+
protoOf(PrologSolverFactory).solverOf_7gm3c2_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
|
|
1399
|
+
return PrologSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs);
|
|
1337
1400
|
};
|
|
1338
|
-
protoOf(
|
|
1339
|
-
|
|
1340
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$retract$lambda(result, clause));
|
|
1341
|
-
return result;
|
|
1401
|
+
protoOf(PrologSolverFactory).rawSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, $super) {
|
|
1402
|
+
return this.rawSolverOf(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, ($super == null ? true : $super instanceof PrologSolverFactory) ? $super : THROW_CCE());
|
|
1342
1403
|
};
|
|
1343
|
-
protoOf(
|
|
1344
|
-
return
|
|
1404
|
+
protoOf(PrologSolverFactory).solverOf_dn642x_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
1405
|
+
return PrologSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
|
|
1345
1406
|
};
|
|
1346
|
-
protoOf(
|
|
1347
|
-
|
|
1348
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$retract$lambda_0(result));
|
|
1349
|
-
return result;
|
|
1407
|
+
protoOf(PrologSolverFactory).solverOf = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
1408
|
+
return this.solverOf(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof PrologSolverFactory) ? $super : THROW_CCE());
|
|
1350
1409
|
};
|
|
1351
|
-
protoOf(
|
|
1352
|
-
return
|
|
1410
|
+
protoOf(PrologSolverFactory).mutableSolverOf_wmp0rz_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
1411
|
+
return MutablePrologSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
|
|
1353
1412
|
};
|
|
1354
|
-
protoOf(
|
|
1355
|
-
|
|
1356
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$retractAll$lambda(result));
|
|
1357
|
-
return result;
|
|
1413
|
+
protoOf(PrologSolverFactory).mutableSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
1414
|
+
return this.mutableSolverOf(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof PrologSolverFactory) ? $super : THROW_CCE());
|
|
1358
1415
|
};
|
|
1359
|
-
protoOf(
|
|
1360
|
-
return
|
|
1416
|
+
protoOf(PrologSolverFactory).mutableSolverOf_16557c_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
|
|
1417
|
+
return MutablePrologSolver_init_$Create$(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs);
|
|
1361
1418
|
};
|
|
1362
|
-
protoOf(
|
|
1363
|
-
|
|
1364
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$retractAll$lambda_0(result));
|
|
1365
|
-
return result;
|
|
1419
|
+
protoOf(PrologSolverFactory).rawMutableSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, $super) {
|
|
1420
|
+
return this.rawMutableSolverOf(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, ($super == null ? true : $super instanceof PrologSolverFactory) ? $super : THROW_CCE());
|
|
1366
1421
|
};
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
protoOf(MutableClassicSolver).setFlag_v9vu25_k$ = function (name, value) {
|
|
1371
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$setFlag$lambda(name, value));
|
|
1372
|
-
};
|
|
1373
|
-
protoOf(MutableClassicSolver).setFlag = function (name, value) {
|
|
1374
|
-
return this.setFlag_v9vu25_k$(name, value);
|
|
1375
|
-
};
|
|
1376
|
-
protoOf(MutableClassicSolver).setFlagPair_5b01qk_k$ = function (flag) {
|
|
1377
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$setFlag$lambda_0(flag));
|
|
1378
|
-
};
|
|
1379
|
-
protoOf(MutableClassicSolver).setFlagPair = function (flag) {
|
|
1380
|
-
return this.setFlagPair_5b01qk_k$(flag);
|
|
1381
|
-
};
|
|
1382
|
-
protoOf(MutableClassicSolver).setFlagNotable_j8i9ir_k$ = function (flag) {
|
|
1383
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$setFlag$lambda_1(flag));
|
|
1384
|
-
};
|
|
1385
|
-
protoOf(MutableClassicSolver).setFlagNotable = function (flag) {
|
|
1386
|
-
return this.setFlagNotable_j8i9ir_k$(flag);
|
|
1387
|
-
};
|
|
1388
|
-
protoOf(MutableClassicSolver).setStandardInput_4u5ra6_k$ = function (stdIn) {
|
|
1389
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$setStandardInput$lambda(stdIn));
|
|
1390
|
-
};
|
|
1391
|
-
protoOf(MutableClassicSolver).setStandardInput = function (stdIn) {
|
|
1392
|
-
return this.setStandardInput_4u5ra6_k$(stdIn);
|
|
1393
|
-
};
|
|
1394
|
-
protoOf(MutableClassicSolver).setStandardError_7qwifb_k$ = function (stdErr) {
|
|
1395
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$setStandardError$lambda(stdErr));
|
|
1396
|
-
};
|
|
1397
|
-
protoOf(MutableClassicSolver).setStandardError = function (stdErr) {
|
|
1398
|
-
return this.setStandardError_7qwifb_k$(stdErr);
|
|
1399
|
-
};
|
|
1400
|
-
protoOf(MutableClassicSolver).setStandardOutput_apporm_k$ = function (stdOut) {
|
|
1401
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$setStandardOutput$lambda(stdOut));
|
|
1402
|
-
};
|
|
1403
|
-
protoOf(MutableClassicSolver).setStandardOutput = function (stdOut) {
|
|
1404
|
-
return this.setStandardOutput_apporm_k$(stdOut);
|
|
1405
|
-
};
|
|
1406
|
-
protoOf(MutableClassicSolver).setWarnings_9w8les_k$ = function (warnings) {
|
|
1407
|
-
this.updateContext_rloucg_k$(MutableClassicSolver$setWarnings$lambda(warnings));
|
|
1408
|
-
};
|
|
1409
|
-
protoOf(MutableClassicSolver).setWarnings = function (warnings) {
|
|
1410
|
-
return this.setWarnings_9w8les_k$(warnings);
|
|
1411
|
-
};
|
|
1412
|
-
protoOf(MutableClassicSolver).copy_equ050_k$ = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
1413
|
-
return MutableClassicSolver_init_$Create$_0(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings);
|
|
1414
|
-
};
|
|
1415
|
-
protoOf(MutableClassicSolver).copy = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
1416
|
-
return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof MutableClassicSolver) ? $super : THROW_CCE());
|
|
1417
|
-
};
|
|
1418
|
-
protoOf(MutableClassicSolver).clone_1keycd_k$ = function () {
|
|
1419
|
-
return this.copy();
|
|
1420
|
-
};
|
|
1421
|
-
protoOf(MutableClassicSolver).clone = function () {
|
|
1422
|
-
return this.clone_1keycd_k$();
|
|
1423
|
-
};
|
|
1424
|
-
function MutableClassicSolver() {
|
|
1422
|
+
var PrologSolverFactory_instance;
|
|
1423
|
+
function PrologSolverFactory_getInstance() {
|
|
1424
|
+
return PrologSolverFactory_instance;
|
|
1425
1425
|
}
|
|
1426
1426
|
function SolutionIterator$Companion$of$lambda(_unused_var__etf5q3, _unused_var__etf5q3_0, _unused_var__etf5q3_1) {
|
|
1427
1427
|
return Unit_instance;
|
|
1428
1428
|
}
|
|
1429
1429
|
function Companion() {
|
|
1430
1430
|
}
|
|
1431
|
-
protoOf(Companion).
|
|
1431
|
+
protoOf(Companion).of_ufxriv_k$ = function (initialState, onStateTransition) {
|
|
1432
1432
|
return new SimpleSolutionIterator(initialState, onStateTransition);
|
|
1433
1433
|
};
|
|
1434
1434
|
protoOf(Companion).of = function (initialState, onStateTransition, $super) {
|
|
@@ -1439,7 +1439,7 @@
|
|
|
1439
1439
|
tmp = onStateTransition;
|
|
1440
1440
|
}
|
|
1441
1441
|
onStateTransition = tmp;
|
|
1442
|
-
return $super === VOID ? this.
|
|
1442
|
+
return $super === VOID ? this.of_ufxriv_k$(initialState, onStateTransition) : $super.of_ufxriv_k$.call(this, initialState, onStateTransition);
|
|
1443
1443
|
};
|
|
1444
1444
|
var Companion_instance_15;
|
|
1445
1445
|
function Companion_getInstance_5() {
|
|
@@ -1470,7 +1470,7 @@
|
|
|
1470
1470
|
function AbstractState$_get_executionTime_$ref_gwd5wm() {
|
|
1471
1471
|
return constructCallableReference(function (p0) {
|
|
1472
1472
|
return p0.get_executionTime_e182qk_k$();
|
|
1473
|
-
}, 1, 0,
|
|
1473
|
+
}, 1, 0, 84);
|
|
1474
1474
|
}
|
|
1475
1475
|
function AbstractState(context) {
|
|
1476
1476
|
this.context_1 = context;
|
|
@@ -1495,7 +1495,7 @@
|
|
|
1495
1495
|
if (this.get_isTimeout_msxjgy_k$()) {
|
|
1496
1496
|
var tmp0_exceededDuration = this.get_context_h02k06_k$().maxDuration_1;
|
|
1497
1497
|
var tmp1_context = this.get_context_h02k06_k$();
|
|
1498
|
-
tmp = new StateHalt(TimeOutException_init_$Create$(VOID, VOID, tmp1_context, tmp0_exceededDuration), this.get_context_h02k06_k$().copy$
|
|
1498
|
+
tmp = new StateHalt(TimeOutException_init_$Create$(VOID, VOID, tmp1_context, tmp0_exceededDuration), this.get_context_h02k06_k$().copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nextStep_nk1ffj_k$()));
|
|
1499
1499
|
} else {
|
|
1500
1500
|
tmp = this.computeNext_3jypca_k$();
|
|
1501
1501
|
}
|
|
@@ -1512,7 +1512,7 @@
|
|
|
1512
1512
|
var this_0 = this.get_context_h02k06_k$().step_1;
|
|
1513
1513
|
return add(this_0, fromInt(1));
|
|
1514
1514
|
};
|
|
1515
|
-
protoOf(AbstractState).
|
|
1515
|
+
protoOf(AbstractState).skipThrow_kuf4pt_k$ = function (_this__u8e3s4) {
|
|
1516
1516
|
var tmp0 = _this__u8e3s4.pathToRoot_1;
|
|
1517
1517
|
var tmp$ret$0;
|
|
1518
1518
|
$l$block: {
|
|
@@ -1548,7 +1548,7 @@
|
|
|
1548
1548
|
var tmp;
|
|
1549
1549
|
// Inline function 'kotlin.let' call
|
|
1550
1550
|
if (choicePoints === null || !choicePoints.get_hasOpenAlternatives_bd9sv_k$()) {
|
|
1551
|
-
tmp = new StateEnd(Companion_instance_8.no(this.context_2.query_1), this.context_2.copy$
|
|
1551
|
+
tmp = new StateEnd(Companion_instance_8.no(this.context_2.query_1), this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nextStep_nk1ffj_k$()));
|
|
1552
1552
|
} else {
|
|
1553
1553
|
var tmp0 = ensureNotNull(choicePoints).get_pathToRoot_5yk1yt_k$();
|
|
1554
1554
|
var tmp$ret$2;
|
|
@@ -1565,7 +1565,7 @@
|
|
|
1565
1565
|
throw NoSuchElementException_init_$Create$_0('Sequence contains no element matching the predicate.');
|
|
1566
1566
|
}
|
|
1567
1567
|
var choicePointContext = tmp$ret$2;
|
|
1568
|
-
var nextContext = choicePointContext.
|
|
1568
|
+
var nextContext = choicePointContext.backtrack_4ek2oe_k$(this.context_2);
|
|
1569
1569
|
var tmp_0;
|
|
1570
1570
|
if (nextContext.primitives_1.get_hasNext_csdx38_k$()) {
|
|
1571
1571
|
tmp_0 = new StatePrimitiveExecution(nextContext);
|
|
@@ -1576,13 +1576,13 @@
|
|
|
1576
1576
|
}
|
|
1577
1577
|
return tmp;
|
|
1578
1578
|
};
|
|
1579
|
-
protoOf(StateBacktracking).
|
|
1580
|
-
return this.
|
|
1579
|
+
protoOf(StateBacktracking).clone_vtwevb_k$ = function (context) {
|
|
1580
|
+
return this.copy_12opsx_k$(context);
|
|
1581
1581
|
};
|
|
1582
1582
|
protoOf(StateBacktracking).clone = function (context, $super) {
|
|
1583
1583
|
return this.clone(context, ($super == null ? true : $super instanceof StateBacktracking) ? $super : THROW_CCE());
|
|
1584
1584
|
};
|
|
1585
|
-
protoOf(StateBacktracking).
|
|
1585
|
+
protoOf(StateBacktracking).copy_12opsx_k$ = function (context) {
|
|
1586
1586
|
return new StateBacktracking(context);
|
|
1587
1587
|
};
|
|
1588
1588
|
protoOf(StateBacktracking).toString = function () {
|
|
@@ -1620,19 +1620,19 @@
|
|
|
1620
1620
|
var tmp0_$this = this.context_3;
|
|
1621
1621
|
var tmp1_step = this.nextStep_nk1ffj_k$();
|
|
1622
1622
|
var tmp2_startTime = this.currentTime_9xyk86_k$();
|
|
1623
|
-
tmp = new StateBacktracking(tmp0_$this.copy$
|
|
1623
|
+
tmp = new StateBacktracking(tmp0_$this.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_startTime, VOID, VOID, VOID, VOID, tmp1_step));
|
|
1624
1624
|
} else {
|
|
1625
1625
|
tmp = protoOf(AbstractEndState).computeNext_3jypca_k$.call(this);
|
|
1626
1626
|
}
|
|
1627
1627
|
return tmp;
|
|
1628
1628
|
};
|
|
1629
|
-
protoOf(StateEnd).
|
|
1630
|
-
return this.
|
|
1629
|
+
protoOf(StateEnd).clone_vtwevb_k$ = function (context) {
|
|
1630
|
+
return this.copy_yabw68_k$(this.solution_2, context);
|
|
1631
1631
|
};
|
|
1632
1632
|
protoOf(StateEnd).clone = function (context, $super) {
|
|
1633
1633
|
return this.clone(context, ($super == null ? true : $super instanceof StateEnd) ? $super : THROW_CCE());
|
|
1634
1634
|
};
|
|
1635
|
-
protoOf(StateEnd).
|
|
1635
|
+
protoOf(StateEnd).copy_yabw68_k$ = function (solution, context) {
|
|
1636
1636
|
return new StateEnd(solution, context);
|
|
1637
1637
|
};
|
|
1638
1638
|
protoOf(StateEnd).toString = function () {
|
|
@@ -1687,10 +1687,10 @@
|
|
|
1687
1687
|
return tmp;
|
|
1688
1688
|
}
|
|
1689
1689
|
function _get_finalState__3aigq8($this) {
|
|
1690
|
-
return new StateHalt(toPublicException($this, $this.exception_1), $this.context_2.copy$
|
|
1690
|
+
return new StateHalt(toPublicException($this, $this.exception_1), $this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.nextStep_nk1ffj_k$()));
|
|
1691
1691
|
}
|
|
1692
1692
|
function _get_handleExceptionInParentContext__yj3v4e($this) {
|
|
1693
|
-
return new StateException($this.exception_1, ensureNotNull($this.context_2.parent_1).copy$
|
|
1693
|
+
return new StateException($this.exception_1, ensureNotNull($this.context_2.parent_1).copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.nextStep_nk1ffj_k$()));
|
|
1694
1694
|
}
|
|
1695
1695
|
function handleStruct($this, unificator, catchGoal, error) {
|
|
1696
1696
|
var tmp;
|
|
@@ -1716,7 +1716,7 @@
|
|
|
1716
1716
|
var tmp2_primitives = Companion_instance_7.empty();
|
|
1717
1717
|
var tmp3_substitution = newSubstitution.castToUnifier();
|
|
1718
1718
|
var tmp4_step = $this.nextStep_nk1ffj_k$();
|
|
1719
|
-
tmp = new StateGoalSelection(tmp0_$this.copy$
|
|
1719
|
+
tmp = new StateGoalSelection(tmp0_$this.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_substitution, VOID, newGoals, tmp1_rules, tmp2_primitives, VOID, VOID, VOID, VOID, VOID, tmp4_step));
|
|
1720
1720
|
} else if ($this.context_2.get_isRoot_ew5h6d_k$()) {
|
|
1721
1721
|
tmp = _get_finalState__3aigq8($this);
|
|
1722
1722
|
} else {
|
|
@@ -1749,13 +1749,13 @@
|
|
|
1749
1749
|
}
|
|
1750
1750
|
return tmp;
|
|
1751
1751
|
};
|
|
1752
|
-
protoOf(StateException).
|
|
1753
|
-
return this.
|
|
1752
|
+
protoOf(StateException).clone_vtwevb_k$ = function (context) {
|
|
1753
|
+
return this.copy_lzz2j2_k$(this.exception_1, context);
|
|
1754
1754
|
};
|
|
1755
1755
|
protoOf(StateException).clone = function (context, $super) {
|
|
1756
1756
|
return this.clone(context, ($super == null ? true : $super instanceof StateException) ? $super : THROW_CCE());
|
|
1757
1757
|
};
|
|
1758
|
-
protoOf(StateException).
|
|
1758
|
+
protoOf(StateException).copy_lzz2j2_k$ = function (exception, context) {
|
|
1759
1759
|
return new StateException(exception, context);
|
|
1760
1760
|
};
|
|
1761
1761
|
protoOf(StateException).toString = function () {
|
|
@@ -1796,7 +1796,7 @@
|
|
|
1796
1796
|
if (this.context_2.goals_1.get_isOver_ew3p5z_k$()) {
|
|
1797
1797
|
var tmp_0;
|
|
1798
1798
|
if (this.context_2.get_isRoot_ew5h6d_k$()) {
|
|
1799
|
-
tmp_0 = new StateEnd(Companion_instance_8.yes_cwt97u_k$(this.context_2.query_1, this.context_2.substitution_1), this.context_2.copy$
|
|
1799
|
+
tmp_0 = new StateEnd(Companion_instance_8.yes_cwt97u_k$(this.context_2.query_1, this.context_2.substitution_1), this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nextStep_nk1ffj_k$()));
|
|
1800
1800
|
} else {
|
|
1801
1801
|
// Inline function 'kotlin.let' call
|
|
1802
1802
|
var it = ensureNotNull(this.context_2.parent_1);
|
|
@@ -1814,24 +1814,24 @@
|
|
|
1814
1814
|
var tmp11_outputChannels = this.context_2.outputChannels_1;
|
|
1815
1815
|
var tmp12_libraries = this.context_2.libraries_1;
|
|
1816
1816
|
var tmp13_customData = this.context_2.customData_1;
|
|
1817
|
-
var tmp$ret$0 = it.copy$
|
|
1817
|
+
var tmp$ret$0 = it.copy$default_dhd9rp_k$(tmp6_procedure, VOID, tmp12_libraries, tmp1_flags, tmp3_staticKb, tmp2_dynamicKb, tmp9_operators, tmp10_inputChannels, tmp11_outputChannels, tmp13_customData, tmp4_substitution, VOID, tmp5_goals, VOID, VOID, tmp8_startTime, VOID, tmp0_choicePoints, VOID, VOID, tmp7_step);
|
|
1818
1818
|
tmp_0 = new StateGoalSelection(tmp$ret$0);
|
|
1819
1819
|
}
|
|
1820
1820
|
tmp = tmp_0;
|
|
1821
1821
|
} else if (equals(this.context_2.flags_1.get(TrackVariables_getInstance()), TrackVariables_getInstance().ON_1)) {
|
|
1822
|
-
tmp = new StatePrimitiveSelection(this.context_2.copy$
|
|
1822
|
+
tmp = new StatePrimitiveSelection(this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nextStep_nk1ffj_k$(), plus_1(this.context_2.relevantVariables_1, toSet(ensureNotNull(this.context_2.goals_1.get_current_jwi6j4_k$()).get_variables_75f0zy_k$()))));
|
|
1823
1823
|
} else {
|
|
1824
|
-
tmp = new StatePrimitiveSelection(this.context_2.copy$
|
|
1824
|
+
tmp = new StatePrimitiveSelection(this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nextStep_nk1ffj_k$()));
|
|
1825
1825
|
}
|
|
1826
1826
|
return tmp;
|
|
1827
1827
|
};
|
|
1828
|
-
protoOf(StateGoalSelection).
|
|
1829
|
-
return this.
|
|
1828
|
+
protoOf(StateGoalSelection).clone_vtwevb_k$ = function (context) {
|
|
1829
|
+
return this.copy_12opsx_k$(context);
|
|
1830
1830
|
};
|
|
1831
1831
|
protoOf(StateGoalSelection).clone = function (context, $super) {
|
|
1832
1832
|
return this.clone(context, ($super == null ? true : $super instanceof StateGoalSelection) ? $super : THROW_CCE());
|
|
1833
1833
|
};
|
|
1834
|
-
protoOf(StateGoalSelection).
|
|
1834
|
+
protoOf(StateGoalSelection).copy_12opsx_k$ = function (context) {
|
|
1835
1835
|
return new StateGoalSelection(context);
|
|
1836
1836
|
};
|
|
1837
1837
|
protoOf(StateGoalSelection).toString = function () {
|
|
@@ -1857,13 +1857,13 @@
|
|
|
1857
1857
|
protoOf(StateHalt).get_context_h02k06_k$ = function () {
|
|
1858
1858
|
return this.context_3;
|
|
1859
1859
|
};
|
|
1860
|
-
protoOf(StateHalt).
|
|
1861
|
-
return this.
|
|
1860
|
+
protoOf(StateHalt).clone_vtwevb_k$ = function (context) {
|
|
1861
|
+
return this.copy_lzz2j2_k$(this.exception_1, context);
|
|
1862
1862
|
};
|
|
1863
1863
|
protoOf(StateHalt).clone = function (context, $super) {
|
|
1864
1864
|
return this.clone(context, ($super == null ? true : $super instanceof StateHalt) ? $super : THROW_CCE());
|
|
1865
1865
|
};
|
|
1866
|
-
protoOf(StateHalt).
|
|
1866
|
+
protoOf(StateHalt).copy_lzz2j2_k$ = function (exception, context) {
|
|
1867
1867
|
return new StateHalt(exception, context);
|
|
1868
1868
|
};
|
|
1869
1869
|
protoOf(StateHalt).toString = function () {
|
|
@@ -1903,15 +1903,15 @@
|
|
|
1903
1903
|
var tmp4_substitution = Companion_getInstance_2().empty();
|
|
1904
1904
|
var tmp5_customData = this.context_2.customData_1.preservePersistent();
|
|
1905
1905
|
var tmp6_relevantVariables = emptySet();
|
|
1906
|
-
return new StateGoalSelection(appendRulesAndChoicePoints(tmp0_$this.copy$
|
|
1906
|
+
return new StateGoalSelection(appendRulesAndChoicePoints(tmp0_$this.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp5_customData, tmp4_substitution, VOID, tmp1_goals, tmp2_rules, tmp3_primitives, VOID, VOID, null, null, 0, 1n, tmp6_relevantVariables), Companion_instance_7.empty()));
|
|
1907
1907
|
};
|
|
1908
|
-
protoOf(StateInit).
|
|
1909
|
-
return this.
|
|
1908
|
+
protoOf(StateInit).clone_vtwevb_k$ = function (context) {
|
|
1909
|
+
return this.copy_12opsx_k$(context);
|
|
1910
1910
|
};
|
|
1911
1911
|
protoOf(StateInit).clone = function (context, $super) {
|
|
1912
1912
|
return this.clone(context, ($super == null ? true : $super instanceof StateInit) ? $super : THROW_CCE());
|
|
1913
1913
|
};
|
|
1914
|
-
protoOf(StateInit).
|
|
1914
|
+
protoOf(StateInit).copy_12opsx_k$ = function (context) {
|
|
1915
1915
|
return new StateInit(context);
|
|
1916
1916
|
};
|
|
1917
1917
|
protoOf(StateInit).toString = function () {
|
|
@@ -1950,7 +1950,7 @@
|
|
|
1950
1950
|
var tmp_1 = substitution == null ? $receiver.substitution_1 : substitution;
|
|
1951
1951
|
var tmp7_substitution = isInterface(tmp_1, Unifier) ? tmp_1 : THROW_CCE();
|
|
1952
1952
|
var tmp8_step = $this.nextStep_nk1ffj_k$();
|
|
1953
|
-
return ctx.copy$
|
|
1953
|
+
return ctx.copy$default_dhd9rp_k$(tmp5_procedure, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp7_substitution, VOID, tmp4_goals, VOID, tmp6_primitives, VOID, VOID, VOID, VOID, VOID, tmp8_step);
|
|
1954
1954
|
}
|
|
1955
1955
|
function StatePrimitiveExecution$copyFromCurrentPrimitive$lambda(it) {
|
|
1956
1956
|
return it.procedure_1;
|
|
@@ -1967,7 +1967,7 @@
|
|
|
1967
1967
|
}
|
|
1968
1968
|
function StatePrimitiveExecution$computeNext$lambda_1(this$0) {
|
|
1969
1969
|
return function (it) {
|
|
1970
|
-
return new StateException(it.get_exception_x0n6w6_k$().updateLastContext(this$0.
|
|
1970
|
+
return new StateException(it.get_exception_x0n6w6_k$().updateLastContext(this$0.skipThrow_kuf4pt_k$(this$0.context_2)), copyFromCurrentPrimitive(this$0, this$0.context_2));
|
|
1971
1971
|
};
|
|
1972
1972
|
}
|
|
1973
1973
|
function StatePrimitiveExecution$computeNext$lambda_2(it) {
|
|
@@ -2000,7 +2000,7 @@
|
|
|
2000
2000
|
var tmp_4;
|
|
2001
2001
|
if ($p instanceof ResolutionException) {
|
|
2002
2002
|
var exception = $p;
|
|
2003
|
-
tmp_4 = new StateException(exception.updateLastContext(this.
|
|
2003
|
+
tmp_4 = new StateException(exception.updateLastContext(this.skipThrow_kuf4pt_k$(this.context_2)), this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nextStep_nk1ffj_k$()));
|
|
2004
2004
|
} else {
|
|
2005
2005
|
throw $p;
|
|
2006
2006
|
}
|
|
@@ -2008,13 +2008,13 @@
|
|
|
2008
2008
|
}
|
|
2009
2009
|
return tmp;
|
|
2010
2010
|
};
|
|
2011
|
-
protoOf(StatePrimitiveExecution).
|
|
2012
|
-
return this.
|
|
2011
|
+
protoOf(StatePrimitiveExecution).clone_vtwevb_k$ = function (context) {
|
|
2012
|
+
return this.copy_12opsx_k$(context);
|
|
2013
2013
|
};
|
|
2014
2014
|
protoOf(StatePrimitiveExecution).clone = function (context, $super) {
|
|
2015
2015
|
return this.clone(context, ($super == null ? true : $super instanceof StatePrimitiveExecution) ? $super : THROW_CCE());
|
|
2016
2016
|
};
|
|
2017
|
-
protoOf(StatePrimitiveExecution).
|
|
2017
|
+
protoOf(StatePrimitiveExecution).copy_12opsx_k$ = function (context) {
|
|
2018
2018
|
return new StatePrimitiveExecution(context);
|
|
2019
2019
|
};
|
|
2020
2020
|
protoOf(StatePrimitiveExecution).toString = function () {
|
|
@@ -2033,7 +2033,7 @@
|
|
|
2033
2033
|
return true;
|
|
2034
2034
|
};
|
|
2035
2035
|
function exceptionalState($this, exception) {
|
|
2036
|
-
return new StateException(exception, $this.context_2.copy$
|
|
2036
|
+
return new StateException(exception, $this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.nextStep_nk1ffj_k$()));
|
|
2037
2037
|
}
|
|
2038
2038
|
function StatePrimitiveSelection(context) {
|
|
2039
2039
|
AbstractState.call(this, context);
|
|
@@ -2074,7 +2074,7 @@
|
|
|
2074
2074
|
var tmp_3;
|
|
2075
2075
|
if ($p instanceof ResolutionException) {
|
|
2076
2076
|
var exception = $p;
|
|
2077
|
-
tmp_3 = exceptionalState(this, exception.updateLastContext(this.
|
|
2077
|
+
tmp_3 = exceptionalState(this, exception.updateLastContext(this.skipThrow_kuf4pt_k$(childContext)));
|
|
2078
2078
|
} else {
|
|
2079
2079
|
throw $p;
|
|
2080
2080
|
}
|
|
@@ -2082,7 +2082,7 @@
|
|
|
2082
2082
|
}
|
|
2083
2083
|
tmp_0 = tmp_1;
|
|
2084
2084
|
} else {
|
|
2085
|
-
tmp_0 = new StateRuleSelection(this.context_2.copy$
|
|
2085
|
+
tmp_0 = new StateRuleSelection(this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nextStep_nk1ffj_k$()));
|
|
2086
2086
|
}
|
|
2087
2087
|
tmp = tmp_0;
|
|
2088
2088
|
} else {
|
|
@@ -2093,13 +2093,13 @@
|
|
|
2093
2093
|
}
|
|
2094
2094
|
return tmp;
|
|
2095
2095
|
};
|
|
2096
|
-
protoOf(StatePrimitiveSelection).
|
|
2097
|
-
return this.
|
|
2096
|
+
protoOf(StatePrimitiveSelection).clone_vtwevb_k$ = function (context) {
|
|
2097
|
+
return this.copy_12opsx_k$(context);
|
|
2098
2098
|
};
|
|
2099
2099
|
protoOf(StatePrimitiveSelection).clone = function (context, $super) {
|
|
2100
2100
|
return this.clone(context, ($super == null ? true : $super instanceof StatePrimitiveSelection) ? $super : THROW_CCE());
|
|
2101
2101
|
};
|
|
2102
|
-
protoOf(StatePrimitiveSelection).
|
|
2102
|
+
protoOf(StatePrimitiveSelection).copy_12opsx_k$ = function (context) {
|
|
2103
2103
|
return new StatePrimitiveSelection(context);
|
|
2104
2104
|
};
|
|
2105
2105
|
protoOf(StatePrimitiveSelection).toString = function () {
|
|
@@ -2118,7 +2118,7 @@
|
|
|
2118
2118
|
return true;
|
|
2119
2119
|
};
|
|
2120
2120
|
function _get_failureState__yid9tw($this) {
|
|
2121
|
-
return new StateBacktracking($this.context_2.copy$
|
|
2121
|
+
return new StateBacktracking($this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_instance_7.empty(), VOID, VOID, VOID, VOID, VOID, VOID, $this.nextStep_nk1ffj_k$()));
|
|
2122
2122
|
}
|
|
2123
2123
|
function StateRuleExecution(context) {
|
|
2124
2124
|
AbstractState.call(this, context);
|
|
@@ -2139,19 +2139,19 @@
|
|
|
2139
2139
|
var tmp1_goals = toGoals(subGoals);
|
|
2140
2140
|
var tmp2_rules = Companion_instance_7.empty();
|
|
2141
2141
|
var tmp3_step = this.nextStep_nk1ffj_k$();
|
|
2142
|
-
tmp = new StateGoalSelection(tmp0_$this.copy$
|
|
2142
|
+
tmp = new StateGoalSelection(tmp0_$this.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, newSubstitution, VOID, tmp1_goals, tmp2_rules, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_step));
|
|
2143
2143
|
} else {
|
|
2144
2144
|
tmp = _get_failureState__yid9tw(this);
|
|
2145
2145
|
}
|
|
2146
2146
|
return tmp;
|
|
2147
2147
|
};
|
|
2148
|
-
protoOf(StateRuleExecution).
|
|
2149
|
-
return this.
|
|
2148
|
+
protoOf(StateRuleExecution).clone_vtwevb_k$ = function (context) {
|
|
2149
|
+
return this.copy_12opsx_k$(context);
|
|
2150
2150
|
};
|
|
2151
2151
|
protoOf(StateRuleExecution).clone = function (context, $super) {
|
|
2152
2152
|
return this.clone(context, ($super == null ? true : $super instanceof StateRuleExecution) ? $super : THROW_CCE());
|
|
2153
2153
|
};
|
|
2154
|
-
protoOf(StateRuleExecution).
|
|
2154
|
+
protoOf(StateRuleExecution).copy_12opsx_k$ = function (context) {
|
|
2155
2155
|
return new StateRuleExecution(context);
|
|
2156
2156
|
};
|
|
2157
2157
|
protoOf(StateRuleExecution).toString = function () {
|
|
@@ -2218,10 +2218,10 @@
|
|
|
2218
2218
|
return Companion_instance_16;
|
|
2219
2219
|
}
|
|
2220
2220
|
function _get_failureState__yid9tw_0($this) {
|
|
2221
|
-
return new StateBacktracking($this.context_2.copy$
|
|
2221
|
+
return new StateBacktracking($this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.nextStep_nk1ffj_k$()));
|
|
2222
2222
|
}
|
|
2223
2223
|
function exceptionalState_0($this, exception) {
|
|
2224
|
-
return new StateException(exception, $this.context_2.copy$
|
|
2224
|
+
return new StateException(exception, $this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.nextStep_nk1ffj_k$()));
|
|
2225
2225
|
}
|
|
2226
2226
|
function missingProcedure($this, ruleSources, missing) {
|
|
2227
2227
|
var unknown = $this.context_2.flags_1.get(Unknown_getInstance());
|
|
@@ -2264,7 +2264,7 @@
|
|
|
2264
2264
|
return tmp;
|
|
2265
2265
|
}
|
|
2266
2266
|
function _get_ignoreState__t4wl8y($this) {
|
|
2267
|
-
return new StateGoalSelection($this.context_2.copy$
|
|
2267
|
+
return new StateGoalSelection($this.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.context_2.goals_1.get_next_wor1vg_k$(), VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.nextStep_nk1ffj_k$()));
|
|
2268
2268
|
}
|
|
2269
2269
|
function isCut($this, $receiver) {
|
|
2270
2270
|
return $receiver.get_isAtom_evuq3o_k$() && $receiver.castToAtom().get_value_j01efc_k$() === '!';
|
|
@@ -2422,7 +2422,7 @@
|
|
|
2422
2422
|
var cutLimit = computeCutLimit(this, $this$with, currentGoalStruct instanceof MagicCut);
|
|
2423
2423
|
// Inline function 'kotlin.let' call
|
|
2424
2424
|
var it = _get_ignoreState__t4wl8y(this);
|
|
2425
|
-
tmp_0 = it.
|
|
2425
|
+
tmp_0 = it.copy_12opsx_k$(it.context_2.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, performCut(this, it.context_2.choicePoints_1, cutLimit)));
|
|
2426
2426
|
} else {
|
|
2427
2427
|
var tmp$ret$4;
|
|
2428
2428
|
$l$block: {
|
|
@@ -2457,13 +2457,13 @@
|
|
|
2457
2457
|
}
|
|
2458
2458
|
return tmp;
|
|
2459
2459
|
};
|
|
2460
|
-
protoOf(StateRuleSelection).
|
|
2461
|
-
return this.
|
|
2460
|
+
protoOf(StateRuleSelection).clone_vtwevb_k$ = function (context) {
|
|
2461
|
+
return this.copy_12opsx_k$(context);
|
|
2462
2462
|
};
|
|
2463
2463
|
protoOf(StateRuleSelection).clone = function (context, $super) {
|
|
2464
2464
|
return this.clone(context, ($super == null ? true : $super instanceof StateRuleSelection) ? $super : THROW_CCE());
|
|
2465
2465
|
};
|
|
2466
|
-
protoOf(StateRuleSelection).
|
|
2466
|
+
protoOf(StateRuleSelection).copy_12opsx_k$ = function (context) {
|
|
2467
2467
|
return new StateRuleSelection(context);
|
|
2468
2468
|
};
|
|
2469
2469
|
protoOf(StateRuleSelection).toString = function () {
|
|
@@ -2489,7 +2489,7 @@
|
|
|
2489
2489
|
tmp = appendRules(_this__u8e3s4.choicePoints_1, Companion_instance_7.empty(), _this__u8e3s4);
|
|
2490
2490
|
}
|
|
2491
2491
|
var newChoicePointContext = tmp;
|
|
2492
|
-
return _this__u8e3s4.copy$
|
|
2492
|
+
return _this__u8e3s4.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, rules, VOID, VOID, VOID, newChoicePointContext);
|
|
2493
2493
|
}
|
|
2494
2494
|
function toGoals(_this__u8e3s4) {
|
|
2495
2495
|
var tmp = unfoldGoals(_this__u8e3s4);
|
|
@@ -2515,7 +2515,7 @@
|
|
|
2515
2515
|
var this_0 = _this__u8e3s4.step_1;
|
|
2516
2516
|
var tmp3_step = add(this_0, fromInt(1));
|
|
2517
2517
|
var tmp4_relevantVariables = emptySet();
|
|
2518
|
-
return _this__u8e3s4.copy$
|
|
2518
|
+
return _this__u8e3s4.copy$default_dhd9rp_k$(tmp1_procedure, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_goals, VOID, VOID, VOID, VOID, VOID, _this__u8e3s4, tmp2_depth, tmp3_step, tmp4_relevantVariables);
|
|
2519
2519
|
}
|
|
2520
2520
|
function toRequest(_this__u8e3s4, goal, signature, startTime) {
|
|
2521
2521
|
return new Request(signature, goal.get_argsList_cw1bs4_k$(), _this__u8e3s4, startTime);
|
|
@@ -2528,7 +2528,7 @@
|
|
|
2528
2528
|
tmp = appendPrimitives(_this__u8e3s4.choicePoints_1, Companion_instance_7.empty(), _this__u8e3s4);
|
|
2529
2529
|
}
|
|
2530
2530
|
var newChoicePointContext = tmp;
|
|
2531
|
-
return _this__u8e3s4.copy$
|
|
2531
|
+
return _this__u8e3s4.copy$default_dhd9rp_k$(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, primitiveExecutions, VOID, VOID, newChoicePointContext);
|
|
2532
2532
|
}
|
|
2533
2533
|
function replaceWithChildAppendingRulesAndChoicePoints(_this__u8e3s4, rules, inferProcedureFromGoals) {
|
|
2534
2534
|
inferProcedureFromGoals = inferProcedureFromGoals === VOID ? true : inferProcedureFromGoals;
|
|
@@ -2552,7 +2552,7 @@
|
|
|
2552
2552
|
// Inline function 'kotlin.Long.plus' call
|
|
2553
2553
|
var this_0 = _this__u8e3s4.step_1;
|
|
2554
2554
|
var tmp3_step = add(this_0, fromInt(1));
|
|
2555
|
-
return _this__u8e3s4.copy$
|
|
2555
|
+
return _this__u8e3s4.copy$default_dhd9rp_k$(tmp1_procedure, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_goals, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_depth, tmp3_step);
|
|
2556
2556
|
}
|
|
2557
2557
|
function toGoals$lambda(it) {
|
|
2558
2558
|
return it.get_isVar_it73p0_k$() ? Companion_getInstance_1().of('call', [it]) : it;
|
|
@@ -2584,24 +2584,24 @@
|
|
|
2584
2584
|
var tmp = this;
|
|
2585
2585
|
var tmp_0 = this.state_1;
|
|
2586
2586
|
this.step_1 = add(this.step_1, get_ONE());
|
|
2587
|
-
tmp.state_1 = this.
|
|
2587
|
+
tmp.state_1 = this.computeNextState_8cwr8s_k$(tmp_0, this.step_1);
|
|
2588
2588
|
this.onStateTransition(previousState, this.state_1, this.step_1);
|
|
2589
2589
|
}
|
|
2590
2590
|
while (!this.state_1.get_isEndState_4xsqt3_k$());
|
|
2591
|
-
return this.state_1.castToEndState().get_solution_74o532_k$()
|
|
2591
|
+
return this.state_1.castToEndState().get_solution_74o532_k$();
|
|
2592
2592
|
};
|
|
2593
2593
|
function SimpleSolutionIterator(state, onStateTransitionCallback) {
|
|
2594
2594
|
AbstractSolutionIterator.call(this, state);
|
|
2595
2595
|
this.onStateTransitionCallback_1 = onStateTransitionCallback;
|
|
2596
2596
|
}
|
|
2597
|
-
protoOf(SimpleSolutionIterator).
|
|
2597
|
+
protoOf(SimpleSolutionIterator).computeNextState_8cwr8s_k$ = function (state, step) {
|
|
2598
2598
|
return state.next();
|
|
2599
2599
|
};
|
|
2600
|
-
protoOf(SimpleSolutionIterator).
|
|
2600
|
+
protoOf(SimpleSolutionIterator).onStateTransition_3p71d1_k$ = function (source, destination, index) {
|
|
2601
2601
|
return this.onStateTransitionCallback_1(source, destination, index);
|
|
2602
2602
|
};
|
|
2603
2603
|
protoOf(SimpleSolutionIterator).onStateTransition = function (source, destination, index) {
|
|
2604
|
-
return this.
|
|
2604
|
+
return this.onStateTransition_3p71d1_k$(source, destination, index);
|
|
2605
2605
|
};
|
|
2606
2606
|
function DefaultBuiltins() {
|
|
2607
2607
|
DefaultBuiltins_instance = this;
|
|
@@ -2639,19 +2639,23 @@
|
|
|
2639
2639
|
var tmp_3 = error.get(0);
|
|
2640
2640
|
tmp = tmp_2.of(VOID, VOID, context, isInterface(tmp_3, Struct) ? tmp_3 : THROW_CCE(), error.get_arity_iosiic_k$() > 1 ? error.get(1) : null);
|
|
2641
2641
|
} else {
|
|
2642
|
-
tmp = Companion_instance_13.of$
|
|
2642
|
+
tmp = Companion_instance_13.of$default_vl9w5n_k$(error, context);
|
|
2643
2643
|
}
|
|
2644
2644
|
return tmp;
|
|
2645
2645
|
}
|
|
2646
2646
|
function Throw() {
|
|
2647
2647
|
Throw_instance = this;
|
|
2648
2648
|
UnaryPredicate.call(this, 'throw');
|
|
2649
|
+
this.help_1 = '`throw(+Ball)`\n\nRaises `Ball` as an exception: resolution unwinds to the innermost enclosing `catch/3` whose catcher unifies with `Ball`, or halts the query if none does. A ball shaped like `error(Type, Context)` (or `error(Type)`) is raised as the standard error of that `Type`, any other term as a user-defined exception carrying it. `Ball` must be instantiated, otherwise an instantiation error is raised instead.\n\n**Examples**\n\n```prolog\n?- catch(throw(my_error), E, true).\nE = my_error.\n\n?- throw(error(type_error(integer, a), my_context)).\nthrows error(type_error(integer, a), _).\n\n?- throw(_).\nthrows error(instantiation_error, _).\n```';
|
|
2649
2650
|
}
|
|
2650
|
-
protoOf(Throw).
|
|
2651
|
+
protoOf(Throw).get_help_won7nu_k$ = function () {
|
|
2652
|
+
return this.help_1;
|
|
2653
|
+
};
|
|
2654
|
+
protoOf(Throw).computeAll_ulc70n_k$ = function (_this__u8e3s4, first) {
|
|
2651
2655
|
return sequenceOf_0(Companion_getInstance_4().ensuringAllArgumentsAreInstantiated_60kzw2_k$(_this__u8e3s4).replyException(handleError(this, _this__u8e3s4.context, _this__u8e3s4.arguments.get_c1px32_k$(0)), VOID, []));
|
|
2652
2656
|
};
|
|
2653
|
-
protoOf(Throw).
|
|
2654
|
-
return this.
|
|
2657
|
+
protoOf(Throw).computeAll_1ge9ky_k$ = function (_this__u8e3s4, first) {
|
|
2658
|
+
return this.computeAll_ulc70n_k$(_this__u8e3s4, first);
|
|
2655
2659
|
};
|
|
2656
2660
|
var Throw_instance;
|
|
2657
2661
|
function Throw_getInstance() {
|
|
@@ -2662,7 +2666,11 @@
|
|
|
2662
2666
|
function Call() {
|
|
2663
2667
|
Call_instance = this;
|
|
2664
2668
|
RuleWrapper_init_$Init$('call', 1, VOID, this);
|
|
2669
|
+
this.help_1 = '`call(+Goal)`\n\nCalls `Goal`, which allows executing terms built or bound at runtime. `Goal` must be callable: a variable raises an instantiation error, a number or other non-callable term a type error (`callable`). `call/1` is opaque to cut: a `!` inside `Goal` only prunes the choice points created by `Goal` itself.\n\n**Examples**\n\n```prolog\n?- G = member(X, [a, b]), call(G).\nX = a ; X = b.\n\n?- findall(X, (member(X, [1, 2, 3]), call(!)), L).\nL = [1, 2, 3].\n\n?- call(1).\nthrows error(type_error(callable, 1), _).\n```';
|
|
2665
2670
|
}
|
|
2671
|
+
protoOf(Call).get_help_won7nu_k$ = function () {
|
|
2672
|
+
return this.help_1;
|
|
2673
|
+
};
|
|
2666
2674
|
protoOf(Call).get_head_btpmqe_k$ = function (_this__u8e3s4) {
|
|
2667
2675
|
return listOf(_this__u8e3s4.varOf('G'));
|
|
2668
2676
|
};
|
|
@@ -2680,7 +2688,11 @@
|
|
|
2680
2688
|
function Catch() {
|
|
2681
2689
|
Catch_instance = this;
|
|
2682
2690
|
RuleWrapper_init_$Init$('catch', 3, VOID, this);
|
|
2691
|
+
this.help_1 = '`catch(+Goal, ?Catcher, +Recovery)`\n\nCalls `Goal`, behaving exactly like `call/1` (including backtracking into `Goal`) as long as no exception is raised. If proving `Goal` raises an exception, via `throw/1` or a built-in error, whose ball unifies with `Catcher`, the bindings and choice points created by `Goal` are discarded and `Recovery` is called instead; otherwise the exception propagates to the outer `catch/3` calls.\n\n**Examples**\n\n```prolog\n?- catch(X is 1 / 0, error(E, _), true).\nE = evaluation_error(zero_divisor).\n\n?- catch(throw(oops), oops, X = recovered).\nX = recovered.\n\n?- catch(member(X, [1, 2]), _, true).\nX = 1 ; X = 2.\n\n?- catch(catch(throw(oops), other, true), E, true).\nE = oops.\n```';
|
|
2683
2692
|
}
|
|
2693
|
+
protoOf(Catch).get_help_won7nu_k$ = function () {
|
|
2694
|
+
return this.help_1;
|
|
2695
|
+
};
|
|
2684
2696
|
protoOf(Catch).get_head_btpmqe_k$ = function (_this__u8e3s4) {
|
|
2685
2697
|
return listOf_0([_this__u8e3s4.varOf('G'), _this__u8e3s4.varOf('E'), _this__u8e3s4.varOf('C')]);
|
|
2686
2698
|
};
|
|
@@ -2696,7 +2708,11 @@
|
|
|
2696
2708
|
function Comma() {
|
|
2697
2709
|
Comma_instance = this;
|
|
2698
2710
|
RuleWrapper_init_$Init$(',', 2, VOID, this);
|
|
2711
|
+
this.help_1 = '`(+First, +Second)`\n\nConjunction: proves `First` and then `Second`, backtracking into `First` for further solutions whenever `Second` fails. Conjunction is transparent to cut: a `!` occurring in either conjunct cuts the clause in which the conjunction appears.\n\n**Examples**\n\n```prolog\n?- X = 1, Y is X + 1.\nX = 1, Y = 2.\n\n?- member(X, [1, 2, 3]), X > 1.\nX = 2 ; X = 3.\n\n?- X = 1, X = 2.\nno.\n```';
|
|
2699
2712
|
}
|
|
2713
|
+
protoOf(Comma).get_help_won7nu_k$ = function () {
|
|
2714
|
+
return this.help_1;
|
|
2715
|
+
};
|
|
2700
2716
|
protoOf(Comma).get_head_btpmqe_k$ = function (_this__u8e3s4) {
|
|
2701
2717
|
return listOf_0([_this__u8e3s4.varOf('A'), _this__u8e3s4.varOf('B')]);
|
|
2702
2718
|
};
|
|
@@ -2712,7 +2728,11 @@
|
|
|
2712
2728
|
function Cut() {
|
|
2713
2729
|
Cut_instance = this;
|
|
2714
2730
|
RuleWrapper_init_$Init$('!', 0, VOID, this);
|
|
2731
|
+
this.help_1 = '`!`\n\nCut: always succeeds, committing to the choices made since the current clause was selected. The remaining alternative clauses of the predicate being proved, and the remaining alternatives of the goals at the left of `!` in the clause body, are discarded. Within `call/1`, `\\+/1`, `findall/3` and similar meta-calls, cut is local to the called goal.\n\n**Examples**\n\n```prolog\n?- assertz((first(X) :- member(X, [a, b, c]), !)), findall(X, first(X), L).\nL = [a].\n\n?- findall(X, (member(X, [a, b, c]), !), L).\nL = [a].\n\n?- findall(X, (member(X, [a, b, c]), call(!)), L).\nL = [a, b, c].\n```';
|
|
2715
2732
|
}
|
|
2733
|
+
protoOf(Cut).get_help_won7nu_k$ = function () {
|
|
2734
|
+
return this.help_1;
|
|
2735
|
+
};
|
|
2716
2736
|
var Cut_instance;
|
|
2717
2737
|
function Cut_getInstance() {
|
|
2718
2738
|
if (Cut_instance == null)
|
|
@@ -2760,45 +2780,49 @@
|
|
|
2760
2780
|
}
|
|
2761
2781
|
function NegationAsFailure() {
|
|
2762
2782
|
RuleWrapper_init_$Init$('\\+', 1, VOID, this);
|
|
2783
|
+
this.help_1 = '`\\+ +Goal`\n\nNegation as failure: succeeds if `Goal` has no solution, and fails as soon as `Goal` has one. It never binds the variables of `Goal`, and is equivalent to `not/1`. `Goal` must be callable, otherwise an instantiation or type error is raised.\n\n**Examples**\n\n```prolog\n?- \\+ member(d, [a, b, c]).\nyes.\n\n?- \\+ X = 1.\nno.\n\n?- \\+ (X = 1, X = 2), var(X).\nyes.\n\n?- \\+ 3.\nthrows error(type_error(callable, 3), _).\n```';
|
|
2763
2784
|
}
|
|
2785
|
+
protoOf(NegationAsFailure).get_help_won7nu_k$ = function () {
|
|
2786
|
+
return this.help_1;
|
|
2787
|
+
};
|
|
2764
2788
|
protoOf(NegationAsFailure).get_head_btpmqe_k$ = function (_this__u8e3s4) {
|
|
2765
2789
|
return listOf(_this__u8e3s4.varOf('X'));
|
|
2766
2790
|
};
|
|
2767
2791
|
//region block: post-declaration
|
|
2768
|
-
protoOf(
|
|
2769
|
-
protoOf(
|
|
2770
|
-
protoOf(
|
|
2771
|
-
protoOf(
|
|
2772
|
-
protoOf(
|
|
2773
|
-
protoOf(
|
|
2774
|
-
protoOf(
|
|
2775
|
-
protoOf(
|
|
2776
|
-
protoOf(
|
|
2777
|
-
protoOf(
|
|
2778
|
-
protoOf(
|
|
2779
|
-
protoOf(
|
|
2780
|
-
protoOf(
|
|
2781
|
-
protoOf(
|
|
2782
|
-
protoOf(
|
|
2783
|
-
protoOf(
|
|
2784
|
-
protoOf(
|
|
2785
|
-
protoOf(
|
|
2786
|
-
protoOf(
|
|
2787
|
-
protoOf(
|
|
2788
|
-
protoOf(
|
|
2789
|
-
protoOf(
|
|
2790
|
-
protoOf(
|
|
2791
|
-
protoOf(
|
|
2792
|
-
protoOf(
|
|
2793
|
-
protoOf(
|
|
2794
|
-
protoOf(
|
|
2795
|
-
protoOf(
|
|
2796
|
-
protoOf(
|
|
2797
|
-
protoOf(
|
|
2798
|
-
protoOf(
|
|
2799
|
-
protoOf(
|
|
2800
|
-
protoOf(
|
|
2801
|
-
protoOf(
|
|
2792
|
+
protoOf(MutablePrologSolver).loadStaticClauses = loadStaticClauses;
|
|
2793
|
+
protoOf(MutablePrologSolver).loadStaticClausesIterable = loadStaticClausesIterable;
|
|
2794
|
+
protoOf(MutablePrologSolver).loadStaticClausesSequence = loadStaticClausesSequence;
|
|
2795
|
+
protoOf(MutablePrologSolver).loadDynamicClauses = loadDynamicClauses;
|
|
2796
|
+
protoOf(MutablePrologSolver).loadDynamicClausesIterable = loadDynamicClausesIterable;
|
|
2797
|
+
protoOf(MutablePrologSolver).loadDynamicClausesSequence = loadDynamicClausesSequence;
|
|
2798
|
+
protoOf(PrologExecutionContext).createSolver = createSolver;
|
|
2799
|
+
protoOf(PrologExecutionContext).createMutableSolver = createMutableSolver;
|
|
2800
|
+
protoOf(PrologExecutionContext).update = update;
|
|
2801
|
+
protoOf(PrologExecutionContext).get_standardInput_yibe3g_k$ = get_standardInput;
|
|
2802
|
+
protoOf(PrologExecutionContext).get_standardOutput_1cxkgp_k$ = get_standardOutput;
|
|
2803
|
+
protoOf(PrologExecutionContext).get_standardError_ykfz6m_k$ = get_standardError;
|
|
2804
|
+
protoOf(PrologExecutionContext).get_warnings_nkdx40_k$ = get_warnings;
|
|
2805
|
+
protoOf(PrologExecutionContext).get_endTime_pbcuqp_k$ = get_endTime;
|
|
2806
|
+
protoOf(PrologExecutionContext).get_remainingTime_6e6md6_k$ = get_remainingTime;
|
|
2807
|
+
protoOf(PrologExecutionContext).get_elapsedTime_5vfaps_k$ = get_elapsedTime;
|
|
2808
|
+
protoOf(PrologSolverFactory).rawSolverOf = rawSolverOf;
|
|
2809
|
+
protoOf(PrologSolverFactory).solverOf = solverOf;
|
|
2810
|
+
protoOf(PrologSolverFactory).mutableSolverOf = mutableSolverOf;
|
|
2811
|
+
protoOf(PrologSolverFactory).rawMutableSolverOf = rawMutableSolverOf;
|
|
2812
|
+
protoOf(PrologSolverFactory).newBuilder = newBuilder;
|
|
2813
|
+
protoOf(PrologSolverFactory).get_defaultRuntime_l4gjfk_k$ = get_defaultRuntime;
|
|
2814
|
+
protoOf(PrologSolverFactory).get_defaultUnificator_ub4hy6_k$ = get_defaultUnificator;
|
|
2815
|
+
protoOf(PrologSolverFactory).get_defaultFlags_6lgyr5_k$ = get_defaultFlags;
|
|
2816
|
+
protoOf(PrologSolverFactory).get_defaultStaticKb_njv4d9_k$ = get_defaultStaticKb;
|
|
2817
|
+
protoOf(PrologSolverFactory).get_defaultDynamicKb_ctuo3i_k$ = get_defaultDynamicKb;
|
|
2818
|
+
protoOf(PrologSolverFactory).get_defaultInputChannel_2ryi7j_k$ = get_defaultInputChannel;
|
|
2819
|
+
protoOf(PrologSolverFactory).get_defaultOutputChannel_bnwwa_k$ = get_defaultOutputChannel;
|
|
2820
|
+
protoOf(PrologSolverFactory).get_defaultErrorChannel_ezdmst_k$ = get_defaultErrorChannel;
|
|
2821
|
+
protoOf(PrologSolverFactory).get_defaultWarningsChannel_rdf4c_k$ = get_defaultWarningsChannel;
|
|
2822
|
+
protoOf(PrologSolverFactory).solverWithDefaultBuiltins_tcha89_k$ = solverWithDefaultBuiltins;
|
|
2823
|
+
protoOf(PrologSolverFactory).solverWithDefaultBuiltinsAnd = solverWithDefaultBuiltinsAnd;
|
|
2824
|
+
protoOf(PrologSolverFactory).mutableSolverWithDefaultBuiltins_bc3d81_k$ = mutableSolverWithDefaultBuiltins;
|
|
2825
|
+
protoOf(PrologSolverFactory).mutableSolverWithDefaultBuiltinsAnd = mutableSolverWithDefaultBuiltinsAnd;
|
|
2802
2826
|
protoOf(AbstractState).get_isEndState_4xsqt3_k$ = get_isEndState;
|
|
2803
2827
|
protoOf(AbstractState).asEndState = asEndState;
|
|
2804
2828
|
protoOf(AbstractState).castToEndState = castToEndState;
|
|
@@ -2808,7 +2832,7 @@
|
|
|
2808
2832
|
protoOf(AbstractEndState).get_hasOpenAlternatives_bd9sv_k$ = get_hasOpenAlternatives;
|
|
2809
2833
|
//endregion
|
|
2810
2834
|
//region block: init
|
|
2811
|
-
|
|
2835
|
+
PrologSolverFactory_instance = new PrologSolverFactory();
|
|
2812
2836
|
Companion_instance_15 = new Companion();
|
|
2813
2837
|
Companion_instance_17 = new Companion_1();
|
|
2814
2838
|
//endregion
|
|
@@ -2818,8 +2842,8 @@
|
|
|
2818
2842
|
var unibo = it.unibo || (it.unibo = {});
|
|
2819
2843
|
var tuprolog = unibo.tuprolog || (unibo.tuprolog = {});
|
|
2820
2844
|
var solve = tuprolog.solve || (tuprolog.solve = {});
|
|
2821
|
-
var
|
|
2822
|
-
defineProp(
|
|
2845
|
+
var prolog = solve.prolog || (solve.prolog = {});
|
|
2846
|
+
defineProp(prolog, 'PrologSolverFactory', PrologSolverFactory_getInstance, VOID, true);
|
|
2823
2847
|
}
|
|
2824
2848
|
$jsExportAll$(_);
|
|
2825
2849
|
_.$jsExportAll$ = $jsExportAll$;
|
|
@@ -2827,4 +2851,4 @@
|
|
|
2827
2851
|
return _;
|
|
2828
2852
|
}));
|
|
2829
2853
|
|
|
2830
|
-
//# sourceMappingURL=2p-solve-
|
|
2854
|
+
//# sourceMappingURL=2p-solve-prolog.js.map
|