@tuprolog/arg2p 0.16.7 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/2p-core.js +2734 -2734
  2. package/2p-core.js.map +1 -1
  3. package/2p-dsl-core.js +461 -461
  4. package/2p-dsl-core.js.map +1 -1
  5. package/2p-dsl-solve.js +245 -245
  6. package/2p-dsl-solve.js.map +1 -1
  7. package/2p-dsl-theory.js +155 -155
  8. package/2p-dsl-theory.js.map +1 -1
  9. package/2p-dsl-unify.js +15 -15
  10. package/2p-dsl-unify.js.map +1 -1
  11. package/2p-io-lib.js +910 -910
  12. package/2p-io-lib.js.map +1 -1
  13. package/2p-parser-core.js +127 -127
  14. package/2p-parser-core.js.map +1 -1
  15. package/2p-parser-impl.js +1572 -1572
  16. package/2p-parser-impl.js.map +1 -1
  17. package/2p-parser-theory.js +91 -91
  18. package/2p-parser-theory.js.map +1 -1
  19. package/2p-solve-prolog.js +972 -972
  20. package/2p-solve-prolog.js.map +1 -1
  21. package/2p-solve.js +4409 -4409
  22. package/2p-solve.js.map +1 -1
  23. package/2p-theory.js +1693 -1693
  24. package/2p-theory.js.map +1 -1
  25. package/2p-unify.js +363 -363
  26. package/2p-unify.js.map +1 -1
  27. package/2p-utils.js +448 -448
  28. package/2p-utils.js.map +1 -1
  29. package/arg2p-causality-solver.js +267 -267
  30. package/arg2p-causality-solver.js.map +1 -1
  31. package/arg2p-core.js +3177 -2107
  32. package/arg2p-core.js.map +1 -1
  33. package/arg2p.js +218 -184
  34. package/arg2p.js.map +1 -1
  35. package/kotlin-kotlin-stdlib.js +2682 -2647
  36. package/kotlin-kotlin-stdlib.js.map +1 -1
  37. package/kt-math.js +1544 -1544
  38. package/kt-math.js.map +1 -1
  39. package/okio-parent-okio-nodefilesystem.js +51 -51
  40. package/okio-parent-okio-nodefilesystem.js.map +1 -1
  41. package/okio-parent-okio.js +693 -693
  42. package/okio-parent-okio.js.map +1 -1
  43. package/package.json +1 -1
