Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| GNU Prolog for Java
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.prolog.vm.interpreter.instruction
Class Instruction

    java.lang.Object
      gnu.prolog.vm.interpreter.instruction.Instruction

All Implemented Interfaces:
  Installable

Direct Known Subclasses:
  IAllocate, ICall, ICreateCompoundTerm, ICreateVariable, ICut, IDup, IFail, IJump, IPop, IPushArgument, IPushConstant, IPushEnvironment, IRestoreState, IReturn, ISaveCut, ISaveState, IStoreEnvironment, IThrow, ITrue, ITrustMe, IUnify, RetryInstruction

    public abstract class Instruction

extends Object
implements Installable

base call for instruction

Field Summary
`int` | `codePosition` code position of instruction

Constructor Summary
`Instruction()`

Method Summary
`abstract int` | `execute(ExecutionState state, BacktrackInfo bi)` execute instruction
`void` | `install(Environment env)` install instruction to environment
`void` | `uninstall(Environment env)` uninstall instruction from environment

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### codePosition

    public int codePosition

  code position of instruction

Constructor Detail

### Instruction

    public Instruction()

Method Detail

### execute

    public abstract int execute(ExecutionState state,
                                BacktrackInfo bi)
                         throws PrologException

  execute instruction

  Parameters:
    `state` - state within which instruction will be executed
    `bi` -
  Returns:
    ExecutionState.{BACKTRACK,NEXT,JUMP,RETURN}: instruction to caller how to execute next instruction
  Throws:
    `PrologException` - if code is throwing prolog exception

### install

    public void install(Environment env)

  install instruction to environment

  Specified by:
    `install` in interface `Installable`

### uninstall

    public void uninstall(Environment env)

  uninstall instruction from environment

  Specified by:
    `uninstall` in interface `Installable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| GNU Prolog for Java
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD