|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDungAF
public class DungAF
A class to implement Dung's abstract argumentation frameworks (AFs).
A DungAF
represents an AF. Arguments and attacks are represented as String
s and two-element
String
-arrays ([attacker, attacked]), respectively. A DungAF
may also record
information concerning the interpretation of its AF, according to the semantics implemented by this class -
DungAF
may record not merely an AF, but also its admissible sets, complete extensions etc. Such
information is recorded whenever it is generated in response to a call, and is discarded whenever the object's AF
is changed. Thus for as long as the object's AF remains unchanged, repeated calls to (for instance)
getGroundedExt()
do not result in repeated calculations of the grounded extension.
The implementations of the admissible semantics and the grounded semantics use existing algorithms -
Note: henceforth, for the sake of brevity, DungAF
s will often be referred to simply as AFs - that
is, as if each recorded merely an AF, and could not also record its admissible sets, complete extensions, etc.
Note: this class is not synchronized. It is not clear what might happen if, for instance, a
DungAF
was asked to add attacks to its AF, while it was generating the admissible sets of its AF.
Note: this class depends on Google's
guava-libraries (version 10.0.01) - specifically, the
implementation of the n-ary cartesian product provided by com.google.common.collect.Sets.cartesianProduct(List<? extends Set<? extends B>>)
.
Field Summary | |
---|---|
private HashSet<HashSet<String>> |
admissibleSets
This AF's admissible sets. |
private HashSet<String> |
args
This AF's arguments. |
private HashMap<String,HashSet<String>> |
argsToAttackers
A map indicating, for each of this AF's arguments, the arguments attacking it in this AF. |
private HashMap<String,HashSet<HashSet<String>>> |
argsToDefenceSets
A map indicating, for none, some or all of this AF's arguments, the defence-sets around each of those arguments in this AF. |
private HashMap<String,HashSet<String>> |
argsToTargets
A map indicating, for each of this AF's arguments, the arguments attacked by it in this AF. |
private HashSet<String[]> |
atts
This AF's attacks. |
private HashSet<HashSet<String>> |
completeExts
This AF's complete extensions. |
private HashSet<String> |
eagerExt
This AF's eager extension. |
private HashSet<String> |
groundedExt
This AF's grounded extension. |
private HashSet<String> |
idealExt
This AF's ideal extension. |
private HashSet<HashSet<String>> |
preferredExts
This AF's preferred extensions. |
private HashSet<String> |
preferredScepticalExt
The extension prescribed by the sceptical preferred semantics for this AF. |
private HashSet<HashSet<String>> |
semiStableExts
This AF's semi-stable extensions. |
private HashSet<HashSet<String>> |
stableExts
This AF's stable extensions. |
Constructor Summary | |
---|---|
DungAF()
Constructs an empty AF. |
|
DungAF(Collection<String[]> attsParam)
Constructs the AF comprising the set-view of the specified collection of attacks, and all arguments involved in any of those attacks. |
|
DungAF(Collection<String> argsParam,
Collection<String[]> attsParam)
Constructs the AF (args, atts), where args comprises the set-view of argsParam and
all arguments involved in any attack in attsParam ; and atts comprises the set-view of
attsParam . |
|
DungAF(DungAF anotherAF)
Constructs a copy of anotherAF . |
Method Summary | ||
---|---|---|
boolean |
addArgs(Collection<String> argsToBeAdded)
Adds the arguments in the specified collection to this AF. |
|
boolean |
addArgs(String... argsToBeAdded)
Adds the specified arguments to this AF. |
|
boolean |
addAtts(Collection<String[]> attsToBeAdded)
Adds the attacks comprising the specified collection to this AF. |
|
boolean |
addAtts(String[]... attsToBeAdded)
Adds the specified attacks to this AF. |
|
boolean |
admissibleSetsContain(Collection<String>... argColls)
Returns true if, for each of the specified collections, its set-view is admissible in this AF. |
|
boolean |
argsAccept(Collection<String> acceptingArgColl,
Collection<String> argsToCheck)
Returns true if all of argsToCheck are acceptable with respect to the set-view of
acceptingArgColl in this AF. |
|
boolean |
argsAccept(Collection<String> acceptingArgColl,
String... argsToCheck)
Returns true if the specified arguments are all acceptable with respect to the set-view of
acceptingArgColl in this AF. |
|
static boolean |
arraysDenoteAttacks(Collection<String[]> strArrs)
Returns true if the specified collection comprises String -arrays which denote attacks. |
|
static boolean |
arraysDenoteAttacks(String[]... strArrs)
Returns true if the specified String -arrays all denote attacks. |
|
void |
clear()
Removes all arguments and attacks from this AF. |
|
boolean |
collnIsInConflictWithAnyOf(Collection<String> argsParam0,
String... argsParam1)
Returns true if, in this AF, any of the arguments in the specified collection is in conflict with any
of the specified arguments. |
|
boolean |
completeExtsContain(Collection<String>... argColls)
Returns true if, for each of the specified collections, its set-view is a complete extension of
this AF. |
|
boolean |
containsNoConflictAmong(Collection<String> argsParam)
Returns true if, in this AF, no argument in the specified collection attacks itself or any other
argument in the collection. |
|
boolean |
containsNoConflictAmong(String... argsParam)
Returns true if, in this AF, none of the specified arguments attacks itself or any of the other specified
arguments. |
|
|
containsNoConflictAmongUnionOf(Collection<T> argColls)
Returns true if, in this AF, none of the arguments in the union of the specified collections
attacks itself or any other argument in the union. |
|
boolean |
ensureDisjointWith(DungAF anotherAF)
Ensures that this AF contains none of the arguments in anotherAF . |
|
boolean |
ensureSubsumes(DungAF anotherAF)
Ensures that this AF is a supergraph of anotherAF . |
|
boolean |
equals(DungAF anotherAF)
Returns true if this object and anotherAF record the same AF. |
|
private void |
findIdealExtOrEagerExt(String semantics)
Finds and records this AF's ideal extension or eager extension. |
|
HashSet<String> |
getAdmissibleArgs()
Returns the union of this AF's admissible sets. |
|
HashSet<HashSet<String>> |
getAdmissibleSets()
Returns this AF's admissible sets. |
|
HashSet<String> |
getArgs()
Returns this AF's arguments. |
|
HashSet<String> |
getArgsAcceptedBy(Collection<String> argsParam)
Returns the arguments which are acceptable with respect to the set-view of argsParam in this AF. |
|
HashSet<String> |
getArgsAcceptedBy(String... argsParam)
Returns the arguments which are acceptable with respect to the set comprising the specified arguments in this AF. |
|
HashSet<String> |
getAttackersOf(String arg)
Returns the arguments attacking arg in this AF. |
|
HashSet<String[]> |
getAtts()
Returns this AF's attacks. |
|
HashSet<HashSet<String>> |
getCompleteExts()
Returns this AF's complete extensions. |
|
HashSet<HashSet<String>> |
getDefenceSetsAround(String arg)
Returns the defence-sets around arg in this AF. |
|
private HashSet<HashSet<String>> |
getDefenceSetsAroundHelper(String arg,
List<String> path,
HashSet<HashSet<String>> canSols)
Finds the defence-sets around arg in this AF, if called by another method (and passed arg , the
empty list and the singleton set containing the empty set). |
|
HashSet<String> |
getEagerExt()
Returns this AF's eager extension. |
|
HashSet<String> |
getExtsUnion(String semantics)
Returns the union of the extensions prescribed by semantics for this AF, where semantics is a
multiple-extension semantics implemented by this class. |
|
HashSet<String> |
getGroundedExt()
Returns this AF's grounded extension. |
|
HashSet<String> |
getIdealExt()
Returns this AF's ideal extension. |
|
HashSet<HashSet<String>> |
getPreferredExts()
Returns this AF's preferred extensions. |
|
HashSet<String> |
getPreferredScepticalExt()
Returns the extension prescribed by the sceptical preferred semantics for this AF. |
|
static DungAF |
getRandomDungAF(int minArgs,
int maxArgs,
int minAtts,
int maxAtts,
Collection<String> argPool)
Returns an AF which satisfies the constraints passed as parameters, but is otherwise constructed at random. |
|
HashSet<String> |
getSemiStableArgs()
Returns the union of this AF's semi-stable extensions. |
|
HashSet<HashSet<String>> |
getSemiStableExts()
Returns this AF's semi-stable extensions. |
|
HashSet<String> |
getStableArgs()
Returns the union of this AF's stable extensions. |
|
HashSet<HashSet<String>> |
getStableExts()
Returns this AF's stable extensions. |
|
HashSet<String> |
getTargetsOf(String arg)
Returns the arguments attacked by arg in this AF. |
|
boolean |
hasAsConflictFreeSet(Collection<String> argsParam)
Returns true if the set-view of the specified collection is a conflict-free set in this AF. |
|
boolean |
hasAsConflictFreeSet(String... argsParam)
Returns true if the specified arguments form a conflict-free set in this AF. |
|
|
hasUnionOfAsConflictFreeSet(Collection<T> argColls)
Returns true if the specified collections unite to form a conflict-free set in this AF. |
|
boolean |
isDisjointWith(DungAF anotherAF)
Returns true if this AF contains contains none of the arguments in anotherAF . |
|
boolean |
preferredExtsContain(Collection<String>... argColls)
Returns true if, for each of the specified collections, its set-view is a preferred extension
of this AF. |
|
boolean |
recordsDefenceSetsAround(String... args)
Returns true if this object records the defence-sets around the specified arguments in its AF. |
|
boolean |
recordsExtsOfType(String semantics)
Returns true if this object records the extension(s) prescribed by semantics for its AF, where
semantics is a semantics implemented by this class. |
|
boolean |
removeArgs(Collection<String> argsToBeRemoved)
Removes the arguments in the specified collection from this AF. |
|
boolean |
removeArgs(String... argsToBeRemoved)
Removes the specified arguments from this AF. |
|
boolean |
removeAtts(Collection<String[]> attsToBeRemoved)
Removes the attacks comprising the specified collection from this AF. |
|
boolean |
removeAtts(String[]... attsToBeRemoved)
Removes the specified attacks from this AF. |
|
private boolean |
removeDuplicateAttacks()
Ensures that this object records only a single copy of each of the attacks in its AF. |
|
private void |
removeSemanticsInfo()
Removes from this object all information concerning the interpretation of its AF. |
|
boolean |
semiStableExtsContain(Collection<String>... argColls)
Returns true if, for each of the specified collections, its set-view is a semi-stable extension of
this AF. |
|
boolean |
stableExtsContain(Collection<String>... argColls)
Returns true if, for each of the specified collections, its set-view is a stable extension of
this AF. |
|
boolean |
subsumes(DungAF anotherAF)
Returns true if this AF is a (strict or non-strict) supergraph of anotherAF . |
|
String |
toString()
Returns a representation of this AF in the conventional format - ({arg1, arg2,...}, {(arg1, arg2), (arg2, arg1),...}). |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private HashSet<String> args
private HashSet<String[]> atts
private HashMap<String,HashSet<String>> argsToAttackers
private HashMap<String,HashSet<String>> argsToTargets
private HashMap<String,HashSet<HashSet<String>>> argsToDefenceSets
On defence-sets, see getDefenceSetsAround(String)
.
private HashSet<HashSet<String>> admissibleSets
private HashSet<HashSet<String>> completeExts
private HashSet<String> eagerExt
private HashSet<String> groundedExt
private HashSet<String> idealExt
private HashSet<HashSet<String>> preferredExts
private HashSet<String> preferredScepticalExt
private HashSet<HashSet<String>> semiStableExts
private HashSet<HashSet<String>> stableExts
Constructor Detail |
---|
public DungAF()
public DungAF(DungAF anotherAF)
anotherAF
.
The values of all fields in anotherAF
- including semantics-related fields - are
copied into the constructed object.
anotherAF
- a DungAF
.public DungAF(Collection<String[]> attsParam)
attsParam
- a Collection
of String
-arrays (which should all denote attacks, and hence have
exactly two elements).
IllegalArgumentException
- if attsParam
contains a String
-array which does not
have exactly two elements.public DungAF(Collection<String> argsParam, Collection<String[]> attsParam)
argsParam
and
all arguments involved in any attack in attsParam
; and atts comprises the set-view of
attsParam
.
argsParam
- a Collection
of String
s, denoting arguments.attsParam
- a Collection
of String
-arrays (which should all denote attacks, and hence have
exactly two elements).
IllegalArgumentException
- if attsParam
contains a String
-array which does not have
exactly two elements.Method Detail |
---|
public HashSet<String> getArgs()
String
s, denoting this AF's arguments.public HashSet<String[]> getAtts()
String
-arrays, denoting this AF's attacks.public HashSet<String> getAttackersOf(String arg)
arg
in this AF.
arg
- a String
, denoting an argument.
String
s, denoting the arguments attacking arg
in this AF.public HashSet<String> getTargetsOf(String arg)
arg
in this AF.
arg
- a String
, denoting an argument.
String
s, denoting the arguments attacked by arg
in this AF.public boolean addArgs(Collection<String> argsToBeAdded)
argsToBeAdded
- a Collection
of String
s, denoting arguments.
true
if this AF changed as a result of the call.public boolean addArgs(String... argsToBeAdded)
argsToBeAdded
- one or more String
s, denoting arguments.
true
if this AF changed as a result of the call.public boolean addAtts(Collection<String[]> attsToBeAdded)
attsToBeAdded
do not all denote
attacks, this AF remains unchanged.
attsToBeAdded
- a Collection
of String
-arrays (which should all denote attacks, and hence
have exactly two elements).
true
if this AF changed as a result of the call.
IllegalArgumentException
- if attsToBeAdded
contains a String
-array which does not have
exactly two elements.public boolean addAtts(String[]... attsToBeAdded)
attsToBeAdded
do not all denote attacks, this AF remains
unchanged.
attsToBeAdded
- one or more String
-arrays (which should all denote attacks, and hence have exactly
two elements).
true
if this AF changed as a result of the call.
IllegalArgumentException
- if attsToBeAdded
contains a String
-array which does not have
exactly two elements.public boolean removeArgs(Collection<String> argsToBeRemoved)
argsToBeRemoved
- a Collection
of String
s, denoting arguments.
true
if this AF changed as a result of the call.public boolean removeArgs(String... argsToBeRemoved)
argsToBeRemoved
- one or more String
s, denoting arguments.
true
if this AF changed as a result of the call.public boolean removeAtts(Collection<String[]> attsToBeRemoved)
attsToBeRemoved
do not all
denote attacks, this AF remains unchanged.
attsToBeRemoved
- a Collection
of String
-arrays (which should all denote attacks, and hence
have exactly two elements).
true
if this AF changed as a result of the call.
IllegalArgumentException
- if attsToBeRemoved
contains a String
-array which does not have
exactly two elements.public boolean removeAtts(String[]... attsToBeRemoved)
attsToBeRemoved
do not all denote attacks, this AF
remains unchanged.
attsToBeRemoved
- one or more String
-arrays (which should all denote attacks, and hence have exactly
two elements).
true
if this AF changed as a result of the call.
IllegalArgumentException
- if attsToBeRemoved
contains a String
-array which does not have
exactly two elements.public boolean ensureSubsumes(DungAF anotherAF)
anotherAF
.
anotherAF
- a DungAF
.
true
if this AF changed as a result of the call.public boolean ensureDisjointWith(DungAF anotherAF)
anotherAF
.
anotherAF
- a DungAF
.
true
if this AF changed as a result of the call.private void removeSemanticsInfo()
Typically called by methods which can change the AF.
public void clear()
public boolean equals(DungAF anotherAF)
true
if this object and anotherAF
record the same AF.
Thus two 'equal' objects may differ with respect to the information they record about their AF's interpretation.
anotherAF
- a DungAF
.
true
if this object and anotherAF
record the same AF.public boolean subsumes(DungAF anotherAF)
true
if this AF is a (strict or non-strict) supergraph of anotherAF
.
anotherAF
- a DungAF
.
true
if this AF is a (strict or non-strict) supergraph of anotherAF
.public boolean isDisjointWith(DungAF anotherAF)
true
if this AF contains contains none of the arguments in anotherAF
.
anotherAF
- a DungAF
.
true
if this AF contains none of the arguments in anotherAF
.public boolean recordsExtsOfType(String semantics)
true
if this object records the extension(s) prescribed by semantics
for its AF, where
semantics
is a semantics implemented by this class.
The semantics implemented by this class are recognized by the following names (case-sensitive) -
semantics
- a String
, being the name of a semantics implemented by this class.
true
if the relevant field of this object is non-null
.
IllegalArgumentException
- if semantics
is not the name of a semantics implemented by this class.public boolean recordsDefenceSetsAround(String... args)
true
if this object records the defence-sets around the specified arguments in its AF.
On defence-sets, see getDefenceSetsAround(String)
.
args
- one or more String
s, denoting arguments.
true
if this object records the defence-sets around the specified arguments in its AF.public String toString()
toString
in class Object
String
representation of this AF.public static boolean arraysDenoteAttacks(String[]... strArrs)
true
if the specified String
-arrays all denote attacks.
strArrs
- one or more String
-arrays.
true
if strArrs
contains only two-element String
-arrays.public static boolean arraysDenoteAttacks(Collection<String[]> strArrs)
true
if the specified collection comprises String
-arrays which denote attacks.
strArrs
- a Collection
of String
-arrays.
true
if strArrs
contains only two-element String
-arrays.private boolean removeDuplicateAttacks()
Attacks are recorded as arrays, so this method is useful when constructing DungAF
s, and when
expanding the AFs they record.
true
if this AF changed as a result of the call.public static DungAF getRandomDungAF(int minArgs, int maxArgs, int minAtts, int maxAtts, Collection<String> argPool)
minArgs
- an int
, being the lower bound on the number of arguments.maxArgs
- an int
, being the upper bound on the number of arguments.minAtts
- an int
, being the lower bound on the number of attacks.maxAtts
- an int
, being the upper bound on the number of attacks.argPool
- a Collection
of String
s, denoting the arguments which may be used.
DungAF
recording an AF which satisfies the constraints passed as parameters.
IllegalArgumentException
- if the specified constraints cannot be satisfied.public boolean hasAsConflictFreeSet(String... argsParam)
true
if the specified arguments form a conflict-free set in this AF.
argsParam
- one or more String
s, denoting arguments.
true
if this AF contains all of argsParam
; and, in this AF, none of those arguments
attacks itself or any other argument in argsParam
.containsNoConflictAmong(String... )
public boolean hasAsConflictFreeSet(Collection<String> argsParam)
true
if the set-view of the specified collection is a conflict-free set in this AF.
argsParam
- a Collection
of String
s, denoting arguments.
true
if this AF contains all of argsParam
; and, in this AF, none of those arguments
attacks itself or any other argument in argsParam
.containsNoConflictAmong(Collection<String>)
public boolean containsNoConflictAmong(String... argsParam)
true
if, in this AF, none of the specified arguments attacks itself or any of the other specified
arguments.
argsParam
- one or more String
s, denoting arguments.
true
if, in this AF, none of the arguments in argsParam
attacks itself or any other
argument in argsParam
.hasAsConflictFreeSet(String... )
public boolean containsNoConflictAmong(Collection<String> argsParam)
true
if, in this AF, no argument in the specified collection attacks itself or any other
argument in the collection.
argsParam
- a Collection
of String
s, denoting arguments.
true
if, in this AF, none of the arguments in argsParam
attacks itself or any other
argument in argsParam
.hasAsConflictFreeSet(Collection<String>)
public <T extends Collection<String>> boolean hasUnionOfAsConflictFreeSet(Collection<T> argColls)
true
if the specified collections unite to form a conflict-free set in this AF.
argColls
- a Collection
of String
-Collection
s, denoting argument-collections.
true
if this AF contains all of the arguments in the union of argColls
; contains no
attack by any of those arguments on itself; and contains no attack between any two of those arguments.containsNoConflictAmongUnionOf(Collection<T extends Collection<String>>)
public <T extends Collection<String>> boolean containsNoConflictAmongUnionOf(Collection<T> argColls)
true
if, in this AF, none of the arguments in the union of the specified collections
attacks itself or any other argument in the union.
argColls
- a Collection
of String
-Collection
s, denoting argument-collections.
true
if, in this AF, none of the arguments in the union of argColls
attacks itself or any
other argument in the union.hasUnionOfAsConflictFreeSet(Collection<T extends Collection<String>>)
public boolean collnIsInConflictWithAnyOf(Collection<String> argsParam0, String... argsParam1)
true
if, in this AF, any of the arguments in the specified collection is in conflict with any
of the specified arguments.
argsParam0
- a Collection
of String
s, denoting arguments.argsParam1
- one or more String
s, denoting arguments.
true
if, in this AF, any argument in argsParam0
is attacked by/attacks any argument
in argsParam1
.public boolean argsAccept(Collection<String> acceptingArgColl, Collection<String> argsToCheck)
true
if all of argsToCheck
are acceptable with respect to the set-view of
acceptingArgColl
in this AF.
acceptingArgColl
- a Collection
of String
s, denoting arguments.argsToCheck
- a Collection
of String
s, denoting arguments.
true
if all of argsToCheck
are acceptable with respect to the set-view of
acceptingArgColl
in this AF.public boolean argsAccept(Collection<String> acceptingArgColl, String... argsToCheck)
true
if the specified arguments are all acceptable with respect to the set-view of
acceptingArgColl
in this AF.
acceptingArgColl
- a Collection
of String
s, denoting arguments.argsToCheck
- one or more String
s, denoting arguments.
true
if all of argsToCheck
are acceptable with respect to the set-view of
acceptingArgColl
in this AF.public HashSet<String> getArgsAcceptedBy(String... argsParam)
argsParam
- one or more String
s, denoting arguments.
String
s, denoting the arguments which are acceptable with respect to the set comprising
argsParam
in this AF.public HashSet<String> getArgsAcceptedBy(Collection<String> argsParam)
argsParam
in this AF.
argsParam
- a Collection
of String
s, denoting arguments.
String
s, denoting the arguments which are acceptable with respect to the set-view of
argsParam
in this AF.public HashSet<String> getExtsUnion(String semantics)
semantics
for this AF, where semantics
is a
multiple-extension semantics implemented by this class.
The multiple-extension semantics implemented by this class are recognized by the following names (case-sensitive) -
semantics
- a String
, being the name of a multiple-extension semantics implemented by this class.
String
s, denoting the union of the extensions prescribed by semantics
for this
AF.
IllegalArgumentException
- if semantics
is not the name of a multiple-extension semantics
implemented by this class.public HashSet<String> getGroundedExt()
String
s, denoting this AF's grounded extension.public boolean admissibleSetsContain(Collection<String>... argColls)
true
if, for each of the specified collections, its set-view is admissible in this AF.
If argColls
are all sets, this method returns the same as
getAdmissibleSets().containsAll(argColls)
, but without calculating the admissible sets.
argColls
- one or more Collection
s of String
s, denoting argument-collections.
true
if, for each of the specified collections, its set-view is admissible in this AF.public HashSet<String> getAdmissibleArgs()
String
s, denoting the union of this AF's admissible sets.public HashSet<HashSet<String>> getAdmissibleSets()
String
-sets, denoting this AF's admissible sets.public HashSet<HashSet<String>> getDefenceSetsAround(String arg)
arg
in this AF.
Vreeswijk defined defence-sets for arguments in his 2006 paper -
arg
- a String
, denoting an argument.
String
-sets, denoting the defence-sets around arg
in this AF.private HashSet<HashSet<String>> getDefenceSetsAroundHelper(String arg, List<String> path, HashSet<HashSet<String>> canSols)
arg
in this AF, if called by another method (and passed arg
, the
empty list and the singleton set containing the empty set). On defence-sets, see
getDefenceSetsAround(String)
.
This method implements a simplified and slightly modified version of Vreeswijk's algorithm for generating
labelled defence-sets (the label denoting, in each case, whether the defence-set is merely an admissible
set, or an admissible set which is also a subset of the grounded extension), as described in his 2006 paper -
While an externally-called instance of this method returns the defence-sets around the specified argument, a
recursively-called instance does not generally do so. Instead, it returns a (perhaps empty) set of argument-sets.
Each returned argument-set is conflict-free, but is not necessarily a defence-set of the
argument externInstArg
passed to the externally-called instance. The output of a recursively-called
instance represents a stage in one branch of a search for externInstArg
's defence-sets.
As such, it might include not just (i) defence-sets of externInstArg
, but also (ii) sets which are
non-admissible (on account of not being acceptable with respect to themselves), and (iii) sets which strictly
subsume defence-sets of externInstArg
.
Following Vreeswijk's usage, the argument-sets passed to and returned by this method are called candidate-solutions. A candidate-solution is an argument-set which is 'promising'. The algorithm builds each defence-set by addition, proceeding from the empty set. A candidate-solution cs is (loosely speaking) such that the algorithm has not yet established that cs is neither (a) a defence-set around the argument passed to the externally-called instance, nor (b) a subset of such a defence-set.
arg
- a String
, denoting an argument.path
- a list of String
s, denoting arguments.canSols
- a set of String
-sets, denoting candidate-solutions.
String
-sets, denoting either (a) the defence-sets around arg
in this AF
(if called by another method) or (b) candidate-solutions (if called recursively).public boolean preferredExtsContain(Collection<String>... argColls)
true
if, for each of the specified collections, its set-view is a preferred extension
of this AF.
If argColls
are all sets, this method returns the same as
getPreferredExts().containsAll(argColls)
, but without calculating the preferred extensions.
argColls
- one or more Collection
s of String
s, denoting argument-collections.
true
if, for each of the specified collections, its set-view is a preferred extension of this AF.public HashSet<HashSet<String>> getPreferredExts()
String
-sets, denoting this AF's preferred extensions.public HashSet<String> getPreferredScepticalExt()
String
s, denoting the intersection of this AF's preferred extensions.public boolean completeExtsContain(Collection<String>... argColls)
true
if, for each of the specified collections, its set-view is a complete extension of
this AF.
If argColls
are all sets, this method returns the same as
getCompleteExts().containsAll(argColls)
, but without calculating the complete extensions.
argColls
- one or more Collection
s of String
s, denoting argument-collections.
true
if, for each of the specified collections, its set-view is a complete extension of this AF.public HashSet<HashSet<String>> getCompleteExts()
String
-sets, denoting this AF's complete extensions.public boolean stableExtsContain(Collection<String>... argColls)
true
if, for each of the specified collections, its set-view is a stable extension of
this AF.
If argColls
are all sets, this method returns the same as
getStableExts().containsAll(argColls)
, but without calculating the stable extensions.
argColls
- one or more Collection
s of String
s, denoting argument-collections.
true
if, for each of the specified collections, its set-view is a stable extension of this AF.public HashSet<String> getStableArgs()
String
s, denoting the union of this AF's stable extensions.public HashSet<HashSet<String>> getStableExts()
String
-sets, denoting this AF's stable extensions.public boolean semiStableExtsContain(Collection<String>... argColls)
true
if, for each of the specified collections, its set-view is a semi-stable extension of
this AF.
If argColls
are all sets, this method returns the same as
getSemiStableExts().containsAll(argColls)
, but without calculating the semi-stable extensions. It does,
however, calculate the preferred extensions and the stable extensions, if they are not already recorded.
argColls
- one or more Collection
s of String
s, denoting argument-collections.
true
if, for each of the specified collections, its set-view is a semi-stable extension
of this AF.public HashSet<String> getSemiStableArgs()
String
s, denoting the union of this AF's semi-stable extensions.public HashSet<HashSet<String>> getSemiStableExts()
String
-sets, denoting this AF's semi-stable extensions.public HashSet<String> getIdealExt()
String
s, denoting this AF's ideal extension.public HashSet<String> getEagerExt()
String
s, denoting this AF's eager extension.private void findIdealExtOrEagerExt(String semantics)
semantics
- either "ideal" or "eager", depending on whether the ideal extension or the eager extension
is required.
IllegalArgumentException
- if semantics
is neither "ideal" nor "eager".
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |