Three syntactic theories for combinatory graph reduction

We present a purely syntactic theory of graph reduction for the canonical combinators S, K, and I, where graph vertices are represented with evaluation contexts and let expressions. We express this first syntactic theory as a storeless reduction semantics of combinatory terms. We then factor out the introduction of let expressions to denote as many graph vertices as possible upfront instead of on demand. The factored terms can be interpreted as term graphs in the sense of Barendregt et al. We express this second syntactic theory, which we prove equivalent to the first, as a storeless reduction semantics of combinatory term graphs. We then recast let bindings as bindings in a global store, thus shifting, in Strachey's words, from denotable entities to storable entities. The store-based terms can still be interpreted as term graphs. We express this third syntactic theory, which we prove equivalent to the second, as a store-based reduction semantics of combinatory term graphs. We then refocus this store-based reduction semantics into a store-based abstract machine. The architecture of this store-based abstract machine coincides with that of Turner's original reduction machine. The three syntactic theories presented here therefore properly account for combinatory graph reduction As We Know It. These three syntactic theories scale to handling the Y combinator. This article therefore illustrates the scientific consensus of theoreticians and implementors about graph reduction: it is the same combinatory elephant.

[1]  Gordon D. Plotkin,et al.  A structural approach to operational semantics , 2004, J. Log. Algebraic Methods Program..

[2]  Matthias Felleisen,et al.  The call-by-need lambda calculus , 1997, Journal of Functional Programming.

[3]  Olivier Danvy,et al.  On inter-deriving small-step and big-step semantics: A case study for storeless call-by-need evaluation , 2012, Theor. Comput. Sci..

[4]  Olivier Danvy,et al.  Defunctionalized Interpreters for Call-by-Need Evaluation , 2010, FLOPS.

[5]  Olivier Danvy,et al.  Lambda-Lifting in Quadratic Time , 2002, J. Funct. Log. Program..

[6]  Olivier Danvy,et al.  Defunctionalized interpreters for programming languages , 2008, ICFP.

[7]  Haskell B. Curry,et al.  Apparent Variables From the Standpoint of Combinatory Logic , 1933 .

[8]  Stefan Blom,et al.  Term Graph Rewriting. Syntax and semantics , 2001 .

[9]  Olivier Danvy,et al.  A generic account of continuation-passing styles , 1994, POPL '94.

[10]  Amr Sabry,et al.  Lazy evaluation and delimited control , 2009, POPL '09.

[11]  Zena M. Ariola,et al.  Properties of a First-Order Functional Language with Sharing , 1995, Theor. Comput. Sci..

[12]  Olivier Danvy From Reduction-Based to Reduction-Free Normalization , 2008, Advanced Functional Programming.

[13]  Olivier Danvy,et al.  A functional correspondence between evaluators and abstract machines , 2003, PPDP '03.

[14]  Simon Peyton Jones,et al.  The Implementation of Functional Programming Languages (Prentice-hall International Series in Computer Science) , 1987 .

[15]  Martin Odersky,et al.  The call-by-need lambda calculus , 1998, Journal of Functional Programming.

[16]  Harry G. Mairson,et al.  On global dynamics of optimal graph reduction , 1997, ICFP '97.

[17]  N. L. Sarda,et al.  Conclusion and future work , 2021, Digital Methods and Tools to Support Healthy Ageing.

[18]  Olivier Danvy Defunctionalized interpreters for programming languages , 2008, ICFP 2008.

[19]  Thomas Johnsson,et al.  Lambda Lifting: Treansforming Programs to Recursive Equations , 1985, FPCA.

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

[21]  Ian Zerny,et al.  On Graph Rewriting, Reduction and Evaluation , 2009, Trends in Functional Programming.

[22]  George Angelos Papadopoulos,et al.  Dactl: an experimental graph rewriting language , 1990, J. Program. Lang..

[23]  Masahito Hasegawa,et al.  Small-step and big-step semantics for call-by-need , 2009, J. Funct. Program..

[24]  Marko C. J. D. van Eekelen,et al.  Term Graph Rewriting , 1987, PARLE.

[25]  Olivier Danvy,et al.  A Functional Correspondence between Evaluators and Abstract Machines , 2003 .

[26]  Alan Jeffrey,et al.  A fully abstract semantics for concurrent graph reduction , 1994, Proceedings Ninth Annual IEEE Symposium on Logic in Computer Science.

[27]  Gordon D. Plotkin,et al.  The origins of structural operational semantics , 2004, J. Log. Algebraic Methods Program..

[28]  Joyce L. Vedral,et al.  Functional Programming Languages and Computer Architecture , 1989, Lecture Notes in Computer Science.

[29]  J. Robinson,et al.  A Note on Mechanizing Higher Order Logic , 2013 .

[30]  Jan Willem Klop,et al.  Combinatory reduction systems , 1980 .

[31]  Olivier Danvy,et al.  Defunctionalization at work , 2001, PPDP '01.

[32]  Olivier Danvy,et al.  On the equivalence between small-step and big-step abstract machines: a simple application of lightweight fusion , 2007, Inf. Process. Lett..

[33]  Lasse R. Nielsen,et al.  Refocusing in Reduction Semantics , 2004 .

[34]  Marko C. J. D. van Eekelen,et al.  Functional Programming and Parallel Graph Rewriting , 1993 .

[35]  Jan Willem Klop,et al.  Term Graph Rewriting , 1995, HOA.

[36]  Olivier Danvy,et al.  A concrete framework for environment machines , 2005, TOCL.

[37]  Simon L. Peyton Jones,et al.  The Implementation of Functional Programming Languages , 1987 .

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

[39]  Manfred Nagl,et al.  Graph-Grammars and Their Application to Computer Science , 1982, Lecture Notes in Computer Science.

[40]  Olivier Danvy,et al.  Three Syntactic Theories for Combinatory Graph Reduction , 2010, LOPSTR.

[41]  D. A. Turner,et al.  A new implementation technique for applicative languages , 1979, Softw. Pract. Exp..

[42]  Anders Bondorf,et al.  Automatic Autoprojection of Recursive Equations with Global Variables and Abstract Data Types , 1991, Sci. Comput. Program..

[43]  Olivier Danvy,et al.  A computational formalization for partial evaluation , 1996, Mathematical Structures in Computer Science.

[44]  Zena M. Ariola,et al.  Equational Term Graph Rewriting , 1996, Fundam. Informaticae.

[45]  Pieter Koopman,et al.  Functional programs as executable specifications , 1990 .

[46]  Matthias Felleisen,et al.  Evaluating Call-by-Need on the Control Stack , 2010, Trends in Functional Programming.