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
ConstructorsConstructorDescriptionInitializes a new empty recursive extended theory. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanAdds an attack between arguments to the theory.booleanaddAttack(Argument attacker, ExtendedAttack attacked) Adds a recursive attack to the theory.voidclear()booleanComputes 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.booleanisAcceptable(DungEntity entity, Collection<DungEntity> ext) Determines whether 'ext' defends 'entity'.booleanisAdmissible(Collection<DungEntity> ext) Determines whether 'ext' is admissible.booleanisAttacked(Argument a, Extension<? extends ArgumentationFramework<?>> ext) Determines whether a given argument is attacked by any arguments in the specified extension.booleanisAttacked(Argument a, Argument b) Determines whether 'a' is attacked by 'b'.booleanisAttacked(ExtendedAttack a, Argument b) Determines whether 'a' is attacked by 'b'.booleanisAttackRelation(ExtendedAttack attack, DungEntity target) Determines whether 'attack' attacks 'target'.booleanisComplete(Collection<DungEntity> ext) Determines whether 'ext' is complete.booleanDetermines whether the given set of arguments/attacks is conflict-free.Pretty prints the recursive extended theory.booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) Methods inherited from class org.tweetyproject.commons.BeliefSet
add, addAll, containsAll, equals, getSignature, hashCode, isEmpty, iterator, setSignature, size, toArray, toArray, toString, toStringMethods inherited from interface org.tweetyproject.arg.dung.syntax.ArgumentationFramework
containsAllMethods inherited from interface org.tweetyproject.commons.BeliefBase
toStringMethods 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:
containsin interfaceCollection<Argument>- Overrides:
containsin classBeliefSet<Argument,DungSignature>
-
add
- Specified by:
addin interfaceCollection<Argument>- Overrides:
addin 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:
removein interfaceCollection<Argument>- Overrides:
removein classBeliefSet<Argument,DungSignature>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Argument>- Overrides:
removeAllin classBeliefSet<Argument,DungSignature>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Argument>- Overrides:
retainAllin classBeliefSet<Argument,DungSignature>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Argument>- Overrides:
clearin classBeliefSet<Argument,DungSignature>
-
isAttacked
Description copied from interface:ArgumentationFrameworkDetermines whether a given argument is attacked by any arguments in the specified extension.- Specified by:
isAttackedin 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
ais 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:ArgumentationFrameworkRetrieves all the nodes (arguments) of this argumentation framework.- Specified by:
getNodesin 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:BeliefBaseReturns the signature of the language of this knowledge base.- Specified by:
getMinimalSignaturein 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
-