Class PriestWorld
- java.lang.Object
-
- net.sf.tweety.commons.AbstractInterpretation<PlBeliefSet,PlFormula>
-
- net.sf.tweety.logics.pl.semantics.PriestWorld
-
- All Implemented Interfaces:
Interpretation<PlBeliefSet,PlFormula>
public class PriestWorld extends AbstractInterpretation<PlBeliefSet,PlFormula>
A three-valued interpretation for propositional logic from Priest's three valued logic (3VL) [Priest, G.: Logic of paradox. Journal of Philosophical Logic 8, 219-241 (1979)]. Every proposition gets one of three truth values: true, false, both.- Author:
- Matthias Thimm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPriestWorld.TruthValueThe three truth values.
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Proposition,PriestWorld.TruthValue>valuesThe truth values of the propositions.
-
Constructor Summary
Constructors Constructor Description PriestWorld()Creates a new world where all propositions get the truth value FALSE.
-
Method Summary
Modifier and Type Method Description PriestWorld.TruthValueget(Proposition p)Returns the truth value of the given proposition.java.util.Collection<Proposition>getBinarybase()Returns the binary base of this world, i.e.java.util.Collection<Proposition>getConflictbase()Returns the conflict base of this world, i.e.booleansatisfies(PlBeliefSet beliefBase)Checks whether this interpretation satisfies the given knowledge base.booleansatisfies(PlFormula formula)Checks whether this interpretation satisfies the given formula.PriestWorld.TruthValuesatisfies3VL(PlFormula formula)Determines the 3-valued truth value of the given formula.voidset(Proposition p, PriestWorld.TruthValue val)Sets the value of the given proposition.java.lang.StringtoString()-
Methods inherited from class net.sf.tweety.commons.AbstractInterpretation
satisfies
-
-
-
-
Field Detail
-
values
private java.util.Map<Proposition,PriestWorld.TruthValue> values
The truth values of the propositions.
-
-
Method Detail
-
set
public void set(Proposition p, PriestWorld.TruthValue val)
Sets the value of the given proposition.- Parameters:
p- some proposition.val- some truth value.
-
get
public PriestWorld.TruthValue get(Proposition p)
Returns the truth value of the given proposition.- Parameters:
p- a proposition- Returns:
- a truth value.
-
satisfies
public boolean satisfies(PlFormula formula) throws java.lang.IllegalArgumentException
Description copied from interface:InterpretationChecks whether this interpretation satisfies the given formula.- Parameters:
formula- a formula .- Returns:
- "true" if this interpretation satisfies the given formula.
- Throws:
java.lang.IllegalArgumentException- if the formula does not correspond to the expected language.
-
satisfies3VL
public PriestWorld.TruthValue satisfies3VL(PlFormula formula) throws java.lang.IllegalArgumentException
Determines the 3-valued truth value of the given formula.- Parameters:
formula- some formula- Returns:
- the 3-valued truth value of the formula.
- Throws:
java.lang.IllegalArgumentException- if the formula is of unknown type
-
getBinarybase
public java.util.Collection<Proposition> getBinarybase()
Returns the binary base of this world, i.e. the set of all propositions which are assigned either to TRUE or FALSE.- Returns:
- the binary base of this world.
-
getConflictbase
public java.util.Collection<Proposition> getConflictbase()
Returns the conflict base of this world, i.e. the set of all propositions which are assigned to BOTH.- Returns:
- the conflict base of this world.
-
satisfies
public boolean satisfies(PlBeliefSet beliefBase) throws java.lang.IllegalArgumentException
Description copied from interface:InterpretationChecks whether this interpretation satisfies the given knowledge base.- Parameters:
beliefBase- a knowledge base.- Returns:
- "true" if this interpretation satisfies the given knowledge base.
- Throws:
java.lang.IllegalArgumentException- IllegalArgumentException if the knowledgebase does not correspond to the expected language.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-