package ec.gp.push;
import org.spiderland.Psh.*;
import ec.*;
import ec.util.*;
/*
* PushInstruction.java
*
* Created: Fri Feb 15 23:00:04 EST 2013
* By: Sean Luke
*/
/**
PushInstruction encapsulates a custom Push instruction. This
class requires that you implement a Psh method called Execute(...).
You will need to consult Psh to understand what you can do, and how to do it. But
for some examples, see the Atan.java and Print.java classes in
ec/app/push/.
PushInstruction is a Prototype, so you may with also to override setup()
to set up your instruction initially.
Default Base
gp.push.func
*/
public abstract class PushInstruction extends Instruction implements Prototype
{
public static final String P_INSTRUCTION = "func";
public Parameter defaultBase()
{
return PushDefaults.base().push(P_INSTRUCTION);
}
public void setup(EvolutionState state, Parameter base) { }
public Object clone()
{
try
{
PushInstruction myobj = (PushInstruction) (super.clone());
return myobj;
}
catch (CloneNotSupportedException e)
{ throw new InternalError(); } // never happens
}
public abstract void Execute(Interpreter interpreter);
}
Ads help maintain this website.