The BC-chain method for representing combinators in linear space
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 length n 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 only 0(n) space for the translation. The basic idea is to group together into a single entity a sequence of combinators B, B′, C and C′, 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.
KeywordsUnit Operation Basic Block Reduction Algorithm Reduction Rule Interior Node
Unable to display preview. Download preview PDF.
- S. K. Abdali: An abstraction algorithm for combinatory logic, J. Symbolic Logic, 41 (1976), 222–224.Google Scholar
- T. Hikita: On the average size of Turner's translation to combinator programs, J. Inform. Process., 7, 3 (1984), 164–169.Google Scholar
- R. J. M. Hughes: Super-Combinators, Conf. Rec. of the 1982 ACM Symp. on LISP and Functional Programming, 1982, 1–10.Google Scholar
- J. R. Kennaway: The complexity of a translation of λ-calculus to combinators, School of Computing Studies and Accountancy, Univ. of East Anglia, Norwich, 1982.Google Scholar
- J. R. Kennaway and M. R. Sleep: Efficiency of counting director strings, typescript, 1983.Google Scholar
- K. Noshita: Translation of Turner combinators in 0(n log n) space, Inform. Process. Lett., to appear.Google Scholar
- D. A. Turner: Another algorithm for bracket abstraction, J. Symbolic Logic, 44 (1979), 267–270.Google Scholar
- D. A. Turner: A new implementation technique for applicative languages, Softw. Pract. Exper., 9 (1979), 31–49.Google Scholar