diff --git a/_sources/introOneSharp/functions.ipynb b/_sources/introOneSharp/functions.ipynb index 48b4680b..79053054 100644 --- a/_sources/introOneSharp/functions.ipynb +++ b/_sources/introOneSharp/functions.ipynb @@ -62,7 +62,7 @@ " \n", "\n", " \n", - "A *program* of $\\one\\hash$ is just a sequence of\n", + "A *program* of ```1#``` is just a sequence of\n", "instructions, \n", "run together to make a big word.\n", "An instruction counts as a program, \n", @@ -384,8 +384,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "```{admonition}\n", - "\n", + "```{admonition} Definition\n", + ":class: tip\n", "$$\n", "\\phifn^0_p (\\ ) \\simeq y\n", "$$\n", diff --git a/_sources/introOneSharp/haltDef.ipynb b/_sources/introOneSharp/haltDef.ipynb index f275b23c..1ffa8ef1 100644 --- a/_sources/introOneSharp/haltDef.ipynb +++ b/_sources/introOneSharp/haltDef.ipynb @@ -29,16 +29,16 @@ "\n", "```{admonition} Definition\n", ":class: tip\n", - "We (informally) say that a program $p$ *halts* on some inputs if at some point during the execution of $p$ on the inputs, the control transfers to right below the last instruction of $p$. In more detail, suppose that $p$ has n instructions. The formal definition is given below, after we discuss the remaining types of instructions.\n", + "We (informally) say that a program $p$ *halts* on some inputs if at some point during the execution of $p$ on those inputs, the control transfers to right below the last instruction of $p$. In more detail, suppose that $p$ has n instructions. The formal definition is given below, after we discuss the remaining types of instructions.\n", "\n", "In contrast, we say that p *halts improperly* if at some point during the execution of $p$, the control tranfers either to a point before the beginning of $p$ or to points more than one instruction beyond the last instruction of $p$.\n", "```\n", "\n", "To see the difference, consider the following two programs: \n", - "```11###``` and ```1#111. Suppose we run them with some fixed but arbitrary word $x$ in R1.\n", + "```11###1#``` and ```1#11###```. Suppose we run them with some fixed but arbitrary word $x$ in R1.\n", "\n", "\n", - "The first says \"Go forward 2,\" and the second \"Add ```1``` to R1.\"\n", + "The first says \"Go forward 2,\" and the second \"Add ```1``` to R1, and then advance two instructions.\"\n", "\n", "The first halts, while the second halts improperly." ] diff --git a/introOneSharp/functions.html b/introOneSharp/functions.html index 051ec2ca..28197229 100644 --- a/introOneSharp/functions.html +++ b/introOneSharp/functions.html @@ -480,7 +480,7 @@
A program of 1#
is just a sequence of
instructions,
run together to make a big word.
An instruction counts as a program,
@@ -678,6 +678,23 @@
We started by associating to each program \(p\) a function \(\phifn_p\) of one argument, and then for each \(n \geq 2\) we associated a function \(\phifn_p^n\) of \(n\) arguments. This general definition works in case \(n = 0\) also.
+Definition
+means that +\(p\) is a program, +and +when we +run it +\(p\) with +all registers empty, the register machine +eventually halts with \(y\) in R1 and all other +registers +empty.
+Definition
-We (informally) say that a program \(p\) halts on some inputs if at some point during the execution of \(p\) on the inputs, the control transfers to right below the last instruction of \(p\). In more detail, suppose that \(p\) has n instructions. The formal definition is given below, after we discuss the remaining types of instructions.
+We (informally) say that a program \(p\) halts on some inputs if at some point during the execution of \(p\) on those inputs, the control transfers to right below the last instruction of \(p\). In more detail, suppose that \(p\) has n instructions. The formal definition is given below, after we discuss the remaining types of instructions.
In contrast, we say that p halts improperly if at some point during the execution of \(p\), the control tranfers either to a point before the beginning of \(p\) or to points more than one instruction beyond the last instruction of \(p\).
To see the difference, consider the following two programs:
-11###
and ```1#111. Suppose we run them with some fixed but arbitrary word \(x\) in R1.
The first says “Go forward 2,” and the second “Add 1
to R1.”
11###1#
and 1#11###
. Suppose we run them with some fixed but arbitrary word \(x\) in R1.
+The first says “Go forward 2,” and the second “Add 1
to R1, and then advance two instructions.”
The first halts, while the second halts improperly.