Skip to content

Commit

Permalink
functions change
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoss committed Jan 24, 2025
1 parent b507775 commit 99f4cf2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions introOneSharp/functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions introOneSharp/haltDef.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
Expand Down

0 comments on commit 99f4cf2

Please sign in to comment.