From: Thomas Walker Lynch
Date: Thu, 2 Jul 2026 19:21:24 +0000 (+0000)
Subject: Harmony updates to project linking, improved TM-2026 introduction
X-Git-Url: https://git.reasoningtechnology.com/RT-Manuscript_locator.js?a=commitdiff_plain;h=108c5c4743538db76ee684adc9f23d0b1e6cf417;p=TM-2026
Harmony updates to project linking, improved TM-2026 introduction
---
diff --git a/document/RT-Manuscript_locator.js b/document/RT-Manuscript_locator.js
new file mode 100644
index 0000000..e5ad4f5
--- /dev/null
+++ b/document/RT-Manuscript_locator.js
@@ -0,0 +1,51 @@
+/*
+ indirect.js
+
+ We have four scenarios
+
+ immediate - used in the RT-Style distribution itself (authored, consumer, staged)
+ direct - used in the RT-Style project itself, but not in the distribution
+ indirect - the version all Harmony projects use
+ URL-only - always pulls style through a URL, a webserver must be present
+
+*/
+
+window.RT = window.RT || {};
+
+// --- Configuration ---
+// Define the consumer project name to allow dynamic local file:// calculation.
+window.RT.project_name = "TM-2026";
+
+// Fallback URL when served over a network where the project root is not in the URI.
+window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/Manuscript";
+
+(function() {
+ let style_path = window.RT.server_url;
+
+ if (window.RT.project_name) {
+ const path = window.location.pathname;
+ const project_root_index = path.indexOf('/' + window.RT.project_name + '/');
+
+ if (project_root_index !== -1) {
+ // substring(0, stop) extracts up to the project name, leaving off the trailing slash.
+ // We append the explicit forward slash before navigating into the shared boundary.
+ const absolute_project_root = path.substring(0, project_root_index + window.RT.project_name.length + 1);
+
+ // The symlink 'RT-Style' already drops us inside the 'consumer/' directory,
+ // so we proceed directly to 'Manuscript'.
+ style_path = absolute_project_root + "/shared/linked-project/RT-Style/Manuscript";
+ } else {
+ console.warn("RT-Style: Cannot locate project root '/" + window.RT.project_name + "/' in URI. Falling back to server_url.");
+ }
+ }
+
+ window.RT.dirpr_library = style_path;
+
+ document.write(
+ '
+
-
-
+
-
+
- Preface
+
-
mathematical logic
-
computation theory
-
architecture
-
organization
-
implementation
-
realization
+
mathematical logic
+
computation theory
+
architecture
+
organization
+
implementation
+
realization
@@ -126,12 +136,12 @@
- An architecture provides programmers with information that is valuable when designing the logic of programs. This includes programmers across the entire software stack, such as firmware engineers, driver developers, systems programmers, compiler writers, and application developers. Although applications programs might only be exposed to the virtual architecture presented by various standards, various libraries, and the programming language used. In addition to specifying the instructions (instruction set architecture), architecture includes describing the memory and hardware virtualization features, specifying the behavior of the interrupt subsystem, the method of doing I/O, DMA, the special registers and their effects, any architectural busses, and the standards to be followed for each if any. More recently, this also includes specifying how programs can make use of secure areas. The architecture is specified by an architect.
+ An architecture provides programmers with information that is valuable when designing the logic of programs. This includes programmers across the entire software stack, such as firmware engineers, driver developers, systems programmers, compiler writers, and application developers. Although applications programs might only be exposed to the virtual architecture presented by various standards, various libraries, and the programming language used. In addition to specifying the instructions (instruction set architecture), architecture includes describing the memory and hardware virtualization features, specifying the behavior of the interrupt subsystem, the method of doing I/O, DMA, the special registers and their effects, any architectural busses, and the standards to be followed for each if any. More recently, this also includes specifying how programs can make use of secure areas. The architecture is specified by an architect.
- The classic text by Hamacher, Vranesic, and Zaky carefully defines the organizational level as sitting between architecture and implementation.
- Organization is the register-transfer level description of the machine, which includes internal buses, external buses and the state machines that implement the protocols used, control units, interrupt structures, and ALU layout. Crucially, it is at this level that decisions regarding instruction-level parallelism are made, such as whether the processor will employ a scalar, superscalar, or VLIW design, the depth of its execution pipelines, the use of out-of-order execution, branch prediction strategies, and the specific hierarchy of hardware caches. It dictates the logical arrangement of hardware and the procedures that force the data to flow to satisfy the architectural constraints. Organization is sometimes called micro-architecture, and it is made by a design architect.
+ The classic text by Hamacher, Vranesic, and Zaky carefully defines the organizational level as sitting between architecture and implementation.
+ Organization is the register-transfer level description of the machine, which includes internal buses, external buses and the state machines that implement the protocols used, control units, interrupt structures, and ALU layout. Crucially, it is at this level that decisions regarding instruction-level parallelism are made, such as whether the processor will employ a scalar, superscalar, or VLIW design, the depth of its execution pipelines, the use of out-of-order execution, branch prediction strategies, and the specific hierarchy of hardware caches. It dictates the logical arrangement of hardware and the procedures that force the data to flow to satisfy the architectural constraints. Organization is sometimes called micro-architecture, and it is made by a design architect.
@@ -139,11 +149,11 @@
- The implementation instructs the manufacturing teams very specifically on what is to be built. For a microprocessor chip, this consists of the full wiring of the logic gates and transistors, instructions for cutting the lithography masks, the package to be used, and the production test programs to be run. The masks instructions for cutting the masks consists of the sizes and placement doping wells and gates, placement of contacts, where to run wires, etc. An implementation. The implementation is designed by design engineers, with the assistance of design synthesis tools and CAD tools.
+ The implementation instructs the manufacturing teams very specifically on what is to be built. For a microprocessor chip, this consists of the full wiring of the logic gates and transistors, instructions for cutting the lithography masks, the package to be used, and the production test programs to be run. The masks instructions for cutting the masks consists of the sizes and placement doping wells and gates, placement of contacts, where to run wires, etc. An implementation. The implementation is designed by design engineers, with the assistance of design synthesis tools and CAD tools.
- A realization is a physical box full of plastic, metal, fiberglass, and silicon, along with a smattering of exotic materials. A realization is made by manufacturing engineers, technicians, and product line workers, with the assistance of some of the most sophisticated machines ever built by humankind.
+ A realization is a physical box full of plastic, metal, fiberglass, and silicon, along with a smattering of exotic materials. A realization is made by manufacturing engineers, technicians, and product line workers, with the assistance of some of the most sophisticated machines ever built by humankind.
@@ -161,11 +171,11 @@
- The common understanding of the word 'architecture' is what Hamacher and Zaky call an organization. For example, even the most experienced of architects will say things like a microprocessor has a "superscalar architecture", though whether a processor is a scalar, superscalar, or VLIW machine is clearly a question of computer organization.
+ The common understanding of the word 'architecture' is what Hamacher and Zaky call an organization. For example, even the most experienced of architects will say things like a microprocessor has a "superscalar architecture", though whether a processor is a scalar, superscalar, or VLIW machine is clearly a question of computer organization.
- In fact, architecture instructs organization. When we design an instruction set that has load instructions, it implies that there will be an instruction fetch, and thus an instruction bus. Furthermore the load data has to come from somewhere, so there will be data fetch and a data bus. Could both be the same bus? If not, then we have a "Harvard Architecture". The fact is, almost no one involved in computer design completely divorces architecture from organization.
+ In fact, architecture instructs organization. When we design an instruction set that has load instructions, it implies that there will be an instruction fetch, and thus an instruction bus. Furthermore the load data has to come from somewhere, so there will be data fetch and a data bus. Could both be the same bus? If not, then we have a "Harvard Architecture". The fact is, almost no one involved in computer design completely divorces architecture from organization.
@@ -185,128 +195,128 @@
- When a transform applied to machine m_i produces machine m_{i.1}, and this latter machine gets the same results for the same computational inputs, and furthermore, if any computation theory analysis applied to m_{i.1} yields the same answer as it would when applied to m_i â we say that the transform is computation theoretic inconsequential. Otherwise, the transformation is said to be computation theoretic consequential. The remainder of this section defines these terms more precisely.
+ When a transform applied to machine m_i produces machine m_{i.1}, and this latter machine gets the same results for the same computational inputs, and furthermore, if any computation theory analysis applied to m_{i.1} yields the same answer as it would when applied to m_i â we say that the transform is computation theoretic inconsequential. Otherwise, the transformation is said to be computation theoretic consequential. The remainder of this section defines these terms more precisely.
Definition of the same results transform property
- Suppose we are interested in a given Turing Machine m_i where the machine will potentially be run after being given any one of a number of input tapes x_{i,j}, and for each of those inputs the same tape with the results written will be r_{i,j}, then we notate this as:
+ Suppose we are interested in a given Turing Machine m_i where the machine will potentially be run after being given any one of a number of input tapes x_{i,j}, and for each of those inputs the same tape with the results written will be r_{i,j}, then we notate this as:
-
+
m_i(x_{i,j}) = r_{i,j}
-
+
- Here the subscripts of the same name set up a correspondence. x_{i,j} is the jth input to the machine m_i, etc. The free variable j runs over all the interesting distinct input tapes to be given to machine m_i. So for example, if we had a machine, say m_8, and we had a set of three inputs to be given to m_8, then:
+ Here the subscripts of the same name set up a correspondence. x_{i,j} is the jth input to the machine m_i, etc. The free variable j runs over all the interesting distinct input tapes to be given to machine m_i. So for example, if we had a machine, say m_8, and we had a set of three inputs to be given to m_8, then:
- Another machine, perhaps machine m_7, would have its own distinct inputs x_{7,j}, etc.
+ Another machine, perhaps machine m_7, would have its own distinct inputs x_{7,j}, etc.
- Now suppose that a machine m_{i.1} is the result of a transformation, T, applied to machine m_i.
+ Now suppose that a machine m_{i.1} is the result of a transformation, T, applied to machine m_i.
-
+
m_i \xrightarrow{T} m_{i.1}
-
+
- We can then assign a property to transform T called its doesn't change results property, as follows. If and only if:
+ We can then assign a property to transform T called its doesn't change results property, as follows. If and only if:
-
+
\forall j \colon r_{i,j} = r_{i.1,j}
-
+
- then T doesn't change m_i results. Here we note that we are evaluating a specific machine m_i, so we must add the qualifier 'm_i results'. It might be that for another machine with another corresponding set of interesting inputs, the transform would lead to a new machine that produces different results.
+ then T doesn't change m_i results. Here we note that we are evaluating a specific machine m_i, so we must add the qualifier 'm_i results'. It might be that for another machine with another corresponding set of interesting inputs, the transform would lead to a new machine that produces different results.
- then we can say without qualification that T is a same results transform. Though still implied are the sets of machines, tapes, and questions.
+ then we can say without qualification that T is a same results transform. Though still implied are the sets of machines, tapes, and questions.
Definition of the computation theoretic consequential/inconsequential transform property
- Suppose we still have the given machines, and their corresponding inputs, that were used when determining transform T is a same results transform.
+ Suppose we still have the given machines, and their corresponding inputs, that were used when determining transform T is a same results transform.
- Suppose we also have a computation theory C that allows us to analyze some machines so as to answer some questions we find interesting. Suppose furthermore that among these questions are questions of time and space complexity, along with zero or more questions about decidability. Furthermore, we are given a machine, say m_i, for which these questions have answers. We represent this as:
+ Suppose we also have a computation theory C that allows us to analyze some machines so as to answer some questions we find interesting. Suppose furthermore that among these questions are questions of time and space complexity, along with zero or more questions about decidability. Furthermore, we are given a machine, say m_i, for which these questions have answers. We represent this as:
-
+
a_{i,k} = q_{i,k}(m_i, \{x_{i,j}\})
-
+
- Here, \{x_{i,j}\} represents the entire domain of j tapes being passed as arguments to the question q_{i,k}. From this, we can observe that if there are n_k questions, then we will have n_k answers. Also, for a specific machine m_i, where there are n_jj values, the domain over which m_i will be analyzed will have n_j tapes in it.
+ Here, \{x_{i,j}\} represents the entire domain of j tapes being passed as arguments to the question q_{i,k}. From this, we can observe that if there are n_k questions, then we will have n_k answers. Also, for a specific machine m_i, where there are n_jj values, the domain over which m_i will be analyzed will have n_j tapes in it.
- As we had already discovered when determining T is a same results transform, T transforms machine m_i into machine m_{i.1}.
+ As we had already discovered when determining T is a same results transform, T transforms machine m_i into machine m_{i.1}.
-
+
m_i \xrightarrow{T} m_{i.1}
-
+
- For our specific machine m_i, if and only if:
+ For our specific machine m_i, if and only if:
-
+
\forall k \colon a_{i,k} = a_{i.1,k}
-
+
- then T is computation theoretic inconsequential for m_i.
+ then T is computation theoretic inconsequential for m_i.
If, and only if, it is the case that:
-
+
\forall i, \forall k \colon a_{i,k} = a_{i.1,k}
-
+
- then we can say without qualification that T is computation theoretic inconsequential. Though still implied are the sets of machines and tapes.
+ then we can say without qualification that T is computation theoretic inconsequential. Though still implied are the sets of machines and tapes.
- Symbol
+ Symbol
- A symbol is a distinct mathematical object capable of being instantiated. Within a given context, any instance of a specific symbol evaluates as equal to any other instance of that identical symbol, and evaluates as not equal to any instance of a different symbol. (As a matter of convenience in this document, sequences of letters and/or digits are utilized for symbol instances.)
+ A symbol is a distinct mathematical object capable of being instantiated. Within a given context, any instance of a specific symbol evaluates as equal to any other instance of that identical symbol, and evaluates as not equal to any instance of a different symbol.
- Put more formally, given a set of instantiable objects and a collection of instances made from them, for these objects to be symbols, two structural conditions must be met. First, it must be possible to define an instance comparison operation, denoted =, that acts as an equivalence relation to partition the collection into discrete equivalence classes. There must be a one-to-one correspondence between the resulting equivalence classes and the original instantiable objects from which the member instances were derived.
+ Put more formally, given a set of instantiable objects and a collection of instances made from them, for these objects to be symbols, two structural conditions must be met. First, it must be possible to define an instance comparison operation, denoted =, that acts as an equivalence relation to partition the collection into discrete equivalence classes. There must be a one-to-one correspondence between the resulting equivalence classes and the original instantiable objects from which the member instances were derived.
@@ -316,21 +326,21 @@
The factory interpretation
- In the context of real machines, the symbol itself can be defined as a factory that produces symbol instances. A new symbol instance of the given symbol is then made, say, by calling the factory's make function. All of the symbol instances made by the factory constitute the members of the corresponding equivalence class.
+ In the context of real machines, the symbol itself can be defined as a factory that produces symbol instances. A new symbol instance of the given symbol is then made, say, by calling the factory's make function. All of the symbol instances made by the factory constitute the members of the corresponding equivalence class.
- A symbol instance newly minted by the factory is said to come direct from the factory. A symbol instance direct from the factory is also called an original.
+ A symbol instance newly minted by the factory is said to come direct from the factory. A symbol instance direct from the factory is also called an original.
Required properties of symbol factories
- Any two symbol instances returned directly from two distinct factories will always evaluate to False during an equality comparison. In other words, two distinct originals will always be not equal.
+ Any two symbol instances returned directly from two distinct factories will always evaluate to False during an equality comparison. In other words, two distinct originals will always be not equal.
- Given an original, all copies stemming from it will be equal to each other and to the original. By stemming from, this definition includes all direct copies and copies of copies.
+ Given an original, all copies stemming from it will be equal to each other and to the original. By stemming from, this definition includes all direct copies and copies of copies.
@@ -348,7 +358,7 @@
- In general, memory addresses are built-in symbol instances, hence within the context of a single process run, a program can make use of these symbols. However, this diminishes the size of the address space and leaves the memory at those addresses unused. A common hedge is then to use references into a dictionary, where the data looked up in the dictionary is the name of the symbol.
+ In general, memory addresses are built-in symbol instances, hence within the context of a single process run, a program can make use of these symbols. However, this diminishes the size of the address space and leaves the memory at those addresses unused. A common hedge is then to use references into a dictionary, where the data looked up in the dictionary is the name of the symbol.
@@ -356,15 +366,15 @@
- An alternative implementation is to have the factory return an integer value. Each factory has a base integer that is distinct from that of other factories. Calling make then returns the base integer.
+ An alternative implementation is to have the factory return an integer value. Each factory has a base integer that is distinct from that of other factories. Calling make then returns the base integer.
- As another alternative, each factory can be given a base string, and then make returns a copy of the base string. Here we refer literally to the string as the symbol instance. There is no separate name, and the string data, not the reference to the string, becomes the symbol instance. This is however merely an architectural constraint, under the hood an implementation could use string references as long as it always appears to the programmer that the string value is being used.
+ As another alternative, each factory can be given a base string, and then make returns a copy of the base string. Here we refer literally to the string as the symbol instance. There is no separate name, and the string data, not the reference to the string, becomes the symbol instance. This is however merely an architectural constraint, under the hood an implementation could use string references as long as it always appears to the programmer that the string value is being used.
- At the time of this writing many machines use 64 bit words. This is equivalent to 8 ASCII characters, while the average size of an identifier is about 5 characters. Hence the approach of using a string as a symbol might not be as inefficient as it seems to be at first. Using strings has advantages. Symbol instances can carry semantic clues for the programmer. There is no hazard of conflating the string instance with the name, as they are the same. Also, a string instance will have integrity across contexts, such as between invocations or when passed between processes (note the section below on crossing context boundaries). The drawback is that the strings are typically ad hoc so the guarantee of distinctness becomes merely a contract with the programmer. Attempts at strengthening that contract can lead to frustrating errors and add complexity to programs.
+ At the time of this writing many machines use 64 bit words. This is equivalent to 8 ASCII characters, while the average size of an identifier is about 5 characters. Hence the approach of using a string as a symbol might not be as inefficient as it seems to be at first. Using strings has advantages. Symbol instances can carry semantic clues for the programmer. There is no hazard of conflating the string instance with the name, as they are the same. Also, a string instance will have integrity across contexts, such as between invocations or when passed between processes (note the section below on crossing context boundaries). A drawback is in cases there is no language support, the strings are typically ad hoc so the guarantee of distinctness becomes merely a contract with the programmer.
Consequentiality
@@ -396,7 +406,7 @@
- When utilizing memory addresses as symbols in a virtual memory environment, the convention is to disallow addresses in one process from being used in another. If that isolation is insufficient, it is often adequate to use indexes instead of addresses, taking the address to the base of the data structure. Though the absolute address of the data structure might differ across contexts, the relative offset remains constant. Another approach is to reserve memory address blocks and to guarantee imported pages have the exact same addresses as before, though they might be imported sequentially to reuse the memory block. In architecture, this is generally known as the pointer swizzling problem.
+ When utilizing memory addresses as symbols in a virtual memory environment, the convention is to disallow addresses in one process from being used in another. If that isolation is insufficient, it is often adequate to use indexes instead of addresses, taking the address to the base of the data structure. Though the absolute address of the data structure might differ across contexts, the relative offset remains constant. Another approach is to reserve memory address blocks and to guarantee imported pages have the exact same addresses as before, though they might be imported sequentially to reuse the memory block. In architecture, this is generally known as the pointer swizzling problem.
Alphabet
@@ -408,35 +418,35 @@
Examples
- The enum of C is used to make alphabets of named symbols. Each entry in the enum is a static symbol factory, and instances are distinct integers.
+ The enum of C is used to make alphabets of named symbols. Each entry in the enum is a static symbol factory, and instances are distinct integers.
-
+
+ /* The enum definition acts as the factory. */
typedef enum {
- SYMBOL_EMPTY = 0,
- SYMBOL_ZERO = 1,
- SYMBOL_ONE = 2,
- SYMBOL_A = 3,
- SYMBOL_B = 4
+ SYMBOL_EMPTY = 0,
+ SYMBOL_ZERO = 1,
+ SYMBOL_ONE = 2,
+ SYMBOL_A = 3,
+ SYMBOL_B = 4
} TapeAlphabet;
- /* The enum definition acts as the factory. */
/* Instantiating copies of the symbols: */
TapeAlphabet cell_1 = SYMBOL_A;
TapeAlphabet cell_2 = SYMBOL_A;
/* Equality comparison over instances */
if (cell_1 == cell_2) {
- /* Evaluates to True */
+ /* Evaluates to True */
}
-
+
- The enum is a static alphabet made by the compiler, where symbol instances are integers. In the following example, the alphabet is made dynamically, where each symbol instance is a string pointer.
+ The enum is a static alphabet made by the compiler, where symbol instances are integers. In the following example, the alphabet is made dynamically, where each symbol instance is a string pointer.
- In this interpretation of the Turing Machine, the architecture utilizes a single-ended tape, as done in Hopcroft and Ullman's book . If a computation strictly requires a two-way infinite tape, the single-ended tape can simulate 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 simulation 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 inconsequential variation of the two-way tape machine.
+ In this interpretation of the Turing Machine, the architecture utilizes a single-ended tape, as done in Hopcroft and Ullman's book . If a computation strictly 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 inconsequential variation of the two-way tape machine.
- Furthermore, this definition adopts the language of hardware specification rather than formal mathematics. Because this is strictly a terminology change with direct correspondences between operations, the resulting model remains isomorphic to the Hopcroft and Ullman definition. Adopting this architectural perspective facilitates the overarching goal of building downward toward a computer architecture, rather than strictly preparing for highly abstract mathematical analysis, though it certainly does not preclude such analysis. In this model, the structural components are read-only, while the memory components will have data flowing through them. As detailed in the control procedures below, data flows dynamically at the command of the programmed controller.
+ Furthermore, this definition adopts the language of hardware specification rather than formal mathematics. Because this is strictly a terminology change with direct correspondences between operations, the resulting model remains isomorphic to the Hopcroft and Ullman definition. Adopting this architectural perspective facilitates the overarching goal of building downward toward a computer architecture, rather than strictly preparing for highly abstract mathematical analysis, though it certainly does not preclude such analysis. In this model, the structural components are read-only, while the memory components will potentially have data flowing through them. As detailed in the control procedures below, data flows dynamically at the command of the programmed controller.
@@ -521,21 +531,21 @@
The Turing Machine consists of:
-
a read-only alphabet that instances can be made from
-
a read-only empty-symbol that instances can be made from
-
a constant tape consisting of read-writable cells
-
a read-only left from leftmost error symbol that instances can be made from
-
a head bearing tape transport mechanism
-
a read-writable single symbol read data buffer
-
a constant state machine programmed controller with states that can be referenced
-
a constant initial-state reference
-
a constant halt-state reference
-
a read-writable current-state reference variable
-
a constant procedure where each step can be referenced
-
a read-writable procedure step reference counter
-
a read-only clock to synchronize control and to cause counting until the halt state is reached.
-
a fixed hardware comparator to evaluate state and symbol equivalencies
-
a reset button that activates logic that initializes the machine
+
a read-only alphabet that instances can be made from
+
a read-only empty-symbol that instances can be made from
+
a constant tape consisting of read-writable cells
+
a read-only left from leftmost error symbol that instances can be made from
+
a head bearing tape transport mechanism
+
a read-writable single symbol read data buffer
+
a constant state machine programmed controller with states that can be referenced
+
a constant initial-state reference
+
a constant halt-state reference
+
a read-writable current-state reference variable
+
a constant operation procedure where each step of the procedure can be referenced
+
a read-writable procedure step reference counter
+
a read-only clock to synchronize control and to cause counting until the halt state is reached.
+
a fixed hardware comparator to evaluate state and symbol equivalencies
+
a reset button that activates logic that initializes the machine
Each highlighted term is a short name for the associated item.
@@ -561,19 +571,11 @@
- The constant procedure should not be conflated with the Turing Machine program. For a microcode controlled machine, the procedure will be found in microcode memory, and it will be execute as though a program. Each line of the procedure, when read, results in a set of bits being connected to the machine's control lines. Some of those control lines will control what the procedure does, and some will extend out into the data path and be used to configure execution units and gate data on to busses.
+ The constant operation procedure should not be conflated with the Turing Machine program. For a microcode controlled machine, the procedure will be found in microcode memory, and it will be execute as though a program. Each line of the procedure, when read, results in a set of bits being connected to the machine's control lines. Some of those control lines will control what the procedure does, and some will extend out into the data path and be used to configure execution units and gate data on to busses.
- For a hardwired machine, the control program will be expressed
- with logic gates and flip-flops (single bit memory
- registers). Whether a machine is microcode controlled, or
- hardware controlled, is a question
- of implementation. The values on the
- control lines remain the same independent of those
- implementation decisions, so those decisions
- are inconsequential to our architecture
- discussion.
+ For a hardwired machine, the operation program will be expressed with logic gates and flip-flops (single bit memory registers). Whether a machine is microcode controlled, or hardware controlled, is a question of implementation. The values on the control lines remain the same independent of those implementation decisions, so those decisions are inconsequential to our architecture discussion.
@@ -583,15 +585,15 @@
The Turing Machine tape cell
- A cell is the square from Alan Turing's 1936 paper . A cell is a foundational mathematical object that has no meaning apart from its distinct identity and its capacity to hold specific properties. Due to its distinct identity, a cell can be referenced.
+ A cell is the square from Alan Turing's 1936 paper . A cell is a foundational mathematical object that has no meaning apart from its distinct identity and its capacity to hold specific properties. Due to its distinct identity, a cell can be referenced.
- A leftmost cell possesses exactly two compulsory properties: a right neighbor and data. A rightmost cell also possesses exactly two compulsory properties: a left neighbor and data. An interstitial cell possesses three compulsory properties: a left neighbor, a right neighbor, and data. While an island cell has a single compulsory property, that of data.
+ A leftmost cell possesses exactly two compulsory properties: a right neighbor and data. A rightmost cell also possesses exactly two compulsory properties: a left neighbor and data. An interstitial cell possesses three compulsory properties: a left neighbor, a right neighbor, and data. While an island cell has a single compulsory property, that of data.
- Said neighbor properties are singular. When the left neighbor property is present, there is exactly one left neighbor, and when the right neighbor property is present, there is exactly one right neighbor. Said data property is restricted to being either an instance of an alphabet symbol, or alternatively, an instance of the empty-symbol.
+ Said neighbor properties are singular. When the left neighbor property is present, there is exactly one left neighbor, and when the right neighbor property is present, there is exactly one right neighbor. Said data property is restricted to being either an instance of an alphabet symbol, or alternatively, an instance of the empty-symbol.
The Turing Machine tape
@@ -600,7 +602,7 @@
- Once a tape is defined, properties cannot be added nor removed from the constituent cells. Further, the neighbor properties definitions are fixed. Cells don't move, new cells cannot be added, and cells existing on the tape cannot be removed. We can say that a Turing Machine tape has a constant, fixed, linear topology.
+ Once a tape is defined, properties cannot be added nor removed from the constituent cells. Further, the neighbor properties definitions are fixed. Cells don't move, new cells cannot be added, and cells existing on the tape cannot be removed. We can say that a Turing Machine tape has a constant, fixed, linear topology.
@@ -622,7 +624,7 @@
The Turing Machine tape head
- The tape head consists of a reference to exactly one of the tape cells and a set of four functions: read, write, step-left, and step-right. In addition, the tape head can throw an error, left-of-leftmost, if the Turing Machine attempts to step left from the leftmost cell. When stepping, the cell reference in the head is updated based on the neighbor properties of the currently referenced cell. The cell referenced by the head is called the cell the head is on, or more simply, the head cell.
+ The tape head consists of a reference to exactly one of the tape cells and a set of four functions: read, write, step-left, and step-right. In addition, the tape head can throw an error, left-of-leftmost, if the Turing Machine attempts to step left from the leftmost cell. When stepping, the cell reference in the head is updated based on the neighbor properties of the currently referenced cell. The cell referenced by the head is called the cell the head is on, or more simply, the head cell.
@@ -632,7 +634,7 @@
Area and partitions
- We call a subset of contiguous cells from a tape an area of said tape. A tape partition is a set of areas that completely span a tape. For any partition of a single-ended Turing Machine tape, at least one of the areas will necessarily be infinite.
+ We call a subset of contiguous cells from a tape an area of said tape. A tape partition is a set of areas that completely span a tape. For any partition of a single-ended Turing Machine tape, at least one of the areas will necessarily be infinite.
Head partition
@@ -640,7 +642,7 @@
The left side: a potentially empty finite set containing all of the cells to the left of the head cell.
Head: the head cell.
-
The right side: the infinite set extending from the right neighbor of the head cell.
+
The right side: the infinite set extending rightward from the right neighbor of the head cell.
Leftmost/remaining partition
@@ -667,7 +669,7 @@
The impossibility of recognizing an empty tape
- Recognition is a process where a Turing Machine decides if a pattern is present on a tape solely by reading symbols found on the tape. No meta-information, such as a message communicating something about the area being examined or the nature of the program that wrote the symbols, can be taken into account.
+ Recognition is a process where a Turing Machine decides if a pattern is present on a tape solely by reading symbols found on the tape. No meta-information, such as a message communicating something about the area being examined or the nature of the program that wrote the symbols, can be taken into account.
@@ -703,18 +705,18 @@
In-band and out-of-band control
- In-band control occurs when control signals or structural metadata are mixed directly into the same channel and alphabet as the data payload. In-band signaling leads to ambiguities between what is control and what is data. As we saw, there are cases a recognizer, i.e. merely examining the data, is not capable of resolving even the simplest of control questions. A conventional approach for resolving these ambiguities makes use of escape sequence schemes that grow in length as the levels of communication grow. This has always been an after thought, a sort of hack.
+ In-band control occurs when control signals or structural metadata are mixed directly into the same channel and alphabet as the data payload. In-band signaling leads to ambiguities between what is control and what is data. As we saw, there are cases a recognizer, i.e. merely examining the data, is not capable of resolving even the simplest of control questions. A conventional approach for resolving these ambiguities makes use of escape sequence schemes that grow in length as the levels of communication grow. This has always been an after thought, a sort of hack.
- In contrast, out-of-band control communicates structural information through a strictly separate channel or by utilizing symbols definitively excluded from the programmer-visible data alphabet. The rightmost tape marker is an out-of-band mechanism because it utilizes an expanded hardware tape alphabet strictly reserved for machine management, guaranteeing it can never be conflated with the user's data. Modern architectures often do not have the luxury of inventing new symbols to serve as control rather than data. Another out-of-band signaling technique is to structure the data into channels; such structure is called formatting. We find formatting on hard drives, in frame-based and packet-based communication channels, and in data structures.
+ In contrast, out-of-band control communicates structural information through a strictly separate channel or by utilizing symbols definitively excluded from the programmer-visible data alphabet. The rightmost tape marker is an out-of-band mechanism because it utilizes an expanded hardware tape alphabet strictly reserved for machine management, guaranteeing it can never be conflated with the user's data. Modern architectures often do not have the luxury of inventing new symbols to serve as control rather than data. Another out-of-band signaling technique is to structure the data into channels; such structure is called formatting. We find formatting on hard drives, in frame-based and packet-based communication channels, and in data structures.
The programmed controller
- There are two distinct centers of logical control for the Turing Machine. The one we are most familiar with from the many descriptions of the Turing Machine in papers is called the 'state controller'; however, this term becomes confusing when we realize there are additional controllers involved. Hence, we call this component the programmed controller. It is customized for each different problem the Turing Machine will work on, while the other controllers give the Turing Machine its fixed characteristics.
+ There are two distinct centers of logical control for the Turing Machine. The one we are most familiar with from the many descriptions of the Turing Machine in papers is called the 'state controller'; however, this term becomes confusing when we realize there are additional controllers involved. Hence, we call this component the programmed controller. It is customized for each different problem the Turing Machine will work on, while the other controllers give the Turing Machine its fixed characteristics.
Components
@@ -816,14 +818,14 @@
- For a real machine, the step pulse will be derived from the machine clock. The clock will have a constant period, so there is a constant duration of time that will be the same for each pass through the execution procedure. Thus, if we replace the step count with a count of clock ticks, we will get the same decider and complexity results as we would have from step counts. This fits the definition we have been using for inconsequential.
+ For a real machine, the step pulse will be derived from the machine clock. The clock will have a constant period, so there is a constant duration of time that will be the same for each pass through the execution procedure. Thus, if we replace the step count with a count of clock ticks, we will get the same decider and complexity results as we would have from step counts. This fits the definition we have been using for inconsequential.
An alternative: stored program and sequencer
- The Universal Turing Machine, proposed by Alan Turing, introduced a profound architectural inversion: relocating the defining state tables from hardwired logic, or manually configured patch panels, directly onto the tape itself. This enables replacing the custom programmed controller with a fixed controller that derives its behavior dynamically from the tape data. Consequently, a single, immutable hardware architecture can simulate the execution of any conceivable Turing Machine.
+ The Universal Turing Machine, proposed by Alan Turing, introduced a profound architectural inversion: relocating the defining state tables from hardwired logic, or manually configured patch panels, directly onto the tape itself. This enables replacing the custom programmed controller with a fixed controller that derives its behavior dynamically from the tape data. Consequently, a single, immutable hardware architecture can simulate the execution of any conceivable Turing Machine.
@@ -831,7 +833,7 @@
- We can optimize this representation. Instead of storing the state tables verbatim, we can list a sequence of instructions directly on the tape. To achieve this, the architecture expands to support two distinct categories of instructions: the physical tape transport instructions we defined previously, and a newly introduced category of control instructions. The programmed controller is then replaced with a fixed hardware controller called a sequencer.
+ We can optimize this representation. Instead of storing the state tables verbatim, we can list a sequence of instructions directly on the tape. To achieve this, the architecture expands to support two distinct categories of instructions: the physical tape transport instructions we defined previously, and a newly introduced category of control instructions. The programmed controller is then replaced with a fixed hardware controller called a sequencer.
@@ -896,15 +898,15 @@
That includes sets. When two current state sets have the same members, we say they are instances of the same state. When they have different members we say they are different states.
- Orders of analysis
+ Orders of analysis
-
Turing Machines that halt in finite number of steps for any finite input withing a stipulated domain are said to be computational over that domain. It is also the case that for any given non-computational Turing Machine over a given domain there will exist at least one input for which the machine will never halt.
+
Turing Machines that halt in finite number of steps for any finite input withing a stipulated domain are said to be computational over that domain. It is also the case that for any given non-computational Turing Machine over a given domain there will exist at least one input for which the machine will never halt.
-
By analyzing a machine we might learn that some machine, say M, is conditionally computational on a given set of inputs, say I.
+
By analyzing a machine we might learn that some machine, say M, is conditionally computational on a given set of inputs, say I.
-
Then in case of the strongest delineation, computation will not halt for members of I, or it might be the case that we don't know about the inputs in I, or that I analysis shows that I can be broken into two sets, inputs for which computation will not stop for, and those for which analysis does not provide an answer.
+
Then in case of the strongest delineation, computation will not halt for members of I, or it might be the case that we don't know about the inputs in I, or that I analysis shows that I can be broken into two sets, inputs for which computation will not stop for, and those for which analysis does not provide an answer.
-
To analyze a given First Turing Machine we do not execute it, but instead we place its definition on the tape as input for a second Turing Machine to analyze.
+
To analyze a given First Turing Machine we do not execute it, but instead we place its definition on the tape as input for a second Turing Machine to analyze.
We might also add on the input tape to the first Turing Machine another Turing Machine that defines the language input to the first Turing Machine, otherwise we have to assume that any input is possible.
@@ -920,19 +922,19 @@
- Addresses and cells
+ Addresses and cells
Natural Number, address
-
We can define a Turing Machine that is identical to the recursive definition of Natural Numbers as given by Peano.
+
We can define a Turing Machine that is identical to the recursive definition of Natural Numbers as given by Peano.
As the Natural Numbers never end, we cannot run this machine to a halting point, but we can analyze it.
-
As such we can assign a Natural Number to each member of the tape sequence. We will call the machine that does this the address machine.
+
As such we can assign a Natural Number to each member of the tape sequence. We will call the machine that does this the address machine.
-
Since multiple tape Turing Machines are equivalent to a single tape Turing Machines, we begin with the simplification and say that our address machine has two tapes. One we will call the main tape. We will assign addresses to the elements on the main tape.
+
Since multiple tape Turing Machines are equivalent to a single tape Turing Machines, we begin with the simplification and say that our address machine has two tapes. One we will call the main tape. We will assign addresses to the elements on the main tape.
-
The second tape we will call the address tape. It is initially empty.
+
The second tape we will call the address tape. It is initially empty.
The controller makes use of our increment routine for unary numbers which we described earlier.
@@ -944,21 +946,21 @@
Though we can never run this machine to the point where it halts, we may analyze the Natural Number machine and reason about it.
-
As one example, we can take a first given Turing Machine with itâs head somewhere on a tape, encode that machine and its state, and also encode an address machine, and provide these two machines to a third machine, one called address-of.
+
As one example, we can take a first given Turing Machine with itâs head somewhere on a tape, encode that machine and its state, and also encode an address machine, and provide these two machines to a third machine, one called address-of.
-
The address-of machine can then run the address machine while stepping the head left on the first given machine.
+
The address-of machine can then run the address machine while stepping the head left on the first given machine.
At the point where the next left step would cause a left of leftmost error, the address will appear on the address tape of the address machine.
Distance
-
The distance between two elements is defined to be the difference in their corresponding addresses.
+
The distance between two elements is defined to be the difference in their corresponding addresses.
Area and length
-
An area is a subsequence of cells on a tape. An area has permission to be defined using two addresses. The first address being that of the leftmost cell in the area, and the second address being that of the rightmost cell in the area.
+
An area is a subsequence of cells on a tape. An area has permission to be defined using two addresses. The first address being that of the leftmost cell in the area, and the second address being that of the rightmost cell in the area.
-
The length of an area is one greater than the distance between the address of the leftmost cell of the area, and that of the rightmost cell of the area.
+
The length of an area is one greater than the distance between the address of the leftmost cell of the area, and that of the rightmost cell of the area.
Hence the smallest length that an area has permission to have is 1. This occurs when the address to the leftmost cell is the same as the address to the rightmost cell, i.e. when there is only one cell.
@@ -966,7 +968,7 @@
This might be a property of the values in the cells, or a property of the addresses of cells.
-
An abstract area can be colored by a property detecting machine.
+
An abstract area can be colored by a property detecting machine.
Such a machine would start at the leftmost cell, check the value in that cell for the given property and mark it accordingly. It would then step right and repeat.
@@ -978,7 +980,7 @@
Abstract areas have permission to also be defined based on functions of cell values that include context.
-
When the cells in an abstract area are contiguous, we say that the area is compact.
+
When the cells in an abstract area are contiguous, we say that the area is compact.
An example of an area that is excluded from being compact is that of the odd addressed cells.
@@ -1008,11 +1010,11 @@
In the second case, once the area is found, it is open on the right and it never ends.
-
We might say that inputs that have no leftmost symbol have an area of zero length.
+
We might say that inputs that have no leftmost symbol have an area of zero length.
This is an abstract concept, because our area marking and area measuring machines will never be run then halt and return a length measure of zero.
-
Instead we might arrive at this conclusion that a non-existent area has zero length through inductive reasoning: Say we have an area of length i, and then remove one element from the area, then it has length i-1.
+
Instead we might arrive at this conclusion that a non-existent area has zero length through inductive reasoning: Say we have an area of length i, and then remove one element from the area, then it has length i-1.
As we repeat this, then eventually we will have an area of length 1 as discovered by our length assigning machine. Now we remove 1 more element.
@@ -1050,25 +1052,25 @@
Let us ask a question, what is it that an address is actually locating? Let us consider this question in the light of an example. Suppose we have the tape sequence of:
-
+
a, b , c, ε, ε, ε â¦
-
+
-
Now consider that we have an address of '2'. If we read tape address 2 we get back the letter 'c'. So the address is locating the 'c'. Now suppose we write at address 2. Say we write 'γ'. Now our sequence is:
+
Now consider that we have an address of '2'. If we read tape address 2 we get back the letter 'c'. So the address is locating the 'c'. Now suppose we write at address 2. Say we write 'γ'. Now our sequence is:
-
+
a, b , γ, ε, ε, ε â¦
-
+
-
Now we write 'Ð', resulting in the sequence:
+
Now we write 'Ð', resulting in the sequence:
-
+
a, b , Ð, ε, ε, ε â¦
-
+
-
It would appear that the answer to our question is that address 2 is locating different things at different times. First it was, c, then γ, then Ð. Yet the address did not change. It feels a little unsatisfactory to suggest that our concept of location depends on the value addressed. Also, notice, that when we made the Natural Number Turing Machine, that the values on the tape that was placed into correspondence with the Natural Numbers were never mentioned. Yet, we can't seem to answer the question of 'what is being addressed' without giving a value.
+
It would appear that the answer to our question is that address 2 is locating different things at different times. First it was, c, then γ, then Ð. Yet the address did not change. It feels a little unsatisfactory to suggest that our concept of location depends on the value addressed. Also, notice, that when we made the Natural Number Turing Machine, that the values on the tape that was placed into correspondence with the Natural Numbers were never mentioned. Yet, we can't seem to answer the question of 'what is being addressed' without giving a value.
-
Addresses speak to the structure of the tape rather than the values held on the tape. So as to facilitate this interpretation, we note that a sequence consists of a sequence of cells holding elements, rather than being simply a sequence of elements. Given the concept of a cell we can say that an address always locates the same cell, though the contents of that cell can change.
+
Addresses speak to the structure of the tape rather than the values held on the tape. So as to facilitate this interpretation, we note that a sequence consists of a sequence of cells holding elements, rather than being simply a sequence of elements. Given the concept of a cell we can say that an address always locates the same cell, though the contents of that cell can change.
This operates similarly to a small extension to the already existing concept of a variable in mathematics. In mathematics we allow that a variable can take on different values, though its name never changes. Now we are going to say that a cell can take on different values, though its address never changes. Furthermore, as the cell is part of the sequence, we are going to say the cell itself has a left neighbor or right neighbor, excluding the value in the cell.
@@ -1130,7 +1132,7 @@
- Multiple machines and sharing tapes
+ Multiple machines and sharing tapes
Suppose we unmount a tape from a halted Turing Machine, say machine T0, and then mount the tape on another Turing Machine as input, say machine T1. Suppose we do this so that machine T1 may calculate the length of the output made by the first machine. When we do this, we run into some problems.
@@ -1142,15 +1144,15 @@
Once an input tape is mounted, T0 is a computational TTCA machine given a finite tape, its output is a finite tape, and that is taken to be the input for T1.
-
T0 is required to provide meta information about the length of the active area. This approach is known as in-band signaling. Because length information is mixed with the data.
+
T0 is required to provide meta information about the length of the active area. This approach is known as in-band signaling. Because length information is mixed with the data.
-
T0 updates a dedicated table where it keeps track of the location of data objects and their lengths. Such a table is called a symbol table, and such a system is called a type system. This is written to a separate tape, or it is inserted at a known location on the main tape. In the case it is written to the front of the tape, the data following will have to be moved when the table grows. In the case it is written at the end of the tape, the table will have to be moved when the data grows. In either case the symbol table entry lengths themselves must also be managed, typically they are either coded into the controller or make use of in band signaling. It is conceivable that a symbol table would describe itself.
+
T0 updates a dedicated table where it keeps track of the location of data objects and their lengths. Such a table is called a symbol table, and such a system is called a type system. This is written to a separate tape, or it is inserted at a known location on the main tape. In the case it is written to the front of the tape, the data following will have to be moved when the table grows. In the case it is written at the end of the tape, the table will have to be moved when the data grows. In either case the symbol table entry lengths themselves must also be managed, typically they are either coded into the controller or make use of in band signaling. It is conceivable that a symbol table would describe itself.
-
We adopt a convention of maintaining a compact tape. As such we have no embedded empty-symbols in the active area. Then the empty-symbol marks the end of the active area.
+
We adopt a convention of maintaining a compact tape. As such we have no embedded empty-symbols in the active area. Then the empty-symbol marks the end of the active area.
Each machine has two tapes, an input tape, and an output tape.
-
A compact area is one that has only alphabet symbols (no empty-symbols). We can extend this concept to say that the density of an area is the ratio of alphabet symbols to empty-symbols.
+
A compact area is one that has only alphabet symbols (no empty-symbols). We can extend this concept to say that the density of an area is the ratio of alphabet symbols to empty-symbols.
The approach we use in modern computing is often the 3nd one listed above, that of the type system. We carefully account for the length of each instance of data. Then we build up each larger instance from smaller ones, and while doing so, we add the lengths of the smaller instances to calculate the length of the larger instance. All programs then specify when they make or compose instances and their types.
@@ -1164,17 +1166,17 @@
The advantage of having multiple tape machines each perhaps having multiple tapes is that sometimes it is easier to think about. It is a method of partitioning the problem.
-
Suppose our machines have two tapes where one is called the input tape, and the other tape the output tape. Our procedure for passing tapes between machines will consist of umounting the tape from the source machine, then taking that tape over to the destination machine and mounting it as the input tape.
+
Suppose our machines have two tapes where one is called the input tape, and the other tape the output tape. Our procedure for passing tapes between machines will consist of umounting the tape from the source machine, then taking that tape over to the destination machine and mounting it as the input tape.
- Some properties of Turing Machines
+ Some properties of Turing Machines
For a given Turing Machine, the input is the sole determiner of the output. I.e. each time the same input is given, we get the same output. The input and output are mathematical objects, hence Turing Machines are functions. However, it is common in computer science to speak of Turing Machines as 'solving problems' rather than saying they are functions. This is because we often think of the inputs and outputs of Turing Machines as being something other than mathematical objects. For example, when a Turing Machine sorts sequences found on its input, we might say that it solves a sorting problem.
Turing Machines will differ due to differing alphabets, state controller graphs, associated commands, start, and halt states. The choice of empty-symbol is inconsequential as long as it is distinct from the alphabet. As we will see in the later discussion on variations, the choice of alphabet is not very important. For two alphabets of the same cardinality we can setup a one to one mapping, and for those of differing cardinalities we can use sequences of alphabet symbols that map to alphabet symbols. For example, given an alphabet of âTâ and âFâ, and a second alphabet of âtâ, âfâ, âxâ, âzâ we may make the following map:
-
+
f
| FF
@@ -1186,7 +1188,7 @@
z
| FF
-
+
Then given this mapping, we may use two cells for each one cell for any {âfâ, âtâ, âxâ, âzâ} alphabet machine, and then use the only the {âTâ, âFâ} alphabet.
@@ -1194,11 +1196,11 @@
There might be multiple Turing Machines that perform the same function. A set of such machines forms a functional equivalence class. Within a functional class there will be a class of members related in that they all use the smallest number of steps when considered against the limit of input length. We discuss this further in the section on complexity.
-
Of special importance to computation theory is the existence among all these infinite Turing Machines of a class of machines that read their state controller definition from the tape as an input. This is the Universal Turing Machine class.
+
Of special importance to computation theory is the existence among all these infinite Turing Machines of a class of machines that read their state controller definition from the tape as an input. This is the Universal Turing Machine class.
- Performance Analysis
+ Performance Analysis
An interesting aspect of the Turing Machine procedure is that it introduces the concept of stepping the machine. With the addition of some simple constraints it becomes possible to map the parts of the Turing Machine abstraction to the parts of some real machines. These constraints may take the form of such things as bounds on the length of the inputs, or the addition of out-of-resource errors. Because such constraints do not affect the 'normal' workings of the machine, the derived relationship between a Turing Machine step, and that of a unit of real time might not be that complicated. Indeed, except for some enumerable cases this relationship might even be so simple as to assign to a step an approximately constant amount of time.
@@ -1208,15 +1210,15 @@
To derive time complexity we typically start with a step count formula which maps the length of Turing Machine input to the worst case largest number of steps. We then consider the behavior of this formula as input length goes towards infinity. To get this, we take the highest order term from the step count formula. Conventional results are constant time, polynomial time, or exponential time.
-
We can derive the 'worst case length of the area written or read by the machine during computation' function in an analogous manner as for the step count function. This function is known as the space complexity. We may also consider the limiting behavior of this function to derive an order of space complexity.
+
We can derive the 'worst case length of the area written or read by the machine during computation' function in an analogous manner as for the step count function. This function is known as the space complexity. We may also consider the limiting behavior of this function to derive an order of space complexity.
-
The order of time or space complexity will remain the same against certain variations of our Turing Machine definition. For example, if we double all the states by adding a second state that we always visit, where this second state does nothing, the number of steps would double but the functionality would not change. Order of complexity also would not change. A fixed time machine before doubling up on the states would still be a fixed time machine afterward. It is simply that the number of steps would be twice as large, but still a fixed number relative to the size of the input. A polynomial time machine would still be polynomial time, simply with double size constants. We say that changes which do not change order of complexity, nor existence proofs, are inconsequential.
+
The order of time or space complexity will remain the same against certain variations of our Turing Machine definition. For example, if we double all the states by adding a second state that we always visit, where this second state does nothing, the number of steps would double but the functionality would not change. Order of complexity also would not change. A fixed time machine before doubling up on the states would still be a fixed time machine afterward. It is simply that the number of steps would be twice as large, but still a fixed number relative to the size of the input. A polynomial time machine would still be polynomial time, simply with double size constants. We say that changes which do not change order of complexity, nor existence proofs, are inconsequential.
Suppose we have a complete Turing Machine functionality class. We say that it is complete because all possible machines for implementing the function are in this class. Some machines in this class will have a different order of time complexity than others. Now we consider the set of minimum order of time complexity machines from this class. As the larger set was complete, the set built against this constraint will also be complete relative to the constraint. We then say that this minimum order of time complexity is a property of the problem being solved, rather than being a property of a particular machine.
In the first section of this chapter we gave a rather conventional definition for a Turing Machine. In the prior section, Complexity, we noted that we can analyze Turing Machines to find their time and space complexities. In this section we will discuss some variations that a person finds in the literature.
@@ -1252,7 +1254,7 @@
However we can add a constraint on all Turing Machine controllers that requires of controllers that they never write the empty-symbol, and always write an alphabet symbol to a cell before reading it. Then, because a cell is never read before being written, it does not matter what we write into it for initialization. We may even use an alphabet symbol. Consequently this constraint allows us to eliminate the empty-symbol. This gives us the following Turing Machine variation:
-
+
1. fixed finite alphabet
2. fixed write before read constraint
3. variable single ended tape
@@ -1264,7 +1266,7 @@
9. fixed halt state
10. variable current state
11. fixed procedure for using these.
-
+
To validate that this is an inconsequential Turing Machine variation, rather than a description of new abstraction that is not a Turing Machine, we must show two things: Firstly, that any of the now disallowed controllers never compute something that cannot be computed in the presence of the constraint. And secondly, that there are same complexity class alternatives for any disallowed controller.
@@ -1296,7 +1298,7 @@
I propose the following Turing Machine variation:
-
+
fixed finite alphabet
write before read constraint
variable and extendable finite tape
@@ -1309,23 +1311,23 @@
fixed halt state
variable current state
fixed procedure for using these
-
+
In our original Turing Machine model, the controlling state machine commands were limited to, do-nothing, step-left, step-right, write, with reading as an implied command. To this list we add append. The append command may only be called when the head is on the rightmost tape cell. This is not limiting because the command may be called from a state that is at the end of an arc triggered by the right from rightmost error. When we have no empty-symbol, append accepts an alphabet symbol and performs a write into the new cell. This is not limiting because if need be, a person can always perform an extraneous write of an alphabet symbol.
-
With this extendable tape model all Turing Machine components remain finite during computation, though some are arbitrarily large. This variation is more suited for creating a mapping between a Turing Machine and a real program running on a real machine. Specifically, a computation requiring N cells maps exactly to a physical machine possessing at least N cells. The theoretical model and the physical implementation remain perfectly isomorphic provided the physical environment does not exhaust its memory bounds. Because a computational TTCA machine demands strictly finite tape extensions, a physical machine that completes the execution maintains exact structural correspondence. This isomorphism holds continuously as long as memory remains available, even accommodating dynamic hardware expansion such as memory hot-swapping. The theoretical correspondence fails solely upon a hard physical limit being reached during execution.
+
With this extendable tape model all Turing Machine components remain finite during computation, though some are arbitrarily large. This variation is more suited for creating a mapping between a Turing Machine and a real program running on a real machine. Specifically, a computation requiring N cells maps exactly to a physical machine possessing at least N cells. The theoretical model and the physical implementation remain perfectly isomorphic provided the physical environment does not exhaust its memory bounds. Because a computational TTCA machine demands strictly finite tape extensions, a physical machine that completes the execution maintains exact structural correspondence. This isomorphism holds continuously as long as memory remains available, even accommodating dynamic hardware expansion such as memory hot-swapping. The theoretical correspondence fails solely upon a hard physical limit being reached during execution.
More about commands
The Turing Machine state controller has a command symbol tied to each state. The Turing Machine procedure then has us take action based on this symbol. This is our current command set:
-
+
step-right, causes the head to move to the right neighbor cell.
step-left, causes the head to move to the left neighbor cell.
read, returns the symbol under the head. The returned symbol is then used to chose the transition arc.
write(x), causes the symbol x to be written to the cell that the head is currently on. The symbol x is any symbol from the alphabet.
append(x) may only be called when on the rightmost cell. Extends the tape by one cell, and writes the symbol x into that cell, where x is any symbol from the alphabet.
-
+
We are going to relieve the constraint that append can only occur from rightmost. Our new append is functionally identical to adding a cell to the rightmost extremity, and then shifting all the symbols over by one cell starting at the new cell and ending when the new rightmost has been written - and then doing the requested write of x on the right neighbor cell.
@@ -1335,7 +1337,7 @@
In cases where successive states are visited in a fixed order it is convenient to combine the commands. We have developed the concept of a command statement to support this:
-
+
statement::[direction]command+[modifier][&contract]*[arg]*
direction::- | ε
command::r | w | s | a | d | m | e | â¥
@@ -1364,13 +1366,13 @@
to derive a longer command, combine them:
as ; append then step
-a-s ; append to the left, step to the left
-
+
The left direction is specified with a minus sign, otherwise the direction is taken as right going. So the letter s is the step-right command, and -s is the step-left command. The command s3 steps right three times.
-
The command a appends and writes a new cell to the right of the head. We use two special characters from the UTF character set to signify the rightmost and leftmost of the tape. This one looks like a little tape with its left cell inked in, â§, so we use it to stand for leftmost. We use this one, â¨, to mean rightmost. Hence a⨠makes a new rightmost cell, and aâ§ makes a new leftmost cell.
+
The command a appends and writes a new cell to the right of the head. We use two special characters from the UTF character set to signify the rightmost and leftmost of the tape. This one looks like a little tape with its left cell inked in, â§, so we use it to stand for leftmost. We use this one, â¨, to mean rightmost. Hence a⨠makes a new rightmost cell, and aâ§ makes a new leftmost cell.
-
In some cases it is possible to implement higher performance implementations for commands when the programmer tells us some additional information. For example aâ¨&h⨠has identical functionality as aâ¨, while the programmer also guarantees that we are on the rightmost cell. This saves the function from having to scan to the end of the tape.
+
In some cases it is possible to implement higher performance implementations for commands when the programmer tells us some additional information. For example aâ¨&h⨠has identical functionality as aâ¨, while the programmer also guarantees that we are on the rightmost cell. This saves the function from having to scan to the end of the tape.
We can concatenate the command letters into a string to summarize what would happen sequentially in adjacent state transitions. If these compound commands need arguments, then they are pulled from the argument list in order as they are needed. For example, as means to append, with the parameter for the append taken from the argument list, and then to step.
@@ -1386,7 +1388,7 @@
The original Turing Machine had an infinite tape. In contrast the TTCA machine has a surprising property: for computational problems all of its components remain finite. This follows from the fact that during computation a machine makes a finite number of steps, so the tape can only be expanded to be a finite size.
- Consequentiality across the design abstraction stack
+ Consequentiality across the design abstraction stack
Dhoice of realization
@@ -1416,7 +1418,7 @@
- At this point we have arrived at questions of the physics of computation. The above analysis made use of classical physics. Perhaps realizations based directly on principles from Quantum physics models will be computation theoretic consequential.
+ At this point we have arrived at questions of the physics of computation. The above analysis made use of classical physics. Perhaps realizations based directly on principles from Quantum physics models will be computation theoretic consequential.
@@ -1427,7 +1429,7 @@
- The Harvard Mark I machine had a main axle speed that maxed out at 3000 RPMs, say 2700 RPMs to keep our math simple. Then this is 2700 steps per minute. The ENIAC was a similar implementation, but one that called out the use of circular shift registers of vacuum tubes instead of mechanical gears. Because there were 10 tubes in a ring register, it took 10 clock ticks to complete one 'rotation'. The clock rate maxed out at 450 kilohertz. That would be one rotation every 1/45,000 of a second, or 2.7 million RPMs, an improvement of three orders of magnitude!
+ The Harvard Mark I machine had a main axle speed that maxed out at 3000 RPMs, say 2700 RPMs to keep our math simple. Then this is 2700 steps per minute. The ENIAC was a similar implementation, but one that called out the use of circular shift registers of vacuum tubes instead of mechanical gears. Because there were 10 tubes in a ring register, it took 10 clock ticks to complete one 'rotation'. The clock rate maxed out at 450 kilohertz. That would be one rotation every 1/45,000 of a second, or 2.7 million RPMs, an improvement of three orders of magnitude!
@@ -1481,7 +1483,7 @@
- Suppose that an organization keeps the operands for a function in a content-addressable memory. When the operands are recognized, it then immediately returns the looked-up value. This approach, called memoization, bypasses the internal looping of the function. Hence, this does participate in the decision making of a program, and could potentially change the computation theoretic complexity of programs with certain properties where the same operands occur in patterns and lead to an expensive computation. Memoization is typically designed into computer languages, rather than being built into the organization of a computer. Chances are, at the computer organization level or lower, it is more efficient to simply execute the presented instructions.
+ Suppose that an organization keeps the operands for a function in a content-addressable memory. When the operands are recognized, it then immediately returns the looked-up value. This approach, called memoization, bypasses the internal looping of the function. Hence, this does participate in the decision making of a program, and could potentially change the computation theoretic complexity of programs with certain properties where the same operands occur in patterns and lead to an expensive computation. Memoization is typically designed into computer languages, rather than being built into the organization of a computer. Chances are, at the computer organization level or lower, it is more efficient to simply execute the presented instructions.
Choice of architecture
@@ -1503,7 +1505,7 @@
- TTCA Turing Machine in Lisp
+ TTCA Turing Machine in Lisp
Because our TTCA Turing Machine has finite sized components, we may create a software model for the TTCA Turing Machine without having to make assumptions of the sort that âvery large approximates the infiniteâ. Rather we can show a one-to-one mapping of code and data in the software model and the TTCA variation of the Turing Machine. Consequently, the software model and theoretic model are isomorphic.
@@ -1533,7 +1535,7 @@
This is what it looks like when I follow install using the git clone method:
Notice I used git tag to see the releases. At this time, v0.7-alpha is the latest, so I checked that out. If you want the unstable latest code rather than the stable latest release, leave out the git checkout command.
@@ -1581,17 +1583,17 @@
In the file src-0/fundamental.lisp find synonym bindings for the usual operators and common symbols such as â§, â¨, â¥, â¤, λ, â , etc.
-
Specific to the library we use the character 'â§' as shorthand for 'leftmost'. This is because it looks like a little tape with the inked over cell being the leftmost cell. In the same manner the character 'â¨' is shorthand for rightmost.
+
Specific to the library we use the character 'â§' as shorthand for 'leftmost'. This is because it looks like a little tape with the inked over cell being the leftmost cell. In the same manner the character 'â¨' is shorthand for rightmost.
We use 'â' in continuation function names, and 'â³' as a loop operator.
-
The ⧠and ⨠symbols are used in compound command names and for access language statements to indicate operation on rightmost or leftmost rather than the cell the head is on, or, to specify contracts with the programmer of the sort: "this function is only called when the cell is on rightmost."
+
The ⧠and ⨠symbols are used in compound command names and for access language statements to indicate operation on rightmost or leftmost rather than the cell the head is on, or, to specify contracts with the programmer of the sort: "this function is only called when the cell is on rightmost."
Since I had symbols for leftmost and rightmost, I started using them generally to mean leftmost or rightmost wherever it was convenient. For example, to shorten up the names of continuations so that parameter lists would fit on a line.
In Lisp a quoted list is taken as being literal. However the result of modifying a literal is undefined, and often leads to bad results. Hence we provide the macro q which returns a quoted list which is not a literal.
-
+
* (q a b c)
(A B C)
-
+
{â¦} - unevaluated list
When a form enclosed in parentheses, ( ... ), is evaluated the head is taken as the name of a function, looked up and called. The list members are also evaluated, and then passed as arguments to said function. If we don't want the head treated specially, but rather want to define a list, we can use a front item of #'list, which is the function to create a list.
-
+
* (list 1 2 (+ 1 2))
(1 2 3)
-
+
We have defined a macro called L that like #'list, creates a list, but which also has some extra functionality.
-
+
* (L 1 2 (+ 1 2))
(1 2 3)
-
+
We also provide a reader macro for L as braces.
-
+
* {1 2 (+ 1 2)}
(1 2 3)
-
+
If the apparent function open, #'o, appears inside of a call to L, then the arguments of the #'o function are included directly in the resulting list:
-
+
* (defvar a {1 2 3})
A
* (defvar b {4 5 6})
B
* {a (o b)}
((1 2 3) 4 5 6)
-
+
Quoted non-literals can also occur within such an L list:
-
+
* {a (o b) (q a b)}
((1 2 3) 4 5 6 (A B))
* {a (o b) (o (q a b))}
((1 2 3) 4 5 6 A B)
-
+
L acts identically to a quasiquote turned inside out. Whereas the default in quasiquote is to quote items, and a comma operator turns that off, the default in L is to evaluate items, and a q operator turns that off. Quasiquote has an @ marker to open up lists, while L has an o operator to open up lists. Inside of a quasiquote we could get in trouble if the name of a variable starts with an @ character; if such a variable appears after a comma, quasi quote will consider the variable name without the @ sign is to be opened and included. There is no analogous problem with the o operator because it only appears in the function channel. (The problem with quasiquote is that it uses 'in-band signaling' which mixes control with data in one channel.).
@@ -1669,9 +1671,9 @@
In Lisp the head of an evaluated list is taken as a function name. Consider this example that curries a two parameter function into a unary function by replacing one parameter with a constant argument of 3:
-
+
(defun curry-three (f n) (f n 3)) ; has errors
-
+
When we compile this function we get two errors:
@@ -1685,12 +1687,12 @@
The Lisp operator #' indicates that the symbol that follows is a function name to be taken literally, and not a variable name. This gets our function name into the data space for use as an argument. The Lisp function funcall accepts as a first argument the name of a function to be called, while the remaining arguments are passed through to said function as its arguments:
-
+
(defun curry-three (f n) (funcall f n 3))
(defun plus (x y) (+ x y))
(curry-three #'plus 2)
5
-
+
In the definition for curry-three we do not get interpreter/compiler errors. This is because f is consistently used as a variable name. funcall will use the value of the variable f as the name of a function to call.
@@ -1702,10 +1704,10 @@
Actually we didn't need to define the function plus, because '+' is already a function. We don't have reserved operator symbols in Lisp, instead we have loose rules on what can be used for function names.
-
+
(curry-three #'+ 2)
5
-
+
We introduce a shortcut with the TM Library. Normally a list to be evaluated is in parenthesis, and its head is taken literally as a function name. With the TM Library loaded, when a list in square brackets is evaluated, the head is taken as a variable name, and the value of this variables is the function to be loaded. It is a nice coincidence that square brackets mean indirect addressing in many assembly languages.
@@ -1713,32 +1715,32 @@
Using the square brackets we may define curry-three as:
Here is another example. Suppose that instead of passing #'plus in as an argument, that we first assigned it to a variable and then pass the variable value as an argument:
Here the value assigned to the variable our-fun is a function name. The variable is then used as any other, and its value is passed in as an argument to curry-three. Note, all arguments are evaluated before the function is called, so variables are replaced with their values. And as we know, inside curry-three, funcall will take the function name value from the corresponding parameter and call it as a function.
Things can become a little confusing when the variable name has the same name as the function.
-
+
* (defvar plus #'plus)
* (curry-three plus 2)
5
-
+
Here #'plus is the function name as data. plus when it appears as the head of an evaluated list is a function name, otherwise it is a variable name. It is little wonder that the Lisp dialect Scheme put function names and variables name in the same space. However by doing so they had to provide some automatic conversions between variable names and function names.
@@ -1754,9 +1756,9 @@
[f g h] â indirect function call. f is a variable replaced by its value, and that value is then looked up and called as a function. g and h are variables replaced by their values and passed as arguments. The result of the function replaces the entire form.