Abstract
We analyze the efficiencies of closure reduction and combinatory reduction schemes by introducing a labelled tree representing a λ-term. Translation of a λ-term into combinatory terms, i.e. bracket abstraction, can be viewed as attaching labels S, B, C, K, I to each node. Similarly, a node of a tree representing a λ-term can be labelled depending upon the presence of free variables in the subtrees. Resulting labelled trees which represent a λ-term and the translated combinatory term are made similar, i.e. whose underlying trees are the same. We can then make performance comparisons in terms of the cost involved in traversing the labelled trees by machine models reflecting the essential behaviors of Turner's combinatory reducer and a closure reducer. Our work is an elaboration of Turner's and Peyton Jones's experiments of combinatory reductions. However, our approach is not to resort to actual runs of programs, but is more theoretical, based on abstract machine models working on labelled trees.
Our conclusion of the performance comparisons is that a closure reducer is in most cases more efficient than combinatory reducers in terms of storage consumption which is a dominant factor in determining the overall performance of the reducers. Furthermore, we show that the two reducers which seem quite different at first sight is in fact very similar and with small modifications the two schemes become essentially the same.
This work is partly based on the activities of WG. 5 of Fifth Generation Computer Project of ICOT. The first author is supported by the Grant in Aid of Ministry of Education and Culture, No. 59580027.
Preview
Unable to display preview. Download preview PDF.
10. References
Barendregt, H. P., The Lambda Calculus, its Syntax and Semantics, North-Holland Pub. Co., 1981
de Bruijn, N. G., Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem Indag Math, 34, 381–392
Hikita, T., On the average size of Turner's translation to combinator programs, Journal of Information Processing, 7(1984) 164–169
Hughes, R. J. M., Super combinators: A new implementation method for applicative languages, Conference Record of the 1982 ACM symposium on LISP and functional programming (Aug. 1982), 1–10
Keller, R. M., FEL (Function-Equation Language) Programmer's Guide AMPS Technical Memorandum No. 7, Department of Computer Science, Univ. of Utah, March 1982, Revised April 1983
Kennaway, J. R., The complexity of a translation of λ-calculus to combinators, University of East Anglia, Report CS/82/23/E, 1982
Knuth, D. E., The Art of Computer Programming, 2nd edition, Vol. 1, Addison-Wesley Pub. Co.
Landin, P. J., The mechanical evaluation of expressions, The Computer Journal, Vol. 6, (1964), 308–320
Peyton Jones, S. L., An investigation of the relative efficiency of combinators and lambda expressions, Conference Record of the 1982 ACM symposium on LISP and functional programming (Aug. 1982), 150–158
Turner, D., A new implementation technique for applicative languages, Software-Practice and Experiences, Vol. 9, (1979), 31–49
Warren, D., Implementing PROLOG — Compiling logic programs, 1 and 2, D.A.I. Research Report No. 39 and 40, University of Edinbough, 1977
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1986 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ida, T., Konagaya, A. (1986). Comparison of closure reduction and combinatory reduction schemes. 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_13
Download citation
DOI: https://doi.org/10.1007/3-540-16470-7_13
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