Turner’s combinator implementation (1979) of functional programs requires the memory space of size Ω(n2) in the worst case for translating given lambda expressions of lengthn to combinator graphs. In this paper a new idea named the BC-chain method for transferring actual arguments to variables is presented. We show that the BC-chain method requires onlyO(n) space for the translation. The basic idea is to group together into a single entity a sequence of combinatorsB, B′, C andC′, for a variable, which appear consecutively along a path in the combinator graph. We formulate two reduction algorithms in the new representation. The first algorithm naively simulates the original normal order reduction, while the second algorithm simulates it in constant time per unit operation of the original reduction. Another reduction method is also suggested, and a technique for practical implementation is briefly mentioned.
[1]
D. A. Turner.
Another Algorithm for Bracket Abstraction
,
1979,
J. Symb. Log..
[2]
Kohei Noshita.
Translation of Turner Combinators in O(n log n) Space
,
1985,
Inf. Process. Lett..
[3]
D. A. Turner,et al.
A new implementation technique for applicative languages
,
1979,
Softw. Pract. Exp..
[4]
Teruo Hikita,et al.
On the Average Size of Turner's Translation to Combinator Programs
,
1984
.
[5]
S. Kamal Abdali,et al.
An abstraction algorithm for combinatory logic
,
1976,
Journal of Symbolic Logic.
[6]
F. Warren Burton.
A Linear Space Translation of Functional Programs to Turner Combinators
,
1982,
Inf. Process. Lett..