|
GNU Prolog for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.prolog.vm.Interpreter
public final class Interpreter
This class represent interpreter, it should be used only from one thread If you need to use interpreter from two threads, create new interpreter from Environment
Nested Class Summary | |
---|---|
static class |
Interpreter.Goal
user level calls |
Field Summary | |
---|---|
protected VariableTerm[] |
variables
|
protected int |
variablesAmount
|
Constructor Summary | |
---|---|
protected |
Interpreter(Environment environment)
this constructor should not be used by client programs |
Method Summary | |
---|---|
void |
addSpecialUndo(gnu.prolog.vm.UndoData undoDatum)
add special undo |
void |
addVariableUndo(VariableTerm variable)
add variable undo |
int |
execute(Interpreter.Goal goal)
|
Object |
getContext(String key)
|
Environment |
getEnvironment()
get environment |
int |
getExitCode()
|
Tracer |
getTracer()
|
int |
getUndoPosition()
get current undo position |
BacktrackInfo |
peekBacktrackInfo()
peek top backtrack information |
BacktrackInfo |
popBacktrackInfo()
pop backtrack information |
void |
popBacktrackInfoUntil(BacktrackInfo cutPoint)
|
Interpreter.Goal |
prepareGoal(Term term)
prepare goal for execution |
void |
pushBacktrackInfo(BacktrackInfo bi)
push backtrack information |
Object |
putContext(String key,
Object contextValue)
|
int |
simpleUnify(Term t1,
Term t2)
unify two terms, no undo done |
void |
stop(Interpreter.Goal goal)
|
void |
undo(int position)
undo changes until this position |
int |
unify(Term t1,
Term t2)
unify two terms |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected VariableTerm[] variables
protected int variablesAmount
Constructor Detail |
---|
protected Interpreter(Environment environment)
environment
- Method Detail |
---|
public Environment getEnvironment()
getEnvironment
in interface HasEnvironment
public Tracer getTracer()
public Object putContext(String key, Object contextValue)
public Object getContext(String key)
public void pushBacktrackInfo(BacktrackInfo bi)
bi
- public BacktrackInfo popBacktrackInfo()
public void popBacktrackInfoUntil(BacktrackInfo cutPoint)
public BacktrackInfo peekBacktrackInfo()
public int getUndoPosition()
public void undo(int position)
position
- public void addVariableUndo(VariableTerm variable)
variable
- public void addSpecialUndo(gnu.prolog.vm.UndoData undoDatum)
undoDatum
- public int simpleUnify(Term t1, Term t2) throws PrologException
t1
- t2
-
PrologCode.SUCCESS_LAST
or PrologCode.FAIL
PrologException
public int unify(Term t1, Term t2) throws PrologException
t1
- t2
-
PrologCode.SUCCESS_LAST
or PrologCode.FAIL
PrologException
public Interpreter.Goal prepareGoal(Term term)
term
-
public int execute(Interpreter.Goal goal) throws PrologException
PrologException
public void stop(Interpreter.Goal goal)
public int getExitCode()
|
GNU Prolog for Java | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |