Class QbPossibleWorld

  • All Implemented Interfaces:
    Comparable<net.sf.tweety.logics.pl.semantics.PossibleWorld>, Iterable<net.sf.tweety.logics.pl.syntax.Proposition>, Collection<net.sf.tweety.logics.pl.syntax.Proposition>, net.sf.tweety.commons.Interpretation<net.sf.tweety.logics.pl.syntax.PlBeliefSet,​net.sf.tweety.logics.pl.syntax.PlFormula>

    public class QbPossibleWorld
    extends net.sf.tweety.commons.InterpretationSet<net.sf.tweety.logics.pl.syntax.Proposition,​net.sf.tweety.logics.pl.syntax.PlBeliefSet,​net.sf.tweety.logics.pl.syntax.PlFormula>
    implements Comparable<net.sf.tweety.logics.pl.semantics.PossibleWorld>
    This class represents a possible world of quantified boolean logic, i.e. some set of propositions.
    Author:
    Anna Gessler, Matthias Thimm
    • Constructor Summary

      Constructors 
      Constructor Description
      QbPossibleWorld()
      Creates a new empty possible world.
      QbPossibleWorld​(Collection<? extends net.sf.tweety.logics.pl.syntax.Proposition> propositions)
      Creates a new possible world with the given set of propositions.
    • Method Summary

      Modifier and Type Method Description
      int compareTo​(net.sf.tweety.logics.pl.semantics.PossibleWorld o)  
      static Set<QbPossibleWorld> getAllPossibleWorlds​(Collection<net.sf.tweety.logics.pl.syntax.Proposition> signature)
      Returns the set of all possible worlds for the given propositional signature.
      static Set<QbPossibleWorld> getAllPossibleWorlds​(net.sf.tweety.logics.pl.syntax.PlSignature signature)
      Returns the set of all possible worlds for the given propositional signature.
      boolean satisfies​(Collection<net.sf.tweety.logics.pl.syntax.PlFormula> formulas)
      Checks whether this interpretation satisfies the given formula.
      boolean satisfies​(net.sf.tweety.logics.pl.syntax.PlBeliefSet beliefBase)
      Checks whether this interpretation satisfies the given formula.
      boolean satisfies​(net.sf.tweety.logics.pl.syntax.PlFormula formula)
      Checks whether this interpretation satisfies the given formula.
      Set<net.sf.tweety.logics.pl.syntax.PlFormula> substitute​(net.sf.tweety.logics.pl.syntax.PlFormula f, net.sf.tweety.logics.pl.syntax.Proposition v)
      Substitutes all occurrences of the proposition v with the possible truth values and returns a set of the possible substitutions.
      • Methods inherited from class net.sf.tweety.commons.InterpretationSet

        add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
    • Constructor Detail

      • QbPossibleWorld

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

        public QbPossibleWorld​(Collection<? extends net.sf.tweety.logics.pl.syntax.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​(net.sf.tweety.logics.pl.syntax.PlFormula formula)
                          throws IllegalArgumentException
        Checks whether this interpretation satisfies the given formula.
        Specified by:
        satisfies in interface net.sf.tweety.commons.Interpretation<net.sf.tweety.logics.pl.syntax.PlBeliefSet,​net.sf.tweety.logics.pl.syntax.PlFormula>
        Throws:
        IllegalArgumentException
      • satisfies

        public boolean satisfies​(Collection<net.sf.tweety.logics.pl.syntax.PlFormula> formulas)
                          throws IllegalArgumentException
        Checks whether this interpretation satisfies the given formula.
        Specified by:
        satisfies in interface net.sf.tweety.commons.Interpretation<net.sf.tweety.logics.pl.syntax.PlBeliefSet,​net.sf.tweety.logics.pl.syntax.PlFormula>
        Overrides:
        satisfies in class net.sf.tweety.commons.AbstractInterpretation<net.sf.tweety.logics.pl.syntax.PlBeliefSet,​net.sf.tweety.logics.pl.syntax.PlFormula>
        Throws:
        IllegalArgumentException
      • satisfies

        public boolean satisfies​(net.sf.tweety.logics.pl.syntax.PlBeliefSet beliefBase)
                          throws IllegalArgumentException
        Checks whether this interpretation satisfies the given formula.
        Specified by:
        satisfies in interface net.sf.tweety.commons.Interpretation<net.sf.tweety.logics.pl.syntax.PlBeliefSet,​net.sf.tweety.logics.pl.syntax.PlFormula>
        Throws:
        IllegalArgumentException
      • getAllPossibleWorlds

        public static Set<QbPossibleWorld> getAllPossibleWorlds​(Collection<net.sf.tweety.logics.pl.syntax.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 Set<QbPossibleWorld> getAllPossibleWorlds​(net.sf.tweety.logics.pl.syntax.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 Set<net.sf.tweety.logics.pl.syntax.PlFormula> substitute​(net.sf.tweety.logics.pl.syntax.PlFormula f,
                                                                        net.sf.tweety.logics.pl.syntax.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​(net.sf.tweety.logics.pl.semantics.PossibleWorld o)
        Specified by:
        compareTo in interface Comparable<net.sf.tweety.logics.pl.semantics.PossibleWorld>