{"id":"N-BOHM","url":"https://chrishayuk.com/notebook/a-compiler-from-1951-ran-it-needed-four-corrections","currentVersion":"1.1","publication":"published","scientificStatus":"OPEN","versions":[{"version":"1.0","title":"A compiler from 1951 ran. It needed four corrections.","abstract":"A note about running the compiler in Corrado Böhm’s 1951 dissertation, which is written in the language it compiles, for a machine that was only ever a design. A coding agent built the machine, typed in the compiler from the 1954 printing, and wrote two independent readings to check it against. As printed, the compiler does not work. With four corrections, one of them reported by Knuth and Trabb Pardo in 1976, it compiles itself. The language, the machine and the compiler run in the browser.","authors":["Chris Hay"],"url":"https://chrishayuk.com/records/N-BOHM/1.0","published":"2026-11-22","publication":"published","scientificStatus":"OPEN","supersededBy":[],"hash":"6159f352346c99e11fe2b95612b0e1d6dfb92a628d4c28c13793d94deaf86a43","algorithm":"sha256","revision":{"kind":"initial","summary":"First publication: Böhm's 1951 compiler run on a simulation of his machine, the four corrections it needed, the one outside check, and the limits of three readings by one author"},"next":"https://chrishayuk.com/records/N-BOHM/1.1","sources":[{"title":"Corrado Böhm, “Calculatrices digitales. Du déchiffrage de formules logico-mathématiques par la machine même dans la conception du programme”, dissertation, ETH Zürich, 1951; printed Bologna, 1954","url":"https://www.research-collection.ethz.ch/handle/20.500.11850/132662","note":"Euclid’s algorithm is on p. 25. The compiler is chapter 7, pp. 39–43: group C on p. 40, group E′ on p. 43."},{"title":"The same, translated into English by Peter Sestoft, 2016","url":"https://raspi.itu.dk/~sestoft/boehmthesis/","note":"Appendix B: “We have made a simple implementation in Java of Böhm’s machine, and his compiler and loader”. The translation omits group W of chapter 7."},{"title":"Donald E. Knuth and Luis Trabb Pardo, “The Early Development of Programming Languages”, Stanford report STAN-CS-76-562, August 1976, pp. 35–42","url":"http://bitsavers.org/pdf/stanford/cs_techReports/STAN-CS-76-562_EarlyDevelPgmgLang_Aug76.pdf","note":"The bug is reported on p. 40, the hand-worked formula is on p. 41, and their TPK program in Böhm’s language is on pp. 36–39."},{"title":"chrishayuk/bohm","url":"https://github.com/chrishayuk/bohm","note":"The machine, loader and compiler, their tests, 42 example programs, a tutorial, and reduced scans of the pages the corrections rest on."},{"title":"Coding-agent session, 22 November 2026","note":"The machine, the loader, both compilers’ harness and the transcription of chapter 7 were written in this session. Every result in this note can be rerun on the interactive study."}],"manuscript":"https://chrishayuk.com/api/record/N-BOHM?version=1.0","citations":"https://chrishayuk.com/api/citations/N-BOHM?version=1.0"},{"version":"1.1","title":"A compiler from 1951 ran. It needed four corrections.","abstract":"A note about running the compiler in Corrado Böhm’s 1951 dissertation, which is written in the language it compiles, for a machine that was only ever a design. A coding agent built the machine, typed in the compiler from the 1954 printing, and wrote two independent readings to check it against. As printed, the compiler does not work. With three corrections, one of them reported by Knuth and Trabb Pardo in 1976, and a fourth change that is needed only because of how this reconstruction compiles the compiler’s own formulas, it compiles itself. The language, the machine and the compiler run in the browser.","authors":["Chris Hay"],"url":"https://chrishayuk.com/records/N-BOHM/1.1","published":"2026-11-22","revised":"2026-11-22","publication":"published","scientificStatus":"OPEN","supersededBy":[],"hash":"06a3b01bba71907e59b48f0f97b4c5d9f94acc4ce035877f3df2c7ce384d0125","algorithm":"sha256","revision":{"kind":"correction","summary":"Of the four corrections, three are slips; the fourth, renaming X, is needed only because of how this reconstruction compiles the compiler's own formulas. Two arrows supplied in group J', the loader's constant and a repeated label in the second Euclid program are now disclosed, and an independent review by a second model is described.","previous":"1.0"},"previous":"https://chrishayuk.com/records/N-BOHM/1.0","sources":[{"title":"Corrado Böhm, “Calculatrices digitales. Du déchiffrage de formules logico-mathématiques par la machine même dans la conception du programme”, dissertation, ETH Zürich, 1951; printed Bologna, 1954","url":"https://www.research-collection.ethz.ch/handle/20.500.11850/132662","note":"Euclid’s algorithm is on p. 25. The compiler is chapter 7, pp. 39–43: group C on p. 40, group E′ on p. 43."},{"title":"The same, translated into English by Peter Sestoft, 2016","url":"https://raspi.itu.dk/~sestoft/boehmthesis/","note":"Appendix B: “We have made a simple implementation in Java of Böhm’s machine, and his compiler and loader”. The translation omits group W of chapter 7."},{"title":"Donald E. Knuth and Luis Trabb Pardo, “The Early Development of Programming Languages”, Stanford report STAN-CS-76-562, August 1976, pp. 35–42","url":"http://bitsavers.org/pdf/stanford/cs_techReports/STAN-CS-76-562_EarlyDevelPgmgLang_Aug76.pdf","note":"The bug is reported on p. 40, the hand-worked formula is on p. 41, and their TPK program in Böhm’s language is on pp. 36–39."},{"title":"chrishayuk/bohm","url":"https://github.com/chrishayuk/bohm","note":"The machine, loader and compiler, their tests, 42 example programs, a tutorial, and reduced scans of the pages the corrections rest on."},{"title":"Coding-agent session, 22 November 2026","note":"The machine, the loader, both compilers’ harness and the transcription of chapter 7 were written in this session. Every result in this note can be rerun on the interactive study."}],"manuscript":"https://chrishayuk.com/api/record/N-BOHM?version=1.1","citations":"https://chrishayuk.com/api/citations/N-BOHM?version=1.1"}]}