Interface Interpretation


public interface Interpretation
This class represents a three-valued interpretation of an Abstract Dialectical Framework (ADF).
Author:
Mathias Hofer
  • Method Details

    • empty

    • fromMap

      static Interpretation fromMap(Map<Argument,​Boolean> assignment)
    • fromSet

      static Interpretation fromSet(Set<Argument> satisfied, AbstractDialecticalFramework adf)
    • fromSets

      static Interpretation fromSets(Set<Argument> satisfied, Set<Argument> unsatisfied, AbstractDialecticalFramework adf)
    • union

      static Interpretation union(Interpretation i1, Interpretation i2)
      Creates the union of two disjunct interpretations.
      Parameters:
      i1 -
      i2 -
      Returns:
      Throws:
      IllegalArgumentException - if the two interpretations are not disjunct
    • extend

      static Interpretation extend(Interpretation toExtend, Argument argument, boolean value)
      Extends the given interpretation by deciding a currently undecided argument. If the argument is not undecided in the given interpretation, an exception is thrown.
      Parameters:
      toExtend - toExtend
      argument - argument
      value - value
      Returns:
      return value
    • fromSets

      static Interpretation fromSets(Set<Argument> satisfied, Set<Argument> unsatisfied, Set<Argument> undecided)
    • fromWitness

      static Interpretation fromWitness(Set<Literal> witness, PropositionalMapping mapping)
      Constructs a three-valued ADF interpretation from a witness of a propositional sat encoding.
      Parameters:
      witness - the propositional sat witness
      mapping - the mapping of the propositional variables and the adf
      Returns:
      an ADF interpretation
      Throws:
      NullPointerException - if any of the arguments are null
    • partial

      static Interpretation partial(Set<Argument> satisfied, Set<Argument> unsatisfied, AbstractDialecticalFramework adf)
    • toMap

      static Map<Argument,​Boolean> toMap(Interpretation interpretation)
    • restrict

      static Interpretation restrict(Interpretation interpretation, Collection<Argument> restriction)
      Creates a new interpretation with the same assignments as in the given interpretation, but only uses the arguments contained in restriction.
      Parameters:
      interpretation - the interpretation to restrict
      restriction - the arguments that act as a restriction/filter
      Returns:
      an interpretation which only contains arguments in restriction
    • equalsTwoValued

      static boolean equalsTwoValued(Interpretation i1, Interpretation i2)
      Checks if, and only if, the two valued assignments for both of the interpretations are the same, ignores differences in the undecided assignments.
      Parameters:
      i1 - an interpretation
      i2 - an interpretation to be compared with i1 for the two-valued assignments
      Returns:
      true iff the values of the decided arguments of both interpretations are the same
    • singleValued

      static Interpretation singleValued(Argument argument, boolean value, AbstractDialecticalFramework adf)
      Returns an interpretation relative to adf with a single truth value decided.

      This may be useful for some decision-level based algorithms.

      Parameters:
      argument - the argument to decide
      value - the value of the argument
      adf - the contextual ADF
      Returns:
      an interpretation with a single argument decided
    • partials

      static Iterator<Interpretation> partials(List<Argument> arguments, AbstractDialecticalFramework adf)
      Goes through all possible partial interpretations respecting the order of the given list of arguments.

      This returns exponentially many in the size of arguments interpretations.

      Parameters:
      arguments - the arguments for which we compute the interpretations
      adf - the contextual ADF
      Returns:
      the partial interpretations
    • builder

    • builder

      static Interpretation.Builder builder(Collection<Argument> arguments)
    • satisfied

      boolean satisfied(Argument arg)
    • unsatisfied

      boolean unsatisfied(Argument arg)
    • undecided

      boolean undecided(Argument arg)
    • satisfied

      Set<Argument> satisfied()
    • unsatisfied

      Set<Argument> unsatisfied()
    • undecided

      Set<Argument> undecided()
    • arguments

      Set<Argument> arguments()
      Returns the union of satisfied(), unsatisfied() and undecided(). Must not return additional arguments.
      Returns:
      all the assigned arguments
    • size

      default int size()
      Returns the number of arguments in this interpretation.
      Returns:
      the number of arguments
    • containsAll

      default boolean containsAll(Collection<Argument> arguments)
    • contains

      default boolean contains(Argument argument)
    • decided

      default boolean decided(Argument arg)
      Parameters:
      arg - some argument
      Returns:
      true iff the argument is either satisfied or unsatisfied
    • numDecided

      default int numDecided()
      Returns the number of decided arguments, i.e. satisfied or unsatisfied, in this interpretation.
      Returns:
      the number of decided arguments
    • isSubsetOf

      default boolean isSubsetOf(Interpretation superset)
    • isStrictSubsetOf

      default boolean isStrictSubsetOf(Interpretation superset)
    • isSupersetOf

      default boolean isSupersetOf(Interpretation subset)
    • isStrictSupersetOf

      default boolean isStrictSupersetOf(Interpretation subset)