Package net.sf.tweety.arg.bipolar.syntax
Class NecessityArgumentationFramework
- java.lang.Object
-
- net.sf.tweety.commons.BeliefSet<BArgument,DungSignature>
-
- net.sf.tweety.arg.bipolar.syntax.AbstractBipolarFramework
-
- net.sf.tweety.arg.bipolar.syntax.NecessityArgumentationFramework
-
- All Implemented Interfaces:
java.lang.Comparable<NecessityArgumentationFramework>,java.lang.Iterable<BArgument>,java.util.Collection<BArgument>,BeliefBase,Graph<BArgument>
public class NecessityArgumentationFramework extends AbstractBipolarFramework implements java.lang.Comparable<NecessityArgumentationFramework>
This class implements a bipolar abstract argumentation framework with necessities. ie. if an argument a supports b, then the acceptance of a is required for the acceptance of b. If a set of arguments E supports an argument b, then the acceptance of b requires the acceptance of at least one argument of E.
See
Nouioua. AFs with Necessities: Further Semantics and Labelling Characterization. 2013
and
Polberg, Oren. Revisiting Support in Abstract Argumentation Systems. 2014- Author:
- Lars Bengel
-
-
Field Summary
-
Fields inherited from class net.sf.tweety.commons.BeliefSet
EQUALS_USES_SIGNATURE
-
Fields inherited from interface net.sf.tweety.graphs.Graph
IGNORE_SELFLOOPS, INVERT_SELFLOOPS, REMOVE_SELFLOOPS
-
-
Constructor Summary
Constructors Constructor Description NecessityArgumentationFramework()Default constructor; initializes empty sets of arguments, attacks and supportsNecessityArgumentationFramework(DeductiveArgumentationFramework daf)creates a necessity argumentation framework from the given deductive argumentation frameworkNecessityArgumentationFramework(EvidentialArgumentationFramework eaf)creates a necessity argumentation framework from the given evidential argumentation framework
-
Method Summary
Modifier and Type Method Description booleanadd(Attack a)Adds the given attack to this argumentation frameworkbooleanadd(Support s)Adds the given support to this argumentation framework.booleanaddAttack(BArgument attacker, BArgument attacked)Adds an attack from the first argument to the second to this necessity argumentation system.booleanaddSupport(ArgumentSet supporter, BArgument supported)Adds a support from a set of arguments to an argument to this argumentation framework.booleanaddSupport(BArgument supporter, BArgument supported)Adds a support from the first argument to the second to this argumentation framework.intcompareTo(NecessityArgumentationFramework o)java.util.Set<Attack>getAttacks()Returns all attacks of this theory.java.util.Set<BArgument>getDeactivatedArguments(java.util.Collection<BArgument> argumentSet)computes the set of deactivated arguments of argumentSet a set of arguments S deactivates an argument a iff either S attacks a or S does not support ajava.util.Set<Support>getSupports()Returns all supports of this theory.inthashCode()booleanisAcceptable(BArgument argument, java.util.Collection<BArgument> ext)checks whether ext defends argument a set of arguments S defends an argument a iff S u {a} is coherent and S attacks each coherent set T, which attacks abooleanisAttackedBy(java.util.Collection<BArgument> argumentSet1, java.util.Collection<BArgument> argumentSet2)checks whether some argument in argumentSet1 is attacked by any argument in argumentSet2booleanisAttackedBy(BArgument argument, java.util.Collection<BArgument> argumentSet)checks whether argument is attacked by any argument in argumentSetbooleanisClosed(java.util.Collection<BArgument> argumentSet)checks if the given set of arguments is closed under the support relation a set of arguments S is closed iff every argument a in S has support from a non-empty subset of SbooleanisCoherent(java.util.Collection<BArgument> argumentSet)checks if the set of arguments S is coherent in his argumentation framework S is coherent iff it is closed and N-Cycle-FreebooleanisConflictFree(java.util.Collection<BArgument> argumentSet)checks whether the given set is conflict-free wrt.booleanisNCycleFree(java.util.Collection<BArgument> argumentSet)checks if a set of arguments S is N-Cycle-Free in this argumentation framework ie.booleanisNCycleFreeIn(BArgument argument, java.util.Collection<BArgument> argumentSet)checks if argument is N-Cycle-Free in the set of argumentsbooleanisStronglyCoherent(java.util.Collection<BArgument> argumentSet)checks whether the given set of arguments is strongly coherent in this argumentation framework a set of arguments is strongly coherent iff it is coherent an conflict-freeDeductiveArgumentationFrameworktoDAF()translates this NAF into the corresponding framework with support in a deductive sense only works for NAFs which contain only binary support relations See Cayrol, Lagasquie-Schiex.EvidentialArgumentationFrameworktoEAF()translates this necessity argumentation framework into an evidential argumentation framework Translation algorithm from: Polberg, Oren.-
Methods inherited from class net.sf.tweety.arg.bipolar.syntax.AbstractBipolarFramework
add, add, add, addAllAttacks, addAllSupports, areAdjacent, existsDirectedPath, faf, getAdjacencyMatrix, getAttacked, getAttackers, getChildren, getComplementGraph, getDirectSupported, getDirectSupporters, getEdge, getEdges, getMinimalSignature, getNeighbors, getNodes, getNumberOfNodes, getParents, getRestriction, getStronglyConnectedComponents, getSubgraphs, hasSelfLoops, isAttackedBy, isDirectSupportedBy, isWeightedGraph, prettyPrint, remove, remove, remove, removeAll
-
Methods inherited from class net.sf.tweety.commons.BeliefSet
add, addAll, clear, contains, containsAll, equals, getSignature, isEmpty, iterator, remove, retainAll, setSignature, size, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
NecessityArgumentationFramework
public NecessityArgumentationFramework()
Default constructor; initializes empty sets of arguments, attacks and supports
-
NecessityArgumentationFramework
public NecessityArgumentationFramework(EvidentialArgumentationFramework eaf)
creates a necessity argumentation framework from the given evidential argumentation framework- Parameters:
eaf- a bipolar evidential argumentation framework
-
NecessityArgumentationFramework
public NecessityArgumentationFramework(DeductiveArgumentationFramework daf)
creates a necessity argumentation framework from the given deductive argumentation framework- Parameters:
daf- a bipolar deductive argumentation framework
-
-
Method Detail
-
isAcceptable
public boolean isAcceptable(BArgument argument, java.util.Collection<BArgument> ext)
checks whether ext defends argument a set of arguments S defends an argument a iff S u {a} is coherent and S attacks each coherent set T, which attacks a- Specified by:
isAcceptablein classAbstractBipolarFramework- Parameters:
argument- some argumentext- a set of arguments- Returns:
- "true" if ext defends argument
-
getDeactivatedArguments
public java.util.Set<BArgument> getDeactivatedArguments(java.util.Collection<BArgument> argumentSet)
computes the set of deactivated arguments of argumentSet a set of arguments S deactivates an argument a iff either S attacks a or S does not support a- Parameters:
argumentSet- a set of arguments- Returns:
- the set of deactivated arguments
-
isStronglyCoherent
public boolean isStronglyCoherent(java.util.Collection<BArgument> argumentSet)
checks whether the given set of arguments is strongly coherent in this argumentation framework a set of arguments is strongly coherent iff it is coherent an conflict-free- Parameters:
argumentSet- a set of arguments- Returns:
- "true" if argumentSet is strongly coherent
-
isCoherent
public boolean isCoherent(java.util.Collection<BArgument> argumentSet)
checks if the set of arguments S is coherent in his argumentation framework S is coherent iff it is closed and N-Cycle-Free- Parameters:
argumentSet- a set of arguments- Returns:
- "true" if argumentSet is coherent
-
isClosed
public boolean isClosed(java.util.Collection<BArgument> argumentSet)
checks if the given set of arguments is closed under the support relation a set of arguments S is closed iff every argument a in S has support from a non-empty subset of S- Parameters:
argumentSet- a set of arguments- Returns:
- "true" if argumentSet is closed under the support relation
-
isNCycleFree
public boolean isNCycleFree(java.util.Collection<BArgument> argumentSet)
checks if a set of arguments S is N-Cycle-Free in this argumentation framework ie. if all arguments in S are N-Cycle-Free in S- Parameters:
argumentSet- a set of arguments- Returns:
- "true" the set of arguments isN-Cycle-Free
-
isNCycleFreeIn
public boolean isNCycleFreeIn(BArgument argument, java.util.Collection<BArgument> argumentSet)
checks if argument is N-Cycle-Free in the set of arguments- Parameters:
argument- some argumentargumentSet- a set of arguments- Returns:
- "true" if argument in N-Cycle-Free in the set of arguments
-
isConflictFree
public boolean isConflictFree(java.util.Collection<BArgument> argumentSet)
checks whether the given set is conflict-free wrt. the attack relation- Parameters:
argumentSet- a set of arguments- Returns:
- "true" if argumentSet is Conflict-Free
-
isAttackedBy
public boolean isAttackedBy(BArgument argument, java.util.Collection<BArgument> argumentSet)
checks whether argument is attacked by any argument in argumentSet- Parameters:
argument- some argumentargumentSet- a set of arguments- Returns:
- "true" if some argument in argumentSet attacks argument
-
isAttackedBy
public boolean isAttackedBy(java.util.Collection<BArgument> argumentSet1, java.util.Collection<BArgument> argumentSet2)
checks whether some argument in argumentSet1 is attacked by any argument in argumentSet2- Parameters:
argumentSet1- a set of argumentsargumentSet2- a set of arguments- Returns:
- "true" if some argument in argumentSet2 attacks any argument in argumentSet1
-
add
public boolean add(Support s)
Description copied from class:AbstractBipolarFrameworkAdds the given support to this argumentation framework.- Specified by:
addin classAbstractBipolarFramework- Parameters:
s- a support- Returns:
- "true" if the set of supports has been modified.
-
addSupport
public boolean addSupport(BArgument supporter, BArgument supported)
Adds a support from the first argument to the second to this argumentation framework.- Parameters:
supporter- some argumentsupported- some argument- Returns:
- "true" if the set of supports has been modified.
-
addSupport
public boolean addSupport(ArgumentSet supporter, BArgument supported)
Adds a support from a set of arguments to an argument to this argumentation framework.- Parameters:
supporter- a set of argumentssupported- some argument- Returns:
- "true" if the set of supports has been modified.
-
add
public boolean add(Attack a)
Description copied from class:AbstractBipolarFrameworkAdds the given attack to this argumentation framework- Specified by:
addin classAbstractBipolarFramework- Parameters:
a- an attack- Returns:
- "true" if the set of attacks has been modified.
-
addAttack
public boolean addAttack(BArgument attacker, BArgument attacked)
Adds an attack from the first argument to the second to this necessity argumentation system.- Parameters:
attacker- some argumentattacked- some argument- Returns:
- "true" if the set of attacks has been modified.
-
getSupports
public java.util.Set<Support> getSupports()
Description copied from class:AbstractBipolarFrameworkReturns all supports of this theory.- Specified by:
getSupportsin classAbstractBipolarFramework- Returns:
- all supports of this theory.
-
getAttacks
public java.util.Set<Attack> getAttacks()
Description copied from class:AbstractBipolarFrameworkReturns all attacks of this theory.- Specified by:
getAttacksin classAbstractBipolarFramework- Returns:
- all attacks of this theory.
-
toEAF
public EvidentialArgumentationFramework toEAF()
translates this necessity argumentation framework into an evidential argumentation framework Translation algorithm from: Polberg, Oren. Revisiting Support in Abstract Argumentation Systems. 2014- Returns:
- the corresponding evidential argumentation framework
-
toDAF
public DeductiveArgumentationFramework toDAF()
translates this NAF into the corresponding framework with support in a deductive sense only works for NAFs which contain only binary support relations See Cayrol, Lagasquie-Schiex. Bipolarity in argumentation graphs: Towards a better understanding. 2013- Returns:
- the corresponding DAF
-
compareTo
public int compareTo(NecessityArgumentationFramework o)
- Specified by:
compareToin interfacejava.lang.Comparable<NecessityArgumentationFramework>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<BArgument>- Overrides:
hashCodein classBeliefSet<BArgument,DungSignature>
-
-