Mutant Languages from the LISP Lab

Mutant Languages from the LISP Lab

THEORY & PRACTICE Mutant languages from the LISP lab By Brian Hayes APL is like a diamond. It has a beau are a bunch of malcontents who will not Planning and conniving tiful crystal structure; all of its parts leave well enough alone. They all think Some of the most influential variations are related in a uniform and elegant they know better than anyone else how on LISP were conceived in the late 1960s way. But if you try to extend this struc the language ought to work. and early 1970s by Carl Hewitt of the ture in any way—even by adding an Rolling-mudball-gathers-lots-of-moss Massachusetts Institute of Technology. other diamond—you get an ugly kludge. theory. LISP is so easily extended that it The first of his languages, called PLAN LISP, on the other hand, is like a ball of sprouts new languages willy-nilly. Every NER,3 added to LISP a facility for goal- mud. You can add any amount of mud LISP program is a new version of LISP. directed programming. to it and it still looks like a ball of mud. There may be truth in all of these pro A PLANNER program had two parts: —Joel Moses, as paraphrased positions, but more substantial factors a data base of assertions and a set of by Guy Lewis Steele Jr. are also at work. One important point is procedures for proving theorems about and Gerald Jay Sussman1 that LISP has a simple syntax. Most of the assertions. For example, an assertion the work of computation in a LISP pro might state that Socrates is human, and I f you ask the aver gram is done by a single kind of expres a theorem might hold that anyone who is age programmer- sion, the function call, which takes the human is mortal. Given the goal of prov I in-the-street what following form: (function-name ing that Socrates was mortal, PLAN is important or distinctive about LISP, argument, argument2 arguments...). NER would attempt to apply every the answer will probably have something There is not much more to know about theorem it knew to every assertion in the to do with artificial intelligence. That the syntax of LISP programs. data base until it either satisfied the goal judgment is certainly understandable: Other computer languages, in contrast, or exhausted the possibilities. LISP and Al were born at the same time have given rise to strident debates over The idea of computing by proving and place to the same parents, which syntactic issues. (Is it better to bracket theorems has now become familiar makes them twin siblings. They remain statements with begin...end or with {...}? through the language PROLOG. PLAN constant companions. Nevertheless, I Should the semicolon be a terminator or NER definitely influenced the develop would argue that the real importance of a separator of statements? What is the ment of PROLOG,4 but the connection LISP lies elsewhere. best delimiter for comments?) In the should not be overemphasized; there are What sets LISP apart, in my view, is LISP community, questions like these fundamental differences between the two its role as a language laboratory. LISP is have largely been ignored. Most of the languages. In the first place, PLANNER a culture medium for computer lan languages that have grown out of LISP theorems were expressed in procedural guages: a nutrient broth where new ideas have adopted the syntax of the parent form, whereas PROLOG is a purely de emerge from the ooze, then mutate, language with little change. clarative language. Furthermore, PRO evolve, and cross-breed. Here I will re Dismissing the problem of syntax in LOG uses a more sophisticated theorem- view a few of the more interesting ex this offhand way has had two important proving strategy, called unification. periments to come out of the LISP effects. First, it has focused attention on (Soon after PROLOG appeared, of laboratory. semantics—on the meaning of expres course, it was implemented in LISP.5) sions rather than their form. Second, it The most conspicuous innovation in Why LISP has made the implementation of new lan PLANNER was its control structure: Why has LISP been the focus of all this guages within LISP much easier. Be from the programmer's point of view, linguistic experimentation? A number of cause parenthesized lists serve as a there was none. Procedures were invoked hypotheses have been offered: notation for both programs and data, the automatically by a pattern-matching Ivory-tower theory. Until recently, the same expression can be interpreted as process.6 In proving the mortality of Soc economic significance of LISP program data by the underlying LISP system and rates, any procedures matching the pat ming was nil. There was little commer as a program by the embedded language. terns (mortal ?x) or (human ?x) would cial pressure to standardize the language. Parsing a program-which is a major be triggered. The sequence of procedure Thus LISP evolved freely while other undertaking for a language such as Ada calls was not under the programmer's languages of the same generation, such or PL/I-becomes almost trivial. Most of control. PLANNER always made a as FORTRAN and COBOL, were fro the work is done by the built-in function depth-first search of the data base and zen in an early stage of development. ready which digests entire expressions in backtracked when it came to a dead end. Mother-of-invention theory. LISP has a single gulp. There is a certain irony in The full PLANNER language was been used to attack hard problems, the longevity and stability of LISP syn never implemented, but a subset called which demand powerful tools. LISP itself tax. The parenthesized prefix notation MicroPLANNER was written in Mac- has not been adequate so there has been was introduced in 1958 only as a tempo LISP (the MIT dialect of LISP) by Ger no choice but to build new and better rary measure to get the first LISP inter ald Jay Sussman, Terry Winograd, and languages. preter running.2 The plan was to replace Hotshot theory. LISP programmers it as soon as something better could be devised. Evidently, nothing better has turned up yet. 23 Eugene Charniak.7 Its most celebrated has little to do with Hewitt's work in compound data structure. In most lan use was in Winograd's SHRDLU pro LISP; ACTOR is implemented in a guages only simple values, such as num gram, which answered natural-language Forth-like language.) bers, have all of these rights and queries about a world of toy blocks. privileges, and in earlier LISPs proce Eliminating all control structures took Scheming dures were unquestionably second-class a lot of the bother out of programming, One small feature of the PLASMA lan citizens. Scheme emancipates them. but a search based on blind backtracking guage, seemingly nothing more than a The combination of lexical scope and did not make for dazzling efficiency. technical nicety, has had far-reaching first-class procedures encourages a dis CONNIVER,8 developed by Sussman consequences. To make the Actors model tinctive style of programming in Scheme, and Drew V. McDermott, was a succes work properly, PLASMA was based on emphasizing modularity and data ab sor to PLANNER with provisions for ex lexical scope rules, in which the value of straction. For example, a procedure plicit control of execution. CONNIVER a variable is determined by the textual named make-db might set up a private was PLANNER with a manual trans context in which it is defined. Tradition data base and then return another proce mission. Using the control facilities pro ally, LISP has employed dynamic scope dure as its value. When the latter proce vided by CONNIVER, the system could rules, in which values are determined at dure is called it has exclusive access to be instructed to examine all assertions the point where a variable is referenced. the data base. Moreover, each invocation about Socrates before looking at those Lexical scope was essential in PLASMA of make-db creates a new instance of the having to do with humans and mortals. because the acquaintances of an Actor data base and a new access procedure. are listed in the Actor definition and Acting must not be altered by any rebinding of Naming Hewitt's second linguistic experiment is the same names elsewhere in the Just as Scheme liberates procedures from called the Actors model of computa program. their second-class status, a language tion.9'10 Actors are independent entities In 1975 Sussman and Guy Lewis called Symmetric LISP is built on the that encapsulate both data and proce Steele Jr., while studying the Actors concept of first-class environments. Sym dures. A program (or a system of pro- model (out of "morbid curiosity," as they metric LISP is currently being developed grams-the distinction is blurred) put it), made a surprising discovery.13 by David Gelernter of Yale University, constitutes a society of Actors that com They had written a small Actors inter Suresh Jagannathan of MIT, and Thom municate with one another by sending preter with lexical scope rules and had as London of AT&T Bell Laboratories.17 messages. Each Actor is defined by two found that the constructs representing An environment is essentially a diction components: the set of messages it recog Actors took a familiar form: they were ary in which one can look up any vari nizes and the set of acquaintances with simply lambda expressions. able name and find the corresponding whom it can communicate.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us