Skip to main content
Log in

Explaining the lazy Krivine machine using explicit substitution and addresses

  • Published:
Higher-Order and Symbolic Computation

Abstract

In a previous paper, Benaissa, Lescanne, and Rose, have extended the weak lambda-calculus of explicit substitution λ σ w with addresses, so that it gives an account of the sharing implemented by lazy functional language interpreters. We show in this paper that their calculus, called λ σ a w , fits well to the lazy Krivine machine, which describes the core of a lazy (call-by-need) functional programming language implementation. The lazy Krivine machine implements term evaluation sharing, that is essential for efficiency of such languages. The originality of our proof is that it gives a very detailed account of the implemented strategy.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abadi, M., Cardelli, L., Curien, P.-L., Lévy, J.-J.: Explicit substitutions. J. Funct. Program. 1(4), 375–416 (1991)

    MATH  Google Scholar 

  2. Abramsky, S.: The lazy lambda calculus. In: Research Topics in Functional Programming, pp. 65–116 (1990)

  3. Ager, M., Biernacki, D., Danvy, O., Midtgaard, J.: From interpreter to compiler and virtual machine: a functional derivation. Technical Report RS-03-14, Basic Research in Computer Science (BRICS), Denmark (2003)

  4. Ager, M., Biernacki, D., Danvy, O., Midtgaard, J.: A functional correspondence between evaluators and abstract machines. Technical Report RS-03-13, Basic Research in Computer Science (BRICS), Denmark (2003)

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

    Article  MATH  MathSciNet  Google Scholar 

  6. Benaissa, Z.E.-A., Lescanne, P., Rose, K.H.: Modeling sharing and recursion for weak reduction strategies using explicit substitution. In: Proceedings of the Symposium on Programming Languages: Implementation, Logics and Programs PLILP’96 (1996)

  7. Crégut, P.: Machines à environnement pour la réduction symbolique et l’évaluation partielle. Ph.D. Thesis, Université de Paris 7 (1991)

  8. Curien, P.-L.: An abstract framework for environment machines. Theor. Comput. Sci. 82, 389–402 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  9. Curien, P.-L., Hardin, T., Lévy, J.-J.: Weak and strong confluent calculi of explicit substitutions. J. ACM 43(2) (1996)

  10. de Bruijn, N.G.: Lambda calculus with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Proc. Koninkl. Nederl. Akad. Wet. 75(5), 381–392 (1972)

    MATH  Google Scholar 

  11. Fairbairn, J., Wray, S.C.: TIM: a simple, lazy abstract machine to execute supercombinators. In: Kahn, G. (ed.) Functional Programming and Computer Architecture, Portland, Oregon, pp. 34–45 (1987)

  12. Gustavsson, J.: A type based sharing analysis for update avoidance and optimisation. Thesis for the Licentiate Degree, Chalmers, Göteborg University (1999)

  13. Hardin, T., Maranget, L., Pagano, B.: Functional back-ends within the lambda-sigma calculus. In: Proceeding of the International Conference on Functional Programming ICFP’96 (1996)

  14. Henderson, P.: Functional Programming—Application and Implementation. Prentice-Hall, Englewood Cliffs (1980)

    MATH  Google Scholar 

  15. Johnsson, T.: Efficient compilation of lazy evaluation. SIGPLAN Not. 19(6), 58–69 (1984)

    Article  Google Scholar 

  16. Lang, F.: Modèles de la ` b-réduction pour les implantations. Ph.D. Thesis, École Normale Supérieure de Lyon (1998)

  17. Lang, F., Dougherty, D.J., Lescanne, P., Rose, K.H.: Addressed term rewriting systems. Technical Report, Laboratoire de l’Informatique du Parallélisme, École Normale Supérieure de Lyon (1999)

  18. Lang, F., Lescanne, P., Liquori, L.: A framework for defining object-calculi. In: Proceedings of Formal Methods Europe FME’99 (1999)

  19. Launchbury, J.: A natural semantics for lazy evaluation. In: Principles of Programming Languages (1993)

  20. Mountjoy, J.: The spineless tagless G-machine, naturally. In: Proceedings of the Third ACM SIGPLAN International Conference on Functional Programming ICFP’99, Baltimore, Maryland, United States, pp. 163–173. ACM Press (1998)

  21. Peyton Jones, S.L.: Implementing lazy functional programming languages on stock hardware: the spineless tagless G-machine. J. Funct. Program. 2(2), 127–202 (1992)

    Article  MATH  Google Scholar 

  22. Rose, K.H.: Explicit cyclic substitutions. In: Rusinowitch, M., Rémy, J.-L. (eds.) Proceedings of the 3rd International Workshop on Conditional Term Rewriting Systems CTRS’92. Springer, New York (1992)

    Google Scholar 

  23. Rose, K.H.: Operational reduction models for functional programming languages. Ph.D. Thesis, DIKU, Dept. of Computer Science, Univ. of Copenhagen, Universitetsparken 1, DK-2100 København Ø. DIKU report 96/1 (1996)

  24. Sestoft, P.: Analysis and efficient implementation of functional programs. Ph.D. Thesis, DIKU, University of Copenhagen, Denmark (1991)

  25. Sestoft, P.: Deriving a lazy abstract machine. J. Funct. Program. 7(3) (1997)

  26. Wadsworth, C.: Semantics and pragmatics of the lambda calculus. Ph.D. Thesis, Oxford (1971)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Frédéric Lang.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Lang, F. Explaining the lazy Krivine machine using explicit substitution and addresses. Higher-Order Symb Comput 20, 257–270 (2007). https://doi.org/10.1007/s10990-007-9013-1

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10990-007-9013-1

Keywords

Navigation