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 booleanChecks 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 Interpretationstatic InterpretationInterpretation fromSetsstatic 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 InterpretationofSatisfied(Argument argument) static InterpretationofUndecided(Argument argument) static InterpretationofUnsatisfied(Argument argument) 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.booleandefault 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
- 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 withi1for 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
argumentsinterpretations.- 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
-