Class QueryProposition
java.lang.Object
org.tweetyproject.logics.pl.syntax.PlFormula
org.tweetyproject.logics.pl.syntax.Proposition
org.tweetyproject.action.query.syntax.QueryProposition
- All Implemented Interfaces:
Comparable<Proposition>
,Formula
,Atom
,ClassicalFormula
,Conjunctable
,Disjunctable
,Invertable
,ProbabilityAware
,SimpleLogicalFormula
- Direct Known Subclasses:
AlwaysQuery
,HoldsQuery
,NecessarilyQuery
Action 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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.tweetyproject.logics.commons.syntax.interfaces.Atom
Atom.AtomImpl, Atom.RETURN_SET_PREDICATE
-
Constructor Summary
ConstructorsConstructorDescriptionQueryProposition
(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 TypeMethodDescriptionReturns a new action signature containing all symbols of the inner formula of this proposition.Returns the set of all actions contained in this query proposition.Returns the inner formula of this query proposition, e.g.abstract QueryProposition
substitute
(Map<? extends Term<?>, ? extends 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 String
toString()
Methods inherited from class org.tweetyproject.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 org.tweetyproject.logics.pl.syntax.PlFormula
combineWithAnd, combineWithOr, complement, getModels, getPredicateCls, getPrimeImplicants, getUniformProbability, isClause, isConjunctiveClause, resolvableWith, resolveWith, toBlakeCanonicalForm, toDnf
Methods inherited from interface org.tweetyproject.logics.commons.syntax.interfaces.SimpleLogicalFormula
getPredicateCls
-
Constructor Details
-
QueryProposition
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 Details
-
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
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
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
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
- Overrides:
toString
in classProposition
-
getVariables
- Returns:
- all variables occurring in inner formulas and actions of this query proposition.
-