@tuprolog/arg2p-core 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2p-core.js +175 -174
- package/2p-core.js.map +1 -1
- package/2p-parser-core.js +1007 -5
- package/2p-parser-core.js.map +1 -1
- package/2p-parser-js.js +30 -5
- package/2p-parser-js.js.map +1 -1
- package/2p-parser-theory.js +146 -5
- package/2p-parser-theory.js.map +1 -1
- package/2p-solve-classic.js +855 -855
- package/2p-solve.js +3368 -3075
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +65 -65
- package/2p-unify.js +25 -25
- package/2p-utils.js +36 -36
- package/arg2p-core.js +908 -4
- package/arg2p-core.js.map +1 -1
- package/kotlin-kotlin-stdlib-js-ir.js +372 -199
- package/kotlin-kotlin-stdlib-js-ir.js.map +1 -1
- package/kt-math.js +66 -66
- package/package.json +1 -1
package/arg2p-core.js
CHANGED
|
@@ -1,22 +1,926 @@
|
|
|
1
1
|
(function (root, factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './kt-math.js', './2p-solve-classic.js'], factory);
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib-js-ir.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('./kt-math.js'), require('./2p-solve-classic.js'));
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.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-js-ir'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'arg2p-core'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'arg2p-core'.");
|
|
9
|
+
}
|
|
10
|
+
if (typeof this['2p-core'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'arg2p-core'. Its dependency '2p-core' was not found. Please, check whether '2p-core' is loaded prior to 'arg2p-core'.");
|
|
12
|
+
}
|
|
13
|
+
if (typeof this['2p-theory'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'arg2p-core'. Its dependency '2p-theory' was not found. Please, check whether '2p-theory' is loaded prior to 'arg2p-core'.");
|
|
15
|
+
}
|
|
16
|
+
if (typeof this['2p-parser-theory'] === 'undefined') {
|
|
17
|
+
throw new Error("Error loading module 'arg2p-core'. Its dependency '2p-parser-theory' was not found. Please, check whether '2p-parser-theory' is loaded prior to 'arg2p-core'.");
|
|
18
|
+
}
|
|
19
|
+
if (typeof this['2p-solve'] === 'undefined') {
|
|
20
|
+
throw new Error("Error loading module 'arg2p-core'. Its dependency '2p-solve' was not found. Please, check whether '2p-solve' is loaded prior to 'arg2p-core'.");
|
|
21
|
+
}
|
|
22
|
+
if (typeof this['2p-unify'] === 'undefined') {
|
|
23
|
+
throw new Error("Error loading module 'arg2p-core'. Its dependency '2p-unify' was not found. Please, check whether '2p-unify' is loaded prior to 'arg2p-core'.");
|
|
24
|
+
}
|
|
7
25
|
if (typeof this['kt-math'] === 'undefined') {
|
|
8
26
|
throw new Error("Error loading module 'arg2p-core'. Its dependency 'kt-math' was not found. Please, check whether 'kt-math' is loaded prior to 'arg2p-core'.");
|
|
9
27
|
}
|
|
10
28
|
if (typeof this['2p-solve-classic'] === 'undefined') {
|
|
11
29
|
throw new Error("Error loading module 'arg2p-core'. Its dependency '2p-solve-classic' was not found. Please, check whether '2p-solve-classic' is loaded prior to 'arg2p-core'.");
|
|
12
30
|
}
|
|
13
|
-
root['arg2p-core'] = factory(typeof this['arg2p-core'] === 'undefined' ? {} : this['arg2p-core'], this['kt-math'], this['2p-solve-classic']);
|
|
31
|
+
root['arg2p-core'] = factory(typeof this['arg2p-core'] === 'undefined' ? {} : this['arg2p-core'], this['kotlin-kotlin-stdlib-js-ir'], this['2p-core'], this['2p-theory'], this['2p-parser-theory'], this['2p-solve'], this['2p-unify'], this['kt-math'], this['2p-solve-classic']);
|
|
14
32
|
}
|
|
15
|
-
}(this, function (_, kotlin_io_github_gciatto_kt_math, kotlin_it_unibo_tuprolog_solve_classic) {
|
|
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) {
|
|
16
34
|
'use strict';
|
|
35
|
+
//region block: imports
|
|
36
|
+
var protoOf = kotlin_kotlin.$_$.q5;
|
|
37
|
+
var classMeta = kotlin_kotlin.$_$.u4;
|
|
38
|
+
var VOID = kotlin_kotlin.$_$.s9;
|
|
39
|
+
var setMetadataFor = kotlin_kotlin.$_$.r5;
|
|
40
|
+
var listOf = kotlin_kotlin.$_$.b3;
|
|
41
|
+
var plus = kotlin_kotlin.$_$.s3;
|
|
42
|
+
var objectMeta = kotlin_kotlin.$_$.p5;
|
|
43
|
+
var emptyList = kotlin_kotlin.$_$.l2;
|
|
44
|
+
var defineProp = kotlin_kotlin.$_$.w4;
|
|
45
|
+
var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.f;
|
|
46
|
+
var interfaceMeta = kotlin_kotlin.$_$.c5;
|
|
47
|
+
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_theory.$_$.b;
|
|
48
|
+
var parseTheoryWithOperators = kotlin_it_unibo_tuprolog_parser_theory.$_$.a;
|
|
49
|
+
var lazy = kotlin_kotlin.$_$.k9;
|
|
50
|
+
var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_solve.$_$.i1;
|
|
51
|
+
var Companion_getInstance_2 = kotlin_it_unibo_tuprolog_theory.$_$.a;
|
|
52
|
+
var Companion_getInstance_3 = kotlin_it_unibo_tuprolog_unify.$_$.a;
|
|
53
|
+
var Unknown_getInstance = kotlin_it_unibo_tuprolog_solve.$_$.b1;
|
|
54
|
+
var Unit_getInstance = kotlin_kotlin.$_$.o1;
|
|
55
|
+
var to = kotlin_kotlin.$_$.r9;
|
|
56
|
+
var mutableMapOf = kotlin_kotlin.$_$.m3;
|
|
57
|
+
var Specifier_XFX_getInstance = kotlin_it_unibo_tuprolog_core.$_$.a;
|
|
58
|
+
var Operator = kotlin_it_unibo_tuprolog_core.$_$.z;
|
|
59
|
+
var OperatorSet_init_$Create$ = kotlin_it_unibo_tuprolog_core.$_$.c;
|
|
60
|
+
//endregion
|
|
17
61
|
//region block: pre-declaration
|
|
62
|
+
setMetadataFor(Arg2pSolver$Companion$of$1, VOID, classMeta);
|
|
63
|
+
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
64
|
+
setMetadataFor(Arg2pSolverFactory, 'Arg2pSolverFactory', objectMeta);
|
|
65
|
+
function get_theoryOperators() {
|
|
66
|
+
return Companion_getInstance().DEFAULT;
|
|
67
|
+
}
|
|
68
|
+
setMetadataFor(ArgLibrary, 'ArgLibrary', interfaceMeta);
|
|
69
|
+
setMetadataFor(LazyRawPrologContent, 'LazyRawPrologContent', classMeta, VOID, [ArgLibrary]);
|
|
70
|
+
setMetadataFor(Cache, 'Cache', classMeta, VOID, [ArgLibrary]);
|
|
71
|
+
setMetadataFor(Context, 'Context', classMeta, VOID, [ArgLibrary]);
|
|
72
|
+
setMetadataFor(Companion_0, 'Companion', objectMeta);
|
|
73
|
+
setMetadataFor(DynamicLoader, 'DynamicLoader', classMeta, VOID, [ArgLibrary]);
|
|
74
|
+
setMetadataFor(EngineInterfaceBase, 'EngineInterfaceBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
75
|
+
setMetadataFor(MetaInterpreter, 'MetaInterpreter', objectMeta, VOID, [ArgLibrary]);
|
|
76
|
+
setMetadataFor(ModuleCalls, 'ModuleCalls', objectMeta, VOID, [ArgLibrary]);
|
|
77
|
+
setMetadataFor(AbstractModeBase, 'AbstractModeBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
78
|
+
setMetadataFor(ArgumentationGraphBuilderBase, 'ArgumentationGraphBuilderBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
79
|
+
setMetadataFor(AttackRestrictionHandlerBase, 'AttackRestrictionHandlerBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
80
|
+
setMetadataFor(BpMetaGraphHandlerBase, 'BpMetaGraphHandlerBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
81
|
+
setMetadataFor(DefeasiblePreferencesHandlerBase, 'DefeasiblePreferencesHandlerBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
82
|
+
setMetadataFor(GenericDefeasiblePreferencesHandlerBase, 'GenericDefeasiblePreferencesHandlerBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
83
|
+
setMetadataFor(StrictPreferencesHandlerBase, 'StrictPreferencesHandlerBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
84
|
+
setMetadataFor(BinaryStatementLabeller, 'BinaryStatementLabeller', objectMeta, VOID, [ArgLibrary]);
|
|
85
|
+
setMetadataFor(BpCompleteLabellerBase, 'BpCompleteLabellerBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
86
|
+
setMetadataFor(BpLabellerBase, 'BpLabellerBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
87
|
+
setMetadataFor(BpPartialLabellerBase, 'BpPartialLabellerBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
88
|
+
setMetadataFor(CompleteLabellerBase, 'CompleteLabellerBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
89
|
+
setMetadataFor(GroundedLabellerBase, 'GroundedLabellerBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
90
|
+
setMetadataFor(GroundedLabellerOptimizedBase, 'GroundedLabellerOptimizedBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
91
|
+
setMetadataFor(PassThroughStatementLabeller, 'PassThroughStatementLabeller', objectMeta, VOID, [ArgLibrary]);
|
|
92
|
+
setMetadataFor(StatementLabellerBase, 'StatementLabellerBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
93
|
+
setMetadataFor(Companion_1, 'Companion', objectMeta);
|
|
94
|
+
setMetadataFor(RuleParserBase, 'RuleParserBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
95
|
+
setMetadataFor(StructuredModeBase, 'StructuredModeBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
96
|
+
setMetadataFor(DebugBase, 'DebugBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
97
|
+
setMetadataFor(SuperiorityRelationBase, 'SuperiorityRelationBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
98
|
+
setMetadataFor(UtilsBase, 'UtilsBase', classMeta, LazyRawPrologContent, [ArgLibrary, LazyRawPrologContent]);
|
|
99
|
+
setMetadataFor(EngineInterface, 'EngineInterface', objectMeta, EngineInterfaceBase);
|
|
100
|
+
setMetadataFor(AbstractMode, 'AbstractMode', objectMeta, AbstractModeBase);
|
|
101
|
+
setMetadataFor(ArgumentationGraphBuilder, 'ArgumentationGraphBuilder', objectMeta, ArgumentationGraphBuilderBase);
|
|
102
|
+
setMetadataFor(AttackRestrictionHandler, 'AttackRestrictionHandler', objectMeta, AttackRestrictionHandlerBase);
|
|
103
|
+
setMetadataFor(BpMetaGraphHandler, 'BpMetaGraphHandler', objectMeta, BpMetaGraphHandlerBase);
|
|
104
|
+
setMetadataFor(DefeasiblePreferencesHandler, 'DefeasiblePreferencesHandler', objectMeta, DefeasiblePreferencesHandlerBase);
|
|
105
|
+
setMetadataFor(GenericDefeasiblePreferencesHandler, 'GenericDefeasiblePreferencesHandler', objectMeta, GenericDefeasiblePreferencesHandlerBase);
|
|
106
|
+
setMetadataFor(StrictPreferencesHandler, 'StrictPreferencesHandler', objectMeta, StrictPreferencesHandlerBase);
|
|
107
|
+
setMetadataFor(BpCompleteLabeller, 'BpCompleteLabeller', objectMeta, BpCompleteLabellerBase);
|
|
108
|
+
setMetadataFor(BpLabeller, 'BpLabeller', objectMeta, BpLabellerBase);
|
|
109
|
+
setMetadataFor(BpPartialLabeller, 'BpPartialLabeller', objectMeta, BpPartialLabellerBase);
|
|
110
|
+
setMetadataFor(CompleteLabeller, 'CompleteLabeller', objectMeta, CompleteLabellerBase);
|
|
111
|
+
setMetadataFor(GroundedLabeller, 'GroundedLabeller', objectMeta, GroundedLabellerBase);
|
|
112
|
+
setMetadataFor(GroundedLabellerOptimized, 'GroundedLabellerOptimized', objectMeta, GroundedLabellerOptimizedBase);
|
|
113
|
+
setMetadataFor(StatementLabeller, 'StatementLabeller', objectMeta, StatementLabellerBase);
|
|
114
|
+
setMetadataFor(RuleParser, 'RuleParser', objectMeta, RuleParserBase);
|
|
115
|
+
setMetadataFor(AbstractMode_0, 'AbstractMode', objectMeta);
|
|
116
|
+
setMetadataFor(ArgumentationEngineInterface, 'ArgumentationEngineInterface', objectMeta);
|
|
117
|
+
setMetadataFor(ArgumentationGraph, 'ArgumentationGraph', objectMeta);
|
|
118
|
+
setMetadataFor(AttackRestriction, 'AttackRestriction', objectMeta);
|
|
119
|
+
setMetadataFor(Bp, 'Bp', objectMeta);
|
|
120
|
+
setMetadataFor(BpGrounded, 'BpGrounded', objectMeta);
|
|
121
|
+
setMetadataFor(BpGroundedComplete, 'BpGroundedComplete', objectMeta);
|
|
122
|
+
setMetadataFor(BpGroundedPartial, 'BpGroundedPartial', objectMeta);
|
|
123
|
+
setMetadataFor(Complete, 'Complete', objectMeta);
|
|
124
|
+
setMetadataFor(Debug, 'Debug', objectMeta);
|
|
125
|
+
setMetadataFor(DefPreferences, 'DefPreferences', objectMeta);
|
|
126
|
+
setMetadataFor(GenericDefPreferences, 'GenericDefPreferences', objectMeta);
|
|
127
|
+
setMetadataFor(Grounded, 'Grounded', objectMeta);
|
|
128
|
+
setMetadataFor(GroundedOptimized, 'GroundedOptimized', objectMeta);
|
|
129
|
+
setMetadataFor(Preferences, 'Preferences', objectMeta);
|
|
130
|
+
setMetadataFor(QueryMode, 'QueryMode', objectMeta);
|
|
131
|
+
setMetadataFor(RuleTranslator, 'RuleTranslator', objectMeta);
|
|
132
|
+
setMetadataFor(StatementLabelling, 'StatementLabelling', objectMeta);
|
|
133
|
+
setMetadataFor(SuperiorityRelation, 'SuperiorityRelation', objectMeta);
|
|
134
|
+
setMetadataFor(Utils, 'Utils', objectMeta);
|
|
135
|
+
setMetadataFor(StructuredMode, 'StructuredMode', objectMeta, StructuredModeBase);
|
|
136
|
+
setMetadataFor(Debug_0, 'Debug', objectMeta, DebugBase);
|
|
137
|
+
setMetadataFor(SuperiorityRelation_0, 'SuperiorityRelation', objectMeta, SuperiorityRelationBase);
|
|
138
|
+
setMetadataFor(Utils_0, 'Utils', objectMeta, UtilsBase);
|
|
139
|
+
//endregion
|
|
140
|
+
function Arg2pSolver$Companion$of$1($staticLibs, $dynamicLibs) {
|
|
141
|
+
this.x34_1 = $staticLibs;
|
|
142
|
+
this.y34_1 = $dynamicLibs;
|
|
143
|
+
this.v34_1 = new DynamicLoader(this);
|
|
144
|
+
this.w34_1 = new Context();
|
|
145
|
+
}
|
|
146
|
+
function Companion() {
|
|
147
|
+
Companion_instance = this;
|
|
148
|
+
}
|
|
149
|
+
protoOf(Companion).z34 = function (staticLibs, dynamicLibs) {
|
|
150
|
+
return new Arg2pSolver$Companion$of$1(staticLibs, dynamicLibs);
|
|
151
|
+
};
|
|
152
|
+
protoOf(Companion).a35 = function (staticLibs, dynamicLibs) {
|
|
153
|
+
return this.z34(plus(listOf([EngineInterface_getInstance(), new Cache()]), staticLibs), plus(listOf([Utils_getInstance_0(), Debug_getInstance_0(), RuleParser_getInstance(), MetaInterpreter_getInstance(), ModuleCalls_getInstance(), 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
|
+
};
|
|
155
|
+
var Companion_instance;
|
|
156
|
+
function Companion_getInstance_4() {
|
|
157
|
+
if (Companion_instance == null)
|
|
158
|
+
new Companion();
|
|
159
|
+
return Companion_instance;
|
|
160
|
+
}
|
|
161
|
+
function Arg2pSolverFactory() {
|
|
162
|
+
Arg2pSolverFactory_instance = this;
|
|
163
|
+
}
|
|
164
|
+
protoOf(Arg2pSolverFactory).of = function (staticLibs, dynamicLibs) {
|
|
165
|
+
return Companion_getInstance_4().z34(staticLibs, dynamicLibs);
|
|
166
|
+
};
|
|
167
|
+
protoOf(Arg2pSolverFactory).a35 = function (staticLibs, dynamicLibs) {
|
|
168
|
+
return Companion_getInstance_4().a35(staticLibs, dynamicLibs);
|
|
169
|
+
};
|
|
170
|
+
protoOf(Arg2pSolverFactory).default = function (staticLibs, dynamicLibs, $super) {
|
|
171
|
+
staticLibs = staticLibs === VOID ? emptyList() : staticLibs;
|
|
172
|
+
dynamicLibs = dynamicLibs === VOID ? emptyList() : dynamicLibs;
|
|
173
|
+
return this.a35(staticLibs, dynamicLibs);
|
|
174
|
+
};
|
|
175
|
+
var Arg2pSolverFactory_instance;
|
|
176
|
+
function Arg2pSolverFactory_getInstance() {
|
|
177
|
+
if (Arg2pSolverFactory_instance == null)
|
|
178
|
+
new Arg2pSolverFactory();
|
|
179
|
+
return Arg2pSolverFactory_instance;
|
|
180
|
+
}
|
|
181
|
+
function ArgLibrary() {
|
|
182
|
+
}
|
|
183
|
+
function LazyRawPrologContent$prologTheory$delegate$lambda(this$0) {
|
|
184
|
+
return function () {
|
|
185
|
+
return parseTheoryWithOperators(Companion_getInstance_0(), this$0.d35(), this$0.b35());
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function LazyRawPrologContent() {
|
|
189
|
+
var tmp = this;
|
|
190
|
+
tmp.c35_1 = lazy(LazyRawPrologContent$prologTheory$delegate$lambda(this));
|
|
191
|
+
}
|
|
192
|
+
function Cache() {
|
|
193
|
+
var tmp = this;
|
|
194
|
+
var tmp$ret$0;
|
|
195
|
+
// Inline function 'kotlin.also' call
|
|
196
|
+
var tmp0_also = Companion_getInstance_1().d1u().rawMutableSolverOf(VOID, VOID, VOID, Companion_getInstance_0().emptyWithDefaultUnificator(), Companion_getInstance_2().empty(Companion_getInstance_3().c1i()));
|
|
197
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
198
|
+
// Inline function 'it.unibo.tuprolog.argumentation.core.libs.basic.Cache.solver.<anonymous>' call
|
|
199
|
+
tmp0_also.setFlag(Unknown_getInstance().x25_1, Unknown_getInstance().w25_1);
|
|
200
|
+
tmp$ret$0 = tmp0_also;
|
|
201
|
+
tmp.e35_1 = tmp$ret$0;
|
|
202
|
+
this.f35_1 = 'prolog.argumentation.cache';
|
|
203
|
+
}
|
|
204
|
+
function Context() {
|
|
205
|
+
this.g35_1 = 1;
|
|
206
|
+
this.h35_1 = 0;
|
|
207
|
+
var tmp = this;
|
|
208
|
+
var tmp$ret$0;
|
|
209
|
+
// Inline function 'kotlin.also' call
|
|
210
|
+
var tmp0_also = Companion_getInstance_1().d1u().mutableSolverWithDefaultBuiltinsAnd(VOID, VOID, VOID, Companion_getInstance_0().emptyWithDefaultUnificator(), Companion_getInstance_2().empty(Companion_getInstance_3().c1i()));
|
|
211
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
212
|
+
// Inline function 'it.unibo.tuprolog.argumentation.core.libs.basic.Context.dynamicSolver.<anonymous>' call
|
|
213
|
+
tmp0_also.setFlag(Unknown_getInstance().x25_1, Unknown_getInstance().w25_1);
|
|
214
|
+
tmp$ret$0 = tmp0_also;
|
|
215
|
+
tmp.i35_1 = mutableMapOf([to(0, tmp$ret$0)]);
|
|
216
|
+
this.j35_1 = 'prolog.argumentation.context';
|
|
217
|
+
}
|
|
218
|
+
function Companion_0() {
|
|
219
|
+
Companion_instance_0 = this;
|
|
220
|
+
}
|
|
221
|
+
protoOf(Companion_0).k35 = function () {
|
|
222
|
+
return OperatorSet_init_$Create$([new Operator('::', Specifier_XFX_getInstance(), 700), new Operator(':::', Specifier_XFX_getInstance(), 700)]);
|
|
223
|
+
};
|
|
224
|
+
var Companion_instance_0;
|
|
225
|
+
function Companion_getInstance_5() {
|
|
226
|
+
if (Companion_instance_0 == null)
|
|
227
|
+
new Companion_0();
|
|
228
|
+
return Companion_instance_0;
|
|
229
|
+
}
|
|
230
|
+
function DynamicLoader(solver) {
|
|
231
|
+
Companion_getInstance_5();
|
|
232
|
+
this.l35_1 = solver;
|
|
233
|
+
this.m35_1 = 'prolog.argumentation.loader';
|
|
234
|
+
this.n35_1 = Companion_getInstance_5().k35();
|
|
235
|
+
}
|
|
236
|
+
function EngineInterfaceBase() {
|
|
237
|
+
LazyRawPrologContent.call(this);
|
|
238
|
+
this.p35_1 = 'prolog.argumentation.interface';
|
|
239
|
+
this.q35_1 = Companion_getInstance_6().k35().plusOperatorSet(Companion_getInstance_5().k35()).plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
240
|
+
}
|
|
241
|
+
protoOf(EngineInterfaceBase).b35 = function () {
|
|
242
|
+
return this.q35_1;
|
|
243
|
+
};
|
|
244
|
+
function MetaInterpreter() {
|
|
245
|
+
MetaInterpreter_instance = this;
|
|
246
|
+
this.r35_1 = 'prolog.argumentation.meta.crossjustice';
|
|
247
|
+
}
|
|
248
|
+
var MetaInterpreter_instance;
|
|
249
|
+
function MetaInterpreter_getInstance() {
|
|
250
|
+
if (MetaInterpreter_instance == null)
|
|
251
|
+
new MetaInterpreter();
|
|
252
|
+
return MetaInterpreter_instance;
|
|
253
|
+
}
|
|
254
|
+
function ModuleCalls() {
|
|
255
|
+
ModuleCalls_instance = this;
|
|
256
|
+
this.s35_1 = 'prolog.argumentation.modularity';
|
|
257
|
+
}
|
|
258
|
+
var ModuleCalls_instance;
|
|
259
|
+
function ModuleCalls_getInstance() {
|
|
260
|
+
if (ModuleCalls_instance == null)
|
|
261
|
+
new ModuleCalls();
|
|
262
|
+
return ModuleCalls_instance;
|
|
263
|
+
}
|
|
264
|
+
function AbstractModeBase() {
|
|
265
|
+
LazyRawPrologContent.call(this);
|
|
266
|
+
this.u35_1 = 'prolog.argumentation.abstract';
|
|
267
|
+
this.v35_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
268
|
+
}
|
|
269
|
+
protoOf(AbstractModeBase).b35 = function () {
|
|
270
|
+
return this.v35_1;
|
|
271
|
+
};
|
|
272
|
+
function ArgumentationGraphBuilderBase() {
|
|
273
|
+
LazyRawPrologContent.call(this);
|
|
274
|
+
this.x35_1 = 'prolog.argumentation.graph';
|
|
275
|
+
this.y35_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
276
|
+
}
|
|
277
|
+
protoOf(ArgumentationGraphBuilderBase).b35 = function () {
|
|
278
|
+
return this.y35_1;
|
|
279
|
+
};
|
|
280
|
+
function AttackRestrictionHandlerBase() {
|
|
281
|
+
LazyRawPrologContent.call(this);
|
|
282
|
+
this.a36_1 = 'prolog.argumentation.graph.rebutrestriction';
|
|
283
|
+
this.b36_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
284
|
+
}
|
|
285
|
+
protoOf(AttackRestrictionHandlerBase).b35 = function () {
|
|
286
|
+
return this.b36_1;
|
|
287
|
+
};
|
|
288
|
+
function BpMetaGraphHandlerBase() {
|
|
289
|
+
LazyRawPrologContent.call(this);
|
|
290
|
+
this.d36_1 = 'prolog.argumentation.graph.meta.bp';
|
|
291
|
+
this.e36_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
292
|
+
}
|
|
293
|
+
protoOf(BpMetaGraphHandlerBase).b35 = function () {
|
|
294
|
+
return this.e36_1;
|
|
295
|
+
};
|
|
296
|
+
function DefeasiblePreferencesHandlerBase() {
|
|
297
|
+
LazyRawPrologContent.call(this);
|
|
298
|
+
this.g36_1 = 'prolog.argumentation.graph.preferences.defeasible';
|
|
299
|
+
this.h36_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
300
|
+
}
|
|
301
|
+
protoOf(DefeasiblePreferencesHandlerBase).b35 = function () {
|
|
302
|
+
return this.h36_1;
|
|
303
|
+
};
|
|
304
|
+
function GenericDefeasiblePreferencesHandlerBase() {
|
|
305
|
+
LazyRawPrologContent.call(this);
|
|
306
|
+
this.j36_1 = 'prolog.argumentation.graph.preferences.defeasible.generic';
|
|
307
|
+
this.k36_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
308
|
+
}
|
|
309
|
+
protoOf(GenericDefeasiblePreferencesHandlerBase).b35 = function () {
|
|
310
|
+
return this.k36_1;
|
|
311
|
+
};
|
|
312
|
+
function StrictPreferencesHandlerBase() {
|
|
313
|
+
LazyRawPrologContent.call(this);
|
|
314
|
+
this.m36_1 = 'prolog.argumentation.graph.preferences.strict';
|
|
315
|
+
this.n36_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
316
|
+
}
|
|
317
|
+
protoOf(StrictPreferencesHandlerBase).b35 = function () {
|
|
318
|
+
return this.n36_1;
|
|
319
|
+
};
|
|
320
|
+
function BinaryStatementLabeller() {
|
|
321
|
+
BinaryStatementLabeller_instance = this;
|
|
322
|
+
this.o36_1 = 'prolog.argumentation.graph.labelling.statement.binary';
|
|
323
|
+
this.p36_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
324
|
+
}
|
|
325
|
+
var BinaryStatementLabeller_instance;
|
|
326
|
+
function BinaryStatementLabeller_getInstance() {
|
|
327
|
+
if (BinaryStatementLabeller_instance == null)
|
|
328
|
+
new BinaryStatementLabeller();
|
|
329
|
+
return BinaryStatementLabeller_instance;
|
|
330
|
+
}
|
|
331
|
+
function BpCompleteLabellerBase() {
|
|
332
|
+
LazyRawPrologContent.call(this);
|
|
333
|
+
this.r36_1 = 'prolog.argumentation.graph.labelling.bpgroundedcomplete';
|
|
334
|
+
this.s36_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
335
|
+
}
|
|
336
|
+
protoOf(BpCompleteLabellerBase).b35 = function () {
|
|
337
|
+
return this.s36_1;
|
|
338
|
+
};
|
|
339
|
+
function BpLabellerBase() {
|
|
340
|
+
LazyRawPrologContent.call(this);
|
|
341
|
+
this.u36_1 = 'prolog.argumentation.graph.labelling.bpgrounded';
|
|
342
|
+
this.v36_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
343
|
+
}
|
|
344
|
+
protoOf(BpLabellerBase).b35 = function () {
|
|
345
|
+
return this.v36_1;
|
|
346
|
+
};
|
|
347
|
+
function BpPartialLabellerBase() {
|
|
348
|
+
LazyRawPrologContent.call(this);
|
|
349
|
+
this.x36_1 = 'prolog.argumentation.graph.labelling.bpgroundedpartial';
|
|
350
|
+
this.y36_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
351
|
+
}
|
|
352
|
+
protoOf(BpPartialLabellerBase).b35 = function () {
|
|
353
|
+
return this.y36_1;
|
|
354
|
+
};
|
|
355
|
+
function CompleteLabellerBase() {
|
|
356
|
+
LazyRawPrologContent.call(this);
|
|
357
|
+
this.a37_1 = 'prolog.argumentation.graph.labelling.complete';
|
|
358
|
+
this.b37_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
359
|
+
}
|
|
360
|
+
protoOf(CompleteLabellerBase).b35 = function () {
|
|
361
|
+
return this.b37_1;
|
|
362
|
+
};
|
|
363
|
+
function GroundedLabellerBase() {
|
|
364
|
+
LazyRawPrologContent.call(this);
|
|
365
|
+
this.d37_1 = 'prolog.argumentation.graph.labelling.grounded';
|
|
366
|
+
this.e37_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
367
|
+
}
|
|
368
|
+
protoOf(GroundedLabellerBase).b35 = function () {
|
|
369
|
+
return this.e37_1;
|
|
370
|
+
};
|
|
371
|
+
function GroundedLabellerOptimizedBase() {
|
|
372
|
+
LazyRawPrologContent.call(this);
|
|
373
|
+
this.g37_1 = 'prolog.argumentation.graph.labelling.grounded.optimized';
|
|
374
|
+
this.h37_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
375
|
+
}
|
|
376
|
+
protoOf(GroundedLabellerOptimizedBase).b35 = function () {
|
|
377
|
+
return this.h37_1;
|
|
378
|
+
};
|
|
379
|
+
function PassThroughStatementLabeller() {
|
|
380
|
+
PassThroughStatementLabeller_instance = this;
|
|
381
|
+
this.i37_1 = 'prolog.argumentation.graph.labelling.statement.pt';
|
|
382
|
+
this.j37_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
383
|
+
}
|
|
384
|
+
var PassThroughStatementLabeller_instance;
|
|
385
|
+
function PassThroughStatementLabeller_getInstance() {
|
|
386
|
+
if (PassThroughStatementLabeller_instance == null)
|
|
387
|
+
new PassThroughStatementLabeller();
|
|
388
|
+
return PassThroughStatementLabeller_instance;
|
|
389
|
+
}
|
|
390
|
+
function StatementLabellerBase() {
|
|
391
|
+
LazyRawPrologContent.call(this);
|
|
392
|
+
this.l37_1 = 'prolog.argumentation.graph.labelling.statement';
|
|
393
|
+
this.m37_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
394
|
+
}
|
|
395
|
+
protoOf(StatementLabellerBase).b35 = function () {
|
|
396
|
+
return this.m37_1;
|
|
397
|
+
};
|
|
398
|
+
function Companion_1() {
|
|
399
|
+
Companion_instance_1 = this;
|
|
400
|
+
}
|
|
401
|
+
protoOf(Companion_1).k35 = function () {
|
|
402
|
+
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
|
+
};
|
|
404
|
+
var Companion_instance_1;
|
|
405
|
+
function Companion_getInstance_6() {
|
|
406
|
+
if (Companion_instance_1 == null)
|
|
407
|
+
new Companion_1();
|
|
408
|
+
return Companion_instance_1;
|
|
409
|
+
}
|
|
410
|
+
function RuleParserBase() {
|
|
411
|
+
Companion_getInstance_6();
|
|
412
|
+
LazyRawPrologContent.call(this);
|
|
413
|
+
this.o37_1 = 'prolog.argumentation.parser';
|
|
414
|
+
this.p37_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance_6().k35()).plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
415
|
+
}
|
|
416
|
+
protoOf(RuleParserBase).b35 = function () {
|
|
417
|
+
return this.p37_1;
|
|
418
|
+
};
|
|
419
|
+
function StructuredModeBase() {
|
|
420
|
+
LazyRawPrologContent.call(this);
|
|
421
|
+
this.r37_1 = 'prolog.argumentation.structured';
|
|
422
|
+
this.s37_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
423
|
+
}
|
|
424
|
+
protoOf(StructuredModeBase).b35 = function () {
|
|
425
|
+
return this.s37_1;
|
|
426
|
+
};
|
|
427
|
+
function DebugBase() {
|
|
428
|
+
LazyRawPrologContent.call(this);
|
|
429
|
+
this.u37_1 = 'prolog.argumentation.debug';
|
|
430
|
+
this.v37_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
431
|
+
}
|
|
432
|
+
protoOf(DebugBase).b35 = function () {
|
|
433
|
+
return this.v37_1;
|
|
434
|
+
};
|
|
435
|
+
function SuperiorityRelationBase() {
|
|
436
|
+
LazyRawPrologContent.call(this);
|
|
437
|
+
this.x37_1 = 'prolog.argumentation.superiority';
|
|
438
|
+
this.y37_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
439
|
+
}
|
|
440
|
+
protoOf(SuperiorityRelationBase).b35 = function () {
|
|
441
|
+
return this.y37_1;
|
|
442
|
+
};
|
|
443
|
+
function UtilsBase() {
|
|
444
|
+
LazyRawPrologContent.call(this);
|
|
445
|
+
this.a38_1 = 'prolog.argumentation.utils';
|
|
446
|
+
this.b38_1 = Companion_getInstance_5().k35().plusOperatorSet(Companion_getInstance().DEFAULT);
|
|
447
|
+
}
|
|
448
|
+
protoOf(UtilsBase).b35 = function () {
|
|
449
|
+
return this.b38_1;
|
|
450
|
+
};
|
|
451
|
+
function EngineInterface() {
|
|
452
|
+
EngineInterface_instance = this;
|
|
453
|
+
EngineInterfaceBase.call(this);
|
|
454
|
+
}
|
|
455
|
+
protoOf(EngineInterface).d35 = function () {
|
|
456
|
+
return ArgumentationEngineInterface_getInstance().f38_1;
|
|
457
|
+
};
|
|
458
|
+
var EngineInterface_instance;
|
|
459
|
+
function EngineInterface_getInstance() {
|
|
460
|
+
if (EngineInterface_instance == null)
|
|
461
|
+
new EngineInterface();
|
|
462
|
+
return EngineInterface_instance;
|
|
463
|
+
}
|
|
464
|
+
function AbstractMode() {
|
|
465
|
+
AbstractMode_instance = this;
|
|
466
|
+
AbstractModeBase.call(this);
|
|
467
|
+
}
|
|
468
|
+
protoOf(AbstractMode).d35 = function () {
|
|
469
|
+
return AbstractMode_getInstance_0().j38_1;
|
|
470
|
+
};
|
|
471
|
+
var AbstractMode_instance;
|
|
472
|
+
function AbstractMode_getInstance() {
|
|
473
|
+
if (AbstractMode_instance == null)
|
|
474
|
+
new AbstractMode();
|
|
475
|
+
return AbstractMode_instance;
|
|
476
|
+
}
|
|
477
|
+
function ArgumentationGraphBuilder() {
|
|
478
|
+
ArgumentationGraphBuilder_instance = this;
|
|
479
|
+
ArgumentationGraphBuilderBase.call(this);
|
|
480
|
+
}
|
|
481
|
+
protoOf(ArgumentationGraphBuilder).d35 = function () {
|
|
482
|
+
return ArgumentationGraph_getInstance().n38_1;
|
|
483
|
+
};
|
|
484
|
+
var ArgumentationGraphBuilder_instance;
|
|
485
|
+
function ArgumentationGraphBuilder_getInstance() {
|
|
486
|
+
if (ArgumentationGraphBuilder_instance == null)
|
|
487
|
+
new ArgumentationGraphBuilder();
|
|
488
|
+
return ArgumentationGraphBuilder_instance;
|
|
489
|
+
}
|
|
490
|
+
function AttackRestrictionHandler() {
|
|
491
|
+
AttackRestrictionHandler_instance = this;
|
|
492
|
+
AttackRestrictionHandlerBase.call(this);
|
|
493
|
+
}
|
|
494
|
+
protoOf(AttackRestrictionHandler).d35 = function () {
|
|
495
|
+
return AttackRestriction_getInstance().r38_1;
|
|
496
|
+
};
|
|
497
|
+
var AttackRestrictionHandler_instance;
|
|
498
|
+
function AttackRestrictionHandler_getInstance() {
|
|
499
|
+
if (AttackRestrictionHandler_instance == null)
|
|
500
|
+
new AttackRestrictionHandler();
|
|
501
|
+
return AttackRestrictionHandler_instance;
|
|
502
|
+
}
|
|
503
|
+
function BpMetaGraphHandler() {
|
|
504
|
+
BpMetaGraphHandler_instance = this;
|
|
505
|
+
BpMetaGraphHandlerBase.call(this);
|
|
506
|
+
}
|
|
507
|
+
protoOf(BpMetaGraphHandler).d35 = function () {
|
|
508
|
+
return Bp_getInstance().v38_1;
|
|
509
|
+
};
|
|
510
|
+
var BpMetaGraphHandler_instance;
|
|
511
|
+
function BpMetaGraphHandler_getInstance() {
|
|
512
|
+
if (BpMetaGraphHandler_instance == null)
|
|
513
|
+
new BpMetaGraphHandler();
|
|
514
|
+
return BpMetaGraphHandler_instance;
|
|
515
|
+
}
|
|
516
|
+
function DefeasiblePreferencesHandler() {
|
|
517
|
+
DefeasiblePreferencesHandler_instance = this;
|
|
518
|
+
DefeasiblePreferencesHandlerBase.call(this);
|
|
519
|
+
}
|
|
520
|
+
protoOf(DefeasiblePreferencesHandler).d35 = function () {
|
|
521
|
+
return DefPreferences_getInstance().z38_1;
|
|
522
|
+
};
|
|
523
|
+
var DefeasiblePreferencesHandler_instance;
|
|
524
|
+
function DefeasiblePreferencesHandler_getInstance() {
|
|
525
|
+
if (DefeasiblePreferencesHandler_instance == null)
|
|
526
|
+
new DefeasiblePreferencesHandler();
|
|
527
|
+
return DefeasiblePreferencesHandler_instance;
|
|
528
|
+
}
|
|
529
|
+
function GenericDefeasiblePreferencesHandler() {
|
|
530
|
+
GenericDefeasiblePreferencesHandler_instance = this;
|
|
531
|
+
GenericDefeasiblePreferencesHandlerBase.call(this);
|
|
532
|
+
}
|
|
533
|
+
protoOf(GenericDefeasiblePreferencesHandler).d35 = function () {
|
|
534
|
+
return GenericDefPreferences_getInstance().d39_1;
|
|
535
|
+
};
|
|
536
|
+
var GenericDefeasiblePreferencesHandler_instance;
|
|
537
|
+
function GenericDefeasiblePreferencesHandler_getInstance() {
|
|
538
|
+
if (GenericDefeasiblePreferencesHandler_instance == null)
|
|
539
|
+
new GenericDefeasiblePreferencesHandler();
|
|
540
|
+
return GenericDefeasiblePreferencesHandler_instance;
|
|
541
|
+
}
|
|
542
|
+
function StrictPreferencesHandler() {
|
|
543
|
+
StrictPreferencesHandler_instance = this;
|
|
544
|
+
StrictPreferencesHandlerBase.call(this);
|
|
545
|
+
}
|
|
546
|
+
protoOf(StrictPreferencesHandler).d35 = function () {
|
|
547
|
+
return Preferences_getInstance().h39_1;
|
|
548
|
+
};
|
|
549
|
+
var StrictPreferencesHandler_instance;
|
|
550
|
+
function StrictPreferencesHandler_getInstance() {
|
|
551
|
+
if (StrictPreferencesHandler_instance == null)
|
|
552
|
+
new StrictPreferencesHandler();
|
|
553
|
+
return StrictPreferencesHandler_instance;
|
|
554
|
+
}
|
|
555
|
+
function BpCompleteLabeller() {
|
|
556
|
+
BpCompleteLabeller_instance = this;
|
|
557
|
+
BpCompleteLabellerBase.call(this);
|
|
558
|
+
}
|
|
559
|
+
protoOf(BpCompleteLabeller).d35 = function () {
|
|
560
|
+
return BpGroundedComplete_getInstance().l39_1;
|
|
561
|
+
};
|
|
562
|
+
var BpCompleteLabeller_instance;
|
|
563
|
+
function BpCompleteLabeller_getInstance() {
|
|
564
|
+
if (BpCompleteLabeller_instance == null)
|
|
565
|
+
new BpCompleteLabeller();
|
|
566
|
+
return BpCompleteLabeller_instance;
|
|
567
|
+
}
|
|
568
|
+
function BpLabeller() {
|
|
569
|
+
BpLabeller_instance = this;
|
|
570
|
+
BpLabellerBase.call(this);
|
|
571
|
+
}
|
|
572
|
+
protoOf(BpLabeller).d35 = function () {
|
|
573
|
+
return BpGrounded_getInstance().p39_1;
|
|
574
|
+
};
|
|
575
|
+
var BpLabeller_instance;
|
|
576
|
+
function BpLabeller_getInstance() {
|
|
577
|
+
if (BpLabeller_instance == null)
|
|
578
|
+
new BpLabeller();
|
|
579
|
+
return BpLabeller_instance;
|
|
580
|
+
}
|
|
581
|
+
function BpPartialLabeller() {
|
|
582
|
+
BpPartialLabeller_instance = this;
|
|
583
|
+
BpPartialLabellerBase.call(this);
|
|
584
|
+
}
|
|
585
|
+
protoOf(BpPartialLabeller).d35 = function () {
|
|
586
|
+
return BpGroundedPartial_getInstance().t39_1;
|
|
587
|
+
};
|
|
588
|
+
var BpPartialLabeller_instance;
|
|
589
|
+
function BpPartialLabeller_getInstance() {
|
|
590
|
+
if (BpPartialLabeller_instance == null)
|
|
591
|
+
new BpPartialLabeller();
|
|
592
|
+
return BpPartialLabeller_instance;
|
|
593
|
+
}
|
|
594
|
+
function CompleteLabeller() {
|
|
595
|
+
CompleteLabeller_instance = this;
|
|
596
|
+
CompleteLabellerBase.call(this);
|
|
597
|
+
}
|
|
598
|
+
protoOf(CompleteLabeller).d35 = function () {
|
|
599
|
+
return Complete_getInstance().x39_1;
|
|
600
|
+
};
|
|
601
|
+
var CompleteLabeller_instance;
|
|
602
|
+
function CompleteLabeller_getInstance() {
|
|
603
|
+
if (CompleteLabeller_instance == null)
|
|
604
|
+
new CompleteLabeller();
|
|
605
|
+
return CompleteLabeller_instance;
|
|
606
|
+
}
|
|
607
|
+
function GroundedLabeller() {
|
|
608
|
+
GroundedLabeller_instance = this;
|
|
609
|
+
GroundedLabellerBase.call(this);
|
|
610
|
+
}
|
|
611
|
+
protoOf(GroundedLabeller).d35 = function () {
|
|
612
|
+
return Grounded_getInstance().b3a_1;
|
|
613
|
+
};
|
|
614
|
+
var GroundedLabeller_instance;
|
|
615
|
+
function GroundedLabeller_getInstance() {
|
|
616
|
+
if (GroundedLabeller_instance == null)
|
|
617
|
+
new GroundedLabeller();
|
|
618
|
+
return GroundedLabeller_instance;
|
|
619
|
+
}
|
|
620
|
+
function GroundedLabellerOptimized() {
|
|
621
|
+
GroundedLabellerOptimized_instance = this;
|
|
622
|
+
GroundedLabellerOptimizedBase.call(this);
|
|
623
|
+
}
|
|
624
|
+
protoOf(GroundedLabellerOptimized).d35 = function () {
|
|
625
|
+
return GroundedOptimized_getInstance().f3a_1;
|
|
626
|
+
};
|
|
627
|
+
var GroundedLabellerOptimized_instance;
|
|
628
|
+
function GroundedLabellerOptimized_getInstance() {
|
|
629
|
+
if (GroundedLabellerOptimized_instance == null)
|
|
630
|
+
new GroundedLabellerOptimized();
|
|
631
|
+
return GroundedLabellerOptimized_instance;
|
|
632
|
+
}
|
|
633
|
+
function StatementLabeller() {
|
|
634
|
+
StatementLabeller_instance = this;
|
|
635
|
+
StatementLabellerBase.call(this);
|
|
636
|
+
}
|
|
637
|
+
protoOf(StatementLabeller).d35 = function () {
|
|
638
|
+
return StatementLabelling_getInstance().j3a_1;
|
|
639
|
+
};
|
|
640
|
+
var StatementLabeller_instance;
|
|
641
|
+
function StatementLabeller_getInstance() {
|
|
642
|
+
if (StatementLabeller_instance == null)
|
|
643
|
+
new StatementLabeller();
|
|
644
|
+
return StatementLabeller_instance;
|
|
645
|
+
}
|
|
646
|
+
function RuleParser() {
|
|
647
|
+
RuleParser_instance = this;
|
|
648
|
+
RuleParserBase.call(this);
|
|
649
|
+
}
|
|
650
|
+
protoOf(RuleParser).d35 = function () {
|
|
651
|
+
return RuleTranslator_getInstance().n3a_1;
|
|
652
|
+
};
|
|
653
|
+
var RuleParser_instance;
|
|
654
|
+
function RuleParser_getInstance() {
|
|
655
|
+
if (RuleParser_instance == null)
|
|
656
|
+
new RuleParser();
|
|
657
|
+
return RuleParser_instance;
|
|
658
|
+
}
|
|
659
|
+
function AbstractMode_0() {
|
|
660
|
+
AbstractMode_instance_0 = this;
|
|
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.';
|
|
662
|
+
}
|
|
663
|
+
var AbstractMode_instance_0;
|
|
664
|
+
function AbstractMode_getInstance_0() {
|
|
665
|
+
if (AbstractMode_instance_0 == null)
|
|
666
|
+
new AbstractMode_0();
|
|
667
|
+
return AbstractMode_instance_0;
|
|
668
|
+
}
|
|
669
|
+
function ArgumentationEngineInterface() {
|
|
670
|
+
ArgumentationEngineInterface_instance = this;
|
|
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.';
|
|
672
|
+
}
|
|
673
|
+
var ArgumentationEngineInterface_instance;
|
|
674
|
+
function ArgumentationEngineInterface_getInstance() {
|
|
675
|
+
if (ArgumentationEngineInterface_instance == null)
|
|
676
|
+
new ArgumentationEngineInterface();
|
|
677
|
+
return ArgumentationEngineInterface_instance;
|
|
678
|
+
}
|
|
679
|
+
function ArgumentationGraph() {
|
|
680
|
+
ArgumentationGraph_instance = this;
|
|
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)]).';
|
|
682
|
+
}
|
|
683
|
+
var ArgumentationGraph_instance;
|
|
684
|
+
function ArgumentationGraph_getInstance() {
|
|
685
|
+
if (ArgumentationGraph_instance == null)
|
|
686
|
+
new ArgumentationGraph();
|
|
687
|
+
return ArgumentationGraph_instance;
|
|
688
|
+
}
|
|
689
|
+
function AttackRestriction() {
|
|
690
|
+
AttackRestriction_instance = this;
|
|
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.';
|
|
692
|
+
}
|
|
693
|
+
var AttackRestriction_instance;
|
|
694
|
+
function AttackRestriction_getInstance() {
|
|
695
|
+
if (AttackRestriction_instance == null)
|
|
696
|
+
new AttackRestriction();
|
|
697
|
+
return AttackRestriction_instance;
|
|
698
|
+
}
|
|
699
|
+
function Bp() {
|
|
700
|
+
Bp_instance = this;
|
|
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)).';
|
|
702
|
+
}
|
|
703
|
+
var Bp_instance;
|
|
704
|
+
function Bp_getInstance() {
|
|
705
|
+
if (Bp_instance == null)
|
|
706
|
+
new Bp();
|
|
707
|
+
return Bp_instance;
|
|
708
|
+
}
|
|
709
|
+
function BpGrounded() {
|
|
710
|
+
BpGrounded_instance = this;
|
|
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).';
|
|
712
|
+
}
|
|
713
|
+
var BpGrounded_instance;
|
|
714
|
+
function BpGrounded_getInstance() {
|
|
715
|
+
if (BpGrounded_instance == null)
|
|
716
|
+
new BpGrounded();
|
|
717
|
+
return BpGrounded_instance;
|
|
718
|
+
}
|
|
719
|
+
function BpGroundedComplete() {
|
|
720
|
+
BpGroundedComplete_instance = this;
|
|
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(_)).';
|
|
722
|
+
}
|
|
723
|
+
var BpGroundedComplete_instance;
|
|
724
|
+
function BpGroundedComplete_getInstance() {
|
|
725
|
+
if (BpGroundedComplete_instance == null)
|
|
726
|
+
new BpGroundedComplete();
|
|
727
|
+
return BpGroundedComplete_instance;
|
|
728
|
+
}
|
|
729
|
+
function BpGroundedPartial() {
|
|
730
|
+
BpGroundedPartial_instance = this;
|
|
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]).";
|
|
732
|
+
}
|
|
733
|
+
var BpGroundedPartial_instance;
|
|
734
|
+
function BpGroundedPartial_getInstance() {
|
|
735
|
+
if (BpGroundedPartial_instance == null)
|
|
736
|
+
new BpGroundedPartial();
|
|
737
|
+
return BpGroundedPartial_instance;
|
|
738
|
+
}
|
|
739
|
+
function Complete() {
|
|
740
|
+
Complete_instance = this;
|
|
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 ).';
|
|
742
|
+
}
|
|
743
|
+
var Complete_instance;
|
|
744
|
+
function Complete_getInstance() {
|
|
745
|
+
if (Complete_instance == null)
|
|
746
|
+
new Complete();
|
|
747
|
+
return Complete_instance;
|
|
748
|
+
}
|
|
749
|
+
function Debug() {
|
|
750
|
+
Debug_instance = this;
|
|
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.";
|
|
752
|
+
}
|
|
753
|
+
var Debug_instance;
|
|
754
|
+
function Debug_getInstance() {
|
|
755
|
+
if (Debug_instance == null)
|
|
756
|
+
new Debug();
|
|
757
|
+
return Debug_instance;
|
|
758
|
+
}
|
|
759
|
+
function DefPreferences() {
|
|
760
|
+
DefPreferences_instance = this;
|
|
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.';
|
|
762
|
+
}
|
|
763
|
+
var DefPreferences_instance;
|
|
764
|
+
function DefPreferences_getInstance() {
|
|
765
|
+
if (DefPreferences_instance == null)
|
|
766
|
+
new DefPreferences();
|
|
767
|
+
return DefPreferences_instance;
|
|
768
|
+
}
|
|
769
|
+
function GenericDefPreferences() {
|
|
770
|
+
GenericDefPreferences_instance = this;
|
|
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).';
|
|
772
|
+
}
|
|
773
|
+
var GenericDefPreferences_instance;
|
|
774
|
+
function GenericDefPreferences_getInstance() {
|
|
775
|
+
if (GenericDefPreferences_instance == null)
|
|
776
|
+
new GenericDefPreferences();
|
|
777
|
+
return GenericDefPreferences_instance;
|
|
778
|
+
}
|
|
779
|
+
function Grounded() {
|
|
780
|
+
Grounded_instance = this;
|
|
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)), !.';
|
|
782
|
+
}
|
|
783
|
+
var Grounded_instance;
|
|
784
|
+
function Grounded_getInstance() {
|
|
785
|
+
if (Grounded_instance == null)
|
|
786
|
+
new Grounded();
|
|
787
|
+
return Grounded_instance;
|
|
788
|
+
}
|
|
789
|
+
function GroundedOptimized() {
|
|
790
|
+
GroundedOptimized_instance = this;
|
|
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)), !.';
|
|
792
|
+
}
|
|
793
|
+
var GroundedOptimized_instance;
|
|
794
|
+
function GroundedOptimized_getInstance() {
|
|
795
|
+
if (GroundedOptimized_instance == null)
|
|
796
|
+
new GroundedOptimized();
|
|
797
|
+
return GroundedOptimized_instance;
|
|
798
|
+
}
|
|
799
|
+
function Preferences() {
|
|
800
|
+
Preferences_instance = this;
|
|
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).';
|
|
802
|
+
}
|
|
803
|
+
var Preferences_instance;
|
|
804
|
+
function Preferences_getInstance() {
|
|
805
|
+
if (Preferences_instance == null)
|
|
806
|
+
new Preferences();
|
|
807
|
+
return Preferences_instance;
|
|
808
|
+
}
|
|
809
|
+
function QueryMode() {
|
|
810
|
+
QueryMode_instance = this;
|
|
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).';
|
|
812
|
+
}
|
|
813
|
+
var QueryMode_instance;
|
|
814
|
+
function QueryMode_getInstance() {
|
|
815
|
+
if (QueryMode_instance == null)
|
|
816
|
+
new QueryMode();
|
|
817
|
+
return QueryMode_instance;
|
|
818
|
+
}
|
|
819
|
+
function RuleTranslator() {
|
|
820
|
+
RuleTranslator_instance = this;
|
|
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).";
|
|
822
|
+
}
|
|
823
|
+
var RuleTranslator_instance;
|
|
824
|
+
function RuleTranslator_getInstance() {
|
|
825
|
+
if (RuleTranslator_instance == null)
|
|
826
|
+
new RuleTranslator();
|
|
827
|
+
return RuleTranslator_instance;
|
|
828
|
+
}
|
|
829
|
+
function StatementLabelling() {
|
|
830
|
+
StatementLabelling_instance = this;
|
|
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 ), _).';
|
|
832
|
+
}
|
|
833
|
+
var StatementLabelling_instance;
|
|
834
|
+
function StatementLabelling_getInstance() {
|
|
835
|
+
if (StatementLabelling_instance == null)
|
|
836
|
+
new StatementLabelling();
|
|
837
|
+
return StatementLabelling_instance;
|
|
838
|
+
}
|
|
839
|
+
function SuperiorityRelation() {
|
|
840
|
+
SuperiorityRelation_instance = this;
|
|
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).';
|
|
842
|
+
}
|
|
843
|
+
var SuperiorityRelation_instance;
|
|
844
|
+
function SuperiorityRelation_getInstance() {
|
|
845
|
+
if (SuperiorityRelation_instance == null)
|
|
846
|
+
new SuperiorityRelation();
|
|
847
|
+
return SuperiorityRelation_instance;
|
|
848
|
+
}
|
|
849
|
+
function Utils() {
|
|
850
|
+
Utils_instance = this;
|
|
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).';
|
|
852
|
+
}
|
|
853
|
+
var Utils_instance;
|
|
854
|
+
function Utils_getInstance() {
|
|
855
|
+
if (Utils_instance == null)
|
|
856
|
+
new Utils();
|
|
857
|
+
return Utils_instance;
|
|
858
|
+
}
|
|
859
|
+
function StructuredMode() {
|
|
860
|
+
StructuredMode_instance = this;
|
|
861
|
+
StructuredModeBase.call(this);
|
|
862
|
+
}
|
|
863
|
+
protoOf(StructuredMode).d35 = function () {
|
|
864
|
+
return QueryMode_getInstance().p3a_1;
|
|
865
|
+
};
|
|
866
|
+
var StructuredMode_instance;
|
|
867
|
+
function StructuredMode_getInstance() {
|
|
868
|
+
if (StructuredMode_instance == null)
|
|
869
|
+
new StructuredMode();
|
|
870
|
+
return StructuredMode_instance;
|
|
871
|
+
}
|
|
872
|
+
function Debug_0() {
|
|
873
|
+
Debug_instance_0 = this;
|
|
874
|
+
DebugBase.call(this);
|
|
875
|
+
}
|
|
876
|
+
protoOf(Debug_0).d35 = function () {
|
|
877
|
+
return Debug_getInstance().o3a_1;
|
|
878
|
+
};
|
|
879
|
+
var Debug_instance_0;
|
|
880
|
+
function Debug_getInstance_0() {
|
|
881
|
+
if (Debug_instance_0 == null)
|
|
882
|
+
new Debug_0();
|
|
883
|
+
return Debug_instance_0;
|
|
884
|
+
}
|
|
885
|
+
function SuperiorityRelation_0() {
|
|
886
|
+
SuperiorityRelation_instance_0 = this;
|
|
887
|
+
SuperiorityRelationBase.call(this);
|
|
888
|
+
}
|
|
889
|
+
protoOf(SuperiorityRelation_0).d35 = function () {
|
|
890
|
+
return SuperiorityRelation_getInstance().q3a_1;
|
|
891
|
+
};
|
|
892
|
+
var SuperiorityRelation_instance_0;
|
|
893
|
+
function SuperiorityRelation_getInstance_0() {
|
|
894
|
+
if (SuperiorityRelation_instance_0 == null)
|
|
895
|
+
new SuperiorityRelation_0();
|
|
896
|
+
return SuperiorityRelation_instance_0;
|
|
897
|
+
}
|
|
898
|
+
function Utils_0() {
|
|
899
|
+
Utils_instance_0 = this;
|
|
900
|
+
UtilsBase.call(this);
|
|
901
|
+
}
|
|
902
|
+
protoOf(Utils_0).d35 = function () {
|
|
903
|
+
return Utils_getInstance().r3a_1;
|
|
904
|
+
};
|
|
905
|
+
var Utils_instance_0;
|
|
906
|
+
function Utils_getInstance_0() {
|
|
907
|
+
if (Utils_instance_0 == null)
|
|
908
|
+
new Utils_0();
|
|
909
|
+
return Utils_instance_0;
|
|
910
|
+
}
|
|
911
|
+
//region block: post-declaration
|
|
912
|
+
protoOf(LazyRawPrologContent).b35 = get_theoryOperators;
|
|
18
913
|
//endregion
|
|
19
914
|
//region block: exports
|
|
915
|
+
function $jsExportAll$(_) {
|
|
916
|
+
var $it = _.it || (_.it = {});
|
|
917
|
+
var $it$unibo = $it.unibo || ($it.unibo = {});
|
|
918
|
+
var $it$unibo$tuprolog = $it$unibo.tuprolog || ($it$unibo.tuprolog = {});
|
|
919
|
+
var $it$unibo$tuprolog$argumentation = $it$unibo$tuprolog.argumentation || ($it$unibo$tuprolog.argumentation = {});
|
|
920
|
+
var $it$unibo$tuprolog$argumentation$core = $it$unibo$tuprolog$argumentation.core || ($it$unibo$tuprolog$argumentation.core = {});
|
|
921
|
+
defineProp($it$unibo$tuprolog$argumentation$core, 'Arg2pSolverFactory', Arg2pSolverFactory_getInstance);
|
|
922
|
+
}
|
|
923
|
+
$jsExportAll$(_);
|
|
20
924
|
kotlin_io_github_gciatto_kt_math.$jsExportAll$(_);
|
|
21
925
|
kotlin_it_unibo_tuprolog_solve_classic.$jsExportAll$(_);
|
|
22
926
|
//endregion
|