Using a Continuation Twice and Its Implications for the Expressive Power of call/cc

We study the implications for the expressive power of call/cc of upward continuations, specifically the idiom of using a continuation twice. Although such control effects were known to Landin and Reynolds when they invented J and escape, the forebears of call/cc, they still act as a conceptual pitfall for some attempts to reason about continuations. We use this idiom to refute some recent conjectures about equivalences in a language with continuations, but no other effects. This shows that first-class continuations as given by call/cc have greater expressive power than one would expect from goto or exits.

[1]  Hayo Thielecke Continuation semantics and self-adjointness , 1997, MFPS.

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

[3]  Cosimo Laneve,et al.  The discriminating power of multiplicities in the-calculus , 1996 .

[4]  Jerzy Tiuryn,et al.  Discrimination by parallel observers , 1997, Proceedings of Twelfth Annual IEEE Symposium on Logic in Computer Science.

[5]  J. Riecke,et al.  SHOULD A FUNCTION CONTINUE , 1989 .

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

[7]  Robert Harper,et al.  Typing first-class continuations in ML , 1991, POPL '91.

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

[9]  Robin Milner,et al.  Commentary on standard ML , 1990 .

[10]  Gerald J. Sussman,et al.  Scheme: A Interpreter for Extended Lambda Calculus , 1998, High. Order Symb. Comput..

[11]  R. Harper,et al.  Operational Interpretations of an Extension of Fomega with Control Operators , 1996, J. Funct. Program..

[12]  Daniel P. Friedman,et al.  Constraining control , 1985, POPL.

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

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

[15]  Davide Sangiorgi,et al.  Lazy functions and mobile processes , 2000, Proof, Language, and Interaction.

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

[17]  Mark Lillibridge Exceptions Are Strictly More Powerful Than Call/CC. , 1995 .

[18]  Christopher T. Haynes,et al.  Logic Continuations , 1986, J. Log. Program..

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

[20]  P. J. Landin,et al.  A Generalization of Jumps and Labels , 1998, High. Order Symb. Comput..

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

[22]  Robert Harper,et al.  Typing first-class continuations in ML , 1991, POPL '91.

[23]  Hayo Thielecke,et al.  Categorical Structure of Continuation Passing Style , 1997 .

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

[25]  Davide Sangiorgi The Lazy Lambda Calculus in a Concurrency Scenario , 1994, Inf. Comput..

[26]  Gerald Jay Sussman,et al.  An Interpreter for Extended Lambda Calculus , 1975 .

[27]  C.-H. Luke Ong,et al.  Full Abstraction in the Lazy Lambda Calculus , 1993, Inf. Comput..

[28]  Robert Hieb,et al.  Revised 5 Report on the Algorithmic Language , 1999 .

[29]  Cosimo Laneve,et al.  The Discriminating Power of Multiplicities in the Lambda-Calculus , 1996, Inf. Comput..

[30]  Hayo Thielecke,et al.  An Introduction to Landin's “A Generalization of Jumps and Labels” , 1998, High. Order Symb. Comput..

[31]  John C. Reynolds,et al.  GEDANKEN—a simple typeless language based on the principle of completeness and the reference concept , 1970, Commun. ACM.

[32]  Daniel P. Friedman,et al.  Scheme and the art of programming , 1983 .

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

[34]  Matthias Felleisen,et al.  On the Expressive Power of Programming Languages , 1990, European Symposium on Programming.

[35]  Christopher Strachey,et al.  Continuations: A Mathematical Semantics for Handling Full Jumps , 2000, High. Order Symb. Comput..

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

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

[38]  Hayo Thielecke Continuation Passing Style and Self-Adjointness , 1996 .

[39]  John Hatcliff,et al.  The structure of continuation-passing styles , 1995 .