package code.instr;

import code.space.Computation;

/**
 * Interface of all the instructions of the virtual machine.
 * <P>
 * 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.
 *
 * @author Sergio Antoy
 * @since June 17, 2003
 */
public interface Instruction {

    /**
     * This method executes whatever is intended by the Instruction.
     *
     * @param computation The instruction is executed
     *                    in the context of this Computation.
     */
    void execute(Computation computation);

    String printAsTxtLoadable() ;


}
