Algernon Software

org.algernon.aam
Class Tracer

java.lang.Object
  extended byorg.algernon.aam.Tracer

public class Tracer
extends Object

Tracer provides methods for tracing execution in the AAM.

See Also:
Processor

Field Summary
static int ALWAYS
          A trace level that always prints.
static LispValue ALWAYS_STRING
           
static int DEBUG
          A trace level for debugging.
static LispValue DEBUG_STRING
           
static int DETAIL
          Trace level that prints detailed information.
static LispValue DETAIL_STRING
           
private  Jatha f_lisp
           
private  boolean f_stepMode
           
protected  Processor m_processor
           
protected  Set m_rulesTraced
           
static int NORMAL
          Normal trace level.
static LispValue NORMAL_STRING
           
static int SILENT
          A trace level that is very quiet.
static LispValue SILENT_STRING
           
static int VERBOSE
          A little more detail than normal.
static LispValue VERBOSE_STRING
           
 
Constructor Summary
Tracer(Processor processor)
          Creates a new Tracer object.
 
Method Summary
 boolean getStepMode()
          Returns true if the tracer is in Step mode.
 boolean isRuleTraced(Rule rule)
          Returns true if the given rule is currently traced.
 void setStepMode(boolean newState)
          Turns Step mode on or off.
static int toInt(LispValue traceLevelString)
          Returns the given trace level as an int.
static LispValue toString(int traceLevel)
          Returns the given trace level as a LISP symbol.
protected  void trace(String message, boolean newline)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALWAYS

public static final int ALWAYS
A trace level that always prints.

See Also:
Constant Field Values

ALWAYS_STRING

public static LispValue ALWAYS_STRING

SILENT

public static final int SILENT
A trace level that is very quiet.

See Also:
Constant Field Values

SILENT_STRING

public static LispValue SILENT_STRING

NORMAL

public static final int NORMAL
Normal trace level.

See Also:
Constant Field Values

NORMAL_STRING

public static LispValue NORMAL_STRING

VERBOSE

public static final int VERBOSE
A little more detail than normal.

See Also:
Constant Field Values

VERBOSE_STRING

public static LispValue VERBOSE_STRING

DETAIL

public static final int DETAIL
Trace level that prints detailed information.

See Also:
Constant Field Values

DETAIL_STRING

public static LispValue DETAIL_STRING

DEBUG

public static final int DEBUG
A trace level for debugging. Don't use this unless you want a lot of detailed output.

See Also:
Constant Field Values

DEBUG_STRING

public static LispValue DEBUG_STRING

m_rulesTraced

protected Set m_rulesTraced

m_processor

protected Processor m_processor

f_lisp

private Jatha f_lisp

f_stepMode

private boolean f_stepMode
Constructor Detail

Tracer

public Tracer(Processor processor)
Creates a new Tracer object.

Method Detail

trace

protected void trace(String message,
                     boolean newline)

isRuleTraced

public boolean isRuleTraced(Rule rule)
Returns true if the given rule is currently traced.


toString

public static LispValue toString(int traceLevel)
Returns the given trace level as a LISP symbol. Returns null if it is not a valid trace level.


toInt

public static int toInt(LispValue traceLevelString)
Returns the given trace level as an int. Returns NORMAL if the input is not a valid trace level.


getStepMode

public boolean getStepMode()
Returns true if the tracer is in Step mode.
   (:TRACE :STEP) turns step mode on.
   (:TRACE :RUN)  turns it off.
 


setStepMode

public void setStepMode(boolean newState)
Turns Step mode on or off.
   (:TRACE :STEP) turns step mode on.
   (:TRACE :RUN)  turns it off.
 


Algernon Software