Table Of ContentThe Programming Language LISP:
Its Operation and Applications
Information International, Inc.
Edmund C. Berkeley and Daniel G. Bobrow, editors
1,11111
The M.I.T. Press
Massachusetts lnstitute of Technology
Cambridge, Massachusetts, and London, England
Reproduction in whole or in part is
permitted for any purpose by the United States Government
This research was sponsored by the Advanced Research Projects Agency,
Department of Defense, Washington, D. C., under Contract SD 162. This
technical report was prepared under said Contract.
First printing, March 1964 by
Information International, Inc.
Second printing, April 1966
Third printing, March 1967
Fourth printing, March 1974
Printed in the United States of America
Reproduction in whole or in part is
permitted for any purpose of the United States Government
First printing, March, 1964
Printed in the United States of America
Authors
Authors
Paul W. Abrahams
Edmund C. Berkeley
Fischer Black
Daniel G. Bobrow
Thomas G. Evans
Mark Finkelstein
Edward Fredkin
Elaine Gord
W illiam Henneman
Timothy P. Hart
Michael 1. Levin
Lionello A. Lombardi
Malcolm Pivar
Bertram Raphael
Robert A. Saunders
Editors
Edmund C. Berkeley
Daniel G . Bobrow
Acknowledgements
Work reported here by authors Edmund C. Berkeley, L.
Peter Deutsch, Mark Finkelstein, Edward Fredkin, Elaine Gord,
William Henneman, Malcolm Pivar, and Robert A. Saunders was
supported entirely or largely by Information International Inc.
under contract SD-162 with the Advanced Research Prajects Agen-
cy, Department of Defense.
Work reported here by authors Daniel G. Bobrow, Tirnothy P.
Hart, Michael 1. Levin, L. A. Lornbardi, and Bertrarn Raphael was
mainly or partially supported by Project MAC, an M.I.T. research
prograrn sponsored by the Advanced Research Projects Agency,
under Office of Naval Research Contract Nonr-4102(01). Some of
the work of Bobrow and Hart was also supported by Information
International under its contract; and sorne of the work by Ber-
keley and Deutsch was also supported by Project MAC under its
contract.
The articles and papers (or portions thereof) by authors
Paul W. Abrahams, Fischer Black, and S. G. Evans were re-
ceived as welcome contributions to this report, and were not
supported by the foregoing contracts.
Al1 the assistance which has been contributed to the sub-
stance and content of this report has been most helpful and i s
gratefully acknowledged.
Grateful acknowledgement should also be made to the per-
sons who typed or d r e ~th e final photo offset master copy for
this report: Ann Baker, Diana Cormier, Michelle Ingersoll,
Gayle Johnson, and Lorraine Simkins.
Edmund C. Berkeley
Daniel G. Bobrow
Edi tors
Preface
One of the tasks under Contract SD-162 issued by the Advan-
ced Research Projects Agency to Information International, Inc.,
was to help make the programming language LISP more understood,
more available, and more useful for programmers and mathemati-
cians. The language LISP (short for a "LISt Processing" lang-
uage) is a remarkable and powerful language, because not only
does it govern the operation of a cornputer, but also it is a
mathematical language with great flexibility and power for ex-
pressing processes i n mathematics, logic, and symbol manipulation
i n general.
As a part of the present task, this collection of contribu-
tions from various authors has been prepared and published.
The section of this report "Acknowledgments" states the con-
nections of the authors with various projects and activities, the
original sources of the contributions, and the support which en-
abled the contributions to be written. The authors include many
persons who have worked under contracts with the Advanced Research
Projects Agency other than the contract with Information Interna-
tional Inc.
Part 1 of this report contains articles and papers written
primarily for persons with no prior knowledge of LISP or only a
little. If anybody desires to learn LISP, however, Part 1 of this
report is not sufficient, and he should have at hand a copy of:
"LISP 1.5 Programmer's Manual", by John McCarthy and others; pub-
lished by The MIT Press, Cambridge 39, Mass,; date, August 17,
1962; cost, $3,00.
Part II of this report contains articles and papers written
primarily for persons with a substantial prior knowledge of LISP.
Copies of this report are available from the Defense Docu-
.
mentation Center (DDC) and the Office of Technical Services (OTS)
We should like to express Our thanks and appreciation to al1
those persons who contributed to this report, and enabled it to
become, in Our opinion, a step along the road towards more ver-
satile and more powerful operation and control of computers.
Also, we should like to express Our great appreciation to the
Advanced Research Projects Agency for its support of this work,
for otherwise much of what is here would never have come into ex-
ist ence.
In spite of many efforts to avoid errors, no editors or
authors can be sure that al1 errors have been eliminated. Any
corrections, comments, or suggestions sent to the editors w i l l
be very welcome.
Information International Inc.
Edmund C. Berkeley
Daniel G. Bobrow
Table Contents
Acknowledgements
Preface
Distribution
PART 1 - Elementary
LISP - A Simple Introduction Edmund C. Berkeley 1
LISP - On the Programming Robert A. Saunders 50
Sys tem
LISP - 240 Exercises with Timothy P. Hart and 73
Solutions Michael 1. Levin
Notes on the Debugging of Elaine Gord
LISP Programs
Styles of Programming in LISP Fischer Black 96
PART II - Advanced
Techniques Using LISP for Auto- Edward Fredkin
matically Discovering Inter-
esting Relations in Data
Automation, using LISP, of In- Malcolm Pivar and 125
ductive Inference on Se- Mark Finkelstein
quences
Application of LISP to Machine Paul d. Abrahams 137
Checking of Mathematical
Proof s
METEOR: A LISP Interpreter Daniel G. Bobrow 16 1
f o r String Transformations
Notes on Implementing LISP f o r Timothy P. Hart and 191
the M-460 Computer Thomas G. Evans
LISP a s the Language f o r an In- L. A. Lombardi and 204
crementa 1 Computer Bertram Raphael
The LISP System for the Q-32 Robert A. Saunders 220
Computer
An Auxiliary Language f o r More William Henneman 239
-
Watural Expression the
A-Language
-
PART III ~ppendices
The LISP Program f o r METEOR Daniel G. Bobrow 249
The LISP Program f o r Inductive Malcolm Pivar and 260
Inference on Sequences Elaine Gord
The LISP Listing f o r the Q-32 Robert A. Saunders 290
Compiler, and Some Samples
The LISP Program f o r the A- William Henneman 318
Language
The LISP Implementation for the L. Peter Deutsch 326
PDP-1 Computer and Edmund C.
Berkeley
Index f o r Part 1 of the LISP Edmund C. Berkeley 376
1.5 Manual and Daniel G.
Bobrow
A LISP Interpreter for the Q-32 Robert A. Saunders 383
Description:was to help make the programming language LISP more understood, primarily for persons with no prior knowledge of LISP or only a little. If anybody