equal
deleted
inserted
replaced
1 (*<*) |
1 (*<*) |
2 theory Paper |
2 theory Paper |
3 imports UTM |
3 imports UTM |
4 begin |
4 begin |
5 |
5 |
6 hide_const (open) s |
6 hide_const (open) s |
|
7 hide_const (open) R |
7 |
8 |
8 abbreviation |
9 abbreviation |
9 "update p a == new_tape a p" |
10 "update p a == new_tape a p" |
10 |
11 |
11 |
12 |
382 halting problem |
383 halting problem |
383 *} |
384 *} |
384 |
385 |
385 section {* Abacus Machines *} |
386 section {* Abacus Machines *} |
386 |
387 |
|
388 text {* |
|
389 \noindent |
|
390 Boolos et al \cite{Boolos87} use abacus machines as a |
|
391 stepping stone for making it less laborious to write |
|
392 programs for Turing machines. Abacus machines operate |
|
393 over an unlimited number of registers $R_0$, $R_1$, \ldots |
|
394 each being able to hold an arbitrary large natural number. |
|
395 We use natural numbers to refer to registers and also |
|
396 to \emph{opcodes} of abacus machines. Obcodes are |
|
397 defined as the datatype |
|
398 |
|
399 \begin{center} |
|
400 \begin{tabular}{rcll} |
|
401 @{text "o"} & $::=$ & @{term "Inc R"} & increment register $R$ by one\\ |
|
402 & $\mid$ & @{term "Dec R o"} & if content of $R$ is non-zero, then decrement it by one\\ |
|
403 & & & otherwise jump to opcode $o$ |
|
404 & $\mid$ & @{term "Goto o"} & jump to opcode $o$ |
|
405 \end{tabular} |
|
406 \end{center} |
|
407 *} |
|
408 |
|
409 |
387 section {* Recursive Functions *} |
410 section {* Recursive Functions *} |
388 |
411 |
389 section {* Wang Tiles\label{Wang} *} |
412 section {* Wang Tiles\label{Wang} *} |
390 |
413 |
391 text {* |
414 text {* |