Lambda-Calculus with Director Strings

Abstract.We present a name free λ-calculus with explicit substitutions, based on a generalised notion of director strings. Terms are annotated with information – directors – that indicate how substitutions should be propagated. 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 define the closed reduction strategy. This is 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. Newman On Theories with a Combinatorial Definition of "Equivalence" , 1942 .

[2]  Pierre Lescanne,et al.  Modeling Sharing and Recursion for Weak Reduction Strategies Using Explicit Substitution , 1996, PLILP.

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

[4]  Ron Dinishak The optimal implementation of functional programming languages , 2000, SOEN.

[5]  Ian Mackie,et al.  Efficient Reductions with Director Strings , 2003, RTA.

[6]  Benjamin Grégoire,et al.  A compiled implementation of strong reduction , 2002, ICFP '02.

[7]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

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

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

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

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

[12]  René David,et al.  A lambda-calculus with explicit weakening and explicit substitution , 2001, Math. Struct. Comput. Sci..

[13]  Gopalan Nadathur,et al.  A Fine-Grained Notation for Lambda Terms and Its Use in Intensional Operations , 1996, J. Funct. Log. Program..

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

[15]  Herman Geuvers,et al.  Explicit substitution : on the edge of strong normalisation , 1996 .

[16]  Paul-André Melliès Typed lambda-calculi with explicit substitutions may not terminate , 1995, TLCA.

[17]  de Ng Dick Bruijn A namefree lambda calculus with facilities for internal definition of expressions and segments , 1978 .

[18]  Pierre Crégut,et al.  An abstract machine for Lambda-terms normalization , 1990, LISP and Functional Programming.

[19]  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 .

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

[21]  Pierre Lescanne,et al.  From λσ to λν: a journey through calculi of explicit substitutions , 1994, POPL '94.

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

[23]  Gopalan Nadathur,et al.  The Suspension Notation for Lambda Terms and its Use in Metalanguage Implementations , 2002, WoLLIC.

[24]  Harry G. Mairson,et al.  Optimality and inefficiency: what isn't a cost model of the lambda calculus? , 1996, ICFP '96.

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

[26]  Pierre Lescanne,et al.  λν, a calculus of explicit substitutions which preserves strong normalisation , 1996, Journal of Functional Programming.

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

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

[29]  Kristoffer H. Rose,et al.  Explicit Substitution - Tutorial & Survey , 1996 .

[30]  Pierre Lescanne,et al.  The Calculus of explicit substitutions lambda-upsilon , 1994 .

[31]  Jean-Pierre Jouannaud,et al.  Rewrite Systems , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[32]  Andrea Asperti,et al.  The optimal implementation of functional programming languages , 1998, Cambridge tracts in theoretical computer science.

[33]  Simon L. Peyton Jones,et al.  Optimistic evaluation: an adaptive evaluation strategy for non-strict programs , 2003, ICFP '03.