Interface ParsedDomain

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultParsedProblem

public interface ParsedDomain extends Serializable
This interface defined the methods of a planning domain read by the parser.
  • Method Details

    • getDomainName

      Symbol<String> getDomainName()
      Returns the name of the domain.
      Returns:
      the name of the domain.
    • setDomainName

      void setDomainName(Symbol<String> name)
      Sets a name to the domain.
      Parameters:
      name - the name to set.
    • getRequirements

      Set<RequireKey> getRequirements()
      Returns the set of requirements.
      Returns:
      the set of requirements.
    • addRequirement

      boolean addRequirement(RequireKey requirement)
      Adds a requirements to the domain.
      Parameters:
      requirement - the requirement to add.
      Returns:
      true if the requirement was added; false otherwise.
    • getTypes

      List<TypedSymbol<String>> getTypes()
      Returns the parsed types in the domain file.
      Returns:
      the parsed types in the domain file.
    • addType

      boolean addType(TypedSymbol<String> type)
      Adds a type to the domain.
      Parameters:
      type - the type to add.
      Returns:
      true if the type was added; false otherwise.
    • getConstants

      List<TypedSymbol<String>> getConstants()
      Returns the parsed constants in the domain file.
      Returns:
      the parsed constants in the domain file.
    • addConstant

      boolean addConstant(TypedSymbol<String> constant)
      Adds a constant to the domain.
      Parameters:
      constant - the constant to add.
      Returns:
      true if the constant was added; false otherwise.
    • getPredicates

      List<NamedTypedList> getPredicates()
      Returns the parsed predicates in the domain file.
      Returns:
      the parsed predicates in the domain file.
    • addPredicate

      boolean addPredicate(NamedTypedList predicate)
      Adds a predicate to the domain.
      Parameters:
      predicate - the predicate to add.
      Returns:
      true if the predicate was added; false otherwise.
      Throws:
      NullPointerException - if the specified predicate is null.
    • getFunctions

      List<NamedTypedList> getFunctions()
      Returns the parsed functions in the domain file.
      Returns:
      the parsed functions in the domain file.
    • addFunction

      boolean addFunction(NamedTypedList function)
      Adds a function to the domain.
      Parameters:
      function - the function to add.
      Returns:
      true if the function was added; false otherwise.
    • getTasks

      List<NamedTypedList> getTasks()
      Returns the parsed tasks un the domain file.
      Returns:
      the parsed tasks in the domain file.
    • addTask

      boolean addTask(NamedTypedList task)
      Adds a task to the domain.
      Parameters:
      task - the task to add.
      Returns:
      true if the task was added; false otherwise.
    • getConstraints

      Expression<String> getConstraints()
      Returns the constraints loaded in the domain file.
      Returns:
      the constraints loaded in the domain file or null if the domain has no constraints.
    • setConstraints

      void setConstraints(Expression<String> constraints)
      Sets the constraints to the domain.
      Parameters:
      constraints - the constraint of the domain.
    • getActions

      List<ParsedAction> getActions()
      Returns the list of parsed ops.
      Returns:
      the list of parsed ops.
    • addAction

      boolean addAction(ParsedAction action)
      Adds an action to the domain.
      Parameters:
      action - the action to add.
      Returns:
      true if the action was added; false otherwise.
    • getMethods

      List<ParsedMethod> getMethods()
      Returns the list of parsed methods.
      Returns:
      the list of parsed methods.
    • addMethod

      boolean addMethod(ParsedMethod method)
      Adds a method to the domain.
      Parameters:
      method - the method to add.
      Returns:
      true if the method was added; false otherwise.
    • getDerivesPredicates

      List<ParsedDerivedPredicate> getDerivesPredicates()
      Returns the list of parsed derived predicates.
      Returns:
      the list of parsed derived predicates.
    • addDerivedPredicate

      boolean addDerivedPredicate(ParsedDerivedPredicate predicate)
      Adds a derived predicate to the domain.
      Parameters:
      predicate - the derived predicate to add.
      Returns:
      true if the derived predicate was added; false otherwise.
      Throws:
      NullPointerException - if the specified predicate is null.
    • isDeclaredType

      boolean isDeclaredType(Symbol<String> type)
      Returns if a specified type symbol was declared.
      Parameters:
      type - the type symbol.
      Returns:
      true if the specified symbol is a declared type; false otherwise.
    • getType

      TypedSymbol<String> getType(Symbol<String> symbol)
      Returns the type from a specified symbol.
      Parameters:
      symbol - The symbol.
      Returns:
      the type from a specified symbol or null if no type with this symbol was declared.
    • isDeclaredConstant

      boolean isDeclaredConstant(Symbol<String> constant)
      Returns if a specified constant symbol was declared.
      Parameters:
      constant - the constant symbol.
      Returns:
      true if the specified symbol is a declared constant; false otherwise.
    • getConstant

      TypedSymbol<String> getConstant(Symbol<String> symbol)
      Returns the constant from a specified symbol.
      Parameters:
      symbol - The symbol.
      Returns:
      the constant from a specified symbol or null if no constant with this symbol was declared.
    • isSubType

      boolean isSubType(TypedSymbol<String> s1, TypedSymbol<String> s2)
      Returns if the types of two typed symbol matched, i.e., if the types of the first typed symbol can be viewed as a subtype of the second.
      Parameters:
      s1 - the first typed symbol.
      s2 - the second typed symbol.
      Returns:
      true if the types of the first typed symbol can be viewed as a subtype of the seconds. false otherwise.
    • normalize

      void normalize()
      Normalize the domain. This method rename the variables used in the domain and normalize its ops and derived predicates.
    • toString

      String toString()
      Returns a string representation of this domain.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this domain.