</RT·code>
- <RT·chapter>The Turing Machine as a computer architecture</RT·chapter>
+ <RT·chapter>The Turing Machine architecture</RT·chapter>
<p>
In this interpretation of the Turing Machine, the architecture utilizes a single ended tape, as done in Hopcroft and Ullman's book <RT·endnote>John E. Hopcroft and Jeffrey D. Ullman, <em>Introduction to Automata Theory, Languages, and Computation</em> (Reading: Addison Wesley, 1979).</RT·endnote>. If a computation requires a two way infinite tape, the single ended tape machine can emulate it by interleaving the addresses: assigning odd addressed cells to represent the right going half, and even addressed cells to represent the left going half. This emulation requires taking two steps instead of one to advance in a given logical direction. When analyzing the time complexity of an algorithm, this overhead merely doubles the constant on the linear term, leaving the asymptotic order of complexity entirely unchanged. The outcomes of decider programs are unaffected. Therefore, utilizing a single ended tape is an <RT·term>inconsequential</RT·term> variation of the two way tape machine.
<figcaption>Figure 1 A Turing Machine</figcaption>
</figure>
+ <h2>The Turing Machine consists of:</h2>
- <p>The Turing Machine consists of:</p>
+ <p>The customer programmable components</p>
<ul>
- <li>a read only <RT·term>alphabet</RT·term> that instances can be made from</li>
- <li>a read only <RT·term>empty symbol</RT·term> that instances can be made from</li>
- <li>a constant <RT·term>tape</RT·term> consisting of read writable cells</li>
- <li>a read only <RT·term>left from leftmost error</RT·term> symbol that instances can be made from</li>
- <li>a <RT·term>head</RT·term> bearing tape transport mechanism</li>
- <li>a read writable single symbol <RT·term>read data buffer</RT·term></li>
- <li>a constant state machine <RT·term>programmed controller</RT·term> with states that can be referenced</li>
- <li>a constant <RT·term>initial state</RT·term> reference</li>
- <li>a constant <RT·term>halt state</RT·term> reference</li>
- <li>a read writable <RT·term>current state</RT·term> reference variable</li>
+ <li>a custom predefined read only <RT·term>data alphabet</RT·term> from which instances can be made</li>
+ <li>a custom predefined immutable <RT·term>programmed controller</RT·term> with states that can be referenced</li>
+ <li>a custom predefined constant <RT·term>initial state</RT·term> reference</li>
+ <li>a custom predefined constant <RT·term>halt state</RT·term> reference</li>
+ </ul>
+
+ <p>The immutable structural components</p>
+
+ <ul>
+ <li>a read only empty symbol, <RT·term>□</RT·term>, that instances can be made from</li>
+ <li>a read only <RT·term>control alphabet</RT·term> consisting of the symbol <RT·code>leftmost</RT·code>, from which instances can be made</li>
+ <li>a read writable <RT·term>current state</RT·term> reference variable, points into the custom defined program controller</li>
+ <li>a fixed hardware <RT·term>comparator</RT·term> to evaluate state and symbol equivalencies</li>
+ <li>a <RT·term>tape transport unit</RT·term>, AKA <RT·term>TTU</RT·term>from which tapes can be mounted and unmounted, and has one read/write <RT·term>head</RT·term>. Multiple TTUs can be plugged in, per TTU:
+ <ul>
+ <li>a single symbol FIFO <RT·term>data buffer</RT·term>, written by the tape transport, read by the programmable controller</li>
+ <li>a single symbol FIFO <RT·term>status buffer</RT·term>, written by the tape transport, read by the programmable controller</li>
+ </ul></li>
+ </ul>
+
+ <p>This is the fixed logic internal to the machine.
+
<li>a constant <RT·term>operation procedure</RT·term> where each step of the procedure can be referenced</li>
<li>a read writable <RT·term>operation procedure step reference counter</RT·term></li>
- <li>a read only <RT·term>clock</RT·term> to synchronize control and to cause counting until the halt state is reached.</li>
- <li>a fixed hardware <RT·term>comparator</RT·term> to evaluate state and symbol equivalencies</li>
<li>a <RT·term>reset button</RT·term> that activates logic that initializes the machine</li>
+ <li>a read only <RT·term>clock</RT·term> to synchronize control and to cause counting until the halt state is reached.</li>
+
+ <p>Purchased separately.
+
+ <ul>
+ <li>an immutable structure <RT·term>tape</RT·term> consisting of cells, where each cell can be read and written. Single ended. For mounting on a TTU. Discount when purchased in lots of 10.</li>
+ </ul>
+
+ <ul>
+ <li>Universal Turing machine package, consisting of the Universal Turing Machine controller and auxiliary alphabet. Comes with tapes containing example programs</li>
</ul>
<p>Each highlighted term is a short name for the associated item.</p>
</p>
<p>
- Suppose our goal is to subtract 3 from 5 in the second order. Consider a Turing Machine representation named <RT·code>five</RT·code> that outputs the number 5, i.e., it prints to the tape, 'sssss', using unary notation. Let us assume that the tape is initially empty and that the empty symbol 'â\8a\94' terminates the string. To preserve the code for second order analysis, we define the program's Abstract Syntax Tree (AST) as a quoted <RT·code>progn</RT·code> block. This block can contain any native Lisp control structures, though for this generator it is a simple sequence:
+ Suppose our goal is to subtract 3 from 5 in the second order. Consider a Turing Machine representation named <RT·code>five</RT·code> that outputs the number 5, i.e., it prints to the tape, 'sssss', using unary notation. Let us assume that the tape is initially empty and that the empty symbol 'â\96¡' terminates the string. To preserve the code for second order analysis, we define the program's Abstract Syntax Tree (AST) as a quoted <RT·code>progn</RT·code> block. This block can contain any native Lisp control structures, though for this generator it is a simple sequence:
</p>
<RT·code>
</p>
<p>
- For the second order difference operation, we compose the ASTs to create a new program. Here we extract the body of the second operand's AST and substitute every <RT·code>(write s)</RT·code> followed by a <RT·code>(step)</RT·code> command with an inverted pair: a <RT·code>(step-left)</RT·code> command followed by writing the empty symbol <RT·code>(write â\8a\94)</RT·code>.
+ For the second order difference operation, we compose the ASTs to create a new program. Here we extract the body of the second operand's AST and substitute every <RT·code>(write s)</RT·code> followed by a <RT·code>(step)</RT·code> command with an inverted pair: a <RT·code>(step-left)</RT·code> command followed by writing the empty symbol <RT·code>(write â\96¡)</RT·code>.
</p>
<RT·code>
(equal (first cmds) '(write s))
(equal (second cmds) '(step)))
(append
- '((step-left) (write â\8a\94))
+ '((step-left) (write â\96¡))
(invert-direction (cddr cmds))
))
(
;; (write s) (step)
;; (write s) (step)
;; (write s) (step)
- ;; (step-left) (write â\8a\94)
- ;; (step-left) (write â\8a\94)
- ;; (step-left) (write â\8a\94)
+ ;; (step-left) (write â\96¡)
+ ;; (step-left) (write â\96¡)
+ ;; (step-left) (write â\96¡)
;; )
</RT·code>
</p>
<p>
- Because of the purity of the Lisp syntax, we are able to present a remedial simplifier example here. A <RT·code>(step)</RT·code> followed by a <RT·code>(step-left)</RT·code> annihilate each other, resulting in zero net movement of the tape head. Similarly, on an initially empty tape, a <RT·code>(write s)</RT·code> followed immediately by overwriting with the empty symbol <RT·code>(write â\8a\94)</RT·code> annihilate each other.
+ Because of the purity of the Lisp syntax, we are able to present a remedial simplifier example here. A <RT·code>(step)</RT·code> followed by a <RT·code>(step-left)</RT·code> annihilate each other, resulting in zero net movement of the tape head. Similarly, on an initially empty tape, a <RT·code>(write s)</RT·code> followed immediately by overwriting with the empty symbol <RT·code>(write â\96¡)</RT·code> annihilate each other.
</p>
<p>
(and
(cdr cmds)
(equal (first cmds) '(write s))
- (equal (second cmds) '(write â\8a\94)))
+ (equal (second cmds) '(write â\96¡)))
(remove-annihilations (cddr cmds)))
(
t
<RT·code>
increment:
a = TTU.read()
- if a == 0 or a == â\8a\94:
+ if a == 0 or a == â\96¡:
TTU.write(1)
halt
TTU.write(0)