Package FAtiMA.Core

Class IntegrityValidator


  • public class IntegrityValidator
    extends java.lang.Object
    Class used to validate the integrity of information about the agent parsed at the begining. For example, among other things, this class verifies if the personality file does not reference an unspecified goal (it's not defined in the GoalLibrary)
    Author:
    Joao Dias
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void CheckSpeechAction​(Name actionName)
      Checks if a given action that corresponds to a SpeechAct is defined in the LanguageEngine or not.
      boolean FindUnreachableConditions​(java.lang.String objectName, java.util.ArrayList<Condition> conditions)
      Checks if the received conditions are unreachable.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IntegrityValidator

        public IntegrityValidator()
    • Method Detail

      • FindUnreachableConditions

        public boolean FindUnreachableConditions​(java.lang.String objectName,
                                                 java.util.ArrayList<Condition> conditions)
        Checks if the received conditions are unreachable. This means that one of the conditions cannot be achieved by any operator that the planner can use. Thus, such condition is impossible to make true. In this situation, a warning is given to the output, since this is likely a typo error when specifying the conditions (or one of the steps).
        Parameters:
        objectName - - the name of the object (usually goal or action) that specifies the conditions tested. This name is required for the warning if an unreacheable condition is found
        conditions - - the list of conditions to test if they are unreacheable
        Returns:
        true if any of the conditions received is unreacheable, false otherwise
      • CheckSpeechAction

        public void CheckSpeechAction​(Name actionName)
                               throws UnknownSpeechActException
        Checks if a given action that corresponds to a SpeechAct is defined in the LanguageEngine or not.
        Parameters:
        actionName - - the name of the speechAct to check if it is defined
        Throws:
        UnknownSpeechActException - - thrown if the received SpeechAct is not defined in the LanguageEngine