@tuprolog/arg2p 0.16.4 → 0.16.5
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 +3067 -3017
- package/2p-core.js.map +1 -1
- package/2p-dsl-core.js +455 -455
- package/2p-dsl-core.js.map +1 -1
- package/2p-dsl-solve.js +248 -248
- package/2p-dsl-solve.js.map +1 -1
- package/2p-dsl-theory.js +159 -159
- package/2p-dsl-theory.js.map +1 -1
- package/2p-dsl-unify.js +6 -6
- package/2p-dsl-unify.js.map +1 -1
- package/2p-io-lib.js +881 -877
- package/2p-io-lib.js.map +1 -1
- package/2p-parser-core.js +140 -140
- package/2p-parser-core.js.map +1 -1
- package/2p-parser-impl.js +1875 -1873
- package/2p-parser-impl.js.map +1 -1
- package/2p-parser-theory.js +96 -96
- package/2p-parser-theory.js.map +1 -1
- package/2p-solve-classic.js +985 -985
- package/2p-solve-classic.js.map +1 -1
- package/2p-solve.js +4498 -4318
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +1715 -1715
- package/2p-theory.js.map +1 -1
- package/2p-unify.js +372 -372
- package/2p-unify.js.map +1 -1
- package/2p-utils.js +457 -457
- package/2p-utils.js.map +1 -1
- package/arg2p-causality-solver.js +263 -263
- package/arg2p-causality-solver.js.map +1 -1
- package/arg2p-core.js +1907 -1907
- package/arg2p-core.js.map +1 -1
- package/arg2p.js +112 -112
- package/arg2p.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +3327 -3076
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -1
- package/kt-math.js +1616 -1610
- package/kt-math.js.map +1 -1
- package/okio-parent-okio-nodefilesystem.js +52 -52
- package/okio-parent-okio-nodefilesystem.js.map +1 -1
- package/okio-parent-okio.js +695 -695
- package/okio-parent-okio.js.map +1 -1
- package/package.json +2 -2
|
@@ -33,65 +33,65 @@
|
|
|
33
33
|
}(function (_, kotlin_it_unibo_tuprolog_core, kotlin_kotlin, kotlin_it_unibo_tuprolog_unify, kotlin_it_unibo_tuprolog_parser_core, kotlin_it_unibo_tuprolog_theory, kotlin_it_unibo_tuprolog_parser_theory, kotlin_it_unibo_tuprolog_argumentation_core, kotlin_it_unibo_tuprolog_solve) {
|
|
34
34
|
'use strict';
|
|
35
35
|
//region block: imports
|
|
36
|
-
var Companion_instance = kotlin_it_unibo_tuprolog_core.$_$.
|
|
37
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
38
|
-
var filter = kotlin_kotlin.$_$.
|
|
39
|
-
var map = kotlin_kotlin.$_$.
|
|
40
|
-
var firstOrNull = kotlin_kotlin.$_$.
|
|
41
|
-
var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.
|
|
36
|
+
var Companion_instance = kotlin_it_unibo_tuprolog_core.$_$.p;
|
|
37
|
+
var ensureNotNull = kotlin_kotlin.$_$.kc;
|
|
38
|
+
var filter = kotlin_kotlin.$_$.z8;
|
|
39
|
+
var map = kotlin_kotlin.$_$.l9;
|
|
40
|
+
var firstOrNull = kotlin_kotlin.$_$.a9;
|
|
41
|
+
var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.v;
|
|
42
42
|
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_unify.$_$.a;
|
|
43
|
-
var Companion_instance_0 = kotlin_it_unibo_tuprolog_core.$_$.
|
|
43
|
+
var Companion_instance_0 = kotlin_it_unibo_tuprolog_core.$_$.w;
|
|
44
44
|
var parseTerm = kotlin_it_unibo_tuprolog_parser_core.$_$.e;
|
|
45
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
46
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
47
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
48
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
49
|
-
var plus = kotlin_kotlin.$_$.
|
|
50
|
-
var addAll = kotlin_kotlin.$_$.
|
|
51
|
-
var plus_0 = kotlin_kotlin.$_$.
|
|
52
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
53
|
-
var to = kotlin_kotlin.$_$.
|
|
45
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.t;
|
|
46
|
+
var Unit_instance = kotlin_kotlin.$_$.q;
|
|
47
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.q2;
|
|
48
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.s;
|
|
49
|
+
var plus = kotlin_kotlin.$_$.s4;
|
|
50
|
+
var addAll = kotlin_kotlin.$_$.e2;
|
|
51
|
+
var plus_0 = kotlin_kotlin.$_$.r4;
|
|
52
|
+
var emptyList = kotlin_kotlin.$_$.e3;
|
|
53
|
+
var to = kotlin_kotlin.$_$.rc;
|
|
54
54
|
var Companion_instance_1 = kotlin_it_unibo_tuprolog_theory.$_$.b;
|
|
55
55
|
var parseTheoryWithOperators = kotlin_it_unibo_tuprolog_parser_theory.$_$.c;
|
|
56
|
-
var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_core.$_$.
|
|
56
|
+
var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_core.$_$.u;
|
|
57
57
|
var parseStruct = kotlin_it_unibo_tuprolog_parser_core.$_$.d;
|
|
58
58
|
var Graph = kotlin_it_unibo_tuprolog_argumentation_core.$_$.l;
|
|
59
|
-
var asSequence = kotlin_kotlin.$_$.
|
|
60
|
-
var flatMap = kotlin_kotlin.$_$.
|
|
61
|
-
var toList = kotlin_kotlin.$_$.
|
|
62
|
-
var Companion_getInstance_2 = kotlin_it_unibo_tuprolog_core.$_$.
|
|
63
|
-
var Collection = kotlin_kotlin.$_$.
|
|
64
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
65
|
-
var distinct = kotlin_kotlin.$_$.
|
|
59
|
+
var asSequence = kotlin_kotlin.$_$.n2;
|
|
60
|
+
var flatMap = kotlin_kotlin.$_$.d9;
|
|
61
|
+
var toList = kotlin_kotlin.$_$.aa;
|
|
62
|
+
var Companion_getInstance_2 = kotlin_it_unibo_tuprolog_core.$_$.l;
|
|
63
|
+
var Collection = kotlin_kotlin.$_$.x1;
|
|
64
|
+
var isInterface = kotlin_kotlin.$_$.l7;
|
|
65
|
+
var distinct = kotlin_kotlin.$_$.c3;
|
|
66
66
|
var arg2pScope = kotlin_it_unibo_tuprolog_argumentation_core.$_$.e;
|
|
67
|
-
var toList_0 = kotlin_kotlin.$_$.
|
|
68
|
-
var toString = kotlin_kotlin.$_$.
|
|
67
|
+
var toList_0 = kotlin_kotlin.$_$.d5;
|
|
68
|
+
var toString = kotlin_kotlin.$_$.u7;
|
|
69
69
|
var Default_getInstance = kotlin_kotlin.$_$.l;
|
|
70
|
-
var nextUInt = kotlin_kotlin.$_$.
|
|
71
|
-
var UInt = kotlin_kotlin.$_$.
|
|
70
|
+
var nextUInt = kotlin_kotlin.$_$.a8;
|
|
71
|
+
var UInt = kotlin_kotlin.$_$.hc;
|
|
72
72
|
var Signature = kotlin_it_unibo_tuprolog_solve.$_$.s3;
|
|
73
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
73
|
+
var protoOf = kotlin_kotlin.$_$.r7;
|
|
74
74
|
var VOID = kotlin_kotlin.$_$.b;
|
|
75
|
-
var sequenceOf = kotlin_kotlin.$_$.
|
|
75
|
+
var sequenceOf = kotlin_kotlin.$_$.s9;
|
|
76
76
|
var Primitive = kotlin_it_unibo_tuprolog_solve.$_$.q2;
|
|
77
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
78
|
-
var Companion_instance_2 = kotlin_it_unibo_tuprolog_solve.$_$.
|
|
79
|
-
var Expected_VARIABLE_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.
|
|
77
|
+
var initMetadataForClass = kotlin_kotlin.$_$.e7;
|
|
78
|
+
var Companion_instance_2 = kotlin_it_unibo_tuprolog_solve.$_$.a1;
|
|
79
|
+
var Expected_VARIABLE_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.m;
|
|
80
80
|
var Var = kotlin_it_unibo_tuprolog_core.$_$.d3;
|
|
81
81
|
var mineActiveGraph = kotlin_it_unibo_tuprolog_argumentation_core.$_$.k;
|
|
82
82
|
var Arg2pSolverFactory_instance = kotlin_it_unibo_tuprolog_argumentation_core.$_$.d;
|
|
83
83
|
var FlagsBuilder = kotlin_it_unibo_tuprolog_argumentation_core.$_$.f;
|
|
84
84
|
var Companion_instance_3 = kotlin_it_unibo_tuprolog_argumentation_core.$_$.c;
|
|
85
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.
|
|
85
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v;
|
|
86
86
|
var Companion_instance_4 = kotlin_it_unibo_tuprolog_argumentation_core.$_$.a;
|
|
87
87
|
var Companion_instance_5 = kotlin_it_unibo_tuprolog_argumentation_core.$_$.b;
|
|
88
|
-
var Companion_getInstance_3 = kotlin_it_unibo_tuprolog_core.$_$.
|
|
89
|
-
var replace = kotlin_kotlin.$_$.
|
|
90
|
-
var listOf = kotlin_kotlin.$_$.
|
|
91
|
-
var Companion_getInstance_4 = kotlin_it_unibo_tuprolog_solve.$_$.
|
|
92
|
-
var mapCapacity = kotlin_kotlin.$_$.
|
|
93
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
94
|
-
var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
88
|
+
var Companion_getInstance_3 = kotlin_it_unibo_tuprolog_core.$_$.i;
|
|
89
|
+
var replace = kotlin_kotlin.$_$.ya;
|
|
90
|
+
var listOf = kotlin_kotlin.$_$.x3;
|
|
91
|
+
var Companion_getInstance_4 = kotlin_it_unibo_tuprolog_solve.$_$.g1;
|
|
92
|
+
var mapCapacity = kotlin_kotlin.$_$.y3;
|
|
93
|
+
var coerceAtLeast = kotlin_kotlin.$_$.f8;
|
|
94
|
+
var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.u;
|
|
95
95
|
var content = kotlin_it_unibo_tuprolog_argumentation_core.$_$.g;
|
|
96
96
|
var ArgLibrary = kotlin_it_unibo_tuprolog_argumentation_core.$_$.h;
|
|
97
97
|
var Loadable = kotlin_it_unibo_tuprolog_argumentation_core.$_$.i;
|
|
@@ -105,11 +105,11 @@
|
|
|
105
105
|
initMetadataForClass(CausalitySolver, 'CausalitySolver', CausalitySolver, VOID, [ArgLibrary, Loadable]);
|
|
106
106
|
//endregion
|
|
107
107
|
function CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda(it) {
|
|
108
|
-
return it.
|
|
108
|
+
return it.get_isYes_it760k_k$();
|
|
109
109
|
}
|
|
110
110
|
function CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda_0($this_arg2pScope) {
|
|
111
111
|
return function (it) {
|
|
112
|
-
return Companion_instance.of([ensureNotNull(it.
|
|
112
|
+
return Companion_instance.of([ensureNotNull(it.get_substitution_i7fi9y_k$().get_wei43m_k$($this_arg2pScope.get_X_1mhr5b_k$()))]);
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
function CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda_1(this$0, $request, $effect) {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
}
|
|
120
120
|
function CausalitySolver$CausalityCheckCauseButFor$solve$lambda($request, $cause, this$0, $effect) {
|
|
121
121
|
return function ($this$arg2pScope) {
|
|
122
|
-
var tmp = $request.solve($this$arg2pScope.stringInvoke('compl', $cause, [$this$arg2pScope.
|
|
122
|
+
var tmp = $request.solve($this$arg2pScope.stringInvoke('compl', $cause, [$this$arg2pScope.get_X_1mhr5b_k$()]));
|
|
123
123
|
var tmp_0 = filter(tmp, CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda);
|
|
124
124
|
var tmp_1 = map(tmp_0, CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda_0($this$arg2pScope));
|
|
125
125
|
var tmp0_elvis_lhs = firstOrNull(map(tmp_1, CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda_1(this$0, $request, $effect)));
|
|
@@ -147,35 +147,35 @@
|
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
function equalTerms($this, a, b) {
|
|
150
|
-
return Companion_getInstance_0().
|
|
150
|
+
return Companion_getInstance_0().get_default_qtagd4_k$().match(parseTerm(Companion_instance_0, a), parseTerm(Companion_instance_0, b));
|
|
151
151
|
}
|
|
152
152
|
function attackers($this, x, graph) {
|
|
153
153
|
// Inline function 'kotlin.collections.filter' call
|
|
154
|
-
var tmp0 = graph.
|
|
154
|
+
var tmp0 = graph.attacks_1;
|
|
155
155
|
// Inline function 'kotlin.collections.filterTo' call
|
|
156
156
|
var destination = ArrayList_init_$Create$();
|
|
157
|
-
var _iterator__ex2g4s = tmp0.
|
|
158
|
-
while (_iterator__ex2g4s.
|
|
159
|
-
var element = _iterator__ex2g4s.
|
|
160
|
-
if (element.
|
|
161
|
-
destination.
|
|
157
|
+
var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
|
|
158
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
159
|
+
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
160
|
+
if (element.target_1.identifier_1 === x.identifier_1) {
|
|
161
|
+
destination.add_utx5q5_k$(element);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
// Inline function 'kotlin.collections.map' call
|
|
165
165
|
// Inline function 'kotlin.collections.mapTo' call
|
|
166
166
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
|
|
167
|
-
var _iterator__ex2g4s_0 = destination.
|
|
168
|
-
while (_iterator__ex2g4s_0.
|
|
169
|
-
var item = _iterator__ex2g4s_0.
|
|
167
|
+
var _iterator__ex2g4s_0 = destination.iterator_jk1svi_k$();
|
|
168
|
+
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
169
|
+
var item = _iterator__ex2g4s_0.next_20eer_k$();
|
|
170
170
|
// Inline function 'kotlin.collections.find' call
|
|
171
|
-
var tmp0_0 = graph.
|
|
171
|
+
var tmp0_0 = graph.labellings_1;
|
|
172
172
|
var tmp$ret$7;
|
|
173
173
|
$l$block: {
|
|
174
174
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
175
|
-
var _iterator__ex2g4s_1 = tmp0_0.
|
|
176
|
-
while (_iterator__ex2g4s_1.
|
|
177
|
-
var element_0 = _iterator__ex2g4s_1.
|
|
178
|
-
if (item.
|
|
175
|
+
var _iterator__ex2g4s_1 = tmp0_0.iterator_jk1svi_k$();
|
|
176
|
+
while (_iterator__ex2g4s_1.hasNext_bitz1p_k$()) {
|
|
177
|
+
var element_0 = _iterator__ex2g4s_1.next_20eer_k$();
|
|
178
|
+
if (item.attacker_1.identifier_1 === element_0.argument_1.identifier_1) {
|
|
179
179
|
tmp$ret$7 = element_0;
|
|
180
180
|
break $l$block;
|
|
181
181
|
}
|
|
@@ -184,24 +184,24 @@
|
|
|
184
184
|
}
|
|
185
185
|
var tmp$ret$6 = tmp$ret$7;
|
|
186
186
|
var tmp$ret$5 = ensureNotNull(tmp$ret$6);
|
|
187
|
-
destination_0.
|
|
187
|
+
destination_0.add_utx5q5_k$(tmp$ret$5);
|
|
188
188
|
}
|
|
189
189
|
return destination_0;
|
|
190
190
|
}
|
|
191
191
|
function supporters($this, x, graph, chain) {
|
|
192
192
|
var tmp;
|
|
193
|
-
if (chain.
|
|
193
|
+
if (chain.contains_aljjnj_k$(x.identifier_1)) {
|
|
194
194
|
tmp = emptyList();
|
|
195
195
|
} else {
|
|
196
196
|
// Inline function 'kotlin.collections.filter' call
|
|
197
|
-
var tmp0 = graph.
|
|
197
|
+
var tmp0 = graph.labellings_1;
|
|
198
198
|
// Inline function 'kotlin.collections.filterTo' call
|
|
199
199
|
var destination = ArrayList_init_$Create$();
|
|
200
|
-
var _iterator__ex2g4s = tmp0.
|
|
201
|
-
while (_iterator__ex2g4s.
|
|
202
|
-
var element = _iterator__ex2g4s.
|
|
203
|
-
if (x.
|
|
204
|
-
destination.
|
|
200
|
+
var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
|
|
201
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
202
|
+
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
203
|
+
if (x.identifier_1 === element.argument_1.identifier_1 && element.label_1 === 'in') {
|
|
204
|
+
destination.add_utx5q5_k$(element);
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
var tmp_0 = destination;
|
|
@@ -209,27 +209,27 @@
|
|
|
209
209
|
var tmp0_0 = attackers($this, x, graph);
|
|
210
210
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
211
211
|
var destination_0 = ArrayList_init_$Create$();
|
|
212
|
-
var _iterator__ex2g4s_0 = tmp0_0.
|
|
213
|
-
while (_iterator__ex2g4s_0.
|
|
214
|
-
var element_0 = _iterator__ex2g4s_0.
|
|
212
|
+
var _iterator__ex2g4s_0 = tmp0_0.iterator_jk1svi_k$();
|
|
213
|
+
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
214
|
+
var element_0 = _iterator__ex2g4s_0.next_20eer_k$();
|
|
215
215
|
// Inline function 'kotlin.collections.filter' call
|
|
216
|
-
var tmp0_1 = attackers($this, element_0.
|
|
216
|
+
var tmp0_1 = attackers($this, element_0.argument_1, graph);
|
|
217
217
|
// Inline function 'kotlin.collections.filterTo' call
|
|
218
218
|
var destination_1 = ArrayList_init_$Create$();
|
|
219
|
-
var _iterator__ex2g4s_1 = tmp0_1.
|
|
220
|
-
while (_iterator__ex2g4s_1.
|
|
221
|
-
var element_1 = _iterator__ex2g4s_1.
|
|
222
|
-
if (!(element_1.
|
|
223
|
-
destination_1.
|
|
219
|
+
var _iterator__ex2g4s_1 = tmp0_1.iterator_jk1svi_k$();
|
|
220
|
+
while (_iterator__ex2g4s_1.hasNext_bitz1p_k$()) {
|
|
221
|
+
var element_1 = _iterator__ex2g4s_1.next_20eer_k$();
|
|
222
|
+
if (!(element_1.argument_1.identifier_1 === x.identifier_1)) {
|
|
223
|
+
destination_1.add_utx5q5_k$(element_1);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
// Inline function 'kotlin.collections.flatMap' call
|
|
227
227
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
228
228
|
var destination_2 = ArrayList_init_$Create$();
|
|
229
|
-
var _iterator__ex2g4s_2 = destination_1.
|
|
230
|
-
while (_iterator__ex2g4s_2.
|
|
231
|
-
var element_2 = _iterator__ex2g4s_2.
|
|
232
|
-
var list = supporters($this, element_2.
|
|
229
|
+
var _iterator__ex2g4s_2 = destination_1.iterator_jk1svi_k$();
|
|
230
|
+
while (_iterator__ex2g4s_2.hasNext_bitz1p_k$()) {
|
|
231
|
+
var element_2 = _iterator__ex2g4s_2.next_20eer_k$();
|
|
232
|
+
var list = supporters($this, element_2.argument_1, graph, plus(chain, x.identifier_1));
|
|
233
233
|
addAll(destination_2, list);
|
|
234
234
|
}
|
|
235
235
|
var list_0 = destination_2;
|
|
@@ -241,37 +241,37 @@
|
|
|
241
241
|
}
|
|
242
242
|
function solveFresh($this, effect, kb) {
|
|
243
243
|
var theory = kb.toStringAsProlog(true);
|
|
244
|
-
var tmp0_safe_receiver = $this.
|
|
244
|
+
var tmp0_safe_receiver = $this.graphCache_1.get_wei43m_k$(to(theory, effect));
|
|
245
245
|
if (tmp0_safe_receiver == null)
|
|
246
246
|
null;
|
|
247
247
|
else {
|
|
248
248
|
// Inline function 'kotlin.let' call
|
|
249
249
|
return tmp0_safe_receiver;
|
|
250
250
|
}
|
|
251
|
-
if ($this.
|
|
252
|
-
$this.
|
|
251
|
+
if ($this.graphCache_1.get_size_woubt6_k$() >= 256) {
|
|
252
|
+
$this.graphCache_1.clear_j9egeb_k$();
|
|
253
253
|
}
|
|
254
|
-
$this.
|
|
255
|
-
$this.
|
|
256
|
-
var tmp = $this.
|
|
254
|
+
$this.solver_1.resetStaticKb();
|
|
255
|
+
$this.solver_1.loadStaticKb(parseTheoryWithOperators(Companion_instance_1, theory, $this.operators_1));
|
|
256
|
+
var tmp = $this.solver_1.solve(parseStruct(Companion_getInstance_1(), 'answerQuery(' + effect + ')'));
|
|
257
257
|
var tmp1_elvis_lhs = firstOrNull(map(tmp, CausalitySolver$solveFresh$lambda($this)));
|
|
258
258
|
// Inline function 'kotlin.also' call
|
|
259
259
|
var this_0 = tmp1_elvis_lhs == null ? new Graph(emptyList(), emptyList(), emptyList()) : tmp1_elvis_lhs;
|
|
260
|
-
var tmp0 = $this.
|
|
260
|
+
var tmp0 = $this.graphCache_1;
|
|
261
261
|
// Inline function 'kotlin.collections.set' call
|
|
262
262
|
var key = to(theory, effect);
|
|
263
|
-
tmp0.
|
|
263
|
+
tmp0.put_4fpzoq_k$(key, this_0);
|
|
264
264
|
return this_0;
|
|
265
265
|
}
|
|
266
266
|
function getSupports($this, graph, effect) {
|
|
267
|
-
var tmp = asSequence(graph.
|
|
267
|
+
var tmp = asSequence(graph.labellings_1);
|
|
268
268
|
var tmp_0 = filter(tmp, CausalitySolver$getSupports$lambda($this, effect));
|
|
269
269
|
var tmp_1 = flatMap(tmp_0, CausalitySolver$getSupports$lambda_0($this, graph));
|
|
270
270
|
return map(tmp_1, CausalitySolver$getSupports$lambda_1);
|
|
271
271
|
}
|
|
272
272
|
function checkBaseTheory($this, request, effect) {
|
|
273
273
|
// Inline function 'kotlin.let' call
|
|
274
|
-
var it = solveFresh($this, effect, request.context.
|
|
274
|
+
var it = solveFresh($this, effect, request.context.get_staticKb_a01l1u_k$());
|
|
275
275
|
var tmp = getSupports($this, it, effect);
|
|
276
276
|
return toList(map(tmp, CausalitySolver$checkBaseTheory$lambda));
|
|
277
277
|
}
|
|
@@ -280,38 +280,38 @@
|
|
|
280
280
|
var this_0 = intervention.toList();
|
|
281
281
|
// Inline function 'kotlin.collections.mapTo' call
|
|
282
282
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
283
|
-
var _iterator__ex2g4s = this_0.
|
|
284
|
-
while (_iterator__ex2g4s.
|
|
285
|
-
var item = _iterator__ex2g4s.
|
|
283
|
+
var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
|
|
284
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
285
|
+
var item = _iterator__ex2g4s.next_20eer_k$();
|
|
286
286
|
var tmp$ret$2 = Companion_getInstance_2().of(parseStruct(Companion_getInstance_1(), ':->(fk' + (item.hashCode() & 2147483647) + ', ' + item.toString() + ')'), []);
|
|
287
|
-
destination.
|
|
287
|
+
destination.add_utx5q5_k$(tmp$ret$2);
|
|
288
288
|
}
|
|
289
289
|
// Inline function 'kotlin.let' call
|
|
290
290
|
// Inline function 'kotlin.let' call
|
|
291
|
-
var naf = solveFresh($this, effect, request.context.
|
|
291
|
+
var naf = solveFresh($this, effect, request.context.get_staticKb_a01l1u_k$().plusTheory(Companion_instance_1.ofIterableWithDefaultUnificator(destination)));
|
|
292
292
|
// Inline function 'kotlin.collections.filter' call
|
|
293
|
-
var tmp0 = naf.
|
|
293
|
+
var tmp0 = naf.labellings_1;
|
|
294
294
|
// Inline function 'kotlin.collections.filterTo' call
|
|
295
295
|
var destination_0 = ArrayList_init_$Create$();
|
|
296
|
-
var _iterator__ex2g4s_0 = tmp0.
|
|
297
|
-
while (_iterator__ex2g4s_0.
|
|
298
|
-
var element = _iterator__ex2g4s_0.
|
|
299
|
-
if (element.
|
|
300
|
-
destination_0.
|
|
296
|
+
var _iterator__ex2g4s_0 = tmp0.iterator_jk1svi_k$();
|
|
297
|
+
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
298
|
+
var element = _iterator__ex2g4s_0.next_20eer_k$();
|
|
299
|
+
if (element.label_1 === 'out' || element.label_1 === 'und') {
|
|
300
|
+
destination_0.add_utx5q5_k$(element);
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
// Inline function 'kotlin.collections.filter' call
|
|
304
304
|
// Inline function 'kotlin.collections.filterTo' call
|
|
305
305
|
var destination_1 = ArrayList_init_$Create$();
|
|
306
|
-
var _iterator__ex2g4s_1 = destination_0.
|
|
307
|
-
while (_iterator__ex2g4s_1.
|
|
308
|
-
var element_0 = _iterator__ex2g4s_1.
|
|
306
|
+
var _iterator__ex2g4s_1 = destination_0.iterator_jk1svi_k$();
|
|
307
|
+
while (_iterator__ex2g4s_1.hasNext_bitz1p_k$()) {
|
|
308
|
+
var element_0 = _iterator__ex2g4s_1.next_20eer_k$();
|
|
309
309
|
var tmp$ret$13;
|
|
310
310
|
$l$block_0: {
|
|
311
311
|
// Inline function 'kotlin.collections.any' call
|
|
312
312
|
var tmp;
|
|
313
313
|
if (isInterface(support, Collection)) {
|
|
314
|
-
tmp = support.
|
|
314
|
+
tmp = support.isEmpty_y1axqb_k$();
|
|
315
315
|
} else {
|
|
316
316
|
tmp = false;
|
|
317
317
|
}
|
|
@@ -319,10 +319,10 @@
|
|
|
319
319
|
tmp$ret$13 = false;
|
|
320
320
|
break $l$block_0;
|
|
321
321
|
}
|
|
322
|
-
var _iterator__ex2g4s_2 = support.
|
|
323
|
-
while (_iterator__ex2g4s_2.
|
|
324
|
-
var element_1 = _iterator__ex2g4s_2.
|
|
325
|
-
if (Companion_getInstance_0().
|
|
322
|
+
var _iterator__ex2g4s_2 = support.iterator_jk1svi_k$();
|
|
323
|
+
while (_iterator__ex2g4s_2.hasNext_bitz1p_k$()) {
|
|
324
|
+
var element_1 = _iterator__ex2g4s_2.next_20eer_k$();
|
|
325
|
+
if (Companion_getInstance_0().get_default_qtagd4_k$().match(element_0.argument_1.termRepresentation_f75xll_k$(), element_1)) {
|
|
326
326
|
tmp$ret$13 = true;
|
|
327
327
|
break $l$block_0;
|
|
328
328
|
}
|
|
@@ -330,24 +330,24 @@
|
|
|
330
330
|
tmp$ret$13 = false;
|
|
331
331
|
}
|
|
332
332
|
if (tmp$ret$13) {
|
|
333
|
-
destination_1.
|
|
333
|
+
destination_1.add_utx5q5_k$(element_0);
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
// Inline function 'kotlin.collections.flatMap' call
|
|
337
337
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
338
338
|
var destination_2 = ArrayList_init_$Create$();
|
|
339
|
-
var _iterator__ex2g4s_3 = destination_1.
|
|
340
|
-
while (_iterator__ex2g4s_3.
|
|
341
|
-
var element_2 = _iterator__ex2g4s_3.
|
|
339
|
+
var _iterator__ex2g4s_3 = destination_1.iterator_jk1svi_k$();
|
|
340
|
+
while (_iterator__ex2g4s_3.hasNext_bitz1p_k$()) {
|
|
341
|
+
var element_2 = _iterator__ex2g4s_3.next_20eer_k$();
|
|
342
342
|
// Inline function 'kotlin.collections.filter' call
|
|
343
|
-
var tmp0_0 = attackers($this, element_2.
|
|
343
|
+
var tmp0_0 = attackers($this, element_2.argument_1, naf);
|
|
344
344
|
// Inline function 'kotlin.collections.filterTo' call
|
|
345
345
|
var destination_3 = ArrayList_init_$Create$();
|
|
346
|
-
var _iterator__ex2g4s_4 = tmp0_0.
|
|
347
|
-
while (_iterator__ex2g4s_4.
|
|
348
|
-
var element_3 = _iterator__ex2g4s_4.
|
|
349
|
-
if (element_3.
|
|
350
|
-
destination_3.
|
|
346
|
+
var _iterator__ex2g4s_4 = tmp0_0.iterator_jk1svi_k$();
|
|
347
|
+
while (_iterator__ex2g4s_4.hasNext_bitz1p_k$()) {
|
|
348
|
+
var element_3 = _iterator__ex2g4s_4.next_20eer_k$();
|
|
349
|
+
if (element_3.label_1 === 'in') {
|
|
350
|
+
destination_3.add_utx5q5_k$(element_3);
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
var list = destination_3;
|
|
@@ -356,11 +356,11 @@
|
|
|
356
356
|
// Inline function 'kotlin.collections.map' call
|
|
357
357
|
// Inline function 'kotlin.collections.mapTo' call
|
|
358
358
|
var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_2, 10));
|
|
359
|
-
var _iterator__ex2g4s_5 = destination_2.
|
|
360
|
-
while (_iterator__ex2g4s_5.
|
|
361
|
-
var item_0 = _iterator__ex2g4s_5.
|
|
362
|
-
var tmp$ret$23 = item_0.
|
|
363
|
-
destination_4.
|
|
359
|
+
var _iterator__ex2g4s_5 = destination_2.iterator_jk1svi_k$();
|
|
360
|
+
while (_iterator__ex2g4s_5.hasNext_bitz1p_k$()) {
|
|
361
|
+
var item_0 = _iterator__ex2g4s_5.next_20eer_k$();
|
|
362
|
+
var tmp$ret$23 = item_0.argument_1;
|
|
363
|
+
destination_4.add_utx5q5_k$(tmp$ret$23);
|
|
364
364
|
}
|
|
365
365
|
return distinct(destination_4);
|
|
366
366
|
}
|
|
@@ -370,23 +370,23 @@
|
|
|
370
370
|
function getInterventions($this, request, cause, effect) {
|
|
371
371
|
var tmp = Companion_instance_0;
|
|
372
372
|
// Inline function 'kotlin.collections.map' call
|
|
373
|
-
var this_0 = solveFresh($this, effect, request.context.
|
|
373
|
+
var this_0 = solveFresh($this, effect, request.context.get_staticKb_a01l1u_k$()).arguments_1;
|
|
374
374
|
// Inline function 'kotlin.collections.mapTo' call
|
|
375
375
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
376
|
-
var _iterator__ex2g4s = this_0.
|
|
377
|
-
while (_iterator__ex2g4s.
|
|
378
|
-
var item = _iterator__ex2g4s.
|
|
379
|
-
var tmp$ret$2 = item.
|
|
380
|
-
destination.
|
|
376
|
+
var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
|
|
377
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
378
|
+
var item = _iterator__ex2g4s.next_20eer_k$();
|
|
379
|
+
var tmp$ret$2 = item.topRule_1;
|
|
380
|
+
destination.add_utx5q5_k$(tmp$ret$2);
|
|
381
381
|
}
|
|
382
382
|
// Inline function 'kotlin.collections.filter' call
|
|
383
383
|
// Inline function 'kotlin.collections.filterTo' call
|
|
384
384
|
var destination_0 = ArrayList_init_$Create$();
|
|
385
|
-
var _iterator__ex2g4s_0 = destination.
|
|
386
|
-
while (_iterator__ex2g4s_0.
|
|
387
|
-
var element = _iterator__ex2g4s_0.
|
|
385
|
+
var _iterator__ex2g4s_0 = destination.iterator_jk1svi_k$();
|
|
386
|
+
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
387
|
+
var element = _iterator__ex2g4s_0.next_20eer_k$();
|
|
388
388
|
if (!(element === 'none')) {
|
|
389
|
-
destination_0.
|
|
389
|
+
destination_0.add_utx5q5_k$(element);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
var rules = parseTerm(tmp, toString(toList_0(destination_0)));
|
|
@@ -394,14 +394,14 @@
|
|
|
394
394
|
}
|
|
395
395
|
function checkCausalityICAIL24($this, request, intervention, effect) {
|
|
396
396
|
var supports = checkBaseTheory($this, request, effect);
|
|
397
|
-
if (supports.
|
|
397
|
+
if (supports.isEmpty_y1axqb_k$())
|
|
398
398
|
return false;
|
|
399
399
|
var attackers = checkIntervention($this, request, intervention, supports, effect);
|
|
400
400
|
var tmp;
|
|
401
401
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
402
|
-
if (!attackers.
|
|
402
|
+
if (!attackers.isEmpty_y1axqb_k$()) {
|
|
403
403
|
var tmp_0;
|
|
404
|
-
if (intervention.
|
|
404
|
+
if (intervention.get_estimatedLength_1oo9qx_k$() <= 1) {
|
|
405
405
|
tmp_0 = true;
|
|
406
406
|
} else {
|
|
407
407
|
var tmp0 = getSubsets($this, request, intervention);
|
|
@@ -410,7 +410,7 @@
|
|
|
410
410
|
// Inline function 'kotlin.collections.none' call
|
|
411
411
|
var tmp_1;
|
|
412
412
|
if (isInterface(tmp0, Collection)) {
|
|
413
|
-
tmp_1 = tmp0.
|
|
413
|
+
tmp_1 = tmp0.isEmpty_y1axqb_k$();
|
|
414
414
|
} else {
|
|
415
415
|
tmp_1 = false;
|
|
416
416
|
}
|
|
@@ -418,11 +418,11 @@
|
|
|
418
418
|
tmp$ret$1 = true;
|
|
419
419
|
break $l$block_0;
|
|
420
420
|
}
|
|
421
|
-
var _iterator__ex2g4s = tmp0.
|
|
422
|
-
while (_iterator__ex2g4s.
|
|
423
|
-
var element = _iterator__ex2g4s.
|
|
421
|
+
var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
|
|
422
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
423
|
+
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
424
424
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
425
|
-
if (!checkIntervention($this, request, element, supports, effect).
|
|
425
|
+
if (!checkIntervention($this, request, element, supports, effect).isEmpty_y1axqb_k$()) {
|
|
426
426
|
tmp$ret$1 = false;
|
|
427
427
|
break $l$block_0;
|
|
428
428
|
}
|
|
@@ -439,24 +439,24 @@
|
|
|
439
439
|
}
|
|
440
440
|
function checkCausalityICAIL25($this, request, intervention, effect) {
|
|
441
441
|
var supports = checkBaseTheory($this, request, effect);
|
|
442
|
-
if (supports.
|
|
442
|
+
if (supports.isEmpty_y1axqb_k$())
|
|
443
443
|
return false;
|
|
444
444
|
// Inline function 'kotlin.collections.map' call
|
|
445
445
|
var this_0 = checkIntervention($this, request, intervention, supports, effect);
|
|
446
446
|
// Inline function 'kotlin.collections.mapTo' call
|
|
447
447
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
448
|
-
var _iterator__ex2g4s = this_0.
|
|
449
|
-
while (_iterator__ex2g4s.
|
|
450
|
-
var item = _iterator__ex2g4s.
|
|
451
|
-
var tmp$ret$2 = item.
|
|
452
|
-
destination.
|
|
448
|
+
var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
|
|
449
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
450
|
+
var item = _iterator__ex2g4s.next_20eer_k$();
|
|
451
|
+
var tmp$ret$2 = item.termRepresentation_f75xll_k$();
|
|
452
|
+
destination.add_utx5q5_k$(tmp$ret$2);
|
|
453
453
|
}
|
|
454
454
|
var attackers = destination;
|
|
455
455
|
var tmp;
|
|
456
456
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
457
|
-
if (!attackers.
|
|
457
|
+
if (!attackers.isEmpty_y1axqb_k$()) {
|
|
458
458
|
var tmp_0;
|
|
459
|
-
if (intervention.
|
|
459
|
+
if (intervention.get_estimatedLength_1oo9qx_k$() <= 1) {
|
|
460
460
|
tmp_0 = true;
|
|
461
461
|
} else {
|
|
462
462
|
var tmp0 = getSubsets($this, request, intervention);
|
|
@@ -465,7 +465,7 @@
|
|
|
465
465
|
// Inline function 'kotlin.collections.none' call
|
|
466
466
|
var tmp_1;
|
|
467
467
|
if (isInterface(tmp0, Collection)) {
|
|
468
|
-
tmp_1 = tmp0.
|
|
468
|
+
tmp_1 = tmp0.isEmpty_y1axqb_k$();
|
|
469
469
|
} else {
|
|
470
470
|
tmp_1 = false;
|
|
471
471
|
}
|
|
@@ -473,18 +473,18 @@
|
|
|
473
473
|
tmp$ret$4 = true;
|
|
474
474
|
break $l$block_4;
|
|
475
475
|
}
|
|
476
|
-
var _iterator__ex2g4s_0 = tmp0.
|
|
477
|
-
while (_iterator__ex2g4s_0.
|
|
478
|
-
var element = _iterator__ex2g4s_0.
|
|
476
|
+
var _iterator__ex2g4s_0 = tmp0.iterator_jk1svi_k$();
|
|
477
|
+
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
478
|
+
var element = _iterator__ex2g4s_0.next_20eer_k$();
|
|
479
479
|
// Inline function 'kotlin.collections.map' call
|
|
480
480
|
var this_1 = checkIntervention($this, request, element, supports, effect);
|
|
481
481
|
// Inline function 'kotlin.collections.mapTo' call
|
|
482
482
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
483
|
-
var _iterator__ex2g4s_1 = this_1.
|
|
484
|
-
while (_iterator__ex2g4s_1.
|
|
485
|
-
var item_0 = _iterator__ex2g4s_1.
|
|
486
|
-
var tmp$ret$8 = item_0.
|
|
487
|
-
destination_0.
|
|
483
|
+
var _iterator__ex2g4s_1 = this_1.iterator_jk1svi_k$();
|
|
484
|
+
while (_iterator__ex2g4s_1.hasNext_bitz1p_k$()) {
|
|
485
|
+
var item_0 = _iterator__ex2g4s_1.next_20eer_k$();
|
|
486
|
+
var tmp$ret$8 = item_0.termRepresentation_f75xll_k$();
|
|
487
|
+
destination_0.add_utx5q5_k$(tmp$ret$8);
|
|
488
488
|
}
|
|
489
489
|
var n = destination_0;
|
|
490
490
|
var tmp$ret$9;
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
// Inline function 'kotlin.collections.all' call
|
|
493
493
|
var tmp_2;
|
|
494
494
|
if (isInterface(attackers, Collection)) {
|
|
495
|
-
tmp_2 = attackers.
|
|
495
|
+
tmp_2 = attackers.isEmpty_y1axqb_k$();
|
|
496
496
|
} else {
|
|
497
497
|
tmp_2 = false;
|
|
498
498
|
}
|
|
@@ -500,15 +500,15 @@
|
|
|
500
500
|
tmp$ret$9 = true;
|
|
501
501
|
break $l$block_3;
|
|
502
502
|
}
|
|
503
|
-
var _iterator__ex2g4s_2 = attackers.
|
|
504
|
-
while (_iterator__ex2g4s_2.
|
|
505
|
-
var element_0 = _iterator__ex2g4s_2.
|
|
503
|
+
var _iterator__ex2g4s_2 = attackers.iterator_jk1svi_k$();
|
|
504
|
+
while (_iterator__ex2g4s_2.hasNext_bitz1p_k$()) {
|
|
505
|
+
var element_0 = _iterator__ex2g4s_2.next_20eer_k$();
|
|
506
506
|
var tmp$ret$11;
|
|
507
507
|
$l$block_2: {
|
|
508
508
|
// Inline function 'kotlin.collections.any' call
|
|
509
509
|
var tmp_3;
|
|
510
510
|
if (isInterface(n, Collection)) {
|
|
511
|
-
tmp_3 = n.
|
|
511
|
+
tmp_3 = n.isEmpty_y1axqb_k$();
|
|
512
512
|
} else {
|
|
513
513
|
tmp_3 = false;
|
|
514
514
|
}
|
|
@@ -516,10 +516,10 @@
|
|
|
516
516
|
tmp$ret$11 = false;
|
|
517
517
|
break $l$block_2;
|
|
518
518
|
}
|
|
519
|
-
var _iterator__ex2g4s_3 = n.
|
|
520
|
-
while (_iterator__ex2g4s_3.
|
|
521
|
-
var element_1 = _iterator__ex2g4s_3.
|
|
522
|
-
if (Companion_getInstance_0().
|
|
519
|
+
var _iterator__ex2g4s_3 = n.iterator_jk1svi_k$();
|
|
520
|
+
while (_iterator__ex2g4s_3.hasNext_bitz1p_k$()) {
|
|
521
|
+
var element_1 = _iterator__ex2g4s_3.next_20eer_k$();
|
|
522
|
+
if (Companion_getInstance_0().get_default_qtagd4_k$().match(element_0, element_1)) {
|
|
523
523
|
tmp$ret$11 = true;
|
|
524
524
|
break $l$block_2;
|
|
525
525
|
}
|
|
@@ -551,13 +551,13 @@
|
|
|
551
551
|
function checkButFor($this, request, intervention, effect) {
|
|
552
552
|
var tmp;
|
|
553
553
|
// Inline function 'kotlin.let' call
|
|
554
|
-
var tmp0 = solveFresh($this, effect, request.context.
|
|
554
|
+
var tmp0 = solveFresh($this, effect, request.context.get_staticKb_a01l1u_k$()).labellings_1;
|
|
555
555
|
var tmp$ret$2;
|
|
556
556
|
$l$block_0: {
|
|
557
557
|
// Inline function 'kotlin.collections.any' call
|
|
558
558
|
var tmp_0;
|
|
559
559
|
if (isInterface(tmp0, Collection)) {
|
|
560
|
-
tmp_0 = tmp0.
|
|
560
|
+
tmp_0 = tmp0.isEmpty_y1axqb_k$();
|
|
561
561
|
} else {
|
|
562
562
|
tmp_0 = false;
|
|
563
563
|
}
|
|
@@ -565,10 +565,10 @@
|
|
|
565
565
|
tmp$ret$2 = false;
|
|
566
566
|
break $l$block_0;
|
|
567
567
|
}
|
|
568
|
-
var _iterator__ex2g4s = tmp0.
|
|
569
|
-
while (_iterator__ex2g4s.
|
|
570
|
-
var element = _iterator__ex2g4s.
|
|
571
|
-
if (element.
|
|
568
|
+
var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
|
|
569
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
570
|
+
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
571
|
+
if (element.label_1 === 'in' && equalTerms($this, element.argument_1.conclusion_1, effect)) {
|
|
572
572
|
tmp$ret$2 = true;
|
|
573
573
|
break $l$block_0;
|
|
574
574
|
}
|
|
@@ -580,21 +580,21 @@
|
|
|
580
580
|
var this_0 = intervention.toList();
|
|
581
581
|
// Inline function 'kotlin.collections.mapTo' call
|
|
582
582
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
583
|
-
var _iterator__ex2g4s_0 = this_0.
|
|
584
|
-
while (_iterator__ex2g4s_0.
|
|
585
|
-
var item = _iterator__ex2g4s_0.
|
|
583
|
+
var _iterator__ex2g4s_0 = this_0.iterator_jk1svi_k$();
|
|
584
|
+
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
585
|
+
var item = _iterator__ex2g4s_0.next_20eer_k$();
|
|
586
586
|
var tmp$ret$6 = Companion_getInstance_2().of(parseStruct(Companion_getInstance_1(), ':->(fk' + new UInt(nextUInt(Default_getInstance())) + ', ' + item.toString() + ')'), []);
|
|
587
|
-
destination.
|
|
587
|
+
destination.add_utx5q5_k$(tmp$ret$6);
|
|
588
588
|
}
|
|
589
589
|
// Inline function 'kotlin.let' call
|
|
590
590
|
// Inline function 'kotlin.let' call
|
|
591
|
-
var tmp0_0 = solveFresh($this, effect, request.context.
|
|
591
|
+
var tmp0_0 = solveFresh($this, effect, request.context.get_staticKb_a01l1u_k$().plusTheory(Companion_instance_1.ofIterableWithDefaultUnificator(destination))).labellings_1;
|
|
592
592
|
var tmp$ret$11;
|
|
593
593
|
$l$block_2: {
|
|
594
594
|
// Inline function 'kotlin.collections.none' call
|
|
595
595
|
var tmp_1;
|
|
596
596
|
if (isInterface(tmp0_0, Collection)) {
|
|
597
|
-
tmp_1 = tmp0_0.
|
|
597
|
+
tmp_1 = tmp0_0.isEmpty_y1axqb_k$();
|
|
598
598
|
} else {
|
|
599
599
|
tmp_1 = false;
|
|
600
600
|
}
|
|
@@ -602,10 +602,10 @@
|
|
|
602
602
|
tmp$ret$11 = true;
|
|
603
603
|
break $l$block_2;
|
|
604
604
|
}
|
|
605
|
-
var _iterator__ex2g4s_1 = tmp0_0.
|
|
606
|
-
while (_iterator__ex2g4s_1.
|
|
607
|
-
var element_0 = _iterator__ex2g4s_1.
|
|
608
|
-
if (element_0.
|
|
605
|
+
var _iterator__ex2g4s_1 = tmp0_0.iterator_jk1svi_k$();
|
|
606
|
+
while (_iterator__ex2g4s_1.hasNext_bitz1p_k$()) {
|
|
607
|
+
var element_0 = _iterator__ex2g4s_1.next_20eer_k$();
|
|
608
|
+
if (element_0.label_1 === 'in' && equalTerms($this, element_0.argument_1.conclusion_1, effect)) {
|
|
609
609
|
tmp$ret$11 = false;
|
|
610
610
|
break $l$block_2;
|
|
611
611
|
}
|
|
@@ -619,141 +619,141 @@
|
|
|
619
619
|
return tmp;
|
|
620
620
|
}
|
|
621
621
|
function CausalityCheckCauseButFor($outer) {
|
|
622
|
-
this
|
|
623
|
-
this.
|
|
622
|
+
this.$this_1 = $outer;
|
|
623
|
+
this.signature_1 = new Signature('but_for', 2);
|
|
624
624
|
}
|
|
625
|
-
protoOf(CausalityCheckCauseButFor).
|
|
626
|
-
return this.
|
|
625
|
+
protoOf(CausalityCheckCauseButFor).get_signature_q9pg5r_k$ = function () {
|
|
626
|
+
return this.signature_1;
|
|
627
627
|
};
|
|
628
|
-
protoOf(CausalityCheckCauseButFor).
|
|
629
|
-
var cause = request.arguments.
|
|
630
|
-
var effect = this.
|
|
631
|
-
return sequenceOf(request.replyWithCondition(arg2pScope(CausalitySolver$CausalityCheckCauseButFor$solve$lambda(request, cause, this
|
|
628
|
+
protoOf(CausalityCheckCauseButFor).solve_ktvn8p_k$ = function (request) {
|
|
629
|
+
var cause = request.arguments.get_c1px32_k$(0);
|
|
630
|
+
var effect = this.$this_1.clean_unw6tt_k$(request.arguments.get_c1px32_k$(1).toString());
|
|
631
|
+
return sequenceOf(request.replyWithCondition(arg2pScope(CausalitySolver$CausalityCheckCauseButFor$solve$lambda(request, cause, this.$this_1, effect)), VOID, []));
|
|
632
632
|
};
|
|
633
633
|
protoOf(CausalityCheckCauseButFor).solve = function (request) {
|
|
634
|
-
return this.
|
|
634
|
+
return this.solve_ktvn8p_k$(request);
|
|
635
635
|
};
|
|
636
636
|
function CausalityCheckInterventionICAIL24($outer) {
|
|
637
|
-
this
|
|
638
|
-
this.
|
|
637
|
+
this.$this_1 = $outer;
|
|
638
|
+
this.signature_1 = new Signature('ness_original_intervention', 2);
|
|
639
639
|
}
|
|
640
|
-
protoOf(CausalityCheckInterventionICAIL24).
|
|
641
|
-
return this.
|
|
640
|
+
protoOf(CausalityCheckInterventionICAIL24).get_signature_q9pg5r_k$ = function () {
|
|
641
|
+
return this.signature_1;
|
|
642
642
|
};
|
|
643
|
-
protoOf(CausalityCheckInterventionICAIL24).
|
|
644
|
-
var intervention = request.arguments.
|
|
645
|
-
var effect = this.
|
|
646
|
-
return sequenceOf(request.replyWithCondition(checkCausalityICAIL24(this
|
|
643
|
+
protoOf(CausalityCheckInterventionICAIL24).solve_ktvn8p_k$ = function (request) {
|
|
644
|
+
var intervention = request.arguments.get_c1px32_k$(0).castToList();
|
|
645
|
+
var effect = this.$this_1.clean_unw6tt_k$(request.arguments.get_c1px32_k$(1).toString());
|
|
646
|
+
return sequenceOf(request.replyWithCondition(checkCausalityICAIL24(this.$this_1, request, intervention, effect), VOID, []));
|
|
647
647
|
};
|
|
648
648
|
protoOf(CausalityCheckInterventionICAIL24).solve = function (request) {
|
|
649
|
-
return this.
|
|
649
|
+
return this.solve_ktvn8p_k$(request);
|
|
650
650
|
};
|
|
651
651
|
function CausalityCheckCauseICAIL24($outer) {
|
|
652
|
-
this
|
|
653
|
-
this.
|
|
652
|
+
this.$this_1 = $outer;
|
|
653
|
+
this.signature_1 = new Signature('ness_original', 3);
|
|
654
654
|
}
|
|
655
|
-
protoOf(CausalityCheckCauseICAIL24).
|
|
656
|
-
return this.
|
|
655
|
+
protoOf(CausalityCheckCauseICAIL24).get_signature_q9pg5r_k$ = function () {
|
|
656
|
+
return this.signature_1;
|
|
657
657
|
};
|
|
658
|
-
protoOf(CausalityCheckCauseICAIL24).
|
|
659
|
-
var intervention = request.arguments.
|
|
660
|
-
var cause = request.arguments.
|
|
661
|
-
var effect = this.
|
|
658
|
+
protoOf(CausalityCheckCauseICAIL24).solve_ktvn8p_k$ = function (request) {
|
|
659
|
+
var intervention = request.arguments.get_c1px32_k$(0);
|
|
660
|
+
var cause = request.arguments.get_c1px32_k$(1);
|
|
661
|
+
var effect = this.$this_1.clean_unw6tt_k$(request.arguments.get_c1px32_k$(2).toString());
|
|
662
662
|
if (!isInterface(intervention, Var)) {
|
|
663
663
|
throw Companion_instance_2.forGoal(request.context, request.signature, Expected_VARIABLE_getInstance(), intervention);
|
|
664
664
|
}
|
|
665
|
-
var tmp = getInterventions(this
|
|
666
|
-
var tmp_0 = filter(tmp, CausalitySolver$CausalityCheckCauseICAIL24$solve$lambda(this
|
|
665
|
+
var tmp = getInterventions(this.$this_1, request, cause, effect);
|
|
666
|
+
var tmp_0 = filter(tmp, CausalitySolver$CausalityCheckCauseICAIL24$solve$lambda(this.$this_1, request, effect));
|
|
667
667
|
var tmp0_elvis_lhs = firstOrNull(map(tmp_0, CausalitySolver$CausalityCheckCauseICAIL24$solve$lambda_0(intervention)));
|
|
668
668
|
return sequenceOf(request.replyWith(tmp0_elvis_lhs == null ? Companion_getInstance().failed() : tmp0_elvis_lhs, VOID, []));
|
|
669
669
|
};
|
|
670
670
|
protoOf(CausalityCheckCauseICAIL24).solve = function (request) {
|
|
671
|
-
return this.
|
|
671
|
+
return this.solve_ktvn8p_k$(request);
|
|
672
672
|
};
|
|
673
673
|
function CausalityCheckInterventionICAIL25($outer) {
|
|
674
|
-
this
|
|
675
|
-
this.
|
|
674
|
+
this.$this_1 = $outer;
|
|
675
|
+
this.signature_1 = new Signature('ness_intervention', 2);
|
|
676
676
|
}
|
|
677
|
-
protoOf(CausalityCheckInterventionICAIL25).
|
|
678
|
-
return this.
|
|
677
|
+
protoOf(CausalityCheckInterventionICAIL25).get_signature_q9pg5r_k$ = function () {
|
|
678
|
+
return this.signature_1;
|
|
679
679
|
};
|
|
680
|
-
protoOf(CausalityCheckInterventionICAIL25).
|
|
681
|
-
var intervention = request.arguments.
|
|
682
|
-
var effect = this.
|
|
683
|
-
return sequenceOf(request.replyWithCondition(checkCausalityICAIL25(this
|
|
680
|
+
protoOf(CausalityCheckInterventionICAIL25).solve_ktvn8p_k$ = function (request) {
|
|
681
|
+
var intervention = request.arguments.get_c1px32_k$(0).castToList();
|
|
682
|
+
var effect = this.$this_1.clean_unw6tt_k$(request.arguments.get_c1px32_k$(1).toString());
|
|
683
|
+
return sequenceOf(request.replyWithCondition(checkCausalityICAIL25(this.$this_1, request, intervention, effect), VOID, []));
|
|
684
684
|
};
|
|
685
685
|
protoOf(CausalityCheckInterventionICAIL25).solve = function (request) {
|
|
686
|
-
return this.
|
|
686
|
+
return this.solve_ktvn8p_k$(request);
|
|
687
687
|
};
|
|
688
688
|
function CausalityCheckCauseICAIL25($outer) {
|
|
689
|
-
this
|
|
690
|
-
this.
|
|
689
|
+
this.$this_1 = $outer;
|
|
690
|
+
this.signature_1 = new Signature('ness', 3);
|
|
691
691
|
}
|
|
692
|
-
protoOf(CausalityCheckCauseICAIL25).
|
|
693
|
-
return this.
|
|
692
|
+
protoOf(CausalityCheckCauseICAIL25).get_signature_q9pg5r_k$ = function () {
|
|
693
|
+
return this.signature_1;
|
|
694
694
|
};
|
|
695
|
-
protoOf(CausalityCheckCauseICAIL25).
|
|
696
|
-
var intervention = request.arguments.
|
|
697
|
-
var cause = request.arguments.
|
|
698
|
-
var effect = this.
|
|
695
|
+
protoOf(CausalityCheckCauseICAIL25).solve_ktvn8p_k$ = function (request) {
|
|
696
|
+
var intervention = request.arguments.get_c1px32_k$(0);
|
|
697
|
+
var cause = request.arguments.get_c1px32_k$(1);
|
|
698
|
+
var effect = this.$this_1.clean_unw6tt_k$(request.arguments.get_c1px32_k$(2).toString());
|
|
699
699
|
if (!isInterface(intervention, Var)) {
|
|
700
700
|
throw Companion_instance_2.forGoal(request.context, request.signature, Expected_VARIABLE_getInstance(), intervention);
|
|
701
701
|
}
|
|
702
|
-
var tmp = getInterventions(this
|
|
703
|
-
var tmp_0 = filter(tmp, CausalitySolver$CausalityCheckCauseICAIL25$solve$lambda(this
|
|
702
|
+
var tmp = getInterventions(this.$this_1, request, cause, effect);
|
|
703
|
+
var tmp_0 = filter(tmp, CausalitySolver$CausalityCheckCauseICAIL25$solve$lambda(this.$this_1, request, effect));
|
|
704
704
|
var tmp0_elvis_lhs = firstOrNull(map(tmp_0, CausalitySolver$CausalityCheckCauseICAIL25$solve$lambda_0(intervention)));
|
|
705
705
|
return sequenceOf(request.replyWith(tmp0_elvis_lhs == null ? Companion_getInstance().failed() : tmp0_elvis_lhs, VOID, []));
|
|
706
706
|
};
|
|
707
707
|
protoOf(CausalityCheckCauseICAIL25).solve = function (request) {
|
|
708
|
-
return this.
|
|
708
|
+
return this.solve_ktvn8p_k$(request);
|
|
709
709
|
};
|
|
710
710
|
function CausalitySolver$solveFresh$lambda(this$0) {
|
|
711
711
|
return function (it) {
|
|
712
|
-
return mineActiveGraph(this$0.
|
|
712
|
+
return mineActiveGraph(this$0.solver_1);
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
715
|
function CausalitySolver$getSupports$lambda(this$0, $effect) {
|
|
716
716
|
return function (it) {
|
|
717
|
-
return equalTerms(this$0, it.
|
|
717
|
+
return equalTerms(this$0, it.argument_1.conclusion_1, $effect);
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
720
|
function CausalitySolver$getSupports$lambda_0(this$0, $graph) {
|
|
721
721
|
return function (it) {
|
|
722
|
-
return supporters(this$0, it.
|
|
722
|
+
return supporters(this$0, it.argument_1, $graph, emptyList());
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
725
|
function CausalitySolver$getSupports$lambda_1(it) {
|
|
726
|
-
return it.
|
|
726
|
+
return it.argument_1;
|
|
727
727
|
}
|
|
728
728
|
function CausalitySolver$checkBaseTheory$lambda(a) {
|
|
729
|
-
return a.
|
|
729
|
+
return a.termRepresentation_f75xll_k$();
|
|
730
730
|
}
|
|
731
731
|
function CausalitySolver$getSubsets$lambda$lambda(it) {
|
|
732
|
-
return it.
|
|
732
|
+
return it.get_isYes_it760k_k$();
|
|
733
733
|
}
|
|
734
734
|
function CausalitySolver$getSubsets$lambda$lambda_0($this_arg2pScope) {
|
|
735
735
|
return function (it) {
|
|
736
|
-
return ensureNotNull(it.
|
|
736
|
+
return ensureNotNull(it.get_substitution_i7fi9y_k$().get_wei43m_k$($this_arg2pScope.get_X_1mhr5b_k$())).castToList();
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
739
|
function CausalitySolver$getSubsets$lambda($request, $intervention) {
|
|
740
740
|
return function ($this$arg2pScope) {
|
|
741
|
-
var tmp = $request.solve($this$arg2pScope.stringInvoke('proper_subsets', $intervention, [$this$arg2pScope.
|
|
741
|
+
var tmp = $request.solve($this$arg2pScope.stringInvoke('proper_subsets', $intervention, [$this$arg2pScope.get_X_1mhr5b_k$()]));
|
|
742
742
|
var tmp_0 = filter(tmp, CausalitySolver$getSubsets$lambda$lambda);
|
|
743
743
|
return toList(map(tmp_0, CausalitySolver$getSubsets$lambda$lambda_0($this$arg2pScope)));
|
|
744
744
|
};
|
|
745
745
|
}
|
|
746
746
|
function CausalitySolver$getInterventions$lambda$lambda(it) {
|
|
747
|
-
return it.
|
|
747
|
+
return it.get_isYes_it760k_k$();
|
|
748
748
|
}
|
|
749
749
|
function CausalitySolver$getInterventions$lambda$lambda_0($this_arg2pScope) {
|
|
750
750
|
return function (it) {
|
|
751
|
-
return ensureNotNull(it.
|
|
751
|
+
return ensureNotNull(it.get_substitution_i7fi9y_k$().get_wei43m_k$($this_arg2pScope.get_X_1mhr5b_k$())).castToList();
|
|
752
752
|
};
|
|
753
753
|
}
|
|
754
754
|
function CausalitySolver$getInterventions$lambda($request, $rules, $cause) {
|
|
755
755
|
return function ($this$arg2pScope) {
|
|
756
|
-
var tmp = $request.solve($this$arg2pScope.stringInvoke('generate_interventions', $rules, [$cause, $this$arg2pScope.
|
|
756
|
+
var tmp = $request.solve($this$arg2pScope.stringInvoke('generate_interventions', $rules, [$cause, $this$arg2pScope.get_X_1mhr5b_k$()]));
|
|
757
757
|
var tmp_0 = filter(tmp, CausalitySolver$getInterventions$lambda$lambda);
|
|
758
758
|
return map(tmp_0, CausalitySolver$getInterventions$lambda$lambda_0($this$arg2pScope));
|
|
759
759
|
};
|
|
@@ -762,21 +762,21 @@
|
|
|
762
762
|
var tmp = this;
|
|
763
763
|
var tmp_0 = Arg2pSolverFactory_instance;
|
|
764
764
|
var tmp0_graphExtensions = emptyList();
|
|
765
|
-
tmp.
|
|
766
|
-
this.
|
|
765
|
+
tmp.solver_1 = tmp_0.default$default_dllkmc_k$(VOID, (new FlagsBuilder(VOID, VOID, VOID, VOID, VOID, 'grounded', VOID, VOID, VOID, VOID, tmp0_graphExtensions)).create_md4cuc_k$());
|
|
766
|
+
this.operators_1 = Companion_instance_3.default$default_tu0rs4_k$().operators_rhxmbz_k$();
|
|
767
767
|
var tmp_1 = this;
|
|
768
768
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
769
|
-
tmp_1.
|
|
770
|
-
this.
|
|
771
|
-
this.
|
|
769
|
+
tmp_1.graphCache_1 = LinkedHashMap_init_$Create$();
|
|
770
|
+
this.alias_1 = 'prolog.argumentation.causality.solver';
|
|
771
|
+
this.theoryOperators_1 = Companion_instance_4.operators_rhxmbz_k$().plusOperatorSet(Companion_instance_5.operators_rhxmbz_k$()).plusOperatorSet(Companion_getInstance_3().DEFAULT);
|
|
772
772
|
}
|
|
773
|
-
protoOf(CausalitySolver).
|
|
773
|
+
protoOf(CausalitySolver).clean_unw6tt_k$ = function (string) {
|
|
774
774
|
return replace(replace(string, ' ', ''), "'", '');
|
|
775
775
|
};
|
|
776
|
-
protoOf(CausalitySolver).
|
|
777
|
-
return this.
|
|
776
|
+
protoOf(CausalitySolver).get_alias_iooo4n_k$ = function () {
|
|
777
|
+
return this.alias_1;
|
|
778
778
|
};
|
|
779
|
-
protoOf(CausalitySolver).
|
|
779
|
+
protoOf(CausalitySolver).get_baseContent_3c5zi9_k$ = function () {
|
|
780
780
|
// Inline function 'kotlin.let' call
|
|
781
781
|
var primitives = listOf([new CausalityCheckInterventionICAIL24(this), new CausalityCheckCauseICAIL24(this), new CausalityCheckInterventionICAIL25(this), new CausalityCheckCauseICAIL25(this), new CausalityCheckCauseButFor(this)]);
|
|
782
782
|
var tmp = Companion_getInstance_4();
|
|
@@ -784,22 +784,22 @@
|
|
|
784
784
|
var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(primitives, 10)), 16);
|
|
785
785
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
786
786
|
var destination = LinkedHashMap_init_$Create$_0(capacity);
|
|
787
|
-
var _iterator__ex2g4s = primitives.
|
|
788
|
-
while (_iterator__ex2g4s.
|
|
789
|
-
var element = _iterator__ex2g4s.
|
|
790
|
-
var tmp$ret$4 = element.
|
|
791
|
-
destination.
|
|
787
|
+
var _iterator__ex2g4s = primitives.iterator_jk1svi_k$();
|
|
788
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
789
|
+
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
790
|
+
var tmp$ret$4 = element.get_signature_q9pg5r_k$();
|
|
791
|
+
destination.put_4fpzoq_k$(tmp$ret$4, element);
|
|
792
792
|
}
|
|
793
|
-
return tmp.of(this.
|
|
793
|
+
return tmp.of(this.alias_1, destination, parseTheoryWithOperators(Companion_instance_1, 'subsets([], []).\nsubsets([H|T], [H|NT]) :- subsets(T, NT).\nsubsets([_|T], NT) :- subsets(T, NT).\n\nproper_subsets(L, S) :-\n subsets(L, S),\n S \\= [],\n S \\= L.\n\ngenerate_interventions(_, S, [CS]) :-\n compl(S, CS).\ngenerate_interventions(_, S, [undercut(S)]) :-\n S \\= -_.\ngenerate_interventions(R, S, SUP) :-\n parser:::convertAllRules(_),\n compl(S, CS),\n unused_premises(R, UP), !,\n subsets(UP, SUP),\n member(CS, SUP),\n SUP \\= [].\n\ncompl(-X, X) :- !.\ncompl(X, -X).\n\nunused_premises(R, UP) :-\n findall(P, (parser::rule(Id, P, _), \\+ member(Id, R), ground(Id)), RR),\n utils::appendLists(RR, UP).\n', this.theoryOperators_1));
|
|
794
794
|
};
|
|
795
|
-
protoOf(CausalitySolver).
|
|
795
|
+
protoOf(CausalitySolver).identifier_qrkms7_k$ = function () {
|
|
796
796
|
return 'causality';
|
|
797
797
|
};
|
|
798
|
-
protoOf(CausalitySolver).
|
|
799
|
-
return this.
|
|
798
|
+
protoOf(CausalitySolver).get_theoryOperators_6jbeo1_k$ = function () {
|
|
799
|
+
return this.theoryOperators_1;
|
|
800
800
|
};
|
|
801
801
|
//region block: post-declaration
|
|
802
|
-
protoOf(CausalitySolver).
|
|
802
|
+
protoOf(CausalitySolver).content_fqilq1_k$ = content;
|
|
803
803
|
//endregion
|
|
804
804
|
//region block: exports
|
|
805
805
|
_.$_$ = _.$_$ || {};
|