Interface Interpretation
public interface Interpretation
This class represents a three-valued interpretation of an Abstract
Dialectical Framework (ADF).
- Author:
- Mathias Hofer
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Interpretation.Builder
builder
(Collection<Argument> arguments) static Interpretation.Builder
default boolean
default boolean
containsAll
(Collection<Argument> arguments) default boolean
static Interpretation
static boolean
Checks if, and only if, the two valued assignments for both of the interpretations are the same, ignores differences in the undecided assignments.static Interpretation
extend
(Interpretation toExtend, Argument argument, boolean value) Extends the given interpretation by deciding a currently undecided argument.static Interpretation
static Interpretation
static Interpretation
Interpretation fromSetsstatic Interpretation
fromWitness
(Set<Literal> witness, PropositionalMapping mapping) Constructs a three-valued ADF interpretation from a witness of a propositional sat encoding.default boolean
isStrictSubsetOf
(Interpretation superset) default boolean
isStrictSupersetOf
(Interpretation subset) default boolean
isSubsetOf
(Interpretation superset) default boolean
isSupersetOf
(Interpretation subset) default int
Returns the number of decided arguments, i.e.static Interpretation
ofSatisfied
(Argument argument) static Interpretation
ofUndecided
(Argument argument) static Interpretation
ofUnsatisfied
(Argument argument) static Interpretation
static Iterator<Interpretation>
partials
(List<Argument> arguments, AbstractDialecticalFramework adf) Goes through all possible partial interpretations respecting the order of the given list of arguments.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 inrestriction
.boolean
default int
size()
Returns the number of arguments in this interpretation.toMap
(Interpretation interpretation) boolean
static Interpretation
union
(Interpretation i1, Interpretation i2) Creates the union of two disjunct interpretations.boolean
unsatisfied
(Argument arg)
-
Method Details
-
empty
- Parameters:
adf
- adf- Returns:
- Interpretation empty
-
fromMap
- 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
- i1i2
- i2- Returns:
- Interpretation union
- Throws:
IllegalArgumentException
- if the two interpretations are not disjunct
-
extend
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
- toExtendargument
- argumentvalue
- value- Returns:
- return value
-
fromSets
static Interpretation fromSets(Set<Argument> satisfied, Set<Argument> unsatisfied, Set<Argument> undecided) - Parameters:
satisfied
- satisfiedunsatisfied
- unsatisfiedundecided
- undecided- Returns:
- Interpretation fromSets
-
fromWitness
Constructs a three-valued ADF interpretation from a witness of a propositional sat encoding.- Parameters:
witness
- the propositional sat witnessmapping
- 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
- satisfiedunsatisfied
- unsatisfiedadf
- adf- Returns:
- Interpretation partial
-
toMap
- Parameters:
interpretation
- interpretation- Returns:
- Map
-
restrict
Creates a new interpretation with the same assignments as in the given interpretation, but only uses the arguments contained inrestriction
.- Parameters:
interpretation
- the interpretation to restrictrestriction
- the arguments that act as a restriction/filter- Returns:
- an interpretation which only contains arguments in
restriction
-
equalsTwoValued
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 interpretationi2
- an interpretation to be compared withi1
for the two-valued assignments- Returns:
- true iff the values of the decided arguments of both interpretations are the same
-
ofSatisfied
- Parameters:
argument
- argument- Returns:
- Interpretation ofSatisfied
-
ofUnsatisfied
- Parameters:
argument
- argument- Returns:
- Interpretation ofUnsatisfied
-
ofUndecided
- 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 interpretationsadf
- the contextual ADF- Returns:
- the partial interpretations
-
builder
- Parameters:
adf
- adf- Returns:
- Builder builder
-
builder
- Parameters:
arguments
- arguments- Returns:
- Builder builder
-
satisfied
- Parameters:
arg
- arg- Returns:
- satisfied
-
unsatisfied
- Parameters:
arg
- arg- Returns:
- unsatisfied
-
undecided
- Parameters:
arg
- arg- Returns:
- undecided
-
satisfied
- Returns:
- Set
-
unsatisfied
- Returns:
- Set
-
undecided
- Returns:
- Set
-
arguments
Returns the union ofsatisfied()
,unsatisfied()
andundecided()
. 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
- Parameters:
arguments
- arguments- Returns:
- containsAll
-
contains
- Parameters:
argument
- argument- Returns:
- contains
-
decided
- 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
- Parameters:
superset
- superset- Returns:
- isSubsetOf
-
isStrictSubsetOf
- Parameters:
superset
- superset- Returns:
- isStrictSubsetOf
-
isSupersetOf
- Parameters:
subset
- subset- Returns:
- isSupersetOf
-
isStrictSupersetOf
- Parameters:
subset
- subset- Returns:
- isStrictSupersetOf
-