Abstract
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.
The second author was partially supported by the Grant-in-Aid for Scientific Research, No. 59580027, of the Ministry of Education.
Preview
Unable to display preview. Download preview PDF.
References
S. K. Abdali: An abstraction algorithm for combinatory logic, J. Symbolic Logic, 41 (1976), 222–224.
F. W. Burton: A linear space representation of functional programs to Turner combinators, Inform. Process. Lett., 14 (1982), 201–204.
T. Hikita: On the average size of Turner's translation to combinator programs, J. Inform. Process., 7, 3 (1984), 164–169.
R. J. M. Hughes: Super-Combinators, Conf. Rec. of the 1982 ACM Symp. on LISP and Functional Programming, 1982, 1–10.
J. R. Kennaway: The complexity of a translation of λ-calculus to combinators, School of Computing Studies and Accountancy, Univ. of East Anglia, Norwich, 1982.
J. R. Kennaway and M. R. Sleep: Efficiency of counting director strings, typescript, 1983.
K. Noshita: Translation of Turner combinators in 0(n log n) space, Inform. Process. Lett., to appear.
D. A. Turner: Another algorithm for bracket abstraction, J. Symbolic Logic, 44 (1979), 267–270.
D. A. Turner: A new implementation technique for applicative languages, Softw. Pract. Exper., 9 (1979), 31–49.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1986 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Noshita, K., Hikita, T. (1986). The BC-chain method for representing combinators in linear space. In: Goto, E., Araki, K., Yuasa, T. (eds) RIMS Symposia on Software Science and Engineering II. Lecture Notes in Computer Science, vol 220. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-16470-7_14
Download citation
DOI: https://doi.org/10.1007/3-540-16470-7_14
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-16470-8
Online ISBN: 978-3-540-39809-7
eBook Packages: Springer Book Archive