|
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.InterpretedCodeCompiler
public class InterpretedCodeCompiler
compiler from predicate to interpreted code This version assume following
| Field Summary | |
|---|---|
protected int |
allocatedReserved
number of already allocated reserved variables |
static CompoundTermTag |
catchTag
catch tag |
protected List<Instruction> |
code
code so far compiled |
protected CompoundTermTag |
codeTag
this predicate tag |
protected int |
currentCodePosition
current code position |
protected List<Integer> |
cutPositionStack
cut position stack |
static ExceptionHandlerInfo[] |
exceptionHandlerArrayConstant
array type constant ExceptionHandlerInfo.class |
protected List<ExceptionHandlerInfo> |
exceptionHandlers
exception handlers |
static Instruction[] |
instructionArrayConstant
array type constant for Instruction.class |
protected int |
numberOfReserved
number of reserved fields, one position for saving cut |
protected List<Term> |
passedClauses
clauses to compile |
static CompoundTermTag |
throwTag
throw tag |
static CompoundTermTag |
unifyTag
unify tag |
protected Map<Term,Integer> |
variableToEnvironmentIndex
mapping from variables to environment indexes |
| Constructor Summary | |
|---|---|
InterpretedCodeCompiler(List<Term> clauses)
a constructor |
|
| Method Summary | |
|---|---|
protected int |
allocReserved()
|
static PrologCode |
compile(List<Term> passedClauses)
compile set of clauses to interpreted code |
static Term |
rdereferenced(Term term)
recursively dereference term |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final CompoundTermTag unifyTag
public static final CompoundTermTag throwTag
public static final CompoundTermTag catchTag
public static final Instruction[] instructionArrayConstant
public static final ExceptionHandlerInfo[] exceptionHandlerArrayConstant
protected List<Instruction> code
protected List<ExceptionHandlerInfo> exceptionHandlers
protected int currentCodePosition
protected int allocatedReserved
protected Map<Term,Integer> variableToEnvironmentIndex
protected CompoundTermTag codeTag
protected int numberOfReserved
protected List<Integer> cutPositionStack
protected List<Term> passedClauses
| Constructor Detail |
|---|
public InterpretedCodeCompiler(List<Term> clauses)
clauses - | Method Detail |
|---|
protected int allocReserved()
public static Term rdereferenced(Term term)
term - to be recursively dereferenced
public static PrologCode compile(List<Term> passedClauses)
throws PrologException
passedClauses - clauses passed to compiler
PrologException
|
GNU Prolog for Java | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||