Package astra.lang

Class Debug


  • public class Debug
    extends Module
    Basic Debugging Support Tools.

    This class is highly experimental and is mainly used for debugging the interpreter rather than debugging actual ASTRA code. We have no idea whether these methods will actually be any use.

    Author:
    Rem Collier
    • Constructor Detail

      • Debug

        public Debug()
    • Method Detail

      • inline

        public boolean inline()
        Internal method indicating that methods in this API do not need to be threaded.
        Overrides:
        inline in class Module
      • dumpBeliefs

        public boolean dumpBeliefs()
        Action that dumps the agents beliefs to the console.
        Returns:
        true if the action was successful, false otherwise
      • dumpBeliefsWithPredicate

        public boolean dumpBeliefsWithPredicate​(String predicate)
        Action that dumps the agents beliefs that match the given predicate to the console.
        Parameters:
        predicate - the predicate used for matching
        Returns:
        true if the action was successful, false otherwise
      • printStackTrace

        public boolean printStackTrace()
        Action that dumps a stack trace for the current intention to the console.
        Returns:
        true if the action was successful, false otherwise
      • printEventQueue

        public boolean printEventQueue()
        Action that dumps a stack trace for the current intention to the console.
        Returns:
        true if the action was successful, false otherwise