org.holtz.zoe
Class Phene

java.lang.Object
  extended by org.holtz.zoe.Phene
All Implemented Interfaces:
ZoelVMHost

public class Phene
extends java.lang.Object
implements ZoelVMHost

The expression of a Gene, consisting of its ZoelVM execution state.

Author:
Brian Holtz

Field Summary
protected  Bug bug
           
protected  boolean doing
           
protected  Gene gene
           
protected  ZoelVM zvm
           
 
Constructor Summary
Phene(Bug b, Gene g)
           
 
Method Summary
 ZoelVM.Turn Do()
           
 ZoelVM.Turn execute(Operator operator, Literal operand)
           
 Literal get(Literal key)
           
 Literal get(RegisterReference arg)
           
 Expression implicitArgOf(Operator op)
          The implicit argument, if any, of an Operator.
 int maxDataSize()
           
 int maxStepsPerTurn()
           
 Literal put(Literal key, Literal val)
           
 java.util.Random random()
           
 java.lang.String toString(java.lang.String separator)
           
 java.lang.String tracePrefix()
           
 boolean when()
           
 World world()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gene

protected Gene gene

zvm

protected ZoelVM zvm

bug

protected Bug bug

doing

protected boolean doing
Constructor Detail

Phene

public Phene(Bug b,
             Gene g)
Method Detail

Do

public ZoelVM.Turn Do()

when

public boolean when()

toString

public java.lang.String toString(java.lang.String separator)

random

public java.util.Random random()
Specified by:
random in interface ZoelVMHost

world

public World world()
Specified by:
world in interface ZoelVMHost

maxDataSize

public int maxDataSize()
Specified by:
maxDataSize in interface ZoelVMHost

maxStepsPerTurn

public int maxStepsPerTurn()
Specified by:
maxStepsPerTurn in interface ZoelVMHost

tracePrefix

public java.lang.String tracePrefix()
Specified by:
tracePrefix in interface ZoelVMHost

implicitArgOf

public Expression implicitArgOf(Operator op)
Description copied from interface: ZoelVMHost
The implicit argument, if any, of an Operator.

Specified by:
implicitArgOf in interface ZoelVMHost
Parameters:
op - The Operator.
Returns:
A RegisterReference or Literal, or null if op has no implicit argument.

get

public Literal get(RegisterReference arg)
Specified by:
get in interface ZoelVMHost

get

public Literal get(Literal key)
Specified by:
get in interface ZoelVMHost

put

public Literal put(Literal key,
                   Literal val)
Specified by:
put in interface ZoelVMHost

execute

public ZoelVM.Turn execute(Operator operator,
                           Literal operand)
Specified by:
execute in interface ZoelVMHost