{"id":"N-TPK","url":"https://chrishayuk.com/notebook/tpk-run-on-the-systems-it-describes","currentVersion":"1.2","publication":"published","scientificStatus":"OPEN","versions":[{"version":"1.0","title":"Knuth and Trabb Pardo’s TPK, run: none of their three programs is accepted as printed","abstract":"Knuth and Trabb Pardo’s survey of early programming languages (1976) compares them by writing one fixed algorithm, TPK, in each, as “fairly close replicas” of what each language’s author would have written. This collection has executable reconstructions of nine early systems, each built from its own primary sources and independently of their paper. Three are languages they wrote TPK in, and each of those programs is refused as printed: Böhm’s, because it names a group S and a variable X, the letters his compiler keeps for itself, so compiled by his method it prints nothing; Laning and Zierler’s, because it reads its input with v|N, which the manual says “is not yet in operation”, and uses a computed zero as an index; ALGOL 60’s, because its procedure heading puts the specification before the value part, against the Report, and because the surviving X1 compiler, run on a simulator, stops on its label and compiles the heading’s parameter as a value array. Knuth had already corrected the heading in his errata (2014); the other findings were not found in a limited search. The six systems they did not cover give six kinds of answer: Turing’s ACE runs TPK only after correcting two of Turing’s own tables; GEORGE, IPL-V and JOSS accept it by their manuals; whether the first Dartmouth BASIC could run it cannot be settled from what survives; and the defining document of CPL cannot express it. Where they run, every value is right at the system’s precision but one, GEORGE’s 79.7062, traced to Hamblin’s add routine. On the two machine-level systems, output costs more than the arithmetic.","authors":["Chris Hay"],"url":"https://chrishayuk.com/records/N-TPK/1.0","published":"2026-11-24","publication":"published","scientificStatus":"OPEN","supersededBy":[],"hash":"c7dad307b981a78fdc89c719f39640c2e05065b6b6c1f80b62767ecf2863cda5","algorithm":"sha256","revision":{"kind":"initial","summary":"First publication: Knuth and Trabb Pardo's TPK run on nine reconstructed systems; their Böhm, Laning–Zierler and ALGOL 60 programs are each refused as printed, and six systems they did not cover give six other kinds of answer."},"display":{"kind":"initial","summary":"First publication: Knuth and Trabb Pardo's TPK run on nine reconstructed systems; their Böhm, Laning–Zierler and ALGOL 60 programs are each refused as printed, and six systems they did not cover give six other kinds of answer."},"next":"https://chrishayuk.com/records/N-TPK/1.1","sources":[{"title":"D. E. Knuth and L. Trabb Pardo, The Early Development of Programming Languages, Stanford report STAN-CS-76-562, August 1976","url":"https://bitsavers.org/pdf/stanford/cs_techReports/STAN-CS-76-562_EarlyDevelPgmgLang_Aug76.pdf","note":"TPK in ALGOL 60, p. 3; in Böhm’s language, pp. 36–39; in Laning and Zierler’s, pp. 56–57; the rules for weaker languages, pp. 4–5."},{"title":"D. E. Knuth, errata for Selected Papers on Computer Languages (2003)","url":"https://www-cs-faculty.stanford.edu/~knuth/cl.html","note":"The ALGOL heading corrected (12 February 2014); the Laning and Zierler test reordered (22 September 2022)."},{"title":"chrishayuk/algol-60","url":"https://github.com/chrishayuk/algol-60","note":"examples/tpk-1976.alg, examples/tpk.alg; the X1 probes tpk-1976, value-after-spec and tpk-x1 in compare/; tests/x1.rs."},{"title":"chrishayuk/bohm","url":"https://github.com/chrishayuk/bohm","note":"programs/tpk.bohm and tpk-renamed.bohm; tests/thesis.rs."},{"title":"chrishayuk/laning-zierler","url":"https://github.com/chrishayuk/laning-zierler","note":"examples/1976-knuth-tpk.lzr, with the rules of January 1954."},{"title":"chrishayuk/turing-ace","url":"https://github.com/chrishayuk/turing-ace","note":"examples/tpk.ace, with the corrections to INDEXIN and DISCRIM it needs."},{"title":"chrishayuk/george","url":"https://github.com/chrishayuk/george","note":"examples/tpk.george, run by the interpreter and on Hamblin’s coding sheets in the simulated DEUCE; RUNNING-GEORGE.md, finding 15, for 79.7062."},{"title":"chrishayuk/ipl-v","url":"https://github.com/chrishayuk/ipl-v","note":"examples/tpk.iplv."},{"title":"chrishayuk/joss","url":"https://github.com/chrishayuk/joss","note":"examples/tpk.joss; sources/AUDIT.md for the dating."},{"title":"chrishayuk/chuk-basic-rs","url":"https://github.com/chrishayuk/chuk-basic-rs","note":"samples/classic/tpk.bas; sources/README.md for what Part II of the May 1964 manual leaves open."},{"title":"chrishayuk/cpl","url":"https://github.com/chrishayuk/cpl","note":"examples/tpk.cpl."},{"title":"Coding-agent session, 24 November 2026","note":"The six new programs, the runs and the literature search were made in this session; every figure can be rerun in the note’s runners or with each repository’s tests."}],"manuscript":"https://chrishayuk.com/api/record/N-TPK?version=1.0","citations":"https://chrishayuk.com/api/citations/N-TPK?version=1.0"},{"version":"1.1","title":"Knuth and Trabb Pardo’s TPK, run: none of their three programs is accepted as printed","abstract":"Knuth and Trabb Pardo’s survey of early programming languages (1976) compares them by writing one fixed algorithm, TPK, in each, as “fairly close replicas” of what each language’s author would have written. This collection has executable reconstructions of nine early systems, each built from its own primary sources and independently of their paper. Three are languages they wrote TPK in, and each of those programs is refused as printed: Böhm’s, because it names a group S and a variable X, the letters his compiler keeps for itself, so compiled by his method it prints nothing; Laning and Zierler’s, because it reads its input with v|N, which the manual says “is not yet in operation”, and uses a computed zero as an index; ALGOL 60’s, because its procedure heading puts the specification before the value part, against the Report, and because the surviving X1 compiler, run on a simulator, stops on its label and compiles the heading’s parameter as a value array. Knuth had already corrected the heading in his errata (2014); the other findings were not found in a limited search. The six systems they did not cover give six kinds of answer: Turing’s ACE runs TPK only after correcting two of Turing’s own tables; GEORGE, IPL-V and JOSS accept it by their manuals; whether the first Dartmouth BASIC could run it cannot be settled from what survives; and the defining document of CPL cannot express it. Where they run, every value is right at the system’s precision but one, GEORGE’s 79.7062, traced to Hamblin’s add routine. On the two machine-level systems, output costs more than the arithmetic. A second input, with negative numbers, finds every program right in general but ours for JOSS, whose output form is too narrow, and shows that the X1 mode prints a stand-in’s digits for f(0).","authors":["Chris Hay"],"url":"https://chrishayuk.com/records/N-TPK/1.1","published":"2026-11-24","revised":"2026-11-25","publication":"published","scientificStatus":"OPEN","supersededBy":[],"hash":"6054166e14c4db4b8090ef0e1875059607757b0d0c67a813e6f39aa42807a62b","algorithm":"sha256","revision":{"kind":"clarification","summary":"A second input, with negative numbers and a zero: every program right in general except ours for JOSS, whose output form holds y only from -99.999999 to 999.999999, and the X1 mode prints its least-real stand-in's digits for f(0). Runners added for both.","previous":"1.0"},"display":{"kind":"clarification","summary":"A second input, with negative numbers and a zero: every program right in general except ours for JOSS, whose output form holds y only from -99.999999 to 999.999999, and the X1 mode prints its least-real stand-in's digits for f(0). Runners added for both."},"previous":"https://chrishayuk.com/records/N-TPK/1.0","next":"https://chrishayuk.com/records/N-TPK/1.2","sources":[{"title":"D. E. Knuth and L. Trabb Pardo, The Early Development of Programming Languages, Stanford report STAN-CS-76-562, August 1976","url":"https://bitsavers.org/pdf/stanford/cs_techReports/STAN-CS-76-562_EarlyDevelPgmgLang_Aug76.pdf","note":"TPK in ALGOL 60, p. 3; in Böhm’s language, pp. 36–39; in Laning and Zierler’s, pp. 56–57; the rules for weaker languages, pp. 4–5."},{"title":"D. E. Knuth, errata for Selected Papers on Computer Languages (2003)","url":"https://www-cs-faculty.stanford.edu/~knuth/cl.html","note":"The ALGOL heading corrected (12 February 2014); the Laning and Zierler test reordered (22 September 2022)."},{"title":"chrishayuk/algol-60","url":"https://github.com/chrishayuk/algol-60","note":"examples/tpk-1976.alg, examples/tpk.alg; the X1 probes tpk-1976, value-after-spec and tpk-x1 in compare/; tests/x1.rs."},{"title":"chrishayuk/bohm","url":"https://github.com/chrishayuk/bohm","note":"programs/tpk.bohm and tpk-renamed.bohm; tests/thesis.rs."},{"title":"chrishayuk/laning-zierler","url":"https://github.com/chrishayuk/laning-zierler","note":"examples/1976-knuth-tpk.lzr, with the rules of January 1954."},{"title":"chrishayuk/turing-ace","url":"https://github.com/chrishayuk/turing-ace","note":"examples/tpk.ace, with the corrections to INDEXIN and DISCRIM it needs."},{"title":"chrishayuk/george","url":"https://github.com/chrishayuk/george","note":"examples/tpk.george, run by the interpreter and on Hamblin’s coding sheets in the simulated DEUCE; RUNNING-GEORGE.md, finding 15, for 79.7062."},{"title":"chrishayuk/ipl-v","url":"https://github.com/chrishayuk/ipl-v","note":"examples/tpk.iplv."},{"title":"chrishayuk/joss","url":"https://github.com/chrishayuk/joss","note":"examples/tpk.joss; sources/AUDIT.md for the dating."},{"title":"chrishayuk/chuk-basic-rs","url":"https://github.com/chrishayuk/chuk-basic-rs","note":"samples/classic/tpk.bas; sources/README.md for what Part II of the May 1964 manual leaves open."},{"title":"chrishayuk/cpl","url":"https://github.com/chrishayuk/cpl","note":"examples/tpk.cpl."},{"title":"Coding-agent session, 24 November 2026","note":"The six new programs, the runs and the literature search were made in this session; every figure can be rerun in the note’s runners or with each repository’s tests."}],"manuscript":"https://chrishayuk.com/api/record/N-TPK?version=1.1","citations":"https://chrishayuk.com/api/citations/N-TPK?version=1.1"},{"version":"1.2","title":"Knuth and Trabb Pardo’s TPK, run: none of their three programs is accepted as printed","abstract":"Knuth and Trabb Pardo’s survey of early programming languages (1976) compares them by writing one fixed algorithm, TPK, in each, as “fairly close replicas” of what each language’s author would have written. This collection has executable reconstructions of nine early systems, each built from its own primary sources and independently of their paper. Three are languages they wrote TPK in, and each of those programs is refused as printed: Böhm’s, because it names a group S and a variable X, the letters his compiler keeps for itself, so compiled by his method it prints nothing; Laning and Zierler’s, because it reads its input with v|N, which the manual says “is not yet in operation”, and uses a computed zero as an index; ALGOL 60’s, because its procedure heading puts the specification before the value part, against the Report, and because the surviving X1 compiler, run on a simulator, stops on its label and compiles the heading’s parameter as a value array. Knuth had already corrected the heading in his errata (2014); the other findings were not found in a limited search. The six systems they did not cover give six kinds of answer: Turing’s ACE runs TPK only after correcting two of Turing’s own tables; GEORGE, IPL-V and JOSS accept it by their manuals; whether the first Dartmouth BASIC could run it cannot be settled from what survives; and the defining document of CPL cannot express it. Where they run, every value is right at the system’s precision but one, GEORGE’s 79.7062, traced to Hamblin’s add routine. On the two machine-level systems, output costs more than the arithmetic. A second input, with negative numbers, finds every program right in general but ours for JOSS, whose output form is too narrow, and shows that the X1 mode prints a stand-in’s digits for f(0).","authors":["Chris Hay"],"url":"https://chrishayuk.com/records/N-TPK/1.2","published":"2026-11-24","revised":"2026-11-27","publication":"published","scientificStatus":"OPEN","supersededBy":[],"hash":"29ac9ed0d29792f8897c89f6bd1ff50c41352e9e64804a4bb5a67f80cfd9cd84","algorithm":"sha256","revision":{"kind":"clarification","summary":"Removed the statements about how the work was done; nothing about the results changed","previous":"1.1"},"display":{"kind":"clarification","summary":"Removed the statements about how the work was done; nothing about the results changed"},"previous":"https://chrishayuk.com/records/N-TPK/1.1","sources":[{"title":"D. E. Knuth and L. Trabb Pardo, The Early Development of Programming Languages, Stanford report STAN-CS-76-562, August 1976","url":"https://bitsavers.org/pdf/stanford/cs_techReports/STAN-CS-76-562_EarlyDevelPgmgLang_Aug76.pdf","note":"TPK in ALGOL 60, p. 3; in Böhm’s language, pp. 36–39; in Laning and Zierler’s, pp. 56–57; the rules for weaker languages, pp. 4–5."},{"title":"D. E. Knuth, errata for Selected Papers on Computer Languages (2003)","url":"https://www-cs-faculty.stanford.edu/~knuth/cl.html","note":"The ALGOL heading corrected (12 February 2014); the Laning and Zierler test reordered (22 September 2022)."},{"title":"chrishayuk/algol-60","url":"https://github.com/chrishayuk/algol-60","note":"examples/tpk-1976.alg, examples/tpk.alg; the X1 probes tpk-1976, value-after-spec and tpk-x1 in compare/; tests/x1.rs."},{"title":"chrishayuk/bohm","url":"https://github.com/chrishayuk/bohm","note":"programs/tpk.bohm and tpk-renamed.bohm; tests/thesis.rs."},{"title":"chrishayuk/laning-zierler","url":"https://github.com/chrishayuk/laning-zierler","note":"examples/1976-knuth-tpk.lzr, with the rules of January 1954."},{"title":"chrishayuk/turing-ace","url":"https://github.com/chrishayuk/turing-ace","note":"examples/tpk.ace, with the corrections to INDEXIN and DISCRIM it needs."},{"title":"chrishayuk/george","url":"https://github.com/chrishayuk/george","note":"examples/tpk.george, run by the interpreter and on Hamblin’s coding sheets in the simulated DEUCE; RUNNING-GEORGE.md, finding 15, for 79.7062."},{"title":"chrishayuk/ipl-v","url":"https://github.com/chrishayuk/ipl-v","note":"examples/tpk.iplv."},{"title":"chrishayuk/joss","url":"https://github.com/chrishayuk/joss","note":"examples/tpk.joss; sources/AUDIT.md for the dating."},{"title":"chrishayuk/chuk-basic-rs","url":"https://github.com/chrishayuk/chuk-basic-rs","note":"samples/classic/tpk.bas; sources/README.md for what Part II of the May 1964 manual leaves open."},{"title":"chrishayuk/cpl","url":"https://github.com/chrishayuk/cpl","note":"examples/tpk.cpl."},{"title":"Experiments, 24 November 2026","note":"The six new programs, the runs and the literature search; every figure can be rerun in the note’s runners or with each repository’s tests."}],"manuscript":"https://chrishayuk.com/api/record/N-TPK?version=1.2","citations":"https://chrishayuk.com/api/citations/N-TPK?version=1.2"}]}