Skip to main content

Specification and Correctness of Lambda Lifting

  • Conference paper
  • First Online:
Semantics, Applications, and Implementation of Program Generation (SAIG 2000)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1924))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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.

    Google Scholar 

  2. Danvy, O. An extensional characterization of lambda lifting. Tech. Rep.RS-98-2, BRICS, January 1998.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. Hannan, J. A type-based escape analysis for functional languages. Journal of Functional Programming 8, 3(May 1998).

    Google Scholar 

  6. 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.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. 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.

    Google Scholar 

  9. 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.

    Google Scholar 

  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.

    Google Scholar 

  11. Milner, R., and Tofte, M. Co-induction in relational semantics. Theoretical Computer Science 87, 1(1991), 209–220.

    Article  MathSciNet  Google Scholar 

  12. Peyton Jones, S. L. The Implementation of Functional Programming Languages. Prentice Hall International Series in Computer Science. Prentice Hall International, 1987.

    Google Scholar 

  13. Peyton Jones, S. L., and Lester, D. R. Implementing Functional Languages. Prentice Hall International Series in Computer Science. Prentice Hall International, 1992.

    Google Scholar 

  14. 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.

    Google Scholar 

  15. 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.

    Google Scholar 

  16. Shivers, O. Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie-Mellon University, May 1991.

    Google Scholar 

  17. Wand, M., and Steckler, P. Lightweight Closure Conversion. In ACM Trans-actions on Programming Languages and Systems (January 1997), pp. 48–86.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics