Concepts of Programming Languages

(Sean Pound) #1
End Do
! Compute the average
Average = Sum / List_Len
! Count the values that are greater than the average
Do Counter = 1, List_Len
If (Int_List(Counter) > Average) Then
Result = Result + 1
End If
End Do
! Print the result
Print *, 'Number of values > Average is:', Result
Else
Print *, 'Error - list length value is not legal'
End If
End Program Example

2.4 Functional Programming: LISP


The first functional programming language was invented to provide language
features for list processing, the need for which grew out of the first applications
in the area of artificial intelligence (AI).

2.4.1 The Beginnings of Artificial Intelligence and List Processing


Interest in AI appeared in the mid-1950s in a number of places. Some of this
interest grew out of linguistics, some from psychology, and some from math-
ematics. Linguists were concerned with natural language processing. Psycholo-
gists were interested in modeling human information storage and retrieval, as
well as other fundamental processes of the brain. Mathematicians were inter-
ested in mechanizing certain intelligent processes, such as theorem proving.
All of these investigations arrived at the same conclusion: Some method must
be developed to allow computers to process symbolic data in linked lists. At the
time, most computation was on numeric data in arrays.
The concept of list processing was developed by Allen Newell, J. C. Shaw,
and Herbert Simon at the RAND Corporation. It was first published in a clas-
sic paper that describes one of the first AI programs, the Logic Theorist,^2 and
a language in which it could be implemented (Newell and Simon, 1956). The
language, named IPL-I (Information Processing Language I), was never imple-
mented. The next version, IPL-II, was implemented on a RAND Johnniac
computer. Development of IPL continued until 1960, when the description
of IPL-V was published (Newell and Tonge, 1960). The low level of the IPL
languages prevented their widespread use. They were actually assembly lan-
guages for a hypothetical computer, implemented with an interpreter, in which


  1. Logic Theorist discovered proofs for theorems in propositional calculus.


2.4 Functional Programming: LISP 47
Free download pdf