Towards a Programmer's Apprentice (Again)

Howard Elliot Shrobe, Boris Katz, Randall Davis

In the 1970s, researchers at MIT envisioned a "Programmer's Apprentice"—an intelligent partner that could help developers write code while capturing the critical design rationale behind it. At the time, the technology was not yet mature enough to realize this vision. However, modern researchers argue that the convergence of massive compute power, advanced Natural Language Processing (NLP), and sophisticated reasoning engines makes this goal achievable today.

The Problem: The High Cost of "Why"

A persistent challenge in software engineering is the loss of design rationale. Programmers rarely document why they chose a specific data structure or algorithm, primarily because doing so interrupts their workflow. When software is later modified—often by different developers—this missing context leads to subtle errors and technical debt. The goal of a modern Programmer's Apprentice is to make capturing this rationale "cost less than it's worth" by integrating it into a natural, conversational coding process.

A Multi-Modal Approach to Development

The proposed prototype functions as a junior colleague, interacting with the developer through speech and sketching.

  • Natural Language Processing: Using the START natural language system, the apprentice parses spoken input into subject-relation-object triples to understand developer intent.
  • Knowledge Representation: The system maintains an ontology of "clichés"—standard programming patterns like "generate and accumulate" or common data structures like sets and sequences.
  • Interactive Reasoning: By monitoring architectural sketches, the system uses its ontology to verify that components are compatible.
  • Code Synthesis: When a design is finalized, the system uses symbolic evaluation to transform high-level representations into executable Common Lisp code, filling in boilerplate logic automatically.

Case Study: Designing an Airborne Sensor System

The researchers demonstrated the system's utility through a scenario involving the design of an airborne sensor system. In this demonstration, the apprentice showcased its ability to learn and reason in real-time.

Initially, the user defined an "imager" as an input device. The system updated its internal model to understand that this device produces a stream of images. However, when the user attempted to connect the imager directly to a disk drive, the apprentice intervened.

The system identifies a type mismatch between the Imager's pixel-array output and the Disk Drive's byte-vector input.

The system recognized a fundamental type mismatch: the imager produced an array of pixels, while the disk drive required a vector of bytes. Rather than just flagging an error, the apprentice engaged the user to resolve the conflict. It prompted for design rationale, asking whether the array should be processed in row-major or column-major order. Once the user provided a reason (e.g., cache locality), the system recorded this rationale and synthesized a "transducer" to bridge the gap.

The apprentice automatically synthesizes a 'TRANS-1' transducer to convert the data stream, resolving the architectural error.

The Path Forward

While this prototype demonstrates the feasibility of the "Apprentice" model, significant work remains. Future research must address how to organize high-level design artifacts, maintain evidence of correctness (such as formal proofs or test suites), and ensure that rationale remains synchronized with code as requirements evolve over time. Realizing the full vision of a Programmer's Apprentice remains a grand challenge for the AI and software engineering communities.

Summary updated

BibTeX
@inproceedings{shrobe2015towards,
  author = {Howard Elliot Shrobe and Boris Katz and Randall Davis},
  title = {{Towards a Programmer's Apprentice (Again)}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2015},
  doi = {10.1609/aaai.v29i1.9765},
}
Figure