Class RankingFunctionThreeValued
java.lang.Object
org.tweetyproject.commons.AbstractInterpretation<ClBeliefSet,Conditional>
org.tweetyproject.logics.translators.adfrevision.RankingFunctionThreeValued
- All Implemented Interfaces:
Interpretation<ClBeliefSet,
Conditional>
A ranking function (or ordinal conditional function, OCF) that maps possible worlds
of a propositional language to integers.
Adapted from class "RankingFunction" for the use of Three Valued Logic
- Author:
- Jonas Schumacher
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRankingFunctionThreeValued
(PlSignature signature) Creates a new ranking function mapping each given interpretation to zero. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static boolean
Checks whether the given possible world w falsifies the given conditional (B|A), i.e.void
forceStrictness
(Set<PlFormula> formulas) Sets the rank of every interpretation i that does not satisfy the given set of formulas to RankingFunction.INFINITY.Returns all interpretations that are mapped to 0Returns all interpretations that are mapped to a rank unequal to INFINITY.Returns the signature of the first-order language this ranking function is defined on.boolean
Checkes whether this OCF is normalized, i.e.void
Normalizes this OCF, i.e.Gets the rank of the given formula.Gets the rank of the given possible world.boolean
satisfies
(ClBeliefSet beliefBase) Checks whether this interpretation satisfies the given knowledge base.boolean
satisfies
(Conditional formula) Checks whether this interpretation satisfies the given formula.static boolean
Checks whether the given possible world w satisfies the given conditional (B|A), i.e.void
setRank
(PriestWorldAdapted w, Integer value) Sets the rank for the given possible world.toString()
static boolean
Checks whether the given possible world w verifies the given conditional (B|A), i.e.Methods inherited from class org.tweetyproject.commons.AbstractInterpretation
satisfies
-
Field Details
-
INFINITY
Integer used to define infinity.
-
-
Constructor Details
-
RankingFunctionThreeValued
Creates a new ranking function mapping each given interpretation to zero.- Parameters:
signature
- the signature of the language this ranking function is defined on.
-
-
Method Details
-
rank
Gets the rank of the given possible world.- Parameters:
w
- an possible world.- Returns:
- the rank of the given possible world.
- Throws:
IllegalArgumentException
- if the given possible world has no rank in this ranking function.
-
setRank
Sets the rank for the given possible world.- Parameters:
w
- an possible world.value
- the rank for the possible world.
-
satisfies
Description copied from interface:Interpretation
Checks whether this interpretation satisfies the given formula.- Parameters:
formula
- a formula .- Returns:
- "true" if this interpretation satisfies the given formula.
- Throws:
IllegalArgumentException
- if the formula does not correspond to the expected language.
-
satisfies
Description copied from interface:Interpretation
Checks whether this interpretation satisfies the given knowledge base.- Parameters:
beliefBase
- a knowledge base.- Returns:
- "true" if this interpretation satisfies the given knowledge base.
-
forceStrictness
-
rank
Gets the rank of the given formula. Throws an IllegalArgumentException when the language of the formula does not correspond to the language of the interpretations this ranking function is defined on. Otherwise the rank of a formula is defined as the minimal rank of its satisfying interpretations.- Parameters:
formula
- a formula.- Returns:
- the rank of the given formula.
- Throws:
IllegalArgumentException
- if the languages of the formula does not correspond to the language of the interpretations this ranking function is defined on.
-
normalize
public void normalize()Normalizes this OCF, i.e. appropriately shifts the ranks such that the minimal rank equals zero. -
isNormalized
public boolean isNormalized()Checkes whether this OCF is normalized, i.e. whether its minimal rank value is zero.- Returns:
- "true" if this OCF is normalized
-
getPriestWorlds
Returns all interpretations that are mapped to a rank unequal to INFINITY.- Returns:
- all interpretations that are mapped to a rank unequal to INFINITY.
-
getPlausibleWorlds
Returns all interpretations that are mapped to 0- Returns:
- all interpretations that are mapped to 0
-
getSignature
Returns the signature of the first-order language this ranking function is defined on.- Returns:
- the signature of the first-order language this ranking function is defined on.
-
verifies
Checks whether the given possible world w verifies the given conditional (B|A), i.e. whether w satisfies A and B- Parameters:
w
- a possible worldc
- a conditional.- Returns:
- "true" if the given possible world verifies the given conditional.
-
falsifies
Checks whether the given possible world w falsifies the given conditional (B|A), i.e. whether w satisfies A and not B- Parameters:
w
- a possible worldc
- a conditional.- Returns:
- "true" if the given possible world falsifies the given conditional.
-
satisfies
Checks whether the given possible world w satisfies the given conditional (B|A), i.e. whether w does not falsify c.- Parameters:
w
- a possible worldc
- a conditional.- Returns:
- "true" if the given possible world satisfies the given conditional.
-
toString
-
equals
-