Two Values Passing CPS Transformation for Call-by-Name Calculus with Constants

In this paper, a new CPS (continuation-passing-style) transformation for Plotkin's call-by-name λ calculus with constants is proposed. It is based on evaluation contexts transformation and the features that two values, instead of one, are passed to the continuation every time. With encodings, a CPS language is introduced. Then, Plotkin's simulation theorem is proved by establishing 1-to-1 correspondence between the source language and CPS language. Compared with Plotkin's work, a reduction closed CPS language is defined in which all continuations are explicitly expressed as functional encodings and it is simpler to prove both the soundness and

[1]  Hayo Thielecke,et al.  Answer Type Polymorphism in Call-by-Name Continuation Passing , 2004, ESOP.

[2]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[3]  Gérard Boudol On the semantics of the call-by-name CPS transform , 2000, Theor. Comput. Sci..

[4]  Olivier Danvy,et al.  Representing Control: a Study of the CPS Transformation , 1992, Mathematical Structures in Computer Science.

[5]  Morten Heine Sørensen,et al.  Call-By-Name CPS-Translation as a Binding-Time Improvement , 1995, SAS.

[6]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[7]  Amr Sabry,et al.  The formal relationship between direct and continuation-passing style optimizing compilers - a synthesis of two paradigms , 1996, Rice COMP TR.

[8]  William D. Clinger Proper tail recursion and space efficiency , 1998, PLDI.

[9]  Markus Wenzel,et al.  Isabelle/Isar , 2006, The Seventeen Provers of the World.

[10]  Gordon D. Plotkin,et al.  Call-by-Name, Call-by-Value and the lambda-Calculus , 1975, Theor. Comput. Sci..

[11]  Matthias Felleisen,et al.  Control operators, the SECD-machine, and the λ-calculus , 1987, Formal Description of Programming Concepts.

[12]  Matthias Felleisen,et al.  Reasoning with Continuations , 1986, LICS.

[13]  John C. Reynolds,et al.  The discoveries of continuations , 1993, LISP Symb. Comput..

[14]  M. Felleisen,et al.  Reasoning about programs in continuation-passing style , 1993 .

[15]  Philip Wadler,et al.  Call-by-value is dual to call-by-name , 2003, ACM SIGPLAN International Conference on Functional Programming.