Abstract
We present a formal and general specification of lambda lift- ing and prove its correctness with respect to an operational semantics. Lambda lifting is a program transformation which eliminates free vari- ables from functions by introducing additional formal parameters to func- tion definition and additional actual parameters to function calls. This operation supports the transformation from a lexically-structured func- tional program into a set of recursive equations. Existing results provide specific algorithms with no flexibility, no general specification, and only limited correctness results. Our work provides a general specification of lambda lifting (and related operations) which supports flexible trans- lation strategies which may result in new implementation techniques. Our work also supports a simple framework in which the interaction of lambda lifting and other optimizations can be studied and from which new algorithms might be obtained.
This work is supported in part by NSF Award #CCR-9900918.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Clinger, W., and Hansen, L. T. Lambda, the ultimate label, or a simple optimizing compiler for scheme. In 1994 Conference on Lisp and Functional Pro-gramming (1994), C. Talcott, Ed., ACM Press, pp. 128–139.
Danvy, O. An extensional characterization of lambda lifting. Tech. Rep.RS-98-2, BRICS, January 1998.
Danvy, O., and Schultz, U. P. Lambda dropping: Transforming recursive equa-tions into programs with block structure. Tech. Rep.RS-99-27, BRICS, September 1999. To appear in the November 2000 issue of Theoretical Computer Science.
Hannan, J. Type systems for closure conversions. In Participants’ Proceedings of the Workshop on Types for Program Analysis (May 1995), H. R. Nielson and K. L. Solberg, Eds., Aarhus University, DAIMI PB-493, pp. 48–62.
Hannan, J. A type-based escape analysis for functional languages. Journal of Functional Programming 8, 3(May 1998).
Hannan, J., and Hicks, P. Live variable analysis using types. In Workshop on Types in Compilation (1997), Computer Science Department, Boston College. Available as a technical report.
Hannan, J., and Hicks, P. Higher-order arity raising. In Proceedings of the Third International Conference on Functional Programming (September 1998), P. Hudak and C. Queinnec, Eds., ACM SIGPLAN, pp. 27–38.
Hannan, J., and Hicks, P. Higher-order unCurrying. In Proceedings of the 25th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (January 1998), pp. 1–11.
Hughes, J. Super combinators: A new implementation method for applicative lan-guages. In Conference Record of the 1982 ACM Symposium on Lisp and Functional Programming(August 1982), D. S. Wise, Ed., pp. 1–10.
Johnsson, T. Lambda lifting: Transforming programs to recursive equations. In Functional Programming Languages and Computer Architecture (1985), J.-P. Jouannaud, Ed., vol. 201 of Lecture Notes in Computer Science, Springer-Verlag, pp. 190–203.
Milner, R., and Tofte, M. Co-induction in relational semantics. Theoretical Computer Science 87, 1(1991), 209–220.
Peyton Jones, S. L. The Implementation of Functional Programming Languages. Prentice Hall International Series in Computer Science. Prentice Hall International, 1987.
Peyton Jones, S. L., and Lester, D. R. Implementing Functional Languages. Prentice Hall International Series in Computer Science. Prentice Hall International, 1992.
Peyton Jones, S. L., Partain, W., and Santos, A. Let-floating: Moving bind-ings to give faster programs. In Proceedings of the ACM SIGPLAN International Conference on Functional Languages (1996), R. Harper, Ed., pp. 1–12.
Shao, Z., and Appel, A. Space-efficient closure representations. In Proceedings of the 1994 ACM Conference on Lisp and Functional Programming (June 1994), pp. 150–161.
Shivers, O. Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie-Mellon University, May 1991.
Wand, M., and Steckler, P. Lightweight Closure Conversion. In ACM Trans-actions on Programming Languages and Systems (January 1997), pp. 48–86.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Fischbach, A., Hannan, J. (2000). Specification and Correctness of Lambda Lifting. In: Taha, W. (eds) Semantics, Applications, and Implementation of Program Generation. SAIG 2000. Lecture Notes in Computer Science, vol 1924. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45350-4_10
Download citation
DOI: https://doi.org/10.1007/3-540-45350-4_10
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41054-6
Online ISBN: 978-3-540-45350-5
eBook Packages: Springer Book Archive