skip to main content
research-article

Weak optimality, and the meaning of sharing

Published:25 September 2013Publication History
Skip Abstract Section

Abstract

In this paper we investigate laziness and optimal evaluation strategies for functional programming languages. We consider the weak lambda-calculus as a basis of functional programming languages, and we adapt to this setting the concepts of optimal reductions that were defined for the full lambda-calculus. We prove that the usual implementation of call-by-need using sharing is optimal, that is, normalizing any lambda-term with call-by-need requires exactly the same number of reduction steps as the shortest reduction sequence in the weak lambda-calculus without sharing. Furthermore, we prove that optimal reduction sequences without sharing are not computable. Hence sharing is the only computable means to reach weak optimality.

References

  1. Thibaut Balabonski. Axiomatic sharing-via-labelling. In Ashish Tiwari, editor, RTA, volume 15 of LIPIcs, pages 85--100. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2012.Google ScholarGoogle Scholar
  2. Thibaut Balabonski. La pleine paresse, une certaine optimalité. Ph.D. thesis, Université Paris 7 -- Diderot, 2012.Google ScholarGoogle Scholar
  3. Thibaut Balabonski. A unified approach to fully lazy sharing. In John Field and Michael Hicks, editors, POPL, pages 469--480. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Hendrik Pieter Barendregt. The Lambda Calculus -- Its Syntax and Semantics, volume 103 of Studies in Logic and the Foundations of Mathematics. North-Holland Publishing Company, Amsterdam, revised edition edition, 1984.Google ScholarGoogle Scholar
  5. Hendrik Pieter Barendregt, Jan A. Bergstra, Jan Willem Klop, and Henri Volken. Some notes on lambda reduction. Technical Report 22, University of Utrecht, Dpt. of mathematics, 1976.Google ScholarGoogle Scholar
  6. Hendrik Pieter Barendregt, Richard Kennaway, Jan Willem Klop, and M. Ronan Sleep. Needed reduction and spine strategies for the lambda calculus. Information and Computation, 75(3):191--231, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Tomasz Blanc, Jean-Jacques Lévy, and Luc Maranget. Sharing in the weak lambda-calculus revisited. In Erik Barendsen, Herman Geuvers, Venanzio Capretta, and Milad Niqui, editors, Reflections on Type Theory, Lambda Calculus, and the Mind, pages 41--50. ICIS, Faculty of Science, Radbout University Nijmegen, 2007. Essays Dedicated to Henk Barendregt on the Occasion of his 60th Birthday.Google ScholarGoogle Scholar
  8. Naim Çagman and J. Roger Hindley. Combinatory weak reduction in lambda calculus. Theoretical Computer Science, 198(1-2):239--247, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Olivier Danvy and Ulrik Pagh Schultz. Lambda-dropping: transforming recursive equations into programs with block structure. Theoretical Computer Science, 248(1-2):243--287, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. John R. W. Glauert and Zurab Khasidashvili. Relative normalization in deterministic residual structures. In Hélène Kirchner, editor, CAAP, volume 1059 of Lecture Notes in Computer Science, pages 180--195. Springer, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Stefano Guerrini. Theoretical and Practical Issues of Optimal Implementations of Functional Languages. Ph.D. thesis, Università di Pisa, 1996.Google ScholarGoogle Scholar
  12. William Alvin Howard. Assignment of ordinals to terms for primitive recursive functionals of finite type. In Intuitionism and Proof Theory, pages 443--458, 1970.Google ScholarGoogle ScholarCross RefCross Ref
  13. Zurab Khasidashvili. Optimal normalization in orthogonal term rewriting systems. In Claude Kirchner, editor, RTA, volume 690 of Lecture Notes in Computer Science, pages 243--258. Springer, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Jan Willem Klop, Vincent van Oostrom, and Femke van Raamsdonk. Combinatory reduction systems: Introduction and survey. Theoretical Computer Science, 121(1&2):279--308, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. John Lamping. An algorithm for optimal lambda calculus reduction. In Frances E. Allen, editor, POPL, pages 16--30. ACM Press, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Jean-Jacques Lévy. Réductions correctes et optimales dans le lambda-calcul. Ph.D. thesis, Université Paris VII, 1978.Google ScholarGoogle Scholar
  17. Jean-Jacques 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
  18. Luc Maranget. Optimal derivations in weak lambda-calculi and in orthogonal terms rewriting systems. In David S. Wise, editor, POPL, pages 255--269. ACM Press, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Simon L. Peyton-Jones. The Implementation of Functional Programming Languages. Prentice-Hall, 1987.Google ScholarGoogle Scholar
  20. Dana Scott. A system of functional abstraction, 1968. Lectures delivered at University of California, Berkeley, Cal., 1962/63.Google ScholarGoogle Scholar
  21. Terese. Term Rewriting Seminar -- Terese. Vol. 55 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 2003.Google ScholarGoogle Scholar
  22. Vincent van Oostrom. Finite family developments. In Hubert Comon, editor, RTA, volume 1232 of Lecture Notes in Computer Science, pages 308--322. Springer, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Christopher P. Wadsworth. Semantics and Pragmatics of the Lambda Calculus. Ph.D. thesis, Oxford, 1971.Google ScholarGoogle Scholar

Index Terms

  1. Weak optimality, and the meaning of 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

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 48, Issue 9
        ICFP '13
        September 2013
        457 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2544174
        Issue’s Table of Contents
        • cover image ACM Conferences
          ICFP '13: Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
          September 2013
          484 pages
          ISBN:9781450323260
          DOI:10.1145/2500365

        Copyright © 2013 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 25 September 2013

        Check for updates

        Qualifiers

        • research-article

      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!