Class RecursiveExtendedTheory
java.lang.Object
org.tweetyproject.commons.BeliefSet<Argument,DungSignature>
org.tweetyproject.arg.extended.syntax.RecursiveExtendedTheory
- All Implemented Interfaces:
Iterable<Argument>
,Collection<Argument>
,ArgumentationFramework<Argument>
,BeliefBase
public class RecursiveExtendedTheory
extends BeliefSet<Argument,DungSignature>
implements ArgumentationFramework<Argument>, Collection<Argument>
Implementation of argumentation frameworks with recursive attacks in the sense of Baroni et al.
- Author:
- Lars Bengel
- See Also:
-
Field Summary
Fields inherited from class org.tweetyproject.commons.BeliefSet
EQUALS_USES_SIGNATURE
-
Constructor Summary
ConstructorDescriptionInitializes a new empty recursive extended theory. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
Adds an attack between arguments to the theory.boolean
addAttack
(Argument attacker, ExtendedAttack attacked) Adds a recursive attack to the theory.void
clear()
boolean
Computes the set of all attacks in the theory.getAttacked
(Collection<Argument> ext) Computes the set of arguments/attacks directly attacked by some argument in 'ext'.getAttacked
(Argument arg) Computes the set of arguments/attacks directly attacked by 'arg'.getAttacked
(ExtendedAttack attack) Computes the set of arguments/attacks attacked by 'attack'.getAttackers
(Collection<DungEntity> entities) Computes the set of arguments that attack some member of the given set of arguments/attacks.getAttackers
(DungEntity entity) Computes the set of arguments that attack the given argument/attack.Returns the signature of the language of this knowledge base.getNodes()
Retrieves all the nodes (arguments) of this argumentation framework.boolean
isAcceptable
(DungEntity entity, Collection<DungEntity> ext) Determines whether 'ext' defends 'entity'.boolean
isAdmissible
(Collection<DungEntity> ext) Determines whether 'ext' is admissible.boolean
isAttacked
(Argument a, Extension<? extends ArgumentationFramework<?>> ext) Determines whether a given argument is attacked by any arguments in the specified extension.boolean
isAttacked
(Argument a, Argument b) Determines whether 'a' is attacked by 'b'.boolean
isAttacked
(ExtendedAttack a, Argument b) Determines whether 'a' is attacked by 'b'.boolean
isAttackRelation
(ExtendedAttack attack, DungEntity target) Determines whether 'attack' attacks 'target'.boolean
isComplete
(Collection<DungEntity> ext) Determines whether 'ext' is complete.boolean
Determines whether the given set of arguments/attacks is conflict-free.Pretty prints the recursive extended theory.boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) Methods inherited from class org.tweetyproject.commons.BeliefSet
add, addAll, containsAll, equals, getSignature, hashCode, isEmpty, iterator, setSignature, size, toArray, toArray, toString, toString
Methods inherited from interface org.tweetyproject.arg.dung.syntax.ArgumentationFramework
containsAll
Methods inherited from interface org.tweetyproject.commons.BeliefBase
toString
Methods inherited from interface java.util.Collection
addAll, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeIf, size, spliterator, stream, toArray, toArray, toArray
-
Constructor Details
-
RecursiveExtendedTheory
public RecursiveExtendedTheory()Initializes a new empty recursive extended theory.
-
-
Method Details
-
isAttackRelation
Determines whether 'attack' attacks 'target'.- Parameters:
attack
- some extended attacktarget
- some argument/attack- Returns:
- "true" if 'attack' either directly attacks 'target' or recursively
-
getAttacked
Computes the set of arguments/attacks attacked by 'attack'.- Parameters:
attack
- some extended attack- Returns:
- the set of elements attacked by 'attack'
-
isConflictFree
Determines whether the given set of arguments/attacks is conflict-free.- Parameters:
ext
- a set of arguments/attacks- Returns:
- "true" if 'ext' is conflict-free
-
isAcceptable
Determines whether 'ext' defends 'entity'.- Parameters:
entity
- some argument/attackext
- some set of arguments/attacks- Returns:
- "true" if 'entity' is defended by 'ext'
-
isAdmissible
Determines whether 'ext' is admissible.- Parameters:
ext
- some set of arguments/attacks- Returns:
- "true" if 'ext' is admissible
-
isComplete
Determines whether 'ext' is complete.- Parameters:
ext
- some set of arguments/attacks- Returns:
- "true" if 'ext' is complete
-
getAttackers
Computes the set of arguments that attack the given argument/attack.- Parameters:
entity
- some argument/attack- Returns:
- the set of arguments attacking 'entity'
-
getAttackers
Computes the set of arguments that attack some member of the given set of arguments/attacks.- Parameters:
entities
- some set of arguments/attacks- Returns:
- the set of arguments attacking some element of 'entities'
-
getAttacked
Computes the set of arguments/attacks directly attacked by 'arg'.- Parameters:
arg
- some argument- Returns:
- the set of arguments/attacks directly attacked by 'arg'
-
getAttacked
Computes the set of arguments/attacks directly attacked by some argument in 'ext'.- Parameters:
ext
- some set of arguments- Returns:
- the set of arguments/attacks directly attacked by 'ext'
-
contains
- Specified by:
contains
in interfaceCollection<Argument>
- Overrides:
contains
in classBeliefSet<Argument,
DungSignature>
-
add
- Specified by:
add
in interfaceCollection<Argument>
- Overrides:
add
in classBeliefSet<Argument,
DungSignature>
-
addAttack
-
addAttack
Adds a recursive attack to the theory.- Parameters:
attacker
- some argumentattacked
- some extended attack- Returns:
- "true" if the attack has been added successfully
-
remove
- Specified by:
remove
in interfaceCollection<Argument>
- Overrides:
remove
in classBeliefSet<Argument,
DungSignature>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<Argument>
- Overrides:
removeAll
in classBeliefSet<Argument,
DungSignature>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<Argument>
- Overrides:
retainAll
in classBeliefSet<Argument,
DungSignature>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<Argument>
- Overrides:
clear
in classBeliefSet<Argument,
DungSignature>
-
isAttacked
Description copied from interface:ArgumentationFramework
Determines whether a given argument is attacked by any arguments in the specified extension.- Specified by:
isAttacked
in interfaceArgumentationFramework<Argument>
- Parameters:
a
- the argument to check if it is being attacked.ext
- the extension that potentially contains attackers of the argument.- Returns:
- true if the argument
a
is attacked by any argument in the given extensionext
, false otherwise.
-
isAttacked
-
isAttacked
Determines whether 'a' is attacked by 'b'.- Parameters:
a
- some extended attackb
- some argument- Returns:
- "true" if 'a' is attacked by 'b'
-
getNodes
Description copied from interface:ArgumentationFramework
Retrieves all the nodes (arguments) of this argumentation framework.- Specified by:
getNodes
in interfaceArgumentationFramework<Argument>
- Returns:
- a collection of all arguments (nodes) within this framework.
-
getAllAttacks
Computes the set of all attacks in the theory.- Returns:
- the set of all attacks in the theory
-
getMinimalSignature
Description copied from interface:BeliefBase
Returns the signature of the language of this knowledge base.- Specified by:
getMinimalSignature
in interfaceBeliefBase
- Returns:
- the signature of the language of this knowledge base.
-
prettyPrint
Pretty prints the recursive extended theory.- Returns:
- string representation of the recursive extended theory
-