JAM - Java RAM Interpreter

What Is It?

JAM - Java RAM Interpreter simulates Random Access Machines (RAMs). A RAM is a theoretical computer model with an unlimited number of registers of unlimited size and a programming language similar to Assembly.
It is used in the book "Theoretische Informatik" by Klaus W. Wagner. Many things mentioned in that book can be demonstrated using JAM, from stepping through programs, gödelizing RAMs and much more.
Degödelization and non-deterministic RAMs will also be possible soon.

The program is freely distributable under the terms of the GNU General Public License


JAM Screenshot


JAM is also available as an applet, but remember that you cannot save nor load programs and even cannot use the clipboard due to the applet limitations.


jam.tar.gz (27 kB)
This file contains the source code of JAM. You need ant and a Java compiler to build it, and the Java Runtime Environment to run it.


Please see the files "README" and "COPYING" in the archive for further information. If something is still unclear, please contact the programmer.

A short documentation of the RAM instruction set will be given here, though the complete (and correct) explanation of the RAMs, their functionality and their instruction set, you should consult the book "Theoretische Informatik" by Klaus W. Wagner.
The programming language of RAMs has a very limited instruction set. Every (non-empty and non-comment-) line of the source code must start with the instruction number ("program line number") and then, one of the following instructions must follow:

Ri <- c
Ri <- Rj
Ri <- RRj
Ri <- Rj + Rk
Ri <- Rj - Rk
RRi <- Rj
IF Ri = 0 GOTO l
IF Ri > 0 GOTO l
where i, j and k are integers and represent the number of a register, l is an integer and represents an instruction number, and c is an integer constant.
RRi is the indirect mode of addressing a register, that means not register i is used but the register with the number that is contained in register i.
When the program starts, the arguments are filled into the registers starting from register 0, all other registers are set to 0. The return value of the RAM is the value that is in register 0 after the RAM terminates.


The RAM site at the chair for Theoretical Computer Science at the University Würzburg, where the concept of RAMs is used, can be reached via