Higher-Order and Symbolic Computation

, Volume 20, Issue 3, pp 257–270 | Cite as

Explaining the lazy Krivine machine using explicit substitution and addresses



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 λ σ w a , 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.


Abstract machine Call-by-need Functional programming Lazy evaluation 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abadi, M., Cardelli, L., Curien, P.-L., Lévy, J.-J.: Explicit substitutions. J. Funct. Program. 1(4), 375–416 (1991) MATHGoogle Scholar
  2. 2.
    Abramsky, S.: The lazy lambda calculus. In: Research Topics in Functional Programming, pp. 65–116 (1990) Google Scholar
  3. 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) Google Scholar
  4. 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) Google Scholar
  5. 5.
    Ariola, Z.M., Felleisen, M.: The call-by-need lambda calculus. J. Funct. Program. 7(3), 265–301 (1997) MATHCrossRefMathSciNetGoogle Scholar
  6. 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) Google Scholar
  7. 7.
    Crégut, P.: Machines à environnement pour la réduction symbolique et l’évaluation partielle. Ph.D. Thesis, Université de Paris 7 (1991) Google Scholar
  8. 8.
    Curien, P.-L.: An abstract framework for environment machines. Theor. Comput. Sci. 82, 389–402 (1991) MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Curien, P.-L., Hardin, T., Lévy, J.-J.: Weak and strong confluent calculi of explicit substitutions. J. ACM 43(2) (1996) Google Scholar
  10. 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) MATHGoogle Scholar
  11. 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) Google Scholar
  12. 12.
    Gustavsson, J.: A type based sharing analysis for update avoidance and optimisation. Thesis for the Licentiate Degree, Chalmers, Göteborg University (1999) Google Scholar
  13. 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) Google Scholar
  14. 14.
    Henderson, P.: Functional Programming—Application and Implementation. Prentice-Hall, Englewood Cliffs (1980) MATHGoogle Scholar
  15. 15.
    Johnsson, T.: Efficient compilation of lazy evaluation. SIGPLAN Not. 19(6), 58–69 (1984) CrossRefGoogle Scholar
  16. 16.
    Lang, F.: Modèles de la ` b-réduction pour les implantations. Ph.D. Thesis, École Normale Supérieure de Lyon (1998) Google Scholar
  17. 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) Google Scholar
  18. 18.
    Lang, F., Lescanne, P., Liquori, L.: A framework for defining object-calculi. In: Proceedings of Formal Methods Europe FME’99 (1999) Google Scholar
  19. 19.
    Launchbury, J.: A natural semantics for lazy evaluation. In: Principles of Programming Languages (1993) Google Scholar
  20. 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) Google Scholar
  21. 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) CrossRefMATHGoogle Scholar
  22. 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. 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) Google Scholar
  24. 24.
    Sestoft, P.: Analysis and efficient implementation of functional programs. Ph.D. Thesis, DIKU, University of Copenhagen, Denmark (1991) Google Scholar
  25. 25.
    Sestoft, P.: Deriving a lazy abstract machine. J. Funct. Program. 7(3) (1997) Google Scholar
  26. 26.
    Wadsworth, C.: Semantics and pragmatics of the lambda calculus. Ph.D. Thesis, Oxford (1971) Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2007

Authors and Affiliations

  1. 1.INRIA Rhône-AlpesMontbonnotFrance

Personalised recommendations