Definition (register machine)
A register machine is a pair $M = (Q, P)$ where
-
$Q = \set{S_0, S_1, \ldots, S_n}$ is a finite set (of states) with two special elements $S_0 \neq S_1$ (the start state and the halt state); and
-
$P$ is a function with domain $Q$ (the program), such that each $P(S_i)$ is a $(Σ, Q)$-instruction, i.e. tuple of one of the following forms: ($j\in \Z_{\geq 1}$, $k, l\in \N$)
Instruction |
Interpretation |
|---|---|
$S_i: (j, +, k)$ |
Add 1 to the content of register $k$; |
$S_i: (j, -, k, l)$ |
If register $j$ is $0$: |