code.instr
Class Choice

java.lang.Object
  extended by code.instr.Choice
All Implemented Interfaces:
Instruction

public class Choice
extends java.lang.Object
implements Instruction

Execute a non-deterministic step. This instruction is executed when a narrex has multiple replacements. All the replacements are on the pre-term stack at the time the instruction is executed. The current computation is abandoned. A new computation is created and started for each replacement.

Since:
June 17, 2003
Author:
Sergio Antoy

Field Summary
static Choice singleton
           
 
Constructor Summary
private Choice()
           
 
Method Summary
 void execute(Computation computation)
          This method executes whatever is intended by the Instruction.
 java.lang.String printAsTxtLoadable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

singleton

public static final Choice singleton
Constructor Detail

Choice

private Choice()
Method Detail

execute

public void execute(Computation computation)
Description copied from interface: Instruction
This method executes whatever is intended by the Instruction.

Specified by:
execute in interface Instruction
Parameters:
computation - The instruction is executed in the context of this Computation.

printAsTxtLoadable

public java.lang.String printAsTxtLoadable()
Specified by:
printAsTxtLoadable in interface Instruction