Interface Interpretation
public interface Interpretation
This class represents a three-valued interpretation of an Abstract
Dialectical Framework (ADF).
- Author:
- Mathias Hofer
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Interpretation.Builderbuilder(Collection<Argument> arguments)static Interpretation.Builderdefault booleandefault booleancontainsAll(Collection<Argument> arguments)default booleanstatic Interpretationstatic booleanequalsTwoValued(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.static Interpretationextend(Interpretation toExtend, Argument argument, boolean value)Extends the given interpretation by deciding a currently undecided argument.static Interpretationstatic InterpretationfromSet(Set<Argument> satisfied, AbstractDialecticalFramework adf)static Interpretationstatic Interpretationstatic InterpretationfromWitness(Set<Literal> witness, PropositionalMapping mapping)Constructs a three-valued ADF interpretation from a witness of a propositional sat encoding.default booleanisStrictSubsetOf(Interpretation superset)default booleanisStrictSupersetOf(Interpretation subset)default booleanisSubsetOf(Interpretation superset)default booleanisSupersetOf(Interpretation subset)default intReturns the number of decided arguments, i.e.static Interpretationstatic Iterator<Interpretation>partials(List<Argument> arguments, AbstractDialecticalFramework adf)Goes through all possible partial interpretations respecting the order of the given list of arguments.static Interpretationrestrict(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.booleanstatic InterpretationsingleValued(Argument argument, boolean value, AbstractDialecticalFramework adf)Returns an interpretation relative toadfwith a single truth value decided.default intsize()Returns the number of arguments in this interpretation.toMap(Interpretation interpretation)booleanstatic Interpretationunion(Interpretation i1, Interpretation i2)Creates the union of two disjunct interpretations.booleanunsatisfied(Argument arg)
-
Method Details
-
empty
-
fromMap
-
fromSet
-
fromSets
static Interpretation fromSets(Set<Argument> satisfied, Set<Argument> unsatisfied, AbstractDialecticalFramework adf) -
union
Creates the union of two disjunct interpretations.- Parameters:
i1-i2-- Returns:
- 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
-
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) -
toMap
-
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 withi1for 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 toadfwith a single truth value decided.This may be useful for some decision-level based algorithms.
- Parameters:
argument- the argument to decidevalue- the value of the argumentadf- 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
argumentsinterpretations.- Parameters:
arguments- the arguments for which we compute the interpretationsadf- the contextual ADF- Returns:
- the partial interpretations
-
builder
-
builder
-
satisfied
-
unsatisfied
-
undecided
-
satisfied
-
unsatisfied
-
undecided
-
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
-
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
-
isStrictSubsetOf
-
isSupersetOf
-
isStrictSupersetOf
-