arXiv:2610.36341cs.AIOct 2026

Manuscript Offprint

arXiv:2610.36341

Executable Archaeology of Programs That Model Programming: Reanimating the Heuristic Compiler (1961) and KBEmacs (1984)

Jeff Shrager, Kent M. Pitman, Mia Golec

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Early AI programs were often also theories of how people think, and programs that wrote programs were, in part, theories of how people program. Here we report on the reanimation of two such programs that offer two seemingly different theories of programming and were developed for quite different purposes. The first, Herbert Simon's Heuristic Compiler (1961), was an experimental model of programming as problem-solving, applying the means-ends analysis methods of the General Problem Solver to investigate the nature of the programming task. The second, KBEmacs (1984), was a working prototype of an intelligent programming assistant developed by MIT's Programmer's Apprentice project, built on the view that expert programmers recognize and combine familiar patterns, or "cliches." It let a programmer build up programs by combining cliches through a stylized English command language. We approach both through the methodology of Executable Archaeology, the study of historical computational systems by running their original code, a process we call "reanimation." Our reanimation of the Heuristic Compiler reproduces the compiled code appearing in Simon's 1963 paper, and our reanimation of KBEmacs reproduces the SQRT sequence of its December 1984 self-test. Examined side by side, the two theories turn out to have much in common: the Heuristic Compiler also works by adapting existing routines, and Simon later argued that search alone requires a large body of programming knowledge. To highlight the reflexivity of this project, we deliberately used a modern AI-assisted programming tool, Anthropic's Claude Code (Opus 5.5), to carry out much of the detailed reanimation work, building on a significant base of existing software. The explicit, executable theories of programming that both systems embodied are largely absent from today's far more capable AI coding assistants.

Keywords: Executable Archaeology, History of AI, Automatic Programming, Heuristic Compiler, KBEmacs, Programmer's Apprentice, Programming Cliches, Psychology of Programming, Cognitive Models of Programming, Claude Code

1 Introduction

Modern programmers increasingly work alongside AI-based tools built on large language models (LLMs) and trained on enormous corpora of source code and other programming-related materials. Although the scale and fluency of the modern tools is truly novel, the aspiration of a program that takes part in the work of programming is nearly as old as programming itself. In the 1950s what we now call “compilation” was referred to as “automatic programming” [1, 22]. And within a few years of the founding of artificial intelligence, researchers were asking whether the methods of AI could be turned on the task of programming itself [31, 2].

Programming has also long been studied as a human activity. Weinberg's The Psychology of Computer Programming [36] treated programming as a behavior to be observed, and by the early 1980s Soloway and others theorized that expert programmers usually work from stereotyped "programming plans" – reusable code schemas – rather than from first principles [34]. Similarly, most early AI either embodied formal theories of human cognition (e.g., [15, 14]), or depended upon intuitive theories of human cognition. In that framing, a program that writes programs, or helps a programmer do so, is at least an intuitive theory of programming, but one that could also be helpful to a human programmer.

This paper describes the reanimation of two historical systems that offer two such theories, though they were built for different ends. The first is Herbert A. Simon's Heuristic Compiler, written in IPL-V in 1961 and described in a RAND report that year [29] and in the Journal of the ACM in 1963 [31]. Simon treated programming as a 'problem' in the sense in which that term was used in GPS, the General Problem Solver of Newell, Shaw, and Simon [13]: Given a description of what a routine should do, Simon's Heuristic Compiler searched for differences between the routine as it stood and the desired routine, and applied operators to reduce those differences.

The second system is KBEmacs, the Knowledge-Based Editor (in Emacs). Built at MIT's Artificial Intelligence Laboratory, KBEmacs was the culminating demonstration of the Programmer's Apprentice project [39, 41, 21]. The user of KBEmacs guided the computer by describing the desired program using stylized English and mentioning specific "cliches." KBEmacs looked up the proto-code underlying the indicated cliches, supplied the details, and wrote the code by combining the cliche proto-code into the program under construction. This process was quite similar to how psychologists studying programming, such as Soloway (e.g., [34]) theorized human programmers reasoned (although Soloway used the term "programming plan" instead of "cliche").

Although the Heuristic Compiler and KBEmacs were separated by a quarter of a century, by programming language (IPL-V vs. Zetalisp), and by research tradition (the study of human cognition vs. applied AI), they stake out a great deal of the conceptual territory that today's AI coding tools occupy: How a programming task is specified, where the knowledge and skills needed to carry it out come from and where they reside, how work is divided between human and machine, and how the system checks what it has done.

We approach the study of these artifacts as exercises in Executable Archaeology employing that field's core methodology, “reanimation”: studying historical programs by running them on emulation stacks from code that is as close as possible to the original [10, 12]. The Heuristic Compiler was transcribed from a 1961 line-printer listing recovered from Simon’s papers at CMU, and run on the Common Lisp IPL-V interpreter built earlier to run the Logic Theorist [27]. KBEmacs was transcribed from a four-volume January 1985 printout and run under a Zetalisp compatibility layer on top of SBCL, a modern Common Lisp. Both reanimations were themselves carried out largely by an AI coding assistant: Anthropic’s Claude [5], working in its command-line form, Claude Code. (The division of labor is described in “Author Contributions and Use of AI.”)

References (39)