Package net.sf.tweety.arg.bipolar.syntax
Class DeductiveArgumentationFramework
- java.lang.Object
-
- net.sf.tweety.commons.BeliefSet<BArgument,DungSignature>
-
- net.sf.tweety.arg.bipolar.syntax.AbstractBipolarFramework
-
- net.sf.tweety.arg.bipolar.syntax.DeductiveArgumentationFramework
-
- All Implemented Interfaces:
java.lang.Comparable<DeductiveArgumentationFramework>
,java.lang.Iterable<BArgument>
,java.util.Collection<BArgument>
,BeliefBase
,Graph<BArgument>
public class DeductiveArgumentationFramework extends AbstractBipolarFramework implements java.lang.Comparable<DeductiveArgumentationFramework>
This class implements a bipolar abstract argumentation theory with support in a deductive sense. ie. if a supports b, then the acceptance of a implies the acceptance of b and as a consequence the non-acceptance of b implies the non-acceptance of a.
See
Cayrol, Lagasquie-Schiex. Bipolarity in argumentation graphs: Towards a better understanding. 2013
and
Boella et al. Support in Abstract Argumentation. 2010- 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 DeductiveArgumentationFramework()
Default constructor; initializes empty sets of arguments, attacks and supports
-
Method Summary
Modifier and Type Method Description boolean
add(Attack a)
Adds the given attack to this argumentation frameworkboolean
add(Support supp)
Adds the given support to this bipolar argumentation framework.boolean
addAttack(BArgument attacker, BArgument attacked)
Adds an attack from the first argument to the second to this deductive argumentation system.boolean
addSupport(BArgument supporter, BArgument supported)
Adds a support from the first argument to the second to this bipolar argumentation framework.int
compareTo(DeductiveArgumentationFramework o)
java.util.Set<Attack>
getAttacks()
Returns all attacks of this theory.DungTheory
getCompleteAssociatedDungTheory()
constructs the complete associated dung theory of this bipolar argumentation framework i.e.java.util.Set<BinaryAttack>
getComplexAttacks()
Calculates the set of complex attacks in this bipolar argumentation framework i.e.java.util.Set<BinaryAttack>
getDeductiveComplexAttacks()
Calculates the set of deductive complex attacks (d-attacks) in this bipolar argumentation framework i.e.java.util.Set<BinaryAttack>
getMediatedAttacks(BArgument arg1)
Calculates the set of mediated attack from "arg1" to other arguments "y", i.e.DungTheory
getMetaFramework()
constructs the meta dung theory of this bipolar argumentation framework by adding meta-arguments for every attack and support relation See Boella et al.java.util.Set<BArgument>
getSupported(java.util.Collection<BArgument> ext)
Computes the set {A | there is a sequence of direct supports from an element ofext
to Ajava.util.Set<BArgument>
getSupported(BArgument argument)
Computes the set {A | there is a sequence of direct supports from argument to Ajava.util.Set<BinaryAttack>
getSupportedAttacks(BArgument arg1)
Calculates the set of supported attack from "arg1" to other arguments "y", i.e.java.util.Set<BArgument>
getSupporters(BArgument argument)
Computes the set {A | there is a sequence of direct supports from A to argumentjava.util.Set<Support>
getSupports()
Returns all supports of this theory.int
hashCode()
boolean
isAcceptable(BArgument argument, java.util.Collection<BArgument> ext)
checks whether argument is acceptable wrt.boolean
isAttacked(BArgument argument, java.util.Set<BArgument> argumentSet)
returns true if some argument of argumentSet attacks argument.boolean
isAttacking(java.util.Set<BArgument> argumentSet1, java.util.Set<BArgument> argumentSet2)
Checks whether argumentSet1 is attacking argumentSet2 ie any element of argumentSet1 is attacking any element of argumentSet2boolean
isAttacking(BArgument argument, java.util.Set<BArgument> argSet)
returns true if some argument of argSet is attacked by argument.boolean
isClosed(ArgumentSet ext)
Determines if ext is closed under the support relation of this framework i.e., if all arguments supported by ext are an element of extboolean
isMediatedAttack(BArgument arg1, BArgument arg2)
Checks whether there exists a mediated attack from "arg1" to "arg2", i.e.boolean
isSuperMediatedAttack(BArgument arg1, BArgument arg2)
Checks whether there exists a super-mediated attack from "arg1" to "arg2", i.e.boolean
isSupportedAttack(BArgument arg1, BArgument arg2)
Checks whether there exists a supported attack from "arg1" to "arg2", i.e.NecessityArgumentationFramework
toNAF()
translates this DAF into the corresponding framework with support in a necessary sense See Cayrol, Lagasquie-Schiex.-
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
-
-
-
-
Method Detail
-
isClosed
public boolean isClosed(ArgumentSet ext)
Determines if ext is closed under the support relation of this framework i.e., if all arguments supported by ext are an element of ext- Parameters:
ext
- an extension- Returns:
- true if ext is closed under R_sup
-
getDeductiveComplexAttacks
public java.util.Set<BinaryAttack> getDeductiveComplexAttacks()
Calculates the set of deductive complex attacks (d-attacks) in this bipolar argumentation framework i.e. all direct, supported, mediated and super-mediated attacks- Returns:
- set of d-attacks in this bipolar argumentation framework
-
getComplexAttacks
public java.util.Set<BinaryAttack> getComplexAttacks()
Calculates the set of complex attacks in this bipolar argumentation framework i.e. all direct, supported and mediated attacks- Returns:
- set of complex attacks in this bipolar argumentation framework
-
getMediatedAttacks
public java.util.Set<BinaryAttack> getMediatedAttacks(BArgument arg1)
Calculates the set of mediated attack from "arg1" to other arguments "y", i.e. whether there is a sequence of direct supports from "y" to "x" and a direct attack from "arg1" to "x".- Parameters:
arg1
- an argument.- Returns:
- set of mediated attacks starting from "arg1".
-
isMediatedAttack
public boolean isMediatedAttack(BArgument arg1, BArgument arg2)
Checks whether there exists a mediated attack from "arg1" to "arg2", i.e. whether there is a sequence of direct supports from "arg2" to "x" and a direct attack from "arg1" to "x".- Parameters:
arg1
- an argument.arg2
- an argument.- Returns:
- "true" iff there is a mediated attack from "arg1" to "arg2".
-
isSuperMediatedAttack
public boolean isSuperMediatedAttack(BArgument arg1, BArgument arg2)
Checks whether there exists a super-mediated attack from "arg1" to "arg2", i.e. whether there is a sequence of direct supports from "arg2" to "x" and a direct or supported attack from "arg1" to "x".- Parameters:
arg1
- an argument.arg2
- an argument.- Returns:
- "true" iff there is a super-mediated attack from "arg1" to "arg2".
-
getSupportedAttacks
public java.util.Set<BinaryAttack> getSupportedAttacks(BArgument arg1)
Calculates the set of supported attack from "arg1" to other arguments "y", i.e. whether there is a sequence of direct supports from "arg1" to "x" and a direct attack from "x" to "y".- Parameters:
arg1
- an argument.- Returns:
- set of supported attacks starting from "arg1".
-
isSupportedAttack
public boolean isSupportedAttack(BArgument arg1, BArgument arg2)
Checks whether there exists a supported attack from "arg1" to "arg2", i.e. whether there is a sequence of direct supports from "arg1" to "x" and a direct attack from "x" to "arg2".- Parameters:
arg1
- an argument.arg2
- an argument.- Returns:
- "true" iff there is a supported attack from "arg1" to "arg2".
-
isAttacking
public boolean isAttacking(BArgument argument, java.util.Set<BArgument> argSet)
returns true if some argument of argSet is attacked by argument.- Parameters:
argument
- an argumentargSet
- a set of arguments- Returns:
- true if some argument of argSet is attacked by argument.
-
isAttacked
public boolean isAttacked(BArgument argument, java.util.Set<BArgument> argumentSet)
returns true if some argument of argumentSet attacks argument.- Parameters:
argument
- an argumentargumentSet
- set of arguments- Returns:
- true if some argument of argumentSet attacks argument.
-
isAttacking
public boolean isAttacking(java.util.Set<BArgument> argumentSet1, java.util.Set<BArgument> argumentSet2)
Checks whether argumentSet1 is attacking argumentSet2 ie any element of argumentSet1 is attacking any element of argumentSet2- Parameters:
argumentSet1
- a set of argumentsargumentSet2
- a set of arguments- Returns:
- "true" if an element of argumentSet1 is attacking any element of argumentSet2
-
getSupported
public java.util.Set<BArgument> getSupported(java.util.Collection<BArgument> ext)
Computes the set {A | there is a sequence of direct supports from an element ofext
to A- Parameters:
ext
- an extension ie. a set of arguments- Returns:
- the set of all arguments that are supported by
ext
.
-
getSupported
public java.util.Set<BArgument> getSupported(BArgument argument)
Computes the set {A | there is a sequence of direct supports from argument to A- Parameters:
argument
- an argument- Returns:
- the set of all arguments that are supported by
argument
.
-
getSupporters
public java.util.Set<BArgument> getSupporters(BArgument argument)
Computes the set {A | there is a sequence of direct supports from A to argument- Parameters:
argument
- an argument- Returns:
- the set of all arguments that support
argument
.
-
add
public boolean add(Support supp)
Adds the given support to this bipolar argumentation framework.- Specified by:
add
in classAbstractBipolarFramework
- Parameters:
supp
- 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 bipolar argumentation framework.- Parameters:
supporter
- some argumentsupported
- some argument- Returns:
- "true" if the set of supports has been modified.
-
add
public boolean add(Attack a)
Description copied from class:AbstractBipolarFramework
Adds the given attack to this argumentation framework- Specified by:
add
in 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 deductive argumentation system.- Parameters:
attacker
- some argumentattacked
- some argument- Returns:
- "true" if the set of attacks has been modified.
-
isAcceptable
public boolean isAcceptable(BArgument argument, java.util.Collection<BArgument> ext)
Description copied from class:AbstractBipolarFramework
checks whether argument is acceptable wrt. ext- Specified by:
isAcceptable
in classAbstractBipolarFramework
- Parameters:
argument
- some argumentext
- a set of arguments- Returns:
- "true" if argument is acceptable wrt. ext
-
getSupports
public java.util.Set<Support> getSupports()
Description copied from class:AbstractBipolarFramework
Returns all supports of this theory.- Specified by:
getSupports
in classAbstractBipolarFramework
- Returns:
- all supports of this theory.
-
getAttacks
public java.util.Set<Attack> getAttacks()
Description copied from class:AbstractBipolarFramework
Returns all attacks of this theory.- Specified by:
getAttacks
in classAbstractBipolarFramework
- Returns:
- all attacks of this theory.
-
getCompleteAssociatedDungTheory
public DungTheory getCompleteAssociatedDungTheory()
constructs the complete associated dung theory of this bipolar argumentation framework i.e. constructs all deductive complex attacks of BAF and returns dung theory without supports See Cayrol, Lagasquie-Schiex. Bipolarity in argumentation graphs: Towards a better understanding. 2013- Returns:
- the complete associated Dung Theory of this bipolar argumentation framework
-
getMetaFramework
public DungTheory getMetaFramework()
constructs the meta dung theory of this bipolar argumentation framework by adding meta-arguments for every attack and support relation See Boella et al. Support in Abstract Argumentation. 2010- Returns:
- the meta dung theory of this bipolar argumentation framework
-
toNAF
public NecessityArgumentationFramework toNAF()
translates this DAF into the corresponding framework with support in a necessary sense See Cayrol, Lagasquie-Schiex. Bipolarity in argumentation graphs: Towards a better understanding. 2013- Returns:
- the corresponding NAF
-
compareTo
public int compareTo(DeductiveArgumentationFramework o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<DeductiveArgumentationFramework>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Collection<BArgument>
- Overrides:
hashCode
in classBeliefSet<BArgument,DungSignature>
-
-