Class NecessarilyQuery
- java.lang.Object
-
- net.sf.tweety.logics.pl.syntax.PlFormula
-
- net.sf.tweety.logics.pl.syntax.Proposition
-
- net.sf.tweety.action.query.syntax.QueryProposition
-
- net.sf.tweety.action.query.syntax.NecessarilyQuery
-
- 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
public class NecessarilyQuery extends QueryProposition
This class represents a necessarily query in the action query language S. Such queries have the following form: necessarily F after A_1 ; A_2 ; ... ; A_n where F is a state formula, and each A_i (0 < i < n+1) is an action.- Author:
- Sebastian Homann
-
-
Field Summary
-
Fields inherited from class net.sf.tweety.action.query.syntax.QueryProposition
formula
-
-
Constructor Summary
Constructors Constructor Description NecessarilyQuery(net.sf.tweety.logics.fol.syntax.FolFormula formula)Creates a new necessarily query with an empty action sequence.NecessarilyQuery(net.sf.tweety.logics.fol.syntax.FolFormula formula, List<FolAction> actions)Creates a new necessarily query with the given inner formula and list of actions.NecessarilyQuery(net.sf.tweety.logics.fol.syntax.FolFormula formula, FolAction action)Creates a new necessarily query with the given inner formula and a single action.
-
Method Summary
Modifier and Type Method Description List<FolAction>getActions()Returns the list of actions of this necessarily query in the correct order.ActionSignaturegetActionSignature()Returns a new action signature containing all symbols of the inner formula of this proposition.Set<FolAction>getInnerActions()Returns the set of all actions contained in this query proposition.Set<net.sf.tweety.logics.commons.syntax.Variable>getVariables()Returns all variables occuring in inner formulas and actions of this query proposition.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.StringtoString()-
Methods inherited from class net.sf.tweety.action.query.syntax.QueryProposition
getInnerFormula
-
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
-
NecessarilyQuery
public NecessarilyQuery(net.sf.tweety.logics.fol.syntax.FolFormula formula)
Creates a new necessarily query with an empty action sequence.- Parameters:
formula- the inner formula of this query.
-
NecessarilyQuery
public NecessarilyQuery(net.sf.tweety.logics.fol.syntax.FolFormula formula, List<FolAction> actions)Creates a new necessarily query with the given inner formula and list of actions.- Parameters:
formula- the inner formula of this necessarily query.actions- the action sequence of this necessarily query.
-
NecessarilyQuery
public NecessarilyQuery(net.sf.tweety.logics.fol.syntax.FolFormula formula, FolAction action)Creates a new necessarily query with the given inner formula and a single action.- Parameters:
formula- the inner formula of this necessarily query.action- a single action.
-
-
Method Detail
-
getActions
public List<FolAction> getActions()
Returns the list of actions of this necessarily query in the correct order.- Returns:
- the list of actions of this necessarily query in the correct order.
-
getActionSignature
public ActionSignature getActionSignature()
Description copied from class:QueryPropositionReturns a new action signature containing all symbols of the inner formula of this proposition.- Overrides:
getActionSignaturein classQueryProposition- Returns:
- a new action signature containing all symbols of the inner formula of this proposition.
-
substitute
public QueryProposition substitute(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> map)
Description copied from class:QueryPropositionReturns a new query proposition of the same type, in which all variables in inner formulas and actions are replaced according to the given map.- Specified by:
substitutein classQueryProposition- Parameters:
map- a map from variables to constants.- Returns:
- a new query proposition.
-
getInnerActions
public Set<FolAction> getInnerActions()
Description copied from class:QueryPropositionReturns the set of all actions contained in this query proposition. This is mainly a convenience function, as only necessarily propositions contain any actions.- Specified by:
getInnerActionsin classQueryProposition- Returns:
- the set of all actions contained in this query proposition.
-
getVariables
public Set<net.sf.tweety.logics.commons.syntax.Variable> getVariables()
Description copied from class:QueryPropositionReturns all variables occuring in inner formulas and actions of this query proposition.- Specified by:
getVariablesin classQueryProposition- Returns:
- all variables occuring in inner formulas and actions of this query proposition.
-
toString
public String toString()
- Specified by:
toStringin classQueryProposition
-
-