LISP



Historical background

In the mid-1950s, most computers dealt with numerical data, including linguistics, psychology, and mathematics. Some people began to develop artificial intelligence. Interest. I feel that it is necessary to achieve a common need to enable the computer to process the symbolic data in the linked list, and allow the process of language processing, information storage and retrieval, and theorem proving to be machined. IBM was one of the first commercial organizations interested in artificial intelligence development.

In the summer of 1958, John McCarthy, a pioneer in artificial intelligence research from the Massachusetts Institute of Technology, participated in the work of the IBM Information Research Department to study symbolic computing and application requirements. However, IBM's Fortran table processing language fails to support symbolic operations such as recursion, conditional expressions, dynamic storage allocation, and implicit recovery. After John McCarthy returned to MIT in the fall of 1958, he formed an artificial intelligence project with MarvinMinsky. Developed a table processing software system to realize the work of McCarthy's suggestion adopter program, and then promoted the birth of the table processing language LISP.

Development process

In April 1960, McCarthy published on the ACM Newsletter with the title "Symbolic Expressions of Recursive Functions and Methods of Operation by Machines, Part One" LISP settings. According to the paper, McCarthy’s student Steve Russell successfully implemented the first version of LISP with IBM704 at the Computer Computing Center of the Massachusetts Institute of Technology.

In 1962, McCarthy and the artificial intelligence team improved the LISP1.5 version based on the compilation of LISP1.

In September 1969, StanfordLISP1.6 launched by LynnQuam and WhitfieldDiffie of Stanford University Artificial Intelligence Laboratory was widely used in the PDP-10 computer system using TOPS-10 system. However, StanfordLISP1.6 version was gradually abandoned after the success of the MIT Smart Project update LISP1.5 into the InterLisp launched by MACLISP and BBN Technology.

From the late 1960s to the early 1980s, various updated LISP versions emerged, including FranzLisp from the University of California, Berkeley, XLISP, the predecessor of AutoLISP running in AutoCAD, StandardLisp and PortableStandardLisp developed by the University of Utah, and specialized It belongs to ZetaLisp running on Lisp machines, LeLisp from the French National Institute of Information and Automation, and Scheme developed by Gerald Sussman and GuySteele of the MIT Artificial Intelligence Laboratory.

In 1984, CommonLisp, which was improved from MacLisp, integrated all versions, cross-platform, and was regarded as the de facto standard, was born. By 1994, the American National Standards Institute (ANSI) standardized the CommonLisp language.

Since the emergence of the stable CommonLisp, various organizations have developed follow-up Lisp according to their needs, including EuLisp from European users in 1990, Clojure running on the Java virtual machine, and creation under the influence of Maclisp. EmacsLisp, the free and open source CMUCL from Carnegie Mellon University, and IsLisp, Racket, ACL2, etc. flourish.

Since 2000, a free and open source community supported by LISP sharers has gradually formed and is committed to the follow-up development of LISP.

In October 2002, the first international LISP conference was held in San Francisco, USA, and the LISP conference was held from time to time around the world, including the 2014 conference on the theme of mobile at the University of Montreal, Canada.

Language features

LISP is a functional programming language. All operations can be implemented in a way that functions act on parameters.

LISP does not have common assignment statements and variables in imperative language programs, and the repeated process can be represented by recursive function calls, without the need to use the loop mode.

LISP is an ancient functional language, weak typing, dynamic inference, and its code itself is a variety of lists. Each table item can store any type of data such as numbers, functions, symbols, or a sub-table, etc., during encoding, you can operate at any time to update the list.

There are only 7 operators in the core of LISP: quote, atom, eq, car, cdr, cons, cond. The first three, quote, atom, and eq, are used for symbol inference; car, cdr, and cons manipulate the table; cond is responsible for branch judgment. This concise definition is very close to the pure functional language of the Turing machine prototype, which is completely unmatched by modern languages.

As a weak type, the relative disadvantage of LISP is its low operating efficiency. The shortcoming of the original definition is concise, making it difficult for large-scale development projects. From the bottom to the high level, from the two-dimensional table query to the object-oriented, users need to embed more functions to achieve this, resulting in the derivation of many dialects of LISP.

Language composition

Data type

LISP has only two data structures, atom (atom) and table b>(list). An atom is a symbol or a literal value of a number in the form of an identifier, and a table is a sequence of zero or more expressions. Basically, the LISP program does not need to use any insertion and deletion operations necessary for general table processing.

Sentence structure

The syntax of LISP is concise and typical. The form of program code and data are exactly the same, and the table is bounded by parentheses. For example, the table:

(ABCD)

When interpreted by data, it is a table with 4 elements. When interpreted by code, it will be named A The function acts on 3 parameters B, C and D.

When specifying the table structure, put the elements of the table in parentheses. The element of the simple table is only made up of atoms:

( ABCD)

Nested table structure is also expressed in parentheses, for example, table:

(A(BC)D(E(FG) ))

Composed of 4 elements.

The first element is atom A, the second is sublist (BC), the third is atom D, and the fourth is sublist (E(FG)), its second The element is a child table (FG).

Keywords

LISP is a functional programming language. There are no keywords or reserved word settings, which can be defined by users.

Language execution

LISP syntax can be embodied by executing the HelloWorld program. This program is executed by XLISP-STAT2.1, 3.45Beta version compiler.

(DEFUN HELLO() "HELLO World")

Sources of language composition information

Language standards

The derived LISP language has been certified in the following standards:

ANSIX3.226-1994-1994, the programming language CommonLisp (CommonLispProgramminglanguage)

IEEEstandard1178 –1990(R1995)In 1995, the programming language Scheme (SchemeProgramminglanguage)

ISO/IEC13816:1997-1997, the programming language ISLISP (ISLISPProgramminglanguage) has been withdrawn

ISO/IEC13816:2007-2007, ISLISP (ISLISPProgramminglanguage)

Language application

LISP is a pioneer in functional programming, and its many revolutionary innovative thinking has affected the development of subsequent programming languages, and it has completely monopolized the application of artificial intelligence for one-third of a century. The inefficiency factors that appeared in the early years of development have also been removed in the collective improvement, achieving CommonLisp, Scheme, EmacsLisp and Clojure which are widely used in software development, e-commerce and financial systems.

Tento článek je ze sítě, nereprezentuje pozici této stanice. Uveďte prosím původ dotisku
HORNÍ