Answer Type Polymorphism in Call-by-Name Continuation Passing

This paper studies continuations by means of a polymorphic type system. The traditional call-by-name continuation passing style transform admits a typing in which some answer types are polymorphic, even in the presence of first-class control operators. By building on this polymorphic typing, and using parametricity reasoning, we show that the call-by-name transform satisfies the eta-law, and is in fact isomorphic to the more recent CPS transform defined by Streicher.

[1]  A. Pitts Parametric polymorphism and operational equivalence , 2000, Mathematical Structures in Computer Science.

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

[3]  Hayo Thielecke,et al.  Comparing Control Constructs by Double-Barrelled CPS , 2002, High. Order Symb. Comput..

[4]  Peter W. O'Hearn,et al.  Linear Continuation-Passing , 2002, High. Order Symb. Comput..

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

[6]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

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

[8]  Olivier Laurent,et al.  About translations of classical logic into polarized linear logic , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[9]  Thomas Streicher,et al.  Classical logic, continuation semantics and abstract machines , 1998, Journal of Functional Programming.

[10]  Pierre Jouvelot,et al.  Reasoning about continuations with control effects , 1989, PLDI '89.

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

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

[13]  Philip Wadler,et al.  Theorems for free! , 1989, FPCA.

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

[15]  Peter W. O'Hearn,et al.  From Algol to polymorphic linear lambda-calculus , 2000, JACM.

[16]  Olivier Danvy,et al.  Thunks and the λ-calculus , 1997, Journal of Functional Programming.

[17]  Hayo Thielecke,et al.  From control effects to typed continuation passing , 2003, POPL '03.

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

[19]  Mark Lillibridge,et al.  Explicit polymorphism and CPS conversion , 1993, POPL '93.

[20]  Andrzej Filinski Declarative Continuations: an Investigation of Duality in Programming Language Semantics , 1989, Category Theory and Computer Science.

[21]  Martin Hofmann,et al.  Continuation models are universal for Xp-calculus , 1997 .