Skip to main content

Advertisement

SpringerLink
Log in
Menu
Find a journal Publish with us
Search
Cart
Book cover

European Symposium on Programming

ESOP 2012: Programming Languages and Systems pp 128–147Cite as

  1. Home
  2. Programming Languages and Systems
  3. Conference paper
The Call-by-Need Lambda Calculus, Revisited

The Call-by-Need Lambda Calculus, Revisited

  • Stephen Chang17 &
  • Matthias Felleisen17 
  • Conference paper
  • 1568 Accesses

  • 20 Citations

  • 3 Altmetric

Part of the Lecture Notes in Computer Science book series (LNPSE,volume 7211)

Abstract

The existing call-by-need λ describe lazy evaluation via equational logics. A programmer can use these logics to safely ascertain whether one term is behaviorally equivalent to another or to determine the value of a lazy program. However, neither of the existing calculi models evaluation in a way that matches lazy implementations.

Both calculi suffer from the same two problems. First, the calculi never discard function calls, even after they are completely resolved. Second, the calculi include re-association axioms even though these axioms are merely administrative steps with no counterpart in any implementation.

In this paper, we present an alternative axiomatization of lazy evaluation using a single axiom. It eliminates both the function call retention problem and the extraneous re-association axioms. Our axiom uses a grammar of contexts to describe the exact notion of a needed computation. Like its predecessors, our new calculus satisfies consistency and standardization properties and is thus suitable for reasoning about behavioral equivalence. In addition, we establish a correspondence between our semantics and Launchbury’s natural semantics.

Keywords

  • call-by-need
  • laziness
  • lambda calculus

Download conference paper PDF

References

  1. Ariola, Z., Blom, S.: Cyclic Lambda Calculi. In: Ito, T., Abadi, M. (eds.) TACS 1997. LNCS, vol. 1281, pp. 77–106. Springer, Heidelberg (1997)

    CrossRef  Google Scholar 

  2. Ariola, Z.M., Felleisen, M.: The call-by-need lambda-calculus. Tech. Rep. CIS-TR-94-23, University of Oregon (1994)

    Google Scholar 

  3. Ariola, Z.M., Felleisen, M.: The call-by-need lambda calculus. J. Funct. Program. 7, 265–301 (1997)

    CrossRef  MathSciNet  MATH  Google Scholar 

  4. Ariola, Z.M., Maraist, J., Odersky, M., Felleisen, M., Wadler, P.: A call-by-need lambda calculus. In: Proc. 22nd Symp. on Principles of Programming Languages, pp. 233–246 (1995)

    Google Scholar 

  5. Barendregt, H.P.: Lambda Calculus, Syntax and Semantics. North-Holland (1985)

    Google Scholar 

  6. Church, A.: The Calculi of Lambda Conversion. Princeton University Press (1941)

    Google Scholar 

  7. Curry, H.B., Feys, R.: Combinatory Logic, vol. I. North-Holland (1958)

    Google Scholar 

  8. Danvy, O., Millikin, K., Munk, J., Zerny, I.: Defunctionalized Interpreters for Call-by-Need Evaluation. In: Blume, M., Kobayashi, N., Vidal, G. (eds.) FLOPS 2010. LNCS, vol. 6009, pp. 240–256. Springer, Heidelberg (2010)

    CrossRef  Google Scholar 

  9. Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex. MIT Press (2009)

    Google Scholar 

  10. Felleisen, M., Friedman, D.P.: A syntactic theory of sequential state. Theor. Comput. Sci. 69(3), 243–287 (1989)

    CrossRef  MathSciNet  MATH  Google Scholar 

  11. Friedman, D.P., Ghuloum, A., Siek, J.G., Winebarger, O.L.: Improving the lazy Krivine machine. Higher Order Symbolic Computation 20, 271–293 (2007)

    CrossRef  MATH  Google Scholar 

  12. Friedman, D.P., Wise, D.S.: Cons should not evaluate its arguments. In: Proc. 3rd Intl. Colloq. on Automata, Languages and Programming. pp. 256–284 (1976)

    Google Scholar 

  13. Garcia, R., Lumsdaine, A., Sabry, A.: Lazy evaluation and delimited control. In: Proc. 36th Symp. on Principles of Programming Languages, pp. 153–164 (2009)

    Google Scholar 

  14. Henderson, P., Morris Jr., J.H.: A lazy evaluator. In: Proc. 3rd Symp. on Principles of Programming Languages, pp. 95–103 (1976)

    Google Scholar 

  15. Josephs, M.B.: The semantics of lazy functional languages. Theor. Comput. Sci. 68(1) (1989)

    Google Scholar 

  16. Landin, P.J.: The next 700 programming languages. Comm. ACM 9, 157–166 (1966)

    CrossRef  MATH  Google Scholar 

  17. Launchbury, J.: A natural semantics for lazy evaluation. In: Proc. 20th Symp. on Principles of Programming Languages, pp. 144–154 (1993)

    Google Scholar 

  18. Loader, R.: Notes on simply typed lambda calculus. Tech. Rep. ECS-LFCS-98-381, Department of Computer Science, University of Edinburgh (1998)

    Google Scholar 

  19. Maraist, J., Odersky, M., Turner, D.N., Wadler, P.: Call-by-name call-by-value, call-by-need, and the linear lambda calculus. In: Proc. 11th Conference on Mathematical Foundations of Programminng Semantics, pp. 370–392 (1995)

    Google Scholar 

  20. Maraist, J., Odersky, M., Wadler, P.: The call-by-need lambda calculus (unabridged). Tech. Rep. 28/94, Universität Karlsruhe (1994)

    Google Scholar 

  21. Maraist, J., Odersky, M., Wadler, P.: The call-by-need lambda calculus. J. Funct. Program. 8, 275–317 (1998)

    CrossRef  MathSciNet  MATH  Google Scholar 

  22. Morris, J.H.: Lambda Calculus Models of Programming Languages. Ph.D. thesis, MIT (1968)

    Google Scholar 

  23. Nakata, K., Hasegawa, M.: Small-step and big-step semantics for call-by-need. J. Funct. Program. 19(6), 699–722 (2009)

    CrossRef  MathSciNet  MATH  Google Scholar 

  24. Peyton Jones, S.L., Salkild, J.: The spineless tagless g-machine. In: Proc. 4th Conf. on Functional Programming Lang. and Computer Architecture, pp. 184–201 (1989)

    Google Scholar 

  25. Plotkin, G.D.: Call-by-name, call-by-value and the lambda-calculus. Theor. Comput. Sci. 1, 125–159 (1975)

    CrossRef  MathSciNet  MATH  Google Scholar 

  26. Purushothaman, S., Seaman, J.: An adequate operational semantics for sharing in lazy evaluation. In: Proc. 4th European Symp. on Program, pp. 435–450 (1992)

    Google Scholar 

  27. Sestoft, P.: Deriving a lazy abstract machine. J. Func. Program. 7(3), 231–264 (1997)

    CrossRef  MathSciNet  MATH  Google Scholar 

  28. Wadsworth, C.P.: Semantics and Pragmatics of the Lambda Calculus. Ph.D. thesis, Oxford University (1971)

    Google Scholar 

