Package FAtiMA.Core

Class ActionLibrary

  • All Implemented Interfaces:
    java.io.Serializable

    public class ActionLibrary
    extends java.lang.Object
    implements java.io.Serializable
    Author:
    Joao Dias Class that stores the STRIPS definition of the domain actions
    See Also:
    Serialized Form
    • Constructor Detail

      • ActionLibrary

        public ActionLibrary()
    • Method Detail

      • addAction

        public void addAction​(Step action)
      • checkIntegrity

        public void checkIntegrity​(IntegrityValidator val)
                            throws UnspecifiedVariableException,
                                   UnknownSpeechActException
        Checks the integrity of the Planner operators/Steps/actions. For instance it checks if a operator references a SpeechAct not defined, or if it uses a unbound variable (in effects or preconditions) not used in the operator's name
        Parameters:
        val - - the IntegrityValidator used to detect problems
        Throws:
        UnspecifiedVariableException - - thrown when the operator uses a unbound variable in the effects or preconditions without using the same variable in the step's name
        UnknownSpeechActException - - thrown when the operator references a SpeechAct not defined
      • getAction

        public Step getAction​(int id,
                              Name actionName)
      • getAction

        public Step getAction​(java.lang.String name)
        Gets the operator that corresponds to the given name
        Parameters:
        name - - the name of the step to get
        Returns:
        the searched step if it is found, null otherwise
      • getActions

        public java.util.ArrayList<Step> getActions()