Class QueryProposition
- java.lang.Object
-
- net.sf.tweety.logics.pl.syntax.PlFormula
-
- net.sf.tweety.logics.pl.syntax.Proposition
-
- net.sf.tweety.action.query.syntax.QueryProposition
-
- All Implemented Interfaces:
Comparable<net.sf.tweety.logics.pl.syntax.Proposition>,net.sf.tweety.commons.Formula,net.sf.tweety.logics.commons.syntax.interfaces.Atom,net.sf.tweety.logics.commons.syntax.interfaces.ClassicalFormula,net.sf.tweety.logics.commons.syntax.interfaces.Conjunctable,net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable,net.sf.tweety.logics.commons.syntax.interfaces.Invertable,net.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAware,net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormula
- Direct Known Subclasses:
AlwaysQuery,HoldsQuery,NecessarilyQuery
public abstract class QueryProposition extends net.sf.tweety.logics.pl.syntax.PropositionAction queries are represented as propositional formulas with three possible types of propositions: holds, always and necessarily propositions. This class holds the common functionality of all these propositions.- Author:
- Sebastian Homann
-
-
Field Summary
Fields Modifier and Type Field Description protected net.sf.tweety.logics.fol.syntax.FolFormulaformula
-
Constructor Summary
Constructors Constructor Description QueryProposition(net.sf.tweety.logics.fol.syntax.FolFormula formula, String name)Creates a new query proposition with the given formula and a unique name, which is used by the base class.
-
Method Summary
Modifier and Type Method Description ActionSignaturegetActionSignature()Returns a new action signature containing all symbols of the inner formula of this proposition.abstract Set<FolAction>getInnerActions()Returns the set of all actions contained in this query proposition.net.sf.tweety.logics.fol.syntax.FolFormulagetInnerFormula()Returns the inner formula of this query proposition, e.g.abstract Set<net.sf.tweety.logics.commons.syntax.Variable>getVariables()Returns all variables occuring in inner formulas and actions of this query proposition.abstract QueryPropositionsubstitute(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> map)Returns a new query proposition of the same type, in which all variables in inner formulas and actions are replaced according to the given map.abstract StringtoString()-
Methods inherited from class net.sf.tweety.logics.pl.syntax.Proposition
addArgument, clone, collapseAssociativeFormulas, compareTo, equals, getArguments, getAtoms, getLiterals, getModels, getName, getPredicate, getPredicates, getSignature, hashCode, isComplete, isLiteral, numberOfOccurrences, replace, setPredicate, toCnf, toNnf, trim
-
Methods inherited from class net.sf.tweety.logics.pl.syntax.PlFormula
combineWithAnd, combineWithOr, complement, getModels, getPredicateCls, getPrimeImplicants, getUniformProbability, isClause, isConjunctiveClause, resolvableWith, resolveWith, toBlakeCanonicalForm, toDnf
-
-
-
-
Constructor Detail
-
QueryProposition
public QueryProposition(net.sf.tweety.logics.fol.syntax.FolFormula formula, String name)Creates a new query proposition with the given formula and a unique name, which is used by the base class.- Parameters:
formula- a state formula.name- a unique name.
-
-
Method Detail
-
getInnerFormula
public net.sf.tweety.logics.fol.syntax.FolFormula getInnerFormula()
Returns the inner formula of this query proposition, e.g. "F" in the case of a holds F proposition.- Returns:
- the inner formula of this query proposition
-
getActionSignature
public ActionSignature getActionSignature()
Returns a new action signature containing all symbols of the inner formula of this proposition.- Returns:
- a new action signature containing all symbols of the inner formula of this proposition.
-
getInnerActions
public abstract Set<FolAction> getInnerActions()
Returns the set of all actions contained in this query proposition. This is mainly a convenience function, as only necessarily propositions contain any actions.- Returns:
- the set of all actions contained in this query proposition.
-
substitute
public abstract QueryProposition substitute(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> map)
Returns a new query proposition of the same type, in which all variables in inner formulas and actions are replaced according to the given map.- Parameters:
map- a map from variables to constants.- Returns:
- a new query proposition.
-
toString
public abstract String toString()
- Overrides:
toStringin classnet.sf.tweety.logics.pl.syntax.Proposition
-
getVariables
public abstract Set<net.sf.tweety.logics.commons.syntax.Variable> getVariables()
Returns all variables occuring in inner formulas and actions of this query proposition.- Returns:
- all variables occuring in inner formulas and actions of this query proposition.
-
-