package/arg2p.js CHANGED
@@ -1,12 +1,18 @@
1
1
  (function (factory) {
2
2
  if (typeof define === 'function' && define.amd)
3
- define(['exports', './kotlin-kotlin-stdlib.js', './arg2p-core.js', './2p-theory.js', './2p-parser-theory.js', './2p-solve.js', './2p-solve-prolog.js', './arg2p-causality-solver.js', './2p-core.js', './2p-parser-core.js', './kt-math.js'], factory);
3
+ define(['exports', './kotlin-kotlin-stdlib.js', './2p-core.js', './2p-parser-core.js', './arg2p-core.js', './2p-theory.js', './2p-parser-theory.js', './2p-solve.js', './2p-solve-prolog.js', './arg2p-causality-solver.js', './kt-math.js'], factory);
4
4
  else if (typeof exports === 'object')
5
- factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./arg2p-core.js'), require('./2p-theory.js'), require('./2p-parser-theory.js'), require('./2p-solve.js'), require('./2p-solve-prolog.js'), require('./arg2p-causality-solver.js'), require('./2p-core.js'), require('./2p-parser-core.js'), require('./kt-math.js'));
5
+ factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./2p-core.js'), require('./2p-parser-core.js'), require('./arg2p-core.js'), require('./2p-theory.js'), require('./2p-parser-theory.js'), require('./2p-solve.js'), require('./2p-solve-prolog.js'), require('./arg2p-causality-solver.js'), require('./kt-math.js'));
6
6
  else {
7
7
  if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
8
8
  throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
9
9
  }
10
+ if (typeof globalThis['2p-core'] === 'undefined') {
11
+ throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency '2p-core' was not found. Please, check whether '2p-core' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
12
+ }
13
+ if (typeof globalThis['2p-parser-core'] === 'undefined') {
14
+ throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency '2p-parser-core' was not found. Please, check whether '2p-parser-core' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
15
+ }
10
16
  if (typeof globalThis['arg2p-core'] === 'undefined') {
11
17
  throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency 'arg2p-core' was not found. Please, check whether 'arg2p-core' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
12
18
  }
@@ -25,61 +31,60 @@
25
31
  if (typeof globalThis['arg2p-causality-solver'] === 'undefined') {
26
32
  throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency 'arg2p-causality-solver' was not found. Please, check whether 'arg2p-causality-solver' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
27
33
  }
28
- if (typeof globalThis['2p-core'] === 'undefined') {
29
- throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency '2p-core' was not found. Please, check whether '2p-core' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
30
- }
31
- if (typeof globalThis['2p-parser-core'] === 'undefined') {
32
- throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency '2p-parser-core' was not found. Please, check whether '2p-parser-core' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
33
- }
34
34
  if (typeof globalThis['kt-math'] === 'undefined') {
35
35
  throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency 'kt-math' was not found. Please, check whether 'kt-math' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
36
36
  }
37
- globalThis['it.unibo.tuprolog.argumentation:arg2p'] = factory(typeof globalThis['it.unibo.tuprolog.argumentation:arg2p'] === 'undefined' ? {} : globalThis['it.unibo.tuprolog.argumentation:arg2p'], globalThis['kotlin-kotlin-stdlib'], globalThis['arg2p-core'], globalThis['2p-theory'], globalThis['2p-parser-theory'], globalThis['2p-solve'], globalThis['2p-solve-prolog'], globalThis['arg2p-causality-solver'], globalThis['2p-core'], globalThis['2p-parser-core'], globalThis['kt-math']);
37
+ globalThis['it.unibo.tuprolog.argumentation:arg2p'] = factory(typeof globalThis['it.unibo.tuprolog.argumentation:arg2p'] === 'undefined' ? {} : globalThis['it.unibo.tuprolog.argumentation:arg2p'], globalThis['kotlin-kotlin-stdlib'], globalThis['2p-core'], globalThis['2p-parser-core'], globalThis['arg2p-core'], globalThis['2p-theory'], globalThis['2p-parser-theory'], globalThis['2p-solve'], globalThis['2p-solve-prolog'], globalThis['arg2p-causality-solver'], globalThis['kt-math']);
38
38
  }
39
- }(function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_argumentation_core, kotlin_it_unibo_tuprolog_theory, kotlin_it_unibo_tuprolog_parser_theory, kotlin_it_unibo_tuprolog_solve, kotlin_it_unibo_tuprolog_solve_prolog, kotlin_it_unibo_tuprolog_argumentation_causality_solver, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_parser_core, kotlin_io_github_gciatto_kt_math) {
39
+ }(function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_parser_core, kotlin_it_unibo_tuprolog_argumentation_core, kotlin_it_unibo_tuprolog_theory, kotlin_it_unibo_tuprolog_parser_theory, kotlin_it_unibo_tuprolog_solve, kotlin_it_unibo_tuprolog_solve_prolog, kotlin_it_unibo_tuprolog_argumentation_causality_solver, kotlin_io_github_gciatto_kt_math) {
40
40
  'use strict';
41
41
  //region block: imports
42
42
  var imul = Math.imul;
43
- var protoOf = kotlin_kotlin.$_$.s7;
43
+ var protoOf = kotlin_kotlin.$_$.v7;
44
44
  var VOID = kotlin_kotlin.$_$.b;
45
- var getStringHashCode = kotlin_kotlin.$_$.d7;
46
- var initMetadataForClass = kotlin_kotlin.$_$.f7;
47
- var toString = kotlin_kotlin.$_$.tc;
48
- var hashCode = kotlin_kotlin.$_$.e7;
49
- var equals = kotlin_kotlin.$_$.y6;
50
- var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.q1;
51
- var toString_0 = kotlin_kotlin.$_$.v7;
52
- var getKClassFromExpression = kotlin_kotlin.$_$.k8;
53
- var THROW_CCE = kotlin_kotlin.$_$.gc;
45
+ var getStringHashCode = kotlin_kotlin.$_$.g7;
46
+ var initMetadataForClass = kotlin_kotlin.$_$.i7;
47
+ var toString = kotlin_kotlin.$_$.xc;
48
+ var hashCode = kotlin_kotlin.$_$.h7;
49
+ var equals = kotlin_kotlin.$_$.b7;
50
+ var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.s1;
51
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.t;
54
52
  var Unit_instance = kotlin_kotlin.$_$.q;
55
- var contentEquals = kotlin_kotlin.$_$.s2;
56
- var contentHashCode = kotlin_kotlin.$_$.u2;
57
- var arg2pScope = kotlin_it_unibo_tuprolog_argumentation_core.$_$.e;
58
- var mineGraph = kotlin_it_unibo_tuprolog_argumentation_core.$_$.j;
59
- var collectionSizeOrDefault = kotlin_kotlin.$_$.q2;
60
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.s;
61
- var copyToArray = kotlin_kotlin.$_$.a3;
53
+ var copyToArray = kotlin_kotlin.$_$.c3;
54
+ var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.u;
55
+ var parseStructWithOperators = kotlin_it_unibo_tuprolog_parser_core.$_$.f;
56
+ var distinct = kotlin_kotlin.$_$.y8;
57
+ var toList = kotlin_kotlin.$_$.fa;
58
+ var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.o;
59
+ var filter = kotlin_kotlin.$_$.d9;
60
+ var map = kotlin_kotlin.$_$.q9;
61
+ var getKClassFromExpression = kotlin_kotlin.$_$.n8;
62
+ var THROW_CCE = kotlin_kotlin.$_$.kc;
63
+ var contentEquals = kotlin_kotlin.$_$.u2;
64
+ var contentHashCode = kotlin_kotlin.$_$.w2;
65
+ var toString_0 = kotlin_kotlin.$_$.y7;
66
+ var arg2pScope = kotlin_it_unibo_tuprolog_argumentation_core.$_$.f;
62
67
  var Companion_instance = kotlin_it_unibo_tuprolog_theory.$_$.b;
63
68
  var parseTheory = kotlin_it_unibo_tuprolog_parser_theory.$_$.b;
64
- var Companion_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.i1;
69
+ var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_solve.$_$.i1;
65
70
  var PrologSolverFactory_instance = kotlin_it_unibo_tuprolog_solve_prolog.$_$.a;
66
- var Companion_instance_0 = kotlin_it_unibo_tuprolog_argumentation_core.$_$.c;
71
+ var Arg2pUnificator_getInstance = kotlin_it_unibo_tuprolog_argumentation_core.$_$.a;
72
+ var Companion_instance_0 = kotlin_it_unibo_tuprolog_argumentation_core.$_$.d;
67
73
  var CausalitySolver = kotlin_it_unibo_tuprolog_argumentation_causality_solver.$_$.a;
68
- var listOf = kotlin_kotlin.$_$.w3;
74
+ var listOf = kotlin_kotlin.$_$.y3;
69
75
  var Unknown_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.h1;
70
76
  var TrackVariables_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.g1;
71
77
  var Companion_instance_1 = kotlin_it_unibo_tuprolog_solve.$_$.r;
72
- var toInt = kotlin_kotlin.$_$.nb;
73
- var filter = kotlin_kotlin.$_$.a9;
74
- var map = kotlin_kotlin.$_$.m9;
75
- var first = kotlin_kotlin.$_$.c9;
76
- var ensureNotNull = kotlin_kotlin.$_$.mc;
77
- var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.u;
78
- var parseStructWithOperators = kotlin_it_unibo_tuprolog_parser_core.$_$.f;
78
+ var toInt = kotlin_kotlin.$_$.rb;
79
+ var first = kotlin_kotlin.$_$.f9;
80
+ var ensureNotNull = kotlin_kotlin.$_$.qc;
81
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.s;
82
+ var mineGraph = kotlin_it_unibo_tuprolog_argumentation_core.$_$.k;
83
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.s2;
79
84
  var parseTheoryWithOperators = kotlin_it_unibo_tuprolog_parser_theory.$_$.c;
80
85
  var Companion_instance_2 = kotlin_it_unibo_tuprolog_core.$_$.y;
81
- var initMetadataForObject = kotlin_kotlin.$_$.j7;
82
- var defineProp = kotlin_kotlin.$_$.x6;
86
+ var initMetadataForObject = kotlin_kotlin.$_$.m7;
87
+ var defineProp = kotlin_kotlin.$_$.a7;
83
88
  //endregion
84
89
  //region block: pre-declaration
85
90
  initMetadataForClass(BridgedArgument, 'BridgedArgument');
@@ -96,32 +101,32 @@
96
101
  this.descriptor = descriptor;
97
102
  this.label = label;
98
103
  }
