@tuprolog/arg2p-core 0.6.4 → 0.6.7
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/kotlin/arg2p-core/it/unibo/tuprolog/argumentation/core/dsl/dsl.kjsm +0 -0
- package/kotlin/arg2p-core/it/unibo/tuprolog/argumentation/core/libs/utils/utils.kjsm +0 -0
- package/kotlin/arg2p-core/it/unibo/tuprolog/argumentation/core/model/model.kjsm +0 -0
- package/kotlin/arg2p-core.js +291 -79
- package/kotlin/arg2p-core.js.map +1 -1
- package/kotlin/arg2p-core.meta.js +1 -1
- package/package.json +15 -15
- package/package.json.hash +1 -1
- package/pre-package.json +15 -15
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/kotlin/arg2p-core.js
CHANGED
|
@@ -77,6 +77,8 @@
|
|
|
77
77
|
var equals = Kotlin.equals;
|
|
78
78
|
var DomainError = $module$_2p_solve.it.unibo.tuprolog.solve.exception.error.DomainError;
|
|
79
79
|
var DomainError$Expected = $module$_2p_solve.it.unibo.tuprolog.solve.exception.error.DomainError.Expected;
|
|
80
|
+
var SolveOptions = $module$_2p_solve.it.unibo.tuprolog.solve.SolveOptions;
|
|
81
|
+
var Long$Companion$MAX_VALUE = Kotlin.Long.MAX_VALUE;
|
|
80
82
|
var Unit = Kotlin.kotlin.Unit;
|
|
81
83
|
var filter = Kotlin.kotlin.sequences.filter_euau3h$;
|
|
82
84
|
var prolog = $module$_2p_dsl_core.it.unibo.tuprolog.dsl.prolog;
|
|
@@ -114,13 +116,14 @@
|
|
|
114
116
|
var IllegalArgumentException_init = Kotlin.kotlin.IllegalArgumentException_init;
|
|
115
117
|
var copyToArray = Kotlin.kotlin.collections.copyToArray;
|
|
116
118
|
var hashCode = Kotlin.hashCode;
|
|
119
|
+
var Collection = Kotlin.kotlin.collections.Collection;
|
|
117
120
|
var AliasedLibrary = $module$_2p_solve.it.unibo.tuprolog.solve.library.AliasedLibrary;
|
|
118
121
|
var compareBy = Kotlin.kotlin.comparisons.compareBy_bvgy4j$;
|
|
119
122
|
var sortedWith = Kotlin.kotlin.sequences.sortedWith_vjgqpk$;
|
|
120
123
|
var mapIndexed = Kotlin.kotlin.sequences.mapIndexed_b7yuyq$;
|
|
124
|
+
var Pair = Kotlin.kotlin.Pair;
|
|
121
125
|
var firstOrNull = Kotlin.kotlin.sequences.firstOrNull_veqyi0$;
|
|
122
126
|
var NoSuchElementException_init = Kotlin.kotlin.NoSuchElementException;
|
|
123
|
-
var addAll = Kotlin.kotlin.collections.addAll_ipc267$;
|
|
124
127
|
var firstOrNull_0 = Kotlin.kotlin.collections.firstOrNull_2p1efm$;
|
|
125
128
|
var plus_0 = Kotlin.kotlin.collections.plus_qloxvw$;
|
|
126
129
|
var Cons = $module$_2p_core.it.unibo.tuprolog.core.Cons;
|
|
@@ -926,36 +929,18 @@
|
|
|
926
929
|
PrologWithArgumentationImpl.prototype.write1 = function (term) {
|
|
927
930
|
return this.$delegate_38xz9p$_0.write1(term);
|
|
928
931
|
};
|
|
929
|
-
PrologWithArgumentationImpl.prototype.neq2 = function ($receiver, right) {
|
|
930
|
-
return this.$delegate_38xz9p$_0.neq2($receiver, right);
|
|
931
|
-
};
|
|
932
|
-
PrologWithArgumentationImpl.prototype.nid2 = function ($receiver, right) {
|
|
933
|
-
return this.$delegate_38xz9p$_0.nid2($receiver, right);
|
|
934
|
-
};
|
|
935
|
-
PrologWithArgumentationImpl.prototype.power = function ($receiver, right) {
|
|
936
|
-
return this.$delegate_38xz9p$_0.power($receiver, right);
|
|
937
|
-
};
|
|
938
|
-
PrologWithArgumentationImpl.prototype.eq2 = function ($receiver, right) {
|
|
939
|
-
return this.$delegate_38xz9p$_0.eq2($receiver, right);
|
|
940
|
-
};
|
|
941
|
-
PrologWithArgumentationImpl.prototype.arithNeq2 = function ($receiver, right) {
|
|
942
|
-
return this.$delegate_38xz9p$_0.arithNeq2($receiver, right);
|
|
943
|
-
};
|
|
944
|
-
PrologWithArgumentationImpl.prototype.id2 = function ($receiver, right) {
|
|
945
|
-
return this.$delegate_38xz9p$_0.id2($receiver, right);
|
|
946
|
-
};
|
|
947
|
-
PrologWithArgumentationImpl.prototype.arithEq2 = function ($receiver, right) {
|
|
948
|
-
return this.$delegate_38xz9p$_0.arithEq2($receiver, right);
|
|
949
|
-
};
|
|
950
|
-
PrologWithArgumentationImpl.prototype.pow = function ($receiver, right) {
|
|
951
|
-
return this.$delegate_38xz9p$_0.pow($receiver, right);
|
|
952
|
-
};
|
|
953
932
|
PrologWithArgumentationImpl.prototype.anyAnd = function ($receiver, other) {
|
|
954
933
|
return this.$delegate_38xz9p$_0.anyAnd($receiver, other);
|
|
955
934
|
};
|
|
956
935
|
PrologWithArgumentationImpl.prototype.append = function ($receiver, item, items) {
|
|
957
936
|
return this.$delegate_38xz9p$_0.append($receiver, item, items);
|
|
958
937
|
};
|
|
938
|
+
PrologWithArgumentationImpl.prototype.arithEq2 = function ($receiver, right) {
|
|
939
|
+
return this.$delegate_38xz9p$_0.arithEq2($receiver, right);
|
|
940
|
+
};
|
|
941
|
+
PrologWithArgumentationImpl.prototype.arithNeq2 = function ($receiver, right) {
|
|
942
|
+
return this.$delegate_38xz9p$_0.arithNeq2($receiver, right);
|
|
943
|
+
};
|
|
959
944
|
PrologWithArgumentationImpl.prototype.concat = function ($receiver, other) {
|
|
960
945
|
return this.$delegate_38xz9p$_0.concat($receiver, other);
|
|
961
946
|
};
|
|
@@ -971,6 +956,9 @@
|
|
|
971
956
|
PrologWithArgumentationImpl.prototype.anyDiv = function ($receiver, other) {
|
|
972
957
|
return this.$delegate_38xz9p$_0.anyDiv($receiver, other);
|
|
973
958
|
};
|
|
959
|
+
PrologWithArgumentationImpl.prototype.eq2 = function ($receiver, right) {
|
|
960
|
+
return this.$delegate_38xz9p$_0.eq2($receiver, right);
|
|
961
|
+
};
|
|
974
962
|
PrologWithArgumentationImpl.prototype.anyEqualsTo = function ($receiver, other) {
|
|
975
963
|
return this.$delegate_38xz9p$_0.anyEqualsTo($receiver, other);
|
|
976
964
|
};
|
|
@@ -983,6 +971,9 @@
|
|
|
983
971
|
PrologWithArgumentationImpl.prototype.anyGreaterThanOrEqualsTo = function ($receiver, other) {
|
|
984
972
|
return this.$delegate_38xz9p$_0.anyGreaterThanOrEqualsTo($receiver, other);
|
|
985
973
|
};
|
|
974
|
+
PrologWithArgumentationImpl.prototype.id2 = function ($receiver, right) {
|
|
975
|
+
return this.$delegate_38xz9p$_0.id2($receiver, right);
|
|
976
|
+
};
|
|
986
977
|
PrologWithArgumentationImpl.prototype.anyIf = function ($receiver, other) {
|
|
987
978
|
return this.$delegate_38xz9p$_0.anyIf($receiver, other);
|
|
988
979
|
};
|
|
@@ -1013,6 +1004,12 @@
|
|
|
1013
1004
|
PrologWithArgumentationImpl.prototype.anyMinus = function ($receiver, other) {
|
|
1014
1005
|
return this.$delegate_38xz9p$_0.anyMinus($receiver, other);
|
|
1015
1006
|
};
|
|
1007
|
+
PrologWithArgumentationImpl.prototype.neq2 = function ($receiver, right) {
|
|
1008
|
+
return this.$delegate_38xz9p$_0.neq2($receiver, right);
|
|
1009
|
+
};
|
|
1010
|
+
PrologWithArgumentationImpl.prototype.nid2 = function ($receiver, right) {
|
|
1011
|
+
return this.$delegate_38xz9p$_0.nid2($receiver, right);
|
|
1012
|
+
};
|
|
1016
1013
|
PrologWithArgumentationImpl.prototype.anyNonGreaterThan = function ($receiver, other) {
|
|
1017
1014
|
return this.$delegate_38xz9p$_0.anyNonGreaterThan($receiver, other);
|
|
1018
1015
|
};
|
|
@@ -1724,7 +1721,7 @@
|
|
|
1724
1721
|
switch (this.state_0) {
|
|
1725
1722
|
case 0:
|
|
1726
1723
|
this.state_0 = 2;
|
|
1727
|
-
this.result_0 = this.local$$receiver.yieldAll_swo9gw$(map(this.local$closure$solver.
|
|
1724
|
+
this.result_0 = this.local$$receiver.yieldAll_swo9gw$(map(this.local$closure$solver.solveWithOptions(this.local$closure$goal, SolveOptions.Companion.someEagerlyWithTimeout(1000, Long$Companion$MAX_VALUE)), DynamicLoader$AbstractWithLib$solve$lambda$lambda(this.local$closure$request)), this);
|
|
1728
1725
|
if (this.result_0 === COROUTINE_SUSPENDED)
|
|
1729
1726
|
return COROUTINE_SUSPENDED;
|
|
1730
1727
|
continue;
|
|
@@ -3777,7 +3774,7 @@
|
|
|
3777
3774
|
var tmp$_2 = to(AppendOptimized_getInstance().signature, AppendOptimized_getInstance());
|
|
3778
3775
|
var tmp$_3 = to(AssertAll_getInstance().signature, AssertAll_getInstance());
|
|
3779
3776
|
var $this = ArgumentHash_getInstance();
|
|
3780
|
-
return tmp$_1.aliased(tmp$, mapOf_0([tmp$_2, tmp$_3, to($this.signature, $this.wrappedImplementation)]), tmp$_0);
|
|
3777
|
+
return tmp$_1.aliased(tmp$, mapOf_0([tmp$_2, tmp$_3, to($this.signature, $this.wrappedImplementation), to(Contains_getInstance().signature, Contains_getInstance()), to(ContainsAny_getInstance().signature, ContainsAny_getInstance())]), tmp$_0);
|
|
3781
3778
|
}
|
|
3782
3779
|
});
|
|
3783
3780
|
Object.defineProperty(UtilsBase.prototype, 'baseFlags', {
|
|
@@ -3984,6 +3981,206 @@
|
|
|
3984
3981
|
new ArgumentHash();
|
|
3985
3982
|
}return ArgumentHash_instance;
|
|
3986
3983
|
}
|
|
3984
|
+
function Contains() {
|
|
3985
|
+
Contains_instance = this;
|
|
3986
|
+
this.signature = new Signature('contains', 2);
|
|
3987
|
+
}
|
|
3988
|
+
function Coroutine$Contains$solve$lambda(closure$request_0, closure$list_0, closure$elem_0, $receiver_0, controller, continuation_0) {
|
|
3989
|
+
CoroutineImpl.call(this, continuation_0);
|
|
3990
|
+
this.$controller = controller;
|
|
3991
|
+
this.exceptionState_0 = 1;
|
|
3992
|
+
this.local$closure$request = closure$request_0;
|
|
3993
|
+
this.local$closure$list = closure$list_0;
|
|
3994
|
+
this.local$closure$elem = closure$elem_0;
|
|
3995
|
+
this.local$$receiver = $receiver_0;
|
|
3996
|
+
}
|
|
3997
|
+
Coroutine$Contains$solve$lambda.$metadata$ = {
|
|
3998
|
+
kind: Kotlin.Kind.CLASS,
|
|
3999
|
+
simpleName: null,
|
|
4000
|
+
interfaces: [CoroutineImpl]
|
|
4001
|
+
};
|
|
4002
|
+
Coroutine$Contains$solve$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
|
4003
|
+
Coroutine$Contains$solve$lambda.prototype.constructor = Coroutine$Contains$solve$lambda;
|
|
4004
|
+
Coroutine$Contains$solve$lambda.prototype.doResume = function () {
|
|
4005
|
+
do
|
|
4006
|
+
try {
|
|
4007
|
+
switch (this.state_0) {
|
|
4008
|
+
case 0:
|
|
4009
|
+
var tmp$ = this.local$closure$request;
|
|
4010
|
+
var $receiver = this.local$closure$list.toList();
|
|
4011
|
+
var any$result;
|
|
4012
|
+
any$break: do {
|
|
4013
|
+
var tmp$_0;
|
|
4014
|
+
if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {
|
|
4015
|
+
any$result = false;
|
|
4016
|
+
break any$break;
|
|
4017
|
+
}tmp$_0 = $receiver.iterator();
|
|
4018
|
+
while (tmp$_0.hasNext()) {
|
|
4019
|
+
var element = tmp$_0.next();
|
|
4020
|
+
var closure$elem = this.local$closure$elem;
|
|
4021
|
+
if (Unificator.Companion.default.match(element, closure$elem)) {
|
|
4022
|
+
any$result = true;
|
|
4023
|
+
break any$break;
|
|
4024
|
+
}}
|
|
4025
|
+
any$result = false;
|
|
4026
|
+
}
|
|
4027
|
+
while (false);
|
|
4028
|
+
this.state_0 = 2;
|
|
4029
|
+
this.result_0 = this.local$$receiver.yield_11rb$(tmp$.replyWithCondition(any$result, void 0, []), this);
|
|
4030
|
+
if (this.result_0 === COROUTINE_SUSPENDED)
|
|
4031
|
+
return COROUTINE_SUSPENDED;
|
|
4032
|
+
continue;
|
|
4033
|
+
case 1:
|
|
4034
|
+
throw this.exception_0;
|
|
4035
|
+
case 2:
|
|
4036
|
+
return this.result_0;
|
|
4037
|
+
default:this.state_0 = 1;
|
|
4038
|
+
throw new Error('State Machine Unreachable execution');
|
|
4039
|
+
}
|
|
4040
|
+
} catch (e) {
|
|
4041
|
+
if (this.state_0 === 1) {
|
|
4042
|
+
this.exceptionState_0 = this.state_0;
|
|
4043
|
+
throw e;
|
|
4044
|
+
} else {
|
|
4045
|
+
this.state_0 = this.exceptionState_0;
|
|
4046
|
+
this.exception_0 = e;
|
|
4047
|
+
}
|
|
4048
|
+
}
|
|
4049
|
+
while (true);
|
|
4050
|
+
};
|
|
4051
|
+
function Contains$solve$lambda(closure$request_0, closure$list_0, closure$elem_0) {
|
|
4052
|
+
return function ($receiver_0, continuation_0, suspended) {
|
|
4053
|
+
var instance = new Coroutine$Contains$solve$lambda(closure$request_0, closure$list_0, closure$elem_0, $receiver_0, this, continuation_0);
|
|
4054
|
+
if (suspended)
|
|
4055
|
+
return instance;
|
|
4056
|
+
else
|
|
4057
|
+
return instance.doResume(null);
|
|
4058
|
+
};
|
|
4059
|
+
}
|
|
4060
|
+
Contains.prototype.solve = function (request) {
|
|
4061
|
+
var elem = request.arguments.get_za3lpa$(0);
|
|
4062
|
+
var list = request.arguments.get_za3lpa$(1);
|
|
4063
|
+
if (!Kotlin.isType(list, List)) {
|
|
4064
|
+
throw TypeError.Companion.forGoal(request.context, request.signature, TypeError$Expected.LIST, list);
|
|
4065
|
+
}return sequence(Contains$solve$lambda(request, list, elem));
|
|
4066
|
+
};
|
|
4067
|
+
Contains.$metadata$ = {
|
|
4068
|
+
kind: Kind_OBJECT,
|
|
4069
|
+
simpleName: 'Contains',
|
|
4070
|
+
interfaces: [Primitive]
|
|
4071
|
+
};
|
|
4072
|
+
var Contains_instance = null;
|
|
4073
|
+
function Contains_getInstance() {
|
|
4074
|
+
if (Contains_instance === null) {
|
|
4075
|
+
new Contains();
|
|
4076
|
+
}return Contains_instance;
|
|
4077
|
+
}
|
|
4078
|
+
function ContainsAny() {
|
|
4079
|
+
ContainsAny_instance = this;
|
|
4080
|
+
this.signature = new Signature('contains_any', 2);
|
|
4081
|
+
}
|
|
4082
|
+
function Coroutine$ContainsAny$solve$lambda(closure$request_0, closure$list_0, closure$elemList_0, $receiver_0, controller, continuation_0) {
|
|
4083
|
+
CoroutineImpl.call(this, continuation_0);
|
|
4084
|
+
this.$controller = controller;
|
|
4085
|
+
this.exceptionState_0 = 1;
|
|
4086
|
+
this.local$closure$request = closure$request_0;
|
|
4087
|
+
this.local$closure$list = closure$list_0;
|
|
4088
|
+
this.local$closure$elemList = closure$elemList_0;
|
|
4089
|
+
this.local$$receiver = $receiver_0;
|
|
4090
|
+
}
|
|
4091
|
+
Coroutine$ContainsAny$solve$lambda.$metadata$ = {
|
|
4092
|
+
kind: Kotlin.Kind.CLASS,
|
|
4093
|
+
simpleName: null,
|
|
4094
|
+
interfaces: [CoroutineImpl]
|
|
4095
|
+
};
|
|
4096
|
+
Coroutine$ContainsAny$solve$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
|
4097
|
+
Coroutine$ContainsAny$solve$lambda.prototype.constructor = Coroutine$ContainsAny$solve$lambda;
|
|
4098
|
+
Coroutine$ContainsAny$solve$lambda.prototype.doResume = function () {
|
|
4099
|
+
do
|
|
4100
|
+
try {
|
|
4101
|
+
switch (this.state_0) {
|
|
4102
|
+
case 0:
|
|
4103
|
+
var tmp$ = this.local$closure$request;
|
|
4104
|
+
var $receiver = this.local$closure$list.toSequence();
|
|
4105
|
+
var any$result;
|
|
4106
|
+
any$break: do {
|
|
4107
|
+
var tmp$_0;
|
|
4108
|
+
tmp$_0 = $receiver.iterator();
|
|
4109
|
+
loop_label: while (tmp$_0.hasNext()) {
|
|
4110
|
+
var element = tmp$_0.next();
|
|
4111
|
+
var $receiver_0 = this.local$closure$elemList.toSequence();
|
|
4112
|
+
var any$result_0;
|
|
4113
|
+
any$break_0: do {
|
|
4114
|
+
var tmp$_1;
|
|
4115
|
+
tmp$_1 = $receiver_0.iterator();
|
|
4116
|
+
while (tmp$_1.hasNext()) {
|
|
4117
|
+
var element_0 = tmp$_1.next();
|
|
4118
|
+
if (Unificator.Companion.default.match(element, element_0)) {
|
|
4119
|
+
any$result_0 = true;
|
|
4120
|
+
break any$break_0;
|
|
4121
|
+
}}
|
|
4122
|
+
any$result_0 = false;
|
|
4123
|
+
}
|
|
4124
|
+
while (false);
|
|
4125
|
+
if (any$result_0) {
|
|
4126
|
+
any$result = true;
|
|
4127
|
+
break any$break;
|
|
4128
|
+
}}
|
|
4129
|
+
any$result = false;
|
|
4130
|
+
}
|
|
4131
|
+
while (false);
|
|
4132
|
+
this.state_0 = 2;
|
|
4133
|
+
this.result_0 = this.local$$receiver.yield_11rb$(tmp$.replyWithCondition(any$result, void 0, []), this);
|
|
4134
|
+
if (this.result_0 === COROUTINE_SUSPENDED)
|
|
4135
|
+
return COROUTINE_SUSPENDED;
|
|
4136
|
+
continue;
|
|
4137
|
+
case 1:
|
|
4138
|
+
throw this.exception_0;
|
|
4139
|
+
case 2:
|
|
4140
|
+
return this.result_0;
|
|
4141
|
+
default:this.state_0 = 1;
|
|
4142
|
+
throw new Error('State Machine Unreachable execution');
|
|
4143
|
+
}
|
|
4144
|
+
} catch (e) {
|
|
4145
|
+
if (this.state_0 === 1) {
|
|
4146
|
+
this.exceptionState_0 = this.state_0;
|
|
4147
|
+
throw e;
|
|
4148
|
+
} else {
|
|
4149
|
+
this.state_0 = this.exceptionState_0;
|
|
4150
|
+
this.exception_0 = e;
|
|
4151
|
+
}
|
|
4152
|
+
}
|
|
4153
|
+
while (true);
|
|
4154
|
+
};
|
|
4155
|
+
function ContainsAny$solve$lambda(closure$request_0, closure$list_0, closure$elemList_0) {
|
|
4156
|
+
return function ($receiver_0, continuation_0, suspended) {
|
|
4157
|
+
var instance = new Coroutine$ContainsAny$solve$lambda(closure$request_0, closure$list_0, closure$elemList_0, $receiver_0, this, continuation_0);
|
|
4158
|
+
if (suspended)
|
|
4159
|
+
return instance;
|
|
4160
|
+
else
|
|
4161
|
+
return instance.doResume(null);
|
|
4162
|
+
};
|
|
4163
|
+
}
|
|
4164
|
+
ContainsAny.prototype.solve = function (request) {
|
|
4165
|
+
var elemList = request.arguments.get_za3lpa$(0);
|
|
4166
|
+
var list = request.arguments.get_za3lpa$(1);
|
|
4167
|
+
if (!Kotlin.isType(list, List)) {
|
|
4168
|
+
throw TypeError.Companion.forGoal(request.context, request.signature, TypeError$Expected.LIST, list);
|
|
4169
|
+
}if (!Kotlin.isType(elemList, List)) {
|
|
4170
|
+
throw TypeError.Companion.forGoal(request.context, request.signature, TypeError$Expected.LIST, list);
|
|
4171
|
+
}return sequence(ContainsAny$solve$lambda(request, list, elemList));
|
|
4172
|
+
};
|
|
4173
|
+
ContainsAny.$metadata$ = {
|
|
4174
|
+
kind: Kind_OBJECT,
|
|
4175
|
+
simpleName: 'ContainsAny',
|
|
4176
|
+
interfaces: [Primitive]
|
|
4177
|
+
};
|
|
4178
|
+
var ContainsAny_instance = null;
|
|
4179
|
+
function ContainsAny_getInstance() {
|
|
4180
|
+
if (ContainsAny_instance === null) {
|
|
4181
|
+
new ContainsAny();
|
|
4182
|
+
}return ContainsAny_instance;
|
|
4183
|
+
}
|
|
3987
4184
|
function MetaInterpreterLib() {
|
|
3988
4185
|
MetaInterpreterLib_instance = this;
|
|
3989
4186
|
this.$delegate_3wovwi$_0 = Library.Companion.aliased('prolog.argumentation.meta', void 0, parse_2(Theory.Companion, trimIndent('\n % with_facts_and_length/3\n with_facts_and_length(X, Y, L) :-\n solve(X, R),\n recover_facts(R, Y),\n length(Y, L).\n\n % lenght/2\n\n length([], 0).\n length([_|T], X) :- length(T, Y), X is Y + 1.\n\n % recover_facts/2\n\n recover_facts([], []) :- !.\n recover_facts([H|T], C) :-\n is_list(H), !,\n recover_facts(T, TC),\n recover_facts(H, HC),\n append(TC, HC, C).\n recover_facts([H|T], C) :-\n \\+ is_list(H),\n recover_facts(T, TC),\n evaluate(H, HC),\n append(TC, HC, C).\n\n evaluate(user_fact(X), [X]) :- !.\n evaluate(_, []) :- !.\n\n % solve/2\n\n solve((A,B), Result) :- !,\n solve(A, ARes),\n solve(B, BRes),\n append(ARes, BRes, Result).\n\n solve((A;B), Result) :- !,\n solve(A, Result);\n solve(B, Result).\n\n solve(member(A, B), [system_predicate]) :- !,\n call(member(A, B)).\n\n solve(\\+(A), [not(A)]) :- !,\n call(\\+(A)).\n\n solve((A)\\=(B), [doNotUnify(A, B)]) :- !,\n call((A)\\=(B)).\n\n solve(A, [system_predicate]) :-\n catch(clause(A, _), B, true),\n \\+ var(B), !,\n call(A).\n\n solve(A, [A]) :-\n \\+ clause(A, B), !,\n call(A).\n\n solve(A, [A|[Res]]) :-\n clause(A, B),\n solve(B, Res).\n\n % is_list/1\n\n is_list(X) :- var(X), !, fail.\n is_list([]).\n is_list([_|T]) :- is_list(T).\n \n % fetch_argument_facts/2\n \n fetch_argument_facts(Conclusion, Facts) :-\n argument([R, TR, [Conclusion]]),\n findall(user_fact(Fact), \n support([_, _, [user_fact(Fact)]], [R, TR, [Conclusion]]),\n Facts).\n ')));
|
|
@@ -4083,7 +4280,12 @@
|
|
|
4083
4280
|
function attacks$lambda$lambda(it) {
|
|
4084
4281
|
return it.isYes;
|
|
4085
4282
|
}
|
|
4086
|
-
function attacks$lambda$lambda_0(
|
|
4283
|
+
function attacks$lambda$lambda_0(this$) {
|
|
4284
|
+
return function (it) {
|
|
4285
|
+
return new Pair(ensureNotNull(it.substitution.get_11rb$(this$.X)), ensureNotNull(it.substitution.get_11rb$(this$.Y)));
|
|
4286
|
+
};
|
|
4287
|
+
}
|
|
4288
|
+
function attacks$lambda$lambda_1(closure$arguments) {
|
|
4087
4289
|
return function (solution) {
|
|
4088
4290
|
var $receiver = closure$arguments;
|
|
4089
4291
|
var first$result;
|
|
@@ -4092,8 +4294,7 @@
|
|
|
4092
4294
|
tmp$ = $receiver.iterator();
|
|
4093
4295
|
while (tmp$.hasNext()) {
|
|
4094
4296
|
var element = tmp$.next();
|
|
4095
|
-
|
|
4096
|
-
if (Unificator.Companion.default.match(element.termRepresentation(), ensureNotNull(solution.substitution.get_11rb$(this$_0.X)))) {
|
|
4297
|
+
if (element.hashCode() === solution.first.hashCode()) {
|
|
4097
4298
|
first$result = element;
|
|
4098
4299
|
break first$break;
|
|
4099
4300
|
}}
|
|
@@ -4108,8 +4309,7 @@
|
|
|
4108
4309
|
tmp$_1 = $receiver_0.iterator();
|
|
4109
4310
|
while (tmp$_1.hasNext()) {
|
|
4110
4311
|
var element_0 = tmp$_1.next();
|
|
4111
|
-
|
|
4112
|
-
if (Unificator.Companion.default.match(element_0.termRepresentation(), ensureNotNull(solution.substitution.get_11rb$(this$_1.Y)))) {
|
|
4312
|
+
if (element_0.hashCode() === solution.second.hashCode()) {
|
|
4113
4313
|
first$result_0 = element_0;
|
|
4114
4314
|
break first$break;
|
|
4115
4315
|
}}
|
|
@@ -4121,7 +4321,7 @@
|
|
|
4121
4321
|
}
|
|
4122
4322
|
function attacks$lambda(this$attacks, closure$context, closure$arguments) {
|
|
4123
4323
|
return function ($receiver) {
|
|
4124
|
-
return map(filter(this$attacks.solve($receiver.stringInvoke('context_check', closure$context, [$receiver.stringInvoke('attack', $receiver._, [$receiver.X, $receiver.Y, $receiver._])])), attacks$lambda$lambda), attacks$lambda$lambda_0(
|
|
4324
|
+
return map(map(filter(this$attacks.solve($receiver.stringInvoke('context_check', closure$context, [$receiver.stringInvoke('attack', $receiver._, [$receiver.X, $receiver.Y, $receiver._])])), attacks$lambda$lambda), attacks$lambda$lambda_0($receiver)), attacks$lambda$lambda_1(closure$arguments));
|
|
4125
4325
|
};
|
|
4126
4326
|
}
|
|
4127
4327
|
function attacks($receiver, context, arguments_0) {
|
|
@@ -4129,15 +4329,15 @@
|
|
|
4129
4329
|
return emptyList();
|
|
4130
4330
|
return toList(prolog(attacks$lambda($receiver, context, arguments_0)));
|
|
4131
4331
|
}
|
|
4132
|
-
function supports$lambda$lambda
|
|
4332
|
+
function supports$lambda$lambda(it) {
|
|
4133
4333
|
return it.isYes;
|
|
4134
4334
|
}
|
|
4135
|
-
function supports$lambda$
|
|
4335
|
+
function supports$lambda$lambda_0(this$) {
|
|
4136
4336
|
return function (it) {
|
|
4137
|
-
return ensureNotNull(it.substitution.get_11rb$(this$.X));
|
|
4337
|
+
return new Pair(ensureNotNull(it.substitution.get_11rb$(this$.X)), ensureNotNull(it.substitution.get_11rb$(this$.Y)));
|
|
4138
4338
|
};
|
|
4139
4339
|
}
|
|
4140
|
-
function supports$lambda$
|
|
4340
|
+
function supports$lambda$lambda_1(closure$arguments) {
|
|
4141
4341
|
return function (solution) {
|
|
4142
4342
|
var $receiver = closure$arguments;
|
|
4143
4343
|
var first$result;
|
|
@@ -4146,33 +4346,40 @@
|
|
|
4146
4346
|
tmp$ = $receiver.iterator();
|
|
4147
4347
|
while (tmp$.hasNext()) {
|
|
4148
4348
|
var element = tmp$.next();
|
|
4149
|
-
if (
|
|
4349
|
+
if (element.hashCode() === solution.second.hashCode()) {
|
|
4150
4350
|
first$result = element;
|
|
4151
4351
|
break first$break;
|
|
4152
4352
|
}}
|
|
4153
4353
|
throw new NoSuchElementException_init('Collection contains no element matching the predicate.');
|
|
4154
4354
|
}
|
|
4155
4355
|
while (false);
|
|
4156
|
-
var $receiver_0 =
|
|
4157
|
-
closure$
|
|
4158
|
-
|
|
4356
|
+
var $receiver_0 = first$result;
|
|
4357
|
+
var $receiver_1 = closure$arguments;
|
|
4358
|
+
var first$result_0;
|
|
4359
|
+
first$break: do {
|
|
4360
|
+
var tmp$_0;
|
|
4361
|
+
tmp$_0 = $receiver_1.iterator();
|
|
4362
|
+
while (tmp$_0.hasNext()) {
|
|
4363
|
+
var element_0 = tmp$_0.next();
|
|
4364
|
+
if (element_0.hashCode() === solution.first.hashCode()) {
|
|
4365
|
+
first$result_0 = element_0;
|
|
4366
|
+
break first$break;
|
|
4367
|
+
}}
|
|
4368
|
+
throw new NoSuchElementException_init('Collection contains no element matching the predicate.');
|
|
4369
|
+
}
|
|
4370
|
+
while (false);
|
|
4371
|
+
var $receiver_2 = new Support(first$result_0, $receiver_0);
|
|
4372
|
+
$receiver_0.supports.add_11rb$($receiver_2.supporter);
|
|
4373
|
+
return $receiver_2;
|
|
4159
4374
|
};
|
|
4160
4375
|
}
|
|
4161
|
-
function supports$lambda
|
|
4376
|
+
function supports$lambda(this$supports, closure$context, closure$arguments) {
|
|
4162
4377
|
return function ($receiver) {
|
|
4163
|
-
return toList(map(map(filter(this$supports.solve($receiver.stringInvoke('context_check', closure$context, [$receiver.stringInvoke('support', $receiver.X, [
|
|
4378
|
+
return toList(map(map(filter(this$supports.solve($receiver.stringInvoke('context_check', closure$context, [$receiver.stringInvoke('support', $receiver.X, [$receiver.Y])])), supports$lambda$lambda), supports$lambda$lambda_0($receiver)), supports$lambda$lambda_1(closure$arguments)));
|
|
4164
4379
|
};
|
|
4165
4380
|
}
|
|
4166
4381
|
function supports($receiver, context, arguments_0) {
|
|
4167
|
-
|
|
4168
|
-
var tmp$;
|
|
4169
|
-
tmp$ = arguments_0.iterator();
|
|
4170
|
-
while (tmp$.hasNext()) {
|
|
4171
|
-
var element = tmp$.next();
|
|
4172
|
-
var list = prolog(supports$lambda$lambda($receiver, context, element, arguments_0));
|
|
4173
|
-
addAll(destination, list);
|
|
4174
|
-
}
|
|
4175
|
-
return destination;
|
|
4382
|
+
return prolog(supports$lambda($receiver, context, arguments_0));
|
|
4176
4383
|
}
|
|
4177
4384
|
function labels$checkFunctor$lambda$lambda(it) {
|
|
4178
4385
|
return it.isYes;
|
|
@@ -4204,7 +4411,7 @@
|
|
|
4204
4411
|
}
|
|
4205
4412
|
return destination;
|
|
4206
4413
|
}
|
|
4207
|
-
function Argument(rules, topRule, conclusion, groundings, defeasibleRules, defeasiblePremises, lastDefeasibleRules) {
|
|
4414
|
+
function Argument(rules, topRule, conclusion, groundings, defeasibleRules, defeasiblePremises, lastDefeasibleRules, term) {
|
|
4208
4415
|
Argument$Companion_getInstance();
|
|
4209
4416
|
if (groundings === void 0)
|
|
4210
4417
|
groundings = emptyList();
|
|
@@ -4214,6 +4421,8 @@
|
|
|
4214
4421
|
defeasiblePremises = emptyList();
|
|
4215
4422
|
if (lastDefeasibleRules === void 0)
|
|
4216
4423
|
lastDefeasibleRules = emptyList();
|
|
4424
|
+
if (term === void 0)
|
|
4425
|
+
term = null;
|
|
4217
4426
|
this.rules = rules;
|
|
4218
4427
|
this.topRule = topRule;
|
|
4219
4428
|
this.conclusion = conclusion;
|
|
@@ -4221,9 +4430,15 @@
|
|
|
4221
4430
|
this.defeasibleRules = defeasibleRules;
|
|
4222
4431
|
this.defeasiblePremises = defeasiblePremises;
|
|
4223
4432
|
this.lastDefeasibleRules = lastDefeasibleRules;
|
|
4433
|
+
this.term_0 = term;
|
|
4224
4434
|
this.identifier = '';
|
|
4225
4435
|
this.supports = ArrayList_init_0();
|
|
4226
4436
|
}
|
|
4437
|
+
Argument.prototype.hashCode = function () {
|
|
4438
|
+
var $receiver = this.term_0;
|
|
4439
|
+
var tmp$;
|
|
4440
|
+
return (tmp$ = $receiver != null ? hashCode($receiver) : null) != null ? tmp$ : 0;
|
|
4441
|
+
};
|
|
4227
4442
|
Object.defineProperty(Argument.prototype, 'descriptor', {
|
|
4228
4443
|
configurable: true,
|
|
4229
4444
|
get: function () {
|
|
@@ -4253,7 +4468,8 @@
|
|
|
4253
4468
|
}
|
|
4254
4469
|
});
|
|
4255
4470
|
Argument.prototype.termRepresentation = function () {
|
|
4256
|
-
|
|
4471
|
+
var tmp$;
|
|
4472
|
+
return (tmp$ = this.term_0) != null ? tmp$ : parse_1(Struct.Companion, '[' + this.rules + ', ' + this.topRule + ', [' + this.conclusion + '], ' + this.groundings + ', [' + this.lastDefeasibleRules + ', ' + this.defeasibleRules + ', ' + this.defeasiblePremises + ']]');
|
|
4257
4473
|
};
|
|
4258
4474
|
Argument.prototype.toString = function () {
|
|
4259
4475
|
return 'argument(' + this.termRepresentation() + ')';
|
|
@@ -4322,7 +4538,7 @@
|
|
|
4322
4538
|
var argDefeasiblePremises = Argument$Companion$of$argDefeasiblePremises(termAsList, toStringList);
|
|
4323
4539
|
var argLastDefeasibleRules = Argument$Companion$of$argLastDefeasibleRules(termAsList, toStringList);
|
|
4324
4540
|
var it = termAsList(term);
|
|
4325
|
-
return new Argument(argRules(it), argTopRule(it), argConclusion(it), argGroundings(it), argDefeasibleRules(it), argDefeasiblePremises(it), argLastDefeasibleRules(it));
|
|
4541
|
+
return new Argument(argRules(it), argTopRule(it), argConclusion(it), argGroundings(it), argDefeasibleRules(it), argDefeasiblePremises(it), argLastDefeasibleRules(it), term);
|
|
4326
4542
|
};
|
|
4327
4543
|
Argument$Companion.$metadata$ = {
|
|
4328
4544
|
kind: Kind_OBJECT,
|
|
@@ -4361,22 +4577,14 @@
|
|
|
4361
4577
|
Argument.prototype.component7 = function () {
|
|
4362
4578
|
return this.lastDefeasibleRules;
|
|
4363
4579
|
};
|
|
4364
|
-
Argument.prototype.
|
|
4365
|
-
return
|
|
4580
|
+
Argument.prototype.component8_0 = function () {
|
|
4581
|
+
return this.term_0;
|
|
4366
4582
|
};
|
|
4367
|
-
Argument.prototype.
|
|
4368
|
-
|
|
4369
|
-
result = result * 31 + Kotlin.hashCode(this.rules) | 0;
|
|
4370
|
-
result = result * 31 + Kotlin.hashCode(this.topRule) | 0;
|
|
4371
|
-
result = result * 31 + Kotlin.hashCode(this.conclusion) | 0;
|
|
4372
|
-
result = result * 31 + Kotlin.hashCode(this.groundings) | 0;
|
|
4373
|
-
result = result * 31 + Kotlin.hashCode(this.defeasibleRules) | 0;
|
|
4374
|
-
result = result * 31 + Kotlin.hashCode(this.defeasiblePremises) | 0;
|
|
4375
|
-
result = result * 31 + Kotlin.hashCode(this.lastDefeasibleRules) | 0;
|
|
4376
|
-
return result;
|
|
4583
|
+
Argument.prototype.copy_fhhptr$ = function (rules, topRule, conclusion, groundings, defeasibleRules, defeasiblePremises, lastDefeasibleRules, term) {
|
|
4584
|
+
return new Argument(rules === void 0 ? this.rules : rules, topRule === void 0 ? this.topRule : topRule, conclusion === void 0 ? this.conclusion : conclusion, groundings === void 0 ? this.groundings : groundings, defeasibleRules === void 0 ? this.defeasibleRules : defeasibleRules, defeasiblePremises === void 0 ? this.defeasiblePremises : defeasiblePremises, lastDefeasibleRules === void 0 ? this.lastDefeasibleRules : lastDefeasibleRules, term === void 0 ? this.term_0 : term);
|
|
4377
4585
|
};
|
|
4378
4586
|
Argument.prototype.equals = function (other) {
|
|
4379
|
-
return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.rules, other.rules) && Kotlin.equals(this.topRule, other.topRule) && Kotlin.equals(this.conclusion, other.conclusion) && Kotlin.equals(this.groundings, other.groundings) && Kotlin.equals(this.defeasibleRules, other.defeasibleRules) && Kotlin.equals(this.defeasiblePremises, other.defeasiblePremises) && Kotlin.equals(this.lastDefeasibleRules, other.lastDefeasibleRules)))));
|
|
4587
|
+
return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.rules, other.rules) && Kotlin.equals(this.topRule, other.topRule) && Kotlin.equals(this.conclusion, other.conclusion) && Kotlin.equals(this.groundings, other.groundings) && Kotlin.equals(this.defeasibleRules, other.defeasibleRules) && Kotlin.equals(this.defeasiblePremises, other.defeasiblePremises) && Kotlin.equals(this.lastDefeasibleRules, other.lastDefeasibleRules) && Kotlin.equals(this.term_0, other.term_0)))));
|
|
4380
4588
|
};
|
|
4381
4589
|
function Attack(attacker, target, type, on) {
|
|
4382
4590
|
if (type === void 0)
|
|
@@ -5032,7 +5240,7 @@
|
|
|
5032
5240
|
}
|
|
5033
5241
|
function ArgumentationGraph() {
|
|
5034
5242
|
ArgumentationGraph_instance = this;
|
|
5035
|
-
this.theoryCode = trimIndent('\n buildArgumentationGraph :-\n buildArguments,\n buildAttacks.\n buildArguments :-\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 \tbuildArgumentsFromRules(b, Rules, Rules, n).\n buildArgumentsFromPremises :-\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 ).\n buildArgumentsFromEmptyRules :-\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(
|
|
5243
|
+
this.theoryCode = trimIndent('\n buildArgumentationGraph :-\n buildArguments,\n buildAttacks.\n buildArguments :-\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).\n buildArgumentsFromPremises :-\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 ).\n buildArgumentsFromEmptyRules :-\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 ).\n emptyRule([RuleID, Body, RuleHead]) :-\n parser::classic_rule(RuleID, Body, RuleHead),\n \\+ (member(X, Body), X \\= ~(_), X \\= prolog(_)),\n checkPrologClauses(Body).\n checkPrologClauses([]) :- !.\n checkPrologClauses([~(_)|T]) :- checkPrologClauses(T), !.\n checkPrologClauses([prolog(Check)|T]) :-\n (callable(Check) -> call(Check); Check),\n checkPrologClauses(T).\n clean(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).\n invert(a, b).\n invert(b, a).\n buildArgumentsFromRules(_, _, Rules, [], n) :- !.\n buildArgumentsFromRules(_, Tn, Rules, [], y) :- !, clean(Tn, Rules).\n buildArgumentsFromRules(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), !.\n buildArgumentsFromRules(N, Tn, Rules, [_|T], X) :-\n buildArgumentsFromRules(N, Tn, Rules, T, X).\n buildArgumentsFromRule(Tn, [RuleID, RuleBody, RuleHead]) :-\n \truleBodyIsSupported(RuleID, RuleHead, RuleBody, RuleBody, [[], [], [], []], Argument),\n context_assert(newConc(Tn, RuleHead)).\n checkStrict(Id, []) :- parser::check_strict(Id), !.\n checkStrict(Id, [Id]).\n defRules(Id, Def, Def) :- parser::check_strict(Id), !.\n defRules(Id, Def, [Id|Def]).\n lastDefRules(Id, LDef, LDef) :- parser::check_strict(Id), !.\n lastDefRules(Id, LDef, [Id]) :- Id \\== none, \\+ parser::check_strict(Id).\n argumentInfo(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).\n ruleBodyIsSupported(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)).\n ruleBodyIsSupported(RuleID, RuleHead, RuleBody, [~(_)|Others], Info, Argument) :-\n \truleBodyIsSupported(RuleID, RuleHead, RuleBody, Others, Info, Argument).\n ruleBodyIsSupported(RuleID, RuleHead, RuleBody, [prolog(Check)|Others], Info, Argument) :-\n \t(callable(Check) -> call(Check); Check),\n \truleBodyIsSupported(RuleID, RuleHead, RuleBody, Others, Info, Argument).\n ruleBodyIsSupported(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)).\n findPossibleAttackers([_, _, Head, _, _], Conf) :-\n conflict(Conf, Head, Guard).\n findPossibleAttackers([_, _, Head, _, _], Conf) :-\n conflict(Conf, Head).\n findPossibleAttackers([_, _, _, Prem, _], [Conf]) :-\n member(~(Conf), Prem).\n findPossibleAttackers([_, RuleID, _, _, _], [undercut(RuleID)]).\n buildAttacks :-\n \tbuildDirectAttacks,\n \tbuildTransitiveAttacks.\n buildDirectAttacks :-\n findall(_, buildDirectAttack, _).\n buildDirectAttack :-\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.\n buildDirectAttack.\n buildTransitiveAttacks :-\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.\n buildTransitiveAttacks.\n attacks(rebut, A, B) :- rebuts(A, B), !.\n attacks(contrary_rebut, A, B) :- contraryRebuts(A, B), !.\n attacks(undermine, A, B) :- undermines(A, B), !.\n attacks(contrary_undermine, A, B) :- contraryUndermines(A, B), !.\n attacks(undercut, A, B) :- undercuts(A, B), !.\n expanded_conflict(HeadA, HeadB) :-\n conflict(HeadA, HeadB).\n expanded_conflict(HeadA, HeadB) :-\n conflict(HeadA, HeadB, Guard),\n (callable(Guard) -> call(Guard); Guard).\n rebuts([IDPremisesA, RuleA, RuleHeadA, _, _], [IDPremisesB, RuleB, RuleHeadB, _, Info]) :-\n \tRuleB \\== none,\n Info \\== [[], [], []],\n \texpanded_conflict(RuleHeadA, RuleHeadB).\n contraryRebuts([IDPremisesA, RuleA, [RuleHeadA], _, _], [IDPremisesB, RuleB, RuleHeadB, Body, Info]) :-\n \tRuleA \\== none,\n \tRuleB \\== none,\n \tutils::contains(~(RuleHeadA), Body).\n undermines([IDPremisesA, RuleA, RuleHeadA, _, _], [[IDPremiseB], none, RuleHeadB, _, Info]) :-\n \tInfo \\== [[], [], []],\n \texpanded_conflict(RuleHeadA, RuleHeadB).\n contraryUndermines([IDPremisesA, none, [RuleHeadA], _, _], [IDPremisesB, RuleB, RuleHeadB, Body, Info]) :-\n \tRuleB \\== none,\n \tutils::contains(~(RuleHeadA), Body).\n undercuts([_, _, [undercut(RuleB)], _, _], [_, RuleB, _, _, [[RuleB], _, _]]).\n check(-Atom).\n conflict([Atom], [-Atom]) :- \\+ check(Atom).\n conflict([-Atom], [Atom]).\n conflict([o(Atom)], [o(-Atom)]) :- \\+ check(Atom).\n conflict([o(-Atom)], [o(Atom)]).\n conflict([p(Atom)], [o(-Atom)]) :- \\+ check(Atom).\n conflict([o(-Atom)], [p(Atom)]).\n conflict([p(-Atom)], [o(Atom)]).\n conflict([o(Atom)], [p(-Atom)]) :- \\+ check(Atom).\n conflict([sup(X, Y)], [sup(Y, X)]).\n ');
|
|
5036
5244
|
}
|
|
5037
5245
|
ArgumentationGraph.$metadata$ = {
|
|
5038
5246
|
kind: Kind_OBJECT,
|
|
@@ -5545,6 +5753,12 @@
|
|
|
5545
5753
|
Object.defineProperty(package$utils, 'ArgumentHash', {
|
|
5546
5754
|
get: ArgumentHash_getInstance
|
|
5547
5755
|
});
|
|
5756
|
+
Object.defineProperty(package$utils, 'Contains', {
|
|
5757
|
+
get: Contains_getInstance
|
|
5758
|
+
});
|
|
5759
|
+
Object.defineProperty(package$utils, 'ContainsAny', {
|
|
5760
|
+
get: ContainsAny_getInstance
|
|
5761
|
+
});
|
|
5548
5762
|
var package$meta = package$core.meta || (package$core.meta = {});
|
|
5549
5763
|
Object.defineProperty(package$meta, 'MetaInterpreterLib', {
|
|
5550
5764
|
get: MetaInterpreterLib_getInstance
|
|
@@ -5808,21 +6022,17 @@
|
|
|
5808
6022
|
PrologWithArgumentation.prototype.unifyWithOccurCheck = PrologScopeWithTheories.prototype.unifyWithOccurCheck;
|
|
5809
6023
|
PrologWithArgumentation.prototype.var1 = PrologScopeWithTheories.prototype.var1;
|
|
5810
6024
|
PrologWithArgumentation.prototype.write1 = PrologScopeWithTheories.prototype.write1;
|
|
5811
|
-
PrologWithArgumentation.prototype.neq2 = PrologScopeWithTheories.prototype.neq2;
|
|
5812
|
-
PrologWithArgumentation.prototype.nid2 = PrologScopeWithTheories.prototype.nid2;
|
|
5813
|
-
PrologWithArgumentation.prototype.power = PrologScopeWithTheories.prototype.power;
|
|
5814
|
-
PrologWithArgumentation.prototype.eq2 = PrologScopeWithTheories.prototype.eq2;
|
|
5815
|
-
PrologWithArgumentation.prototype.arithNeq2 = PrologScopeWithTheories.prototype.arithNeq2;
|
|
5816
|
-
PrologWithArgumentation.prototype.id2 = PrologScopeWithTheories.prototype.id2;
|
|
5817
|
-
PrologWithArgumentation.prototype.arithEq2 = PrologScopeWithTheories.prototype.arithEq2;
|
|
5818
|
-
PrologWithArgumentation.prototype.pow = PrologScopeWithTheories.prototype.pow;
|
|
5819
6025
|
PrologWithArgumentation.prototype.anyAnd = PrologScopeWithTheories.prototype.anyAnd;
|
|
6026
|
+
PrologWithArgumentation.prototype.arithEq2 = PrologScopeWithTheories.prototype.arithEq2;
|
|
6027
|
+
PrologWithArgumentation.prototype.arithNeq2 = PrologScopeWithTheories.prototype.arithNeq2;
|
|
5820
6028
|
PrologWithArgumentation.prototype.substitutionContainsKey = PrologScopeWithTheories.prototype.substitutionContainsKey;
|
|
5821
6029
|
PrologWithArgumentation.prototype.substitutionContainsValue = PrologScopeWithTheories.prototype.substitutionContainsValue;
|
|
5822
6030
|
PrologWithArgumentation.prototype.anyDiv = PrologScopeWithTheories.prototype.anyDiv;
|
|
6031
|
+
PrologWithArgumentation.prototype.eq2 = PrologScopeWithTheories.prototype.eq2;
|
|
5823
6032
|
PrologWithArgumentation.prototype.anyEqualsTo = PrologScopeWithTheories.prototype.anyEqualsTo;
|
|
5824
6033
|
PrologWithArgumentation.prototype.anyGreaterThan = PrologScopeWithTheories.prototype.anyGreaterThan;
|
|
5825
6034
|
PrologWithArgumentation.prototype.anyGreaterThanOrEqualsTo = PrologScopeWithTheories.prototype.anyGreaterThanOrEqualsTo;
|
|
6035
|
+
PrologWithArgumentation.prototype.id2 = PrologScopeWithTheories.prototype.id2;
|
|
5826
6036
|
PrologWithArgumentation.prototype.anyIf = PrologScopeWithTheories.prototype.anyIf;
|
|
5827
6037
|
PrologWithArgumentation.prototype.anyIfVararg = PrologScopeWithTheories.prototype.anyIfVararg;
|
|
5828
6038
|
PrologWithArgumentation.prototype.anyImpliedBy = PrologScopeWithTheories.prototype.anyImpliedBy;
|
|
@@ -5835,6 +6045,8 @@
|
|
|
5835
6045
|
PrologWithArgumentation.prototype.anyMatches = PrologScopeWithTheories.prototype.anyMatches;
|
|
5836
6046
|
PrologWithArgumentation.prototype.anyMguWith = PrologScopeWithTheories.prototype.anyMguWith;
|
|
5837
6047
|
PrologWithArgumentation.prototype.anyMinus = PrologScopeWithTheories.prototype.anyMinus;
|
|
6048
|
+
PrologWithArgumentation.prototype.neq2 = PrologScopeWithTheories.prototype.neq2;
|
|
6049
|
+
PrologWithArgumentation.prototype.nid2 = PrologScopeWithTheories.prototype.nid2;
|
|
5838
6050
|
PrologWithArgumentation.prototype.anyNonGreaterThan = PrologScopeWithTheories.prototype.anyNonGreaterThan;
|
|
5839
6051
|
PrologWithArgumentation.prototype.anyNonLowerThan = PrologScopeWithTheories.prototype.anyNonLowerThan;
|
|
5840
6052
|
PrologWithArgumentation.prototype.anyNotEqualsTo = PrologScopeWithTheories.prototype.anyNotEqualsTo;
|
|
@@ -5869,9 +6081,9 @@
|
|
|
5869
6081
|
PrologWithArgumentationImpl.prototype.anyMguWith = PrologWithArgumentation.prototype.anyMguWith;
|
|
5870
6082
|
PrologWithArgumentationImpl.prototype.anyUnifyWith = PrologWithArgumentation.prototype.anyUnifyWith;
|
|
5871
6083
|
PrologWithArgumentationImpl.prototype.list = PrologWithArgumentation.prototype.list;
|
|
5872
|
-
PrologWithArgumentationImpl.prototype.listFrom = PrologWithArgumentation.prototype.listFrom;
|
|
5873
|
-
PrologWithArgumentationImpl.prototype.listFromSequence = PrologWithArgumentation.prototype.listFromSequence;
|
|
5874
6084
|
PrologWithArgumentationImpl.prototype.listFromIterable = PrologWithArgumentation.prototype.listFromIterable;
|
|
6085
|
+
PrologWithArgumentationImpl.prototype.listFromSequence = PrologWithArgumentation.prototype.listFromSequence;
|
|
6086
|
+
PrologWithArgumentationImpl.prototype.listFrom = PrologWithArgumentation.prototype.listFrom;
|
|
5875
6087
|
PrologWithArgumentationImpl.prototype.matchAny = PrologWithArgumentation.prototype.matchAny;
|
|
5876
6088
|
PrologWithArgumentationImpl.prototype.mguWithOccurCheck = PrologWithArgumentation.prototype.mguWithOccurCheck;
|
|
5877
6089
|
PrologWithArgumentationImpl.prototype.mguAny = PrologWithArgumentation.prototype.mguAny;
|