Inspired by ACTORS [7, 17], we have implemented an interpreter for a LISP-like language, SCHEME, based on the lambda calculus [2], but extended for side effects, multiprocessing, and process synchronization. The purpose of this implementation is tutorial. We wish to: 1.alleviate the confusion caused by Micro-PLANNER, CONNIVER, etc., by clarifying the embedding of non-recursive control structures in a recursive host language like LISP. 2.explain how to use these control structures, independent of such issues as pattern matching and data base manipulation. 3.have a simple concrete experimental domain for certain issues of programming semantics and style. This paper is organized into sections. The first section is a short “reference manual” containing specifications for all the unusual features of SCHEME. Next, we present a sequence of programming examples which illustrate various programming styles, and how to use them. This will raise certain issues of semantics which we will try to clarify with lambda calculus in the third section. In the fourth section we will give a general discussion of the issues facing an implementor of an interpreter for a language based on lambda calculus. Finally, we will present a completely annotated interpreter for SCHEME, written in MacLISP [13], to acquaint programmers with the tricks of the trade of implementing non-recursive control structures in a recursive language like LISP.This report describes research done at the Artificial Intelligence Laboratory of the Massachusetts Institute of Technology. Support for the laboratory's artificial intelligence research is provided in part by the Advanced Research Projects Agency of the Department of Defense under Office of Naval Research contract N00014-75-C-0643.
[1]
John C. Reynolds,et al.
Definitional Interpreters for Higher-Order Programming Languages
,
1972,
ACM '72.
[2]
A. Church.
The calculi of lambda-conversion
,
1941
.
[3]
Irene Greif,et al.
Semantics of communicating parallel processes
,
1975
.
[4]
Leslie Lamport,et al.
A new solution of Dijkstra's concurrent programming problem
,
1974,
Commun. ACM.
[5]
Daniel G. Bobrow,et al.
A model and stack implementation of multiple environments
,
1973,
CACM.
[6]
Edsger W. Dijkstra,et al.
Solution of a problem in concurrent programming control
,
1965,
CACM.
[7]
Peter Zilahy Ingerman,et al.
Thunks: a way of compiling procedure statements with some comments on procedure declarations
,
1961,
CACM.
[8]
Gerald Jay Sussman,et al.
The Conniver Reference Manual
,
1972
.
[9]
A. Church.
The Calculi of Lambda Conversion. (AM-6) (Annals of Mathematics Studies)
,
1985
.
[10]
Joel Moses.
The function of FUNCTION in LISP or why the FUNARG problem should be called the environment problem
,
1970,
SIGS.
[11]
Michael J. Fischer,et al.
Lambda-calculus schemata
,
1993,
LISP Symb. Comput..
[12]
N. G. de Bruijn,et al.
Additional comments on a problem in concurrent programming control
,
1967,
Commun. ACM.
[13]
John McCarthy,et al.
LISP 1.5 Programmer's Manual
,
1962
.
[14]
Carl Hewitt,et al.
Actor semantics of PLANNER-73
,
1975,
POPL '75.
[15]
Gerald Jay Sussman,et al.
Micro-Planner Reference Manual
,
1970
.