skip to main content
10.1145/944705.944722acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

A sound and complete axiomatization of delimited continuations

Published:25 August 2003Publication History

ABSTRACT

The shift and reset operators, proposed by Danvy and Filinski, are powerful control primitives for capturing delimited continuations. Delimited continuation is a similar concept as the standard (unlimited) continuation, but it represents part of the rest of the computation, rather than the whole rest of computation. In the literature, the semantics of shift and reset has been given by a CPS-translation only. This paper gives a direct axiomatization of calculus with shift and reset, namely, we introduce a set of equations, and prove that it is sound and complete with respect to the CPS-translation. We also introduce a calculus with control operators which is as expressive as the calculus with shift and reset, has a sound and complete axiomatization, and is conservative over Sabry and Felleisen's theory for first-class continuations.

References

  1. H. Abelson et al. Revised5 Report on the Algorithmic Language Scheme. Higher-Order and Symbolic Computation, 11(1):7--105, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. K. Asai. Online Partial Evaluation for Shift and Reset. In Proc. ACM Workshop on Partial Evaluation and Semantics-Based Program Manipulation, pages 19--30, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. G. Barthe, J. Hatcliff, and M. H. Sørensen. Reflections on Reflections. In Proc. Ninth International Symposium on Programming Language Implementation and Logic Programming, pages 241--258, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Berdine, P. O'Hearn, U. Reddy, and H. Thielecke. Linear Continuation Passing. Higher-Order and Symbolic Computation, pages 181--208, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. O. Danvy. Formalizing Implementation Strategies for First-Class Continuations. In Proc. 9th European Symposium on Computing, Lecture Notes in Computer Science 1782, pages 151--160, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. O. Danvy and A. Filinski. Abstracting Control. In Proc. 1990 ACM Conference on Lisp and Functional Programming, pages 151--160, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. O. Danvy and A. Filinski. Representing Control: a Study of the CPS Transformation. Mathematical Structures in Computer Science, 2(4):361--391, 1992.]]Google ScholarGoogle ScholarCross RefCross Ref
  8. O. Danvy and L. R. Nielsen. A First-Order One-Pass CPS Transformation. In Proc. FOSSACS 2002, Lecture Notes in Computer Science 2303, pages 98--113, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Felleisen. The Theory and Practice of First-Class Prompts. In Proc. 15th Symposium on Principles of Programming Languages, pages 180--190, 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Felleisen and R. Hieb. The Revised Report on the Syntactic Theories of Sequential Control and State. Theoretical Computer Science, 103:235--271, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Filinski. Representing Monads. In Proc. 21st Symposium on Principles of Programming Languages, pages 446--457, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C. Führmann and H. Thielecke. On the Call-by-Value CPS Transform and its Semantics. Information and Computation, to appear.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Gasbichler and M. Sperber. Final shift for call/cc: Direct Implementation of Shift and Reset. In Proc. 7th International Conference on Functional Programming, pages 271--282, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. A. Gunter, D. Remy, and J. G. Riecke. A Generalization of Exceptions and Control in ML-Like Languages. In Proc. Functional Programming and Computer Architecture, pages 12--23, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Hasegawa. Linearly Used Effects: Monadic and CPS Transformations into the Linear Lambda Calculus. In Proc. International Symposium on Functional and Logic Programming, Lecture Notes in Computer Science 2441, pages 167--182, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. Hasegawa. On the Semantics of Delimited Continuations. manuscript, 2003.]]Google ScholarGoogle Scholar
  17. R. Hieb, R. Dybvig, and C. W. Anderson. Subcontinuations. Lisp and Symbolic Computation, 6:453--484, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Hofmann. Sound and Complete Axiomatisations of Call-by-Value Control Operators. Mathematical Structures in Computer Science, 5:461--482, 1995.]]Google ScholarGoogle ScholarCross RefCross Ref
  19. Y. Kameyama. A Type-Theoretic Study on Partial Continuations. In Proc. IFIP International Conference on Theoretical Computer Science, Lecture Notes in Computer Science 1872, pages 489--504, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. E. Moggi. Computational Lambda-Calculus and Monads. In Proc. 4th Symposium on Logic in Computer Science, pages 14--28, 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. C. Murthy. Control Operators, Hierarchies, and Pseudo-Classical Type Systems: A-Translation at Work. In Proc. ACM Workshop on Continuation, pages 49--71, 1992.]]Google ScholarGoogle Scholar
  22. G. D. Plotkin. Call-by-Name, Call-by-Value, and the ?-Calculus. Theoretical Computer Science, 1:125--159, 1975.]]Google ScholarGoogle ScholarCross RefCross Ref
  23. C. Queinnec and B. Serpette. A Dynamic Extent Control Operator for Partial Continuations. In Proc. 18th Symposium on Principles of Programming Languages, pages 174--184, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. A. Sabry. Note on Axiomatizing the Semantics of Control Operators. Technical Report CIS-TR-96-03, Dept. of Information Science, Univ. of Oregon, 1996.]]Google ScholarGoogle Scholar
  25. A. Sabry and M. Felleisen. Reasoning about Programs in Continuation-Passing Style. Lisp and Symbolic Computation, 6(3-4):289--360, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. A. Sabry and P. Wadler. A Reflection on Call-by-Value. ACM Transactions on Programming Languages and Systems, 19(6):916--941, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. T. Sekiguchi, T. Sakamoto, and A. Yonezawa. Portable Implementation of Continuation Operators in Imperative Languages by Exception Handling. In Advances in Exception Handling Techniques, Lecture Notes in Computer Science 2022, pages 217--233, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. G. L. Steele Jr. RABBIT: A Compiler for SCHEME. Technical Report AITR-474, Artificial Intelligence Laboratory, Massachusetts Institute of Technology, 1978.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. C. Strachey and C. P. Wadsworth. Continuations: A Mathematical Semantics for Handling Full Jumps. Higher-Order and Symbolic Computation, 13(1/2):135--152, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. E. Sumii. An Implementation of Transparent Migration on Standard Scheme. In Proc. Workshop on Scheme and Functional Programming, pages 61--63, 2000.]]Google ScholarGoogle Scholar
  31. H. Thielecke. From Control Effects to Typed Continuation Passing. In Proc. 30th Symposium on Principles of Programming Languages, pages 139--149, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. P. Thiemann. Cogen in Six Lines. In Proc. International Conference on Functional Programming, pages 180--189, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A sound and complete axiomatization of delimited continuations

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          ICFP '03: Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
          August 2003
          310 pages
          ISBN:1581137567
          DOI:10.1145/944705
          • cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 38, Issue 9
            September 2003
            289 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/944746
            Issue’s Table of Contents

          Copyright © 2003 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 25 August 2003

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Acceptance Rates

          ICFP '03 Paper Acceptance Rate24of95submissions,25%Overall Acceptance Rate333of1,064submissions,31%

          Upcoming Conference

          ICFP '24

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader