Communications of the ACM
Functional Programming
LISP 1.5 Programmer's Manual
Survey on special purpose computer architectures for AI
ACM SIGART Bulletin
Central European Functional Programming School
Hi-index | 0.00 |
At first the concept of reduction by direct substitution is described. The syntax of a subset of Berkling's reduction language is given and then its semantics is defined by a set of substitution rules. An example - a program operating on a data structure - will demonstrate two aspects: firstly, it shows how reduction using substitution works, and secondly, it points out the n2-problem, i.e. the time taken to run the program is proportional to n2, where n is the number of items in the data structure. We discuss the problem and then give a solution, which we call the heap/substitution concept. The solution is an extension of the substitution concept and we get it by adding a restricted use of an environment. All advantages of reduction by substitution remain in effect but the time taken to evaluate programs operating on large data structures is now proportional to n. It is also shown that the heap/substitution concept can be used to implement an efficient implementation of recursive function calls.