skip to main content
research-article

A unified approach to fully lazy sharing

Published:25 January 2012Publication History
Skip Abstract Section

Abstract

We give an axiomatic presentation of sharing-via-labelling for weak lambda-calculi, that makes it possible to formally compare many different approaches to fully lazy sharing, and obtain two important results. We prove that the known implementations of full laziness are all equivalent in terms of the number of beta-reductions performed, although they behave differently regarding the duplication of terms. We establish a link between the optimality theories of weak lambda-calculi and first-order rewriting systems by expressing fully lazy lambda-lifting in our framework, thus emphasizing the first-order essence of weak reduction.

Skip Supplemental Material Section

Supplemental Material

popl_7b_1.mp4

References

  1. Z.M. Ariola and M. Felleisen. The call-by-need lambda calculus. J. Funct. Program., 7(3):265--301, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Z.M. Ariola, M. Felleisen, J. Maraist, M. Odersky, and P. Wadler. The call-by-need lambda calculus. In POPL, pages 233--246, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Asperti and S. Guerrini. The optimal implementation of functional programming languages. Cambridge University Press, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. Asperti and H.G. Mairson. Parallel Beta Reduction is not Elementary Recursive. In POPL, pages 303--315, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. T. Balabonski. A Unified Approach to Fully Lazy Sharing. http://hal.archives-ouvertes.fr/hal-00637048/. Rapport technique PPS, 2011.Google ScholarGoogle Scholar
  6. H.P. Barendregt, R. Kennaway, J-W. Klop, and M. Ronan Sleep. Needed reduction and spine strategies for the lambda calculus. Inf. Comput., 75(3):191--231, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. T. Blanc, J.-J. Lévy, and L. Maranget. Sharing in the Weak Lambda-Calculus Revisited. In Reflections on Type Theory, Lambda Calculus and the Mind, 2007.Google ScholarGoogle Scholar
  8. H.J.S. Bruggink. Residuals in higher-order rewriting. In RTA, pages 123--137, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. N. Çagman and J. R. Hindley. Combinatory weak reduction in lambda calculus. TCS, 198(1--2):239--247, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. O. Danvy, K. Millikin, J. Munk, and I. Zerny. Defunctionalized Interpreters for Call-by-Need Evaluation. In FLOPS, pages 240--256, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. D. Dougherty, P. Lescanne, L. Liquori, and F. Lang. Addressed Term Rewriting Systems: Syntax, Semantics, and Pragmatics: Extended Abstract. ENTCS, 127(5):57--82, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Glauert and Z. Khasidashvili. Relative normalization in deterministic residual structures. In CAAP, pages 180--195, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J.R.W. Glauert, D. Kesner, and Z. Khasidashvili. Expression reduction systems and extensions: An overview. In Processes, Terms and Cycles, pages 496--553, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C.K. Holst and D.K. Gomard. Partial evaluation is fuller laziness. In PEPM, pages 223--233, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. R.J.M. Hughes. Super combinators: A new implementation method for applicative languages. In LFP, pages 1--10, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. T. Johnsson. Lambda lifting: Transforming programs to recursive equations. In FPCA, pages 190--203, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Peyton Jones. The Implementation of Functional Programming Languages. Prentice-Hall, Inc., 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J.W. Klop, V. van Oostrom, and F. van Raamsdonk. Combinatory reduction systems: Introduction and survey. Theor. Comput. Sci., 121(1&2):279--308, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. Lamping. An algorithm for optimal lambda calculus reduction. In POPL, pages 16--30, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. Launchbury. A natural semantics for lazy evaluation. In POPL, pages 144--154, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. U. Dal Lago and S. Martini. On constructor rewrite systems and the lambda-calculus. In ICALP (2), pages 163--174, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J.-J. Lévy. Optimal reductions in the lambda-calculus. In To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalisms, pages 159--191, 1980.Google ScholarGoogle Scholar
  23. L. Maranget. Optimal Derivations in Weak Lambda-calculi and in Orthogonal Terms Rewriting Systems. In POPL, pages 255--269, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Pedicini and F. Quaglia. Pelcr: Parallel environment for optimal lambda-calculus reduction. ACM Trans. Comput. Logic, 8, July 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. P. Sestoft. Deriving a lazy abstract machine. J. Funct. Program., 7(3):231--264, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. O. Shivers and M. Wand. Bottom-up β-reduction: Uplinks and ł-DAGs. In ESOP, pages 217--232, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Terese. Term Rewriting Systems. Cambridge Univ.! Press, 2003.Google ScholarGoogle Scholar
  28. D.A. Turner. A new implementation technique for applicative languages. In Softw., Pract. Exper., 9(1):31--49, 1979.Google ScholarGoogle ScholarCross RefCross Ref
  29. V. van Oostrom. Higher-order families. In RTA, pages 392--407, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. C. P. Wadsworth. Semantics and Pragmatics of the Lambda Calculus. Ph.D. thesis, 1971.Google ScholarGoogle Scholar
  31. N. Yoshida. Optimal reduction in weak-ł-calculus with shared environments. J. of Computer Software, 11(5):2--20, 1994.Google ScholarGoogle Scholar

Index Terms

  1. A unified approach to fully lazy sharing

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!