Class QbPossibleWorld

    • Constructor Detail

      • QbPossibleWorld

        public QbPossibleWorld()
        Creates a new empty possible world.
      • QbPossibleWorld

        public QbPossibleWorld​(java.util.Collection<? extends Proposition> propositions)
        Creates a new possible world with the given set of propositions.
        Parameters:
        propositions - the propositions that are true in this possible world
    • Method Detail

      • satisfies

        public boolean satisfies​(PlFormula formula)
                          throws java.lang.IllegalArgumentException
        Checks whether this interpretation satisfies the given formula.
        Specified by:
        satisfies in interface Interpretation<PlBeliefSet,​PlFormula>
        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.
      • satisfies

        public boolean satisfies​(java.util.Collection<PlFormula> formulas)
                          throws java.lang.IllegalArgumentException
        Checks whether this interpretation satisfies the given formula.
        Specified by:
        satisfies in interface Interpretation<PlBeliefSet,​PlFormula>
        Overrides:
        satisfies in class AbstractInterpretation<PlBeliefSet,​PlFormula>
        Parameters:
        formulas - a collection of formulas.
        Returns:
        "true" if this interpretation satisfies all given formulas.
        Throws:
        java.lang.IllegalArgumentException - if at least one formula does not correspond to the expected language.
      • satisfies

        public boolean satisfies​(PlBeliefSet beliefBase)
                          throws java.lang.IllegalArgumentException
        Checks whether this interpretation satisfies the given formula.
        Specified by:
        satisfies in interface Interpretation<PlBeliefSet,​PlFormula>
        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.
      • getAllPossibleWorlds

        public static java.util.Set<QbPossibleWorld> getAllPossibleWorlds​(java.util.Collection<Proposition> signature)
        Returns the set of all possible worlds for the given propositional signature.
        Parameters:
        signature - a propositional signature.
        Returns:
        the set of all possible worlds for the given propositional signature.
      • getAllPossibleWorlds

        public static java.util.Set<QbPossibleWorld> getAllPossibleWorlds​(PlSignature signature)
        Returns the set of all possible worlds for the given propositional signature.
        Parameters:
        signature - a propositional signature.
        Returns:
        the set of all possible worlds for the given propositional signature.
      • substitute

        public java.util.Set<PlFormula> substitute​(PlFormula f,
                                                   Proposition v)
        Substitutes all occurrences of the proposition v with the possible truth values and returns a set of the possible substitutions.
        Parameters:
        f - a formula
        v - a proposition
        Returns:
        all possible substituted formulas
      • compareTo

        public int compareTo​(PossibleWorld o)
        Specified by:
        compareTo in interface java.lang.Comparable<PossibleWorld>