A Simple Correctness Proof of the Direct-Style Transformation

We build on Danvy and Nielsen's first-order program transformation into continuation-passing style (CPS) to present a new correctness proof of the converse transformation, i.e., a one-pass transformation from CPS back to direct style. Previously published proofs were based on, e.g., a one-pass higher-order CPS transformation, and were complicated by having to reason about higher-order functions. In contrast, this work is based on a one-pass CPS transformation that is both compositional and first-order, and therefore the proof simply proceeds by structural induction on syntax.

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

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

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

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

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

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

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

[8]  J. Lawall,et al.  Continuation introduction and elimination in higher-order programming languages , 1995 .

[9]  John C. Reynolds Definitional Interpreters for Higher-Order Programming Languages , 1998, High. Order Symb. Comput..

[10]  Olivier Danvy,et al.  On proving syntactic properties of CPS programs , 1999, Electron. Notes Theor. Comput. Sci..

[11]  Olivier Danvy,et al.  Syntactic accidents in program analysis: on the impact of the CPS transformation , 2000, ICFP '00.

[12]  Olivier Danvy,et al.  A Higher-Order Colon Translation , 2000, FLOPS.

[13]  Jens Groth Extracting Witnesses from Proofs of Knowledge in the Random Oracle Model , 2001 .

[14]  Jiri Srba Note on the Tableau Technique for Commutative Transition Systems , 2001 .

[15]  Jirí Srba,et al.  Note on the Tableau Technique for Commutative Transition Systems , 2002, FoSSaCS.

[16]  On Weak Markov's Principle , 2002, Math. Log. Q..

[17]  Olivier Danvy,et al.  A Simple CPS Transformation of Control-Flow Information , 2002, Log. J. IGPL.

[18]  Frank D. Valencia,et al.  Temporal Concurrent Constraint Programming: Applications and Behavior , 2001, Formal and Natural Computing.

[19]  Olivier Danvy,et al.  A first-order one-pass CPS transformation , 2001, Theor. Comput. Sci..

[20]  Olivier Danvy,et al.  A first-order one-pass CPS transformation , 2003, Theor. Comput. Sci..

[21]  Zoltán Ésik,et al.  Temporal Logic with Cyclic Counting and the Degree of Aperiodicity of Finite Automata , 2001, Acta Cybern..