@tuprolog/arg2p 0.16.6 → 0.16.8
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 +2737 -2732
- package/2p-core.js.map +1 -1
- package/2p-dsl-core.js +479 -479
- package/2p-dsl-core.js.map +1 -1
- package/2p-dsl-solve.js +247 -247
- package/2p-dsl-solve.js.map +1 -1
- package/2p-dsl-theory.js +154 -154
- 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 +1046 -836
- package/2p-io-lib.js.map +1 -1
- package/2p-parser-core.js +127 -127
- package/2p-parser-core.js.map +1 -1
- package/2p-parser-impl.js +1575 -1575
- package/2p-parser-impl.js.map +1 -1
- package/2p-parser-theory.js +91 -91
- package/2p-parser-theory.js.map +1 -1
- package/2p-solve-prolog.js +2856 -0
- package/2p-solve-prolog.js.map +1 -0
- package/2p-solve.js +5655 -4460
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +1693 -1693
- package/2p-theory.js.map +1 -1
- package/2p-unify.js +363 -363
- package/2p-unify.js.map +1 -1
- package/2p-utils.js +448 -448
- package/2p-utils.js.map +1 -1
- package/arg2p-causality-solver.js +267 -261
- package/arg2p-causality-solver.js.map +1 -1
- package/arg2p-core.js +3218 -2130
- package/arg2p-core.js.map +1 -1
- package/arg2p.js +117 -117
- package/arg2p.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +2803 -2699
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kt-math.js +1544 -1544
- package/kt-math.js.map +1 -1
- package/okio-parent-okio-nodefilesystem.js +51 -51
- package/okio-parent-okio-nodefilesystem.js.map +1 -1
- package/okio-parent-okio.js +693 -693
- package/okio-parent-okio.js.map +1 -1
- package/package.json +1 -1
- package/2p-solve-classic.js +0 -2832
- package/2p-solve-classic.js.map +0 -1
|
@@ -34,82 +34,83 @@
|
|
|
34
34
|
'use strict';
|
|
35
35
|
//region block: imports
|
|
36
36
|
var Companion_instance = kotlin_it_unibo_tuprolog_core.$_$.p;
|
|
37
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
38
|
-
var filter = kotlin_kotlin.$_$.
|
|
39
|
-
var map = kotlin_kotlin.$_$.
|
|
40
|
-
var firstOrNull = kotlin_kotlin.$_$.
|
|
37
|
+
var ensureNotNull = kotlin_kotlin.$_$.qc;
|
|
38
|
+
var filter = kotlin_kotlin.$_$.d9;
|
|
39
|
+
var map = kotlin_kotlin.$_$.q9;
|
|
40
|
+
var firstOrNull = kotlin_kotlin.$_$.e9;
|
|
41
41
|
var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.v;
|
|
42
42
|
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_unify.$_$.a;
|
|
43
43
|
var Companion_instance_0 = kotlin_it_unibo_tuprolog_core.$_$.w;
|
|
44
44
|
var parseTerm = kotlin_it_unibo_tuprolog_parser_core.$_$.e;
|
|
45
45
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.t;
|
|
46
46
|
var Unit_instance = kotlin_kotlin.$_$.q;
|
|
47
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
47
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.s2;
|
|
48
48
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.s;
|
|
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.$_$.
|
|
49
|
+
var plus = kotlin_kotlin.$_$.u4;
|
|
50
|
+
var addAll = kotlin_kotlin.$_$.g2;
|
|
51
|
+
var plus_0 = kotlin_kotlin.$_$.t4;
|
|
52
|
+
var emptyList = kotlin_kotlin.$_$.g3;
|
|
53
|
+
var to = kotlin_kotlin.$_$.yc;
|
|
54
54
|
var Companion_instance_1 = kotlin_it_unibo_tuprolog_theory.$_$.b;
|
|
55
55
|
var parseTheoryWithOperators = kotlin_it_unibo_tuprolog_parser_theory.$_$.c;
|
|
56
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.$_$.
|
|
59
|
+
var asSequence = kotlin_kotlin.$_$.p2;
|
|
60
|
+
var flatMap = kotlin_kotlin.$_$.h9;
|
|
61
|
+
var toList = kotlin_kotlin.$_$.fa;
|
|
62
62
|
var Companion_getInstance_2 = kotlin_it_unibo_tuprolog_core.$_$.l;
|
|
63
|
-
var Collection = kotlin_kotlin.$_$.
|
|
64
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
65
|
-
var distinct = kotlin_kotlin.$_$.
|
|
63
|
+
var Collection = kotlin_kotlin.$_$.z1;
|
|
64
|
+
var isInterface = kotlin_kotlin.$_$.p7;
|
|
65
|
+
var distinct = kotlin_kotlin.$_$.e3;
|
|
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.$_$.h5;
|
|
68
|
+
var toString = kotlin_kotlin.$_$.y7;
|
|
69
69
|
var Default_getInstance = kotlin_kotlin.$_$.l;
|
|
70
|
-
var nextUInt = kotlin_kotlin.$_$.
|
|
71
|
-
var UInt = kotlin_kotlin.$_$.
|
|
72
|
-
var Signature = kotlin_it_unibo_tuprolog_solve.$_$.
|
|
73
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
70
|
+
var nextUInt = kotlin_kotlin.$_$.e8;
|
|
71
|
+
var UInt = kotlin_kotlin.$_$.nc;
|
|
72
|
+
var Signature = kotlin_it_unibo_tuprolog_solve.$_$.w3;
|
|
73
|
+
var protoOf = kotlin_kotlin.$_$.v7;
|
|
74
74
|
var VOID = kotlin_kotlin.$_$.b;
|
|
75
|
-
var sequenceOf = kotlin_kotlin.$_$.
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var
|
|
75
|
+
var sequenceOf = kotlin_kotlin.$_$.x9;
|
|
76
|
+
var get_help = kotlin_it_unibo_tuprolog_solve.$_$.n3;
|
|
77
|
+
var Helpable = kotlin_it_unibo_tuprolog_solve.$_$.o3;
|
|
78
|
+
var initMetadataForClass = kotlin_kotlin.$_$.i7;
|
|
79
|
+
var Companion_instance_2 = kotlin_it_unibo_tuprolog_solve.$_$.c1;
|
|
80
|
+
var Expected_VARIABLE_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.o;
|
|
80
81
|
var Var = kotlin_it_unibo_tuprolog_core.$_$.d3;
|
|
81
82
|
var mineActiveGraph = kotlin_it_unibo_tuprolog_argumentation_core.$_$.k;
|
|
82
83
|
var Arg2pSolverFactory_instance = kotlin_it_unibo_tuprolog_argumentation_core.$_$.d;
|
|
83
84
|
var FlagsBuilder = kotlin_it_unibo_tuprolog_argumentation_core.$_$.f;
|
|
84
85
|
var Companion_instance_3 = kotlin_it_unibo_tuprolog_argumentation_core.$_$.c;
|
|
85
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.
|
|
86
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.x;
|
|
86
87
|
var Companion_instance_4 = kotlin_it_unibo_tuprolog_argumentation_core.$_$.a;
|
|
87
88
|
var Companion_instance_5 = kotlin_it_unibo_tuprolog_argumentation_core.$_$.b;
|
|
88
89
|
var Companion_getInstance_3 = kotlin_it_unibo_tuprolog_core.$_$.i;
|
|
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.$_$.
|
|
90
|
+
var replace = kotlin_kotlin.$_$.db;
|
|
91
|
+
var listOf = kotlin_kotlin.$_$.z3;
|
|
92
|
+
var Companion_getInstance_4 = kotlin_it_unibo_tuprolog_solve.$_$.i1;
|
|
93
|
+
var mapCapacity = kotlin_kotlin.$_$.a4;
|
|
94
|
+
var coerceAtLeast = kotlin_kotlin.$_$.j8;
|
|
95
|
+
var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.w;
|
|
95
96
|
var content = kotlin_it_unibo_tuprolog_argumentation_core.$_$.g;
|
|
96
97
|
var ArgLibrary = kotlin_it_unibo_tuprolog_argumentation_core.$_$.h;
|
|
97
98
|
var Loadable = kotlin_it_unibo_tuprolog_argumentation_core.$_$.i;
|
|
98
99
|
//endregion
|
|
99
100
|
//region block: pre-declaration
|
|
100
|
-
initMetadataForClass(CausalityCheckCauseButFor, 'CausalityCheckCauseButFor', VOID, VOID, [
|
|
101
|
-
initMetadataForClass(CausalityCheckInterventionICAIL24, 'CausalityCheckInterventionICAIL24', VOID, VOID, [
|
|
102
|
-
initMetadataForClass(CausalityCheckCauseICAIL24, 'CausalityCheckCauseICAIL24', VOID, VOID, [
|
|
103
|
-
initMetadataForClass(CausalityCheckInterventionICAIL25, 'CausalityCheckInterventionICAIL25', VOID, VOID, [
|
|
104
|
-
initMetadataForClass(CausalityCheckCauseICAIL25, 'CausalityCheckCauseICAIL25', VOID, VOID, [
|
|
101
|
+
initMetadataForClass(CausalityCheckCauseButFor, 'CausalityCheckCauseButFor', VOID, VOID, [Helpable]);
|
|
102
|
+
initMetadataForClass(CausalityCheckInterventionICAIL24, 'CausalityCheckInterventionICAIL24', VOID, VOID, [Helpable]);
|
|
103
|
+
initMetadataForClass(CausalityCheckCauseICAIL24, 'CausalityCheckCauseICAIL24', VOID, VOID, [Helpable]);
|
|
104
|
+
initMetadataForClass(CausalityCheckInterventionICAIL25, 'CausalityCheckInterventionICAIL25', VOID, VOID, [Helpable]);
|
|
105
|
+
initMetadataForClass(CausalityCheckCauseICAIL25, 'CausalityCheckCauseICAIL25', VOID, VOID, [Helpable]);
|
|
105
106
|
initMetadataForClass(CausalitySolver, 'CausalitySolver', CausalitySolver, VOID, [ArgLibrary, Loadable]);
|
|
106
107
|
//endregion
|
|
107
108
|
function CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda(it) {
|
|
108
|
-
return it.
|
|
109
|
+
return it.e1z();
|
|
109
110
|
}
|
|
110
111
|
function CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda_0($this_arg2pScope) {
|
|
111
112
|
return function (it) {
|
|
112
|
-
return Companion_instance.of([ensureNotNull(it.
|
|
113
|
+
return Companion_instance.of([ensureNotNull(it.u1x().l2($this_arg2pScope.p1j()))]);
|
|
113
114
|
};
|
|
114
115
|
}
|
|
115
116
|
function CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda_1(this$0, $request, $effect) {
|
|
@@ -119,7 +120,7 @@
|
|
|
119
120
|
}
|
|
120
121
|
function CausalitySolver$CausalityCheckCauseButFor$solve$lambda($request, $cause, this$0, $effect) {
|
|
121
122
|
return function ($this$arg2pScope) {
|
|
122
|
-
var tmp = $request.solve($this$arg2pScope.stringInvoke('compl', $cause, [$this$arg2pScope.
|
|
123
|
+
var tmp = $request.solve($this$arg2pScope.stringInvoke('compl', $cause, [$this$arg2pScope.p1j()]));
|
|
123
124
|
var tmp_0 = filter(tmp, CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda);
|
|
124
125
|
var tmp_1 = map(tmp_0, CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda_0($this$arg2pScope));
|
|
125
126
|
var tmp0_elvis_lhs = firstOrNull(map(tmp_1, CausalitySolver$CausalityCheckCauseButFor$solve$lambda$lambda_1(this$0, $request, $effect)));
|
|
@@ -147,35 +148,35 @@
|
|
|
147
148
|
};
|
|
148
149
|
}
|
|
149
150
|
function equalTerms($this, a, b) {
|
|
150
|
-
return Companion_getInstance_0().
|
|
151
|
+
return Companion_getInstance_0().s1n().match(parseTerm(Companion_instance_0, a), parseTerm(Companion_instance_0, b));
|
|
151
152
|
}
|
|
152
153
|
function attackers($this, x, graph) {
|
|
153
154
|
// Inline function 'kotlin.collections.filter' call
|
|
154
|
-
var tmp0 = graph.
|
|
155
|
+
var tmp0 = graph.e4s_1;
|
|
155
156
|
// Inline function 'kotlin.collections.filterTo' call
|
|
156
157
|
var destination = ArrayList_init_$Create$();
|
|
157
|
-
var _iterator__ex2g4s = tmp0.
|
|
158
|
-
while (_iterator__ex2g4s.
|
|
159
|
-
var element = _iterator__ex2g4s.
|
|
160
|
-
if (element.
|
|
161
|
-
destination.
|
|
158
|
+
var _iterator__ex2g4s = tmp0.n();
|
|
159
|
+
while (_iterator__ex2g4s.q()) {
|
|
160
|
+
var element = _iterator__ex2g4s.r();
|
|
161
|
+
if (element.y4r_1.n4r_1 === x.n4r_1) {
|
|
162
|
+
destination.l(element);
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
// Inline function 'kotlin.collections.map' call
|
|
165
166
|
// Inline function 'kotlin.collections.mapTo' call
|
|
166
167
|
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.
|
|
168
|
+
var _iterator__ex2g4s_0 = destination.n();
|
|
169
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
170
|
+
var item = _iterator__ex2g4s_0.r();
|
|
170
171
|
// Inline function 'kotlin.collections.find' call
|
|
171
|
-
var tmp0_0 = graph.
|
|
172
|
+
var tmp0_0 = graph.g4s_1;
|
|
172
173
|
var tmp$ret$7;
|
|
173
174
|
$l$block: {
|
|
174
175
|
// 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.
|
|
176
|
+
var _iterator__ex2g4s_1 = tmp0_0.n();
|
|
177
|
+
while (_iterator__ex2g4s_1.q()) {
|
|
178
|
+
var element_0 = _iterator__ex2g4s_1.r();
|
|
179
|
+
if (item.x4r_1.n4r_1 === element_0.b4s_1.n4r_1) {
|
|
179
180
|
tmp$ret$7 = element_0;
|
|
180
181
|
break $l$block;
|
|
181
182
|
}
|
|
@@ -184,24 +185,24 @@
|
|
|
184
185
|
}
|
|
185
186
|
var tmp$ret$6 = tmp$ret$7;
|
|
186
187
|
var tmp$ret$5 = ensureNotNull(tmp$ret$6);
|
|
187
|
-
destination_0.
|
|
188
|
+
destination_0.l(tmp$ret$5);
|
|
188
189
|
}
|
|
189
190
|
return destination_0;
|
|
190
191
|
}
|
|
191
192
|
function supporters($this, x, graph, chain) {
|
|
192
193
|
var tmp;
|
|
193
|
-
if (chain.
|
|
194
|
+
if (chain.s(x.n4r_1)) {
|
|
194
195
|
tmp = emptyList();
|
|
195
196
|
} else {
|
|
196
197
|
// Inline function 'kotlin.collections.filter' call
|
|
197
|
-
var tmp0 = graph.
|
|
198
|
+
var tmp0 = graph.g4s_1;
|
|
198
199
|
// Inline function 'kotlin.collections.filterTo' call
|
|
199
200
|
var destination = ArrayList_init_$Create$();
|
|
200
|
-
var _iterator__ex2g4s = tmp0.
|
|
201
|
-
while (_iterator__ex2g4s.
|
|
202
|
-
var element = _iterator__ex2g4s.
|
|
203
|
-
if (x.
|
|
204
|
-
destination.
|
|
201
|
+
var _iterator__ex2g4s = tmp0.n();
|
|
202
|
+
while (_iterator__ex2g4s.q()) {
|
|
203
|
+
var element = _iterator__ex2g4s.r();
|
|
204
|
+
if (x.n4r_1 === element.b4s_1.n4r_1 && element.c4s_1 === 'in') {
|
|
205
|
+
destination.l(element);
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
208
|
var tmp_0 = destination;
|
|
@@ -209,27 +210,27 @@
|
|
|
209
210
|
var tmp0_0 = attackers($this, x, graph);
|
|
210
211
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
211
212
|
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.
|
|
213
|
+
var _iterator__ex2g4s_0 = tmp0_0.n();
|
|
214
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
215
|
+
var element_0 = _iterator__ex2g4s_0.r();
|
|
215
216
|
// Inline function 'kotlin.collections.filter' call
|
|
216
|
-
var tmp0_1 = attackers($this, element_0.
|
|
217
|
+
var tmp0_1 = attackers($this, element_0.b4s_1, graph);
|
|
217
218
|
// Inline function 'kotlin.collections.filterTo' call
|
|
218
219
|
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.
|
|
220
|
+
var _iterator__ex2g4s_1 = tmp0_1.n();
|
|
221
|
+
while (_iterator__ex2g4s_1.q()) {
|
|
222
|
+
var element_1 = _iterator__ex2g4s_1.r();
|
|
223
|
+
if (!(element_1.b4s_1.n4r_1 === x.n4r_1)) {
|
|
224
|
+
destination_1.l(element_1);
|
|
224
225
|
}
|
|
225
226
|
}
|
|
226
227
|
// Inline function 'kotlin.collections.flatMap' call
|
|
227
228
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
228
229
|
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.
|
|
230
|
+
var _iterator__ex2g4s_2 = destination_1.n();
|
|
231
|
+
while (_iterator__ex2g4s_2.q()) {
|
|
232
|
+
var element_2 = _iterator__ex2g4s_2.r();
|
|
233
|
+
var list = supporters($this, element_2.b4s_1, graph, plus(chain, x.n4r_1));
|
|
233
234
|
addAll(destination_2, list);
|
|
234
235
|
}
|
|
235
236
|
var list_0 = destination_2;
|
|
@@ -241,37 +242,37 @@
|
|
|
241
242
|
}
|
|
242
243
|
function solveFresh($this, effect, kb) {
|
|
243
244
|
var theory = kb.toStringAsProlog(true);
|
|
244
|
-
var tmp0_safe_receiver = $this.
|
|
245
|
+
var tmp0_safe_receiver = $this.p4v_1.l2(to(theory, effect));
|
|
245
246
|
if (tmp0_safe_receiver == null)
|
|
246
247
|
null;
|
|
247
248
|
else {
|
|
248
249
|
// Inline function 'kotlin.let' call
|
|
249
250
|
return tmp0_safe_receiver;
|
|
250
251
|
}
|
|
251
|
-
if ($this.
|
|
252
|
-
$this.
|
|
252
|
+
if ($this.p4v_1.t() >= 256) {
|
|
253
|
+
$this.p4v_1.n3();
|
|
253
254
|
}
|
|
254
|
-
$this.
|
|
255
|
-
$this.
|
|
256
|
-
var tmp = $this.
|
|
255
|
+
$this.n4v_1.resetStaticKb();
|
|
256
|
+
$this.n4v_1.loadStaticKb(parseTheoryWithOperators(Companion_instance_1, theory, $this.o4v_1));
|
|
257
|
+
var tmp = $this.n4v_1.solve(parseStruct(Companion_getInstance_1(), 'answerQuery(' + effect + ')'));
|
|
257
258
|
var tmp1_elvis_lhs = firstOrNull(map(tmp, CausalitySolver$solveFresh$lambda($this)));
|
|
258
259
|
// Inline function 'kotlin.also' call
|
|
259
260
|
var this_0 = tmp1_elvis_lhs == null ? new Graph(emptyList(), emptyList(), emptyList()) : tmp1_elvis_lhs;
|
|
260
|
-
var tmp0 = $this.
|
|
261
|
+
var tmp0 = $this.p4v_1;
|
|
261
262
|
// Inline function 'kotlin.collections.set' call
|
|
262
263
|
var key = to(theory, effect);
|
|
263
|
-
tmp0.
|
|
264
|
+
tmp0.t4(key, this_0);
|
|
264
265
|
return this_0;
|
|
265
266
|
}
|
|
266
267
|
function getSupports($this, graph, effect) {
|
|
267
|
-
var tmp = asSequence(graph.
|
|
268
|
+
var tmp = asSequence(graph.g4s_1);
|
|
268
269
|
var tmp_0 = filter(tmp, CausalitySolver$getSupports$lambda($this, effect));
|
|
269
270
|
var tmp_1 = flatMap(tmp_0, CausalitySolver$getSupports$lambda_0($this, graph));
|
|
270
271
|
return map(tmp_1, CausalitySolver$getSupports$lambda_1);
|
|
271
272
|
}
|
|
272
273
|
function checkBaseTheory($this, request, effect) {
|
|
273
274
|
// Inline function 'kotlin.let' call
|
|
274
|
-
var it = solveFresh($this, effect, request.context.
|
|
275
|
+
var it = solveFresh($this, effect, request.context.a1y());
|
|
275
276
|
var tmp = getSupports($this, it, effect);
|
|
276
277
|
return toList(map(tmp, CausalitySolver$checkBaseTheory$lambda));
|
|
277
278
|
}
|
|
@@ -280,38 +281,38 @@
|
|
|
280
281
|
var this_0 = intervention.toList();
|
|
281
282
|
// Inline function 'kotlin.collections.mapTo' call
|
|
282
283
|
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.
|
|
284
|
+
var _iterator__ex2g4s = this_0.n();
|
|
285
|
+
while (_iterator__ex2g4s.q()) {
|
|
286
|
+
var item = _iterator__ex2g4s.r();
|
|
286
287
|
var tmp$ret$2 = Companion_getInstance_2().of(parseStruct(Companion_getInstance_1(), ':->(fk' + (item.hashCode() & 2147483647) + ', ' + item.toString() + ')'), []);
|
|
287
|
-
destination.
|
|
288
|
+
destination.l(tmp$ret$2);
|
|
288
289
|
}
|
|
289
290
|
// Inline function 'kotlin.let' call
|
|
290
291
|
// Inline function 'kotlin.let' call
|
|
291
|
-
var naf = solveFresh($this, effect, request.context.
|
|
292
|
+
var naf = solveFresh($this, effect, request.context.a1y().plusTheory(Companion_instance_1.ofIterableWithDefaultUnificator(destination)));
|
|
292
293
|
// Inline function 'kotlin.collections.filter' call
|
|
293
|
-
var tmp0 = naf.
|
|
294
|
+
var tmp0 = naf.g4s_1;
|
|
294
295
|
// Inline function 'kotlin.collections.filterTo' call
|
|
295
296
|
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.
|
|
297
|
+
var _iterator__ex2g4s_0 = tmp0.n();
|
|
298
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
299
|
+
var element = _iterator__ex2g4s_0.r();
|
|
300
|
+
if (element.c4s_1 === 'out' || element.c4s_1 === 'und') {
|
|
301
|
+
destination_0.l(element);
|
|
301
302
|
}
|
|
302
303
|
}
|
|
303
304
|
// Inline function 'kotlin.collections.filter' call
|
|
304
305
|
// Inline function 'kotlin.collections.filterTo' call
|
|
305
306
|
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.
|
|
307
|
+
var _iterator__ex2g4s_1 = destination_0.n();
|
|
308
|
+
while (_iterator__ex2g4s_1.q()) {
|
|
309
|
+
var element_0 = _iterator__ex2g4s_1.r();
|
|
309
310
|
var tmp$ret$13;
|
|
310
311
|
$l$block_0: {
|
|
311
312
|
// Inline function 'kotlin.collections.any' call
|
|
312
313
|
var tmp;
|
|
313
314
|
if (isInterface(support, Collection)) {
|
|
314
|
-
tmp = support.
|
|
315
|
+
tmp = support.i();
|
|
315
316
|
} else {
|
|
316
317
|
tmp = false;
|
|
317
318
|
}
|
|
@@ -319,10 +320,10 @@
|
|
|
319
320
|
tmp$ret$13 = false;
|
|
320
321
|
break $l$block_0;
|
|
321
322
|
}
|
|
322
|
-
var _iterator__ex2g4s_2 = support.
|
|
323
|
-
while (_iterator__ex2g4s_2.
|
|
324
|
-
var element_1 = _iterator__ex2g4s_2.
|
|
325
|
-
if (Companion_getInstance_0().
|
|
323
|
+
var _iterator__ex2g4s_2 = support.n();
|
|
324
|
+
while (_iterator__ex2g4s_2.q()) {
|
|
325
|
+
var element_1 = _iterator__ex2g4s_2.r();
|
|
326
|
+
if (Companion_getInstance_0().s1n().match(element_0.b4s_1.p4r(), element_1)) {
|
|
326
327
|
tmp$ret$13 = true;
|
|
327
328
|
break $l$block_0;
|
|
328
329
|
}
|
|
@@ -330,24 +331,24 @@
|
|
|
330
331
|
tmp$ret$13 = false;
|
|
331
332
|
}
|
|
332
333
|
if (tmp$ret$13) {
|
|
333
|
-
destination_1.
|
|
334
|
+
destination_1.l(element_0);
|
|
334
335
|
}
|
|
335
336
|
}
|
|
336
337
|
// Inline function 'kotlin.collections.flatMap' call
|
|
337
338
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
338
339
|
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.
|
|
340
|
+
var _iterator__ex2g4s_3 = destination_1.n();
|
|
341
|
+
while (_iterator__ex2g4s_3.q()) {
|
|
342
|
+
var element_2 = _iterator__ex2g4s_3.r();
|
|
342
343
|
// Inline function 'kotlin.collections.filter' call
|
|
343
|
-
var tmp0_0 = attackers($this, element_2.
|
|
344
|
+
var tmp0_0 = attackers($this, element_2.b4s_1, naf);
|
|
344
345
|
// Inline function 'kotlin.collections.filterTo' call
|
|
345
346
|
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.
|
|
347
|
+
var _iterator__ex2g4s_4 = tmp0_0.n();
|
|
348
|
+
while (_iterator__ex2g4s_4.q()) {
|
|
349
|
+
var element_3 = _iterator__ex2g4s_4.r();
|
|
350
|
+
if (element_3.c4s_1 === 'in') {
|
|
351
|
+
destination_3.l(element_3);
|
|
351
352
|
}
|
|
352
353
|
}
|
|
353
354
|
var list = destination_3;
|
|
@@ -356,11 +357,11 @@
|
|
|
356
357
|
// Inline function 'kotlin.collections.map' call
|
|
357
358
|
// Inline function 'kotlin.collections.mapTo' call
|
|
358
359
|
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.
|
|
360
|
+
var _iterator__ex2g4s_5 = destination_2.n();
|
|
361
|
+
while (_iterator__ex2g4s_5.q()) {
|
|
362
|
+
var item_0 = _iterator__ex2g4s_5.r();
|
|
363
|
+
var tmp$ret$23 = item_0.b4s_1;
|
|
364
|
+
destination_4.l(tmp$ret$23);
|
|
364
365
|
}
|
|
365
366
|
return distinct(destination_4);
|
|
366
367
|
}
|
|
@@ -370,23 +371,23 @@
|
|
|
370
371
|
function getInterventions($this, request, cause, effect) {
|
|
371
372
|
var tmp = Companion_instance_0;
|
|
372
373
|
// Inline function 'kotlin.collections.map' call
|
|
373
|
-
var this_0 = solveFresh($this, effect, request.context.
|
|
374
|
+
var this_0 = solveFresh($this, effect, request.context.a1y()).d4s_1;
|
|
374
375
|
// Inline function 'kotlin.collections.mapTo' call
|
|
375
376
|
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.
|
|
377
|
+
var _iterator__ex2g4s = this_0.n();
|
|
378
|
+
while (_iterator__ex2g4s.q()) {
|
|
379
|
+
var item = _iterator__ex2g4s.r();
|
|
380
|
+
var tmp$ret$2 = item.g4r_1;
|
|
381
|
+
destination.l(tmp$ret$2);
|
|
381
382
|
}
|
|
382
383
|
// Inline function 'kotlin.collections.filter' call
|
|
383
384
|
// Inline function 'kotlin.collections.filterTo' call
|
|
384
385
|
var destination_0 = ArrayList_init_$Create$();
|
|
385
|
-
var _iterator__ex2g4s_0 = destination.
|
|
386
|
-
while (_iterator__ex2g4s_0.
|
|
387
|
-
var element = _iterator__ex2g4s_0.
|
|
386
|
+
var _iterator__ex2g4s_0 = destination.n();
|
|
387
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
388
|
+
var element = _iterator__ex2g4s_0.r();
|
|
388
389
|
if (!(element === 'none')) {
|
|
389
|
-
destination_0.
|
|
390
|
+
destination_0.l(element);
|
|
390
391
|
}
|
|
391
392
|
}
|
|
392
393
|
var rules = parseTerm(tmp, toString(toList_0(destination_0)));
|
|
@@ -394,14 +395,14 @@
|
|
|
394
395
|
}
|
|
395
396
|
function checkCausalityICAIL24($this, request, intervention, effect) {
|
|
396
397
|
var supports = checkBaseTheory($this, request, effect);
|
|
397
|
-
if (supports.
|
|
398
|
+
if (supports.i())
|
|
398
399
|
return false;
|
|
399
400
|
var attackers = checkIntervention($this, request, intervention, supports, effect);
|
|
400
401
|
var tmp;
|
|
401
402
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
402
|
-
if (!attackers.
|
|
403
|
+
if (!attackers.i()) {
|
|
403
404
|
var tmp_0;
|
|
404
|
-
if (intervention.
|
|
405
|
+
if (intervention.wz() <= 1) {
|
|
405
406
|
tmp_0 = true;
|
|
406
407
|
} else {
|
|
407
408
|
var tmp0 = getSubsets($this, request, intervention);
|
|
@@ -410,7 +411,7 @@
|
|
|
410
411
|
// Inline function 'kotlin.collections.none' call
|
|
411
412
|
var tmp_1;
|
|
412
413
|
if (isInterface(tmp0, Collection)) {
|
|
413
|
-
tmp_1 = tmp0.
|
|
414
|
+
tmp_1 = tmp0.i();
|
|
414
415
|
} else {
|
|
415
416
|
tmp_1 = false;
|
|
416
417
|
}
|
|
@@ -418,11 +419,11 @@
|
|
|
418
419
|
tmp$ret$1 = true;
|
|
419
420
|
break $l$block_0;
|
|
420
421
|
}
|
|
421
|
-
var _iterator__ex2g4s = tmp0.
|
|
422
|
-
while (_iterator__ex2g4s.
|
|
423
|
-
var element = _iterator__ex2g4s.
|
|
422
|
+
var _iterator__ex2g4s = tmp0.n();
|
|
423
|
+
while (_iterator__ex2g4s.q()) {
|
|
424
|
+
var element = _iterator__ex2g4s.r();
|
|
424
425
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
425
|
-
if (!checkIntervention($this, request, element, supports, effect).
|
|
426
|
+
if (!checkIntervention($this, request, element, supports, effect).i()) {
|
|
426
427
|
tmp$ret$1 = false;
|
|
427
428
|
break $l$block_0;
|
|
428
429
|
}
|
|
@@ -439,24 +440,24 @@
|
|
|
439
440
|
}
|
|
440
441
|
function checkCausalityICAIL25($this, request, intervention, effect) {
|
|
441
442
|
var supports = checkBaseTheory($this, request, effect);
|
|
442
|
-
if (supports.
|
|
443
|
+
if (supports.i())
|
|
443
444
|
return false;
|
|
444
445
|
// Inline function 'kotlin.collections.map' call
|
|
445
446
|
var this_0 = checkIntervention($this, request, intervention, supports, effect);
|
|
446
447
|
// Inline function 'kotlin.collections.mapTo' call
|
|
447
448
|
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.
|
|
449
|
+
var _iterator__ex2g4s = this_0.n();
|
|
450
|
+
while (_iterator__ex2g4s.q()) {
|
|
451
|
+
var item = _iterator__ex2g4s.r();
|
|
452
|
+
var tmp$ret$2 = item.p4r();
|
|
453
|
+
destination.l(tmp$ret$2);
|
|
453
454
|
}
|
|
454
455
|
var attackers = destination;
|
|
455
456
|
var tmp;
|
|
456
457
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
457
|
-
if (!attackers.
|
|
458
|
+
if (!attackers.i()) {
|
|
458
459
|
var tmp_0;
|
|
459
|
-
if (intervention.
|
|
460
|
+
if (intervention.wz() <= 1) {
|
|
460
461
|
tmp_0 = true;
|
|
461
462
|
} else {
|
|
462
463
|
var tmp0 = getSubsets($this, request, intervention);
|
|
@@ -465,7 +466,7 @@
|
|
|
465
466
|
// Inline function 'kotlin.collections.none' call
|
|
466
467
|
var tmp_1;
|
|
467
468
|
if (isInterface(tmp0, Collection)) {
|
|
468
|
-
tmp_1 = tmp0.
|
|
469
|
+
tmp_1 = tmp0.i();
|
|
469
470
|
} else {
|
|
470
471
|
tmp_1 = false;
|
|
471
472
|
}
|
|
@@ -473,18 +474,18 @@
|
|
|
473
474
|
tmp$ret$4 = true;
|
|
474
475
|
break $l$block_4;
|
|
475
476
|
}
|
|
476
|
-
var _iterator__ex2g4s_0 = tmp0.
|
|
477
|
-
while (_iterator__ex2g4s_0.
|
|
478
|
-
var element = _iterator__ex2g4s_0.
|
|
477
|
+
var _iterator__ex2g4s_0 = tmp0.n();
|
|
478
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
479
|
+
var element = _iterator__ex2g4s_0.r();
|
|
479
480
|
// Inline function 'kotlin.collections.map' call
|
|
480
481
|
var this_1 = checkIntervention($this, request, element, supports, effect);
|
|
481
482
|
// Inline function 'kotlin.collections.mapTo' call
|
|
482
483
|
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.
|
|
484
|
+
var _iterator__ex2g4s_1 = this_1.n();
|
|
485
|
+
while (_iterator__ex2g4s_1.q()) {
|
|
486
|
+
var item_0 = _iterator__ex2g4s_1.r();
|
|
487
|
+
var tmp$ret$8 = item_0.p4r();
|
|
488
|
+
destination_0.l(tmp$ret$8);
|
|
488
489
|
}
|
|
489
490
|
var n = destination_0;
|
|
490
491
|
var tmp$ret$9;
|
|
@@ -492,7 +493,7 @@
|
|
|
492
493
|
// Inline function 'kotlin.collections.all' call
|
|
493
494
|
var tmp_2;
|
|
494
495
|
if (isInterface(attackers, Collection)) {
|
|
495
|
-
tmp_2 = attackers.
|
|
496
|
+
tmp_2 = attackers.i();
|
|
496
497
|
} else {
|
|
497
498
|
tmp_2 = false;
|
|
498
499
|
}
|
|
@@ -500,15 +501,15 @@
|
|
|
500
501
|
tmp$ret$9 = true;
|
|
501
502
|
break $l$block_3;
|
|
502
503
|
}
|
|
503
|
-
var _iterator__ex2g4s_2 = attackers.
|
|
504
|
-
while (_iterator__ex2g4s_2.
|
|
505
|
-
var element_0 = _iterator__ex2g4s_2.
|
|
504
|
+
var _iterator__ex2g4s_2 = attackers.n();
|
|
505
|
+
while (_iterator__ex2g4s_2.q()) {
|
|
506
|
+
var element_0 = _iterator__ex2g4s_2.r();
|
|
506
507
|
var tmp$ret$11;
|
|
507
508
|
$l$block_2: {
|
|
508
509
|
// Inline function 'kotlin.collections.any' call
|
|
509
510
|
var tmp_3;
|
|
510
511
|
if (isInterface(n, Collection)) {
|
|
511
|
-
tmp_3 = n.
|
|
512
|
+
tmp_3 = n.i();
|
|
512
513
|
} else {
|
|
513
514
|
tmp_3 = false;
|
|
514
515
|
}
|
|
@@ -516,10 +517,10 @@
|
|
|
516
517
|
tmp$ret$11 = false;
|
|
517
518
|
break $l$block_2;
|
|
518
519
|
}
|
|
519
|
-
var _iterator__ex2g4s_3 = n.
|
|
520
|
-
while (_iterator__ex2g4s_3.
|
|
521
|
-
var element_1 = _iterator__ex2g4s_3.
|
|
522
|
-
if (Companion_getInstance_0().
|
|
520
|
+
var _iterator__ex2g4s_3 = n.n();
|
|
521
|
+
while (_iterator__ex2g4s_3.q()) {
|
|
522
|
+
var element_1 = _iterator__ex2g4s_3.r();
|
|
523
|
+
if (Companion_getInstance_0().s1n().match(element_0, element_1)) {
|
|
523
524
|
tmp$ret$11 = true;
|
|
524
525
|
break $l$block_2;
|
|
525
526
|
}
|
|
@@ -551,13 +552,13 @@
|
|
|
551
552
|
function checkButFor($this, request, intervention, effect) {
|
|
552
553
|
var tmp;
|
|
553
554
|
// Inline function 'kotlin.let' call
|
|
554
|
-
var tmp0 = solveFresh($this, effect, request.context.
|
|
555
|
+
var tmp0 = solveFresh($this, effect, request.context.a1y()).g4s_1;
|
|
555
556
|
var tmp$ret$2;
|
|
556
557
|
$l$block_0: {
|
|
557
558
|
// Inline function 'kotlin.collections.any' call
|
|
558
559
|
var tmp_0;
|
|
559
560
|
if (isInterface(tmp0, Collection)) {
|
|
560
|
-
tmp_0 = tmp0.
|
|
561
|
+
tmp_0 = tmp0.i();
|
|
561
562
|
} else {
|
|
562
563
|
tmp_0 = false;
|
|
563
564
|
}
|
|
@@ -565,10 +566,10 @@
|
|
|
565
566
|
tmp$ret$2 = false;
|
|
566
567
|
break $l$block_0;
|
|
567
568
|
}
|
|
568
|
-
var _iterator__ex2g4s = tmp0.
|
|
569
|
-
while (_iterator__ex2g4s.
|
|
570
|
-
var element = _iterator__ex2g4s.
|
|
571
|
-
if (element.
|
|
569
|
+
var _iterator__ex2g4s = tmp0.n();
|
|
570
|
+
while (_iterator__ex2g4s.q()) {
|
|
571
|
+
var element = _iterator__ex2g4s.r();
|
|
572
|
+
if (element.c4s_1 === 'in' && equalTerms($this, element.b4s_1.h4r_1, effect)) {
|
|
572
573
|
tmp$ret$2 = true;
|
|
573
574
|
break $l$block_0;
|
|
574
575
|
}
|
|
@@ -580,21 +581,21 @@
|
|
|
580
581
|
var this_0 = intervention.toList();
|
|
581
582
|
// Inline function 'kotlin.collections.mapTo' call
|
|
582
583
|
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.
|
|
584
|
+
var _iterator__ex2g4s_0 = this_0.n();
|
|
585
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
586
|
+
var item = _iterator__ex2g4s_0.r();
|
|
586
587
|
var tmp$ret$6 = Companion_getInstance_2().of(parseStruct(Companion_getInstance_1(), ':->(fk' + new UInt(nextUInt(Default_getInstance())) + ', ' + item.toString() + ')'), []);
|
|
587
|
-
destination.
|
|
588
|
+
destination.l(tmp$ret$6);
|
|
588
589
|
}
|
|
589
590
|
// Inline function 'kotlin.let' call
|
|
590
591
|
// Inline function 'kotlin.let' call
|
|
591
|
-
var tmp0_0 = solveFresh($this, effect, request.context.
|
|
592
|
+
var tmp0_0 = solveFresh($this, effect, request.context.a1y().plusTheory(Companion_instance_1.ofIterableWithDefaultUnificator(destination))).g4s_1;
|
|
592
593
|
var tmp$ret$11;
|
|
593
594
|
$l$block_2: {
|
|
594
595
|
// Inline function 'kotlin.collections.none' call
|
|
595
596
|
var tmp_1;
|
|
596
597
|
if (isInterface(tmp0_0, Collection)) {
|
|
597
|
-
tmp_1 = tmp0_0.
|
|
598
|
+
tmp_1 = tmp0_0.i();
|
|
598
599
|
} else {
|
|
599
600
|
tmp_1 = false;
|
|
600
601
|
}
|
|
@@ -602,10 +603,10 @@
|
|
|
602
603
|
tmp$ret$11 = true;
|
|
603
604
|
break $l$block_2;
|
|
604
605
|
}
|
|
605
|
-
var _iterator__ex2g4s_1 = tmp0_0.
|
|
606
|
-
while (_iterator__ex2g4s_1.
|
|
607
|
-
var element_0 = _iterator__ex2g4s_1.
|
|
608
|
-
if (element_0.
|
|
606
|
+
var _iterator__ex2g4s_1 = tmp0_0.n();
|
|
607
|
+
while (_iterator__ex2g4s_1.q()) {
|
|
608
|
+
var element_0 = _iterator__ex2g4s_1.r();
|
|
609
|
+
if (element_0.c4s_1 === 'in' && equalTerms($this, element_0.b4s_1.h4r_1, effect)) {
|
|
609
610
|
tmp$ret$11 = false;
|
|
610
611
|
break $l$block_2;
|
|
611
612
|
}
|
|
@@ -619,141 +620,141 @@
|
|
|
619
620
|
return tmp;
|
|
620
621
|
}
|
|
621
622
|
function CausalityCheckCauseButFor($outer) {
|
|
622
|
-
this
|
|
623
|
-
this.
|
|
623
|
+
this.t4v_1 = $outer;
|
|
624
|
+
this.s4v_1 = new Signature('but_for', 2);
|
|
624
625
|
}
|
|
625
|
-
protoOf(CausalityCheckCauseButFor).
|
|
626
|
-
return this.
|
|
626
|
+
protoOf(CausalityCheckCauseButFor).k1x = function () {
|
|
627
|
+
return this.s4v_1;
|
|
627
628
|
};
|
|
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
|
|
629
|
+
protoOf(CausalityCheckCauseButFor).l2m = function (request) {
|
|
630
|
+
var cause = request.arguments.u(0);
|
|
631
|
+
var effect = this.t4v_1.u4v(request.arguments.u(1).toString());
|
|
632
|
+
return sequenceOf(request.replyWithCondition(arg2pScope(CausalitySolver$CausalityCheckCauseButFor$solve$lambda(request, cause, this.t4v_1, effect)), VOID, []));
|
|
632
633
|
};
|
|
633
634
|
protoOf(CausalityCheckCauseButFor).solve = function (request) {
|
|
634
|
-
return this.
|
|
635
|
+
return this.l2m(request);
|
|
635
636
|
};
|
|
636
637
|
function CausalityCheckInterventionICAIL24($outer) {
|
|
637
|
-
this
|
|
638
|
-
this.
|
|
638
|
+
this.w4v_1 = $outer;
|
|
639
|
+
this.v4v_1 = new Signature('ness_original_intervention', 2);
|
|
639
640
|
}
|
|
640
|
-
protoOf(CausalityCheckInterventionICAIL24).
|
|
641
|
-
return this.
|
|
641
|
+
protoOf(CausalityCheckInterventionICAIL24).k1x = function () {
|
|
642
|
+
return this.v4v_1;
|
|
642
643
|
};
|
|
643
|
-
protoOf(CausalityCheckInterventionICAIL24).
|
|
644
|
-
var intervention = request.arguments.
|
|
645
|
-
var effect = this
|
|
646
|
-
return sequenceOf(request.replyWithCondition(checkCausalityICAIL24(this
|
|
644
|
+
protoOf(CausalityCheckInterventionICAIL24).l2m = function (request) {
|
|
645
|
+
var intervention = request.arguments.u(0).castToList();
|
|
646
|
+
var effect = this.w4v_1.u4v(request.arguments.u(1).toString());
|
|
647
|
+
return sequenceOf(request.replyWithCondition(checkCausalityICAIL24(this.w4v_1, request, intervention, effect), VOID, []));
|
|
647
648
|
};
|
|
648
649
|
protoOf(CausalityCheckInterventionICAIL24).solve = function (request) {
|
|
649
|
-
return this.
|
|
650
|
+
return this.l2m(request);
|
|
650
651
|
};
|
|
651
652
|
function CausalityCheckCauseICAIL24($outer) {
|
|
652
|
-
this
|
|
653
|
-
this.
|
|
653
|
+
this.y4v_1 = $outer;
|
|
654
|
+
this.x4v_1 = new Signature('ness_original', 3);
|
|
654
655
|
}
|
|
655
|
-
protoOf(CausalityCheckCauseICAIL24).
|
|
656
|
-
return this.
|
|
656
|
+
protoOf(CausalityCheckCauseICAIL24).k1x = function () {
|
|
657
|
+
return this.x4v_1;
|
|
657
658
|
};
|
|
658
|
-
protoOf(CausalityCheckCauseICAIL24).
|
|
659
|
-
var intervention = request.arguments.
|
|
660
|
-
var cause = request.arguments.
|
|
661
|
-
var effect = this
|
|
659
|
+
protoOf(CausalityCheckCauseICAIL24).l2m = function (request) {
|
|
660
|
+
var intervention = request.arguments.u(0);
|
|
661
|
+
var cause = request.arguments.u(1);
|
|
662
|
+
var effect = this.y4v_1.u4v(request.arguments.u(2).toString());
|
|
662
663
|
if (!isInterface(intervention, Var)) {
|
|
663
664
|
throw Companion_instance_2.forGoal(request.context, request.signature, Expected_VARIABLE_getInstance(), intervention);
|
|
664
665
|
}
|
|
665
|
-
var tmp = getInterventions(this
|
|
666
|
-
var tmp_0 = filter(tmp, CausalitySolver$CausalityCheckCauseICAIL24$solve$lambda(this
|
|
666
|
+
var tmp = getInterventions(this.y4v_1, request, cause, effect);
|
|
667
|
+
var tmp_0 = filter(tmp, CausalitySolver$CausalityCheckCauseICAIL24$solve$lambda(this.y4v_1, request, effect));
|
|
667
668
|
var tmp0_elvis_lhs = firstOrNull(map(tmp_0, CausalitySolver$CausalityCheckCauseICAIL24$solve$lambda_0(intervention)));
|
|
668
669
|
return sequenceOf(request.replyWith(tmp0_elvis_lhs == null ? Companion_getInstance().failed() : tmp0_elvis_lhs, VOID, []));
|
|
669
670
|
};
|
|
670
671
|
protoOf(CausalityCheckCauseICAIL24).solve = function (request) {
|
|
671
|
-
return this.
|
|
672
|
+
return this.l2m(request);
|
|
672
673
|
};
|
|
673
674
|
function CausalityCheckInterventionICAIL25($outer) {
|
|
674
|
-
this
|
|
675
|
-
this.
|
|
675
|
+
this.a4w_1 = $outer;
|
|
676
|
+
this.z4v_1 = new Signature('ness_intervention', 2);
|
|
676
677
|
}
|
|
677
|
-
protoOf(CausalityCheckInterventionICAIL25).
|
|
678
|
-
return this.
|
|
678
|
+
protoOf(CausalityCheckInterventionICAIL25).k1x = function () {
|
|
679
|
+
return this.z4v_1;
|
|
679
680
|
};
|
|
680
|
-
protoOf(CausalityCheckInterventionICAIL25).
|
|
681
|
-
var intervention = request.arguments.
|
|
682
|
-
var effect = this
|
|
683
|
-
return sequenceOf(request.replyWithCondition(checkCausalityICAIL25(this
|
|
681
|
+
protoOf(CausalityCheckInterventionICAIL25).l2m = function (request) {
|
|
682
|
+
var intervention = request.arguments.u(0).castToList();
|
|
683
|
+
var effect = this.a4w_1.u4v(request.arguments.u(1).toString());
|
|
684
|
+
return sequenceOf(request.replyWithCondition(checkCausalityICAIL25(this.a4w_1, request, intervention, effect), VOID, []));
|
|
684
685
|
};
|
|
685
686
|
protoOf(CausalityCheckInterventionICAIL25).solve = function (request) {
|
|
686
|
-
return this.
|
|
687
|
+
return this.l2m(request);
|
|
687
688
|
};
|
|
688
689
|
function CausalityCheckCauseICAIL25($outer) {
|
|
689
|
-
this
|
|
690
|
-
this.
|
|
690
|
+
this.c4w_1 = $outer;
|
|
691
|
+
this.b4w_1 = new Signature('ness', 3);
|
|
691
692
|
}
|
|
692
|
-
protoOf(CausalityCheckCauseICAIL25).
|
|
693
|
-
return this.
|
|
693
|
+
protoOf(CausalityCheckCauseICAIL25).k1x = function () {
|
|
694
|
+
return this.b4w_1;
|
|
694
695
|
};
|
|
695
|
-
protoOf(CausalityCheckCauseICAIL25).
|
|
696
|
-
var intervention = request.arguments.
|
|
697
|
-
var cause = request.arguments.
|
|
698
|
-
var effect = this
|
|
696
|
+
protoOf(CausalityCheckCauseICAIL25).l2m = function (request) {
|
|
697
|
+
var intervention = request.arguments.u(0);
|
|
698
|
+
var cause = request.arguments.u(1);
|
|
699
|
+
var effect = this.c4w_1.u4v(request.arguments.u(2).toString());
|
|
699
700
|
if (!isInterface(intervention, Var)) {
|
|
700
701
|
throw Companion_instance_2.forGoal(request.context, request.signature, Expected_VARIABLE_getInstance(), intervention);
|
|
701
702
|
}
|
|
702
|
-
var tmp = getInterventions(this
|
|
703
|
-
var tmp_0 = filter(tmp, CausalitySolver$CausalityCheckCauseICAIL25$solve$lambda(this
|
|
703
|
+
var tmp = getInterventions(this.c4w_1, request, cause, effect);
|
|
704
|
+
var tmp_0 = filter(tmp, CausalitySolver$CausalityCheckCauseICAIL25$solve$lambda(this.c4w_1, request, effect));
|
|
704
705
|
var tmp0_elvis_lhs = firstOrNull(map(tmp_0, CausalitySolver$CausalityCheckCauseICAIL25$solve$lambda_0(intervention)));
|
|
705
706
|
return sequenceOf(request.replyWith(tmp0_elvis_lhs == null ? Companion_getInstance().failed() : tmp0_elvis_lhs, VOID, []));
|
|
706
707
|
};
|
|
707
708
|
protoOf(CausalityCheckCauseICAIL25).solve = function (request) {
|
|
708
|
-
return this.
|
|
709
|
+
return this.l2m(request);
|
|
709
710
|
};
|
|
710
711
|
function CausalitySolver$solveFresh$lambda(this$0) {
|
|
711
712
|
return function (it) {
|
|
712
|
-
return mineActiveGraph(this$0.
|
|
713
|
+
return mineActiveGraph(this$0.n4v_1);
|
|
713
714
|
};
|
|
714
715
|
}
|
|
715
716
|
function CausalitySolver$getSupports$lambda(this$0, $effect) {
|
|
716
717
|
return function (it) {
|
|
717
|
-
return equalTerms(this$0, it.
|
|
718
|
+
return equalTerms(this$0, it.b4s_1.h4r_1, $effect);
|
|
718
719
|
};
|
|
719
720
|
}
|
|
720
721
|
function CausalitySolver$getSupports$lambda_0(this$0, $graph) {
|
|
721
722
|
return function (it) {
|
|
722
|
-
return supporters(this$0, it.
|
|
723
|
+
return supporters(this$0, it.b4s_1, $graph, emptyList());
|
|
723
724
|
};
|
|
724
725
|
}
|
|
725
726
|
function CausalitySolver$getSupports$lambda_1(it) {
|
|
726
|
-
return it.
|
|
727
|
+
return it.b4s_1;
|
|
727
728
|
}
|
|
728
729
|
function CausalitySolver$checkBaseTheory$lambda(a) {
|
|
729
|
-
return a.
|
|
730
|
+
return a.p4r();
|
|
730
731
|
}
|
|
731
732
|
function CausalitySolver$getSubsets$lambda$lambda(it) {
|
|
732
|
-
return it.
|
|
733
|
+
return it.e1z();
|
|
733
734
|
}
|
|
734
735
|
function CausalitySolver$getSubsets$lambda$lambda_0($this_arg2pScope) {
|
|
735
736
|
return function (it) {
|
|
736
|
-
return ensureNotNull(it.
|
|
737
|
+
return ensureNotNull(it.u1x().l2($this_arg2pScope.p1j())).castToList();
|
|
737
738
|
};
|
|
738
739
|
}
|
|
739
740
|
function CausalitySolver$getSubsets$lambda($request, $intervention) {
|
|
740
741
|
return function ($this$arg2pScope) {
|
|
741
|
-
var tmp = $request.solve($this$arg2pScope.stringInvoke('proper_subsets', $intervention, [$this$arg2pScope.
|
|
742
|
+
var tmp = $request.solve($this$arg2pScope.stringInvoke('proper_subsets', $intervention, [$this$arg2pScope.p1j()]));
|
|
742
743
|
var tmp_0 = filter(tmp, CausalitySolver$getSubsets$lambda$lambda);
|
|
743
744
|
return toList(map(tmp_0, CausalitySolver$getSubsets$lambda$lambda_0($this$arg2pScope)));
|
|
744
745
|
};
|
|
745
746
|
}
|
|
746
747
|
function CausalitySolver$getInterventions$lambda$lambda(it) {
|
|
747
|
-
return it.
|
|
748
|
+
return it.e1z();
|
|
748
749
|
}
|
|
749
750
|
function CausalitySolver$getInterventions$lambda$lambda_0($this_arg2pScope) {
|
|
750
751
|
return function (it) {
|
|
751
|
-
return ensureNotNull(it.
|
|
752
|
+
return ensureNotNull(it.u1x().l2($this_arg2pScope.p1j())).castToList();
|
|
752
753
|
};
|
|
753
754
|
}
|
|
754
755
|
function CausalitySolver$getInterventions$lambda($request, $rules, $cause) {
|
|
755
756
|
return function ($this$arg2pScope) {
|
|
756
|
-
var tmp = $request.solve($this$arg2pScope.stringInvoke('generate_interventions', $rules, [$cause, $this$arg2pScope.
|
|
757
|
+
var tmp = $request.solve($this$arg2pScope.stringInvoke('generate_interventions', $rules, [$cause, $this$arg2pScope.p1j()]));
|
|
757
758
|
var tmp_0 = filter(tmp, CausalitySolver$getInterventions$lambda$lambda);
|
|
758
759
|
return map(tmp_0, CausalitySolver$getInterventions$lambda$lambda_0($this$arg2pScope));
|
|
759
760
|
};
|
|
@@ -762,21 +763,21 @@
|
|
|
762
763
|
var tmp = this;
|
|
763
764
|
var tmp_0 = Arg2pSolverFactory_instance;
|
|
764
765
|
var tmp0_graphExtensions = emptyList();
|
|
765
|
-
tmp.
|
|
766
|
-
this.
|
|
766
|
+
tmp.n4v_1 = tmp_0.p4d(VOID, (new FlagsBuilder(VOID, VOID, VOID, VOID, VOID, 'grounded', VOID, VOID, VOID, VOID, tmp0_graphExtensions)).b4e());
|
|
767
|
+
this.o4v_1 = Companion_instance_3.l4d().i4d();
|
|
767
768
|
var tmp_1 = this;
|
|
768
769
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
769
|
-
tmp_1.
|
|
770
|
-
this.
|
|
771
|
-
this.
|
|
770
|
+
tmp_1.p4v_1 = LinkedHashMap_init_$Create$();
|
|
771
|
+
this.q4v_1 = 'prolog.argumentation.causality.solver';
|
|
772
|
+
this.r4v_1 = Companion_instance_4.i4d().plusOperatorSet(Companion_instance_5.i4d()).plusOperatorSet(Companion_getInstance_3().DEFAULT);
|
|
772
773
|
}
|
|
773
|
-
protoOf(CausalitySolver).
|
|
774
|
+
protoOf(CausalitySolver).u4v = function (string) {
|
|
774
775
|
return replace(replace(string, ' ', ''), "'", '');
|
|
775
776
|
};
|
|
776
|
-
protoOf(CausalitySolver).
|
|
777
|
-
return this.
|
|
777
|
+
protoOf(CausalitySolver).w2i = function () {
|
|
778
|
+
return this.q4v_1;
|
|
778
779
|
};
|
|
779
|
-
protoOf(CausalitySolver).
|
|
780
|
+
protoOf(CausalitySolver).d4e = function () {
|
|
780
781
|
// Inline function 'kotlin.let' call
|
|
781
782
|
var primitives = listOf([new CausalityCheckInterventionICAIL24(this), new CausalityCheckCauseICAIL24(this), new CausalityCheckInterventionICAIL25(this), new CausalityCheckCauseICAIL25(this), new CausalityCheckCauseButFor(this)]);
|
|
782
783
|
var tmp = Companion_getInstance_4();
|
|
@@ -784,22 +785,27 @@
|
|
|
784
785
|
var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(primitives, 10)), 16);
|
|
785
786
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
786
787
|
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.
|
|
788
|
+
var _iterator__ex2g4s = primitives.n();
|
|
789
|
+
while (_iterator__ex2g4s.q()) {
|
|
790
|
+
var element = _iterator__ex2g4s.r();
|
|
791
|
+
var tmp$ret$4 = element.k1x();
|
|
792
|
+
destination.t4(tmp$ret$4, element);
|
|
792
793
|
}
|
|
793
|
-
return tmp.of(this.
|
|
794
|
+
return tmp.of(this.q4v_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.r4v_1));
|
|
794
795
|
};
|
|
795
|
-
protoOf(CausalitySolver).
|
|
796
|
+
protoOf(CausalitySolver).e4e = function () {
|
|
796
797
|
return 'causality';
|
|
797
798
|
};
|
|
798
|
-
protoOf(CausalitySolver).
|
|
799
|
-
return this.
|
|
799
|
+
protoOf(CausalitySolver).n4d = function () {
|
|
800
|
+
return this.r4v_1;
|
|
800
801
|
};
|
|
801
802
|
//region block: post-declaration
|
|
802
|
-
protoOf(
|
|
803
|
+
protoOf(CausalityCheckCauseButFor).n1x = get_help;
|
|
804
|
+
protoOf(CausalityCheckInterventionICAIL24).n1x = get_help;
|
|
805
|
+
protoOf(CausalityCheckCauseICAIL24).n1x = get_help;
|
|
806
|
+
protoOf(CausalityCheckInterventionICAIL25).n1x = get_help;
|
|
807
|
+
protoOf(CausalityCheckCauseICAIL25).n1x = get_help;
|
|
808
|
+
protoOf(CausalitySolver).m4d = content;
|
|
803
809
|
//endregion
|
|
804
810
|
//region block: exports
|
|
805
811
|
_.$_$ = _.$_$ || {};
|