Package net.sf.tweety.arg.dung.reasoner
Class WeaklyAdmissibleReasoner
- java.lang.Object
-
- net.sf.tweety.arg.dung.reasoner.AbstractDungReasoner
-
- net.sf.tweety.arg.dung.reasoner.AbstractExtensionReasoner
-
- net.sf.tweety.arg.dung.reasoner.WeaklyAdmissibleReasoner
-
- All Implemented Interfaces:
net.sf.tweety.commons.ModelProvider<Argument,DungTheory,Extension>,net.sf.tweety.commons.QualitativeReasoner<DungTheory,Argument>,net.sf.tweety.commons.Reasoner<Boolean,DungTheory,Argument>
public class WeaklyAdmissibleReasoner extends AbstractExtensionReasoner
Reasoner for weak admissibility the reasoner reduces the number of sets we have to check by computing candidate sets instead of checking all sets. a candidate set of an Extension E is a conflict-free set S, which contains at least one attacker of E and contains only arguments relevant to E and itself. An argument is considered relevant to E iff it attacks any argument in the same component as E.- Author:
- Lars Bengel
-
-
Constructor Summary
Constructors Constructor Description WeaklyAdmissibleReasoner()
-
Method Summary
Modifier and Type Method Description protected Collection<Argument>getAttacked(DungTheory bbase, Collection<Argument> arguments)computes the set of arguments attacked by an element of arguments in bbaseprotected Collection<Argument>getAttackers(DungTheory bbase, Collection<Argument> arguments)computes the set of arguments attacking an element of arguments in bbaseSet<Set<Argument>>getAttackingCandidates(DungTheory bbase, Collection<Argument> ext)computes all conflict-free sets, which attack any argument in extSet<Argument>getComponent(DungTheory bbase, Argument argument)finds the set of arguments S = {a | there exists an edge between a and argument}Set<Set<Argument>>getConflictFreeCandidateSets(DungTheory bbase, Collection<Argument> candidates)computes all conflict-free sets of bbase, that contain only arguments in candidates and all arguments are relevant an argument is considered relevant iff it attacks any argument in the same component as the given argument ASet<Set<Argument>>getConflictFreeSets(DungTheory bbase, Collection<Argument> candidates)computes all conflict-free sets of bbase, that contain only arguments in candidatesExtensiongetModel(DungTheory bbase)returns one weakly admissible set of bbaseCollection<Extension>getModels(DungTheory bbase)computes all weakly admissible sets of bbase.DungTheorygetReduct(DungTheory bbase, Extension ext)computes the reduct of bbase wrt.protected booleanisWeaklyAdmissible(DungTheory bbase, Extension ext)checks whether ext is weakly admissible in bbase-
Methods inherited from class net.sf.tweety.arg.dung.reasoner.AbstractExtensionReasoner
getSimpleReasonerForSemantics, query, query
-
-
-
-
Method Detail
-
getModels
public Collection<Extension> getModels(DungTheory bbase)
computes all weakly admissible sets of bbase. A set S is weakly admissible iff it is conflict-free and no attacker of S is element of a weakly admissible set of the reduct of bbase wrt. S- Specified by:
getModelsin interfacenet.sf.tweety.commons.ModelProvider<Argument,DungTheory,Extension>- Specified by:
getModelsin classAbstractExtensionReasoner- Parameters:
bbase- an argumentation framework- Returns:
- the weakly admissible sets of bbase
-
getModel
public Extension getModel(DungTheory bbase)
returns one weakly admissible set of bbase- Specified by:
getModelin interfacenet.sf.tweety.commons.ModelProvider<Argument,DungTheory,Extension>- Specified by:
getModelin classAbstractExtensionReasoner- Parameters:
bbase- an argumentation framework- Returns:
- a weakly admissible set
-
isWeaklyAdmissible
protected boolean isWeaklyAdmissible(DungTheory bbase, Extension ext)
checks whether ext is weakly admissible in bbase- Parameters:
bbase- an argumentation frameworkext- an extension- Returns:
- "true" if ext is weakly admissible in bbase
-
getAttackingCandidates
public Set<Set<Argument>> getAttackingCandidates(DungTheory bbase, Collection<Argument> ext)
computes all conflict-free sets, which attack any argument in ext- Parameters:
bbase- an argumentation frameworkext- an extension- Returns:
- all sets which attack ext and are conflict-free
-
getConflictFreeCandidateSets
public Set<Set<Argument>> getConflictFreeCandidateSets(DungTheory bbase, Collection<Argument> candidates)
computes all conflict-free sets of bbase, that contain only arguments in candidates and all arguments are relevant an argument is considered relevant iff it attacks any argument in the same component as the given argument A- Parameters:
bbase- an argumentation frameworkcandidates- a set of arguments- Returns:
- conflict-free sets in bbase
-
getComponent
public Set<Argument> getComponent(DungTheory bbase, Argument argument)
finds the set of arguments S = {a | there exists an edge between a and argument}- Parameters:
bbase- an argumentation frameworkargument- an argument- Returns:
- the set of arguments connected with argument
-
getConflictFreeSets
public Set<Set<Argument>> getConflictFreeSets(DungTheory bbase, Collection<Argument> candidates)
computes all conflict-free sets of bbase, that contain only arguments in candidates- Parameters:
bbase- an argumentation frameworkcandidates- a set of arguments- Returns:
- conflict-free sets in bbase
-
getReduct
public DungTheory getReduct(DungTheory bbase, Extension ext)
computes the reduct of bbase wrt. ext ie. removes all arguments from bbase which are either in ext or are attacked by any element of ext- Parameters:
bbase- an argumentation frameworkext- an extension- Returns:
- the reduct of bbase wrt. ext
-
getAttacked
protected Collection<Argument> getAttacked(DungTheory bbase, Collection<Argument> arguments)
computes the set of arguments attacked by an element of arguments in bbase- Parameters:
bbase- an argumentation frameworkarguments- a set of arguments- Returns:
- the set of arguments attacked by arguments
-
getAttackers
protected Collection<Argument> getAttackers(DungTheory bbase, Collection<Argument> arguments)
computes the set of arguments attacking an element of arguments in bbase- Parameters:
bbase- an argumentation frameworkarguments- a set of arguments- Returns:
- the set of arguments attacking arguments
-
-