Compilation from the standard word-RAM to a pointer machine #
Each source instruction occupies a fixed-size block. Memory routines traverse an AVL dictionary;
scalar instructions and control flow take constant time. Padding is unreachable on successful
runs. Source rand instructions have no deterministic successor, and compile to a self-loop.
The final output is placed in scalar register three. The scalar model supplies the source word
width, while heap pointers remain opaque throughout execution.
Fixed block size, large enough for either dictionary routine and its register moves.
Lower one instruction, relocating local control flow to its fixed-size block.
Pad the lowered instruction to the fixed block size.
Compile a finite standard word-RAM program to an actual finite pointer-machine program.
Each successful source step is simulated by actual target instructions. The dictionary retains all stored addresses, grows by at most one record, and charges logarithmic access time.
A source halt copies its output to scalar register three and halts in two target steps. The represented register bank and dictionary are preserved.