Some Lisp History and Some Programming Language Ideas
Some Lisp History and Some Programming Language Ideas
I suppose Im here because of Lisp, although I hav involved in the Lisp community for a very long time.
Lisp is actively used, e.g. on the Deep Space 1 spac in the Orbitz airline reservation system, but I dont details.
Fritz Kunzes Franz Inc. makes quite a good com called Allegro Common Lisp.
Some important aspects of Lisp are not availabl programming languages and systems. I dont know used in the above applications.
The original idea was to combine 1956 list processin by Newell, Simon and Shaw with ideas from John Bac tran.
Herbert Gelernter at IBM undertook to implement M skys idea for a plane geometry theorem prover, and list processing in Fortran. Gelernter and Carl Gerbe oped FLPL.
In 1958 Lisp was started at M.I.T. using recursion, not feasible in Fortran. Lisp was intended for AI prog
Lisp was intended to be compiled at rst. Howeve a universal Lisp function eval in 1959 to show that L neater language for computability theory than Turing Steve Russell pointed out that the universal function taken as an interpreter for pure Lisp, and hand-com IBM 704 machine language.
DIFFERENTIATIONthe motivating examp The following example motivated recursion using conditional expressions lisp notation for algebraic expressions
di(e, v ) if at e then [if e = v then 1 else 0 ] else if car e = P LU S then P LU S . maplist(cdr e, u.dif f else if car e = T IM ES then P LU S . maplist(cdr e, u maplist(cdr e, w. if u eq w then dif f (car u, v ) else
ASPECTS OF LISP
Lisp lists including lists of list are the appropriate repr of symbolic expressions for computationbetter than and better than XML.
Lisp programs are Lisp data. Put abstractly, Lisp has for its own abstract syntax.
Lisp programs, most conveniently pure Lisp funct grams, are are described extensionally by rst order s
EXAMPLES OF LISP FUNCTIONAL PROGRA (defun append (u v) (if (null u) v (cons (car u) (append (cdr u) v)))) u v if n u then v else a u . [d u v ] is a functional program.
(u v )(u v = if n u then v else a u . [d u equation for the function computed by the program. correspondence is very convenient but sometimes con
The pure Lisp functional program as an equation pe venient proofs in a rst order theory that Lisp progr their specications. For example, it is easy to prove duction that u v.(u v ) w = u (v w)), i.e. associative operation. that appending
Garbage collection, conditional expressions and rec grams have been taken into other languages.
LISP data structures have been imitated clumsily in (BUY item1 Item2 Item3) <BUY> item1 item2 item3 </BUY>
LISP programs having access to the abstract syn program has not been imitated. This represents a lac ination, but I admit I dont have convincing examples
DERIVED FUNCTIONS
The computational cost of a Lisp functional recursiv is not determined by the extension of the function. W f 91(x) if x > 100 then x 10 else f 91(f 91(x + 11 and f f 91(x) if x > 100 then x 10 else 91.
We have x.f 91(x) = f f 91 (x)), but clearly the func grams are dierent computationally. Suppose we are in how many times the + operation is executed in f 91(x). This is given by f 91p (x), where
An elephant never forgets. An Elephant program A passenger has a reservation in a situation s if he h reservation and not cancelled it. The Elephant program specify a data structure to remember reservations. Th must provide the necessary data structures so that passenger has a reservation can be determined.
Has(passenger, reservation, s) (s < s)Occurs(M akes(passenger, reservation), s) (s)(s < s < s Occurs(Cancel(P assenger, reserv
An elephant is faithful one hundred percent. A r is a promise to let the passenger on the airplane if h when he shows up. One kind of Elephant output stat promise, and correct Elephant programs fulll their p
The Elephant language includes program stateme commitments generalizing Floyd assertions, because refer to the future, A correct Elephant program full mitments. (s > N ow)(V alue(X, s) > V alue(X, N ow))
Elephant i-o input output statments are speech acts, tions, requests, acceptances of proposals, answers to Answers to questions should be true and responsive.
ALGOL 48
If we introduce time explicitly as distinct from the counter, Algolic programs can be written as sets of Heres an Algol 60 program for computing the prod two natural numbers. start : i := n; p := 0; loop : goto done : if i = 0 then go to done; loop; i := i 1;
Heres what mathematicians might have written in 19 programming languages existed. pc(0) = 0; else if pc(t) = 4 then i(t) 1 else i(t); else if pc(t) = 5 then p(t) + m else p(t) else if pc(t) = 5 then 2 else pc(t) + 1;
i(t + 1) = if pc(t) =
p(t + 1) = if pc(t) =
pc(t + 1) = if pc(t) =
The proof that t.(t 0 pc(t) = 6 p(t) = mn) fo the sentences expressing the program and the laws of a i.e. no theory of program correctness is needed. Ho proof ideas are essentially the same as those used to an algolic program terminates and that the outputs correct relation to the inputs. Amir Pnueli and Nissi had this idea before I did, but they mistakenly aband temporal logic.