Skip to main content
Log in

The next 700 Krivine machines

  • Published:
Higher-Order and Symbolic Computation

Abstract

The Krivine machine is a simple and natural implementation of the normal weak-head reduction strategy for pure λ-terms. While its original description has remained unpublished, this machine has served as a basis for many variants, extensions and theoretical studies. In this paper, we present the Krivine machine and some well-known variants in a common framework. Our framework consists of a hierarchy of intermediate languages that are subsets of the λ-calculus. The whole implementation process (compiler + abstract machine) is described via a sequence of transformations all of which express an implementation choice. We characterize the essence of the Krivine machine and locate it in the design space of functional language implementations. We show that, even within the particular class of Krivine machines, hundreds of variants can be designed.

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. Appel, A.W.: Compiling with Continuations. Cambridge University Press, Cambridge (1992)

    Google Scholar 

  2. Asperti, A.: A categorical understanding of environment machines. J. Funct. Program. 2(1), 23–59 (1992)

    MATH  MathSciNet  Google Scholar 

  3. Cousineau, G., Curien, P.-L., Mauny, M.: The categorical abstract machine. Sci. Comput. Program. 8(2), 173–202 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  4. Crégut, P.: An abstract machine for lambda-terms normalization. In: Proc. of LFP’90, pp. 333–340. ACM Press, New York (June 1990)

    Google Scholar 

  5. Crégut, P.: Machines à environnement pour la réduction symbolique et l’évaluation partielle. Thèse de l’université de Paris VII (1991)

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

    Article  MATH  MathSciNet  Google Scholar 

  7. De Brujin, N.G.: λ-calculus notation with nameless dummies: a tool for automatic formula manipulation, with application to Church Rosser theorem. In Indag. Math. 34, 381–392 (1972)

    Google Scholar 

  8. De Groote, P.: An environment machine for the lambda-mu-calculus. Math. Struct. Comput. Sci. 8(6), 637–669 (1998)

    Article  MATH  Google Scholar 

  9. Douence, R.: Décrire et comparer les mises en œuvre de langages fonctionnels. Ph.D. Thesis, University of Rennes I (1996)

  10. Douence, R., Fradet, P.: A taxonomy of functional language implementations. Part I: call-by-value. INRIA Research Report 2783 (Jan. 1996)

  11. Douence, R., Fradet, P.: A taxonomy of functional language implementations. Part II: call-byname, call-by-need, and graph reduction. INRIA Research Report 3050 (Nov. 1996)

  12. Douence, R., Fradet, P.: A systematic study of functional language implementations. ACM Trans. Program. Lang. Syst. 20(2), 344–387 (1998)

    Article  Google Scholar 

  13. Fairbairn, J., Wray, S.: Tim: a simple, lazy abstract machine to execute supercombinators. In: Proc of FPCA’87. Lecture Notes in Computer Science, vol. 274, pp. 34–45 (1987)

  14. Fradet, P., Le Métayer, D.: Compilation of functional languages by program transformation. ACM Trans. Program. Lang. Syst. 13(1), 21–51 (1991)

    Article  Google Scholar 

  15. Hall, C.: Using Hindley-Milner type inference to optimise list representation. In: Proc. of LFP’94, pp. 162–172 (1994)

  16. Hannan, J., Miller, D.: From operational semantics to abstract machines: preliminary results. In: Proc. of LFP’90, Nice, France, pp. 323–332 (1990)

  17. Hardin, T., Maranget, L., Pagano, B.: Functional back-ends within the lambda-sigma calculus. In: Proc. of ICFP’1996, pp. 25–33 (1996)

  18. Johnsson, T.: Compiling lazy functional languages. Ph.D. Thesis, Chalmers University (1987)

  19. Joy, M.S., Rayward-Smith, V.J., Burton, F.W.: Efficient combinator code. Comput. Lang. 10(3) (1985)

  20. Krivine, J.-L.: Un interprète du lambda-calcul. Unpublished draft, available at ftp://ftp.logique.jussieu.fr/pub/distrib/krivine/interprt.pdf

  21. Landin, P.J.: The mechanical evaluation of expressions. Comput. J. 6(4), 308–320 (1964)

    MATH  Google Scholar 

  22. Lang, F., Benaissa, Z., Lescanne, P.: Super-closures. In: Proc. of WPAM’98, as Technical Report of the University of SaarBruck, number A 02/98 (1998)

  23. Leroy, X.: The Zinc experiment: an economical implementation of the ML language. INRIA Technical Report 117 (1990)

  24. Leroy, X.: Unboxed objects and polymorphic typing. In: ACM Symp. Princ. Prog. Lang., pp. 177–188, 1992

  25. Nielson, H.R., Nielson, F.: Semantics with Applications: A Formal Introduction. Wiley, New York (1992)

    MATH  Google Scholar 

  26. Parigot, M.: λ µ-calculus: an algorithmic interpretation of classical natural deduction. In: Proc. of LPAR’92. Lecture Notes in Artificial Intelligence, vol. 624, pp. 190–201 (1992)

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

    Article  MATH  Google Scholar 

  28. Peyton Jones, S.L., Lester, D.: Implementing Functional Languages, a Tutorial. Prentice-Hall, Englewood Clips (1992)

    Google Scholar 

  29. Peyton Jones, S.L., Partain, W., Santos, A.: Let-floating: moving bindings to give faster programs. In: Proc. of ICFP’96, pp. 1–12, 1996

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

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

    Article  MATH  MathSciNet  Google Scholar 

  32. Shao, Z., Reppy, J., Appel, A.: Unrolling lists. In: Proc. of LFP’94, pp. 185–195, 1994

  33. Streicher, T., Reus, B.: Classical logic, continuation semantics and abstract machines. J. Funct. Program. 8(6), 543–572 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  34. Turner, D.A.: A new implementation technique for applicative languages. Softw. Pract. Exp. 9, 31–49 (1979)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rémi Douence.

Additional information

Work performed while at INRIA/IRISA, Campus de Beaulieu, 35042 Rennes Cedex, France.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Douence, R., Fradet, P. The next 700 Krivine machines. Higher-Order Symb Comput 20, 237–255 (2007). https://doi.org/10.1007/s10990-007-9016-y

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10990-007-9016-y

Keywords

Navigation