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:
  • "Pietro Baroni, Federico Cerutti, Massimiliano Giacomin, and Giovanni Guida. AFRA: Argumentation framework with recursive attacks. International Journal of Approximate Reasoning, 2011."
  • Constructor Details

    • RecursiveExtendedTheory

      public RecursiveExtendedTheory()
      Initializes a new empty recursive extended theory.
  • Method Details

    • isAttackRelation

      public boolean isAttackRelation(ExtendedAttack attack, DungEntity target)
      Determines whether 'attack' attacks 'target'.
      Parameters:
      attack - some extended attack
      target - some argument/attack
      Returns:
      "true" if 'attack' either directly attacks 'target' or recursively
    • getAttacked

      public Collection<DungEntity> getAttacked(ExtendedAttack attack)
      Computes the set of arguments/attacks attacked by 'attack'.
      Parameters:
      attack - some extended attack
      Returns:
      the set of elements attacked by 'attack'
    • isConflictFree

      public boolean isConflictFree(Collection<DungEntity> ext)
      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

      public boolean isAcceptable(DungEntity entity, Collection<DungEntity> ext)
      Determines whether 'ext' defends 'entity'.
      Parameters:
      entity - some argument/attack
      ext - some set of arguments/attacks
      Returns:
      "true" if 'entity' is defended by 'ext'
    • isAdmissible

      public boolean isAdmissible(Collection<DungEntity> ext)
      Determines whether 'ext' is admissible.
      Parameters:
      ext - some set of arguments/attacks
      Returns:
      "true" if 'ext' is admissible
    • isComplete

      public boolean isComplete(Collection<DungEntity> ext)
      Determines whether 'ext' is complete.
      Parameters:
      ext - some set of arguments/attacks
      Returns:
      "true" if 'ext' is complete
    • getAttackers

      public Collection<Argument> getAttackers(DungEntity entity)
      Computes the set of arguments that attack the given argument/attack.
      Parameters:
      entity - some argument/attack
      Returns:
      the set of arguments attacking 'entity'
    • getAttackers

      public Collection<Argument> getAttackers(Collection<DungEntity> entities)
      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

      public Collection<DungEntity> getAttacked(Argument arg)
      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

      public Collection<DungEntity> getAttacked(Collection<Argument> ext)
      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

      public boolean contains(Object o)
      Specified by:
      contains in interface Collection<Argument>
      Overrides:
      contains in class BeliefSet<Argument,DungSignature>
    • add

      public boolean add(Argument argument)
      Specified by:
      add in interface Collection<Argument>
      Overrides:
      add in class BeliefSet<Argument,DungSignature>
    • addAttack

      public boolean addAttack(Argument attacker, Argument attacked)
      Adds an attack between arguments to the theory.
      Parameters:
      attacker - some argument
      attacked - some argument
      Returns:
      "true" if the attack has been added successfully
    • addAttack

      public boolean addAttack(Argument attacker, ExtendedAttack attacked)
      Adds a recursive attack to the theory.
      Parameters:
      attacker - some argument
      attacked - some extended attack
      Returns:
      "true" if the attack has been added successfully
    • remove

      public boolean remove(Object o)
      Specified by:
      remove in interface Collection<Argument>
      Overrides:
      remove in class BeliefSet<Argument,DungSignature>
    • removeAll

      public boolean removeAll(Collection<?> c)
      Specified by:
      removeAll in interface Collection<Argument>
      Overrides:
      removeAll in class BeliefSet<Argument,DungSignature>
    • retainAll

      public boolean retainAll(Collection<?> c)
      Specified by:
      retainAll in interface Collection<Argument>
      Overrides:
      retainAll in class BeliefSet<Argument,DungSignature>
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<Argument>
      Overrides:
      clear in class BeliefSet<Argument,DungSignature>
    • isAttacked

      public boolean isAttacked(Argument a, Extension<? extends ArgumentationFramework<?>> ext)
      Description copied from interface: ArgumentationFramework
      Determines whether a given argument is attacked by any arguments in the specified extension.
      Specified by:
      isAttacked in interface ArgumentationFramework<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 extension ext, false otherwise.
    • isAttacked

      public boolean isAttacked(Argument a, Argument b)
      Determines whether 'a' is attacked by 'b'.
      Parameters:
      a - some argument
      b - some argument
      Returns:
      "true" if 'a' is attacked by 'b'
    • isAttacked

      public boolean isAttacked(ExtendedAttack a, Argument b)
      Determines whether 'a' is attacked by 'b'.
      Parameters:
      a - some extended attack
      b - some argument
      Returns:
      "true" if 'a' is attacked by 'b'
    • getNodes

      public Collection<Argument> getNodes()
      Description copied from interface: ArgumentationFramework
      Retrieves all the nodes (arguments) of this argumentation framework.
      Specified by:
      getNodes in interface ArgumentationFramework<Argument>
      Returns:
      a collection of all arguments (nodes) within this framework.
    • getAllAttacks

      public Collection<ExtendedAttack> getAllAttacks()
      Computes the set of all attacks in the theory.
      Returns:
      the set of all attacks in the theory
    • getMinimalSignature

      public Signature getMinimalSignature()
      Description copied from interface: BeliefBase
      Returns the signature of the language of this knowledge base.
      Specified by:
      getMinimalSignature in interface BeliefBase
      Returns:
      the signature of the language of this knowledge base.
    • prettyPrint

      public String prettyPrint()
      Pretty prints the recursive extended theory.
      Returns:
      string representation of the recursive extended theory