public class ActionSignature extends FolSignature
Constructor and Description |
---|
ActionSignature()
Creates an empty signature
|
ActionSignature(java.util.Collection<?> c)
Creates a signature with the given objects (should be sorts, constants,
predicates or formulas).
|
ActionSignature(FolFormula f)
Creates a new Action Signature for a single first order formula.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsActionName(FolActionName actionName)
Returns true iff the given actionName is contained in this signature.
|
boolean |
containsActionName(java.lang.String actionName)
Returns true iff the given actionName is contained in this action
signature.
|
boolean |
containsFluentName(FolFluentName fluentName)
Returns true iff the given fluentName is contained in this signature.
|
boolean |
containsFluentName(java.lang.String fluentName)
Returns true iff the given fluentName is contained in this action
signature.
|
boolean |
containsPredicate(Predicate predicate)
Returns true iff the given predicate is contained in this signature.
|
FolActionName |
getActionName(java.lang.String action)
Returns the action name predicate with the given name if one exists, null
otherwise.
|
java.util.Set<FolActionName> |
getActionNames()
Returns the set of action names contained in this action signature.
|
java.util.Set<FOLAtom> |
getAllGroundedActionNameAtoms()
Returns the set of all possible grounded atoms in this signature on the
basis of all action name predicates contained.
|
java.util.Set<FOLAtom> |
getAllGroundedFluentAtoms()
Returns the set of all possible grounded atoms in this signature on the
basis of all fluent predicates contained.
|
FolFluentName |
getFluentName(java.lang.String fluentName)
Returns the fluent name predicate with the given name if one exists, null
otherwise.
|
java.util.Set<FolFluentName> |
getFluentNames()
Returns the set of fluent names contained in this action signature.
|
boolean |
isValidFormula(Formula f)
Checks, if a given formula is valid in the sense of an action description,
containing only predicates that are either fluentnames or actionnames and
containing neither quantifiers nor functions.
|
java.lang.String |
toString()
Returns a string representation of the first-order logic signature.
|
add, addAll, addSignature, containsConstant, containsFunctor, containsPredicate, containsSort, equals, getConstant, getConstants, getFunctor, getFunctors, getPredicate, getPredicates, getSort, getSorts, hashCode, isOverlappingSignature, isRepresentable, isSubSignature
public ActionSignature()
public ActionSignature(java.util.Collection<?> c) throws java.lang.IllegalArgumentException
c
- a collection of items to be added.java.lang.IllegalArgumentException
- if at least one of the given objects is
neither a constant, a sort, a predicate or a formula.public ActionSignature(FolFormula f)
f
- public java.util.Set<FolActionName> getActionNames()
public java.util.Set<FolFluentName> getFluentNames()
public boolean isValidFormula(Formula f)
f
- the formula in question.public java.lang.String toString()
FolSignature
toString
in class FolSignature
public boolean containsActionName(java.lang.String actionName)
actionName
- an action namepublic boolean containsFluentName(java.lang.String fluentName)
fluentName
- a fluent namepublic FolActionName getActionName(java.lang.String action)
action
- an actionpublic FolFluentName getFluentName(java.lang.String fluentName)
fluentName
- public boolean containsActionName(FolActionName actionName)
actionName
- public boolean containsFluentName(FolFluentName fluentName)
fluentName
- public boolean containsPredicate(Predicate predicate)
predicate
- public java.util.Set<FOLAtom> getAllGroundedFluentAtoms()
public java.util.Set<FOLAtom> getAllGroundedActionNameAtoms()