next up previous contents
Next: The Environment Up: Design Details of the Previous: Organism Death

   
The Programming Language and Representation

REPLiCa,4.14 the programming language in which the self-replicating programs are written, is based upon the Tierran language [Ray 91], with some changes and additions to support the extra functionality of Cosmos. Like Tierran, REPLiCa has been designed to be robust, in the sense that there is little syntactical structure to a program, so that any random collection of REPLiCa instructions will form a valid program that will do something (maybe not anything sensible, but it will not cause the system to crash). The REPLiCa instruction set is listed, with annotations, in Section A.2.

One big difference between Tierran and REPLiCa is in the mechanism for control flow branching and jumping. Tierran uses a system of template-driven jumping (see [Ray 91] for details). REPLiCa does not have jumps of this kind; rather, jumps may be accomplished in two different ways. The first, primarily for single jumps rather than loops, is just by the creation of an appropriate promoter to bind to the desired jump destination, either followed by the deletion from the Promoter Store of the currently active promoter (using the reg_destroy instruction), or by the issuing of a stop instruction--both of which have the effect of stopping the execution of the current section of code and activating the new promoter.4.15 The second way by which (local) jumps may be performed is by the use of the set_jmp and jmp instructions. Each cell contains a pointer called the LocalJumpPointer which, if set, points to a position on the genome (or currently active InfoString in the Received Message Store). When a set_jmp instruction is executed, this pointer is set to the address of the next instruction. When a jmp instruction is executed, control passes to the instruction pointed to by the LocalJumpPointer (if it is set, otherwise no jump is performed). The LocalJumpPointer can be cleared with the clr_jmp instruction.

The translation of the bit-string representation of a program on the genome, and the control of execution of the program by promoters and repressors, illustrated in Figure 4.2, has already been explained in Sections 4.3.2-4.3.4.


next up previous contents
Next: The Environment Up: Design Details of the Previous: Organism Death
Tim Taylor
1999-05-29