Package astra.lang
Class Debug
- java.lang.Object
-
- astra.core.Module
-
- astra.lang.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class astra.core.Module
Module.ACTION, Module.EVENT, Module.FORMULA, Module.SENSOR, Module.SUPPRESS_NOTIFICATIONS, Module.TERM
-
-
Constructor Summary
Constructors Constructor Description Debug()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandumpBeliefs()Action that dumps the agents beliefs to the console.booleandumpBeliefsWithPredicate(String predicate)Action that dumps the agents beliefs that match the given predicate to the console.booleaninline()Internal method indicating that methods in this API do not need to be threaded.booleanprintEventQueue()Action that dumps a stack trace for the current intention to the console.booleanprintStackTrace()Action that dumps a stack trace for the current intention to the console.
-
-
-
Method Detail
-
inline
public boolean inline()
Internal method indicating that methods in this API do not need to be threaded.
-
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
-
-