@tuprolog/arg2p-core 0.7.2 → 0.7.3
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 +3280 -5108
- package/2p-core.js.map +1 -1
- package/2p-parser-core.js +332 -422
- package/2p-parser-core.js.map +1 -1
- package/2p-parser-js.js +7 -8
- package/2p-parser-js.js.map +1 -1
- package/2p-parser-theory.js +36 -41
- package/2p-parser-theory.js.map +1 -1
- package/2p-solve-classic.js +1163 -1393
- package/2p-solve-classic.js.map +1 -1
- package/2p-solve.js +4695 -5928
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +2096 -2245
- package/2p-theory.js.map +1 -1
- package/2p-unify.js +290 -330
- package/2p-unify.js.map +1 -1
- package/2p-utils.js +466 -536
- package/2p-utils.js.map +1 -1
- package/arg2p-core.js +245 -301
- package/arg2p-core.js.map +1 -1
- package/{kotlin-kotlin-stdlib-js-ir.js → kotlin-kotlin-stdlib.js} +8113 -8631
- package/kotlin-kotlin-stdlib.js.map +1 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
- package/kt-math.js +2925 -4246
- package/kt-math.js.map +1 -1
- package/package.json +4 -3
- package/kotlin-kotlin-stdlib-js-ir.js.map +0 -1
package/arg2p-core.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
(function (root, factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './kotlin-kotlin-stdlib
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './2p-core.js', './2p-theory.js', './2p-parser-theory.js', './2p-solve.js', './2p-unify.js', './kt-math.js', './2p-solve-classic.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('./kotlin-kotlin-stdlib
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./2p-core.js'), require('./2p-theory.js'), require('./2p-parser-theory.js'), require('./2p-solve.js'), require('./2p-unify.js'), require('./kt-math.js'), require('./2p-solve-classic.js'));
|
|
6
6
|
else {
|
|
7
|
-
if (typeof this['kotlin-kotlin-stdlib
|
|
8
|
-
throw new Error("Error loading module '
|
|
7
|
+
if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:core'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'it.unibo.tuprolog.argumentation:core'.");
|
|
9
9
|
}
|
|
10
10
|
if (typeof this['2p-core'] === 'undefined') {
|
|
11
|
-
throw new Error("Error loading module '
|
|
11
|
+
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:core'. Its dependency '2p-core' was not found. Please, check whether '2p-core' is loaded prior to 'it.unibo.tuprolog.argumentation:core'.");
|
|
12
12
|
}
|
|
13
13
|
if (typeof this['2p-theory'] === 'undefined') {
|
|
14
|
-
throw new Error("Error loading module '
|
|
14
|
+
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:core'. Its dependency '2p-theory' was not found. Please, check whether '2p-theory' is loaded prior to 'it.unibo.tuprolog.argumentation:core'.");
|
|
15
15
|
}
|
|
16
16
|
if (typeof this['2p-parser-theory'] === 'undefined') {
|
|
17
|
-
throw new Error("Error loading module '
|
|
17
|
+
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:core'. Its dependency '2p-parser-theory' was not found. Please, check whether '2p-parser-theory' is loaded prior to 'it.unibo.tuprolog.argumentation:core'.");
|
|
18
18
|
}
|
|
19
19
|
if (typeof this['2p-solve'] === 'undefined') {
|
|
20
|
-
throw new Error("Error loading module '
|
|
20
|
+
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:core'. Its dependency '2p-solve' was not found. Please, check whether '2p-solve' is loaded prior to 'it.unibo.tuprolog.argumentation:core'.");
|
|
21
21
|
}
|
|
22
22
|
if (typeof this['2p-unify'] === 'undefined') {
|
|
23
|
-
throw new Error("Error loading module '
|
|
23
|
+
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:core'. Its dependency '2p-unify' was not found. Please, check whether '2p-unify' is loaded prior to 'it.unibo.tuprolog.argumentation:core'.");
|
|
24
24
|
}
|
|
25
25
|
if (typeof this['kt-math'] === 'undefined') {
|
|
26
|
-
throw new Error("Error loading module '
|
|
26
|
+
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:core'. Its dependency 'kt-math' was not found. Please, check whether 'kt-math' is loaded prior to 'it.unibo.tuprolog.argumentation:core'.");
|
|
27
27
|
}
|
|
28
28
|
if (typeof this['2p-solve-classic'] === 'undefined') {
|
|
29
|
-
throw new Error("Error loading module '
|
|
29
|
+
throw new Error("Error loading module 'it.unibo.tuprolog.argumentation:core'. Its dependency '2p-solve-classic' was not found. Please, check whether '2p-solve-classic' is loaded prior to 'it.unibo.tuprolog.argumentation:core'.");
|
|
30
30
|
}
|
|
31
|
-
root['
|
|
31
|
+
root['it.unibo.tuprolog.argumentation:core'] = factory(typeof this['it.unibo.tuprolog.argumentation:core'] === 'undefined' ? {} : this['it.unibo.tuprolog.argumentation:core'], this['kotlin-kotlin-stdlib'], this['2p-core'], this['2p-theory'], this['2p-parser-theory'], this['2p-solve'], this['2p-unify'], this['kt-math'], this['2p-solve-classic']);
|
|
32
32
|
}
|
|
33
33
|
}(this, function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_theory, kotlin_it_unibo_tuprolog_parser_theory, kotlin_it_unibo_tuprolog_solve, kotlin_it_unibo_tuprolog_unify, kotlin_io_github_gciatto_kt_math, kotlin_it_unibo_tuprolog_solve_classic) {
|
|
34
34
|
'use strict';
|
|
35
35
|
//region block: imports
|
|
36
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
37
|
-
var classMeta = kotlin_kotlin.$_$.
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var listOf = kotlin_kotlin.$_$.
|
|
41
|
-
var plus = kotlin_kotlin.$_$.
|
|
42
|
-
var objectMeta = kotlin_kotlin.$_$.
|
|
43
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
44
|
-
var defineProp = kotlin_kotlin.$_$.
|
|
36
|
+
var protoOf = kotlin_kotlin.$_$.s5;
|
|
37
|
+
var classMeta = kotlin_kotlin.$_$.w4;
|
|
38
|
+
var setMetadataFor = kotlin_kotlin.$_$.t5;
|
|
39
|
+
var VOID = kotlin_kotlin.$_$.d;
|
|
40
|
+
var listOf = kotlin_kotlin.$_$.e3;
|
|
41
|
+
var plus = kotlin_kotlin.$_$.v3;
|
|
42
|
+
var objectMeta = kotlin_kotlin.$_$.r5;
|
|
43
|
+
var emptyList = kotlin_kotlin.$_$.o2;
|
|
44
|
+
var defineProp = kotlin_kotlin.$_$.y4;
|
|
45
45
|
var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.f;
|
|
46
|
-
var interfaceMeta = kotlin_kotlin.$_$.
|
|
47
|
-
var
|
|
46
|
+
var interfaceMeta = kotlin_kotlin.$_$.f5;
|
|
47
|
+
var Companion_instance = kotlin_it_unibo_tuprolog_theory.$_$.b;
|
|
48
48
|
var parseTheoryWithOperators = kotlin_it_unibo_tuprolog_parser_theory.$_$.a;
|
|
49
|
-
var lazy = kotlin_kotlin.$_$.
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var Unknown_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.
|
|
54
|
-
var
|
|
55
|
-
var to = kotlin_kotlin.$_$.
|
|
56
|
-
var mutableMapOf = kotlin_kotlin.$_$.
|
|
49
|
+
var lazy = kotlin_kotlin.$_$.m9;
|
|
50
|
+
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_solve.$_$.h1;
|
|
51
|
+
var Companion_instance_0 = kotlin_it_unibo_tuprolog_theory.$_$.a;
|
|
52
|
+
var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_unify.$_$.a;
|
|
53
|
+
var Unknown_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.a1;
|
|
54
|
+
var Unit_instance = kotlin_kotlin.$_$.r1;
|
|
55
|
+
var to = kotlin_kotlin.$_$.s9;
|
|
56
|
+
var mutableMapOf = kotlin_kotlin.$_$.p3;
|
|
57
57
|
var Specifier_XFX_getInstance = kotlin_it_unibo_tuprolog_core.$_$.a;
|
|
58
58
|
var Operator = kotlin_it_unibo_tuprolog_core.$_$.z;
|
|
59
59
|
var OperatorSet_init_$Create$ = kotlin_it_unibo_tuprolog_core.$_$.c;
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
}
|
|
68
68
|
setMetadataFor(ArgLibrary, 'ArgLibrary', interfaceMeta);
|
|
69
69
|
setMetadataFor(LazyRawPrologContent, 'LazyRawPrologContent', classMeta, VOID, [ArgLibrary]);
|
|
70
|
-
setMetadataFor(Cache, 'Cache', classMeta, VOID, [ArgLibrary]);
|
|
71
|
-
setMetadataFor(Context, 'Context', classMeta, VOID, [ArgLibrary]);
|
|
70
|
+
setMetadataFor(Cache, 'Cache', classMeta, VOID, [ArgLibrary], Cache);
|
|
71
|
+
setMetadataFor(Context, 'Context', classMeta, VOID, [ArgLibrary], Context);
|
|
72
72
|
setMetadataFor(Companion_0, 'Companion', objectMeta);
|
|
73
73
|
setMetadataFor(DynamicLoader, 'DynamicLoader', classMeta, VOID, [ArgLibrary]);
|
|
74
74
|
setMetadataFor(EngineInterfaceBase, 'EngineInterfaceBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
@@ -138,189 +138,169 @@
|
|
|
138
138
|
setMetadataFor(Utils_0, 'Utils', objectMeta, UtilsBase);
|
|
139
139
|
//endregion
|
|
140
140
|
function Arg2pSolver$Companion$of$1($staticLibs, $dynamicLibs) {
|
|
141
|
-
this.
|
|
142
|
-
this.
|
|
143
|
-
this.
|
|
144
|
-
this.
|
|
141
|
+
this.r36_1 = $staticLibs;
|
|
142
|
+
this.s36_1 = $dynamicLibs;
|
|
143
|
+
this.p36_1 = new DynamicLoader(this);
|
|
144
|
+
this.q36_1 = new Context();
|
|
145
145
|
}
|
|
146
146
|
function Companion() {
|
|
147
|
-
Companion_instance = this;
|
|
148
147
|
}
|
|
149
|
-
protoOf(Companion).
|
|
148
|
+
protoOf(Companion).t36 = function (staticLibs, dynamicLibs) {
|
|
150
149
|
return new Arg2pSolver$Companion$of$1(staticLibs, dynamicLibs);
|
|
151
150
|
};
|
|
152
|
-
protoOf(Companion).
|
|
153
|
-
return this.
|
|
151
|
+
protoOf(Companion).u36 = function (staticLibs, dynamicLibs) {
|
|
152
|
+
return this.t36(plus(listOf([EngineInterface_getInstance(), new Cache()]), staticLibs), plus(listOf([Utils_getInstance_0(), Debug_getInstance_0(), RuleParser_getInstance(), MetaInterpreter_instance, ModuleCalls_instance, ArgumentationGraphBuilder_getInstance(), AttackRestrictionHandler_getInstance(), BpMetaGraphHandler_getInstance(), DefeasiblePreferencesHandler_getInstance(), GenericDefeasiblePreferencesHandler_getInstance(), StrictPreferencesHandler_getInstance(), BpLabeller_getInstance(), CompleteLabeller_getInstance(), GroundedLabeller_getInstance(), StatementLabeller_getInstance(), AbstractMode_getInstance(), StructuredMode_getInstance(), SuperiorityRelation_getInstance_0(), BpPartialLabeller_getInstance(), BpCompleteLabeller_getInstance(), PassThroughStatementLabeller_getInstance(), BinaryStatementLabeller_getInstance(), GroundedLabellerOptimized_getInstance()]), dynamicLibs));
|
|
154
153
|
};
|
|
155
|
-
var
|
|
156
|
-
function
|
|
157
|
-
|
|
158
|
-
new Companion();
|
|
159
|
-
return Companion_instance;
|
|
154
|
+
var Companion_instance_1;
|
|
155
|
+
function Companion_getInstance_2() {
|
|
156
|
+
return Companion_instance_1;
|
|
160
157
|
}
|
|
161
158
|
function Arg2pSolverFactory() {
|
|
162
|
-
Arg2pSolverFactory_instance = this;
|
|
163
159
|
}
|
|
164
160
|
protoOf(Arg2pSolverFactory).of = function (staticLibs, dynamicLibs) {
|
|
165
|
-
return
|
|
161
|
+
return Companion_instance_1.t36(staticLibs, dynamicLibs);
|
|
166
162
|
};
|
|
167
|
-
protoOf(Arg2pSolverFactory).
|
|
168
|
-
return
|
|
163
|
+
protoOf(Arg2pSolverFactory).u36 = function (staticLibs, dynamicLibs) {
|
|
164
|
+
return Companion_instance_1.u36(staticLibs, dynamicLibs);
|
|
169
165
|
};
|
|
170
166
|
protoOf(Arg2pSolverFactory).default = function (staticLibs, dynamicLibs, $super) {
|
|
171
167
|
staticLibs = staticLibs === VOID ? emptyList() : staticLibs;
|
|
172
168
|
dynamicLibs = dynamicLibs === VOID ? emptyList() : dynamicLibs;
|
|
173
|
-
return this.
|
|
169
|
+
return this.u36(staticLibs, dynamicLibs);
|
|
174
170
|
};
|
|
175
171
|
var Arg2pSolverFactory_instance;
|
|
176
172
|
function Arg2pSolverFactory_getInstance() {
|
|
177
|
-
if (Arg2pSolverFactory_instance == null)
|
|
178
|
-
new Arg2pSolverFactory();
|
|
179
173
|
return Arg2pSolverFactory_instance;
|
|
180
174
|
}
|
|
181
175
|
function ArgLibrary() {
|
|
182
176
|
}
|
|
183
177
|
function LazyRawPrologContent$prologTheory$delegate$lambda(this$0) {
|
|
184
178
|
return function () {
|
|
185
|
-
return parseTheoryWithOperators(
|
|
179
|
+
return parseTheoryWithOperators(Companion_instance, this$0.x36(), this$0.v36());
|
|
186
180
|
};
|
|
187
181
|
}
|
|
188
182
|
function LazyRawPrologContent() {
|
|
189
183
|
var tmp = this;
|
|
190
|
-
tmp.
|
|
184
|
+
tmp.w36_1 = lazy(LazyRawPrologContent$prologTheory$delegate$lambda(this));
|
|
191
185
|
}
|
|
192
186
|
function Cache() {
|
|
193
187
|
var tmp = this;
|
|
194
|
-
var tmp$ret$0;
|
|
195
188
|
// Inline function 'kotlin.also' call
|
|
196
|
-
var
|
|
189
|
+
var this_0 = Companion_getInstance_0().m1v().rawMutableSolverOf(VOID, VOID, VOID, Companion_instance.emptyWithDefaultUnificator(), Companion_instance_0.empty(Companion_getInstance_1().x1i()));
|
|
197
190
|
// Inline function 'kotlin.contracts.contract' call
|
|
198
191
|
// Inline function 'it.unibo.tuprolog.argumentation.core.libs.basic.Cache.solver.<anonymous>' call
|
|
199
|
-
|
|
200
|
-
tmp
|
|
201
|
-
|
|
202
|
-
this.f35_1 = 'prolog.argumentation.cache';
|
|
192
|
+
this_0.setFlag(Unknown_getInstance().h27_1, Unknown_getInstance().g27_1);
|
|
193
|
+
tmp.y36_1 = this_0;
|
|
194
|
+
this.z36_1 = 'prolog.argumentation.cache';
|
|
203
195
|
}
|
|
204
196
|
function Context() {
|
|
205
|
-
this.
|
|
206
|
-
this.
|
|
197
|
+
this.a37_1 = 1;
|
|
198
|
+
this.b37_1 = 0;
|
|
207
199
|
var tmp = this;
|
|
208
|
-
var tmp$ret$0;
|
|
209
200
|
// Inline function 'kotlin.also' call
|
|
210
|
-
var
|
|
201
|
+
var this_0 = Companion_getInstance_0().m1v().mutableSolverWithDefaultBuiltinsAnd(VOID, VOID, VOID, Companion_instance.emptyWithDefaultUnificator(), Companion_instance_0.empty(Companion_getInstance_1().x1i()));
|
|
211
202
|
// Inline function 'kotlin.contracts.contract' call
|
|
212
203
|
// Inline function 'it.unibo.tuprolog.argumentation.core.libs.basic.Context.dynamicSolver.<anonymous>' call
|
|
213
|
-
|
|
214
|
-
tmp
|
|
215
|
-
|
|
216
|
-
this.j35_1 = 'prolog.argumentation.context';
|
|
204
|
+
this_0.setFlag(Unknown_getInstance().h27_1, Unknown_getInstance().g27_1);
|
|
205
|
+
tmp.c37_1 = mutableMapOf([to(0, this_0)]);
|
|
206
|
+
this.d37_1 = 'prolog.argumentation.context';
|
|
217
207
|
}
|
|
218
208
|
function Companion_0() {
|
|
219
|
-
Companion_instance_0 = this;
|
|
220
209
|
}
|
|
221
|
-
protoOf(Companion_0).
|
|
210
|
+
protoOf(Companion_0).e37 = function () {
|
|
222
211
|
return OperatorSet_init_$Create$([new Operator('::', Specifier_XFX_getInstance(), 700), new Operator(':::', Specifier_XFX_getInstance(), 700)]);
|
|
223
212
|
};
|
|
224
|
-
var
|
|
225
|
-
function
|
|
226
|
-
|
|
227
|
-
new Companion_0();
|
|
228
|
-
return Companion_instance_0;
|
|
213
|
+
var Companion_instance_2;
|
|
214
|
+
function Companion_getInstance_3() {
|
|
215
|
+
return Companion_instance_2;
|
|
229
216
|
}
|
|
230
217
|
function DynamicLoader(solver) {
|
|
231
|
-
|
|
232
|
-
this.
|
|
233
|
-
this.
|
|
234
|
-
this.n35_1 = Companion_getInstance_5().k35();
|
|
218
|
+
this.f37_1 = solver;
|
|
219
|
+
this.g37_1 = 'prolog.argumentation.loader';
|
|
220
|
+
this.h37_1 = Companion_instance_2.e37();
|
|
235
221
|
}
|
|
236
222
|
function EngineInterfaceBase() {
|
|
237
223
|
LazyRawPrologContent.call(this);
|
|
238
|
-
this.
|
|
239
|
-
this.
|
|
224
|
+
this.j37_1 = 'prolog.argumentation.interface';
|
|
225
|
+
this.k37_1 = Companion_instance_3.e37().plusOperatorSet(Companion_instance_2.e37()).plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
240
226
|
}
|
|
241
|
-
protoOf(EngineInterfaceBase).
|
|
242
|
-
return this.
|
|
227
|
+
protoOf(EngineInterfaceBase).v36 = function () {
|
|
228
|
+
return this.k37_1;
|
|
243
229
|
};
|
|
244
230
|
function MetaInterpreter() {
|
|
245
|
-
|
|
246
|
-
this.r35_1 = 'prolog.argumentation.meta.crossjustice';
|
|
231
|
+
this.l37_1 = 'prolog.argumentation.meta.crossjustice';
|
|
247
232
|
}
|
|
248
233
|
var MetaInterpreter_instance;
|
|
249
234
|
function MetaInterpreter_getInstance() {
|
|
250
|
-
if (MetaInterpreter_instance == null)
|
|
251
|
-
new MetaInterpreter();
|
|
252
235
|
return MetaInterpreter_instance;
|
|
253
236
|
}
|
|
254
237
|
function ModuleCalls() {
|
|
255
|
-
|
|
256
|
-
this.s35_1 = 'prolog.argumentation.modularity';
|
|
238
|
+
this.m37_1 = 'prolog.argumentation.modularity';
|
|
257
239
|
}
|
|
258
240
|
var ModuleCalls_instance;
|
|
259
241
|
function ModuleCalls_getInstance() {
|
|
260
|
-
if (ModuleCalls_instance == null)
|
|
261
|
-
new ModuleCalls();
|
|
262
242
|
return ModuleCalls_instance;
|
|
263
243
|
}
|
|
264
244
|
function AbstractModeBase() {
|
|
265
245
|
LazyRawPrologContent.call(this);
|
|
266
|
-
this.
|
|
267
|
-
this.
|
|
246
|
+
this.o37_1 = 'prolog.argumentation.abstract';
|
|
247
|
+
this.p37_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
268
248
|
}
|
|
269
|
-
protoOf(AbstractModeBase).
|
|
270
|
-
return this.
|
|
249
|
+
protoOf(AbstractModeBase).v36 = function () {
|
|
250
|
+
return this.p37_1;
|
|
271
251
|
};
|
|
272
252
|
function ArgumentationGraphBuilderBase() {
|
|
273
253
|
LazyRawPrologContent.call(this);
|
|
274
|
-
this.
|
|
275
|
-
this.
|
|
254
|
+
this.r37_1 = 'prolog.argumentation.graph';
|
|
255
|
+
this.s37_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
276
256
|
}
|
|
277
|
-
protoOf(ArgumentationGraphBuilderBase).
|
|
278
|
-
return this.
|
|
257
|
+
protoOf(ArgumentationGraphBuilderBase).v36 = function () {
|
|
258
|
+
return this.s37_1;
|
|
279
259
|
};
|
|
280
260
|
function AttackRestrictionHandlerBase() {
|
|
281
261
|
LazyRawPrologContent.call(this);
|
|
282
|
-
this.
|
|
283
|
-
this.
|
|
262
|
+
this.u37_1 = 'prolog.argumentation.graph.rebutrestriction';
|
|
263
|
+
this.v37_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
284
264
|
}
|
|
285
|
-
protoOf(AttackRestrictionHandlerBase).
|
|
286
|
-
return this.
|
|
265
|
+
protoOf(AttackRestrictionHandlerBase).v36 = function () {
|
|
266
|
+
return this.v37_1;
|
|
287
267
|
};
|
|
288
268
|
function BpMetaGraphHandlerBase() {
|
|
289
269
|
LazyRawPrologContent.call(this);
|
|
290
|
-
this.
|
|
291
|
-
this.
|
|
270
|
+
this.x37_1 = 'prolog.argumentation.graph.meta.bp';
|
|
271
|
+
this.y37_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
292
272
|
}
|
|
293
|
-
protoOf(BpMetaGraphHandlerBase).
|
|
294
|
-
return this.
|
|
273
|
+
protoOf(BpMetaGraphHandlerBase).v36 = function () {
|
|
274
|
+
return this.y37_1;
|
|
295
275
|
};
|
|
296
276
|
function DefeasiblePreferencesHandlerBase() {
|
|
297
277
|
LazyRawPrologContent.call(this);
|
|
298
|
-
this.
|
|
299
|
-
this.
|
|
278
|
+
this.a38_1 = 'prolog.argumentation.graph.preferences.defeasible';
|
|
279
|
+
this.b38_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
300
280
|
}
|
|
301
|
-
protoOf(DefeasiblePreferencesHandlerBase).
|
|
302
|
-
return this.
|
|
281
|
+
protoOf(DefeasiblePreferencesHandlerBase).v36 = function () {
|
|
282
|
+
return this.b38_1;
|
|
303
283
|
};
|
|
304
284
|
function GenericDefeasiblePreferencesHandlerBase() {
|
|
305
285
|
LazyRawPrologContent.call(this);
|
|
306
|
-
this.
|
|
307
|
-
this.
|
|
286
|
+
this.d38_1 = 'prolog.argumentation.graph.preferences.defeasible.generic';
|
|
287
|
+
this.e38_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
308
288
|
}
|
|
309
|
-
protoOf(GenericDefeasiblePreferencesHandlerBase).
|
|
310
|
-
return this.
|
|
289
|
+
protoOf(GenericDefeasiblePreferencesHandlerBase).v36 = function () {
|
|
290
|
+
return this.e38_1;
|
|
311
291
|
};
|
|
312
292
|
function StrictPreferencesHandlerBase() {
|
|
313
293
|
LazyRawPrologContent.call(this);
|
|
314
|
-
this.
|
|
315
|
-
this.
|
|
294
|
+
this.g38_1 = 'prolog.argumentation.graph.preferences.strict';
|
|
295
|
+
this.h38_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
316
296
|
}
|
|
317
|
-
protoOf(StrictPreferencesHandlerBase).
|
|
318
|
-
return this.
|
|
297
|
+
protoOf(StrictPreferencesHandlerBase).v36 = function () {
|
|
298
|
+
return this.h38_1;
|
|
319
299
|
};
|
|
320
300
|
function BinaryStatementLabeller() {
|
|
321
301
|
BinaryStatementLabeller_instance = this;
|
|
322
|
-
this.
|
|
323
|
-
this.
|
|
302
|
+
this.i38_1 = 'prolog.argumentation.graph.labelling.statement.binary';
|
|
303
|
+
this.j38_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
324
304
|
}
|
|
325
305
|
var BinaryStatementLabeller_instance;
|
|
326
306
|
function BinaryStatementLabeller_getInstance() {
|
|
@@ -330,56 +310,56 @@
|
|
|
330
310
|
}
|
|
331
311
|
function BpCompleteLabellerBase() {
|
|
332
312
|
LazyRawPrologContent.call(this);
|
|
333
|
-
this.
|
|
334
|
-
this.
|
|
313
|
+
this.l38_1 = 'prolog.argumentation.graph.labelling.bpgroundedcomplete';
|
|
314
|
+
this.m38_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
335
315
|
}
|
|
336
|
-
protoOf(BpCompleteLabellerBase).
|
|
337
|
-
return this.
|
|
316
|
+
protoOf(BpCompleteLabellerBase).v36 = function () {
|
|
317
|
+
return this.m38_1;
|
|
338
318
|
};
|
|
339
319
|
function BpLabellerBase() {
|
|
340
320
|
LazyRawPrologContent.call(this);
|
|
341
|
-
this.
|
|
342
|
-
this.
|
|
321
|
+
this.o38_1 = 'prolog.argumentation.graph.labelling.bpgrounded';
|
|
322
|
+
this.p38_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
343
323
|
}
|
|
344
|
-
protoOf(BpLabellerBase).
|
|
345
|
-
return this.
|
|
324
|
+
protoOf(BpLabellerBase).v36 = function () {
|
|
325
|
+
return this.p38_1;
|
|
346
326
|
};
|
|
347
327
|
function BpPartialLabellerBase() {
|
|
348
328
|
LazyRawPrologContent.call(this);
|
|
349
|
-
this.
|
|
350
|
-
this.
|
|
329
|
+
this.r38_1 = 'prolog.argumentation.graph.labelling.bpgroundedpartial';
|
|
330
|
+
this.s38_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
351
331
|
}
|
|
352
|
-
protoOf(BpPartialLabellerBase).
|
|
353
|
-
return this.
|
|
332
|
+
protoOf(BpPartialLabellerBase).v36 = function () {
|
|
333
|
+
return this.s38_1;
|
|
354
334
|
};
|
|
355
335
|
function CompleteLabellerBase() {
|
|
356
336
|
LazyRawPrologContent.call(this);
|
|
357
|
-
this.
|
|
358
|
-
this.
|
|
337
|
+
this.u38_1 = 'prolog.argumentation.graph.labelling.complete';
|
|
338
|
+
this.v38_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
359
339
|
}
|
|
360
|
-
protoOf(CompleteLabellerBase).
|
|
361
|
-
return this.
|
|
340
|
+
protoOf(CompleteLabellerBase).v36 = function () {
|
|
341
|
+
return this.v38_1;
|
|
362
342
|
};
|
|
363
343
|
function GroundedLabellerBase() {
|
|
364
344
|
LazyRawPrologContent.call(this);
|
|
365
|
-
this.
|
|
366
|
-
this.
|
|
345
|
+
this.x38_1 = 'prolog.argumentation.graph.labelling.grounded';
|
|
346
|
+
this.y38_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
367
347
|
}
|
|
368
|
-
protoOf(GroundedLabellerBase).
|
|
369
|
-
return this.
|
|
348
|
+
protoOf(GroundedLabellerBase).v36 = function () {
|
|
349
|
+
return this.y38_1;
|
|
370
350
|
};
|
|
371
351
|
function GroundedLabellerOptimizedBase() {
|
|
372
352
|
LazyRawPrologContent.call(this);
|
|
373
|
-
this.
|
|
374
|
-
this.
|
|
353
|
+
this.a39_1 = 'prolog.argumentation.graph.labelling.grounded.optimized';
|
|
354
|
+
this.b39_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
375
355
|
}
|
|
376
|
-
protoOf(GroundedLabellerOptimizedBase).
|
|
377
|
-
return this.
|
|
356
|
+
protoOf(GroundedLabellerOptimizedBase).v36 = function () {
|
|
357
|
+
return this.b39_1;
|
|
378
358
|
};
|
|
379
359
|
function PassThroughStatementLabeller() {
|
|
380
360
|
PassThroughStatementLabeller_instance = this;
|
|
381
|
-
this.
|
|
382
|
-
this.
|
|
361
|
+
this.c39_1 = 'prolog.argumentation.graph.labelling.statement.pt';
|
|
362
|
+
this.d39_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
383
363
|
}
|
|
384
364
|
var PassThroughStatementLabeller_instance;
|
|
385
365
|
function PassThroughStatementLabeller_getInstance() {
|
|
@@ -389,71 +369,67 @@
|
|
|
389
369
|
}
|
|
390
370
|
function StatementLabellerBase() {
|
|
391
371
|
LazyRawPrologContent.call(this);
|
|
392
|
-
this.
|
|
393
|
-
this.
|
|
372
|
+
this.f39_1 = 'prolog.argumentation.graph.labelling.statement';
|
|
373
|
+
this.g39_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
394
374
|
}
|
|
395
|
-
protoOf(StatementLabellerBase).
|
|
396
|
-
return this.
|
|
375
|
+
protoOf(StatementLabellerBase).v36 = function () {
|
|
376
|
+
return this.g39_1;
|
|
397
377
|
};
|
|
398
378
|
function Companion_1() {
|
|
399
|
-
Companion_instance_1 = this;
|
|
400
379
|
}
|
|
401
|
-
protoOf(Companion_1).
|
|
380
|
+
protoOf(Companion_1).e37 = function () {
|
|
402
381
|
return OperatorSet_init_$Create$([new Operator('=>', Specifier_XFX_getInstance(), 1199), new Operator(':=>', Specifier_XFX_getInstance(), 1199), new Operator(':->', Specifier_XFX_getInstance(), 1199), new Operator(':', Specifier_XFX_getInstance(), 1001), new Operator(':=', Specifier_XFX_getInstance(), 1199)]);
|
|
403
382
|
};
|
|
404
|
-
var
|
|
405
|
-
function
|
|
406
|
-
|
|
407
|
-
new Companion_1();
|
|
408
|
-
return Companion_instance_1;
|
|
383
|
+
var Companion_instance_3;
|
|
384
|
+
function Companion_getInstance_4() {
|
|
385
|
+
return Companion_instance_3;
|
|
409
386
|
}
|
|
410
387
|
function RuleParserBase() {
|
|
411
|
-
Companion_getInstance_6();
|
|
412
388
|
LazyRawPrologContent.call(this);
|
|
413
|
-
this.
|
|
414
|
-
this.
|
|
389
|
+
this.i39_1 = 'prolog.argumentation.parser';
|
|
390
|
+
this.j39_1 = Companion_instance_2.e37().plusOperatorSet(Companion_instance_3.e37()).plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
415
391
|
}
|
|
416
|
-
protoOf(RuleParserBase).
|
|
417
|
-
return this.
|
|
392
|
+
protoOf(RuleParserBase).v36 = function () {
|
|
393
|
+
return this.j39_1;
|
|
418
394
|
};
|
|
419
395
|
function StructuredModeBase() {
|
|
420
396
|
LazyRawPrologContent.call(this);
|
|
421
|
-
this.
|
|
422
|
-
this.
|
|
397
|
+
this.l39_1 = 'prolog.argumentation.structured';
|
|
398
|
+
this.m39_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
423
399
|
}
|
|
424
|
-
protoOf(StructuredModeBase).
|
|
425
|
-
return this.
|
|
400
|
+
protoOf(StructuredModeBase).v36 = function () {
|
|
401
|
+
return this.m39_1;
|
|
426
402
|
};
|
|
427
403
|
function DebugBase() {
|
|
428
404
|
LazyRawPrologContent.call(this);
|
|
429
|
-
this.
|
|
430
|
-
this.
|
|
405
|
+
this.o39_1 = 'prolog.argumentation.debug';
|
|
406
|
+
this.p39_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
431
407
|
}
|
|
432
|
-
protoOf(DebugBase).
|
|
433
|
-
return this.
|
|
408
|
+
protoOf(DebugBase).v36 = function () {
|
|
409
|
+
return this.p39_1;
|
|
434
410
|
};
|
|
435
411
|
function SuperiorityRelationBase() {
|
|
436
412
|
LazyRawPrologContent.call(this);
|
|
437
|
-
this.
|
|
438
|
-
this.
|
|
413
|
+
this.r39_1 = 'prolog.argumentation.superiority';
|
|
414
|
+
this.s39_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
439
415
|
}
|
|
440
|
-
protoOf(SuperiorityRelationBase).
|
|
441
|
-
return this.
|
|
416
|
+
protoOf(SuperiorityRelationBase).v36 = function () {
|
|
417
|
+
return this.s39_1;
|
|
442
418
|
};
|
|
443
419
|
function UtilsBase() {
|
|
444
420
|
LazyRawPrologContent.call(this);
|
|
445
|
-
this.
|
|
446
|
-
this.
|
|
421
|
+
this.u39_1 = 'prolog.argumentation.utils';
|
|
422
|
+
this.v39_1 = Companion_instance_2.e37().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
447
423
|
}
|
|
448
|
-
protoOf(UtilsBase).
|
|
449
|
-
return this.
|
|
424
|
+
protoOf(UtilsBase).v36 = function () {
|
|
425
|
+
return this.v39_1;
|
|
450
426
|
};
|
|
451
427
|
function EngineInterface() {
|
|
452
428
|
EngineInterface_instance = this;
|
|
453
429
|
EngineInterfaceBase.call(this);
|
|
454
430
|
}
|
|
455
|
-
protoOf(EngineInterface).
|
|
456
|
-
return
|
|
431
|
+
protoOf(EngineInterface).x36 = function () {
|
|
432
|
+
return ArgumentationEngineInterface_instance.z39_1;
|
|
457
433
|
};
|
|
458
434
|
var EngineInterface_instance;
|
|
459
435
|
function EngineInterface_getInstance() {
|
|
@@ -465,8 +441,8 @@
|
|
|
465
441
|
AbstractMode_instance = this;
|
|
466
442
|
AbstractModeBase.call(this);
|
|
467
443
|
}
|
|
468
|
-
protoOf(AbstractMode).
|
|
469
|
-
return
|
|
444
|
+
protoOf(AbstractMode).x36 = function () {
|
|
445
|
+
return AbstractMode_instance_0.d3a_1;
|
|
470
446
|
};
|
|
471
447
|
var AbstractMode_instance;
|
|
472
448
|
function AbstractMode_getInstance() {
|
|
@@ -478,8 +454,8 @@
|
|
|
478
454
|
ArgumentationGraphBuilder_instance = this;
|
|
479
455
|
ArgumentationGraphBuilderBase.call(this);
|
|
480
456
|
}
|
|
481
|
-
protoOf(ArgumentationGraphBuilder).
|
|
482
|
-
return
|
|
457
|
+
protoOf(ArgumentationGraphBuilder).x36 = function () {
|
|
458
|
+
return ArgumentationGraph_instance.h3a_1;
|
|
483
459
|
};
|
|
484
460
|
var ArgumentationGraphBuilder_instance;
|
|
485
461
|
function ArgumentationGraphBuilder_getInstance() {
|
|
@@ -491,8 +467,8 @@
|
|
|
491
467
|
AttackRestrictionHandler_instance = this;
|
|
492
468
|
AttackRestrictionHandlerBase.call(this);
|
|
493
469
|
}
|
|
494
|
-
protoOf(AttackRestrictionHandler).
|
|
495
|
-
return
|
|
470
|
+
protoOf(AttackRestrictionHandler).x36 = function () {
|
|
471
|
+
return AttackRestriction_instance.l3a_1;
|
|
496
472
|
};
|
|
497
473
|
var AttackRestrictionHandler_instance;
|
|
498
474
|
function AttackRestrictionHandler_getInstance() {
|
|
@@ -504,8 +480,8 @@
|
|
|
504
480
|
BpMetaGraphHandler_instance = this;
|
|
505
481
|
BpMetaGraphHandlerBase.call(this);
|
|
506
482
|
}
|
|
507
|
-
protoOf(BpMetaGraphHandler).
|
|
508
|
-
return
|
|
483
|
+
protoOf(BpMetaGraphHandler).x36 = function () {
|
|
484
|
+
return Bp_instance.p3a_1;
|
|
509
485
|
};
|
|
510
486
|
var BpMetaGraphHandler_instance;
|
|
511
487
|
function BpMetaGraphHandler_getInstance() {
|
|
@@ -517,8 +493,8 @@
|
|
|
517
493
|
DefeasiblePreferencesHandler_instance = this;
|
|
518
494
|
DefeasiblePreferencesHandlerBase.call(this);
|
|
519
495
|
}
|
|
520
|
-
protoOf(DefeasiblePreferencesHandler).
|
|
521
|
-
return
|
|
496
|
+
protoOf(DefeasiblePreferencesHandler).x36 = function () {
|
|
497
|
+
return DefPreferences_instance.t3a_1;
|
|
522
498
|
};
|
|
523
499
|
var DefeasiblePreferencesHandler_instance;
|
|
524
500
|
function DefeasiblePreferencesHandler_getInstance() {
|
|
@@ -530,8 +506,8 @@
|
|
|
530
506
|
GenericDefeasiblePreferencesHandler_instance = this;
|
|
531
507
|
GenericDefeasiblePreferencesHandlerBase.call(this);
|
|
532
508
|
}
|
|
533
|
-
protoOf(GenericDefeasiblePreferencesHandler).
|
|
534
|
-
return
|
|
509
|
+
protoOf(GenericDefeasiblePreferencesHandler).x36 = function () {
|
|
510
|
+
return GenericDefPreferences_instance.x3a_1;
|
|
535
511
|
};
|
|
536
512
|
var GenericDefeasiblePreferencesHandler_instance;
|
|
537
513
|
function GenericDefeasiblePreferencesHandler_getInstance() {
|
|
@@ -543,8 +519,8 @@
|
|
|
543
519
|
StrictPreferencesHandler_instance = this;
|
|
544
520
|
StrictPreferencesHandlerBase.call(this);
|
|
545
521
|
}
|
|
546
|
-
protoOf(StrictPreferencesHandler).
|
|
547
|
-
return
|
|
522
|
+
protoOf(StrictPreferencesHandler).x36 = function () {
|
|
523
|
+
return Preferences_instance.b3b_1;
|
|
548
524
|
};
|
|
549
525
|
var StrictPreferencesHandler_instance;
|
|
550
526
|
function StrictPreferencesHandler_getInstance() {
|
|
@@ -556,8 +532,8 @@
|
|
|
556
532
|
BpCompleteLabeller_instance = this;
|
|
557
533
|
BpCompleteLabellerBase.call(this);
|
|
558
534
|
}
|
|
559
|
-
protoOf(BpCompleteLabeller).
|
|
560
|
-
return
|
|
535
|
+
protoOf(BpCompleteLabeller).x36 = function () {
|
|
536
|
+
return BpGroundedComplete_instance.f3b_1;
|
|
561
537
|
};
|
|
562
538
|
var BpCompleteLabeller_instance;
|
|
563
539
|
function BpCompleteLabeller_getInstance() {
|
|
@@ -569,8 +545,8 @@
|
|
|
569
545
|
BpLabeller_instance = this;
|
|
570
546
|
BpLabellerBase.call(this);
|
|
571
547
|
}
|
|
572
|
-
protoOf(BpLabeller).
|
|
573
|
-
return
|
|
548
|
+
protoOf(BpLabeller).x36 = function () {
|
|
549
|
+
return BpGrounded_instance.j3b_1;
|
|
574
550
|
};
|
|
575
551
|
var BpLabeller_instance;
|
|
576
552
|
function BpLabeller_getInstance() {
|
|
@@ -582,8 +558,8 @@
|
|
|
582
558
|
BpPartialLabeller_instance = this;
|
|
583
559
|
BpPartialLabellerBase.call(this);
|
|
584
560
|
}
|
|
585
|
-
protoOf(BpPartialLabeller).
|
|
586
|
-
return
|
|
561
|
+
protoOf(BpPartialLabeller).x36 = function () {
|
|
562
|
+
return BpGroundedPartial_instance.n3b_1;
|
|
587
563
|
};
|
|
588
564
|
var BpPartialLabeller_instance;
|
|
589
565
|
function BpPartialLabeller_getInstance() {
|
|
@@ -595,8 +571,8 @@
|
|
|
595
571
|
CompleteLabeller_instance = this;
|
|
596
572
|
CompleteLabellerBase.call(this);
|
|
597
573
|
}
|
|
598
|
-
protoOf(CompleteLabeller).
|
|
599
|
-
return
|
|
574
|
+
protoOf(CompleteLabeller).x36 = function () {
|
|
575
|
+
return Complete_instance.r3b_1;
|
|
600
576
|
};
|
|
601
577
|
var CompleteLabeller_instance;
|
|
602
578
|
function CompleteLabeller_getInstance() {
|
|
@@ -608,8 +584,8 @@
|
|
|
608
584
|
GroundedLabeller_instance = this;
|
|
609
585
|
GroundedLabellerBase.call(this);
|
|
610
586
|
}
|
|
611
|
-
protoOf(GroundedLabeller).
|
|
612
|
-
return
|
|
587
|
+
protoOf(GroundedLabeller).x36 = function () {
|
|
588
|
+
return Grounded_instance.v3b_1;
|
|
613
589
|
};
|
|
614
590
|
var GroundedLabeller_instance;
|
|
615
591
|
function GroundedLabeller_getInstance() {
|
|
@@ -621,8 +597,8 @@
|
|
|
621
597
|
GroundedLabellerOptimized_instance = this;
|
|
622
598
|
GroundedLabellerOptimizedBase.call(this);
|
|
623
599
|
}
|
|
624
|
-
protoOf(GroundedLabellerOptimized).
|
|
625
|
-
return
|
|
600
|
+
protoOf(GroundedLabellerOptimized).x36 = function () {
|
|
601
|
+
return GroundedOptimized_instance.z3b_1;
|
|
626
602
|
};
|
|
627
603
|
var GroundedLabellerOptimized_instance;
|
|
628
604
|
function GroundedLabellerOptimized_getInstance() {
|
|
@@ -634,8 +610,8 @@
|
|
|
634
610
|
StatementLabeller_instance = this;
|
|
635
611
|
StatementLabellerBase.call(this);
|
|
636
612
|
}
|
|
637
|
-
protoOf(StatementLabeller).
|
|
638
|
-
return
|
|
613
|
+
protoOf(StatementLabeller).x36 = function () {
|
|
614
|
+
return StatementLabelling_instance.d3c_1;
|
|
639
615
|
};
|
|
640
616
|
var StatementLabeller_instance;
|
|
641
617
|
function StatementLabeller_getInstance() {
|
|
@@ -647,8 +623,8 @@
|
|
|
647
623
|
RuleParser_instance = this;
|
|
648
624
|
RuleParserBase.call(this);
|
|
649
625
|
}
|
|
650
|
-
protoOf(RuleParser).
|
|
651
|
-
return
|
|
626
|
+
protoOf(RuleParser).x36 = function () {
|
|
627
|
+
return RuleTranslator_instance.h3c_1;
|
|
652
628
|
};
|
|
653
629
|
var RuleParser_instance;
|
|
654
630
|
function RuleParser_getInstance() {
|
|
@@ -657,211 +633,151 @@
|
|
|
657
633
|
return RuleParser_instance;
|
|
658
634
|
}
|
|
659
635
|
function AbstractMode_0() {
|
|
660
|
-
|
|
661
|
-
this.j38_1 = 'computeGlobalAcceptance :-\n buildGraph,\n modifyGraph,\n buildArgumentLabelling,\n buildStatementLabelling.\ncomputeGlobalAcceptance([Arguments, Attacks, Supports], [ArgsIn, ArgsOut, ArgsUnd], [StatIn, StatOut, StatUnd]) :-\n computeGlobalAcceptance,\n utils::recoverGraph(Arguments, Attacks, Supports),\n utils::recoverArgumentLabelling(ArgsIn, ArgsOut, ArgsUnd),\n utils::recoverStatementLabelling(StatIn, StatOut, StatUnd).\nbuildGraph :-\n graphBuildMode(X),\n X:::buildArgumentationGraph.\nmodifyGraph :-\n findall(X, graphExtension(X), Ext),\n modifyGraph(Ext).\nmodifyGraph([]).\nmodifyGraph([X|Ext]) :-\n modifyGraph(Ext),\n X:::modifyArgumentationGraph.\nbuildArgumentLabelling :-\n argumentLabellingMode(X),\n X:::argumentLabelling.\nbuildStatementLabelling :-\n statementLabellingMode(X),\n X:::statementLabelling.';
|
|
636
|
+
this.d3a_1 = 'computeGlobalAcceptance :-\n buildGraph,\n modifyGraph,\n buildArgumentLabelling,\n buildStatementLabelling.\ncomputeGlobalAcceptance([Arguments, Attacks, Supports], [ArgsIn, ArgsOut, ArgsUnd], [StatIn, StatOut, StatUnd]) :-\n computeGlobalAcceptance,\n utils::recoverGraph(Arguments, Attacks, Supports),\n utils::recoverArgumentLabelling(ArgsIn, ArgsOut, ArgsUnd),\n utils::recoverStatementLabelling(StatIn, StatOut, StatUnd).\nbuildGraph :-\n graphBuildMode(X),\n X:::buildArgumentationGraph.\nmodifyGraph :-\n findall(X, graphExtension(X), Ext),\n modifyGraph(Ext).\nmodifyGraph([]).\nmodifyGraph([X|Ext]) :-\n modifyGraph(Ext),\n X:::modifyArgumentationGraph.\nbuildArgumentLabelling :-\n argumentLabellingMode(X),\n X:::argumentLabelling.\nbuildStatementLabelling :-\n statementLabellingMode(X),\n X:::statementLabelling.';
|
|
662
637
|
}
|
|
663
638
|
var AbstractMode_instance_0;
|
|
664
639
|
function AbstractMode_getInstance_0() {
|
|
665
|
-
if (AbstractMode_instance_0 == null)
|
|
666
|
-
new AbstractMode_0();
|
|
667
640
|
return AbstractMode_instance_0;
|
|
668
641
|
}
|
|
669
642
|
function ArgumentationEngineInterface() {
|
|
670
|
-
|
|
671
|
-
this.f38_1 = 'argTuProlog.\nbuildLabelSets([StatIn, StatOut, StatUnd], [ArgsIn, ArgsOut, ArgsUnd]) :-\n context_reset,\n parser:::convertAllRules(_),\n abstract::computeGlobalAcceptance(_, [ArgsIn, ArgsOut, ArgsUnd], [StatIn, StatOut, StatUnd]).\nbuildLabelSets(StatIn, StatOut, StatUnd) :-\n buildLabelSets([StatIn, StatOut, StatUnd], _).\nbuildLabelSets :-\n context_reset,\n parser:::convertAllRules(ArgRules),\n abstract::computeGlobalAcceptance([Arguments, Attacks, Supports], [ArgsIn, ArgsOut, ArgsUnd], [StatIn, StatOut, StatUnd]),\n debug::printArgumentationGraph(Arguments, Attacks, Supports),\n debug::printArgumentLabelling([ArgsIn, ArgsOut, ArgsUnd]),\n debug::printStatementLabelling([StatIn, StatOut, StatUnd]).\nanswerQuery(Goal, Yes, No, Und) :-\n context_reset,\n parser:::convertAllRules(_),\n structured:::computeStatementAcceptance(Goal, Yes, No, Und).\nanswerQuery(Goal, Res) :-\n context_reset,\n parser:::convertAllRules(_),\n structured:::query(Goal, Res).\nbuildLabelSetsSilent :-\n context_reset,\n parser:::convertAllRules(ArgRules),\n abstract::computeGlobalAcceptance.';
|
|
643
|
+
this.z39_1 = 'argTuProlog.\nbuildLabelSets([StatIn, StatOut, StatUnd], [ArgsIn, ArgsOut, ArgsUnd]) :-\n context_reset,\n parser:::convertAllRules(_),\n abstract::computeGlobalAcceptance(_, [ArgsIn, ArgsOut, ArgsUnd], [StatIn, StatOut, StatUnd]).\nbuildLabelSets(StatIn, StatOut, StatUnd) :-\n buildLabelSets([StatIn, StatOut, StatUnd], _).\nbuildLabelSets :-\n context_reset,\n parser:::convertAllRules(ArgRules),\n abstract::computeGlobalAcceptance([Arguments, Attacks, Supports], [ArgsIn, ArgsOut, ArgsUnd], [StatIn, StatOut, StatUnd]),\n debug::printArgumentationGraph(Arguments, Attacks, Supports),\n debug::printArgumentLabelling([ArgsIn, ArgsOut, ArgsUnd]),\n debug::printStatementLabelling([StatIn, StatOut, StatUnd]).\nanswerQuery(Goal, Yes, No, Und) :-\n context_reset,\n parser:::convertAllRules(_),\n structured:::computeStatementAcceptance(Goal, Yes, No, Und).\nanswerQuery(Goal, Res) :-\n context_reset,\n parser:::convertAllRules(_),\n structured:::query(Goal, Res).\nbuildLabelSetsSilent :-\n context_reset,\n parser:::convertAllRules(ArgRules),\n abstract::computeGlobalAcceptance.';
|
|
672
644
|
}
|
|
673
645
|
var ArgumentationEngineInterface_instance;
|
|
674
646
|
function ArgumentationEngineInterface_getInstance() {
|
|
675
|
-
if (ArgumentationEngineInterface_instance == null)
|
|
676
|
-
new ArgumentationEngineInterface();
|
|
677
647
|
return ArgumentationEngineInterface_instance;
|
|
678
648
|
}
|
|
679
649
|
function ArgumentationGraph() {
|
|
680
|
-
|
|
681
|
-
this.n38_1 = 'buildArgumentationGraph :-\n buildArguments,\n buildAttacks.\nbuildArguments :-\n\tbuildArgumentsFromPremises,\n\tbuildArgumentsFromEmptyRules,\n\tfindall([RuleID, RuleBody, RuleHead], (\n\t parser::classic_rule(RuleID, RuleBody, RuleHead),\n\t \\+ emptyRule([RuleID, RuleBody, RuleHead])\n ), Rules),\n findall(X, context_check(newConc(a, [X])), N),\n\tbuildArgumentsFromRules(N, b, Rules, Rules, n).\nbuildArgumentsFromPremises :-\n findall(\n _,\n (\n parser::classic_rule(PremiseID, Premise),\n checkStrict(PremiseID, DefPrem),\n ground(Premise),\n context_assert(argument([[PremiseID], none, Premise, [], [[], [], DefPrem]])),\n context_assert(conc(Premise) :- argument([[PremiseID], none, Premise, [], [[], [], DefPrem]])),\n context_assert(newConc(a, Premise)),\n utils::hash(argument([[PremiseID], none, Premise, [], [[], [], DefPrem]]), Id),\n context_assert(arg(Id) :- argument([[PremiseID], none, Premise, [], [[], [], DefPrem]]))\n ),\n _\n ).\nbuildArgumentsFromEmptyRules :-\n findall(\n _,\n (\n emptyRule([RuleID, RulePrem, RuleHead]),\n checkStrict(RuleID, DefRule),\n ground(RuleHead),\n context_assert(argument([[RuleID], RuleID, RuleHead, RulePrem, [DefRule, DefRule, []]])),\n context_assert(conc(RuleHead) :- argument([[RuleID], RuleID, RuleHead, RulePrem, [DefRule, DefRule, []]])),\n context_assert(newConc(a, RuleHead)),\n utils::hash(argument([[RuleID], RuleID, RuleHead, RulePrem, [DefRule, DefRule, []]]), Id),\n context_assert(arg(Id) :- argument([[RuleID], RuleID, RuleHead, RulePrem, [DefRule, DefRule, []]]))\n ),\n _\n ).\nemptyRule([RuleID, Body, RuleHead]) :-\n parser::classic_rule(RuleID, Body, RuleHead),\n \\+ (member(X, Body), X \\= ~(_), X \\= prolog(_)),\n checkPrologClauses(Body).\ncheckPrologClauses([]) :- !.\ncheckPrologClauses([~(_)|T]) :- checkPrologClauses(T), !.\ncheckPrologClauses([prolog(Check)|T]) :-\n (callable(Check) -> call(Check); Check),\n checkPrologClauses(T).\nclean(Tn, Rules) :-\n invert(Tn, Tx),\n context_retract(newConc(Tx, _)),\n findall(X, context_check(newConc(Tn, [X])), N),\n buildArgumentsFromRules(N, Tx, Rules, Rules, n).\ninvert(a, b).\ninvert(b, a).\nbuildArgumentsFromRules(_, _, Rules, [], n) :- !.\nbuildArgumentsFromRules(_, Tn, Rules, [], y) :- !, clean(Tn, Rules).\nbuildArgumentsFromRules(N, Tn, Rules, [[Id, Body, Conc]|T], _) :-\n utils::contains_any(Body, N),\n findall(true, buildArgumentsFromRule(Tn, [Id, Body, Conc]), R),\n R \\== [],\n buildArgumentsFromRules(N, Tn, Rules, T, y), !.\nbuildArgumentsFromRules(N, Tn, Rules, [_|T], X) :-\n buildArgumentsFromRules(N, Tn, Rules, T, X).\nbuildArgumentsFromRule(Tn, [RuleID, RuleBody, RuleHead]) :-\n\truleBodyIsSupported(RuleID, RuleHead, RuleBody, RuleBody, [[], [], [], []], Argument),\n context_assert(newConc(Tn, RuleHead)).\ncheckStrict(Id, []) :- parser::check_strict(Id), !.\ncheckStrict(Id, [Id]).\ndefRules(Id, Def, Def) :- parser::check_strict(Id), !.\ndefRules(Id, Def, [Id|Def]).\nlastDefRules(Id, LDef, LDef) :- parser::check_strict(Id), !.\nlastDefRules(Id, LDef, [Id]) :- Id \\== none, \\+ parser::check_strict(Id).\nargumentInfo(RuleId, LDef, Def, Prem, [FLDef, FDef, FPrem]) :-\n utils::sortDistinct(Prem, FPrem),\n defRules(RuleId, Def, NDef),\n utils::sortDistinct(NDef, FDef),\n lastDefRules(RuleId, LDef, NLDef),\n utils::sortDistinct(NLDef, FLDef).\nruleBodyIsSupported(RuleID, RuleHead, RuleBody, [], [TAll, TLDef, TDef, TPrem], Argument) :-\n ground(RuleHead),\n \\+ context_check(clause(conc(RuleHead), argument([_, RuleID, RuleHead, RuleBody, _]))),\n utils::appendLists(TAll, All),\n \\+ utils::contains(RuleID, All),\n utils::appendLists(TLDef, LDef),\n utils::appendLists(TDef, Def),\n utils::appendLists(TPrem, Prem),\n argumentInfo(RuleID, LDef, Def, Prem, Info),\n utils::sort([RuleID|All], Rules),\n Argument = [Rules, RuleID, RuleHead, RuleBody, Info],\n context_assert(conc(RuleHead) :- argument(Argument)),\n context_assert(argument(Argument)),\n utils::hash(argument(Argument), Id),\n context_assert(arg(Id) :- argument(Argument)).\nruleBodyIsSupported(RuleID, RuleHead, RuleBody, [~(_)|Others], Info, Argument) :-\n\truleBodyIsSupported(RuleID, RuleHead, RuleBody, Others, Info, Argument).\nruleBodyIsSupported(RuleID, RuleHead, RuleBody, [prolog(Check)|Others], Info, Argument) :-\n\t(callable(Check) -> call(Check); Check),\n\truleBodyIsSupported(RuleID, RuleHead, RuleBody, Others, Info, Argument).\nruleBodyIsSupported(RuleId, RuleHead, RuleBody, [Statement|Others], [All, LDef, Def, Prem], Argument) :-\n context_check(clause(conc([Statement]), argument([ArgumentID, RuleID, [Statement], Body, [NLDef, NDef, NPrem]]))),\n\truleBodyIsSupported(RuleId, RuleHead, RuleBody, Others, [[ArgumentID|All], [NLDef|LDef], [NDef|Def], [NPrem|Prem]], Argument),\n\tcontext_assert(support([ArgumentID, RuleID, [Statement], Body, [NLDef, NDef, NPrem]], Argument)).\nfindPossibleAttackers([_, _, Head, _, _], Conf) :-\n conflict(Conf, Head, Guard).\nfindPossibleAttackers([_, _, Head, _, _], Conf) :-\n conflict(Conf, Head).\nfindPossibleAttackers([_, _, _, Prem, _], [Conf]) :-\n member(~(Conf), Prem).\nfindPossibleAttackers([_, RuleID, _, _, _], [undercut(RuleID)]).\nbuildAttacks :-\n\tbuildDirectAttacks,\n\tbuildTransitiveAttacks.\nbuildDirectAttacks :-\n findall(_, buildDirectAttack, _).\nbuildDirectAttack :-\n context_check(argument(A)),\n findPossibleAttackers(A, BB),\n\tcontext_check(clause(conc(BB), argument(B))),\n\tA \\== B,\n attacks(T, B, A),\n\t\\+ context_check(attack(T, B, A, A)),\n\tcontext_assert(attack(T, B, A, A)),\n\tutils::hash(argument(A), IdA),\n\tutils::hash(argument(B), IdB),\n\tcontext_assert(att(IdB, IdA) :- attack(T, B, A, A)),\n\tfail.\nbuildDirectAttack.\nbuildTransitiveAttacks :-\n\tcontext_check(attack(T, A, B, D)),\n\tcontext_check(support(B, C)),\n\t\\+ context_check(attack(T, A, C, D)), !,\n\tcontext_assert(attack(T, A, C, D)),\n utils::hash(argument(A), IdA),\n utils::hash(argument(C), IdC),\n context_assert(att(IdA, IdC) :- attack(T, B, C, D)),\n buildTransitiveAttacks.\nbuildTransitiveAttacks.\nattacks(rebut, A, B) :- rebuts(A, B), !.\nattacks(contrary_rebut, A, B) :- contraryRebuts(A, B), !.\nattacks(undermine, A, B) :- undermines(A, B), !.\nattacks(contrary_undermine, A, B) :- contraryUndermines(A, B), !.\nattacks(undercut, A, B) :- undercuts(A, B), !.\nexpanded_conflict(HeadA, HeadB) :-\n conflict(HeadA, HeadB).\nexpanded_conflict(HeadA, HeadB) :-\n conflict(HeadA, HeadB, Guard),\n (callable(Guard) -> call(Guard); Guard).\nrebuts([IDPremisesA, RuleA, RuleHeadA, _, _], [IDPremisesB, RuleB, RuleHeadB, _, Info]) :-\n\tRuleB \\== none,\n Info \\== [[], [], []],\n\texpanded_conflict(RuleHeadA, RuleHeadB).\ncontraryRebuts([IDPremisesA, RuleA, [RuleHeadA], _, _], [IDPremisesB, RuleB, RuleHeadB, Body, Info]) :-\n\tRuleA \\== none,\n\tRuleB \\== none,\n\tutils::contains(~(RuleHeadA), Body).\nundermines([IDPremisesA, RuleA, RuleHeadA, _, _], [[IDPremiseB], none, RuleHeadB, _, Info]) :-\n\tInfo \\== [[], [], []],\n\texpanded_conflict(RuleHeadA, RuleHeadB).\ncontraryUndermines([IDPremisesA, none, [RuleHeadA], _, _], [IDPremisesB, RuleB, RuleHeadB, Body, Info]) :-\n\tRuleB \\== none,\n\tutils::contains(~(RuleHeadA), Body).\nundercuts([_, _, [undercut(RuleB)], _, _], [_, RuleB, _, _, [[RuleB], _, _]]).\ncheck(-Atom).\nconflict([Atom], [-Atom]) :- \\+ check(Atom).\nconflict([-Atom], [Atom]).\nconflict([o(Atom)], [o(-Atom)]) :- \\+ check(Atom).\nconflict([o(-Atom)], [o(Atom)]).\nconflict([p(Atom)], [o(-Atom)]) :- \\+ check(Atom).\nconflict([o(-Atom)], [p(Atom)]).\nconflict([p(-Atom)], [o(Atom)]).\nconflict([o(Atom)], [p(-Atom)]) :- \\+ check(Atom).\nconflict([sup(X, Y)], [sup(Y, X)]).';
|
|
650
|
+
this.h3a_1 = 'buildArgumentationGraph :-\n buildArguments,\n buildAttacks.\nbuildArguments :-\n\tbuildArgumentsFromPremises,\n\tbuildArgumentsFromEmptyRules,\n\tfindall([RuleID, RuleBody, RuleHead], (\n\t parser::classic_rule(RuleID, RuleBody, RuleHead),\n\t \\+ emptyRule([RuleID, RuleBody, RuleHead])\n ), Rules),\n findall(X, context_check(newConc(a, [X])), N),\n\tbuildArgumentsFromRules(N, b, Rules, Rules, n).\nbuildArgumentsFromPremises :-\n findall(\n _,\n (\n parser::classic_rule(PremiseID, Premise),\n checkStrict(PremiseID, DefPrem),\n ground(Premise),\n context_assert(argument([[PremiseID], none, Premise, [], [[], [], DefPrem]])),\n context_assert(conc(Premise) :- argument([[PremiseID], none, Premise, [], [[], [], DefPrem]])),\n context_assert(newConc(a, Premise)),\n utils::hash(argument([[PremiseID], none, Premise, [], [[], [], DefPrem]]), Id),\n context_assert(arg(Id) :- argument([[PremiseID], none, Premise, [], [[], [], DefPrem]]))\n ),\n _\n ).\nbuildArgumentsFromEmptyRules :-\n findall(\n _,\n (\n emptyRule([RuleID, RulePrem, RuleHead]),\n checkStrict(RuleID, DefRule),\n ground(RuleHead),\n context_assert(argument([[RuleID], RuleID, RuleHead, RulePrem, [DefRule, DefRule, []]])),\n context_assert(conc(RuleHead) :- argument([[RuleID], RuleID, RuleHead, RulePrem, [DefRule, DefRule, []]])),\n context_assert(newConc(a, RuleHead)),\n utils::hash(argument([[RuleID], RuleID, RuleHead, RulePrem, [DefRule, DefRule, []]]), Id),\n context_assert(arg(Id) :- argument([[RuleID], RuleID, RuleHead, RulePrem, [DefRule, DefRule, []]]))\n ),\n _\n ).\nemptyRule([RuleID, Body, RuleHead]) :-\n parser::classic_rule(RuleID, Body, RuleHead),\n \\+ (member(X, Body), X \\= ~(_), X \\= prolog(_)),\n checkPrologClauses(Body).\ncheckPrologClauses([]) :- !.\ncheckPrologClauses([~(_)|T]) :- checkPrologClauses(T), !.\ncheckPrologClauses([prolog(Check)|T]) :-\n (callable(Check) -> call(Check); Check),\n checkPrologClauses(T).\nclean(Tn, Rules) :-\n invert(Tn, Tx),\n context_retract(newConc(Tx, _)),\n findall(X, context_check(newConc(Tn, [X])), N),\n buildArgumentsFromRules(N, Tx, Rules, Rules, n).\ninvert(a, b).\ninvert(b, a).\nbuildArgumentsFromRules(_, _, Rules, [], n) :- !.\nbuildArgumentsFromRules(_, Tn, Rules, [], y) :- !, clean(Tn, Rules).\nbuildArgumentsFromRules(N, Tn, Rules, [[Id, Body, Conc]|T], _) :-\n utils::contains_any(Body, N),\n findall(true, buildArgumentsFromRule(Tn, [Id, Body, Conc]), R),\n R \\== [],\n buildArgumentsFromRules(N, Tn, Rules, T, y), !.\nbuildArgumentsFromRules(N, Tn, Rules, [_|T], X) :-\n buildArgumentsFromRules(N, Tn, Rules, T, X).\nbuildArgumentsFromRule(Tn, [RuleID, RuleBody, RuleHead]) :-\n\truleBodyIsSupported(RuleID, RuleHead, RuleBody, RuleBody, [[], [], [], []], Argument),\n context_assert(newConc(Tn, RuleHead)).\ncheckStrict(Id, []) :- parser::check_strict(Id), !.\ncheckStrict(Id, [Id]).\ndefRules(Id, Def, Def) :- parser::check_strict(Id), !.\ndefRules(Id, Def, [Id|Def]).\nlastDefRules(Id, LDef, LDef) :- parser::check_strict(Id), !.\nlastDefRules(Id, LDef, [Id]) :- Id \\== none, \\+ parser::check_strict(Id).\nargumentInfo(RuleId, LDef, Def, Prem, [FLDef, FDef, FPrem]) :-\n utils::sortDistinct(Prem, FPrem),\n defRules(RuleId, Def, NDef),\n utils::sortDistinct(NDef, FDef),\n lastDefRules(RuleId, LDef, NLDef),\n utils::sortDistinct(NLDef, FLDef).\nruleBodyIsSupported(RuleID, RuleHead, RuleBody, [], [TAll, TLDef, TDef, TPrem], Argument) :-\n ground(RuleHead),\n \\+ context_check(clause(conc(RuleHead), argument([_, RuleID, RuleHead, RuleBody, _]))),\n utils::appendLists(TAll, All),\n \\+ utils::contains(RuleID, All),\n utils::appendLists(TLDef, LDef),\n utils::appendLists(TDef, Def),\n utils::appendLists(TPrem, Prem),\n argumentInfo(RuleID, LDef, Def, Prem, Info),\n utils::sort([RuleID|All], Rules),\n Argument = [Rules, RuleID, RuleHead, RuleBody, Info],\n context_assert(conc(RuleHead) :- argument(Argument)),\n context_assert(argument(Argument)),\n utils::hash(argument(Argument), Id),\n context_assert(arg(Id) :- argument(Argument)).\nruleBodyIsSupported(RuleID, RuleHead, RuleBody, [~(_)|Others], Info, Argument) :-\n\truleBodyIsSupported(RuleID, RuleHead, RuleBody, Others, Info, Argument).\nruleBodyIsSupported(RuleID, RuleHead, RuleBody, [prolog(Check)|Others], Info, Argument) :-\n\t(callable(Check) -> call(Check); Check),\n\truleBodyIsSupported(RuleID, RuleHead, RuleBody, Others, Info, Argument).\nruleBodyIsSupported(RuleId, RuleHead, RuleBody, [Statement|Others], [All, LDef, Def, Prem], Argument) :-\n context_check(clause(conc([Statement]), argument([ArgumentID, RuleID, [Statement], Body, [NLDef, NDef, NPrem]]))),\n\truleBodyIsSupported(RuleId, RuleHead, RuleBody, Others, [[ArgumentID|All], [NLDef|LDef], [NDef|Def], [NPrem|Prem]], Argument),\n\tcontext_assert(support([ArgumentID, RuleID, [Statement], Body, [NLDef, NDef, NPrem]], Argument)).\nfindPossibleAttackers([_, _, Head, _, _], Conf) :-\n conflict(Conf, Head, Guard).\nfindPossibleAttackers([_, _, Head, _, _], Conf) :-\n conflict(Conf, Head).\nfindPossibleAttackers([_, _, _, Prem, _], [Conf]) :-\n member(~(Conf), Prem).\nfindPossibleAttackers([_, RuleID, _, _, _], [undercut(RuleID)]).\nbuildAttacks :-\n\tbuildDirectAttacks,\n\tbuildTransitiveAttacks.\nbuildDirectAttacks :-\n findall(_, buildDirectAttack, _).\nbuildDirectAttack :-\n context_check(argument(A)),\n findPossibleAttackers(A, BB),\n\tcontext_check(clause(conc(BB), argument(B))),\n\tA \\== B,\n attacks(T, B, A),\n\t\\+ context_check(attack(T, B, A, A)),\n\tcontext_assert(attack(T, B, A, A)),\n\tutils::hash(argument(A), IdA),\n\tutils::hash(argument(B), IdB),\n\tcontext_assert(att(IdB, IdA) :- attack(T, B, A, A)),\n\tfail.\nbuildDirectAttack.\nbuildTransitiveAttacks :-\n\tcontext_check(attack(T, A, B, D)),\n\tcontext_check(support(B, C)),\n\t\\+ context_check(attack(T, A, C, D)), !,\n\tcontext_assert(attack(T, A, C, D)),\n utils::hash(argument(A), IdA),\n utils::hash(argument(C), IdC),\n context_assert(att(IdA, IdC) :- attack(T, B, C, D)),\n buildTransitiveAttacks.\nbuildTransitiveAttacks.\nattacks(rebut, A, B) :- rebuts(A, B), !.\nattacks(contrary_rebut, A, B) :- contraryRebuts(A, B), !.\nattacks(undermine, A, B) :- undermines(A, B), !.\nattacks(contrary_undermine, A, B) :- contraryUndermines(A, B), !.\nattacks(undercut, A, B) :- undercuts(A, B), !.\nexpanded_conflict(HeadA, HeadB) :-\n conflict(HeadA, HeadB).\nexpanded_conflict(HeadA, HeadB) :-\n conflict(HeadA, HeadB, Guard),\n (callable(Guard) -> call(Guard); Guard).\nrebuts([IDPremisesA, RuleA, RuleHeadA, _, _], [IDPremisesB, RuleB, RuleHeadB, _, Info]) :-\n\tRuleB \\== none,\n Info \\== [[], [], []],\n\texpanded_conflict(RuleHeadA, RuleHeadB).\ncontraryRebuts([IDPremisesA, RuleA, [RuleHeadA], _, _], [IDPremisesB, RuleB, RuleHeadB, Body, Info]) :-\n\tRuleA \\== none,\n\tRuleB \\== none,\n\tutils::contains(~(RuleHeadA), Body).\nundermines([IDPremisesA, RuleA, RuleHeadA, _, _], [[IDPremiseB], none, RuleHeadB, _, Info]) :-\n\tInfo \\== [[], [], []],\n\texpanded_conflict(RuleHeadA, RuleHeadB).\ncontraryUndermines([IDPremisesA, none, [RuleHeadA], _, _], [IDPremisesB, RuleB, RuleHeadB, Body, Info]) :-\n\tRuleB \\== none,\n\tutils::contains(~(RuleHeadA), Body).\nundercuts([_, _, [undercut(RuleB)], _, _], [_, RuleB, _, _, [[RuleB], _, _]]).\ncheck(-Atom).\nconflict([Atom], [-Atom]) :- \\+ check(Atom).\nconflict([-Atom], [Atom]).\nconflict([o(Atom)], [o(-Atom)]) :- \\+ check(Atom).\nconflict([o(-Atom)], [o(Atom)]).\nconflict([p(Atom)], [o(-Atom)]) :- \\+ check(Atom).\nconflict([o(-Atom)], [p(Atom)]).\nconflict([p(-Atom)], [o(Atom)]).\nconflict([o(Atom)], [p(-Atom)]) :- \\+ check(Atom).\nconflict([sup(X, Y)], [sup(Y, X)]).';
|
|
682
651
|
}
|
|
683
652
|
var ArgumentationGraph_instance;
|
|
684
653
|
function ArgumentationGraph_getInstance() {
|
|
685
|
-
if (ArgumentationGraph_instance == null)
|
|
686
|
-
new ArgumentationGraph();
|
|
687
654
|
return ArgumentationGraph_instance;
|
|
688
655
|
}
|
|
689
656
|
function AttackRestriction() {
|
|
690
|
-
|
|
691
|
-
this.r38_1 = 'modifyArgumentationGraph :-\n findall(_, (\n context_check(attack(T, A, B, C)),\n checkRebutRestriction(T, A, B, C)\n ), _).\ncheckRebutRestriction(T, A, B, C) :-\n \\+ rebutRestriction(T, A, B, C),\n context_retract(attack(T, A, B, C)).\nrebutRestriction(rebut, _, _, C) :- restrict(C).\nrebutRestriction(undermine, _, _, C).\nrebutRestriction(contrary_rebut, _, _, _).\nrebutRestriction(contrary_undermine, _, _, _).\nrebutRestriction(undercut, _, _, _).\nrestrict([_, TopRule, _, _, [[TopRule], _, _]]) :- TopRule \\== none.';
|
|
657
|
+
this.l3a_1 = 'modifyArgumentationGraph :-\n findall(_, (\n context_check(attack(T, A, B, C)),\n checkRebutRestriction(T, A, B, C)\n ), _).\ncheckRebutRestriction(T, A, B, C) :-\n \\+ rebutRestriction(T, A, B, C),\n context_retract(attack(T, A, B, C)).\nrebutRestriction(rebut, _, _, C) :- restrict(C).\nrebutRestriction(undermine, _, _, C).\nrebutRestriction(contrary_rebut, _, _, _).\nrebutRestriction(contrary_undermine, _, _, _).\nrebutRestriction(undercut, _, _, _).\nrestrict([_, TopRule, _, _, [[TopRule], _, _]]) :- TopRule \\== none.';
|
|
692
658
|
}
|
|
693
659
|
var AttackRestriction_instance;
|
|
694
660
|
function AttackRestriction_getInstance() {
|
|
695
|
-
if (AttackRestriction_instance == null)
|
|
696
|
-
new AttackRestriction();
|
|
697
661
|
return AttackRestriction_instance;
|
|
698
662
|
}
|
|
699
663
|
function Bp() {
|
|
700
|
-
|
|
701
|
-
this.v38_1 = 'modifyArgumentationGraph :-\n findall(([Rules, Top, [bp(Checked)], G, I], [Z, P, [Y], GG, II]), (\n context_check(argument([Rules, Top, [bp(Checked)], G, I])),\n member(Y, [Checked]),\n context_check(argument([Z, P, [Y], GG, II]))\n ), TemplateBpPairs),\n checkBpArguments(TemplateBpPairs).\ncheckBpArguments([]).\ncheckBpArguments(TemplateBpPairs) :-\n createBpArguments(TemplateBpPairs, BpPairs),\n createBpAttacks(BpPairs).\ncreateBpArguments([], []).\ncreateBpArguments([(Original, [Z, P, Y, B, I])|Others], [(Conflict, [Z, P, Y, B, I])|BpPairs]) :-\n Conflict = [[artificial|Z], artificial, [-burdmet(Y)], [], [[artificial], [artificial], []]],\n context_assert(argument(Conflict)),\n context_assert(support(Original, Conflict)),\n liftBpAttacks(Original, Conflict),\n createBpArguments(Others, BpPairs).\nliftBpAttacks(Template, BpArg) :-\n findall(_, (\n context_check(attack(T, A, Template, O)),\n context_assert(attack(T, A, BpArg, O))\n ), _).\ncreateBpAttacks(BpPairs) :-\n generateBpsEvaluationChain(BpPairs, OrderedBpPairs),\n evaluateBurdenedArgs(OrderedBpPairs).\ngenerateBpsEvaluationChain([], []).\ngenerateBpsEvaluationChain([BpPair|BpPairs], OrderedBpPairs) :-\n generateBpsEvaluationChain(BpPairs, TempOrderedBpPairs),\n insertBpPair(BpPair, TempOrderedBpPairs, OrderedBpPairs).\ninsertBpPair(BpPair, [], [BpPair]).\ninsertBpPair((Bp, Burdened), [(BpL, BurdenedL)|Others], [(BpL, BurdenedL)|Return]) :-\n bp_grounded::argumentChain(BurdenedL, Burdened),\n insertBpPair((Bp, Burdened), Others, Return), !.\ninsertBpPair((Bp, Burdened), [(BpL, BurdenedL)|Others], [(Bp, Burdened)|[(BpL, BurdenedL)|Others]]).\nevaluateBurdenedArgs([]).\nevaluateBurdenedArgs([(Bp, Burdened)|Others]) :-\n context_active(X),\n grounded:::argumentLabelling,\n statusToAttack((Bp, Burdened), Attack),\n context_checkout(X),\n context_assert(Attack),\n evaluateBurdenedArgs(Others).\nstatusToAttack((Bp, Burdened), attack(bprebut, Burdened, Bp, Bp)) :-\n context_check(in(Burdened)).\nstatusToAttack((Bp, Burdened), attack(bprebut, Bp, Burdened, Burdened)) :-\n \\+ context_check(in(Burdened)).';
|
|
664
|
+
this.p3a_1 = 'modifyArgumentationGraph :-\n findall(([Rules, Top, [bp(Checked)], G, I], [Z, P, [Y], GG, II]), (\n context_check(argument([Rules, Top, [bp(Checked)], G, I])),\n member(Y, [Checked]),\n context_check(argument([Z, P, [Y], GG, II]))\n ), TemplateBpPairs),\n checkBpArguments(TemplateBpPairs).\ncheckBpArguments([]).\ncheckBpArguments(TemplateBpPairs) :-\n createBpArguments(TemplateBpPairs, BpPairs),\n createBpAttacks(BpPairs).\ncreateBpArguments([], []).\ncreateBpArguments([(Original, [Z, P, Y, B, I])|Others], [(Conflict, [Z, P, Y, B, I])|BpPairs]) :-\n Conflict = [[artificial|Z], artificial, [-burdmet(Y)], [], [[artificial], [artificial], []]],\n context_assert(argument(Conflict)),\n context_assert(support(Original, Conflict)),\n liftBpAttacks(Original, Conflict),\n createBpArguments(Others, BpPairs).\nliftBpAttacks(Template, BpArg) :-\n findall(_, (\n context_check(attack(T, A, Template, O)),\n context_assert(attack(T, A, BpArg, O))\n ), _).\ncreateBpAttacks(BpPairs) :-\n generateBpsEvaluationChain(BpPairs, OrderedBpPairs),\n evaluateBurdenedArgs(OrderedBpPairs).\ngenerateBpsEvaluationChain([], []).\ngenerateBpsEvaluationChain([BpPair|BpPairs], OrderedBpPairs) :-\n generateBpsEvaluationChain(BpPairs, TempOrderedBpPairs),\n insertBpPair(BpPair, TempOrderedBpPairs, OrderedBpPairs).\ninsertBpPair(BpPair, [], [BpPair]).\ninsertBpPair((Bp, Burdened), [(BpL, BurdenedL)|Others], [(BpL, BurdenedL)|Return]) :-\n bp_grounded::argumentChain(BurdenedL, Burdened),\n insertBpPair((Bp, Burdened), Others, Return), !.\ninsertBpPair((Bp, Burdened), [(BpL, BurdenedL)|Others], [(Bp, Burdened)|[(BpL, BurdenedL)|Others]]).\nevaluateBurdenedArgs([]).\nevaluateBurdenedArgs([(Bp, Burdened)|Others]) :-\n context_active(X),\n grounded:::argumentLabelling,\n statusToAttack((Bp, Burdened), Attack),\n context_checkout(X),\n context_assert(Attack),\n evaluateBurdenedArgs(Others).\nstatusToAttack((Bp, Burdened), attack(bprebut, Burdened, Bp, Bp)) :-\n context_check(in(Burdened)).\nstatusToAttack((Bp, Burdened), attack(bprebut, Bp, Burdened, Burdened)) :-\n \\+ context_check(in(Burdened)).';
|
|
702
665
|
}
|
|
703
666
|
var Bp_instance;
|
|
704
667
|
function Bp_getInstance() {
|
|
705
|
-
if (Bp_instance == null)
|
|
706
|
-
new Bp();
|
|
707
668
|
return Bp_instance;
|
|
708
669
|
}
|
|
709
670
|
function BpGrounded() {
|
|
710
|
-
|
|
711
|
-
this.p39_1 = 'argumentLabelling :-\n reifyBurdenOfProofs,\n filterBpDefeats,\n findall(X, context_check(argument(X)), Arguments),\n bpLabelling(Arguments).\nbpLabelling(Arguments) :-\n member(A, Arguments),\n grounded::allAttacksOUT(A), !,\n context_assert(in(A)),\n utils::subtract(Arguments, [A], NewArguments),\n bpLabelling(NewArguments).\nbpLabelling(Arguments) :-\n member(A, Arguments),\n \\+ isArgumentInBurdenOfProof(A),\n grounded::oneAttackIN(A), !,\n context_assert(out(A)),\n utils::subtract(Arguments, [A], NewArguments),\n bpLabelling(NewArguments).\nbpLabelling(Arguments) :-\n context_active(Branch),\n mostGroundedBpUnd(Arguments, A),\n context_branch(Branch, _),\n context_assert(out(A)),\n utils::subtract(Arguments, [A], NewArguments),\n bpLabelling(NewArguments).\nbpLabelling(Args) :-\n notLabelled(Args),\n findall(_, (member(A, Args), context_assert(und(A))), _).\nnotLabelled(Args) :-\n \\+ (\n member(A, Args),\n (\n context_check(in(A));\n context_check(out(A));\n context_check(und(A))\n )\n ).\nisInBurdenOfProof(Conclusion) :-\n context_check(reifiedBp(Literals)),\n member(Conclusion, Literals), !.\nisArgumentInBurdenOfProof([_, _, Conclusion, _, _]) :-\n isInBurdenOfProof(Conclusion).\nfilterBpDefeats :-\n findall(_, (\n context_check(attack(T, A, B, C)),\n filterBpDefeat(T, A, B, C)\n ), _).\nfilterBpDefeat(T, B, A, C) :-\n (T = rebut; T = undermine),\n isArgumentInBurdenOfProof(B),\n \\+ superiority::superiorArgument(B, C),\n context_retract(attack(T, B, A, C)).\nmostGroundedBpUnd(Arguments, Arg) :-\n member(Arg, Arguments),\n isArgumentInBurdenOfProof(Arg),\n \\+ (\n member(A, Arguments), Arg \\= A,\n isArgumentInBurdenOfProof(A),\n argumentChain(A, Arg)\n ).\nargumentChain(A, A) :- !.\nargumentChain(A, B) :-\n A \\== B,\n context_check(attack(_, A, C, _)),\n argumentChain(C, B).\nreifyBurdenOfProofs :-\n findall(_, (\n context_check(abstractBp(AbstractBp)),\n fillTemplate(AbstractBp, R),\n \\+ context_check(reifiedBp(R)),\n context_assert(reifiedBp(R))\n ), _).\n/*\n Fill the template (first parameter) using arguments conclusions\n*/\nfillTemplate([], []).\nfillTemplate([H|T], [[H]|R]) :-\n context_check(argument([_ , _, [P], _, _])),\n fillTemplate(T, R).';
|
|
671
|
+
this.j3b_1 = 'argumentLabelling :-\n reifyBurdenOfProofs,\n filterBpDefeats,\n findall(X, context_check(argument(X)), Arguments),\n bpLabelling(Arguments).\nbpLabelling(Arguments) :-\n member(A, Arguments),\n grounded::allAttacksOUT(A), !,\n context_assert(in(A)),\n utils::subtract(Arguments, [A], NewArguments),\n bpLabelling(NewArguments).\nbpLabelling(Arguments) :-\n member(A, Arguments),\n \\+ isArgumentInBurdenOfProof(A),\n grounded::oneAttackIN(A), !,\n context_assert(out(A)),\n utils::subtract(Arguments, [A], NewArguments),\n bpLabelling(NewArguments).\nbpLabelling(Arguments) :-\n context_active(Branch),\n mostGroundedBpUnd(Arguments, A),\n context_branch(Branch, _),\n context_assert(out(A)),\n utils::subtract(Arguments, [A], NewArguments),\n bpLabelling(NewArguments).\nbpLabelling(Args) :-\n notLabelled(Args),\n findall(_, (member(A, Args), context_assert(und(A))), _).\nnotLabelled(Args) :-\n \\+ (\n member(A, Args),\n (\n context_check(in(A));\n context_check(out(A));\n context_check(und(A))\n )\n ).\nisInBurdenOfProof(Conclusion) :-\n context_check(reifiedBp(Literals)),\n member(Conclusion, Literals), !.\nisArgumentInBurdenOfProof([_, _, Conclusion, _, _]) :-\n isInBurdenOfProof(Conclusion).\nfilterBpDefeats :-\n findall(_, (\n context_check(attack(T, A, B, C)),\n filterBpDefeat(T, A, B, C)\n ), _).\nfilterBpDefeat(T, B, A, C) :-\n (T = rebut; T = undermine),\n isArgumentInBurdenOfProof(B),\n \\+ superiority::superiorArgument(B, C),\n context_retract(attack(T, B, A, C)).\nmostGroundedBpUnd(Arguments, Arg) :-\n member(Arg, Arguments),\n isArgumentInBurdenOfProof(Arg),\n \\+ (\n member(A, Arguments), Arg \\= A,\n isArgumentInBurdenOfProof(A),\n argumentChain(A, Arg)\n ).\nargumentChain(A, A) :- !.\nargumentChain(A, B) :-\n A \\== B,\n context_check(attack(_, A, C, _)),\n argumentChain(C, B).\nreifyBurdenOfProofs :-\n findall(_, (\n context_check(abstractBp(AbstractBp)),\n fillTemplate(AbstractBp, R),\n \\+ context_check(reifiedBp(R)),\n context_assert(reifiedBp(R))\n ), _).\n/*\n Fill the template (first parameter) using arguments conclusions\n*/\nfillTemplate([], []).\nfillTemplate([H|T], [[H]|R]) :-\n context_check(argument([_ , _, [P], _, _])),\n fillTemplate(T, R).';
|
|
712
672
|
}
|
|
713
673
|
var BpGrounded_instance;
|
|
714
674
|
function BpGrounded_getInstance() {
|
|
715
|
-
if (BpGrounded_instance == null)
|
|
716
|
-
new BpGrounded();
|
|
717
675
|
return BpGrounded_instance;
|
|
718
676
|
}
|
|
719
677
|
function BpGroundedComplete() {
|
|
720
|
-
|
|
721
|
-
this.l39_1 = 'argumentLabelling :-\n bp_grounded::reifyBurdenOfProofs,\n findall(X, context_check(argument(X)), Arguments),\n completeBpLabelling(go, Arguments).\ncompleteBpLabelling(stop, _).\ncompleteBpLabelling(go, Arguments) :-\n bp_grounded_partial::partialBpLabelling(Arguments), !,\n findall(X, (context_check(und(X)), context_retract(und(X))), NewArgs),\n grounded::groundedLabelling(NewArgs),\n findall(X, context_check(und(X)), LeftArguments),\n stopCondition(Stop, Arguments, LeftArguments),\n completeBpLabelling(Stop, LeftArguments).\nstopCondition(stop, Args, NewArgs) :-\n utils::sort(Args, SortedArgs),\n utils::sort(NewArgs, SortedArgs), !.\nstopCondition(go, _, _) :- context_retract(und(_)).';
|
|
678
|
+
this.f3b_1 = 'argumentLabelling :-\n bp_grounded::reifyBurdenOfProofs,\n findall(X, context_check(argument(X)), Arguments),\n completeBpLabelling(go, Arguments).\ncompleteBpLabelling(stop, _).\ncompleteBpLabelling(go, Arguments) :-\n bp_grounded_partial::partialBpLabelling(Arguments), !,\n findall(X, (context_check(und(X)), context_retract(und(X))), NewArgs),\n grounded::groundedLabelling(NewArgs),\n findall(X, context_check(und(X)), LeftArguments),\n stopCondition(Stop, Arguments, LeftArguments),\n completeBpLabelling(Stop, LeftArguments).\nstopCondition(stop, Args, NewArgs) :-\n utils::sort(Args, SortedArgs),\n utils::sort(NewArgs, SortedArgs), !.\nstopCondition(go, _, _) :- context_retract(und(_)).';
|
|
722
679
|
}
|
|
723
680
|
var BpGroundedComplete_instance;
|
|
724
681
|
function BpGroundedComplete_getInstance() {
|
|
725
|
-
if (BpGroundedComplete_instance == null)
|
|
726
|
-
new BpGroundedComplete();
|
|
727
682
|
return BpGroundedComplete_instance;
|
|
728
683
|
}
|
|
729
684
|
function BpGroundedPartial() {
|
|
730
|
-
|
|
731
|
-
this.t39_1 = "argumentLabelling :-\n bp_grounded::reifyBurdenOfProofs,\n findall(X, context_check(argument(X)), Arguments),\n partialBpLabelling(Arguments), !.\npartialBpLabelling([]).\npartialBpLabelling(Arguments) :-\n mostGroundedArgument(Arguments, A),\n debug::writeDebug(['Evaluating ', A]),\n demonstration(Arguments, A, [A], Evaluated),\n utils::subtract(Arguments, [Evaluated], NewArgs),\n partialBpLabelling(NewArgs).\n/*\n (a.i) BP(neg(\u03C6)), and no argument B for neg(\u03C6) such that A < B is IN*, and no A1,...An is OUT*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\tisComplementInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorComplementArgument(Arguments, A, Resolving, _),\n\t\\+ (\n\t superiorComplementArgument(A, B),\n\t context_check(in(B))\n\t),\n\t\\+ notEvaluatedSubArgument(Arguments, A, Resolving, _),\n\t\\+ (\n\t context_check(support(X, A)),\n\t context_check(out(X))\n\t),\n\tdebug::writeDebug(['Adding argument: ', A, ' to IN* (2.a.i)']),\n context_assert(in(A)).\n/*\n (a.ii) not BP(neg(\u03C6)) and every argument B for neg(\u03C6) such that B(not <)A is OUT*, and every A1,...An is IN*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\t\\+ isComplementInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, _),\n\t\\+ (\n superiorOrEqualComplementArgument(A, B),\n \\+ context_check(out(B))\n ),\n\t\\+ notEvaluatedSubArgument(Arguments, A, Resolving, _),\n\t\\+ (\n context_check(support(X, A)),\n \\+ context_check(in(X))\n ),\n\tdebug::writeDebug(['Adding argument: ', A, ' to IN* (2.a.ii)']),\n context_assert(in(A)).\n/*\n (b.i.1) BP(\u03C6) and exists an argument B for neg(\u03C6) such that B(not <)A is not OUT*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\tbp_grounded::isArgumentInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, _),\n\tsuperiorOrEqualComplementArgument(A, B),\n\t\\+ context_check(out(B)),\n debug::writeDebug(['Adding argument: ', A, ' to OUT* (2.b.i.1)']),\n context_assert(out(A)).\n/*\n (b.i.2) BP(\u03C6) and exist one of A1,...An is not IN*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\tbp_grounded::isArgumentInBurdenOfProof(A),\n\t\\+ notEvaluatedSubArgument(Arguments, A, Resolving, _),\n\tcontext_check(support(X, A)),\n \\+ context_check(in(X)),\n debug::writeDebug(['Adding argument: ', A, ' to OUT* (2.b.i.2)']),\n context_assert(out(A)).\n/*\n (b.ii.1) not BP(\u03C6) and an argument B for neg(\u03C6) such A < B is IN*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\t\\+ bp_grounded::isArgumentInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorComplementArgument(Arguments, A, Resolving, _),\n\tsuperiorComplementArgument(A, B),\n\tcontext_check(in(B)),\n debug::writeDebug(['Adding argument: ', A, ' to OUT* (2.b.ii.1)']),\n context_assert(out(A)).\n/*\n (b.ii.2) not BP(\u03C6) and one of A1,...An is OUT*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\t\\+ bp_grounded::isArgumentInBurdenOfProof(A),\n\t\\+ notEvaluatedSubArgument(Arguments, A, Resolving, _),\n\tcontext_check(support(X, A)),\n context_check(out(X)),\n debug::writeDebug(['Adding argument: ', A, ' to OUT* (2.b.ii.2)']),\n context_assert(out(A)).\n/*\n If above definitions do not apply try to decide on the arguments on which they depend\n*/\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n isComplementInBurdenOfProof(A),\n\tnotEvaluatedSuperiorComplementArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\tisComplementInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorComplementArgument(Arguments, A, Resolving, _),\n\t\\+ (\n superiorComplementArgument(A, X),\n context_check(in(X))\n ),\n notEvaluatedSubArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n \\+ isComplementInBurdenOfProof(A),\n\tnotEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\t\\+ isComplementInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, _),\n\t\\+ (\n superiorOrEqualComplementArgument(A, X),\n \\+ context_check(out(X))\n ),\n notEvaluatedSubArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\tbp_grounded::isArgumentInBurdenOfProof(A),\n\tnotEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\tbp_grounded::isArgumentInBurdenOfProof(A),\n\tnotEvaluatedSubArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\t\\+ bp_grounded::isArgumentInBurdenOfProof(A),\n\tnotEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\t\\+ bp_grounded::isArgumentInBurdenOfProof(A),\n\tnotEvaluatedSubArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\n/*\n (c) A is labelled UND* otherwise.\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\tdebug::writeDebug(['Adding argument: ', A, ' to UND* (2.c)']),\n context_assert(und(A)).\nisComplementInBurdenOfProof(A) :-\n complement(A, Complement),\n bp_grounded::isInBurdenOfProof(Complement), !.\nmostGroundedArgument([], []).\nmostGroundedArgument([X], X).\nmostGroundedArgument([[L, _, _, _, _]|T], [L2, Q2, W2, B2, I2]) :-\n mostGroundedArgument(T, [L2, Q2, W2, B2, I2]),\n length(L, LN1),\n length(L2, LN2),\n LN1 > LN2, !.\nmostGroundedArgument([A|_], A).\n/*\n Get a conclusion complement\n*/\ncomplement([_, _, Conclusion, _, _], A) :-\n standard_af::conflict(Conclusion, A).\nnotEvaluatedSubArgument(Arguments, A, Resolving, B) :-\n context_check(support(B, A)),\n member(B, Arguments),\n \\+ member(B, Resolving).\nnotEvaluatedSuperiorComplementArgument(Arguments, A, Resolving, B) :-\n superiorComplementArgument(A, B),\n member(B, Arguments),\n \\+ member(B, Resolving).\nnotEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, B) :-\n superiorOrEqualComplementArgument(A, B),\n member(B, Arguments),\n \\+ member(B, Resolving).\nsuperiorComplementArgument(A, [A, B, CA, BB, I]) :-\n complement(A, CA),\n context_check(argument([R, B, CA, BB, I])),\n superiority::superiorArgument([R, B, CA, BB, I], A).\nsuperiorOrEqualComplementArgument(A, [R, B, CA, BB, I]) :-\n complement(A, CA),\n context_check(argument([R, B, CA, BB, I])),\n \\+ superiority::superiorArgument(A, [R, B, CA, BB, I]).";
|
|
685
|
+
this.n3b_1 = "argumentLabelling :-\n bp_grounded::reifyBurdenOfProofs,\n findall(X, context_check(argument(X)), Arguments),\n partialBpLabelling(Arguments), !.\npartialBpLabelling([]).\npartialBpLabelling(Arguments) :-\n mostGroundedArgument(Arguments, A),\n debug::writeDebug(['Evaluating ', A]),\n demonstration(Arguments, A, [A], Evaluated),\n utils::subtract(Arguments, [Evaluated], NewArgs),\n partialBpLabelling(NewArgs).\n/*\n (a.i) BP(neg(\u03C6)), and no argument B for neg(\u03C6) such that A < B is IN*, and no A1,...An is OUT*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\tisComplementInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorComplementArgument(Arguments, A, Resolving, _),\n\t\\+ (\n\t superiorComplementArgument(A, B),\n\t context_check(in(B))\n\t),\n\t\\+ notEvaluatedSubArgument(Arguments, A, Resolving, _),\n\t\\+ (\n\t context_check(support(X, A)),\n\t context_check(out(X))\n\t),\n\tdebug::writeDebug(['Adding argument: ', A, ' to IN* (2.a.i)']),\n context_assert(in(A)).\n/*\n (a.ii) not BP(neg(\u03C6)) and every argument B for neg(\u03C6) such that B(not <)A is OUT*, and every A1,...An is IN*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\t\\+ isComplementInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, _),\n\t\\+ (\n superiorOrEqualComplementArgument(A, B),\n \\+ context_check(out(B))\n ),\n\t\\+ notEvaluatedSubArgument(Arguments, A, Resolving, _),\n\t\\+ (\n context_check(support(X, A)),\n \\+ context_check(in(X))\n ),\n\tdebug::writeDebug(['Adding argument: ', A, ' to IN* (2.a.ii)']),\n context_assert(in(A)).\n/*\n (b.i.1) BP(\u03C6) and exists an argument B for neg(\u03C6) such that B(not <)A is not OUT*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\tbp_grounded::isArgumentInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, _),\n\tsuperiorOrEqualComplementArgument(A, B),\n\t\\+ context_check(out(B)),\n debug::writeDebug(['Adding argument: ', A, ' to OUT* (2.b.i.1)']),\n context_assert(out(A)).\n/*\n (b.i.2) BP(\u03C6) and exist one of A1,...An is not IN*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\tbp_grounded::isArgumentInBurdenOfProof(A),\n\t\\+ notEvaluatedSubArgument(Arguments, A, Resolving, _),\n\tcontext_check(support(X, A)),\n \\+ context_check(in(X)),\n debug::writeDebug(['Adding argument: ', A, ' to OUT* (2.b.i.2)']),\n context_assert(out(A)).\n/*\n (b.ii.1) not BP(\u03C6) and an argument B for neg(\u03C6) such A < B is IN*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\t\\+ bp_grounded::isArgumentInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorComplementArgument(Arguments, A, Resolving, _),\n\tsuperiorComplementArgument(A, B),\n\tcontext_check(in(B)),\n debug::writeDebug(['Adding argument: ', A, ' to OUT* (2.b.ii.1)']),\n context_assert(out(A)).\n/*\n (b.ii.2) not BP(\u03C6) and one of A1,...An is OUT*\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\t\\+ bp_grounded::isArgumentInBurdenOfProof(A),\n\t\\+ notEvaluatedSubArgument(Arguments, A, Resolving, _),\n\tcontext_check(support(X, A)),\n context_check(out(X)),\n debug::writeDebug(['Adding argument: ', A, ' to OUT* (2.b.ii.2)']),\n context_assert(out(A)).\n/*\n If above definitions do not apply try to decide on the arguments on which they depend\n*/\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n isComplementInBurdenOfProof(A),\n\tnotEvaluatedSuperiorComplementArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\tisComplementInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorComplementArgument(Arguments, A, Resolving, _),\n\t\\+ (\n superiorComplementArgument(A, X),\n context_check(in(X))\n ),\n notEvaluatedSubArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n \\+ isComplementInBurdenOfProof(A),\n\tnotEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\t\\+ isComplementInBurdenOfProof(A),\n\t\\+ notEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, _),\n\t\\+ (\n superiorOrEqualComplementArgument(A, X),\n \\+ context_check(out(X))\n ),\n notEvaluatedSubArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\tbp_grounded::isArgumentInBurdenOfProof(A),\n\tnotEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\tbp_grounded::isArgumentInBurdenOfProof(A),\n\tnotEvaluatedSubArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\t\\+ bp_grounded::isArgumentInBurdenOfProof(A),\n\tnotEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\ndemonstration(Arguments, A, Resolving, Evaluated) :-\n\t\\+ bp_grounded::isArgumentInBurdenOfProof(A),\n\tnotEvaluatedSubArgument(Arguments, A, Resolving, B),\n demonstration(Arguments, B, [B|Resolving], Evaluated).\n/*\n (c) A is labelled UND* otherwise.\n*/\ndemonstration(Arguments, A, Resolving, A) :-\n\tdebug::writeDebug(['Adding argument: ', A, ' to UND* (2.c)']),\n context_assert(und(A)).\nisComplementInBurdenOfProof(A) :-\n complement(A, Complement),\n bp_grounded::isInBurdenOfProof(Complement), !.\nmostGroundedArgument([], []).\nmostGroundedArgument([X], X).\nmostGroundedArgument([[L, _, _, _, _]|T], [L2, Q2, W2, B2, I2]) :-\n mostGroundedArgument(T, [L2, Q2, W2, B2, I2]),\n length(L, LN1),\n length(L2, LN2),\n LN1 > LN2, !.\nmostGroundedArgument([A|_], A).\n/*\n Get a conclusion complement\n*/\ncomplement([_, _, Conclusion, _, _], A) :-\n standard_af::conflict(Conclusion, A).\nnotEvaluatedSubArgument(Arguments, A, Resolving, B) :-\n context_check(support(B, A)),\n member(B, Arguments),\n \\+ member(B, Resolving).\nnotEvaluatedSuperiorComplementArgument(Arguments, A, Resolving, B) :-\n superiorComplementArgument(A, B),\n member(B, Arguments),\n \\+ member(B, Resolving).\nnotEvaluatedSuperiorOrEqualComplementArgument(Arguments, A, Resolving, B) :-\n superiorOrEqualComplementArgument(A, B),\n member(B, Arguments),\n \\+ member(B, Resolving).\nsuperiorComplementArgument(A, [A, B, CA, BB, I]) :-\n complement(A, CA),\n context_check(argument([R, B, CA, BB, I])),\n superiority::superiorArgument([R, B, CA, BB, I], A).\nsuperiorOrEqualComplementArgument(A, [R, B, CA, BB, I]) :-\n complement(A, CA),\n context_check(argument([R, B, CA, BB, I])),\n \\+ superiority::superiorArgument(A, [R, B, CA, BB, I]).";
|
|
732
686
|
}
|
|
733
687
|
var BpGroundedPartial_instance;
|
|
734
688
|
function BpGroundedPartial_getInstance() {
|
|
735
|
-
if (BpGroundedPartial_instance == null)
|
|
736
|
-
new BpGroundedPartial();
|
|
737
689
|
return BpGroundedPartial_instance;
|
|
738
690
|
}
|
|
739
691
|
function Complete() {
|
|
740
|
-
|
|
741
|
-
this.x39_1 = 'argumentLabelling :-\n cache_retract(complete(_,_,_)),\n grounded:::argumentLabelling,\n context_active(Branch),\n completeLabelling(Branch).\ncompleteLabelling(_) :-\n admissibleSet,\n utils::recoverArgumentLabelling(In, Out, Und),\n \\+ cache_check(complete(In, Out, Und)),\n cache_assert(complete(In, Out, Und)).\ncompleteLabelling(Branch) :-\n context_check(und(X)),\n context_branch(Branch, NewBranch),\n findall(Y, (context_check(und(Y)), Y \\= X), Arguments),\n context_retract(und(_)),\n context_assert(in(X)),\n grounded::groundedLabelling(Arguments),\n completeLabelling(NewBranch).\nadmissibleSet :-\n \\+ (context_check(in(H)), \\+ admissible(H)).\nadmissible(H) :-\n \\+ (\n context_check(attack(_, Attacker, H, _)),\n \\+ (\n context_check(attack(_, Defendant, Attacker, _)),\n context_check(in(Defendant))\n )\n ).';
|
|
692
|
+
this.r3b_1 = 'argumentLabelling :-\n cache_retract(complete(_,_,_)),\n grounded:::argumentLabelling,\n context_active(Branch),\n completeLabelling(Branch).\ncompleteLabelling(_) :-\n admissibleSet,\n utils::recoverArgumentLabelling(In, Out, Und),\n \\+ cache_check(complete(In, Out, Und)),\n cache_assert(complete(In, Out, Und)).\ncompleteLabelling(Branch) :-\n context_check(und(X)),\n context_branch(Branch, NewBranch),\n findall(Y, (context_check(und(Y)), Y \\= X), Arguments),\n context_retract(und(_)),\n context_assert(in(X)),\n grounded::groundedLabelling(Arguments),\n completeLabelling(NewBranch).\nadmissibleSet :-\n \\+ (context_check(in(H)), \\+ admissible(H)).\nadmissible(H) :-\n \\+ (\n context_check(attack(_, Attacker, H, _)),\n \\+ (\n context_check(attack(_, Defendant, Attacker, _)),\n context_check(in(Defendant))\n )\n ).';
|
|
742
693
|
}
|
|
743
694
|
var Complete_instance;
|
|
744
695
|
function Complete_getInstance() {
|
|
745
|
-
if (Complete_instance == null)
|
|
746
|
-
new Complete();
|
|
747
696
|
return Complete_instance;
|
|
748
697
|
}
|
|
749
698
|
function Debug() {
|
|
750
|
-
|
|
751
|
-
this.o3a_1 = "printTheory(Rules) :-\n write('HERE THE THEORY:'),nl,\n findall(rule([Id, Body, Head]), member(rule([Id, Body, Head]), Rules), ListRules),\n utils::writeListNl(ListRules),\n findall(premise([A, B]), member(premise([A, B]), Rules), ListPremises),\n utils::writeListNl(ListPremises),\n findall(sup(A, B), member(sup(A, B), Rules), ListSups),\n utils::writeListNl(ListSups).\nprintArgumentationGraph(Arguments, Attacks, Supports) :-\n\tfindall(\n\t [IDPremises, '\\n', ' TOPRULE ', TopRule, '\\n', ' CONCLUSION ', RuleHead, '\\n', ' BODY ', Body, '\\n', ' INFO ', Info, '\\n'],\n\t member([IDPremises, TopRule, RuleHead, Body, Info], Arguments),\n ArgumentsToPrint\n ),\n findall((A1, ' SUPPORTS ', A2), member((A1, A2), Supports), SupportsToPrint),\n\tfindall((A1, ' ', T, ' ', A2, ' ON ', A3), member((T, A1, A2, A3), Attacks), AttacksToPrint),\n write('HERE THE GROUNDED SEMI-ABSTRACT ARGUMENTATION GRAPH'),nl,\n\tutils::writeListNl(ArgumentsToPrint),\n\tutils::writeListNl(SupportsToPrint),\n\tutils::writeListNl(AttacksToPrint).\nprintArgumentLabelling([IN, OUT, UND]) :-\n write('HERE THE ARGUMENTS LABELLED IN: '),nl,\n utils::writeListNl(IN),\n write('HERE THE ARGUMENTS LABELLED OUT: '),nl,\n utils::writeListNl(OUT),\n write('HERE THE ARGUMENTS LABELLED UND: '),nl,\n utils::writeListNl(UND).\nprintStatementLabelling([In, Ni, Und]) :-\n write('HERE THE STATEMENTS LABELLED IN: '),nl,\n utils::writeListNl(In),\n write('HERE THE STATEMENTS LABELLED NI: '),nl,\n utils::writeListNl(Ni),\n write('HERE THE STATEMENTS LABELLED UND: '),nl,\n utils::writeListNl(Und).\ndebug.\nwriteDebug(List) :-\n debug,\n utils::writeList(List).\nwriteDebug(_) :- \\+ debug.";
|
|
699
|
+
this.i3c_1 = "printTheory(Rules) :-\n write('HERE THE THEORY:'),nl,\n findall(rule([Id, Body, Head]), member(rule([Id, Body, Head]), Rules), ListRules),\n utils::writeListNl(ListRules),\n findall(premise([A, B]), member(premise([A, B]), Rules), ListPremises),\n utils::writeListNl(ListPremises),\n findall(sup(A, B), member(sup(A, B), Rules), ListSups),\n utils::writeListNl(ListSups).\nprintArgumentationGraph(Arguments, Attacks, Supports) :-\n\tfindall(\n\t [IDPremises, '\\n', ' TOPRULE ', TopRule, '\\n', ' CONCLUSION ', RuleHead, '\\n', ' BODY ', Body, '\\n', ' INFO ', Info, '\\n'],\n\t member([IDPremises, TopRule, RuleHead, Body, Info], Arguments),\n ArgumentsToPrint\n ),\n findall((A1, ' SUPPORTS ', A2), member((A1, A2), Supports), SupportsToPrint),\n\tfindall((A1, ' ', T, ' ', A2, ' ON ', A3), member((T, A1, A2, A3), Attacks), AttacksToPrint),\n write('HERE THE GROUNDED SEMI-ABSTRACT ARGUMENTATION GRAPH'),nl,\n\tutils::writeListNl(ArgumentsToPrint),\n\tutils::writeListNl(SupportsToPrint),\n\tutils::writeListNl(AttacksToPrint).\nprintArgumentLabelling([IN, OUT, UND]) :-\n write('HERE THE ARGUMENTS LABELLED IN: '),nl,\n utils::writeListNl(IN),\n write('HERE THE ARGUMENTS LABELLED OUT: '),nl,\n utils::writeListNl(OUT),\n write('HERE THE ARGUMENTS LABELLED UND: '),nl,\n utils::writeListNl(UND).\nprintStatementLabelling([In, Ni, Und]) :-\n write('HERE THE STATEMENTS LABELLED IN: '),nl,\n utils::writeListNl(In),\n write('HERE THE STATEMENTS LABELLED NI: '),nl,\n utils::writeListNl(Ni),\n write('HERE THE STATEMENTS LABELLED UND: '),nl,\n utils::writeListNl(Und).\ndebug.\nwriteDebug(List) :-\n debug,\n utils::writeList(List).\nwriteDebug(_) :- \\+ debug.";
|
|
752
700
|
}
|
|
753
701
|
var Debug_instance;
|
|
754
702
|
function Debug_getInstance() {
|
|
755
|
-
if (Debug_instance == null)
|
|
756
|
-
new Debug();
|
|
757
703
|
return Debug_instance;
|
|
758
704
|
}
|
|
759
705
|
function DefPreferences() {
|
|
760
|
-
|
|
761
|
-
this.z38_1 = 'modifyArgumentationGraph :-\n assertAllSup,\n findall((T, A, B, C), context_check(attack(T, A, B, C)), Attacks),\n filterSupRelatedAttacks(Attacks, InvalidAttacks),\n convertAttacks(InvalidAttacks),\n buildPrefAttacks.\nassertAllSup :-\n context_retract(sup(_, _)),\n findall(_,\n (\n context_check(argument([_, _, [sup(RuleOne, RuleTwo)], _, _])),\n \\+ context_check(sup(RuleOne, RuleTwo)),\n context_assert(sup(RuleOne, RuleTwo))\n ),\n _).\nfilterSupRelatedAttacks([], []).\nfilterSupRelatedAttacks([(T, A, B, C)|Attacks], [(T, A, B, C)|Invalid]) :-\n invalid(T, A, B, C, _),\n filterSupRelatedAttacks(Attacks, Invalid), !.\nfilterSupRelatedAttacks([_|Attacks], Invalid) :-\n filterSupRelatedAttacks(Attacks, Invalid).\ninvalid(rebut, A, B, C, SupSet) :- superiority::superiorArgument(C, A, SupSet), !.\ninvalid(undermine, A, B, C, SupSet) :- superiority::superiorArgument(C, A, SupSet), !.\n/*\n* Translates the attack relations identified during the building phase.\n* Attack from A to B -> Argument [[], attack, Attack]\n* support(A, Argument)\n* attack(Argument, B)\n* If an Argument A built in this way attacks the argument B, and this one also attacks a third argument C\n* through the argument B1 we have to consider an attack from A to B1 (transitive attack)\n*/\nconvertAttacks(Attacks) :-\n conversion(Attacks),\n standard_af::buildTransitiveAttacks.\nconversion(List) :-\n member((T, A, B, B), List),\n generateDirectAttackArgument(T, A, B, B),\n fail.\nconversion(List) :-\n member((T, A, B, C), List),\n C \\= B,\n generateTransitiveAttackArgument(T, A, B, C),\n fail.\nconversion(_).\ngenerateTransitiveAttackArgument(T, A, B, C) :-\n context_check(argument([Id, attack, [attack(T, A, C, C)], G, I])),\n context_assert(attack(T, [Id, attack, [attack(T, A, C, C)], G, I], B, C)),\n context_retract(attack(T, A, B, C)).\ngenerateDirectAttackArgument(T, A, B, B) :-\n RArgument = [[attack], attack, [attack(T, A, B, B)], [], [[attack], [attack], []]],\n \\+ context_check(argument(RArgument)),\n context_assert(argument(RArgument)),\n context_assert(support(A, RArgument)),\n context_assert(attack(T, RArgument, B, B)),\n context_retract(attack(T, A, B, B)).\n/*\n* Computes the pref attack. If an Argument A has a conclusion in the form sup(a, b), we verify if\n* the attacks involving arguments built on the rules a or b are compatible with this preference.\n* If there are some contradictions we add an attack from the argument A towards the incompatible attack\n*/\nbuildPrefAttacks :-\n context_check(argument([IdB, attack, [attack(T, A, B, C)], G, I])),\n invalid(T, A, B, C, SupSet),\n member(X, SupSet),\n context_check(argument([IdA, TRA, [X], GG, II])),\n Attack = attack(pref, [IdA, TRA, [X], GG, II], [IdB, attack, [attack(T, A, B, C)], G, I], [IdB, attack, [attack(T, A, B, C)], G, I]),\n \\+ context_check(Attack),\n context_assert(Attack),\n fail.\nbuildPrefAttacks.';
|
|
706
|
+
this.t3a_1 = 'modifyArgumentationGraph :-\n assertAllSup,\n findall((T, A, B, C), context_check(attack(T, A, B, C)), Attacks),\n filterSupRelatedAttacks(Attacks, InvalidAttacks),\n convertAttacks(InvalidAttacks),\n buildPrefAttacks.\nassertAllSup :-\n context_retract(sup(_, _)),\n findall(_,\n (\n context_check(argument([_, _, [sup(RuleOne, RuleTwo)], _, _])),\n \\+ context_check(sup(RuleOne, RuleTwo)),\n context_assert(sup(RuleOne, RuleTwo))\n ),\n _).\nfilterSupRelatedAttacks([], []).\nfilterSupRelatedAttacks([(T, A, B, C)|Attacks], [(T, A, B, C)|Invalid]) :-\n invalid(T, A, B, C, _),\n filterSupRelatedAttacks(Attacks, Invalid), !.\nfilterSupRelatedAttacks([_|Attacks], Invalid) :-\n filterSupRelatedAttacks(Attacks, Invalid).\ninvalid(rebut, A, B, C, SupSet) :- superiority::superiorArgument(C, A, SupSet), !.\ninvalid(undermine, A, B, C, SupSet) :- superiority::superiorArgument(C, A, SupSet), !.\n/*\n* Translates the attack relations identified during the building phase.\n* Attack from A to B -> Argument [[], attack, Attack]\n* support(A, Argument)\n* attack(Argument, B)\n* If an Argument A built in this way attacks the argument B, and this one also attacks a third argument C\n* through the argument B1 we have to consider an attack from A to B1 (transitive attack)\n*/\nconvertAttacks(Attacks) :-\n conversion(Attacks),\n standard_af::buildTransitiveAttacks.\nconversion(List) :-\n member((T, A, B, B), List),\n generateDirectAttackArgument(T, A, B, B),\n fail.\nconversion(List) :-\n member((T, A, B, C), List),\n C \\= B,\n generateTransitiveAttackArgument(T, A, B, C),\n fail.\nconversion(_).\ngenerateTransitiveAttackArgument(T, A, B, C) :-\n context_check(argument([Id, attack, [attack(T, A, C, C)], G, I])),\n context_assert(attack(T, [Id, attack, [attack(T, A, C, C)], G, I], B, C)),\n context_retract(attack(T, A, B, C)).\ngenerateDirectAttackArgument(T, A, B, B) :-\n RArgument = [[attack], attack, [attack(T, A, B, B)], [], [[attack], [attack], []]],\n \\+ context_check(argument(RArgument)),\n context_assert(argument(RArgument)),\n context_assert(support(A, RArgument)),\n context_assert(attack(T, RArgument, B, B)),\n context_retract(attack(T, A, B, B)).\n/*\n* Computes the pref attack. If an Argument A has a conclusion in the form sup(a, b), we verify if\n* the attacks involving arguments built on the rules a or b are compatible with this preference.\n* If there are some contradictions we add an attack from the argument A towards the incompatible attack\n*/\nbuildPrefAttacks :-\n context_check(argument([IdB, attack, [attack(T, A, B, C)], G, I])),\n invalid(T, A, B, C, SupSet),\n member(X, SupSet),\n context_check(argument([IdA, TRA, [X], GG, II])),\n Attack = attack(pref, [IdA, TRA, [X], GG, II], [IdB, attack, [attack(T, A, B, C)], G, I], [IdB, attack, [attack(T, A, B, C)], G, I]),\n \\+ context_check(Attack),\n context_assert(Attack),\n fail.\nbuildPrefAttacks.';
|
|
762
707
|
}
|
|
763
708
|
var DefPreferences_instance;
|
|
764
709
|
function DefPreferences_getInstance() {
|
|
765
|
-
if (DefPreferences_instance == null)
|
|
766
|
-
new DefPreferences();
|
|
767
710
|
return DefPreferences_instance;
|
|
768
711
|
}
|
|
769
712
|
function GenericDefPreferences() {
|
|
770
|
-
|
|
771
|
-
this.d39_1 = 'modifyArgumentationGraph :-\n defeasiblePref::assertAllSup,\n findall((T, A, B, C), context_check(attack(T, A, B, C)), Attacks),\n defeasiblePref::filterSupRelatedAttacks(Attacks, InvalidAttacks),\n defeasiblePref::convertAttacks(InvalidAttacks),\n buildPrefAttacks,\n standard_af::buildTransitiveAttacks.\nbuildPrefAttacks :-\n context_check(argument([IdB, attack, [attack(T, A, B, C)], G, I])),\n defeasiblePref::invalid(T, A, B, C, SupSet),\n createSuperiorityArgument(SupSet, Arg),\n write(Arg), nl,\n Attack = attack(pref, Arg, [IdB, attack, [attack(T, A, B, C)], G, I], [IdB, attack, [attack(T, A, B, C)], G, I]),\n \\+ context_check(Attack),\n context_assert(Attack),\n fail.\nbuildPrefAttacks.\ncreateSuperiorityArgument(SupSet, Argument) :-\n findall([Id, TR, [X], G, I], (\n member(X, SupSet),\n context_check(argument([Id, TR, [X], G, I]))\n ), SupportArguments),\n mergeIds(SupportArguments, MergedId),\n Argument = [MergedId, pref, [mergedPreference], [], [[pref], MergedId, []]],\n \\+ context_check(argument(Argument)),\n context_assert(argument(Argument)),\n findall(_, (\n member(A, SupportArguments),\n \\+ context_check(support(A, Argument)),\n context_assert(support(A, Argument))\n ), _).\nmergeIds([], [pref]).\nmergeIds(Arguments, [pref|MergedId]) :-\n findall(Id, member([Id, _, _, _, _], Arguments), Res),\n utils::appendLists(Res, MergedId).';
|
|
713
|
+
this.x3a_1 = 'modifyArgumentationGraph :-\n defeasiblePref::assertAllSup,\n findall((T, A, B, C), context_check(attack(T, A, B, C)), Attacks),\n defeasiblePref::filterSupRelatedAttacks(Attacks, InvalidAttacks),\n defeasiblePref::convertAttacks(InvalidAttacks),\n buildPrefAttacks,\n standard_af::buildTransitiveAttacks.\nbuildPrefAttacks :-\n context_check(argument([IdB, attack, [attack(T, A, B, C)], G, I])),\n defeasiblePref::invalid(T, A, B, C, SupSet),\n createSuperiorityArgument(SupSet, Arg),\n write(Arg), nl,\n Attack = attack(pref, Arg, [IdB, attack, [attack(T, A, B, C)], G, I], [IdB, attack, [attack(T, A, B, C)], G, I]),\n \\+ context_check(Attack),\n context_assert(Attack),\n fail.\nbuildPrefAttacks.\ncreateSuperiorityArgument(SupSet, Argument) :-\n findall([Id, TR, [X], G, I], (\n member(X, SupSet),\n context_check(argument([Id, TR, [X], G, I]))\n ), SupportArguments),\n mergeIds(SupportArguments, MergedId),\n Argument = [MergedId, pref, [mergedPreference], [], [[pref], MergedId, []]],\n \\+ context_check(argument(Argument)),\n context_assert(argument(Argument)),\n findall(_, (\n member(A, SupportArguments),\n \\+ context_check(support(A, Argument)),\n context_assert(support(A, Argument))\n ), _).\nmergeIds([], [pref]).\nmergeIds(Arguments, [pref|MergedId]) :-\n findall(Id, member([Id, _, _, _, _], Arguments), Res),\n utils::appendLists(Res, MergedId).';
|
|
772
714
|
}
|
|
773
715
|
var GenericDefPreferences_instance;
|
|
774
716
|
function GenericDefPreferences_getInstance() {
|
|
775
|
-
if (GenericDefPreferences_instance == null)
|
|
776
|
-
new GenericDefPreferences();
|
|
777
717
|
return GenericDefPreferences_instance;
|
|
778
718
|
}
|
|
779
719
|
function Grounded() {
|
|
780
|
-
|
|
781
|
-
this.b3a_1 = 'argumentLabelling :-\n findall(X, context_check(argument(X)), Arguments),\n groundedLabelling(Arguments).\ngroundedLabelling(UND) :-\n member(A, UND),\n allAttacksOUT(A), !,\n utils::subtract(UND, [A], NewUND),\n context_assert(in(A)),\n groundedLabelling(NewUND).\ngroundedLabelling(UND) :-\n member(A, UND),\n oneAttackIN(A), !,\n utils::subtract(UND, [A], NewUND),\n context_assert(out(A)),\n groundedLabelling(NewUND).\ngroundedLabelling(Args) :- findall(_, (member(A, Args), context_assert(und(A))), _).\nallAttacksOUT(A) :-\n \\+ ( context_check(attack(_, B, A, _)), \\+ (context_check(out(B)))).\noneAttackIN(A) :-\n context_check(attack(_, B, A, _)),\n context_check(in(B)), !.\noneAttackIN(A) :-\n context_check(attack(_, A, B, _)),\n context_check(in(B)), !.';
|
|
720
|
+
this.v3b_1 = 'argumentLabelling :-\n findall(X, context_check(argument(X)), Arguments),\n groundedLabelling(Arguments).\ngroundedLabelling(UND) :-\n member(A, UND),\n allAttacksOUT(A), !,\n utils::subtract(UND, [A], NewUND),\n context_assert(in(A)),\n groundedLabelling(NewUND).\ngroundedLabelling(UND) :-\n member(A, UND),\n oneAttackIN(A), !,\n utils::subtract(UND, [A], NewUND),\n context_assert(out(A)),\n groundedLabelling(NewUND).\ngroundedLabelling(Args) :- findall(_, (member(A, Args), context_assert(und(A))), _).\nallAttacksOUT(A) :-\n \\+ ( context_check(attack(_, B, A, _)), \\+ (context_check(out(B)))).\noneAttackIN(A) :-\n context_check(attack(_, B, A, _)),\n context_check(in(B)), !.\noneAttackIN(A) :-\n context_check(attack(_, A, B, _)),\n context_check(in(B)), !.';
|
|
782
721
|
}
|
|
783
722
|
var Grounded_instance;
|
|
784
723
|
function Grounded_getInstance() {
|
|
785
|
-
if (Grounded_instance == null)
|
|
786
|
-
new Grounded();
|
|
787
724
|
return Grounded_instance;
|
|
788
725
|
}
|
|
789
726
|
function GroundedOptimized() {
|
|
790
|
-
|
|
791
|
-
this.f3a_1 = 'argumentLabelling :-\n groundedLabelling.\ngroundedLabelling :-\n findall(t, evaluateIn, I),\n findall(t, evaluateOut, O),\n finalize(I, O).\nevaluateIn :-\n argument_to_evaluate(A, IdA),\n allAttacksOUT(IdA),\n context_assert(in(A)),\n context_assert(inId(IdA)).\nevaluateOut :-\n argument_to_evaluate(A, IdA),\n oneAttackIN(IdA),\n context_assert(out(A)),\n context_assert(outId(IdA)).\nfinalize(I, O) :- I \\= [], !, groundedLabelling.\nfinalize(I, O) :- O \\= [], !, groundedLabelling.\nfinalize([], []) :-\n argument_to_evaluate(A, _),\n context_assert(und(A)),\n fail.\nfinalize(_, _).\nargument_to_evaluate(X, IdX) :-\n context_check(clause(arg(IdX), argument(X))),\n \\+ context_check(outId(IdX)),\n \\+ context_check(inId(IdX)).\nallAttacksOUT(A) :-\n \\+ ( context_check(clause(att(B, A), _)), \\+ (context_check(outId(B)))).\noneAttackIN(A) :-\n context_check(clause(att(B, A), _)),\n context_check(inId(B)), !.\noneAttackIN(A) :-\n context_check(clause(att(A, B), _)),\n context_check(inId(B)), !.';
|
|
727
|
+
this.z3b_1 = 'argumentLabelling :-\n groundedLabelling.\ngroundedLabelling :-\n findall(t, evaluateIn, I),\n findall(t, evaluateOut, O),\n finalize(I, O).\nevaluateIn :-\n argument_to_evaluate(A, IdA),\n allAttacksOUT(IdA),\n context_assert(in(A)),\n context_assert(inId(IdA)).\nevaluateOut :-\n argument_to_evaluate(A, IdA),\n oneAttackIN(IdA),\n context_assert(out(A)),\n context_assert(outId(IdA)).\nfinalize(I, O) :- I \\= [], !, groundedLabelling.\nfinalize(I, O) :- O \\= [], !, groundedLabelling.\nfinalize([], []) :-\n argument_to_evaluate(A, _),\n context_assert(und(A)),\n fail.\nfinalize(_, _).\nargument_to_evaluate(X, IdX) :-\n context_check(clause(arg(IdX), argument(X))),\n \\+ context_check(outId(IdX)),\n \\+ context_check(inId(IdX)).\nallAttacksOUT(A) :-\n \\+ ( context_check(clause(att(B, A), _)), \\+ (context_check(outId(B)))).\noneAttackIN(A) :-\n context_check(clause(att(B, A), _)),\n context_check(inId(B)), !.\noneAttackIN(A) :-\n context_check(clause(att(A, B), _)),\n context_check(inId(B)), !.';
|
|
792
728
|
}
|
|
793
729
|
var GroundedOptimized_instance;
|
|
794
730
|
function GroundedOptimized_getInstance() {
|
|
795
|
-
if (GroundedOptimized_instance == null)
|
|
796
|
-
new GroundedOptimized();
|
|
797
731
|
return GroundedOptimized_instance;
|
|
798
732
|
}
|
|
799
733
|
function Preferences() {
|
|
800
|
-
|
|
801
|
-
this.h39_1 = 'modifyArgumentationGraph :-\n findall(_, (\n context_check(attack(T, A, B, C)),\n checkStandardPreference(T, A, B, C)\n ), _).\ncheckStandardPreference(T, A, B, C) :-\n \\+ standardPreferences(T, A, B, C),\n context_retract(attack(T, A, B, C)),\n hashed_attack(attack(T, A, B, C), Y),\n context_retract(Y).\nstandardPreferences(rebut, A, _, C) :- \\+ superiority::superiorArgument(C, A).\nstandardPreferences(undermine, A, _, C) :- \\+ superiority::superiorArgument(C, A).\nstandardPreferences(contrary_rebut, _, _, _).\nstandardPreferences(contrary_undermine, _, _, _).\nstandardPreferences(undercut, _, _, _).\nhashed_attack(attack(T, A, B, C), att(IdA, IdB) :- attack(T, A, B, C)) :-\n utils::hash(argument(A), IdA),\n utils::hash(argument(B), IdB).';
|
|
734
|
+
this.b3b_1 = 'modifyArgumentationGraph :-\n findall(_, (\n context_check(attack(T, A, B, C)),\n checkStandardPreference(T, A, B, C)\n ), _).\ncheckStandardPreference(T, A, B, C) :-\n \\+ standardPreferences(T, A, B, C),\n context_retract(attack(T, A, B, C)),\n hashed_attack(attack(T, A, B, C), Y),\n context_retract(Y).\nstandardPreferences(rebut, A, _, C) :- \\+ superiority::superiorArgument(C, A).\nstandardPreferences(undermine, A, _, C) :- \\+ superiority::superiorArgument(C, A).\nstandardPreferences(contrary_rebut, _, _, _).\nstandardPreferences(contrary_undermine, _, _, _).\nstandardPreferences(undercut, _, _, _).\nhashed_attack(attack(T, A, B, C), att(IdA, IdB) :- attack(T, A, B, C)) :-\n utils::hash(argument(A), IdA),\n utils::hash(argument(B), IdB).';
|
|
802
735
|
}
|
|
803
736
|
var Preferences_instance;
|
|
804
737
|
function Preferences_getInstance() {
|
|
805
|
-
if (Preferences_instance == null)
|
|
806
|
-
new Preferences();
|
|
807
738
|
return Preferences_instance;
|
|
808
739
|
}
|
|
809
740
|
function QueryMode() {
|
|
810
|
-
|
|
811
|
-
this.p3a_1 = 'computeStatementAcceptance(Goal, YesResult, NoResult, UndResult) :-\n \\+ queryMode,\n abstract:::computeGlobalAcceptance,\n mineResults(Goal, YesResult, NoResult, UndResult).\ncomputeStatementAcceptance(Goal, YesResult, NoResult, UndResult) :-\n queryMode,\n argumentLabellingMode(grounded),\n findall(_, query(Goal, _), _),\n (ambiguityBlocking ->\n statement_binary:::statementLabelling;\n statementLabellingMode(Y),\n Y:::statementLabelling\n ),\n mineResults(Goal, YesResult, NoResult, UndResult).\nmineResults(Goal, YesResult, NoResult, UndResult) :-\n findall(Goal, context_check(statIn([Goal])), In),\n findall(Goal, context_check(statOut([Goal])), Out),\n findall(Goal, context_check(statUnd([Goal])), Und),\n utils::sort(In, YesResult),\n utils::sort(Out, NoResult),\n utils::sort(Und, UndResult).\nquery(Query, Res) :-\n buildArgument(Query, Argument),\n once(defend(Argument, [], Res)).\nquery(Query, und) :- \\+ buildArgument(Query, _).\ndefend(Argument, _, no) :- context_check(out(Argument)).\ndefend(Argument, _, und) :- context_check(und(Argument)).\ndefend(Argument, _, yes) :- context_check(in(Argument)).\ndefend(Argument, QueryChain, no) :-\n findAttacker(Argument, QueryChain, Attacker, yes),\n once(defend(Attacker, [Argument|QueryChain], X)),\n X == yes,\n bufferResult(Argument, no), !.\ndefend(Argument, QueryChain, Res) :-\n findAttacker(Argument, QueryChain, Attacker, yes),\n once(defend(Attacker, [Argument|QueryChain], X)),\n X == und,\n ambiguityCheck(Argument, Attacker, Res),\n bufferResult(Argument, Res), !.\ncomplementary([_, _, ConclusionA, _, _], [_, _, ConclusionB, _, _]) :-\n standard_af::conflict(ConclusionA, ConclusionB).\nambiguityCheck(A, B, no) :- ambiguityBlocking,\n \\+ complementary(A, B),\n context_check(attack(direct, B, A, _)), !.\nambiguityCheck(_, _, und).\ndefend(Argument, QueryChain, und) :-\n findAttacker(Argument, QueryChain, Attacker, no),\n bufferResult(Argument, und), !.\ndefend(Argument, QueryChain, yes) :- bufferResult(Argument, yes).\nbufferResult(Argument, no) :- \\+ context_check(out(Argument)), context_assert(out(Argument)), !.\nbufferResult(Argument, yes) :- \\+ context_check(in(Argument)), context_assert(in(Argument)), !.\nbufferResult(Argument, und) :- \\+ context_check(und(Argument)), context_assert(und(Argument)), !.\nbufferResult(_, _).\nfindAttacker(Target, QueryChain, Attacker, IsValid) :-\n attacker(Target, Attacker, Type),\n bufferAttacker(Attacker, Target, Type),\n detectCycle(Attacker, QueryChain, IsValid).\nbufferAttacker(Attacker, Target, Type) :-\n \\+ context_check(attack(Type, Attacker, Target, none)),\n context_assert(attack(Type, Attacker, Target, none)), !.\nbufferAttacker(_, _, _).\ndetectCycle(Attacker, QueryChain, yes) :- \\+ member(Attacker, QueryChain).\ndetectCycle(Attacker, QueryChain, no) :- member(Attacker, QueryChain).\nattacker([Rules, TopRule, Conclusion, Groundings, ArgInfo], Argument, Type) :-\n member(X, Rules),\n \\+ parser::strict(X),\n attackerOnRule(X, [Rules, TopRule, Conclusion, Groundings, ArgInfo], Argument, Type).\nattacker([Rules, TopRule, Conclusion, Groundings, ArgInfo], Argument, Type) :-\n member(X, Groundings),\n attackerOnTerm(X, [Rules, TopRule, Conclusion, Groundings, ArgInfo], Argument, Type).\nattackerOnRule(Rule, _, Argument, undercut) :-\n parser::undercut(Undercut, Rule),\n buildArgument(Undercut, Argument).\nattackerOnTerm(Term, [TargetRules, TopRule, Conclusion, Groundings, ArgInfo], Attacker, direct) :-\n \\+ parser::contrary(Term, _),\n \\+ strict([TargetRules, TopRule, Conclusion, Groundings, ArgInfo]),\n (graphExtension(rebutRestriction) ->\n (\n getSubArgument(Term, TargetRules, SubArgument),\n rebutRestriction(SubArgument)\n );\n true\n ),\n standard_af::conflict(Term, [X]),\n buildArgument(X, Attacker),\n (graphExtension(standardPref) ->\n (\n once(getSubArgument(Term, TargetRules, SubArgument)),\n \\+ superiorArgument(SubArgument, Attacker)\n );\n true\n ).\nattackerOnTerm(Unless, _, Attacker, contrary) :-\n parser::contrary(Unless, X),\n buildArgument(X, Attacker).\nstrict([_, _, _, _, [_, [], []]]).\nrebutRestriction([TargetRules, none, Conclusion, Groundings, ArgInfo]) :-\n graphExtension(rebutRestriction).\nrebutRestriction([TargetRules, TopRule, Conclusion, Groundings, ArgInfo]) :-\n graphExtension(rebutRestriction),\n TopRule \\= none,\n rebutRestriction::restrict([TargetRules, TopRule, Conclusion, Groundings, ArgInfo]).\nrebutRestriction(_) :- \\+ graphExtension(rebutRestriction).\nsuperiorArgument(SubArgument, Attacker) :-\n superiority::superiorArgument(SubArgument, Attacker).\ngetSubArgument(Term, Rules, [SubRules, SubTopRule, SubConclusion, SubGrounds, Info]) :-\n context_check(clause(support(Term), argument([SubRules, SubTopRule, SubConclusion, SubGrounds, Info]))),\n contained(SubRules, Rules).\ncontained([], _).\ncontained([H|T], Target) :- member(H, Target), contained(T, Target).\nbuildArgument(Query, Argument) :-\n \\+ context_check(explored(Query)),\n findall(_, (\n buildSingleArgument([Query], Argument),\n context_assert(argument(Argument))\n ), _),\n context_assert(explored(Query)),\n fail.\nbuildArgument(Query, [R, T, [Query], B, I]) :- context_check(argument([R, T, [Query], B, I])).\nbuildSingleArgument(Query, Argument) :-\n build(Query, [], Groundings, [AllRules, TopRule, LastDefRules, DefRules, DefPremises]),\n utils::deduplicate(DefRules, CDefRules),\n utils::deduplicate(DefPremises, CDefPremises),\n utils::deduplicate(Groundings, CGroundings),\n Argument = [AllRules, TopRule, Query, CGroundings, [LastDefRules, CDefRules, CDefPremises]].\nbuild(Check, _, [], []) :- parser::prolog(Check, Term), (callable(Term) -> call(Term); Term), !.\nbuild(Unless, _, [Unless], []) :- parser::contrary(Unless, _), !.\nbuild(Conclusion, _, [Conclusion], [AllRules, TopRule, LastDefRules, DefRules, DefPremises]) :-\n parser::premise(Id, Conclusion),\n premiseRules(Id, [AllRules, TopRule, LastDefRules, DefRules, DefPremises]),\n context_assert(support(Conclusion) :- argument([AllRules, TopRule, Conclusion, [Conclusion], [LastDefRules, DefRules, DefPremises]])).\nbuild(Conclusion, Ids, [Conclusion|Conclusions], [AllRules, TopRule, LastDefRules, DefRules, DefPremises]) :-\n parser::rule(Id, Premises, Conclusion),\n \\+ member(Id, Ids),\n buildPremises(Premises, [Id|Ids], Conclusions, ResRules),\n ruleRules(Id, ResRules, [AllRules, TopRule, LastDefRules, DefRules, DefPremises]),\n context_assert(support(Conclusion) :- argument([AllRules, TopRule, Conclusion, [Conclusion|Conclusions], [LastDefRules, DefRules, DefPremises]])).\nbuildPremises([], _, [], [[], [], [], []]).\nbuildPremises([H|T], Ids, Conclusions, Rules) :-\n build([H], Ids, HConclusions, HRules),\n buildPremises(T, Ids, TConclusions, TRules),\n utils::appendLists([HConclusions, TConclusions], Conclusions),\n mergeRules(HRules, TRules, Rules).\npremiseRules(Id, [[Id], none, [], [], [Id]]) :- \\+ parser::check_strict(Id), !.\npremiseRules(Id, [[Id], none, [], [], []]) :- parser::check_strict(Id).\nruleRules(Id, [AllRules, _, DefRules, DefPremises],\n [[Id|AllRules], Id, [Id], [Id|DefRules], DefPremises]) :- \\+ parser::check_strict(Id), !.\nruleRules(Id, [AllRules, LastDefRules, DefRules, DefPremises],\n [[Id|AllRules], Id, LastDefRules, DefRules, DefPremises]) :- parser::check_strict(Id).\nmergeRules([], [AllRules, LastDefRules, DefRules, DefPremises], [AllRules, LastDefRules, DefRules, DefPremises]) :- !.\nmergeRules([HAR, _, HLDR, HDR, HDP], [TAR, TLDR, TDR, TDP], [AR, LDR, DR, DP]) :-\n utils::appendLists([HAR, TAR], AR),\n utils::appendLists([HLDR, TLDR], LDR),\n utils::appendLists([HDR, TDR], DR),\n utils::appendLists([HDP, TDP], DP).';
|
|
741
|
+
this.j3c_1 = 'computeStatementAcceptance(Goal, YesResult, NoResult, UndResult) :-\n \\+ queryMode,\n abstract:::computeGlobalAcceptance,\n mineResults(Goal, YesResult, NoResult, UndResult).\ncomputeStatementAcceptance(Goal, YesResult, NoResult, UndResult) :-\n queryMode,\n argumentLabellingMode(grounded),\n findall(_, query(Goal, _), _),\n (ambiguityBlocking ->\n statement_binary:::statementLabelling;\n statementLabellingMode(Y),\n Y:::statementLabelling\n ),\n mineResults(Goal, YesResult, NoResult, UndResult).\nmineResults(Goal, YesResult, NoResult, UndResult) :-\n findall(Goal, context_check(statIn([Goal])), In),\n findall(Goal, context_check(statOut([Goal])), Out),\n findall(Goal, context_check(statUnd([Goal])), Und),\n utils::sort(In, YesResult),\n utils::sort(Out, NoResult),\n utils::sort(Und, UndResult).\nquery(Query, Res) :-\n buildArgument(Query, Argument),\n once(defend(Argument, [], Res)).\nquery(Query, und) :- \\+ buildArgument(Query, _).\ndefend(Argument, _, no) :- context_check(out(Argument)).\ndefend(Argument, _, und) :- context_check(und(Argument)).\ndefend(Argument, _, yes) :- context_check(in(Argument)).\ndefend(Argument, QueryChain, no) :-\n findAttacker(Argument, QueryChain, Attacker, yes),\n once(defend(Attacker, [Argument|QueryChain], X)),\n X == yes,\n bufferResult(Argument, no), !.\ndefend(Argument, QueryChain, Res) :-\n findAttacker(Argument, QueryChain, Attacker, yes),\n once(defend(Attacker, [Argument|QueryChain], X)),\n X == und,\n ambiguityCheck(Argument, Attacker, Res),\n bufferResult(Argument, Res), !.\ncomplementary([_, _, ConclusionA, _, _], [_, _, ConclusionB, _, _]) :-\n standard_af::conflict(ConclusionA, ConclusionB).\nambiguityCheck(A, B, no) :- ambiguityBlocking,\n \\+ complementary(A, B),\n context_check(attack(direct, B, A, _)), !.\nambiguityCheck(_, _, und).\ndefend(Argument, QueryChain, und) :-\n findAttacker(Argument, QueryChain, Attacker, no),\n bufferResult(Argument, und), !.\ndefend(Argument, QueryChain, yes) :- bufferResult(Argument, yes).\nbufferResult(Argument, no) :- \\+ context_check(out(Argument)), context_assert(out(Argument)), !.\nbufferResult(Argument, yes) :- \\+ context_check(in(Argument)), context_assert(in(Argument)), !.\nbufferResult(Argument, und) :- \\+ context_check(und(Argument)), context_assert(und(Argument)), !.\nbufferResult(_, _).\nfindAttacker(Target, QueryChain, Attacker, IsValid) :-\n attacker(Target, Attacker, Type),\n bufferAttacker(Attacker, Target, Type),\n detectCycle(Attacker, QueryChain, IsValid).\nbufferAttacker(Attacker, Target, Type) :-\n \\+ context_check(attack(Type, Attacker, Target, none)),\n context_assert(attack(Type, Attacker, Target, none)), !.\nbufferAttacker(_, _, _).\ndetectCycle(Attacker, QueryChain, yes) :- \\+ member(Attacker, QueryChain).\ndetectCycle(Attacker, QueryChain, no) :- member(Attacker, QueryChain).\nattacker([Rules, TopRule, Conclusion, Groundings, ArgInfo], Argument, Type) :-\n member(X, Rules),\n \\+ parser::strict(X),\n attackerOnRule(X, [Rules, TopRule, Conclusion, Groundings, ArgInfo], Argument, Type).\nattacker([Rules, TopRule, Conclusion, Groundings, ArgInfo], Argument, Type) :-\n member(X, Groundings),\n attackerOnTerm(X, [Rules, TopRule, Conclusion, Groundings, ArgInfo], Argument, Type).\nattackerOnRule(Rule, _, Argument, undercut) :-\n parser::undercut(Undercut, Rule),\n buildArgument(Undercut, Argument).\nattackerOnTerm(Term, [TargetRules, TopRule, Conclusion, Groundings, ArgInfo], Attacker, direct) :-\n \\+ parser::contrary(Term, _),\n \\+ strict([TargetRules, TopRule, Conclusion, Groundings, ArgInfo]),\n (graphExtension(rebutRestriction) ->\n (\n getSubArgument(Term, TargetRules, SubArgument),\n rebutRestriction(SubArgument)\n );\n true\n ),\n standard_af::conflict(Term, [X]),\n buildArgument(X, Attacker),\n (graphExtension(standardPref) ->\n (\n once(getSubArgument(Term, TargetRules, SubArgument)),\n \\+ superiorArgument(SubArgument, Attacker)\n );\n true\n ).\nattackerOnTerm(Unless, _, Attacker, contrary) :-\n parser::contrary(Unless, X),\n buildArgument(X, Attacker).\nstrict([_, _, _, _, [_, [], []]]).\nrebutRestriction([TargetRules, none, Conclusion, Groundings, ArgInfo]) :-\n graphExtension(rebutRestriction).\nrebutRestriction([TargetRules, TopRule, Conclusion, Groundings, ArgInfo]) :-\n graphExtension(rebutRestriction),\n TopRule \\= none,\n rebutRestriction::restrict([TargetRules, TopRule, Conclusion, Groundings, ArgInfo]).\nrebutRestriction(_) :- \\+ graphExtension(rebutRestriction).\nsuperiorArgument(SubArgument, Attacker) :-\n superiority::superiorArgument(SubArgument, Attacker).\ngetSubArgument(Term, Rules, [SubRules, SubTopRule, SubConclusion, SubGrounds, Info]) :-\n context_check(clause(support(Term), argument([SubRules, SubTopRule, SubConclusion, SubGrounds, Info]))),\n contained(SubRules, Rules).\ncontained([], _).\ncontained([H|T], Target) :- member(H, Target), contained(T, Target).\nbuildArgument(Query, Argument) :-\n \\+ context_check(explored(Query)),\n findall(_, (\n buildSingleArgument([Query], Argument),\n context_assert(argument(Argument))\n ), _),\n context_assert(explored(Query)),\n fail.\nbuildArgument(Query, [R, T, [Query], B, I]) :- context_check(argument([R, T, [Query], B, I])).\nbuildSingleArgument(Query, Argument) :-\n build(Query, [], Groundings, [AllRules, TopRule, LastDefRules, DefRules, DefPremises]),\n utils::deduplicate(DefRules, CDefRules),\n utils::deduplicate(DefPremises, CDefPremises),\n utils::deduplicate(Groundings, CGroundings),\n Argument = [AllRules, TopRule, Query, CGroundings, [LastDefRules, CDefRules, CDefPremises]].\nbuild(Check, _, [], []) :- parser::prolog(Check, Term), (callable(Term) -> call(Term); Term), !.\nbuild(Unless, _, [Unless], []) :- parser::contrary(Unless, _), !.\nbuild(Conclusion, _, [Conclusion], [AllRules, TopRule, LastDefRules, DefRules, DefPremises]) :-\n parser::premise(Id, Conclusion),\n premiseRules(Id, [AllRules, TopRule, LastDefRules, DefRules, DefPremises]),\n context_assert(support(Conclusion) :- argument([AllRules, TopRule, Conclusion, [Conclusion], [LastDefRules, DefRules, DefPremises]])).\nbuild(Conclusion, Ids, [Conclusion|Conclusions], [AllRules, TopRule, LastDefRules, DefRules, DefPremises]) :-\n parser::rule(Id, Premises, Conclusion),\n \\+ member(Id, Ids),\n buildPremises(Premises, [Id|Ids], Conclusions, ResRules),\n ruleRules(Id, ResRules, [AllRules, TopRule, LastDefRules, DefRules, DefPremises]),\n context_assert(support(Conclusion) :- argument([AllRules, TopRule, Conclusion, [Conclusion|Conclusions], [LastDefRules, DefRules, DefPremises]])).\nbuildPremises([], _, [], [[], [], [], []]).\nbuildPremises([H|T], Ids, Conclusions, Rules) :-\n build([H], Ids, HConclusions, HRules),\n buildPremises(T, Ids, TConclusions, TRules),\n utils::appendLists([HConclusions, TConclusions], Conclusions),\n mergeRules(HRules, TRules, Rules).\npremiseRules(Id, [[Id], none, [], [], [Id]]) :- \\+ parser::check_strict(Id), !.\npremiseRules(Id, [[Id], none, [], [], []]) :- parser::check_strict(Id).\nruleRules(Id, [AllRules, _, DefRules, DefPremises],\n [[Id|AllRules], Id, [Id], [Id|DefRules], DefPremises]) :- \\+ parser::check_strict(Id), !.\nruleRules(Id, [AllRules, LastDefRules, DefRules, DefPremises],\n [[Id|AllRules], Id, LastDefRules, DefRules, DefPremises]) :- parser::check_strict(Id).\nmergeRules([], [AllRules, LastDefRules, DefRules, DefPremises], [AllRules, LastDefRules, DefRules, DefPremises]) :- !.\nmergeRules([HAR, _, HLDR, HDR, HDP], [TAR, TLDR, TDR, TDP], [AR, LDR, DR, DP]) :-\n utils::appendLists([HAR, TAR], AR),\n utils::appendLists([HLDR, TLDR], LDR),\n utils::appendLists([HDR, TDR], DR),\n utils::appendLists([HDP, TDP], DP).';
|
|
812
742
|
}
|
|
813
743
|
var QueryMode_instance;
|
|
814
744
|
function QueryMode_getInstance() {
|
|
815
|
-
if (QueryMode_instance == null)
|
|
816
|
-
new QueryMode();
|
|
817
745
|
return QueryMode_instance;
|
|
818
746
|
}
|
|
819
747
|
function RuleTranslator() {
|
|
820
|
-
|
|
821
|
-
this.n3a_1 = "/*\n * Main directive. Find all the rules in the theory in the format (Name : Preconditions => Conclusion)\n * or (Name : Effects) and then if:\n * - It is a standard rule, translate it in the standard format (rule([Name, Preconditions, Conclusions]));\n * - It is a bp rule, translate it to (abstractBp([Effects]))\n * During the process, clean them from the unallowed symbols (-, o, p).\n */\nconvertAllRules(ArgRules) :-\n defeasibleRules(DefeasibleRules),\n strictRules(StrictRules, RulesIds),\n ordinaryPremises(Premises),\n axiomPremises(Axioms, AxiomsIds),\n specialRules(SpecialRules),\n utils::appendLists([DefeasibleRules, StrictRules, Premises, Axioms], Rules),\n rule_to_clause(Rules, Clauses),\n findall(sup(X, Y), sup(X, Y), Sup),\n utils::appendLists([Clauses, AxiomsIds, RulesIds, Sup, SpecialRules], ArgRules),\n utils::assert_all(ArgRules), !.\ndefeasibleRules(DefeasibleRules) :-\n findall([RuleName, Preconditions, Effect], (RuleName : Preconditions => Effect), DefeasibleRulesOld),\n prologDefeasibleRules(DefeasibleRulesNew),\n utils::append_fast(DefeasibleRulesOld, DefeasibleRulesNew, DefeasibleRules).\nstrictRules(CtrRules, Ids) :-\n findall([RuleName, Preconditions, Effect], (RuleName : Preconditions -> Effect), StrictRulesOld),\n prologStrictRules(StrictRulesNew),\n utils::append_fast(StrictRulesOld, StrictRulesNew, StrictRules),\n transpose(StrictRules, StrictRules, CtrRules),\n extract_id(CtrRules, Ids).\nordinaryPremises(Premises) :-\n findall([RuleName, Effect], ((RuleName :=> Effect), atom(RuleName)), PremisesOld),\n prologPremises(PremisesNew),\n utils::append_fast(PremisesOld, PremisesNew, Premises).\naxiomPremises(Axioms, Ids) :-\n findall([RuleName, Effect], ((RuleName :-> Effect), atom(RuleName)), AxiomsOld),\n prologAxioms(AxiomsNew),\n utils::append_fast(AxiomsOld, AxiomsNew, Axioms),\n extract_id(Axioms, Ids).\nspecialRules(SpecialRules) :-\n bpsNew(SpecialRules).\ntranspose(_, CtrRules, CtrRules) :- \\+ autoTransposition, !.\ntranspose([], CtrRules, CtrRules).\ntranspose([H|T], TempCtrRules, CtrRules) :-\n transpose(T, TempCtrRules, CR),\n findall(TrH, transposition(H, TrH), Tran),\n mergeCtrRules(CR, Tran, CtrRules).\nmergeCtrRules(All, ToMerge, X) :-\n utils::append_fast(All, ToMerge, XT),\n deduplicate(XT, X).\ndeduplicate([], []).\ndeduplicate([[RN,A,B]|T], X) :- deduplicate(T, TT), (member([RN,_,_], TT) -> X = TT; X = [[RN,A,B]|TT]). \ntransposition([Id, Prec, Effect], [Id, Prec, Effect]).\ntransposition([Id, Prec, Effect], [NewId, NewPrec ,XNegated]) :-\n compound(Prec),\n tuple_to_list(Prec, LPrec),!,\n transposition_sequential(LPrec, LPrec, Effect, Id, [], NewPrec, XNegated, NewId).\ntransposition([Id, Prec, Effect], [NewId, EffectNegated ,XNegated]) :-\n \\+ compound(Prec),\n Prec \\== [],\n prologEscape(Prec),\n negate(Prec, XNegated),\n negate(Effect, EffectNegated),\n atom_concat(Id, '_i', NewId).\ntransposition_sequential(LPrec, [H|T], Effect, Id, Skipped, NewPrec, XNegated, NewId) :-\n transposition_sequential(LPrec, T, Effect, Id, [H|Skipped], NewPrec, XNegated, NewId).\ntransposition_sequential(LPrec, [X|T], Effect, Id, Skipped, NewPrec, XNegated, NewId) :-\n prologEscape(X),\n utils::append_fast(Skipped, T, CleanedPrec),\n negate(X, XNegated),\n negate(Effect, EffectNegated),\n list_to_tuple([EffectNegated|CleanedPrec], NewPrec),\n newIdentifier(Skipped, Id, NewId).\nnewIdentifier(List, OldId, NewId) :-\n modifier(List, Mod),\n atom_concat(OldId, Mod, NewId).\nmodifier([], '_i').\nmodifier([_|Tail], Index):-\n modifier(Tail, Index1),\n atom_concat(Index1, 'i', Index).\nnegate(X, Arg) :-\n functor(X, '-', _) -> (\n arg(1, X, Arg));\n functor(X, 'p', _) -> (\n arg(1, X, PX),\n (functor(PX, '-', _) -> (\n arg(1, PX, PNX),\n Arg = o(PNX)\n );\n Arg = o(-(PX))));\n Arg = -(X).\nprologEscape(X) :- \\+ functor(X, 'prolog', _), \\+ functor(X, '~', _).\n/*\n * Standard rules (RuleName : Preconditions => Effects)\n * Special rules (RuleName : Effects)\n */\nconvertAllRules([], []).\nconvertAllRules([[H,P,E]|T], [R|Rules]) :- convertRule(H, P, E, R), convertAllRules(T, Rules).\nconvertAllRules([[H,E]|T], [R|Rules]) :- convertRule(H, E, R), convertAllRules(T, Rules).\n/*\n * Convert the given rule to the standard format\n * Example:\n * r2: followedGuidelines(X), doctor(X) => -liable(X)\n * rule([r2,[[followedGuidelines(X_e4149)],[doctor(X_e4149)]],[neg,liable(X_e4149)]]).\n */\nconvertRule(RuleName, Preconditions, Effects, rule(List)) :-\n tuple_to_list(Preconditions, Lprecond),\n tuple_to_list(Effects, Leffects),\n check_modifiers_in_list(preconditions, Lprecond, LprecondChecked),\n check_modifiers_in_list(effects, Leffects, LeffectsChecked),\n flatten_first_level(LeffectsChecked, LeffectsCheckedFlattened),\n List = [RuleName, LprecondChecked, LeffectsCheckedFlattened], !.\n/*\n * Convert the given special rule\n * Example:\n * bp(-liable(X)).\n * abastractBp([[neg, liable(X_e4149)]]).\n */\nconvertRule(bps, Effects, abstractBp(Checked)) :-\n functor(Effects, 'bp', _),\n Effects =.. L,\n removehead(L, LC),\n check_modifiers_in_list(effects, LC, Checked), !.\nconvertRule(Name, Effects, premise([Name, LeffectsCheckedFlattened])) :-\n tuple_to_list(Effects, Leffects),\n check_modifiers_in_list(effects, Leffects, LeffectsChecked),\n flatten_first_level(LeffectsChecked, LeffectsCheckedFlattened).\n/*\n * Find negations(-), obligations(o), permissions(p) on a list of preconditions/effects and\n * raplace them with the assigned literal (neg, obl, perm)\n */\ncheck_modifiers_in_list(MODE, [], []) :- !.\ncheck_modifiers_in_list(MODE, [H|T], L) :- H == [], L = [], !.\ncheck_modifiers_in_list(MODE, [H|T], R) :- H \\== [],\n check_modifiers_once(H, LH),\n check_modifiers_in_list(MODE, T, LT),\n utils::append_fast([LH], LT, L),\n R = L.\ncheck_modifiers_once(H, List) :- once(check_modifiers(H, List)).\ncheck_modifiers([], []).\ncheck_modifiers(H, List) :-\n functor(H, '-', _) -> (\n arg(1, H, Arg),\n check_modifiers_once(Arg, Lobl),\n utils::append_fast([neg], Lobl, Lf),\n List = Lf);\n functor(H, 'o', _) -> (\n arg(1, H, Arg),\n check_modifiers_once(Arg, Lobl),\n List = [obl|[Lobl]]);\n functor(H, 'p', _) -> (\n arg(1, H, Arg),\n check_modifiers_once(Arg, Lper),\n List = [perm|[Lper]]);\n functor(H, '~', _) -> (\n arg(1, H, Arg),\n check_modifiers_once(Arg, Lper),\n List = [unless|[Lper]]);\n functor(H, 'bp', _) -> (\n H =.. [_|Arg],\n check_modifiers_in_list(effects, Arg, Lper),\n List = [bp|[Lper]]);\n List = [H].\nlist_to_tuple([H], (H)) :- !.\nlist_to_tuple([H|T], (H,TT)) :- list_to_tuple(T,TT).\n/*\n * Replace all the occurences of a given element with the given argument\n */\nreplace(_, _, [],[]) :- !.\nreplace(O, R, [O|T], [R|T2]) :- replace(O, R, T, T2), !.\nreplace(O, R, [H|T], [H|T2]) :- H \\= O, replace(O, R, T, T2).\nflatten_first_level([X], X) :- !.\nflatten_first_level.\nremovehead([_|Tail], Tail).\nin(A, A) :- nonvar(A), A \\= (_ , _), !.\nin(A, (A, _)) :- !.\nin(A, (_ , Cs)) :- in(A, Cs).\ncheck_admissibility(preconditions, H, LH) :-\n \\+ defeasible_admissible(LH),\n throw(['Premise ', H, ' is not a well formed member of the argumentation language.']).\ncheck_admissibility(effects, H, LH) :-\n \\+ admissible(LH),\n throw(['Conclusion ', H, ' is not a well formed member of the argumentation language.']).\ncheck_admissibility(_, _, _).\ndefeasible_admissible([unless, Term]) :- admissible(Term).\ndefeasible_admissible(Term) :- admissible(Term).\nadmissible([neg, bp, Term]) :- admissible_terms_complete(Term).\nadmissible([bp, Term]) :- admissible_terms_complete(Term).\nadmissible([neg, Term]) :- admissible_term(Term).\nadmissible([obl, [Term]]) :- admissible_term(Term).\nadmissible([obl, [neg, Term]]) :- admissible_term(Term).\nadmissible([neg, obl, [Term]]) :- admissible_term(Term).\nadmissible([neg, obl, [neg, Term]]) :- admissible_term(Term).\nadmissible([perm, [Term]]) :- admissible_term(Term).\nadmissible([perm, [neg, Term]]) :- admissible_term(Term).\nadmissible([Term]) :- admissible_term(Term).\nadmissible_term(Term) :-\n atomic(Term),\n Term \\== neg,\n Term \\== obl,\n Term \\== perm,\n Term \\== unless,\n Term \\== bp.\nadmissible_term(Term) :- var(Term).\nadmissible_term(Term) :-\n compound(Term),\n \\+ functor(Term, 'o', _),\n \\+ functor(Term, 'p', _),\n \\+ functor(Term, '-', _),\n \\+ functor(Term, '~', _),\n \\+ functor(Term, 'bp', _),\n Term =.. [_|Args],\n admissible_terms(Args).\nadmissible_terms([]).\nadmissible_terms([H|T]) :-\n admissible_term(H),\n admissible_terms(T).\nadmissible_terms_complete([]).\nadmissible_terms_complete([H|T]) :-\n admissible(H),\n admissible_terms_complete(T).\nrule(Id, PP, [Conclusion]) :- context_check(clause(rl(Conclusion), [Id, Premises, Conclusion])), tuple_to_list(Premises, P), ff(P, PP).\npremise(Id, [Conclusion]) :- context_check(clause(rl(Conclusion), [Id, Conclusion])).\ncheck_strict(Id) :- context_check(strict(Id)).\nprolog([prolog(Term)], Term).\ncontrary([~(Term)], Term).\nundercut(undercut(Rule), Rule).\nsuperiority(sup(Id1, Id2), Id1, Id2).\n/*\n * Convert the given tuple to list\n */\ntuple_to_list(A,[A]) :- nonvar(A), A \\= (_ , _), !.\ntuple_to_list((A,B),L) :-\n tuple_to_list(A, La),\n tuple_to_list(B, Lb),\n utils::append_fast(La, Lb,L).\nff([[]], []) :- !.\nff([[X]], [X]) :- !.\nff(X, X).\nclassic_rule(X, Y, Z) :- rule(X, Y, Z).\nclassic_rule(X, Y) :- premise(X, Y).";
|
|
748
|
+
this.h3c_1 = "/*\n * Main directive. Find all the rules in the theory in the format (Name : Preconditions => Conclusion)\n * or (Name : Effects) and then if:\n * - It is a standard rule, translate it in the standard format (rule([Name, Preconditions, Conclusions]));\n * - It is a bp rule, translate it to (abstractBp([Effects]))\n * During the process, clean them from the unallowed symbols (-, o, p).\n */\nconvertAllRules(ArgRules) :-\n defeasibleRules(DefeasibleRules),\n strictRules(StrictRules, RulesIds),\n ordinaryPremises(Premises),\n axiomPremises(Axioms, AxiomsIds),\n specialRules(SpecialRules),\n utils::appendLists([DefeasibleRules, StrictRules, Premises, Axioms], Rules),\n rule_to_clause(Rules, Clauses),\n findall(sup(X, Y), sup(X, Y), Sup),\n utils::appendLists([Clauses, AxiomsIds, RulesIds, Sup, SpecialRules], ArgRules),\n utils::assert_all(ArgRules), !.\ndefeasibleRules(DefeasibleRules) :-\n findall([RuleName, Preconditions, Effect], (RuleName : Preconditions => Effect), DefeasibleRulesOld),\n prologDefeasibleRules(DefeasibleRulesNew),\n utils::append_fast(DefeasibleRulesOld, DefeasibleRulesNew, DefeasibleRules).\nstrictRules(CtrRules, Ids) :-\n findall([RuleName, Preconditions, Effect], (RuleName : Preconditions -> Effect), StrictRulesOld),\n prologStrictRules(StrictRulesNew),\n utils::append_fast(StrictRulesOld, StrictRulesNew, StrictRules),\n transpose(StrictRules, StrictRules, CtrRules),\n extract_id(CtrRules, Ids).\nordinaryPremises(Premises) :-\n findall([RuleName, Effect], ((RuleName :=> Effect), atom(RuleName)), PremisesOld),\n prologPremises(PremisesNew),\n utils::append_fast(PremisesOld, PremisesNew, Premises).\naxiomPremises(Axioms, Ids) :-\n findall([RuleName, Effect], ((RuleName :-> Effect), atom(RuleName)), AxiomsOld),\n prologAxioms(AxiomsNew),\n utils::append_fast(AxiomsOld, AxiomsNew, Axioms),\n extract_id(Axioms, Ids).\nspecialRules(SpecialRules) :-\n bpsNew(SpecialRules).\ntranspose(_, CtrRules, CtrRules) :- \\+ autoTransposition, !.\ntranspose([], CtrRules, CtrRules).\ntranspose([H|T], TempCtrRules, CtrRules) :-\n transpose(T, TempCtrRules, CR),\n findall(TrH, transposition(H, TrH), Tran),\n mergeCtrRules(CR, Tran, CtrRules).\nmergeCtrRules(All, ToMerge, X) :-\n utils::append_fast(All, ToMerge, XT),\n deduplicate(XT, X).\ndeduplicate([], []).\ndeduplicate([[RN,A,B]|T], X) :- deduplicate(T, TT), (member([RN,_,_], TT) -> X = TT; X = [[RN,A,B]|TT]). \ntransposition([Id, Prec, Effect], [Id, Prec, Effect]).\ntransposition([Id, Prec, Effect], [NewId, NewPrec ,XNegated]) :-\n compound(Prec),\n tuple_to_list(Prec, LPrec),!,\n transposition_sequential(LPrec, LPrec, Effect, Id, [], NewPrec, XNegated, NewId).\ntransposition([Id, Prec, Effect], [NewId, EffectNegated ,XNegated]) :-\n \\+ compound(Prec),\n Prec \\== [],\n prologEscape(Prec),\n negate(Prec, XNegated),\n negate(Effect, EffectNegated),\n atom_concat(Id, '_i', NewId).\ntransposition_sequential(LPrec, [H|T], Effect, Id, Skipped, NewPrec, XNegated, NewId) :-\n transposition_sequential(LPrec, T, Effect, Id, [H|Skipped], NewPrec, XNegated, NewId).\ntransposition_sequential(LPrec, [X|T], Effect, Id, Skipped, NewPrec, XNegated, NewId) :-\n prologEscape(X),\n utils::append_fast(Skipped, T, CleanedPrec),\n negate(X, XNegated),\n negate(Effect, EffectNegated),\n list_to_tuple([EffectNegated|CleanedPrec], NewPrec),\n newIdentifier(Skipped, Id, NewId).\nnewIdentifier(List, OldId, NewId) :-\n modifier(List, Mod),\n atom_concat(OldId, Mod, NewId).\nmodifier([], '_i').\nmodifier([_|Tail], Index):-\n modifier(Tail, Index1),\n atom_concat(Index1, 'i', Index).\nnegate(X, Arg) :-\n functor(X, '-', _) -> (\n arg(1, X, Arg));\n functor(X, 'p', _) -> (\n arg(1, X, PX),\n (functor(PX, '-', _) -> (\n arg(1, PX, PNX),\n Arg = o(PNX)\n );\n Arg = o(-(PX))));\n Arg = -(X).\nprologEscape(X) :- \\+ functor(X, 'prolog', _), \\+ functor(X, '~', _).\n/*\n * Standard rules (RuleName : Preconditions => Effects)\n * Special rules (RuleName : Effects)\n */\nconvertAllRules([], []).\nconvertAllRules([[H,P,E]|T], [R|Rules]) :- convertRule(H, P, E, R), convertAllRules(T, Rules).\nconvertAllRules([[H,E]|T], [R|Rules]) :- convertRule(H, E, R), convertAllRules(T, Rules).\n/*\n * Convert the given rule to the standard format\n * Example:\n * r2: followedGuidelines(X), doctor(X) => -liable(X)\n * rule([r2,[[followedGuidelines(X_e4149)],[doctor(X_e4149)]],[neg,liable(X_e4149)]]).\n */\nconvertRule(RuleName, Preconditions, Effects, rule(List)) :-\n tuple_to_list(Preconditions, Lprecond),\n tuple_to_list(Effects, Leffects),\n check_modifiers_in_list(preconditions, Lprecond, LprecondChecked),\n check_modifiers_in_list(effects, Leffects, LeffectsChecked),\n flatten_first_level(LeffectsChecked, LeffectsCheckedFlattened),\n List = [RuleName, LprecondChecked, LeffectsCheckedFlattened], !.\n/*\n * Convert the given special rule\n * Example:\n * bp(-liable(X)).\n * abastractBp([[neg, liable(X_e4149)]]).\n */\nconvertRule(bps, Effects, abstractBp(Checked)) :-\n functor(Effects, 'bp', _),\n Effects =.. L,\n removehead(L, LC),\n check_modifiers_in_list(effects, LC, Checked), !.\nconvertRule(Name, Effects, premise([Name, LeffectsCheckedFlattened])) :-\n tuple_to_list(Effects, Leffects),\n check_modifiers_in_list(effects, Leffects, LeffectsChecked),\n flatten_first_level(LeffectsChecked, LeffectsCheckedFlattened).\n/*\n * Find negations(-), obligations(o), permissions(p) on a list of preconditions/effects and\n * raplace them with the assigned literal (neg, obl, perm)\n */\ncheck_modifiers_in_list(MODE, [], []) :- !.\ncheck_modifiers_in_list(MODE, [H|T], L) :- H == [], L = [], !.\ncheck_modifiers_in_list(MODE, [H|T], R) :- H \\== [],\n check_modifiers_once(H, LH),\n check_modifiers_in_list(MODE, T, LT),\n utils::append_fast([LH], LT, L),\n R = L.\ncheck_modifiers_once(H, List) :- once(check_modifiers(H, List)).\ncheck_modifiers([], []).\ncheck_modifiers(H, List) :-\n functor(H, '-', _) -> (\n arg(1, H, Arg),\n check_modifiers_once(Arg, Lobl),\n utils::append_fast([neg], Lobl, Lf),\n List = Lf);\n functor(H, 'o', _) -> (\n arg(1, H, Arg),\n check_modifiers_once(Arg, Lobl),\n List = [obl|[Lobl]]);\n functor(H, 'p', _) -> (\n arg(1, H, Arg),\n check_modifiers_once(Arg, Lper),\n List = [perm|[Lper]]);\n functor(H, '~', _) -> (\n arg(1, H, Arg),\n check_modifiers_once(Arg, Lper),\n List = [unless|[Lper]]);\n functor(H, 'bp', _) -> (\n H =.. [_|Arg],\n check_modifiers_in_list(effects, Arg, Lper),\n List = [bp|[Lper]]);\n List = [H].\nlist_to_tuple([H], (H)) :- !.\nlist_to_tuple([H|T], (H,TT)) :- list_to_tuple(T,TT).\n/*\n * Replace all the occurences of a given element with the given argument\n */\nreplace(_, _, [],[]) :- !.\nreplace(O, R, [O|T], [R|T2]) :- replace(O, R, T, T2), !.\nreplace(O, R, [H|T], [H|T2]) :- H \\= O, replace(O, R, T, T2).\nflatten_first_level([X], X) :- !.\nflatten_first_level.\nremovehead([_|Tail], Tail).\nin(A, A) :- nonvar(A), A \\= (_ , _), !.\nin(A, (A, _)) :- !.\nin(A, (_ , Cs)) :- in(A, Cs).\ncheck_admissibility(preconditions, H, LH) :-\n \\+ defeasible_admissible(LH),\n throw(['Premise ', H, ' is not a well formed member of the argumentation language.']).\ncheck_admissibility(effects, H, LH) :-\n \\+ admissible(LH),\n throw(['Conclusion ', H, ' is not a well formed member of the argumentation language.']).\ncheck_admissibility(_, _, _).\ndefeasible_admissible([unless, Term]) :- admissible(Term).\ndefeasible_admissible(Term) :- admissible(Term).\nadmissible([neg, bp, Term]) :- admissible_terms_complete(Term).\nadmissible([bp, Term]) :- admissible_terms_complete(Term).\nadmissible([neg, Term]) :- admissible_term(Term).\nadmissible([obl, [Term]]) :- admissible_term(Term).\nadmissible([obl, [neg, Term]]) :- admissible_term(Term).\nadmissible([neg, obl, [Term]]) :- admissible_term(Term).\nadmissible([neg, obl, [neg, Term]]) :- admissible_term(Term).\nadmissible([perm, [Term]]) :- admissible_term(Term).\nadmissible([perm, [neg, Term]]) :- admissible_term(Term).\nadmissible([Term]) :- admissible_term(Term).\nadmissible_term(Term) :-\n atomic(Term),\n Term \\== neg,\n Term \\== obl,\n Term \\== perm,\n Term \\== unless,\n Term \\== bp.\nadmissible_term(Term) :- var(Term).\nadmissible_term(Term) :-\n compound(Term),\n \\+ functor(Term, 'o', _),\n \\+ functor(Term, 'p', _),\n \\+ functor(Term, '-', _),\n \\+ functor(Term, '~', _),\n \\+ functor(Term, 'bp', _),\n Term =.. [_|Args],\n admissible_terms(Args).\nadmissible_terms([]).\nadmissible_terms([H|T]) :-\n admissible_term(H),\n admissible_terms(T).\nadmissible_terms_complete([]).\nadmissible_terms_complete([H|T]) :-\n admissible(H),\n admissible_terms_complete(T).\nrule(Id, PP, [Conclusion]) :- context_check(clause(rl(Conclusion), [Id, Premises, Conclusion])), tuple_to_list(Premises, P), ff(P, PP).\npremise(Id, [Conclusion]) :- context_check(clause(rl(Conclusion), [Id, Conclusion])).\ncheck_strict(Id) :- context_check(strict(Id)).\nprolog([prolog(Term)], Term).\ncontrary([~(Term)], Term).\nundercut(undercut(Rule), Rule).\nsuperiority(sup(Id1, Id2), Id1, Id2).\n/*\n * Convert the given tuple to list\n */\ntuple_to_list(A,[A]) :- nonvar(A), A \\= (_ , _), !.\ntuple_to_list((A,B),L) :-\n tuple_to_list(A, La),\n tuple_to_list(B, Lb),\n utils::append_fast(La, Lb,L).\nff([[]], []) :- !.\nff([[X]], [X]) :- !.\nff(X, X).\nclassic_rule(X, Y, Z) :- rule(X, Y, Z).\nclassic_rule(X, Y) :- premise(X, Y).";
|
|
822
749
|
}
|
|
823
750
|
var RuleTranslator_instance;
|
|
824
751
|
function RuleTranslator_getInstance() {
|
|
825
|
-
if (RuleTranslator_instance == null)
|
|
826
|
-
new RuleTranslator();
|
|
827
752
|
return RuleTranslator_instance;
|
|
828
753
|
}
|
|
829
754
|
function StatementLabelling() {
|
|
830
|
-
|
|
831
|
-
this.j3a_1 = 'statementLabelling :-\n findall(_, (\n context_check(in([_, _, Conc, _, _])),\n \\+ context_check(statIn(Conc)),\n context_assert(statIn(Conc))\n ), _),\n findall(_, (\n context_check(out([_, _, Conc, _, _])),\n \\+ context_check(statIn(Conc)),\n \\+ context_check(statOut(Conc)),\n context_assert(statOut(Conc))\n ), _),\n findall(_, (\n context_check(und([_, _, Conc, _, _])),\n \\+ context_check(statIn(Conc)),\n \\+ context_check(statOut(Conc)),\n \\+ context_check(statUnd(Conc)),\n context_assert(statUnd(Conc))\n ), _).';
|
|
755
|
+
this.d3c_1 = 'statementLabelling :-\n findall(_, (\n context_check(in([_, _, Conc, _, _])),\n \\+ context_check(statIn(Conc)),\n context_assert(statIn(Conc))\n ), _),\n findall(_, (\n context_check(out([_, _, Conc, _, _])),\n \\+ context_check(statIn(Conc)),\n \\+ context_check(statOut(Conc)),\n context_assert(statOut(Conc))\n ), _),\n findall(_, (\n context_check(und([_, _, Conc, _, _])),\n \\+ context_check(statIn(Conc)),\n \\+ context_check(statOut(Conc)),\n \\+ context_check(statUnd(Conc)),\n context_assert(statUnd(Conc))\n ), _).';
|
|
832
756
|
}
|
|
833
757
|
var StatementLabelling_instance;
|
|
834
758
|
function StatementLabelling_getInstance() {
|
|
835
|
-
if (StatementLabelling_instance == null)
|
|
836
|
-
new StatementLabelling();
|
|
837
759
|
return StatementLabelling_instance;
|
|
838
760
|
}
|
|
839
761
|
function SuperiorityRelation() {
|
|
840
|
-
|
|
841
|
-
this.q3a_1 = 'superiorArgument(A, B) :- superiorArgumentSupportBuffered(A, B, _).\nsuperiorArgument(A, B, SupSet) :- superiorArgumentSupportBuffered(A, B, SupSet).\nsuperiorArgumentSupportBuffered(A, B, SupSet) :-\n context_check(superior(A, B, SupSet, true)), !.\nsuperiorArgumentSupportBuffered(A, B, SupSet) :-\n context_check(superior(A, B, SupSet, false)),\n fail, !.\nsuperiorArgumentSupportBuffered(A, B, SupSet) :-\n \\+ context_check(superior(A, B, _, _)),\n superiorArgumentSupport(A, B, SupSet),\n context_assert(superior(A, B, SupSet, true)), !.\nsuperiorArgumentSupportBuffered(A, B, SupSet) :-\n \\+ cache_check(superior(A, B, _, _)),\n context_assert(superior(A, B, [], false)),\n fail, !.\nsuperiorArgumentSupport([_, _, _, _, [LastDefRulesA, DefRulesA, DefPremisesA]], [_, _, _, _, [LastDefRulesB, DefRulesB, DefPremisesB]], SupSet) :-\n\tsuperiorArgumentSupport(LastDefRulesA, DefRulesA, DefPremisesA, LastDefRulesB, DefRulesB, DefPremisesB, SupSet).\nsuperiorArgumentSupport(LastDefRulesA, _, DefPremisesA, LastDefRulesB, _, DefPremisesB, SupSet) :-\n orderingPrinciple(last),\n\tsuperior(LastDefRulesA, DefPremisesA, LastDefRulesB, DefPremisesB, SupSet).\nsuperiorArgumentSupport(_, DefRulesA, DefPremisesA, _, DefRulesB, DefPremisesB, SupSet) :-\n orderingPrinciple(weakest),\n\tsuperior(DefRulesA, DefPremisesA, DefRulesB, DefPremisesB, SupSet).\nsuperior([], PremisesA, [], PremisesB, SupSet) :-\n\tweaker(PremisesB, PremisesA, SupSet).\nsuperior(DefRulesA, _, DefRulesB, _, SupSet) :-\n\torderingPrinciple(last),\n\t(DefRulesA \\== []; DefRulesB \\== []),\n\tweaker(DefRulesB, DefRulesA, SupSet).\nsuperior(DefRulesA, [], DefRulesB, [], SupSet) :-\n\torderingPrinciple(weakest),\n\tweaker(DefRulesB, DefRulesA, SupSet).\nsuperior(DefRulesA, PremisesA, DefRulesB, PremisesB, SupSet) :-\n\torderingPrinciple(weakest),\n\t(DefRulesA \\== []; DefRulesB \\== []),\n\t(PremisesA \\== []; PremisesB \\== []),\n\tweaker(DefRulesB, DefRulesA, SupSetA),\n\tweaker(PremisesB, PremisesA, SupSetB),\n\tutils::appendLists([SupSetA, SupSetB], SupSet).\nweaker(RulesA, [], []) :-\n\tRulesA \\== [].\nweaker(RulesA, RulesB, SupSet) :-\n\tRulesA \\== [],\n\tRulesB \\== [],\n\torderingComparator(elitist),\n\tmember(Rule, RulesA),\n\tallStronger(Rule, RulesB, SupSet), !.\nweaker(RulesA, RulesB, SupSet) :-\n\tRulesA \\== [],\n\tRulesB \\== [],\n\torderingComparator(democrat),\n\tweakerDemo(RulesA, RulesB, SupSet).\nweaker(RulesA, RulesB, [sup(X, W)]) :-\n\tRulesA \\== [],\n\tRulesB \\== [],\n\torderingComparator(normal),\n\tmember(W, RulesA),\n\tmember(X, RulesB),\n\tcontext_check(sup(X, W)), !.\nweakerDemo([], _, []).\nweakerDemo([H|T], Rules, [Sup|SupSet]) :-\n\tsingleStronger(H, Rules, Sup),\n\tweakerDemo(T, Rules, SupSet).\nsingleStronger(Target, Rules, sup(Rule, Target)) :-\n\tmember(Rule, Rules),\n\tcontext_check(sup(Rule, Target)), !.\nallStronger(_, [], []).\nallStronger(Target, [Rule|Rules], [sup(Rule, Target)|SupSet]) :-\n\tcontext_check(sup(Rule, Target)),\n\tallStronger(Target, Rules, SupSet).';
|
|
762
|
+
this.k3c_1 = 'superiorArgument(A, B) :- superiorArgumentSupportBuffered(A, B, _).\nsuperiorArgument(A, B, SupSet) :- superiorArgumentSupportBuffered(A, B, SupSet).\nsuperiorArgumentSupportBuffered(A, B, SupSet) :-\n context_check(superior(A, B, SupSet, true)), !.\nsuperiorArgumentSupportBuffered(A, B, SupSet) :-\n context_check(superior(A, B, SupSet, false)),\n fail, !.\nsuperiorArgumentSupportBuffered(A, B, SupSet) :-\n \\+ context_check(superior(A, B, _, _)),\n superiorArgumentSupport(A, B, SupSet),\n context_assert(superior(A, B, SupSet, true)), !.\nsuperiorArgumentSupportBuffered(A, B, SupSet) :-\n \\+ cache_check(superior(A, B, _, _)),\n context_assert(superior(A, B, [], false)),\n fail, !.\nsuperiorArgumentSupport([_, _, _, _, [LastDefRulesA, DefRulesA, DefPremisesA]], [_, _, _, _, [LastDefRulesB, DefRulesB, DefPremisesB]], SupSet) :-\n\tsuperiorArgumentSupport(LastDefRulesA, DefRulesA, DefPremisesA, LastDefRulesB, DefRulesB, DefPremisesB, SupSet).\nsuperiorArgumentSupport(LastDefRulesA, _, DefPremisesA, LastDefRulesB, _, DefPremisesB, SupSet) :-\n orderingPrinciple(last),\n\tsuperior(LastDefRulesA, DefPremisesA, LastDefRulesB, DefPremisesB, SupSet).\nsuperiorArgumentSupport(_, DefRulesA, DefPremisesA, _, DefRulesB, DefPremisesB, SupSet) :-\n orderingPrinciple(weakest),\n\tsuperior(DefRulesA, DefPremisesA, DefRulesB, DefPremisesB, SupSet).\nsuperior([], PremisesA, [], PremisesB, SupSet) :-\n\tweaker(PremisesB, PremisesA, SupSet).\nsuperior(DefRulesA, _, DefRulesB, _, SupSet) :-\n\torderingPrinciple(last),\n\t(DefRulesA \\== []; DefRulesB \\== []),\n\tweaker(DefRulesB, DefRulesA, SupSet).\nsuperior(DefRulesA, [], DefRulesB, [], SupSet) :-\n\torderingPrinciple(weakest),\n\tweaker(DefRulesB, DefRulesA, SupSet).\nsuperior(DefRulesA, PremisesA, DefRulesB, PremisesB, SupSet) :-\n\torderingPrinciple(weakest),\n\t(DefRulesA \\== []; DefRulesB \\== []),\n\t(PremisesA \\== []; PremisesB \\== []),\n\tweaker(DefRulesB, DefRulesA, SupSetA),\n\tweaker(PremisesB, PremisesA, SupSetB),\n\tutils::appendLists([SupSetA, SupSetB], SupSet).\nweaker(RulesA, [], []) :-\n\tRulesA \\== [].\nweaker(RulesA, RulesB, SupSet) :-\n\tRulesA \\== [],\n\tRulesB \\== [],\n\torderingComparator(elitist),\n\tmember(Rule, RulesA),\n\tallStronger(Rule, RulesB, SupSet), !.\nweaker(RulesA, RulesB, SupSet) :-\n\tRulesA \\== [],\n\tRulesB \\== [],\n\torderingComparator(democrat),\n\tweakerDemo(RulesA, RulesB, SupSet).\nweaker(RulesA, RulesB, [sup(X, W)]) :-\n\tRulesA \\== [],\n\tRulesB \\== [],\n\torderingComparator(normal),\n\tmember(W, RulesA),\n\tmember(X, RulesB),\n\tcontext_check(sup(X, W)), !.\nweakerDemo([], _, []).\nweakerDemo([H|T], Rules, [Sup|SupSet]) :-\n\tsingleStronger(H, Rules, Sup),\n\tweakerDemo(T, Rules, SupSet).\nsingleStronger(Target, Rules, sup(Rule, Target)) :-\n\tmember(Rule, Rules),\n\tcontext_check(sup(Rule, Target)), !.\nallStronger(_, [], []).\nallStronger(Target, [Rule|Rules], [sup(Rule, Target)|SupSet]) :-\n\tcontext_check(sup(Rule, Target)),\n\tallStronger(Target, Rules, SupSet).';
|
|
842
763
|
}
|
|
843
764
|
var SuperiorityRelation_instance;
|
|
844
765
|
function SuperiorityRelation_getInstance() {
|
|
845
|
-
if (SuperiorityRelation_instance == null)
|
|
846
|
-
new SuperiorityRelation();
|
|
847
766
|
return SuperiorityRelation_instance;
|
|
848
767
|
}
|
|
849
768
|
function Utils() {
|
|
850
|
-
|
|
851
|
-
this.r3a_1 = 'writeList([]) :- nl.\nwriteList([X|Others]) :-\n\twrite(X),\n\twriteList(Others).\nwriteListNl([]).\nwriteListNl([X|Others]) :-\n\twrite(X),nl,\n\twriteListNl(Others).\nsortDistinct(List, Sorted) :-\n deduplicate(List, Deduplicated),\n sort(Deduplicated, Sorted).\ndeduplicate([], []).\ndeduplicate(List, Output) :-\n List \\== [],\n setof(X, member(X, List), Output).\nsort(List,Sorted) :- q_sort(List, [], Sorted).\nq_sort([], Acc, Acc).\nq_sort([H|T], Acc, Sorted) :-\n\tpivoting(H, T, L1, L2),\n\tq_sort(L1, Acc, Sorted1),\n\tq_sort(L2, [H|Sorted1], Sorted).\npivoting(H,[],[],[]).\npivoting(H, [X|T], [X|L], G) :-\n H @>= X,\n pivoting(H, T, L, G).\npivoting(H, [X|T], L, [X|G]) :-\n X @> H,\n pivoting(H, T, L, G).\nsubtract([], _, []).\nsubtract([Head|Tail], L2, L3) :-\n member(Head, L2), !,\n subtract(Tail, L2, L3).\nsubtract([Head|Tail1], L2, [Head|Tail3]) :-\n subtract(Tail1, L2, Tail3).\nisEmptyList([]).\nappendLists([], []).\nappendLists([H|T], R) :-\n appendLists(T, AT),\n append_fast(H, AT, R).\nsearch(F, L, S) :-\n between(1, L, N),\n functor(S, F, N),\n call(S).\nbetween(N, M, K) :- N < M, K = N.\nbetween(N, M, K) :- N == M, !, K = N.\nbetween(N, M, K) :- N < M, N1 is N+1, between(N1, M, K).\nrecoverGraph(Args, Attacks, Supports) :-\n findall(X, context_check(argument(X)), TempArgs),\n findall((T, A, B, C), context_check(attack(T, A, B, C)), TempAttacks),\n findall((A, B), context_check(support(A, B)), TempSupports),\n utils::sort(TempArgs, Args),\n utils::sort(TempAttacks, Attacks),\n utils::sort(TempSupports, Supports).\nrecoverArgumentLabelling(ArgsIn, ArgsOut, ArgsUnd) :-\n findall(X, context_check(in(X)), TempArgsIn),\n findall(X, context_check(out(X)), TempArgsOut),\n findall(X, context_check(und(X)), TempArgsUnd),\n utils::sort(TempArgsIn, ArgsIn),\n utils::sort(TempArgsOut, ArgsOut),\n utils::sort(TempArgsUnd, ArgsUnd).\nrecoverStatementLabelling(In, Out, Und) :-\n findall(X, context_check(statIn(X)), TempIn),\n findall(X, context_check(statOut(X)), TempOut),\n findall(X, context_check(statUnd(X)), TempUnd),\n utils::sort(TempIn, In),\n utils::sort(TempOut, Out),\n utils::sort(TempUnd, Und).';
|
|
769
|
+
this.l3c_1 = 'writeList([]) :- nl.\nwriteList([X|Others]) :-\n\twrite(X),\n\twriteList(Others).\nwriteListNl([]).\nwriteListNl([X|Others]) :-\n\twrite(X),nl,\n\twriteListNl(Others).\nsortDistinct(List, Sorted) :-\n deduplicate(List, Deduplicated),\n sort(Deduplicated, Sorted).\ndeduplicate([], []).\ndeduplicate(List, Output) :-\n List \\== [],\n setof(X, member(X, List), Output).\nsort(List,Sorted) :- q_sort(List, [], Sorted).\nq_sort([], Acc, Acc).\nq_sort([H|T], Acc, Sorted) :-\n\tpivoting(H, T, L1, L2),\n\tq_sort(L1, Acc, Sorted1),\n\tq_sort(L2, [H|Sorted1], Sorted).\npivoting(H,[],[],[]).\npivoting(H, [X|T], [X|L], G) :-\n H @>= X,\n pivoting(H, T, L, G).\npivoting(H, [X|T], L, [X|G]) :-\n X @> H,\n pivoting(H, T, L, G).\nsubtract([], _, []).\nsubtract([Head|Tail], L2, L3) :-\n member(Head, L2), !,\n subtract(Tail, L2, L3).\nsubtract([Head|Tail1], L2, [Head|Tail3]) :-\n subtract(Tail1, L2, Tail3).\nisEmptyList([]).\nappendLists([], []).\nappendLists([H|T], R) :-\n appendLists(T, AT),\n append_fast(H, AT, R).\nsearch(F, L, S) :-\n between(1, L, N),\n functor(S, F, N),\n call(S).\nbetween(N, M, K) :- N < M, K = N.\nbetween(N, M, K) :- N == M, !, K = N.\nbetween(N, M, K) :- N < M, N1 is N+1, between(N1, M, K).\nrecoverGraph(Args, Attacks, Supports) :-\n findall(X, context_check(argument(X)), TempArgs),\n findall((T, A, B, C), context_check(attack(T, A, B, C)), TempAttacks),\n findall((A, B), context_check(support(A, B)), TempSupports),\n utils::sort(TempArgs, Args),\n utils::sort(TempAttacks, Attacks),\n utils::sort(TempSupports, Supports).\nrecoverArgumentLabelling(ArgsIn, ArgsOut, ArgsUnd) :-\n findall(X, context_check(in(X)), TempArgsIn),\n findall(X, context_check(out(X)), TempArgsOut),\n findall(X, context_check(und(X)), TempArgsUnd),\n utils::sort(TempArgsIn, ArgsIn),\n utils::sort(TempArgsOut, ArgsOut),\n utils::sort(TempArgsUnd, ArgsUnd).\nrecoverStatementLabelling(In, Out, Und) :-\n findall(X, context_check(statIn(X)), TempIn),\n findall(X, context_check(statOut(X)), TempOut),\n findall(X, context_check(statUnd(X)), TempUnd),\n utils::sort(TempIn, In),\n utils::sort(TempOut, Out),\n utils::sort(TempUnd, Und).';
|
|
852
770
|
}
|
|
853
771
|
var Utils_instance;
|
|
854
772
|
function Utils_getInstance() {
|
|
855
|
-
if (Utils_instance == null)
|
|
856
|
-
new Utils();
|
|
857
773
|
return Utils_instance;
|
|
858
774
|
}
|
|
859
775
|
function StructuredMode() {
|
|
860
776
|
StructuredMode_instance = this;
|
|
861
777
|
StructuredModeBase.call(this);
|
|
862
778
|
}
|
|
863
|
-
protoOf(StructuredMode).
|
|
864
|
-
return
|
|
779
|
+
protoOf(StructuredMode).x36 = function () {
|
|
780
|
+
return QueryMode_instance.j3c_1;
|
|
865
781
|
};
|
|
866
782
|
var StructuredMode_instance;
|
|
867
783
|
function StructuredMode_getInstance() {
|
|
@@ -873,8 +789,8 @@
|
|
|
873
789
|
Debug_instance_0 = this;
|
|
874
790
|
DebugBase.call(this);
|
|
875
791
|
}
|
|
876
|
-
protoOf(Debug_0).
|
|
877
|
-
return
|
|
792
|
+
protoOf(Debug_0).x36 = function () {
|
|
793
|
+
return Debug_instance.i3c_1;
|
|
878
794
|
};
|
|
879
795
|
var Debug_instance_0;
|
|
880
796
|
function Debug_getInstance_0() {
|
|
@@ -886,8 +802,8 @@
|
|
|
886
802
|
SuperiorityRelation_instance_0 = this;
|
|
887
803
|
SuperiorityRelationBase.call(this);
|
|
888
804
|
}
|
|
889
|
-
protoOf(SuperiorityRelation_0).
|
|
890
|
-
return
|
|
805
|
+
protoOf(SuperiorityRelation_0).x36 = function () {
|
|
806
|
+
return SuperiorityRelation_instance.k3c_1;
|
|
891
807
|
};
|
|
892
808
|
var SuperiorityRelation_instance_0;
|
|
893
809
|
function SuperiorityRelation_getInstance_0() {
|
|
@@ -899,8 +815,8 @@
|
|
|
899
815
|
Utils_instance_0 = this;
|
|
900
816
|
UtilsBase.call(this);
|
|
901
817
|
}
|
|
902
|
-
protoOf(Utils_0).
|
|
903
|
-
return
|
|
818
|
+
protoOf(Utils_0).x36 = function () {
|
|
819
|
+
return Utils_instance.l3c_1;
|
|
904
820
|
};
|
|
905
821
|
var Utils_instance_0;
|
|
906
822
|
function Utils_getInstance_0() {
|
|
@@ -909,7 +825,35 @@
|
|
|
909
825
|
return Utils_instance_0;
|
|
910
826
|
}
|
|
911
827
|
//region block: post-declaration
|
|
912
|
-
protoOf(LazyRawPrologContent).
|
|
828
|
+
protoOf(LazyRawPrologContent).v36 = get_theoryOperators;
|
|
829
|
+
//endregion
|
|
830
|
+
//region block: init
|
|
831
|
+
Companion_instance_1 = new Companion();
|
|
832
|
+
Arg2pSolverFactory_instance = new Arg2pSolverFactory();
|
|
833
|
+
Companion_instance_2 = new Companion_0();
|
|
834
|
+
MetaInterpreter_instance = new MetaInterpreter();
|
|
835
|
+
ModuleCalls_instance = new ModuleCalls();
|
|
836
|
+
Companion_instance_3 = new Companion_1();
|
|
837
|
+
AbstractMode_instance_0 = new AbstractMode_0();
|
|
838
|
+
ArgumentationEngineInterface_instance = new ArgumentationEngineInterface();
|
|
839
|
+
ArgumentationGraph_instance = new ArgumentationGraph();
|
|
840
|
+
AttackRestriction_instance = new AttackRestriction();
|
|
841
|
+
Bp_instance = new Bp();
|
|
842
|
+
BpGrounded_instance = new BpGrounded();
|
|
843
|
+
BpGroundedComplete_instance = new BpGroundedComplete();
|
|
844
|
+
BpGroundedPartial_instance = new BpGroundedPartial();
|
|
845
|
+
Complete_instance = new Complete();
|
|
846
|
+
Debug_instance = new Debug();
|
|
847
|
+
DefPreferences_instance = new DefPreferences();
|
|
848
|
+
GenericDefPreferences_instance = new GenericDefPreferences();
|
|
849
|
+
Grounded_instance = new Grounded();
|
|
850
|
+
GroundedOptimized_instance = new GroundedOptimized();
|
|
851
|
+
Preferences_instance = new Preferences();
|
|
852
|
+
QueryMode_instance = new QueryMode();
|
|
853
|
+
RuleTranslator_instance = new RuleTranslator();
|
|
854
|
+
StatementLabelling_instance = new StatementLabelling();
|
|
855
|
+
SuperiorityRelation_instance = new SuperiorityRelation();
|
|
856
|
+
Utils_instance = new Utils();
|
|
913
857
|
//endregion
|
|
914
858
|
//region block: exports
|
|
915
859
|
function $jsExportAll$(_) {
|