Class AbaTheory<T extends Formula>

java.lang.Object
org.tweetyproject.arg.aba.syntax.AbaTheory<T>
Type Parameters:
T - is the type of the language that the ABA theory's rules range over
All Implemented Interfaces:
BeliefBase

public class AbaTheory<T extends Formula> extends Object implements BeliefBase
An implementation of Assumption Based Argumentation.
Author:
Nils Geilen (geilenn@uni-koblenz.de)
  • Constructor Details

    • AbaTheory

      public AbaTheory()
  • Method Details

    • getAllDeductions

      public Collection<Deduction<T>> getAllDeductions()
      Returns:
      all deductions that can be derived from this theory
    • getAllDeductions

      public Collection<Deduction<T>> getAllDeductions(Collection<Assumption<T>> assumptions)
      Parameters:
      assumptions - the set of assumptions used for the derivation
      Returns:
      all deductions that can be derived from this theory
    • getClosure

      public Collection<Assumption<T>> getClosure(Collection<Assumption<T>> assumptions)
      A closure is the set of assumptions that can be derived from a set of assumptions via inference rules.
      Parameters:
      assumptions - a set of assumptions
      Returns:
      the closure of assumptions
    • isClosed

      public boolean isClosed(Collection<Assumption<T>> assumptions)
      A set of assumptions is closed iff it equals its closure.
      Parameters:
      assumptions - a set of assumptions
      Returns:
      true iff the set of assumptions is closed under this argumentation theory
    • isFlat

      public boolean isFlat()
      An ABA theory is flat iff all subsets of its argumentation set are closed
      Returns:
      true iff the theory is flat
    • add

      public void add(Formula rule)
      Parameters:
      rule - an assumption or an inference rule or a negation that is added to the theory
    • add

      public void add(Formula... rules)
      Parameters:
      rules - assumptions or inference rules or negations that are added to the theory
    • addAssumption

      public void addAssumption(T assumption)
      Parameters:
      assumption - a formula that is used as an assumption in the theory
    • addNegation

      public void addNegation(T formula, T negation)
      Adds a negation of form not formula = negation
      Parameters:
      formula - a formula
      negation - it's complement
    • negates

      public boolean negates(T negation, T formula)
      Checks whether the given two formulas are negations of each other
      Parameters:
      formula - a formula
      negation - a formula
      Returns:
      true iff the two formulas are negations of each other
    • attacks

      public boolean attacks(Deduction<T> atter, T atted)
      Parameters:
      atter - the attacking deduction
      atted - the attacked assumption
      Returns:
      true iff atter attacks atted
    • getRules

      public Collection<InferenceRule<T>> getRules()
      Returns:
      the rules
    • getAssumptions

      public Collection<Assumption<T>> getAssumptions()
      Returns:
      the assumptions
    • getNegations

      public Collection<Negation<T>> getNegations()
      Returns:
      the negations
    • setAssumptions

      public void setAssumptions(Collection<Assumption<T>> assumptions)
      Parameters:
      assumptions - the assumptions to set
    • attacks

      public boolean attacks(Collection<Assumption<T>> attackers, Collection<Assumption<T>> attackeds)
      Checks whether a set of assumptions attacks another set of assumptions.
      Parameters:
      attackers - set of assumptions
      attackeds - set of assumptions
      Returns:
      true iff the first set of assumptions attacks the second set
    • defends

      public boolean defends(Collection<Assumption<T>> defendor, Assumption<T> defended)
      Checks whether a set of arguments defends an argument.
      Parameters:
      defendor - the defending set
      defended - the assumption which shall be defended
      Returns:
      true iff defendor defends defended
    • isConflictFree

      public boolean isConflictFree(Collection<Assumption<T>> ext)
      Checks whether a set of arguments is conflict-free.
      Parameters:
      ext - a set of arguments
      Returns:
      true iff ext is conflict-free
    • getAllExtensions

      public Collection<Collection<Assumption<T>>> getAllExtensions()
      Computes all possible extensions.
      Returns:
      the powerset of the assumptions
    • getAllConflictFreeExtensions

      public Collection<Collection<Assumption<T>>> getAllConflictFreeExtensions()
      Computes all context-free extensions.
      Returns:
      all context-free extensions
    • isAdmissible

      public boolean isAdmissible(AbaExtension<T> ext)
      Checks whether a set of arguments is admissible.
      Parameters:
      ext - the set
      Returns:
      true iff ext is admissible
    • getAllAdmissbleExtensions

      public Collection<AbaExtension<T>> getAllAdmissbleExtensions()
      Computes all admissible extensions.
      Returns:
      all admissible extensions
    • 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.
    • asDungTheory

      public DungTheory asDungTheory()
      Returns:
      a Dung Theory derived from this ABA theory
    • toString

      public String toString()
      Specified by:
      toString in interface BeliefBase
      Overrides:
      toString in class Object