Skip to main content
Log in

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

  • Published:
Higher-Order and Symbolic Computation

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. S. Abramsky and L. Ong. Full abstraction in the lazy lambda calculus. Information and Computation, 105(2):159–267, 1993.

    Google Scholar 

  2. H. Barendregt. The Lambda-Calculus: Its Syntax and Semantics. North-Holland, Amsterdam, 1980.

    Google Scholar 

  3. G. Boudol and C. Laneve. The discriminating power of multiplicities in the λ-calculus. Information and Computation, 126(1):83–102, April 1996.

    Google Scholar 

  4. M. Dezani-Ciancaglini, J. Tiuryn, and P. Urzyczyn. Discrimination by parallel observers. In Proceedings, Twelth Annual IEEE Symposium on Logic in Computer Science, pages 396–407. IEEE Computer Society Press, 1997.

  5. B. Duba, R. Harper, and D. MacQueen. Typing first-class continuations in ML. In Proc. ACM Symp. Principles of Programming Languages, pages 163–173, January 1991.

  6. M. Felleisen. On the expressive power of programming languages. In Science of Computer Programming, volume 17, pages 35–75, 1991. Preliminary version in: Proc. European Symposium on Programming, Lecture Notes in Computer Science, 432. Springer-Verlag (1990), 134–151.

    Google Scholar 

  7. A. Filinski. Declarative continuations: an investigation of duality in programming language semantics. In D. H. Pitt et al., editors, Category Theory and Computer Science, number 389 in Lecture Notes in Computer Science, pages 224–249. Springer-Verlag, 1989.

  8. D.P. Friedman and C.T. Haynes. Constraining control. In Proc. 12th ACM Symposium on Principles of Programming Languages, pages 245–254, 1985.

  9. D.P. Friedman, M. Wand, and C.T. Haynes. Essentials of Programming Languages. MIT Press and McGraw-Hill, 1992.

  10. T.G. Griffin. A formulae-as-types notion of control. In Proc. 17th ACM Symposium on Principles of Programming Languages, pages 47–58, San Francisco, CA USA, 1990.

  11. C.T. Haynes. Logic continuations. Journal of Logic Programming, 4:157–176, 1987.

    Google Scholar 

  12. J. Hatcliff and O. Danvy. Thunks and the λ-calculus. Journal of Functional Programming, 7(2):303–319, 1997.

    Google Scholar 

  13. R. Harper, B. Duba, and D. MacQueen. Typing first-class continuations in ML. Journal of Functional Programming, 3(4), October 1993.

  14. R. Harper and M. Lillibridge. Operational interpretations of an extension of with control operators. Journal of Functional Programming, 6(3):393–417, May 1996.

    Google Scholar 

  15. C.T. Haynes, D.P. Friedman, and M. Wand. Obtaining coroutines with continuations. Journal of Computer Languages, 11(3/4):143–153, 1986.

    Google Scholar 

  16. R. Kelsey, W. Clinger, and J. Rees, editors. Revised5 report on the algorithmic language Scheme. Higher-Order and Symbolic Computation, 11(3):7–105, 1998.

  17. P.J. Landin. A generalization of jumps and labels. Report, UNIVAC Systems Programming Research, August 1965.

  18. P.J. Landin. A generalization of jumps and labels. Higher-Order and Symbolic Computation, 11(2), 1998.

  19. M. Lillibridge. Exceptions are strictly more powerful than Call/CC. Technical Report CMU-CS-95-178, Carnegie Mellon University, July 1995.

  20. A.R. Meyer and J.G. Riecke. Continuations may be unreasonable (preliminary report). In Proceedings of the 1988 ACM Conference on Lisp and Functional Programming, pages 63–71. ACM, 1988.

  21. R. Milner and M. Tofte. Commentary on Standard ML. MIT Press, 1991.

  22. G. Plotkin. Call-by-name, call-by-value, and the λ-calculus. Theoretical Computer Science, 1(2):125–159, 1975.

    Google Scholar 

  23. J.C. Reynolds. GEDANKEN—A simple typeless language based on the principle of completeness and the reference concept. Communications of the ACM, 13:308–319, 1970.

    Google Scholar 

  24. J.C. Reynolds. Definitional interpreters for higher-order programming languages. In Proceedings of the 25 th ACM National Conference, pages 717–740. ACM, August 1972.

  25. J.G. Riecke. Should a function continue? Master's thesis, Massachusetts Institute of Technology, 1989. Available as technical report MIT/LCS/TR-459 (MIT Laboratory for Computer Science).

  26. A. Sabry. Note on axiomatizing the semantics of control operators. Technical Report CIS-TR-96-03, University of Oregon, 1996.

  27. D. Sangiorgi. The lazy lambda calculus in a concurrency scenario. Information and Computation, 111(1):120–153, May 1994.

    Google Scholar 

  28. D. Sangiorgi. Lazy functions and mobile processes. Technical Report RR-2515, INRIA-Sophia Antipolis, 1995.

  29. D. Sitaram and M. Felleisen. Reasoning with continuations II: full abstraction for models of control. In M. Wand, editor, Lisp and Functional Programming. ACM, 1990.

  30. G. Springer and D.P. Friedman. Scheme and the Art of Programming. MIT Press, 1989.

  31. G. L. Steele Jr and G.J. Sussman. Scheme: An interpreter for extended lambda calculus. AI Memo 349, Massachusetts Institute of Technology Artificial Intelligence Laboratory, Cambridge, Massachusetts, 1975.

    Google Scholar 

  32. C. Strachey and C.P. Wadsworth. Continuations: A mathematical semantics for handling full jumps. Technical Monograph PRG-11, Oxford University Computing Laboratory, January 1974.

  33. H. Thielecke. Continuation passing style and self-adjointness. In Proceedings 2nd ACMSIGPLAN Workshop on Continuations, number NS-96-13 in BRICS Notes Series, December 1996.

  34. H. Thielecke. Categorical Structure of Continuation Passing Style. PhD thesis, University of Edinburgh, 1997. Also available as technical report ECS-LFCS-97-376.

  35. H. Thielecke. Continuation semantics and self-adjointness. In Proceedings MFPS XIII, volume 6 of Electronic Notes in Theoretical Computer Science. Elsevier, 1997. URL: http://www.elsevier.nl/locate/entcs/volume6.html.

  36. H. Thielecke. An introduction to Landin's “A generalization of jumps and labels”. Higher-Order and Symbolic Computation, 11(2), 1998.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Thielecke, H. Using a Continuation Twice and Its Implications for the Expressive Power of call/cc. Higher-Order and Symbolic Computation 12, 47–73 (1999). https://doi.org/10.1023/A:1010068800499

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1010068800499

Navigation