Unrestricted pure call-by-value recursion

Call-by-value languages commonly restrict recursive definitions by only allowing functions and syntactically explicit values in the right-hand sides. As a consequence, some very appealing programming patterns that work well in lazy functional languages are hard to apply in a call-by-value setting, even though they might not be using laziness for any other purpose than to enable the desired form of recursion. In this paper we present an operational semantics as well as a straightforward implementation technique for unrestricted recursion under pure call-by-value. On that basis we are able to demonstrate that highly recursive programming idioms such as combinator-based parsing are indeed compatible with call-by-value evaluation.

[1]  Paul Hudak,et al.  Functional reactive animation , 1997, ICFP '97.

[2]  R. Kent Dybvig,et al.  Revised5 Report on the Algorithmic Language Scheme , 1986, SIGP.

[3]  Don Syme Initializing Mutually Referential Abstract Objects: The Value Recursion Challenge , 2006, Electron. Notes Theor. Comput. Sci..

[4]  Derek Dreyer,et al.  A type system for well-founded recursion , 2004, POPL.

[5]  S. Shelah,et al.  Annals of Pure and Applied Logic , 1991 .

[6]  Luca Cardelli,et al.  Compiling a functional language , 1984, LFP '84.

[7]  Tom Hirschowitz,et al.  Compilation of extended recursion in call-by-value functional languages , 2003, PPDP '03.

[8]  Conor McBride,et al.  Applicative programming with effects , 2008, J. Funct. Program..

[9]  Stefan Blom,et al.  Skew confluence and the lambda calculus with letrec , 2002, Ann. Pure Appl. Log..

[10]  Tom Hirschowitz,et al.  Mixin modules in a call-by-value setting , 2002, TOPL.

[11]  Songtao Xia,et al.  Establishing object invariants with delayed types , 2007, OOPSLA.

[12]  Jonathan Rees,et al.  Revised3 report on the algorithmic language scheme , 1986, SIGP.

[13]  John Launchbury,et al.  A natural semantics for lazy evaluation , 1993, POPL '93.

[14]  S. Doaitse Swierstra,et al.  Deterministic, Error-Correcting Combinator Parsers , 1996, Advanced Functional Programming.

[15]  Pascal Zimmer,et al.  Recursion in the call-by-value lambda-calculus , 2002, FICS.

[16]  Harold Abelson,et al.  Revised5 report on the algorithmic language scheme , 1998, SIGP.