SHRDLU, Running
Twenty-five years ago a team of us at UMR ported SHRDLU from Maclisp to Common Lisp.1 I found the source in an old archive last week — version-tagged UMR-1.0 — and wondered if it still ran on modern CLISP.2
It needed two fixes.
The repo also contains a java-gui/ directory: Java 1.2 source for a blocks-world visualizer, authored by Andy Adrian and dated March 2000. A class called ShrdluServer was supposed to bridge the GUI to the Lisp backend via sockets. The socket code is entirely commented out. The GUI was never connected.
Ignore the GUI. The Lisp:
clisp LOADER
*** - DEFUN-FEXPR: (A B) does not match lambda list element (FEXPR-ARG)
FEXPR is the first seam. Maclisp had a mechanism called FEXPRs: a function declared as an FEXPR received all its arguments as a single unevaluated list — one binding, always, before evaluation. Common Lisp eliminated FEXPRs entirely and replaced them with macros. The UMR team shimmed this in a file called FIXES, writing a defun-fexpr macro that converts an FEXPR definition into a macro/function pair. It expects a single argument name in the lambda list.
DICTIO — the dictionary — has this entry:
(DEFS \#DIRECTION
FEXPR (LAMBDA (A B) NIL)
NOGOAL T)
Two names. The DEFS function in SYSCOM reads the lambda list at runtime and passes it to defun-fexpr, which destructures it expecting one element. Two breaks it on load.
The body is NIL. The function ignores its arguments and does nothing. The fix is one token:
FEXPR (LAMBDA (A) NIL)
The program loads.
APPLY is the second seam.
THTRY1 is in PLNR, Winograd’s theorem prover. The THTBF branch calls a filter function to test theorems as it backtracks. The original code called it like this:
(AND (APPLY (CADR THX) (CAADDR THX)) ...)
(CAADDR THX) is a theorem name — a symbol, not a list. Common Lisp’s APPLY requires its last argument to be a proper list; passing an atom is an error. Maclisp was more permissive. The parallel branch nearby already used FUNCALL correctly.
Dave McDonald, Winograd’s first research student, recalled that in the rush before his thesis defense, Terry “made some direct patches to the Lisp assembly code and never back propagated them to his Lisp source.”3 Two branches, one patched, one not — that’s exactly what that looks like.
Fix: APPLY → FUNCALL at that line.
The program runs.
What it looks like on Apple Silicon in 2026, against queries from Winograd’s 1972 paper:4
READY
WHAT BLOCKS ARE ON THE TABLE?
THE BLUE ONE ,THE GREEN CUBE ,THE LARGE RED ONE ,THE LARGE GREEN ONE
WHICH SUPPORTS THE RED PYRAMID ,AND THE RED CUBE .
READY
PICK UP A BIG RED BLOCK.
~MOVING HAND TO (100 340 500)~
~GRASPING BLOCK B7~
~MOVING HAND TO (600 1100 200)~
~LETTING GO~
OK .
Responses match.
The FEXPR fix is the one worth understanding. FEXPRs are why you cannot take an arbitrary Maclisp program and run it in Common Lisp without archaeology. The entire evaluation model for special forms changed. The UMR team understood this and built the shim correctly. One definition in the dictionary had a two-element lambda list — probably a cut-and-paste error from a nearby entry that legitimately took two args. That was all.
The APPLY/FUNCALL fix is older than the port. The inconsistency was already there, in Winograd’s source.
Two fixes. Fifty-four years.5
Project SHRDLU — background on the original UMR project, the architecture, and how the team made first contact with Winograd and Kent Pitman. ↩︎
SHRDLU. Copy of original source; later Greg Sharp acquired the UMR project source before the university’s links broke and packaged it as the console and Java versions Winograd hosted on his Stanford page. Josh Sutterfield — one of the original UMR team — later updated semaphorecorp’s SHRDLU resurrection (local copy) page with the new URL after UMR became Missouri S&T. ↩︎
From semaphorecorp’s SHRDLU resurrection page, which documents the people and exchanges involved in getting SHRDLU running again. ↩︎
Winograd, T. (1972). Understanding natural language. Cognitive Psychology, 3(1), 1–191. ↩︎
Others have tried this too. Thomas Gounaris built a web-accessible version using CLisp behind Apache with a JavaScript 3D renderer — more ambitious on the presentation side, last updated 2015. ↩︎