RNTSK

{done}GTD180005:【翻译】LISP prehistory - Summer 1956 through Summer 1958.

from: History of Lisp

My desire for an algebraic list processing language for artificial intelligence work on the IBM 704 computer arose in the summer of 1956 during the Dartmouth Summer Research Project on Artificial Intelligence which was the first organized study of AI. During this meeting, Newell, Shaw and Simon described IPL 2, a list processing language for Rand Corporation's JOHNNIAC computer in which they implemented their Logic Theorist program. There was little temptation to copy IPL, because its form was based on a JOHNNIAC loader that happened to be available to them, and because the FORTRAN idea of writing programs algebraically was attractive. It was immediately apparent that arbitrary subexpressions of symbolic expressions could be obtained by composing the functions that extract immediate subexpressions, and this seemed reason enough to go to an algebraic language.

There were two motivations for developing a language for the IBM 704. First, IBM was generously establishing a New England Computation Center at M.I.T. which Dartmouth would use. Second, IBM was undertaking to develop a program for proving theorems in plane geometry (based on an idea of Marvin Minsky's), and I was to serve as a consultant to that project. At the time, IBM looked like a good bet to pursue artificial intelligence research vigorously, and further projects were expected. It was not then clear whether IBM's FORTRAN project would lead to a language within which list processing could conveniently be carried out or whether a new language would be required. However, many considerations were independent of how that might turn out.

Apart from consulting on the geometry program, my own research in artificial intelligence was proceeding along the lines that led to the Advice Taker proposal in 1958 (McCarthy 1959). This involved representing information about the world by sentences in a suitable formal language and a reasoning program that would decide what to do by making logical inferences. Representing sentences by list structure seemed appropriate - it still is - and a list processing language also seemed appropriate for programming the operations involved in deduction - and still is.

This internal representation of symbolic information gives up the familiar infix notations in favor of a notation that simplifies the task of programming the substantive computations, e.g. logical deduction or algebraic simplification, differentiation or integration. If customary notations are to be used externally, translation programs must be written. Thus most LISP programs use a prefix notation for algebraic expressions, because they usually must determine the main connective before deciding what to do next. In this LISP differs from almost every other symbolic computation system. COMIT, FORMAC, and Formula Algol programs all express the computations as operations on some approximation to the customary printed forms of symbolic expressions. SNOBOL operates on character strings but is neutral on how character strings are used to represent symbolic information. This feature probably accounts for LISP's success in competition with these languages, especially when large programs have to be written. The advantage is like that of binary computers over decimal - but larger.

(In the late 1950s, neat output and convenient input notation was not generally considered important. Programs to do the kind of input and output customary today wouldn't even fit in the memories available at that time. Moreover, keypunches and printers with adequate character sets didn't exist).

The first problem was how to do list structure in the IBM 704. This computer has a 36 bit word, and two 15 bit parts, called the address and decrement, were distinguished by special instructions for moving their contents to and from the 15 bit index registers. The address of the machine was 15 bits, so it was clear that list structure should use 15 bit pointers. Therefore, it was natural to consider the word as divided into 4 parts, the address part, the decrement part, the prefix part and the tag part. The last two were three bits each and separated from each other by the decrement so that they could not be easily combined into a single six bit part.

At this point there was some indecision about what the basic operators should be, because the operation of extracting a part of the word by masking was considered separately from the operation of taking the contents of a word in memory as a function of its address. At the time, it seemed dubious to regard the latter operation as a function, since its value depended on the contents of memory at the time the operation was performed, so it didn't act like a proper mathematical function. However, the advantages of treating it grammatically as a function so that it could be composed were also apparent.

Therefore, the initially proposed set of functions included cwr, standing for ``Contents of the Word in Register number'' and four functions that extracted the parts of the word and shifted them to a standard position at the right of the word. An additional function of three arguments that would also extract an arbitrary bit sequence was also proposed.

It was soon noticed that extraction of a subexpression involved composing the extraction of the address part with cwr and that continuing along the list involved composing the extraction of the decrement part with cwr. Therefore, the compounds car, standing for ``Contents of the Address part of Register number'', and its analogs cdrcpr, and ctr were defined. The motivation for implementing car and cdr separately was strengthened by the vulgar fact that the IBM 704 had instructions (connected with indexing) that made these operations easy to implement. A construct operation for taking a word off the free storage list and stuffing it with given contents was also obviously required. At some point a cons(a,d,p,t) was defined, but it was regarded as a subroutine and not as a function with a value. This work was done at Dartmouth, but not on a computer, since the New England Computation Center was not expected to receive its IBM 704 for another year.

In connection with IBM's plane geometry project, Nathaniel Rochester and Herbert Gelernter (on the advice of McCarthy) decided to implement a list processing language within FORTRAN, because this seemed to the the easiest way to get started, and, in those days, writing a compiler for a new language was believed to take many man-years. This work was undertaken by Herbert Gelernter and Carl Gerberich at IBM and led to FLPL, standing for FORTRAN List Processing Language. Gelernter and Gerberich noticed that cons should be a function, not just a subroutine, and that its value should be the location of the word that had been taken from the free storage list. This permitted new expressions to be constructed out of subsubexpressions by composing occurrences of cons.

While expressions could be handled easily in FLPL, and it was used successfully for the Geometry program, it had neither conditional expressions nor recursion, and erasing list structure was handled explicitly by the program.

I invented conditional expressions in connection with a set of chess legal move routines I wrote in FORTRAN for the IBM 704 at M.I.T. during 1957-58. This program did not use list processing. The IF statement provided in FORTRAN 1 and FORTRAN 2 was very awkward to use, and it was natural to invent a function XIF(M,N1,N2) whose value was N1 or N2 according to whether the expression M was zero or not. The function shortened many programs and made them easier to understand, but it had to be used sparingly, because all three arguments had to be evaluated before XIF was entered, since XIF was called as an ordinary FORTRAN function though written in machine language. This led to the invention of the true conditional expression which evaluates only one of N1 and N2 according to whether M is true or false and to a desire for a programming language that would allow its use.

A paper defining conditional expressions and proposing their use in Algol was sent to the Communications of the ACM but was arbitrarily demoted to a letter to the editor, because it was very short.

I spent the summer of 1958 at the IBM Information Research Department at the invitation of Nathaniel Rochester and chose differentiating algebraic expressions as a sample problem. It led to the following innovations beyond FLPL:

a. Writing recursive function definitions using conditional expressions. The idea of differentiation is obviously recursive, and conditional expressions allowed combining the cases into a single formula.

b. The maplist function that forms a list of applications of a functional argument to the elements of a list. This was obviously wanted for differentiating sums of arbitrarily many terms, and with a slight modification, it could be applied to differentiating products. (The original form was what is now called mapcar).

c. To use functions as arguments, one needs a notation for functions, and it seemed natural to use the -notation of Church (1941). I didn't understand the rest of his book, so I wasn't tempted to try to implement his more general mechanism for defining functions. Church used higher order functionals instead of using conditional expressions. Conditional expressions are much more readily implemented on computers.

d. The recursive definition of differentiation made no provision for erasure of abandoned list structure. No solution was apparent at the time, but the idea of complicating the elegant definition of differentiation with explicit erasure was unattractive. Needless to say, the point of the exercise was not the differentiation program itself, several of which had already been written, but rather clarification of the operations involved in symbolic computation.

In fact, the differentiation program was not implemented that summer, because FLPL allows neither conditional expressions nor recursive use of subroutines. At this point a new language was necessary, since it was very difficult both technically and politically to tinker with Fortran, and neither conditional expressions nor recursion could be implemented with machine language Fortran functions - not even with ``functions'' that modify the code that calls them. Moreover, the IBM group seemed satisfied with FLPL as it was and did not want to make the vaguely stated but obviously drastic changes required to allow conditional expressions and recursive definition. As I recall, they argued that these were unnecessary.

 

===============

我上了IBM 704计算机人工智能工作代数表处理语言的愿望人工智能的达特茅斯暑期研究项目是哪个AI的第一次有组织的研究期间1956年夏天出现。在这次会议上,纽厄尔,肖和西蒙描述IPL 2,兰德公司的JOHNNIAC计算机列表处理语言,他们实现他们的逻辑理论家程序。有一点诱惑复制IPL,因为它基于一个JOHNNIAC装载机其形状也正好是提供给他们,和FORTRAN因为写程序的想法代数什么吸引力。这是显而易见做符号表达式的任意子表达式可以通过合成的功能并立即提取子表达式来获得,这似乎很合理的去代数语言。

有两个动机开发IBM 704首先,IBM在麻省理工学院,其慷慨地建立新英格兰计算中心语言这达特茅斯会用。其次,IBM什么事业开发证明平面几何定理的程序(根据马文·闵斯基的想法),我是作为一个顾问项目一样。当时,IBM看上去就像一个不错的选择,以大力推动人工智能研究,并预计更多的项目。它不是那么清楚是否IBM的FORTRAN项目将带来哪些列表处理中的语言可以方便地进行,或是否有新的语言是必需的。然而,许多因素都是独立的并可能最终会如何。

除了对几何程序的咨询,我自己的研究人工智能沿着线前进并导致了建议提案狩于1958年(麦卡锡,1959年)。这涉及约占世界的句子在适当的形式语言和信息的推理程序会做什么决定通过进行逻辑推理的事情。通过列表结构代表的句子似乎是适当的 - 它仍然是 - 和表处理语言,所以似乎是适当的编程中扣除所涉及的操作 - 现在仍然是。

的符号信息该内部表示放弃熟悉的中缀表示法,取而代之的是符号的确实简化了编程实质计算,E.G.的任务逻辑推理或代数简化,分化或融合。如果习惯性的符号是在外部使用,编译程序必须将写入。因此,大多数LISP程序使用前缀表示法的代数表达式,因为他们通常必须确定矿井决定下一步做什么之前主要结缔组织。在这种LISP不同于几乎所有的其他符号计算系统。COMIT,FORMAC,以及式陵方案都表达了计算上有些近似符号表达式的习惯印制的表格操作。 SNOBOL操作上的字符串,但对如何字符串用来表示符号信息中性。此功能大概占了LISP的竞争与合成语言的成功,爱尤其是当大型程序必须写。其优点就是这样的了十进制二进制电脑 - 但更大。

(20世纪50年代末,整洁的输出,方便输入符号什么不可以基因涨势认为是重要的。计划到反复的做类型的输入和输出习惯的今天甚至无法装配在回忆中可用做一次更,键孔和打印机有足够的字符集不存在)。

第一个问题,什么怎么办列表结构在IBM 704这台计算机有一个36位的字,和两个15位的部分,被称为地址和减量,是由特殊说明移动他们的内容,并从15位索引区别寄存器。机器的地址,该地址为15位,所以它做了明确的表结构shoulderstand使用15位指针。因此,它是什么,自然要考虑这个词作为共分为四个部分,地址部分,减量部分,前缀部分和日部分。最后两三个比特的每个等thatthey不能容易地组合成单个六位部分从海誓山盟由减量分离。

在这一点上有什么样的一些犹豫不决什么基本算合理的,因为通过屏蔽从什么的采取了字的内容在内存中的地址的功能手术分开考虑提取字的一部分的手术。当时,它似乎半信半疑地看待后期操作的功能,因为它的价值在业务执行什么时间在内存中的内容依赖,所以也没像一个适当的数学函数。然而,这样语法把它当作一个函数的优势,使这样做是可以组成是明显的。

因此,最初提出的功能集包括无缝线路,站立``寄存器数目字的内容'和四个功能没有提取的文字的部分,并将它们转移到标准位置字的右边。的三个参数的附加功能也因此会在提取任意位序列等什么建议。

它很快被发现没有参与作曲与无缝线路的地址部分的提取子表达式的提取,也一起参与撰写与无缝线路的减量部分的提取列表中继续进行。因此,该化合物的车,站在了``的登记号'地址部分的内容,及其类似物CDR,CPR和点击率被定义。为实现汽车和CDR由庸俗单独什么加强factthat的IBM 704有指令(索引连接)的动机也由合成操作容易实现。采取一个字关闭空闲存储列表,并与这样显然需要给内容馅它的构建操作。在某些点,一个cons(A,D,P,T),其定义,但它什么视为一个子程序,而不是作为具有值的函数。其中预计不会接受它的IBM 704再延长一年,其在达特茅斯完成的,而不是在电脑上这项工作,因为新英格兰计算中心。

在与IBM的几何项目规划方面,纳撒尼尔罗切斯特和赫伯特教训(对麦卡锡的意见),决定执行中FORTRAN列表处理语言,因为这似乎在最简单的方法上手,而且,在那些日子里,写编译器对新语言的内容深信不疑采取许多人年。这项工作正在据悉采取赫伯特和卡尔·杰伯里奇在IBM和导致FLPL,站立FORTRAN表处理语言。训练和Gerberich注意到没有缺点应该是一种功能,而不仅仅是一个子程序,并没有它的价值应该是没有已经从自由存储列表所采取的字的位置。这让新的表达式通过组合利弊的出现可以构造出subsubexpressions的。

虽然表达式可以在FLPL容易处理,因为它是成功地用于几何程序,这既没有条件表达式也不递归,和擦除其中由程序明确处理表结构。

我在一组国际象棋合法的移动程序的我在FORTRAN在麻省理工学院写了IBM 704连接发明条件表达式在1957 - 58年。该程序没有使用列表处理。在FORTRAN 1和FORTRAN 2提供的IF语句非常难以使用,这是什么自然地发明了一种功能XIF(M,N1,N2),其值N1或N2雅鼎有无表达式M这为零。该功能缩短了许多方案,让他们更容易理解,但必须谨慎使用,因为所有这三个参数有什么XIF进入,因为XIF什么叫普通函数FORTRAN虽然机器语言编写前进行评估。这导致了真正的条件表达式的发明评估其中仅N1和N2gemäß是否M的一个是真或假,并为编程语言并允许其使用的愿望。

一纸定义条件表达式,并提出他们在使用陵什么发送到ACM的通讯,但任意降级什么的给编辑的信,因为这是非常短的。

我花了1958年的夏天在IBM信息化研究部在纳撒尼尔罗切斯特的邀请,选择了差异化的代数表达式作为样本麻烦。它导致超过FLPL以下创新:

1. 使用条件表达式编写递归函数的定义。分化的想法显然递归的,并允许箱子组合成单个公式的条件表达式。

2. MAPLIST功能做形式的功能参数的列表的元素的应用程序的列表。这显然是想为区分任意许多方面的资金,并有轻微的修改,可以适用于区分产品。 (原始形式是现在所谓的mapcar)。

3.要使用函数作为参数,一个需求函数的符号,它似乎自然地用教堂的符号(1941)。我不明白他的书的休息,所以我没有很想尝试实现自己的更普遍的机制定义的功能。教会来替代使用的条件表达式高阶函。条件表达式更容易地实现计算机上。

4.分化的递归定义由废弃结构清单的擦除的规定。无解,当时明显,但分化具有明确擦除什么吸引力优雅的定义复杂的想法。不用说,这不是分化程序本身,其中有几个已经写在练习的点,而是澄清符号计算所涉及的操作。

事实上,这并没有实现夏天,因为FLPL既不允许条件表达式也不递归使用子程序的分化程序。在这一点上一个新的语言,必要的,因为它是非常困难的在技术上和政治上与Fortran的鼓捣,也不条件表达式也不递归可以用机器语言Fortran的功能来实现的 - 即使不是``功能'是修改代码没有调用它们。更结束了,因为它是什么,不想做允许条件表达式和递归定义所需的含糊声明,但显然剧变IBM组似乎很满意与FLPL。我记得,他们认为没有合成是不必要的。

posted on 2017-05-23 10:03  RNTSK  阅读(159)  评论(0编辑  收藏  举报

导航