Reasoning about programs in continuation-passing style

Plotkin's λ-value calculus is sound but incomplete for reasoning about βeegr;-transformations on programs in continuation-passing style (CPS). To find a complete extension, we define a new, compactifying CPS transformation and an “inverse”mapping, un-CPS, both of which are interesting in their own right. Using the new CPS transformation, we can determine the precise language of CPS terms closed under β7eegr;-transformations. Using the un-CPS transformation, we can derive a set of axioms such that every equation between source programs is provable if and only if β&eegr; can prove the corresponding equation between CPS programs. The extended calculus is equivalent to an untyped variant of Moggi's computational λ-calculus.

[1]  Olivier Danvy,et al.  Abstracting control , 1990, LISP and Functional Programming.

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

[3]  Daniel P. Friedman,et al.  Programming with Continuations , 1984 .

[4]  Mark Lillibridge,et al.  Polymorphic type assignment and CPS conversion , 1993, LISP Symb. Comput..

[5]  Matthias Felleisen,et al.  Parameter-passing and the lambda calculus , 1991, POPL '91.

[6]  Albert R. Meyer,et al.  Continuation Semantics in Typed Lambda-Calculi (Summary) , 1985, Logic of Programs.

[7]  Carolyn L. Talcott A Theory for Program and Data Type Specification , 1992, Theor. Comput. Sci..

[8]  Carolyn L. Talcott,et al.  1 Equivalence in Functional Languages with E ectsIan , 2007 .

[9]  Matthias Felleisen,et al.  Reasoning with continuations II: full abstraction for models of control , 1990, LISP and Functional Programming.

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

[11]  Xavier Leroy,et al.  The ZINC experiment : an economical implementation of the ML language , 1990 .

[12]  Matthias Felleisen,et al.  Abstract continuations: a mathematical semantics for handling full jumps , 1988, LISP and Functional Programming.

[13]  John Gateley,et al.  Call-by-Value Combinatory Logic and the Lambda-Value Calculus , 1991, MFPS.

[14]  Rolf Schock,et al.  On induction , 1965, Notre Dame J. Formal Log..

[15]  Mitchell Wand,et al.  A scheme for a higher-level semantic algebra , 1986 .

[16]  Thomas B. Steel,et al.  Formal language description languages for computer programming : proceedings of the IFIP Working Conference on Formal Language Description Languages , 1966 .

[17]  Michael J. Fischer,et al.  Lambda-calculus schemata , 1993, LISP Symb. Comput..

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

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

[20]  H. Friedman Equality between functionals , 1975 .

[21]  Matthias Felleisen,et al.  The theory and practice of first-class prompts , 1988, POPL '88.

[22]  Andrew W. Appel,et al.  Continuation-passing, closure-passing style , 1989, POPL '89.

[23]  Olivier Danvy,et al.  Back to Direct Style , 1992, Sci. Comput. Program..

[24]  Lloyd Allison,et al.  A Practical Introduction to Denotational Semantics , 1987 .

[25]  Lockwood Morris The next 700 formal language descriptions , 1993, LISP Symb. Comput..

[26]  H. B. Curry,et al.  Combinatory Logic, Volume I. , 1961 .

[27]  Matthias Felleisen,et al.  A Syntactic Theory of Sequential Control , 1987, Theor. Comput. Sci..

[28]  Olin Shivers,et al.  Control-flow analysis of higher-order languages of taming lambda , 1991 .

[29]  Paul Hudak,et al.  ORBIT: an optimizing compiler for scheme , 1986, SIGPLAN '86.

[30]  Mitchell Wand,et al.  Essentials of programming languages , 2008 .

[31]  P. J. Landin The Mechanical Evaluation of Expressions , 1964, Comput. J..

[32]  Olivier Danvy,et al.  Back to direct style II: first-class continuations , 1992, LFP '92.

[33]  Albert R. Meyer,et al.  Continuations may be unreasonable , 1988, LISP and Functional Programming.

[34]  Paul Hudak,et al.  Realistic Compilation by Program Transformation. , 1989 .

[35]  Robert Hieb,et al.  The Revised Report on the Syntactic Theories of Sequential Control and State , 1992, Theor. Comput. Sci..

[36]  Anders Bondorf,et al.  Improving binding times without explicit CPS-conversion , 1992, LFP '92.

[37]  Robert Hieb,et al.  Representing control in the presence of first-class continuations , 1990, PLDI '90.

[38]  Jr. Guy L. Steele,et al.  Rabbit: A Compiler for Scheme , 1978 .

[39]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

[40]  David H. Bartley,et al.  The implementation of PC Scheme , 1986, LFP '86.

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

[42]  Matthias Felleisen,et al.  A Syntactic Theory of Sequential State , 1989, Theor. Comput. Sci..

[43]  William D. Clinger,et al.  Revised3 report on the algorithmic language scheme , 1986, SIGP.

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

[45]  Mitchell Wand,et al.  Obtaining Coroutines with Continuations , 1986, Comput. Lang..

[46]  Mitchell Wand Correctness of Procedure Representations in Higher-Order Assembly Language , 1991, MFPS.

[47]  Antoni W. Mazurkiewicz,et al.  Proving Algorithms by Tail Functions , 1971, Inf. Control..

[48]  Amr Sabry,et al.  The essence of compiling with continuations , 1993, PLDI '93.

[49]  Hans-Juergen Boehm,et al.  Implementing RUSSELL , 1986, SIGPLAN '86.

[50]  Carolyn L. Talcott,et al.  A Simplifier for Untyped Lambda Expressions , 1990, CTRS.

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

[52]  Timothy G. Griffin,et al.  A formulae-as-type notion of control , 1989, POPL '90.