Interface Interpretation


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

    • empty

      Parameters:
      adf - adf
      Returns:
      Interpretation empty
    • fromMap

      static Interpretation fromMap(Map<Argument,Boolean> assignment)
      Parameters:
      assignment - assignment
      Returns:
      Interpretation fromMap
    • fromSets

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

      Creates the union of two disjunct interpretations.
      Parameters:
      i1 - i1
      i2 - i2
      Returns:
      Interpretation union
      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)
      Parameters:
      satisfied - satisfied
      unsatisfied - unsatisfied
      undecided - undecided
      Returns:
      Interpretation fromSets
    • 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)
      Parameters:
      satisfied - satisfied
      unsatisfied - unsatisfied
      adf - adf
      Returns:
      Interpretation partial
    • toMap

      static Map<Argument,Boolean> toMap(Interpretation interpretation)
      Parameters:
      interpretation - interpretation
      Returns:
      Map
    • 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
    • ofSatisfied

      static Interpretation ofSatisfied(Argument argument)
      Parameters:
      argument - argument
      Returns:
      Interpretation ofSatisfied
    • ofUnsatisfied

      static Interpretation ofUnsatisfied(Argument argument)
      Parameters:
      argument - argument
      Returns:
      Interpretation ofUnsatisfied
    • ofUndecided

      static Interpretation ofUndecided(Argument argument)
      Parameters:
      argument - argument
      Returns:
      Interpretation ofUndecided
    • 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

      Parameters:
      adf - adf
      Returns:
      Builder builder
    • builder

      static Interpretation.Builder builder(Collection<Argument> arguments)
      Parameters:
      arguments - arguments
      Returns:
      Builder builder
    • satisfied

      boolean satisfied(Argument arg)
      Parameters:
      arg - arg
      Returns:
      satisfied
    • unsatisfied

      boolean unsatisfied(Argument arg)
      Parameters:
      arg - arg
      Returns:
      unsatisfied
    • undecided

      boolean undecided(Argument arg)
      Parameters:
      arg - arg
      Returns:
      undecided
    • satisfied

      Set<Argument> satisfied()
      Returns:
      Set
    • unsatisfied

      Set<Argument> unsatisfied()
      Returns:
      Set
    • undecided

      Set<Argument> undecided()
      Returns:
      Set
    • 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)
      Parameters:
      arguments - arguments
      Returns:
      containsAll
    • contains

      default boolean contains(Argument argument)
      Parameters:
      argument - argument
      Returns:
      contains
    • 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)
      Parameters:
      superset - superset
      Returns:
      isSubsetOf
    • isStrictSubsetOf

      default boolean isStrictSubsetOf(Interpretation superset)
      Parameters:
      superset - superset
      Returns:
      isStrictSubsetOf
    • isSupersetOf

      default boolean isSupersetOf(Interpretation subset)
      Parameters:
      subset - subset
      Returns:
      isSupersetOf
    • isStrictSupersetOf

      default boolean isStrictSupersetOf(Interpretation subset)
      Parameters:
      subset - subset
      Returns:
      isStrictSupersetOf