Download references

Author information

Authors and Affiliations

  1. College of Computer Science, Northeastern University, Boston, Massachusetts, USA

    Stephen Chang & Matthias Felleisen

Authors
  1. Stephen Chang
    View author publications

    You can also search for this author in PubMed Google Scholar

  2. Matthias Felleisen
    View author publications

    You can also search for this author in PubMed Google Scholar

Editor information

Editors and Affiliations

  1. Technische Universität München, Boltzmannstrasse 3, 85748, Garching, Germany

    Helmut Seidl

Rights and permissions

Reprints and Permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Chang, S., Felleisen, M. (2012). The Call-by-Need Lambda Calculus, Revisited. In: Seidl, H. (eds) Programming Languages and Systems. ESOP 2012. Lecture Notes in Computer Science, vol 7211. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-28869-2_7

Download citation

  • .RIS
  • .ENW
  • .BIB
  • DOI: https://doi.org/10.1007/978-3-642-28869-2_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-28868-5

  • Online ISBN: 978-3-642-28869-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Share this paper

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Search

Navigation

  • Find a journal
  • Publish with us

Discover content

  • Journals A-Z
  • Books A-Z

Publish with us

  • Publish your research
  • Open access publishing

Products and services

  • Our products
  • Librarians
  • Societies
  • Partners and advertisers

Our imprints

  • Springer
  • Nature Portfolio
  • BMC
  • Palgrave Macmillan
  • Apress
  • Your US state privacy rights
  • Accessibility statement
  • Terms and conditions
  • Privacy policy
  • Help and support

167.114.118.210

Not affiliated

Springer Nature

© 2023 Springer Nature