Class QbPossibleWorld
- java.lang.Object
-
- net.sf.tweety.commons.AbstractInterpretation<B,S>
-
- 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>
-
- net.sf.tweety.logics.qbf.semantics.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 intcompareTo(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.booleansatisfies(Collection<net.sf.tweety.logics.pl.syntax.PlFormula> formulas)Checks whether this interpretation satisfies the given formula.booleansatisfies(net.sf.tweety.logics.pl.syntax.PlBeliefSet beliefBase)Checks whether this interpretation satisfies the given formula.booleansatisfies(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, add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
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 IllegalArgumentExceptionChecks whether this interpretation satisfies the given formula.- Specified by:
satisfiesin interfacenet.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:
satisfiesin interfacenet.sf.tweety.commons.Interpretation<net.sf.tweety.logics.pl.syntax.PlBeliefSet,net.sf.tweety.logics.pl.syntax.PlFormula>- Overrides:
satisfiesin classnet.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 IllegalArgumentExceptionChecks whether this interpretation satisfies the given formula.- Specified by:
satisfiesin interfacenet.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 formulav- a proposition- Returns:
- all possible substituted formulas
-
compareTo
public int compareTo(net.sf.tweety.logics.pl.semantics.PossibleWorld o)
- Specified by:
compareToin interfaceComparable<net.sf.tweety.logics.pl.semantics.PossibleWorld>
-
-