code.instr
Interface Instruction

All Known Implementing Classes:
Branch, CharModule.chrInstruction, CharModule.ordInstruction, Choice, Fail, FindallModule.FindallInstruction, IntModule.PrimIntCode, IOauxModule.appendFileInstruction, IOauxModule.appendToStreamInstruction, IOauxModule.readFileInstruction, IOauxModule.writeFileInstruction, IOModule.auxCatchFailInstruction, IOModule.GetCharInstruction, IOModule.PutCharInstruction, Load, MakeAnon, MakeChar, MakeFloat, MakeInt, MakePartial, MakeRef, MakeTerm, MakeVar, Narrow, Pop, Push, Replace, Residuate, StoreVar, SuccessModule.EqSuccessCode, SuccessModule.ParallelAndCode, SystemModule.applyCode, SystemModule.ensureNotFreeCode, SystemModule.eqGenericInstruction, SystemModule.normalizeInstruction, SystemModule.NotImplemented, SystemModule.seqCode, SystemModule.showInstruction

public interface Instruction

Interface of all the instructions of the virtual machine.

Several classes that implement this interface also define a static data member called singleton, which is an instance of the class itself. These classes are "Singleton"s in the sense that all the objects of these classes are the same and are "Immutable". Hence, there is no point in constructing many copies of the same object. The code generator must refer to this singleton object instead of creating new instances of the class.

Since:
June 17, 2003
Author:
Sergio Antoy

Method Summary
 void execute(Computation computation)
          This method executes whatever is intended by the Instruction.
 java.lang.String printAsTxtLoadable()
           
 

Method Detail

execute

void execute(Computation computation)
This method executes whatever is intended by the Instruction.

Parameters:
computation - The instruction is executed in the context of this Computation.

printAsTxtLoadable

java.lang.String printAsTxtLoadable()