Algorithm (truncated computation of register machine)
Input: $\op{code}(M), \op{code}(k), \op{code}(\v w), v$.
-
Empty an unused register $i$.
-
If the content of register $i$ equals $v$:
-
Output $ε$ and halt.
-
-
Otherwise:
-
Compute $(q,\v w') = C(\#(u), M, \v w)$ where $u$ is the content of register $i$.
-
If $q = q_\mathrm{H}$:
-
Output $a$ and halt.
-
-
Otherwise:
-
Apply the successor function to register $k$.
-
Go to 2.
-
-
The loop can only be called at most $\#(v)$ times, so this must halt in finite time.