package org.dgpf.gp.automaton.search;
import org.dgpf.gp.automaton.base.Instruction;
/**
* This abstract class allows the user to specify fixed code sequences that
* can be pasted into code by mutation or creation operations.
*
* @author Thomas Weise
*/
public abstract class SequenceFactory
{
/**
* Create a fixed sequence of instructions.
* @param p_context The program context to be used.
* @param p_instruction_count The count of instructions of the program
* the new sequence will be part of.
* @param p_memory_size The memory size currently available.
* @param p_position The position where the new sequence will be
* placed. Use this to align your
* <code>IfJump</code>-instructions.
* @param p_at_end <code>true</code> if and only if the code
* sequence is to be inserted at the end.
* @return The new, random instruction.
*/
public abstract Instruction[] create(
final ProgramContext p_context,
final int p_instruction_count,
final int p_memory_size,
final int p_position,
final boolean p_at_end);
}