Efficient Reductions with Director Strings

We present a name free λ-calculus with explicit substitutions based on a generalized notion of director strings: we annotate a term with information about how each substitution should be propagated through the term. We first present a calculus where we can simulate arbitrary β-reduction steps, and then simplify the rules to model the evaluation of functional programs (reduction to weak head normal form). We also show that we can derive the closed reduction strategy (a weak strategy which, in contrast with standard weak strategies allows certain reductions to take place inside λ-abstractions thus offering more sharing). Our experimental results confirm that, for large combinator based terms, our weak evaluation strategies out-perform standard evaluators. Moreover, we derive two abstract machines for strong reduction which inherit the efficiency of the weak evaluators.

[1]  M. Fernandez,et al.  Closed reductions in the λ-calculus (extended abstract) , 1999 .

[2]  Jean-Jacques Lévy,et al.  Confluence properties of weak and strong calculi of explicit substitutions , 1996, JACM.

[3]  Andrea Asperti,et al.  The bologna optimal higher-order machine , 1995, Journal of Functional Programming.

[4]  Richard Kennaway,et al.  Director strings as combinators , 1988, TOPL.

[5]  de Ng Dick Bruijn,et al.  Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[6]  Helmut Schwichtenberg,et al.  Normalisation by Evaluation , 1998, Prospects for Hardware Foundations.

[7]  Ian Mackie,et al.  Closed Reductions in the lambda-Calculus , 1999, CSL.

[8]  de Ng Dick Bruijn Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[9]  Thérèse Hardin,et al.  Functional runtime systems within the lambda-sigma calculus , 1998, Journal of Functional Programming.

[10]  Martín Abadi,et al.  The geometry of optimal lambda reduction , 1992, POPL '92.

[11]  John Lamping,et al.  An algorithm for optimal lambda calculus reduction , 1989, POPL '90.

[12]  Matthias Felleisen,et al.  A call-by-need lambda calculus , 1995, POPL '95.

[13]  Nobuko Yoshida,et al.  Optimal reduction in weak-λ-calculus with shared environments , 1993, FPCA '93.

[14]  Martín Abadi,et al.  Explicit substitutions , 1989, POPL '90.