@tuprolog/arg2p 0.10.2 → 0.11.2
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 +3187 -3471
- package/2p-core.js.map +1 -1
- package/2p-dsl-core.js +737 -758
- package/2p-dsl-core.js.map +1 -1
- package/2p-dsl-solve.js +372 -372
- package/2p-dsl-solve.js.map +1 -1
- package/2p-dsl-theory.js +248 -260
- package/2p-dsl-theory.js.map +1 -1
- package/2p-dsl-unify.js +19 -20
- package/2p-dsl-unify.js.map +1 -1
- package/2p-parser-core.js +263 -303
- package/2p-parser-core.js.map +1 -1
- package/2p-parser-js.js +5 -5
- package/2p-parser-js.js.map +1 -1
- package/2p-parser-theory.js +29 -30
- package/2p-parser-theory.js.map +1 -1
- package/2p-solve-classic.js +1176 -1163
- package/2p-solve-classic.js.map +1 -1
- package/2p-solve.js +5197 -5478
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +2106 -2007
- package/2p-theory.js.map +1 -1
- package/2p-unify.js +309 -298
- package/2p-unify.js.map +1 -1
- package/2p-utils.js +648 -604
- package/2p-utils.js.map +1 -1
- package/README.md +1 -1
- package/arg2p-causality-solver.js +187 -212
- package/arg2p-causality-solver.js.map +1 -1
- package/arg2p-core.js +2174 -2214
- package/arg2p-core.js.map +1 -1
- package/arg2p.js +148 -156
- package/arg2p.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +7137 -7365
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +3 -3
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -1
- package/kt-math.js +3143 -3506
- package/kt-math.js.map +1 -1
- package/package.json +2 -3
package/arg2p.js
CHANGED
|
@@ -1,128 +1,127 @@
|
|
|
1
|
-
(function (
|
|
1
|
+
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
3
|
define(['exports', './kotlin-kotlin-stdlib.js', './arg2p-core.js', './2p-theory.js', './2p-parser-theory.js', './2p-solve.js', './2p-solve-classic.js', './arg2p-causality-solver.js', './2p-core.js', './2p-parser-core.js', './kt-math.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
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-classic.js'), require('./arg2p-causality-solver.js'), require('./2p-core.js'), require('./2p-parser-core.js'), require('./kt-math.js'));
|
|
6
6
|
else {
|
|
7
|
-
if (typeof
|
|
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
|
|
10
|
+
if (typeof globalThis['arg2p-core'] === 'undefined') {
|
|
11
11
|
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
12
|
}
|
|
13
|
-
if (typeof
|
|
13
|
+
if (typeof globalThis['2p-theory'] === 'undefined') {
|
|
14
14
|
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency '2p-theory' was not found. Please, check whether '2p-theory' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
|
|
15
15
|
}
|
|
16
|
-
if (typeof
|
|
16
|
+
if (typeof globalThis['2p-parser-theory'] === 'undefined') {
|
|
17
17
|
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency '2p-parser-theory' was not found. Please, check whether '2p-parser-theory' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
|
|
18
18
|
}
|
|
19
|
-
if (typeof
|
|
19
|
+
if (typeof globalThis['2p-solve'] === 'undefined') {
|
|
20
20
|
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency '2p-solve' was not found. Please, check whether '2p-solve' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
|
|
21
21
|
}
|
|
22
|
-
if (typeof
|
|
22
|
+
if (typeof globalThis['2p-solve-classic'] === 'undefined') {
|
|
23
23
|
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:arg2p'. Its dependency '2p-solve-classic' was not found. Please, check whether '2p-solve-classic' is loaded prior to 'it.unibo.tuprolog.argumentation:arg2p'.");
|
|
24
24
|
}
|
|
25
|
-
if (typeof
|
|
25
|
+
if (typeof globalThis['arg2p-causality-solver'] === 'undefined') {
|
|
26
26
|
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
27
|
}
|
|
28
|
-
if (typeof
|
|
28
|
+
if (typeof globalThis['2p-core'] === 'undefined') {
|
|
29
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
30
|
}
|
|
31
|
-
if (typeof
|
|
31
|
+
if (typeof globalThis['2p-parser-core'] === 'undefined') {
|
|
32
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
33
|
}
|
|
34
|
-
if (typeof
|
|
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
|
-
|
|
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-classic'], globalThis['arg2p-causality-solver'], globalThis['2p-core'], globalThis['2p-parser-core'], globalThis['kt-math']);
|
|
38
38
|
}
|
|
39
|
-
}(
|
|
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_classic, kotlin_it_unibo_tuprolog_argumentation_causality_solver, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_parser_core, 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.$_$.
|
|
44
|
-
var VOID = kotlin_kotlin.$_$.
|
|
45
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var getKClassFromExpression = kotlin_kotlin.$_$.
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
43
|
+
var protoOf = kotlin_kotlin.$_$.m6;
|
|
44
|
+
var VOID = kotlin_kotlin.$_$.b;
|
|
45
|
+
var getStringHashCode = kotlin_kotlin.$_$.v5;
|
|
46
|
+
var initMetadataForClass = kotlin_kotlin.$_$.x5;
|
|
47
|
+
var toString = kotlin_kotlin.$_$.xa;
|
|
48
|
+
var hashCode = kotlin_kotlin.$_$.w5;
|
|
49
|
+
var equals = kotlin_kotlin.$_$.r5;
|
|
50
|
+
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.x;
|
|
51
|
+
var toString_0 = kotlin_kotlin.$_$.p6;
|
|
52
|
+
var getKClassFromExpression = kotlin_kotlin.$_$.d7;
|
|
53
|
+
var THROW_CCE = kotlin_kotlin.$_$.la;
|
|
54
|
+
var Unit_instance = kotlin_kotlin.$_$.k1;
|
|
55
|
+
var contentEquals = kotlin_kotlin.$_$.e2;
|
|
56
|
+
var contentHashCode = kotlin_kotlin.$_$.f2;
|
|
57
57
|
var arg2pScope = kotlin_it_unibo_tuprolog_argumentation_core.$_$.e;
|
|
58
58
|
var mineGraph = kotlin_it_unibo_tuprolog_argumentation_core.$_$.j;
|
|
59
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
60
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
61
|
-
var copyToArray = kotlin_kotlin.$_$.
|
|
59
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.b2;
|
|
60
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.c;
|
|
61
|
+
var copyToArray = kotlin_kotlin.$_$.j2;
|
|
62
62
|
var Companion_instance = kotlin_it_unibo_tuprolog_theory.$_$.b;
|
|
63
63
|
var parseTheory = kotlin_it_unibo_tuprolog_parser_theory.$_$.a;
|
|
64
64
|
var Companion_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.h1;
|
|
65
65
|
var ClassicSolverFactory_instance = kotlin_it_unibo_tuprolog_solve_classic.$_$.a;
|
|
66
66
|
var Companion_instance_0 = kotlin_it_unibo_tuprolog_argumentation_core.$_$.c;
|
|
67
67
|
var CausalitySolver = kotlin_it_unibo_tuprolog_argumentation_causality_solver.$_$.a;
|
|
68
|
-
var listOf = kotlin_kotlin.$_$.
|
|
68
|
+
var listOf = kotlin_kotlin.$_$.b3;
|
|
69
69
|
var Unknown_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.g1;
|
|
70
70
|
var TrackVariables_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.f1;
|
|
71
71
|
var Companion_instance_1 = kotlin_it_unibo_tuprolog_solve.$_$.s;
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var ensureNotNull = kotlin_kotlin.$_$.ca;
|
|
72
|
+
var toInt = kotlin_kotlin.$_$.t9;
|
|
73
|
+
var filter = kotlin_kotlin.$_$.t7;
|
|
74
|
+
var map = kotlin_kotlin.$_$.f8;
|
|
75
|
+
var first = kotlin_kotlin.$_$.v7;
|
|
76
|
+
var ensureNotNull = kotlin_kotlin.$_$.pa;
|
|
78
77
|
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.u;
|
|
79
78
|
var parseStructWithOperators = kotlin_it_unibo_tuprolog_parser_core.$_$.f;
|
|
80
79
|
var parseTheoryWithOperators = kotlin_it_unibo_tuprolog_parser_theory.$_$.b;
|
|
81
80
|
var Companion_instance_2 = kotlin_it_unibo_tuprolog_core.$_$.x;
|
|
82
|
-
var
|
|
83
|
-
var defineProp = kotlin_kotlin.$_$.
|
|
81
|
+
var initMetadataForObject = kotlin_kotlin.$_$.b6;
|
|
82
|
+
var defineProp = kotlin_kotlin.$_$.q5;
|
|
84
83
|
//endregion
|
|
85
84
|
//region block: pre-declaration
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
initMetadataForClass(BridgedArgument, 'BridgedArgument');
|
|
86
|
+
initMetadataForClass(BridgedAttack, 'BridgedAttack');
|
|
87
|
+
initMetadataForClass(JsPair, 'JsPair');
|
|
88
|
+
initMetadataForClass(JsIterator, 'JsIterator');
|
|
89
|
+
initMetadataForClass(BridgedResult, 'BridgedResult');
|
|
90
|
+
initMetadataForClass(BridgedGraph, 'BridgedGraph');
|
|
91
|
+
initMetadataForClass(BridgedSolution, 'BridgedSolution');
|
|
92
|
+
initMetadataForObject(JsBridge, 'JsBridge');
|
|
94
93
|
//endregion
|
|
95
94
|
function BridgedArgument(id, descriptor, label) {
|
|
96
95
|
this.id = id;
|
|
97
96
|
this.descriptor = descriptor;
|
|
98
97
|
this.label = label;
|
|
99
98
|
}
|
|
100
|
-
protoOf(BridgedArgument).
|
|
99
|
+
protoOf(BridgedArgument).t12 = function () {
|
|
101
100
|
return this.id;
|
|
102
101
|
};
|
|
103
|
-
protoOf(BridgedArgument).
|
|
102
|
+
protoOf(BridgedArgument).d3k = function () {
|
|
104
103
|
return this.descriptor;
|
|
105
104
|
};
|
|
106
|
-
protoOf(BridgedArgument).
|
|
105
|
+
protoOf(BridgedArgument).b3o = function () {
|
|
107
106
|
return this.label;
|
|
108
107
|
};
|
|
109
|
-
protoOf(BridgedArgument).
|
|
108
|
+
protoOf(BridgedArgument).zb = function () {
|
|
110
109
|
return this.id;
|
|
111
110
|
};
|
|
112
|
-
protoOf(BridgedArgument).
|
|
111
|
+
protoOf(BridgedArgument).ac = function () {
|
|
113
112
|
return this.descriptor;
|
|
114
113
|
};
|
|
115
|
-
protoOf(BridgedArgument).
|
|
114
|
+
protoOf(BridgedArgument).c3o = function () {
|
|
116
115
|
return this.label;
|
|
117
116
|
};
|
|
118
|
-
protoOf(BridgedArgument).
|
|
117
|
+
protoOf(BridgedArgument).d3o = function (id, descriptor, label) {
|
|
119
118
|
return new BridgedArgument(id, descriptor, label);
|
|
120
119
|
};
|
|
121
120
|
protoOf(BridgedArgument).copy = function (id, descriptor, label, $super) {
|
|
122
121
|
id = id === VOID ? this.id : id;
|
|
123
122
|
descriptor = descriptor === VOID ? this.descriptor : descriptor;
|
|
124
123
|
label = label === VOID ? this.label : label;
|
|
125
|
-
return this.
|
|
124
|
+
return $super === VOID ? this.d3o(id, descriptor, label) : $super.d3o.call(this, id, descriptor, label);
|
|
126
125
|
};
|
|
127
126
|
protoOf(BridgedArgument).toString = function () {
|
|
128
127
|
return 'BridgedArgument(id=' + this.id + ', descriptor=' + this.descriptor + ', label=' + this.label + ')';
|
|
@@ -138,12 +137,11 @@
|
|
|
138
137
|
return true;
|
|
139
138
|
if (!(other instanceof BridgedArgument))
|
|
140
139
|
return false;
|
|
141
|
-
|
|
142
|
-
if (!(this.id === tmp0_other_with_cast.id))
|
|
140
|
+
if (!(this.id === other.id))
|
|
143
141
|
return false;
|
|
144
|
-
if (!(this.descriptor ===
|
|
142
|
+
if (!(this.descriptor === other.descriptor))
|
|
145
143
|
return false;
|
|
146
|
-
if (!(this.label ===
|
|
144
|
+
if (!(this.label === other.label))
|
|
147
145
|
return false;
|
|
148
146
|
return true;
|
|
149
147
|
};
|
|
@@ -151,25 +149,25 @@
|
|
|
151
149
|
this.from = from;
|
|
152
150
|
this.to = to;
|
|
153
151
|
}
|
|
154
|
-
protoOf(BridgedAttack).
|
|
152
|
+
protoOf(BridgedAttack).e3o = function () {
|
|
155
153
|
return this.from;
|
|
156
154
|
};
|
|
157
|
-
protoOf(BridgedAttack).
|
|
155
|
+
protoOf(BridgedAttack).f3o = function () {
|
|
158
156
|
return this.to;
|
|
159
157
|
};
|
|
160
|
-
protoOf(BridgedAttack).
|
|
158
|
+
protoOf(BridgedAttack).zb = function () {
|
|
161
159
|
return this.from;
|
|
162
160
|
};
|
|
163
|
-
protoOf(BridgedAttack).
|
|
161
|
+
protoOf(BridgedAttack).ac = function () {
|
|
164
162
|
return this.to;
|
|
165
163
|
};
|
|
166
|
-
protoOf(BridgedAttack).
|
|
164
|
+
protoOf(BridgedAttack).g3o = function (from, to) {
|
|
167
165
|
return new BridgedAttack(from, to);
|
|
168
166
|
};
|
|
169
167
|
protoOf(BridgedAttack).copy = function (from, to, $super) {
|
|
170
168
|
from = from === VOID ? this.from : from;
|
|
171
169
|
to = to === VOID ? this.to : to;
|
|
172
|
-
return this.
|
|
170
|
+
return $super === VOID ? this.g3o(from, to) : $super.g3o.call(this, from, to);
|
|
173
171
|
};
|
|
174
172
|
protoOf(BridgedAttack).toString = function () {
|
|
175
173
|
return 'BridgedAttack(from=' + this.from + ', to=' + this.to + ')';
|
|
@@ -184,10 +182,9 @@
|
|
|
184
182
|
return true;
|
|
185
183
|
if (!(other instanceof BridgedAttack))
|
|
186
184
|
return false;
|
|
187
|
-
|
|
188
|
-
if (!(this.from === tmp0_other_with_cast.from))
|
|
185
|
+
if (!(this.from === other.from))
|
|
189
186
|
return false;
|
|
190
|
-
if (!(this.to ===
|
|
187
|
+
if (!(this.to === other.to))
|
|
191
188
|
return false;
|
|
192
189
|
return true;
|
|
193
190
|
};
|
|
@@ -195,28 +192,28 @@
|
|
|
195
192
|
this.first = first;
|
|
196
193
|
this.second = second;
|
|
197
194
|
}
|
|
198
|
-
protoOf(JsPair).
|
|
195
|
+
protoOf(JsPair).h3o = function () {
|
|
199
196
|
return this.first;
|
|
200
197
|
};
|
|
201
|
-
protoOf(JsPair).
|
|
198
|
+
protoOf(JsPair).i3o = function () {
|
|
202
199
|
return this.second;
|
|
203
200
|
};
|
|
204
|
-
protoOf(JsPair).
|
|
201
|
+
protoOf(JsPair).zb = function () {
|
|
205
202
|
return this.first;
|
|
206
203
|
};
|
|
207
|
-
protoOf(JsPair).
|
|
204
|
+
protoOf(JsPair).ac = function () {
|
|
208
205
|
return this.second;
|
|
209
206
|
};
|
|
210
|
-
protoOf(JsPair).
|
|
207
|
+
protoOf(JsPair).j3o = function (first, second) {
|
|
211
208
|
return new JsPair(first, second);
|
|
212
209
|
};
|
|
213
210
|
protoOf(JsPair).copy = function (first, second, $super) {
|
|
214
211
|
first = first === VOID ? this.first : first;
|
|
215
212
|
second = second === VOID ? this.second : second;
|
|
216
|
-
return this.
|
|
213
|
+
return $super === VOID ? this.j3o(first, second) : $super.j3o.call(this, first, second);
|
|
217
214
|
};
|
|
218
215
|
protoOf(JsPair).toString = function () {
|
|
219
|
-
return 'JsPair(first=' + this.first + ', second=' + this.second + ')';
|
|
216
|
+
return 'JsPair(first=' + toString(this.first) + ', second=' + toString(this.second) + ')';
|
|
220
217
|
};
|
|
221
218
|
protoOf(JsPair).hashCode = function () {
|
|
222
219
|
var result = this.first == null ? 0 : hashCode(this.first);
|
|
@@ -228,51 +225,50 @@
|
|
|
228
225
|
return true;
|
|
229
226
|
if (!(other instanceof JsPair))
|
|
230
227
|
return false;
|
|
231
|
-
|
|
232
|
-
if (!equals(this.first, tmp0_other_with_cast.first))
|
|
228
|
+
if (!equals(this.first, other.first))
|
|
233
229
|
return false;
|
|
234
|
-
if (!equals(this.second,
|
|
230
|
+
if (!equals(this.second, other.second))
|
|
235
231
|
return false;
|
|
236
232
|
return true;
|
|
237
233
|
};
|
|
238
234
|
function JsIterator(nextFunction, hasNextFunction) {
|
|
239
|
-
this.
|
|
240
|
-
this.
|
|
235
|
+
this.k3o_1 = nextFunction;
|
|
236
|
+
this.l3o_1 = hasNextFunction;
|
|
241
237
|
}
|
|
242
238
|
protoOf(JsIterator).hasNext = function () {
|
|
243
|
-
return this.
|
|
239
|
+
return this.l3o_1();
|
|
244
240
|
};
|
|
245
241
|
protoOf(JsIterator).next = function () {
|
|
246
242
|
if (!this.hasNext())
|
|
247
243
|
throw NoSuchElementException_init_$Create$('No more elements');
|
|
248
|
-
return this.
|
|
244
|
+
return this.k3o_1();
|
|
249
245
|
};
|
|
250
246
|
function BridgedResult(i, query) {
|
|
251
247
|
this.i = i;
|
|
252
248
|
this.query = query;
|
|
253
249
|
}
|
|
254
|
-
protoOf(BridgedResult).
|
|
250
|
+
protoOf(BridgedResult).m3o = function () {
|
|
255
251
|
return this.i;
|
|
256
252
|
};
|
|
257
|
-
protoOf(BridgedResult).
|
|
253
|
+
protoOf(BridgedResult).z1t = function () {
|
|
258
254
|
return this.query;
|
|
259
255
|
};
|
|
260
|
-
protoOf(BridgedResult).
|
|
256
|
+
protoOf(BridgedResult).zb = function () {
|
|
261
257
|
return this.i;
|
|
262
258
|
};
|
|
263
|
-
protoOf(BridgedResult).
|
|
259
|
+
protoOf(BridgedResult).ac = function () {
|
|
264
260
|
return this.query;
|
|
265
261
|
};
|
|
266
|
-
protoOf(BridgedResult).
|
|
262
|
+
protoOf(BridgedResult).n3o = function (i, query) {
|
|
267
263
|
return new BridgedResult(i, query);
|
|
268
264
|
};
|
|
269
265
|
protoOf(BridgedResult).copy = function (i, query, $super) {
|
|
270
266
|
i = i === VOID ? this.i : i;
|
|
271
267
|
query = query === VOID ? this.query : query;
|
|
272
|
-
return this.
|
|
268
|
+
return $super === VOID ? this.n3o(i, query) : $super.n3o.call(this, i, query);
|
|
273
269
|
};
|
|
274
270
|
protoOf(BridgedResult).toString = function () {
|
|
275
|
-
return 'BridgedResult(i=' + this.i + ', query=' + this.query + ')';
|
|
271
|
+
return 'BridgedResult(i=' + toString_0(this.i) + ', query=' + this.query + ')';
|
|
276
272
|
};
|
|
277
273
|
protoOf(BridgedResult).hashCode = function () {
|
|
278
274
|
var result = hashCode(this.i);
|
|
@@ -284,10 +280,9 @@
|
|
|
284
280
|
return true;
|
|
285
281
|
if (!(other instanceof BridgedResult))
|
|
286
282
|
return false;
|
|
287
|
-
|
|
288
|
-
if (!equals(this.i, tmp0_other_with_cast.i))
|
|
283
|
+
if (!equals(this.i, other.i))
|
|
289
284
|
return false;
|
|
290
|
-
if (!(this.query ===
|
|
285
|
+
if (!(this.query === other.query))
|
|
291
286
|
return false;
|
|
292
287
|
return true;
|
|
293
288
|
};
|
|
@@ -295,16 +290,16 @@
|
|
|
295
290
|
this.arguments = arguments_0;
|
|
296
291
|
this.attacks = attacks;
|
|
297
292
|
}
|
|
298
|
-
protoOf(BridgedGraph).
|
|
293
|
+
protoOf(BridgedGraph).o28 = function () {
|
|
299
294
|
return this.arguments;
|
|
300
295
|
};
|
|
301
|
-
protoOf(BridgedGraph).
|
|
296
|
+
protoOf(BridgedGraph).o3o = function () {
|
|
302
297
|
return this.attacks;
|
|
303
298
|
};
|
|
304
299
|
protoOf(BridgedGraph).equals = function (other) {
|
|
305
300
|
if (this === other)
|
|
306
301
|
return true;
|
|
307
|
-
if (other == null
|
|
302
|
+
if (other == null || !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
|
|
308
303
|
return false;
|
|
309
304
|
if (!(other instanceof BridgedGraph))
|
|
310
305
|
THROW_CCE();
|
|
@@ -319,22 +314,22 @@
|
|
|
319
314
|
result = imul(31, result) + contentHashCode(this.attacks) | 0;
|
|
320
315
|
return result;
|
|
321
316
|
};
|
|
322
|
-
protoOf(BridgedGraph).
|
|
317
|
+
protoOf(BridgedGraph).zb = function () {
|
|
323
318
|
return this.arguments;
|
|
324
319
|
};
|
|
325
|
-
protoOf(BridgedGraph).
|
|
320
|
+
protoOf(BridgedGraph).ac = function () {
|
|
326
321
|
return this.attacks;
|
|
327
322
|
};
|
|
328
|
-
protoOf(BridgedGraph).
|
|
323
|
+
protoOf(BridgedGraph).p3o = function (arguments_0, attacks) {
|
|
329
324
|
return new BridgedGraph(arguments_0, attacks);
|
|
330
325
|
};
|
|
331
326
|
protoOf(BridgedGraph).copy = function (arguments_0, attacks, $super) {
|
|
332
327
|
arguments_0 = arguments_0 === VOID ? this.arguments : arguments_0;
|
|
333
328
|
attacks = attacks === VOID ? this.attacks : attacks;
|
|
334
|
-
return this.
|
|
329
|
+
return $super === VOID ? this.p3o(arguments_0, attacks) : $super.p3o.call(this, arguments_0, attacks);
|
|
335
330
|
};
|
|
336
331
|
protoOf(BridgedGraph).toString = function () {
|
|
337
|
-
return 'BridgedGraph(arguments=' +
|
|
332
|
+
return 'BridgedGraph(arguments=' + toString_0(this.arguments) + ', attacks=' + toString_0(this.attacks) + ')';
|
|
338
333
|
};
|
|
339
334
|
function BridgedSolution(res, query, substitutions, exception, graph) {
|
|
340
335
|
this.res = res;
|
|
@@ -343,25 +338,25 @@
|
|
|
343
338
|
this.exception = exception;
|
|
344
339
|
this.graph = graph;
|
|
345
340
|
}
|
|
346
|
-
protoOf(BridgedSolution).
|
|
341
|
+
protoOf(BridgedSolution).q3o = function () {
|
|
347
342
|
return this.res;
|
|
348
343
|
};
|
|
349
|
-
protoOf(BridgedSolution).
|
|
344
|
+
protoOf(BridgedSolution).z1t = function () {
|
|
350
345
|
return this.query;
|
|
351
346
|
};
|
|
352
|
-
protoOf(BridgedSolution).
|
|
347
|
+
protoOf(BridgedSolution).r3o = function () {
|
|
353
348
|
return this.substitutions;
|
|
354
349
|
};
|
|
355
|
-
protoOf(BridgedSolution).
|
|
350
|
+
protoOf(BridgedSolution).c1u = function () {
|
|
356
351
|
return this.exception;
|
|
357
352
|
};
|
|
358
|
-
protoOf(BridgedSolution).
|
|
353
|
+
protoOf(BridgedSolution).s3o = function () {
|
|
359
354
|
return this.graph;
|
|
360
355
|
};
|
|
361
356
|
protoOf(BridgedSolution).equals = function (other) {
|
|
362
357
|
if (this === other)
|
|
363
358
|
return true;
|
|
364
|
-
if (other == null
|
|
359
|
+
if (other == null || !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
|
|
365
360
|
return false;
|
|
366
361
|
if (!(other instanceof BridgedSolution))
|
|
367
362
|
THROW_CCE();
|
|
@@ -382,22 +377,22 @@
|
|
|
382
377
|
result = imul(31, result) + getStringHashCode(this.exception) | 0;
|
|
383
378
|
return result;
|
|
384
379
|
};
|
|
385
|
-
protoOf(BridgedSolution).
|
|
380
|
+
protoOf(BridgedSolution).zb = function () {
|
|
386
381
|
return this.res;
|
|
387
382
|
};
|
|
388
|
-
protoOf(BridgedSolution).
|
|
383
|
+
protoOf(BridgedSolution).ac = function () {
|
|
389
384
|
return this.query;
|
|
390
385
|
};
|
|
391
|
-
protoOf(BridgedSolution).
|
|
386
|
+
protoOf(BridgedSolution).c3o = function () {
|
|
392
387
|
return this.substitutions;
|
|
393
388
|
};
|
|
394
|
-
protoOf(BridgedSolution).
|
|
389
|
+
protoOf(BridgedSolution).t3o = function () {
|
|
395
390
|
return this.exception;
|
|
396
391
|
};
|
|
397
|
-
protoOf(BridgedSolution).
|
|
392
|
+
protoOf(BridgedSolution).u3o = function () {
|
|
398
393
|
return this.graph;
|
|
399
394
|
};
|
|
400
|
-
protoOf(BridgedSolution).
|
|
395
|
+
protoOf(BridgedSolution).v3o = function (res, query, substitutions, exception, graph) {
|
|
401
396
|
return new BridgedSolution(res, query, substitutions, exception, graph);
|
|
402
397
|
};
|
|
403
398
|
protoOf(BridgedSolution).copy = function (res, query, substitutions, exception, graph, $super) {
|
|
@@ -406,38 +401,36 @@
|
|
|
406
401
|
substitutions = substitutions === VOID ? this.substitutions : substitutions;
|
|
407
402
|
exception = exception === VOID ? this.exception : exception;
|
|
408
403
|
graph = graph === VOID ? this.graph : graph;
|
|
409
|
-
return this.
|
|
404
|
+
return $super === VOID ? this.v3o(res, query, substitutions, exception, graph) : $super.v3o.call(this, res, query, substitutions, exception, graph);
|
|
410
405
|
};
|
|
411
406
|
protoOf(BridgedSolution).toString = function () {
|
|
412
|
-
return 'BridgedSolution(res=' + this.res + ', query=' + this.query + ', substitutions=' +
|
|
407
|
+
return 'BridgedSolution(res=' + this.res + ', query=' + this.query + ', substitutions=' + toString_0(this.substitutions) + ', exception=' + this.exception + ', graph=' + this.graph.toString() + ')';
|
|
413
408
|
};
|
|
414
409
|
function graphOf($this, solver) {
|
|
415
410
|
var graph = mineGraph(solver, arg2pScope(JsBridge$graphOf$lambda(solver)));
|
|
416
|
-
// Inline function 'kotlin.collections.toTypedArray' call
|
|
417
411
|
// Inline function 'kotlin.collections.map' call
|
|
418
|
-
var this_0 = graph.
|
|
412
|
+
var this_0 = graph.n3k_1;
|
|
419
413
|
// Inline function 'kotlin.collections.mapTo' call
|
|
420
414
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
421
|
-
var
|
|
422
|
-
while (
|
|
423
|
-
var item =
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
destination.o(tmp$ret$0);
|
|
415
|
+
var _iterator__ex2g4s = this_0.p();
|
|
416
|
+
while (_iterator__ex2g4s.s()) {
|
|
417
|
+
var item = _iterator__ex2g4s.t();
|
|
418
|
+
var tmp$ret$0 = new BridgedArgument(item.i3k_1.y3j_1, item.i3k_1.d3k(), item.j3k_1);
|
|
419
|
+
destination.m(tmp$ret$0);
|
|
427
420
|
}
|
|
428
|
-
var tmp = copyToArray(destination);
|
|
429
421
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
422
|
+
var tmp = copyToArray(destination);
|
|
430
423
|
// Inline function 'kotlin.collections.map' call
|
|
431
|
-
var this_1 = graph.
|
|
424
|
+
var this_1 = graph.l3k_1;
|
|
432
425
|
// Inline function 'kotlin.collections.mapTo' call
|
|
433
426
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
434
|
-
var
|
|
435
|
-
while (
|
|
436
|
-
var item_0 =
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
destination_0.o(tmp$ret$4);
|
|
427
|
+
var _iterator__ex2g4s_0 = this_1.p();
|
|
428
|
+
while (_iterator__ex2g4s_0.s()) {
|
|
429
|
+
var item_0 = _iterator__ex2g4s_0.t();
|
|
430
|
+
var tmp$ret$4 = new BridgedAttack(item_0.e3k_1.y3j_1, item_0.f3k_1.y3j_1);
|
|
431
|
+
destination_0.m(tmp$ret$4);
|
|
440
432
|
}
|
|
433
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
441
434
|
var tmp$ret$7 = copyToArray(destination_0);
|
|
442
435
|
return new BridgedGraph(tmp, tmp$ret$7);
|
|
443
436
|
}
|
|
@@ -445,8 +438,8 @@
|
|
|
445
438
|
var flags = parseTheory(Companion_instance, flagsText);
|
|
446
439
|
var libFlags = Companion_getInstance().of('argumentation.flags', VOID, flags);
|
|
447
440
|
var tmp = ClassicSolverFactory_instance;
|
|
448
|
-
var tmp_0 = ClassicSolverFactory_instance.
|
|
449
|
-
var tmp_1 = ClassicSolverFactory_instance.
|
|
441
|
+
var tmp_0 = ClassicSolverFactory_instance.u1v().plusRuntime(Companion_instance_0.g39(VOID, listOf(new CausalitySolver())).c39().plusLibrary(libFlags));
|
|
442
|
+
var tmp_1 = ClassicSolverFactory_instance.x1v().setNotable(Unknown_getInstance(), Unknown_getInstance().f27_1).setNotable(TrackVariables_getInstance(), TrackVariables_getInstance().z26_1);
|
|
450
443
|
var tmp_2 = Companion_instance.emptyWithDefaultUnificator();
|
|
451
444
|
var tmp_3 = Companion_instance_1.of(outputConsumer);
|
|
452
445
|
var tmp_4 = Companion_instance_1;
|
|
@@ -455,61 +448,60 @@
|
|
|
455
448
|
return tmp.mutableSolverWithDefaultBuiltinsAnd(VOID, tmp_0, tmp_1, tmp_2, VOID, VOID, tmp_3, tmp_5, tmp_6.of(JsBridge$solverOf$lambda_0));
|
|
456
449
|
}
|
|
457
450
|
function JsBridge$graphOf$lambda$lambda(it) {
|
|
458
|
-
return it.
|
|
451
|
+
return it.d1u();
|
|
459
452
|
}
|
|
460
453
|
function JsBridge$graphOf$lambda$lambda_0($this_arg2pScope) {
|
|
461
454
|
return function (it) {
|
|
462
|
-
return toInt(
|
|
455
|
+
return toInt(toString(it.v1s().h2($this_arg2pScope.d1g())));
|
|
463
456
|
};
|
|
464
457
|
}
|
|
465
458
|
function JsBridge$graphOf$lambda($solver) {
|
|
466
459
|
return function ($this$arg2pScope) {
|
|
467
|
-
var tmp = $solver.solve($this$arg2pScope.stringInvoke('context_active', $this$arg2pScope.
|
|
460
|
+
var tmp = $solver.solve($this$arg2pScope.stringInvoke('context_active', $this$arg2pScope.d1g(), []));
|
|
468
461
|
var tmp_0 = filter(tmp, JsBridge$graphOf$lambda$lambda);
|
|
469
462
|
return first(map(tmp_0, JsBridge$graphOf$lambda$lambda_0($this$arg2pScope)));
|
|
470
463
|
};
|
|
471
464
|
}
|
|
472
|
-
function JsBridge$solverOf$lambda(
|
|
465
|
+
function JsBridge$solverOf$lambda(_unused_var__etf5q3) {
|
|
473
466
|
return Unit_instance;
|
|
474
467
|
}
|
|
475
|
-
function JsBridge$solverOf$lambda_0(
|
|
468
|
+
function JsBridge$solverOf$lambda_0(_unused_var__etf5q3) {
|
|
476
469
|
return Unit_instance;
|
|
477
470
|
}
|
|
478
471
|
function JsBridge$solve$lambda($formatter, $solver) {
|
|
479
472
|
return function (sol) {
|
|
480
473
|
var tmp;
|
|
481
|
-
if (sol.
|
|
482
|
-
var tmp_0 = $formatter.
|
|
483
|
-
// Inline function 'kotlin.collections.toTypedArray' call
|
|
474
|
+
if (sol.d1u()) {
|
|
475
|
+
var tmp_0 = $formatter.g12(ensureNotNull(sol.x1t()));
|
|
484
476
|
// Inline function 'kotlin.collections.map' call
|
|
485
|
-
var this_0 = sol.
|
|
477
|
+
var this_0 = sol.v1s();
|
|
486
478
|
// Inline function 'kotlin.collections.mapTo' call
|
|
487
|
-
var destination = ArrayList_init_$Create$(this_0.
|
|
479
|
+
var destination = ArrayList_init_$Create$(this_0.v());
|
|
488
480
|
// Inline function 'kotlin.collections.iterator' call
|
|
489
|
-
var
|
|
490
|
-
while (
|
|
491
|
-
var item =
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
destination.o(tmp$ret$1);
|
|
481
|
+
var _iterator__ex2g4s = this_0.e1().p();
|
|
482
|
+
while (_iterator__ex2g4s.s()) {
|
|
483
|
+
var item = _iterator__ex2g4s.t();
|
|
484
|
+
var tmp$ret$1 = new JsPair($formatter.g12(item.d2()), $formatter.g12(item.e2()));
|
|
485
|
+
destination.m(tmp$ret$1);
|
|
495
486
|
}
|
|
487
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
496
488
|
var tmp$ret$4 = copyToArray(destination);
|
|
497
489
|
tmp = new BridgedSolution('yes', tmp_0, tmp$ret$4, '', graphOf(JsBridge_instance, $solver));
|
|
498
|
-
} else if (sol.
|
|
490
|
+
} else if (sol.e1u()) {
|
|
499
491
|
// Inline function 'kotlin.emptyArray' call
|
|
500
492
|
var tmp$ret$5 = [];
|
|
501
493
|
tmp = new BridgedSolution('no', '', tmp$ret$5, '', graphOf(JsBridge_instance, $solver));
|
|
502
494
|
} else {
|
|
503
495
|
// Inline function 'kotlin.emptyArray' call
|
|
504
496
|
var tmp$ret$6 = [];
|
|
505
|
-
tmp = new BridgedSolution('halt', '', tmp$ret$6,
|
|
497
|
+
tmp = new BridgedSolution('halt', '', tmp$ret$6, toString(sol.c1u()), graphOf(JsBridge_instance, $solver));
|
|
506
498
|
}
|
|
507
499
|
return tmp;
|
|
508
500
|
};
|
|
509
501
|
}
|
|
510
502
|
function JsBridge$solve$lambda_0($i) {
|
|
511
503
|
return function () {
|
|
512
|
-
return $i.s() ? $i.
|
|
504
|
+
return $i.s() ? $i.t() : null;
|
|
513
505
|
};
|
|
514
506
|
}
|
|
515
507
|
function JsBridge$solve$lambda_1($i) {
|
|
@@ -521,16 +513,16 @@
|
|
|
521
513
|
}
|
|
522
514
|
protoOf(JsBridge).solve = function (queryText, theoryText, flagsText, outputConsumer) {
|
|
523
515
|
var solver = solverOf(this, outputConsumer, flagsText);
|
|
524
|
-
var query = parseStructWithOperators(Companion_getInstance_0(), queryText, solver.
|
|
525
|
-
var theory = parseTheoryWithOperators(Companion_instance, theoryText, solver.
|
|
516
|
+
var query = parseStructWithOperators(Companion_getInstance_0(), queryText, solver.i1t());
|
|
517
|
+
var theory = parseTheoryWithOperators(Companion_instance, theoryText, solver.i1t());
|
|
526
518
|
var formatter = Companion_instance_2.prettyExpressionsPrettyVariablesDefaultOperators();
|
|
527
519
|
solver.loadStaticKb(theory);
|
|
528
520
|
var tmp = solver.solve(query);
|
|
529
521
|
var solutions = map(tmp, JsBridge$solve$lambda(formatter, solver));
|
|
530
|
-
var i = solutions.
|
|
522
|
+
var i = solutions.p();
|
|
531
523
|
var tmp_0 = JsBridge$solve$lambda_0(i);
|
|
532
524
|
var jsIt = new JsIterator(tmp_0, JsBridge$solve$lambda_1(i));
|
|
533
|
-
return new BridgedResult(jsIt, formatter.
|
|
525
|
+
return new BridgedResult(jsIt, formatter.g12(query));
|
|
534
526
|
};
|
|
535
527
|
var JsBridge_instance;
|
|
536
528
|
function JsBridge_getInstance() {
|
|
@@ -553,7 +545,7 @@
|
|
|
553
545
|
$it$unibo$tuprolog$argumentation$bridge.BridgedResult = BridgedResult;
|
|
554
546
|
$it$unibo$tuprolog$argumentation$bridge.BridgedGraph = BridgedGraph;
|
|
555
547
|
$it$unibo$tuprolog$argumentation$bridge.BridgedSolution = BridgedSolution;
|
|
556
|
-
defineProp($it$unibo$tuprolog$argumentation$bridge, 'JsBridge', JsBridge_getInstance);
|
|
548
|
+
defineProp($it$unibo$tuprolog$argumentation$bridge, 'JsBridge', JsBridge_getInstance, VOID, true);
|
|
557
549
|
}
|
|
558
550
|
$jsExportAll$(_);
|
|
559
551
|
kotlin_io_github_gciatto_kt_math.$jsExportAll$(_);
|