99
- protoOf(BridgedArgument).get_id_kntnx8_k$ = function () {
104
+ protoOf(BridgedArgument).x15 = function () {
100
105
  return this.id;
101
106
  };
102
- protoOf(BridgedArgument).get_descriptor_wjt6a0_k$ = function () {
107
+ protoOf(BridgedArgument).w4r = function () {
103
108
  return this.descriptor;
104
109
  };
105
- protoOf(BridgedArgument).get_label_iuj8p7_k$ = function () {
110
+ protoOf(BridgedArgument).d4w = function () {
106
111
  return this.label;
107
112
  };
108
- protoOf(BridgedArgument).component1_7eebsc_k$ = function () {
113
+ protoOf(BridgedArgument).zd = function () {
109
114
  return this.id;
110
115
  };
111
- protoOf(BridgedArgument).component2_7eebsb_k$ = function () {
116
+ protoOf(BridgedArgument).ae = function () {
112
117
  return this.descriptor;
113
118
  };
114
- protoOf(BridgedArgument).component3_7eebsa_k$ = function () {
119
+ protoOf(BridgedArgument).e4w = function () {
115
120
  return this.label;
116
121
  };
117
- protoOf(BridgedArgument).copy_nc7k0r_k$ = function (id, descriptor, label) {
122
+ protoOf(BridgedArgument).f4w = function (id, descriptor, label) {
118
123
  return new BridgedArgument(id, descriptor, label);
119
124
  };
120
125
  protoOf(BridgedArgument).copy = function (id, descriptor, label, $super) {
121
126
  id = id === VOID ? this.id : id;
122
127
  descriptor = descriptor === VOID ? this.descriptor : descriptor;
123
128
  label = label === VOID ? this.label : label;
124
- return $super === VOID ? this.copy_nc7k0r_k$(id, descriptor, label) : $super.copy_nc7k0r_k$.call(this, id, descriptor, label);
129
+ return $super === VOID ? this.f4w(id, descriptor, label) : $super.f4w.call(this, id, descriptor, label);
125
130
  };
126
131
  protoOf(BridgedArgument).toString = function () {
127
132
  return 'BridgedArgument(id=' + this.id + ', descriptor=' + this.descriptor + ', label=' + this.label + ')';
@@ -149,25 +154,25 @@
149
154
  this.from = from;
150
155
  this.to = to;
151
156
  }
152
- protoOf(BridgedAttack).get_from_wom7eb_k$ = function () {
157
+ protoOf(BridgedAttack).g4w = function () {
153
158
  return this.from;
154
159
  };
155
- protoOf(BridgedAttack).get_to_kntnng_k$ = function () {
160
+ protoOf(BridgedAttack).h4w = function () {
156
161
  return this.to;
157
162
  };
158
- protoOf(BridgedAttack).component1_7eebsc_k$ = function () {
163
+ protoOf(BridgedAttack).zd = function () {
159
164
  return this.from;
160
165
  };
161
- protoOf(BridgedAttack).component2_7eebsb_k$ = function () {
166
+ protoOf(BridgedAttack).ae = function () {
162
167
  return this.to;
163
168
  };
164
- protoOf(BridgedAttack).copy_plwnsl_k$ = function (from, to) {
169
+ protoOf(BridgedAttack).i4w = function (from, to) {
165
170
  return new BridgedAttack(from, to);
166
171
  };
167
172
  protoOf(BridgedAttack).copy = function (from, to, $super) {
168
173
  from = from === VOID ? this.from : from;
169
174
  to = to === VOID ? this.to : to;
170
- return $super === VOID ? this.copy_plwnsl_k$(from, to) : $super.copy_plwnsl_k$.call(this, from, to);
175
+ return $super === VOID ? this.i4w(from, to) : $super.i4w.call(this, from, to);
171
176
  };
172
177
  protoOf(BridgedAttack).toString = function () {
173
178
  return 'BridgedAttack(from=' + this.from + ', to=' + this.to + ')';
@@ -192,25 +197,25 @@
192
197
  this.first = first;
193
198
  this.second = second;
194
199
  }
195
- protoOf(JsPair).get_first_irdx8n_k$ = function () {
200
+ protoOf(JsPair).mj = function () {
196
201
  return this.first;
197
202
  };
198
- protoOf(JsPair).get_second_jf7fjx_k$ = function () {
203
+ protoOf(JsPair).nj = function () {
199
204
  return this.second;
200
205
  };
201
- protoOf(JsPair).component1_7eebsc_k$ = function () {
206
+ protoOf(JsPair).zd = function () {
202
207
  return this.first;
203
208
  };
204
- protoOf(JsPair).component2_7eebsb_k$ = function () {
209
+ protoOf(JsPair).ae = function () {
205
210
  return this.second;
206
211
  };
207
- protoOf(JsPair).copy_uni6vi_k$ = function (first, second) {
212
+ protoOf(JsPair).oj = function (first, second) {
208
213
  return new JsPair(first, second);
209
214
  };
210
215
  protoOf(JsPair).copy = function (first, second, $super) {
211
216
  first = first === VOID ? this.first : first;
212
217
  second = second === VOID ? this.second : second;
213
- return $super === VOID ? this.copy_uni6vi_k$(first, second) : $super.copy_uni6vi_k$.call(this, first, second);
218
+ return $super === VOID ? this.oj(first, second) : $super.oj.call(this, first, second);
214
219
  };
215
220
  protoOf(JsPair).toString = function () {
216
221
  return 'JsPair(first=' + toString(this.first) + ', second=' + toString(this.second) + ')';
@@ -232,68 +237,82 @@
232
237
  return true;
233
238
  };
234
239
  function JsIterator(nextFunction, hasNextFunction) {
235
- this.nextFunction_1 = nextFunction;
236
- this.hasNextFunction_1 = hasNextFunction;
240
+ this.j4w_1 = nextFunction;
241
+ this.k4w_1 = hasNextFunction;
237
242
  }
238
243
  protoOf(JsIterator).hasNext = function () {
239
- return this.hasNextFunction_1();
244
+ return this.k4w_1();
240
245
  };
241
246
  protoOf(JsIterator).next = function () {
242
247
  if (!this.hasNext())
243
248
  throw NoSuchElementException_init_$Create$('No more elements');
244
- return this.nextFunction_1();
249
+ return this.j4w_1();
245
250
  };
246
- function BridgedResult(i, query) {
251
+ function BridgedResult$queryContext$lambda(it) {
252
+ return it.e1z();
253
+ }
254
+ function BridgedResult$queryContext$lambda_0($variables, this$0) {
255
+ return function (sol) {
256
+ // Inline function 'kotlin.collections.mapNotNull' call
257
+ var tmp0 = $variables;
258
+ // Inline function 'kotlin.collections.mapNotNullTo' call
259
+ var destination = ArrayList_init_$Create$();
260
+ // Inline function 'kotlin.collections.forEach' call
261
+ var _iterator__ex2g4s = tmp0.n();
262
+ while (_iterator__ex2g4s.q()) {
263
+ var element = _iterator__ex2g4s.r();
264
+ var tmp0_safe_receiver = sol.u1x().l2(element);
265
+ var tmp;
266
+ if (tmp0_safe_receiver == null) {
267
+ tmp = null;
268
+ } else {
269
+ // Inline function 'kotlin.let' call
270
+ tmp = new JsPair(element.q2(), this$0.m4w_1.j15(tmp0_safe_receiver));
271
+ }
272
+ var tmp0_safe_receiver_0 = tmp;
273
+ if (tmp0_safe_receiver_0 == null)
274
+ null;
275
+ else {
276
+ // Inline function 'kotlin.let' call
277
+ destination.l(tmp0_safe_receiver_0);
278
+ }
279
+ }
280
+ // Inline function 'kotlin.collections.toTypedArray' call
281
+ return copyToArray(destination);
282
+ };
283
+ }
284
+ function BridgedResult(i, query, solver, formatter) {
247
285
  this.i = i;
248
286
  this.query = query;
287
+ this.l4w_1 = solver;
288
+ this.m4w_1 = formatter;
249
289
  }
250
- protoOf(BridgedResult).get_i_1mhr5s_k$ = function () {
251
- return this.i;
252
- };
253
- protoOf(BridgedResult).get_query_ixn1y7_k$ = function () {
254
- return this.query;
255
- };
256
- protoOf(BridgedResult).component1_7eebsc_k$ = function () {
290
+ protoOf(BridgedResult).n4w = function () {
257
291
  return this.i;
258
292
  };
259
- protoOf(BridgedResult).component2_7eebsb_k$ = function () {
293
+ protoOf(BridgedResult).n1z = function () {
260
294
  return this.query;
261
295
  };
262
- protoOf(BridgedResult).copy_vzw9ke_k$ = function (i, query) {
263
- return new BridgedResult(i, query);
264
- };
265
- protoOf(BridgedResult).copy = function (i, query, $super) {
266
- i = i === VOID ? this.i : i;
267
- query = query === VOID ? this.query : query;
268
- return $super === VOID ? this.copy_vzw9ke_k$(i, query) : $super.copy_vzw9ke_k$.call(this, i, query);
269
- };
270
- protoOf(BridgedResult).toString = function () {
271
- return 'BridgedResult(i=' + toString_0(this.i) + ', query=' + this.query + ')';
296
+ protoOf(BridgedResult).graphAt = function (context) {
297
+ return JsBridge_instance.o4w(this.l4w_1, context);
272
298
  };
273
- protoOf(BridgedResult).hashCode = function () {
274
- var result = hashCode(this.i);
275
- result = imul(result, 31) + getStringHashCode(this.query) | 0;
276
- return result;
277
- };
278
- protoOf(BridgedResult).equals = function (other) {
279
- if (this === other)
280
- return true;
281
- if (!(other instanceof BridgedResult))
282
- return false;
283
- if (!equals(this.i, other.i))
284
- return false;
285
- if (!(this.query === other.query))
286
- return false;
287
- return true;
299
+ protoOf(BridgedResult).queryContext = function (context, goal) {
300
+ var term = parseStructWithOperators(Companion_getInstance(), goal, this.l4w_1.h1y());
301
+ var variables = toList(distinct(term.zw()));
302
+ var tmp = this.l4w_1.solve(Companion_getInstance().of('context_check', [Companion_getInstance_0().ofInt(context), term]));
303
+ var tmp_0 = filter(tmp, BridgedResult$queryContext$lambda);
304
+ // Inline function 'kotlin.collections.toTypedArray' call
305
+ var this_0 = toList(map(tmp_0, BridgedResult$queryContext$lambda_0(variables, this)));
306
+ return copyToArray(this_0);
288
307
  };
289
308
  function BridgedGraph(arguments_0, attacks) {
290
309
  this.arguments = arguments_0;
291
310
  this.attacks = attacks;
292
311
  }
293
- protoOf(BridgedGraph).get_arguments_p5ddub_k$ = function () {
312
+ protoOf(BridgedGraph).k2f = function () {
294
313
  return this.arguments;
295
314
  };
296
- protoOf(BridgedGraph).get_attacks_9wjbge_k$ = function () {
315
+ protoOf(BridgedGraph).p4w = function () {
297
316
  return this.attacks;
298
317
  };
299
318
  protoOf(BridgedGraph).equals = function (other) {
@@ -314,45 +333,50 @@
314
333
  result = imul(31, result) + contentHashCode(this.attacks) | 0;
315
334
  return result;
316
335
  };
317
- protoOf(BridgedGraph).component1_7eebsc_k$ = function () {
336
+ protoOf(BridgedGraph).zd = function () {
318
337
  return this.arguments;
319
338
  };
320
- protoOf(BridgedGraph).component2_7eebsb_k$ = function () {
339
+ protoOf(BridgedGraph).ae = function () {
321
340
  return this.attacks;
322
341
  };
323
- protoOf(BridgedGraph).copy_xu8on4_k$ = function (arguments_0, attacks) {
342
+ protoOf(BridgedGraph).q4w = function (arguments_0, attacks) {
324
343
  return new BridgedGraph(arguments_0, attacks);
325
344
  };
326
345
  protoOf(BridgedGraph).copy = function (arguments_0, attacks, $super) {
327
346
  arguments_0 = arguments_0 === VOID ? this.arguments : arguments_0;
328
347
  attacks = attacks === VOID ? this.attacks : attacks;
329
- return $super === VOID ? this.copy_xu8on4_k$(arguments_0, attacks) : $super.copy_xu8on4_k$.call(this, arguments_0, attacks);
348
+ return $super === VOID ? this.q4w(arguments_0, attacks) : $super.q4w.call(this, arguments_0, attacks);
330
349
  };
331
350
  protoOf(BridgedGraph).toString = function () {
332
351
  return 'BridgedGraph(arguments=' + toString_0(this.arguments) + ', attacks=' + toString_0(this.attacks) + ')';
333
352
  };
334
- function BridgedSolution(res, query, substitutions, exception, graph) {
353
+ function BridgedSolution(res, query, substitutions, exception, graph, context) {
354
+ context = context === VOID ? 0 : context;
335
355
  this.res = res;
336
356
  this.query = query;
337
357
  this.substitutions = substitutions;
338
358
  this.exception = exception;
339
359
  this.graph = graph;
360
+ this.context = context;
340
361
  }
341
- protoOf(BridgedSolution).get_res_18ix1l_k$ = function () {
362
+ protoOf(BridgedSolution).r4w = function () {
342
363
  return this.res;
343
364
  };
344
- protoOf(BridgedSolution).get_query_ixn1y7_k$ = function () {
365
+ protoOf(BridgedSolution).n1z = function () {
345
366
  return this.query;
346
367
  };
347
- protoOf(BridgedSolution).get_substitutions_3ujp5f_k$ = function () {
368
+ protoOf(BridgedSolution).s4w = function () {
348
369
  return this.substitutions;
349
370
  };
350
- protoOf(BridgedSolution).get_exception_x0n6w6_k$ = function () {
371
+ protoOf(BridgedSolution).q1z = function () {
351
372
  return this.exception;
352
373
  };
353
- protoOf(BridgedSolution).get_graph_is3411_k$ = function () {
374
+ protoOf(BridgedSolution).t4w = function () {
354
375
  return this.graph;
355
376
  };
377
+ protoOf(BridgedSolution).r8 = function () {
378
+ return this.context;
379
+ };
356
380
  protoOf(BridgedSolution).equals = function (other) {
357
381
  if (this === other)
358
382
  return true;
@@ -377,89 +401,69 @@
377
401
  result = imul(31, result) + getStringHashCode(this.exception) | 0;
378
402
  return result;
379
403
  };
380
- protoOf(BridgedSolution).component1_7eebsc_k$ = function () {
404
+ protoOf(BridgedSolution).zd = function () {
381
405
  return this.res;
382
406
  };
383
- protoOf(BridgedSolution).component2_7eebsb_k$ = function () {
407
+ protoOf(BridgedSolution).ae = function () {
384
408
  return this.query;
385
409
  };
386
- protoOf(BridgedSolution).component3_7eebsa_k$ = function () {
410
+ protoOf(BridgedSolution).e4w = function () {
387
411
  return this.substitutions;
388
412
  };
389
- protoOf(BridgedSolution).component4_7eebs9_k$ = function () {
413
+ protoOf(BridgedSolution).u4w = function () {
390
414
  return this.exception;
391
415
  };
392
- protoOf(BridgedSolution).component5_7eebs8_k$ = function () {
416
+ protoOf(BridgedSolution).v4w = function () {
393
417
  return this.graph;
394
418
  };
395
- protoOf(BridgedSolution).copy_rpgtx_k$ = function (res, query, substitutions, exception, graph) {
396
- return new BridgedSolution(res, query, substitutions, exception, graph);
419
+ protoOf(BridgedSolution).w4w = function () {
420
+ return this.context;
421
+ };
422
+ protoOf(BridgedSolution).x4w = function (res, query, substitutions, exception, graph, context) {
423
+ return new BridgedSolution(res, query, substitutions, exception, graph, context);
397
424
  };
398
- protoOf(BridgedSolution).copy = function (res, query, substitutions, exception, graph, $super) {
425
+ protoOf(BridgedSolution).copy = function (res, query, substitutions, exception, graph, context, $super) {
399
426
  res = res === VOID ? this.res : res;
400
427
  query = query === VOID ? this.query : query;
401
428
  substitutions = substitutions === VOID ? this.substitutions : substitutions;
402
429
  exception = exception === VOID ? this.exception : exception;
403
430
  graph = graph === VOID ? this.graph : graph;
404
- return $super === VOID ? this.copy_rpgtx_k$(res, query, substitutions, exception, graph) : $super.copy_rpgtx_k$.call(this, res, query, substitutions, exception, graph);
431
+ context = context === VOID ? this.context : context;
432
+ return $super === VOID ? this.x4w(res, query, substitutions, exception, graph, context) : $super.x4w.call(this, res, query, substitutions, exception, graph, context);
405
433
  };
406
434
  protoOf(BridgedSolution).toString = function () {
407
- return 'BridgedSolution(res=' + this.res + ', query=' + this.query + ', substitutions=' + toString_0(this.substitutions) + ', exception=' + this.exception + ', graph=' + this.graph.toString() + ')';
435
+ return 'BridgedSolution(res=' + this.res + ', query=' + this.query + ', substitutions=' + toString_0(this.substitutions) + ', exception=' + this.exception + ', graph=' + this.graph.toString() + ', context=' + this.context + ')';
408
436
  };
409
- function graphOf($this, solver) {
410
- var graph = mineGraph(solver, arg2pScope(JsBridge$graphOf$lambda(solver)));
411
- // Inline function 'kotlin.collections.map' call
412
- var this_0 = graph.labellings_1;
413
- // Inline function 'kotlin.collections.mapTo' call
414
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
415
- var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
416
- while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
417
- var item = _iterator__ex2g4s.next_20eer_k$();
418
- var tmp$ret$2 = new BridgedArgument(item.argument_1.identifier_1, item.argument_1.get_descriptor_wjt6a0_k$(), item.label_1);
419
- destination.add_utx5q5_k$(tmp$ret$2);
420
- }
421
- // Inline function 'kotlin.collections.toTypedArray' call
422
- var tmp = copyToArray(destination);
423
- // Inline function 'kotlin.collections.map' call
424
- var this_1 = graph.attacks_1;
425
- // Inline function 'kotlin.collections.mapTo' call
426
- var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
427
- var _iterator__ex2g4s_0 = this_1.iterator_jk1svi_k$();
428
- while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
429
- var item_0 = _iterator__ex2g4s_0.next_20eer_k$();
430
- var tmp$ret$6 = new BridgedAttack(item_0.attacker_1.identifier_1, item_0.target_1.identifier_1);
431
- destination_0.add_utx5q5_k$(tmp$ret$6);
432
- }
433
- // Inline function 'kotlin.collections.toTypedArray' call
434
- var tmp$ret$7 = copyToArray(destination_0);
435
- return new BridgedGraph(tmp, tmp$ret$7);
437
+ function activeContext($this, solver) {
438
+ return arg2pScope(JsBridge$activeContext$lambda(solver));
436
439
  }
437
440
  function solverOf($this, outputConsumer, flagsText) {
438
441
  var flags = parseTheory(Companion_instance, flagsText);
439
- var libFlags = Companion_getInstance().of('argumentation.flags', VOID, flags);
442
+ var libFlags = Companion_getInstance_1().of('argumentation.flags', VOID, flags);
440
443
  var tmp = PrologSolverFactory_instance;
441
- var tmp_0 = PrologSolverFactory_instance.get_defaultRuntime_l4gjfk_k$().plusRuntime(Companion_instance_0.default$default_tu0rs4_k$(VOID, listOf(new CausalitySolver())).to2pLibraries_1osajk_k$().plusLibrary(libFlags));
442
- var tmp_1 = PrologSolverFactory_instance.get_defaultFlags_6lgyr5_k$().setNotable(Unknown_getInstance(), Unknown_getInstance().FAIL_1).setNotable(TrackVariables_getInstance(), TrackVariables_getInstance().ON_1);
443
- var tmp_2 = Companion_instance.emptyWithDefaultUnificator();
444
- var tmp_3 = Companion_instance_1.of(outputConsumer);
445
- var tmp_4 = Companion_instance_1;
446
- var tmp_5 = tmp_4.of(JsBridge$solverOf$lambda);
447
- var tmp_6 = Companion_instance_1;
448
- return tmp.mutableSolverWithDefaultBuiltinsAnd(VOID, tmp_0, tmp_1, tmp_2, VOID, VOID, tmp_3, tmp_5, tmp_6.of(JsBridge$solverOf$lambda_0));
444
+ var tmp_0 = Arg2pUnificator_getInstance();
445
+ var tmp_1 = PrologSolverFactory_instance.d21().plusRuntime(Companion_instance_0.l4d(VOID, listOf(new CausalitySolver())).h4d().plusLibrary(libFlags));
446
+ var tmp_2 = PrologSolverFactory_instance.g21().setNotable(Unknown_getInstance(), Unknown_getInstance().x2d_1).setNotable(TrackVariables_getInstance(), TrackVariables_getInstance().l2d_1);
447
+ var tmp_3 = Companion_instance.emptyWithDefaultUnificator();
448
+ var tmp_4 = Companion_instance_1.of(outputConsumer);
449
+ var tmp_5 = Companion_instance_1;
450
+ var tmp_6 = tmp_5.of(JsBridge$solverOf$lambda);
451
+ var tmp_7 = Companion_instance_1;
452
+ return tmp.mutableSolverWithDefaultBuiltinsAnd(tmp_0, tmp_1, tmp_2, tmp_3, VOID, VOID, tmp_4, tmp_6, tmp_7.of(JsBridge$solverOf$lambda_0));
449
453
  }
450
- function JsBridge$graphOf$lambda$lambda(it) {
451
- return it.get_isYes_it760k_k$();
454
+ function JsBridge$activeContext$lambda$lambda(it) {
455
+ return it.e1z();
452
456
  }
453
- function JsBridge$graphOf$lambda$lambda_0($this_arg2pScope) {
457
+ function JsBridge$activeContext$lambda$lambda_0($this_arg2pScope) {
454
458
  return function (it) {
455
- return toInt(toString(it.get_substitution_i7fi9y_k$().get_wei43m_k$($this_arg2pScope.get_X_1mhr5b_k$())));
459
+ return toInt(toString(it.u1x().l2($this_arg2pScope.p1j())));
456
460
  };
457
461
  }
458
- function JsBridge$graphOf$lambda($solver) {
462
+ function JsBridge$activeContext$lambda($solver) {
459
463
  return function ($this$arg2pScope) {
460
- var tmp = $solver.solve($this$arg2pScope.stringInvoke('context_active', $this$arg2pScope.get_X_1mhr5b_k$(), []));
461
- var tmp_0 = filter(tmp, JsBridge$graphOf$lambda$lambda);
462
- return first(map(tmp_0, JsBridge$graphOf$lambda$lambda_0($this$arg2pScope)));
464
+ var tmp = $solver.solve($this$arg2pScope.stringInvoke('context_active', $this$arg2pScope.p1j(), []));
465
+ var tmp_0 = filter(tmp, JsBridge$activeContext$lambda$lambda);
466
+ return first(map(tmp_0, JsBridge$activeContext$lambda$lambda_0($this$arg2pScope)));
463
467
  };
464
468
  }
465
469
  function JsBridge$solverOf$lambda(_unused_var__etf5q3) {
@@ -468,61 +472,91 @@
468
472
  function JsBridge$solverOf$lambda_0(_unused_var__etf5q3) {
469
473
  return Unit_instance;
470
474
  }
471
- function JsBridge$solve$lambda($formatter, $solver) {
475
+ function JsBridge$solve$lambda($solver, $formatter) {
472
476
  return function (sol) {
477
+ var context = activeContext(JsBridge_instance, $solver);
478
+ var graph = JsBridge_instance.o4w($solver, context);
473
479
  var tmp;
474
- if (sol.get_isYes_it760k_k$()) {
475
- var tmp_0 = $formatter.format_12olus_k$(ensureNotNull(sol.get_solvedQuery_paqw6_k$()));
480
+ if (sol.e1z()) {
481
+ var tmp_0 = $formatter.j15(ensureNotNull(sol.d1z()));
476
482
  // Inline function 'kotlin.collections.map' call
477
- var this_0 = sol.get_substitution_i7fi9y_k$();
483
+ var this_0 = sol.u1x();
478
484
  // Inline function 'kotlin.collections.mapTo' call
479
- var destination = ArrayList_init_$Create$(this_0.get_size_woubt6_k$());
485
+ var destination = ArrayList_init_$Create$_0(this_0.t());
480
486
  // Inline function 'kotlin.collections.iterator' call
481
- var _iterator__ex2g4s = this_0.get_entries_p20ztl_k$().iterator_jk1svi_k$();
482
- while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
483
- var item = _iterator__ex2g4s.next_20eer_k$();
484
- var tmp$ret$3 = new JsPair($formatter.format_12olus_k$(item.get_key_18j28a_k$()), $formatter.format_12olus_k$(item.get_value_j01efc_k$()));
485
- destination.add_utx5q5_k$(tmp$ret$3);
487
+ var _iterator__ex2g4s = this_0.d1().n();
488
+ while (_iterator__ex2g4s.q()) {
489
+ var item = _iterator__ex2g4s.r();
490
+ var tmp$ret$3 = new JsPair($formatter.j15(item.h2()), $formatter.j15(item.i2()));
491
+ destination.l(tmp$ret$3);
486
492
  }
487
493
  // Inline function 'kotlin.collections.toTypedArray' call
488
494
  var tmp$ret$4 = copyToArray(destination);
489
- tmp = new BridgedSolution('yes', tmp_0, tmp$ret$4, '', graphOf(JsBridge_instance, $solver));
490
- } else if (sol.get_isNo_woo4b8_k$()) {
495
+ tmp = new BridgedSolution('yes', tmp_0, tmp$ret$4, '', graph, context);
496
+ } else if (sol.r1z()) {
491
497
  // Inline function 'kotlin.emptyArray' call
492
498
  var tmp$ret$5 = [];
493
- tmp = new BridgedSolution('no', '', tmp$ret$5, '', graphOf(JsBridge_instance, $solver));
499
+ tmp = new BridgedSolution('no', '', tmp$ret$5, '', graph, context);
494
500
  } else {
495
501
  // Inline function 'kotlin.emptyArray' call
496
502
  var tmp$ret$6 = [];
497
- tmp = new BridgedSolution('halt', '', tmp$ret$6, toString(sol.get_exception_x0n6w6_k$()), graphOf(JsBridge_instance, $solver));
503
+ tmp = new BridgedSolution('halt', '', tmp$ret$6, toString(sol.q1z()), graph, context);
498
504
  }
499
505
  return tmp;
500
506
  };
501
507
  }
502
508
  function JsBridge$solve$lambda_0($i) {
503
509
  return function () {
504
- return $i.hasNext_bitz1p_k$() ? $i.next_20eer_k$() : null;
510
+ return $i.q() ? $i.r() : null;
505
511
  };
506
512
  }
507
513
  function JsBridge$solve$lambda_1($i) {
508
514
  return function () {
509
- return $i.hasNext_bitz1p_k$();
515
+ return $i.q();
510
516
  };
511
517
  }
512
518
  function JsBridge() {
513
519
  }
520
+ protoOf(JsBridge).o4w = function (solver, context) {
521
+ var graph = mineGraph(solver, context);
522
+ // Inline function 'kotlin.collections.map' call
523
+ var this_0 = graph.g4s_1;
524
+ // Inline function 'kotlin.collections.mapTo' call
525
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
526
+ var _iterator__ex2g4s = this_0.n();
527
+ while (_iterator__ex2g4s.q()) {
528
+ var item = _iterator__ex2g4s.r();
529
+ var tmp$ret$2 = new BridgedArgument(item.b4s_1.n4r_1, item.b4s_1.w4r(), item.c4s_1);
530
+ destination.l(tmp$ret$2);
531
+ }
532
+ // Inline function 'kotlin.collections.toTypedArray' call
533
+ var tmp = copyToArray(destination);
534
+ // Inline function 'kotlin.collections.map' call
535
+ var this_1 = graph.e4s_1;
536
+ // Inline function 'kotlin.collections.mapTo' call
537
+ var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
538
+ var _iterator__ex2g4s_0 = this_1.n();
539
+ while (_iterator__ex2g4s_0.q()) {
540
+ var item_0 = _iterator__ex2g4s_0.r();
541
+ var tmp$ret$6 = new BridgedAttack(item_0.x4r_1.n4r_1, item_0.y4r_1.n4r_1);
542
+ destination_0.l(tmp$ret$6);
543
+ }
544
+ // Inline function 'kotlin.collections.toTypedArray' call
545
+ var tmp$ret$7 = copyToArray(destination_0);
546
+ return new BridgedGraph(tmp, tmp$ret$7);
547
+ };
514
548
  protoOf(JsBridge).solve = function (queryText, theoryText, flagsText, outputConsumer) {
515
549
  var solver = solverOf(this, outputConsumer, flagsText);
516
- var query = parseStructWithOperators(Companion_getInstance_0(), queryText, solver.get_operators_z0nmfu_k$());
517
- var theory = parseTheoryWithOperators(Companion_instance, theoryText, solver.get_operators_z0nmfu_k$());
550
+ var query = parseStructWithOperators(Companion_getInstance(), queryText, solver.h1y());
551
+ var theory = parseTheoryWithOperators(Companion_instance, theoryText, solver.h1y());
518
552
  var formatter = Companion_instance_2.prettyExpressionsPrettyVariablesDefaultOperators();
519
553
  solver.loadStaticKb(theory);
520
554
  var tmp = solver.solve(query);
521
- var solutions = map(tmp, JsBridge$solve$lambda(formatter, solver));
522
- var i = solutions.iterator_jk1svi_k$();
555
+ var solutions = map(tmp, JsBridge$solve$lambda(solver, formatter));
556
+ var i = solutions.n();
523
557
  var tmp_0 = JsBridge$solve$lambda_0(i);
524
558
  var jsIt = new JsIterator(tmp_0, JsBridge$solve$lambda_1(i));
525
- return new BridgedResult(jsIt, formatter.format_12olus_k$(query));
559
+ return new BridgedResult(jsIt, formatter.j15(query), solver, formatter);
526
560
  };
527
561
  var JsBridge_instance;
528
562
  function JsBridge_getInstance() {