Abstract
Turner’s combinator implementation (1979) of functional programs requires the memory space of size Ω(n 2) 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.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Abdali, S. K., “An abstraction algorithm for combinatory logic,”J. Symbolic Logic, 41, pp. 222–224, 1976.
Burton, F. W., “A linear space representation of functional programs to Turner combinators,”Inform. Process. Lett., 14, pp. 201–204, 1982.
Hikita, T., “On the average size of Turner’s translation to combinator programs,”J. Inform. Process., 7, 3, pp. 164–169, 1984.
Hughes, R. J. M., “Super-Combinators,”Conf. Rec. of the 1982 ACM Symp. on LISP and Functional Programming, pp. 1–10, 1982.
Kennaway, J. R., “The complexity of a translation of λ-calculus to combinators,” School of Computing Studies and Accountancy, Univ. of East Anglia, Norwich, 1982.
Kennaway, J. R. and Sleep, M. R., “Efficiency of counting director strings,”typescript, 1983.
Noshita, K., “Translation of Turner combinators inO(nlogn) space,”Inform. Process. Lett., 20, pp. 71–74, 1985.
Turner, D. A., “Another algorithm for bracket abstraction,”J. Symbolic Logic., 44, pp. 267–270, 1979.
Turner, D. A., “A new implementation technique for applicative languages,”Softw. Pract. Exper., 9, pp. 31–49, 1979.
Author information
Authors and Affiliations
Additional information
The second author was partially supported by the Grant-in-Aid for Scientific Research, No. 59580027, of the Ministry of Education.
About this article
Cite this article
Noshita, K., Hikita, T. The BC-chain method for representing combinators in linear space. NGCO 3, 131–144 (1985). https://doi.org/10.1007/BF03037065
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF03037065