Modeling sharing and recursion for weak reduction strategies using explicit substitution

  • Zine-El-Abidine Benaissa
  • Pierre Lescanne
  • Kristoffer H. Rose
λ-Calculus and Rewriting
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1140)


We present the λσ w a -calculus, a formal synthesis of the concepts of sharing and explicit substitution for weak reduction. We show how λσ w a , can be used as a foundation of implementations of functional programming languages by modeling the essential ingredients of such implementations, namely weak reduction strategies, recursion, space leaks, recursive data structures, and parallel evaluation. We use λσ w a , to give a unified model of several computational aspects. First, we give a precise account of the major reduction strategies used in functional programming and the consequences of choosing λ-graph-reduction vs. environment-based evaluation. Second, we show how to add constructors and explicit recursion to give a precise account of recursive functions and data structures even with respect to space complexity. Third, we formalize the notion of space leaks in λσ w a and use this to define a space leak free calculus; this suggests optimisations for call-by-need reduction that prevent space leaking and enables us to prove that the “trimming” performed by the STG machine does not leak space. In summary we give a formal account of several implementation techniques used by state of the art implementations of functional programming languages.


Implementation of functional programming lambda calculus weak reduction explicit substitution sharing recursion space leaks 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Ariola, Z. M., Felleisen, M., Maraist, J., Odersky, M. and Wadler, P. (1995). A call-by-need lambda calculus. 22nd Principles of Programming Languages. San Francisco, California, pp. 233–246.Google Scholar
  2. Ariola, Z. M. and Klop, J. W. (1994). Cyclic lambda graph rewriting. Logic in Computer Science. IEEE Computer Society Press. Paris, France. pp. 416–425.Google Scholar
  3. Barendregt, H. P. (1984). The Lambda Calculus: Its Syntax and Semantics. Revised edn. North-Holland.Google Scholar
  4. Bloo, R. and Rose, K. H. (1995). Preservation of strong normalisation in named lambda calculi with explicit substitution and garbage collection. CSN '95 — Computer Science in the Netherlands. pp. 62–72. 〈url:〉Google Scholar
  5. Curien, P.-L. (1991). An abstract framework for environment machines. Theor. Comp. Sci. 82: 389–402.Google Scholar
  6. Curien, P.-L., Hardin, T. and Lévy, J.-J. (1992). Confluence properties of weak and strong calculi of explicit substitutions. RR 1617. INRIA. To appear in J.ACM.Google Scholar
  7. de Bruijn, N. G. (1972). Lambda calculus with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Proc. Koninkl. Nederl. Akademie van Wetenschappen 75(5): 381–392.Google Scholar
  8. Felleisen, M. and Friedman, D. P. (1989). A syntactic theory of sequential state. Theor. Comp. Sci. 69: 243–287.Google Scholar
  9. Klop, J. W. (1992). Term rewriting systems. In Abramsky, S., Gabbay, D. M. and Maibaum, T. S. E. (eds), Handbook of Logic in Computer Science. Vol. 2. Oxford University Press. pp. 1–116.Google Scholar
  10. Launchbury, J. (1993). A natural semantics for lazy evaluation. 20th Principles of Programming Languages. pp. 144–154.Google Scholar
  11. Maranget, L. (1991). Optimal derivations in weak lambda calculi and in orthogonal rewriting systems. 18th Principles of Programming Languages. pp. 255–268.Google Scholar
  12. Peyton Jones, S. L. (1992). Implementing lazy functional programming languages on stock hardware: the spineless tagless G-machine. Journ. Funct. Progr. 2(2): 127–202.Google Scholar
  13. Plotkin, G. D. (1975). Call-by-name, call-by-value, and the λ-calculus. Theor. Comp. Sci. 1: 125–159.Google Scholar
  14. Rose, K. H. (1996). Operational Reduction Models for Functional Programming Languages. PhD thesis. DIKU, Dept. of Computer Science, Univ. of Copenhagen. Universitetsparken 1, DK-2100 København Ø. DIKU report 96/1.Google Scholar
  15. Sestoft, P. (1994). Deriving a lazy abstract machine. Technical Report ID-TR 1994-146. Dept. of Computer Science, Technical University of Denmark. 〈url:〉 Google Scholar
  16. Wadsworth, C. (1971). Semantics and pragmatics of the lambda calculus. PhD thesis. Oxford.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Zine-El-Abidine Benaissa
    • 1
  • Pierre Lescanne
    • 1
  • Kristoffer H. Rose
    • 2
  1. 1.INRIA-Lorraine & CRIN, Bâtiment LORIAVillers les Nancy CedexFrance
  2. 2.Basic Research in Computer Science (Centre of the Danish National Research Foundation), Dept. of Computer ScienceUniversity of AarhusAarhus CDenmark

Personalised recommendations