Package net.sf.tweety.action.signature
Class ActionSignature
- java.lang.Object
- 
- net.sf.tweety.commons.QuadrupleSetSignature<Constant,Predicate,Functor,Sort>
- 
- net.sf.tweety.logics.fol.syntax.FolSignature
- 
- net.sf.tweety.action.signature.ActionSignature
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- Signature
 
 public class ActionSignature extends FolSignature This class represents an action signature consisting of a set of fluent names and a set of action names. These are represented by first order predicates to allow for the simple implementation of a grounding mechanism.- Author:
- Sebastian Homann
 
- 
- 
Constructor SummaryConstructors Constructor Description ActionSignature()Creates an empty signatureActionSignature(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.
 - 
Method SummaryModifier and Type Method Description booleancontainsActionName(java.lang.String actionName)Returns true iff the given actionName is contained in this action signature.booleancontainsActionName(FolActionName actionName)Returns true iff the given actionName is contained in this signature.booleancontainsFluentName(java.lang.String fluentName)Returns true iff the given fluentName is contained in this action signature.booleancontainsFluentName(FolFluentName fluentName)Returns true iff the given fluentName is contained in this signature.booleancontainsPredicate(Predicate predicate)Returns true iff the given predicate is contained in this signature.FolActionNamegetActionName(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.FolFluentNamegetFluentName(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.booleanisValidFormula(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.StringtoString()Returns a string representation of this first-order logic signature.- 
Methods inherited from class net.sf.tweety.logics.fol.syntax.FolSignatureadd, addAll, clone, contains, containsConstant, containsFunctor, containsPredicate, containsSort, getConstant, getConstants, getFunctor, getFunctors, getPredicate, getPredicates, getSort, getSorts, isRepresentable, remove
 - 
Methods inherited from class net.sf.tweety.commons.QuadrupleSetSignatureadd, addSignature, clear, equals, hashCode, isEmpty, isOverlappingSignature, isSubSignature, removeAll
 
- 
 
- 
- 
- 
Constructor Detail- 
ActionSignaturepublic ActionSignature() Creates an empty signature
 - 
ActionSignaturepublic ActionSignature(java.util.Collection<?> c) throws java.lang.IllegalArgumentExceptionCreates a signature with the given objects (should be sorts, constants, predicates or formulas).- Parameters:
- c- a collection of items to be added.
- Throws:
- java.lang.IllegalArgumentException- if at least one of the given objects is neither a constant, a sort, a predicate or a formula.
 
 - 
ActionSignaturepublic ActionSignature(FolFormula f) Creates a new Action Signature for a single first order formula.- Parameters:
- f- a FOL formula
 
 
- 
 - 
Method Detail- 
getActionNamespublic java.util.Set<FolActionName> getActionNames() Returns the set of action names contained in this action signature.- Returns:
- the set of action names contained in this action signature.
 
 - 
getFluentNamespublic java.util.Set<FolFluentName> getFluentNames() Returns the set of fluent names contained in this action signature.- Returns:
- the set of fluent names contained in this action signature.
 
 - 
isValidFormulapublic 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.- Parameters:
- f- the formula in question.
- Returns:
- true iff the given formula is a FolFormula, contains only atoms with fluent or action-predicates and contains no quantifiers or functors.
 
 - 
toStringpublic java.lang.String toString() Description copied from class:FolSignatureReturns a string representation of this first-order logic signature.- Specified by:
- toStringin interface- Signature
- Overrides:
- toStringin class- FolSignature
- Returns:
- a string consisting of the sorts with their constants followed by the predicates and functors of the signature.
 
 - 
containsActionNamepublic boolean containsActionName(java.lang.String actionName) Returns true iff the given actionName is contained in this action signature.- Parameters:
- actionName- an action name
- Returns:
- true iff actionName is contained in this signature.
 
 - 
containsFluentNamepublic boolean containsFluentName(java.lang.String fluentName) Returns true iff the given fluentName is contained in this action signature.- Parameters:
- fluentName- a fluent name
- Returns:
- true iff fluentName is contained in this action signature.
 
 - 
getActionNamepublic FolActionName getActionName(java.lang.String action) Returns the action name predicate with the given name if one exists, null otherwise.- Parameters:
- action- an action
- Returns:
- the actionName predicate with the given name or null
 
 - 
getFluentNamepublic FolFluentName getFluentName(java.lang.String fluentName) Returns the fluent name predicate with the given name if one exists, null otherwise.- Parameters:
- fluentName- a string
- Returns:
- the fluent predicate with the given name or null
 
 - 
containsActionNamepublic boolean containsActionName(FolActionName actionName) Returns true iff the given actionName is contained in this signature.- Parameters:
- actionName- a FOL action name
- Returns:
- true iff the given actionName is contained in this signature.
 
 - 
containsFluentNamepublic boolean containsFluentName(FolFluentName fluentName) Returns true iff the given fluentName is contained in this signature.- Parameters:
- fluentName- a string
- Returns:
- true iff the given fluentName is contained in this signature.
 
 - 
containsPredicatepublic boolean containsPredicate(Predicate predicate) Returns true iff the given predicate is contained in this signature.- Parameters:
- predicate- some predicate
- Returns:
- true iff the given predicate is contained in this signature.
 
 - 
getAllGroundedFluentAtomspublic java.util.Set<FolAtom> getAllGroundedFluentAtoms() Returns the set of all possible grounded atoms in this signature on the basis of all fluent predicates contained.- Returns:
- the set of all possible grounded fluent atoms.
 
 - 
getAllGroundedActionNameAtomspublic 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.- Returns:
- the set of all possible grounded action atoms.
 
 
- 
 
-