Class ExtendedTheory
java.lang.Object
org.tweetyproject.commons.BeliefSet<Argument, DungSignature>
org.tweetyproject.arg.extended.syntax.ExtendedTheory
- All Implemented Interfaces:
Iterable<Argument>,Collection<Argument>,ArgumentationFramework<Argument>,BeliefBase
public class ExtendedTheory
extends BeliefSet<Argument, DungSignature>
implements ArgumentationFramework<Argument>, Collection<Argument>
Implementation of extended argumentation frameworks in the sense of Modgil
- Author:
- Lars Bengel
- See Also:
-
Field Summary
Fields inherited from class org.tweetyproject.commons.BeliefSet
EQUALS_USES_SIGNATURE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanAdds an attack to the theorybooleanAdds an attack to the theoryvoidclear()booleanbooleanexistsReinstatementSet(Argument a, Argument b, Collection<Argument> S) Determines whether there exists a reinstatement set for the attack (a,b)flatten()Transforms the extended theory into a standard dung theory by flattening the extended attacks via creating meta-argumentsComputes the set of all attacks in the theorygetAttacked(Collection<Argument> ext) Computes the set of Arguments/Attacks attacked by 'ext'getAttacked(Argument argument) Computes the set of Arguments/Attacks attacked by 'argument'getAttackers(Collection<DungEntity> entities) Computes the set of attackers of 'entities'getAttackers(Argument argument) Computes the set of attackers of 'argument'getAttackers(Attack attack) Computes the set of attackers of 'attack'Computes the set of all binary attacks, i.e., the attacks between argumentsComputes the set of all extended attack, i.e., the attacks from arguments to attacksReturns the signature of the language of this knowledge base.getNodes()Retrieves all the nodes (arguments) of this argumentation framework.getReinstatementSet(Argument a, Argument b, Collection<Argument> S) Computes the reinstatement set for the attack (a,b)booleanisAcceptable(Argument arg, Collection<Argument> ext) Determines whether the argument 'arg' is defended by the set 'ext'booleanisAdmissible(Collection<Argument> ext) Determines whether 'ext' is admissible, i.e., conflict-free and defends all its argumentsbooleanisAttacked(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' in the theorybooleanisAttacked(Attack a, Argument b) Determines whether 'a' is attacked by 'b' in the theorybooleanisComplete(Collection<Argument> ext) Determines whether 'ext' is complete, i.e., admissible and contains all arguments defended by itbooleanisConflictFree(Collection<Argument> ext) Determines whether the given set of arguments contains no conflicts, i.e., there are no attacks between any of its membersbooleanisReinstatementSet(Collection<Attack> W, Argument a, Argument b, Collection<Argument> S) Determines whether 'W' is a reinstatement set for the attack (a,b) A set of attacks W is a reinstatement set for an attack (a,b) iff (a,b) is an attack undisturbed by the set S and W contains all attack originating from S necessary to reinstate the attack (a,b) against all its attacksbooleanisUndisturbedAttack(Argument a, Argument b, Collection<Argument> ext) Determines whether there is an undisturbed attack from 'a' to 'b' given 'ext', i.e., whether 'a' attacks 'b' and there is no extended attack from some element of 'ext' onto the attack (a,b)booleanisUndisturbedAttack(Attack att, Collection<Argument> ext) Determines whether there is an undisturbed attack from 'a' to 'b' given 'ext', i.e., whether 'a' attacks 'b' and there is no extended attack from some element of 'ext' onto the attack (a,b)minimizeReinstatementSet(Collection<Attack> W, Argument a, Argument b, Collection<Argument> S) Minimizes the given Reinstatement set for (a,b)Pretty Prints the extended theorybooleanbooleanremoveAll(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
-
ExtendedTheory
public ExtendedTheory()Initializes an empty Extended Theory
-
-
Method Details
-
isConflictFree
Determines whether the given set of arguments contains no conflicts, i.e., there are no attacks between any of its members- Parameters:
ext- some set of arguments- Returns:
- "true" if there is no attack between any of the arguments
-
isUndisturbedAttack
Determines whether there is an undisturbed attack from 'a' to 'b' given 'ext', i.e., whether 'a' attacks 'b' and there is no extended attack from some element of 'ext' onto the attack (a,b)- Parameters:
a- some argumentb- some argumentext- some set of arguments- Returns:
- "true" if 'a' attacks 'b' undisturbed given 'ext'
-
isUndisturbedAttack
Determines whether there is an undisturbed attack from 'a' to 'b' given 'ext', i.e., whether 'a' attacks 'b' and there is no extended attack from some element of 'ext' onto the attack (a,b)- Parameters:
att- some attack (a,b)ext- some set of arguments- Returns:
- "true" if 'a' attacks 'b' undisturbed given 'ext'
-
isReinstatementSet
public boolean isReinstatementSet(Collection<Attack> W, Argument a, Argument b, Collection<Argument> S) Determines whether 'W' is a reinstatement set for the attack (a,b) A set of attacks W is a reinstatement set for an attack (a,b) iff (a,b) is an attack undisturbed by the set S and W contains all attack originating from S necessary to reinstate the attack (a,b) against all its attacks- Parameters:
W- some set of attacksa- some argumentb- some argumentS- some set of arguments- Returns:
- "true" iff 'W' is a reinstatement for (a,b)
-
minimizeReinstatementSet
public Collection<Attack> minimizeReinstatementSet(Collection<Attack> W, Argument a, Argument b, Collection<Argument> S) Minimizes the given Reinstatement set for (a,b)- Parameters:
W- some set of attacksa- some argumentb- some argumentS- some set of arguments- Returns:
- the minimal reinstatement set for (a,b)
-
getReinstatementSet
Computes the reinstatement set for the attack (a,b)- Parameters:
a- some argumentb- some argumentS- a set of arguments- Returns:
- a reinstatement set for the attack (a,b); null if none exists
-
existsReinstatementSet
Determines whether there exists a reinstatement set for the attack (a,b)- Parameters:
a- some argumentb- some argumentS- a set of arguments- Returns:
- "true" iff there exists a reinstatement set for the attack (a,b)
-
isAcceptable
Determines whether the argument 'arg' is defended by the set 'ext'- Parameters:
arg- some argumentext- some set of arguments- Returns:
- "true" iff 'arg' is defended by 'ext'
-
isAdmissible
Determines whether 'ext' is admissible, i.e., conflict-free and defends all its arguments- Parameters:
ext- some set of arguments- Returns:
- "true" iff 'ext' is admissible
-
isComplete
Determines whether 'ext' is complete, i.e., admissible and contains all arguments defended by it- Parameters:
ext- some set of arguments- Returns:
- "true" iff 'ext' is complete
-
getAttackers
Computes the set of attackers of 'attack'- Parameters:
attack- some attack- Returns:
- the attackers of 'attack'
-
getAttackers
Computes the set of attackers of 'argument'- Parameters:
argument- some argument- Returns:
- the attackers of 'argument'
-
getAttackers
Computes the set of attackers of 'entities'- Parameters:
entities- a set of arguments and attacks- Returns:
- the attackers of 'entities'
-
getAttacked
Computes the set of Arguments/Attacks attacked by 'argument'- Parameters:
argument- some argument- Returns:
- the set of Arguments/Attacks attacked by 'argument'
-
getAttacked
Computes the set of Arguments/Attacks attacked by 'ext'- Parameters:
ext- some set of arguments- Returns:
- the set of Arguments/Attacks attacked by 'ext'
-
flatten
Transforms the extended theory into a standard dung theory by flattening the extended attacks via creating meta-arguments- Returns:
- the flattened theory
-
contains
- Specified by:
containsin interfaceCollection<Argument>- Overrides:
containsin classBeliefSet<Argument, DungSignature>
-
add
- Specified by:
addin interfaceCollection<Argument>- Overrides:
addin classBeliefSet<Argument, DungSignature>
-
addAttack
-
addAttack
-
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
-
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 of the theory
-
getExtendedAttacks
Computes the set of all extended attack, i.e., the attacks from arguments to attacks- Returns:
- the set of extended attacks of the theory
-
getBinaryAttacks
Computes the set of all binary attacks, i.e., the attacks between arguments- Returns:
- the set of binary attacks of 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 extended theory- Returns:
- a string representation of the extended theory
-