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.
- H. Abelson et al. Revised5 Report on the Algorithmic Language Scheme. Higher-Order and Symbolic Computation, 11(1):7--105, 1998.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- J. Berdine, P. O'Hearn, U. Reddy, and H. Thielecke. Linear Continuation Passing. Higher-Order and Symbolic Computation, pages 181--208, 2002.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- O. Danvy and A. Filinski. Abstracting Control. In Proc. 1990 ACM Conference on Lisp and Functional Programming, pages 151--160, 1990.]] Google ScholarDigital Library
- O. Danvy and A. Filinski. Representing Control: a Study of the CPS Transformation. Mathematical Structures in Computer Science, 2(4):361--391, 1992.]]Google ScholarCross Ref
- 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 ScholarDigital Library
- M. Felleisen. The Theory and Practice of First-Class Prompts. In Proc. 15th Symposium on Principles of Programming Languages, pages 180--190, 1988.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- A. Filinski. Representing Monads. In Proc. 21st Symposium on Principles of Programming Languages, pages 446--457, 1994.]] Google ScholarDigital Library
- C. Führmann and H. Thielecke. On the Call-by-Value CPS Transform and its Semantics. Information and Computation, to appear.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- M. Hasegawa. On the Semantics of Delimited Continuations. manuscript, 2003.]]Google Scholar
- R. Hieb, R. Dybvig, and C. W. Anderson. Subcontinuations. Lisp and Symbolic Computation, 6:453--484, 1993.]] Google ScholarDigital Library
- M. Hofmann. Sound and Complete Axiomatisations of Call-by-Value Control Operators. Mathematical Structures in Computer Science, 5:461--482, 1995.]]Google ScholarCross Ref
- 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 ScholarDigital Library
- E. Moggi. Computational Lambda-Calculus and Monads. In Proc. 4th Symposium on Logic in Computer Science, pages 14--28, 1989.]] Google ScholarDigital Library
- 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 Scholar
- G. D. Plotkin. Call-by-Name, Call-by-Value, and the ?-Calculus. Theoretical Computer Science, 1:125--159, 1975.]]Google ScholarCross Ref
- 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 ScholarDigital Library
- 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 Scholar
- A. Sabry and M. Felleisen. Reasoning about Programs in Continuation-Passing Style. Lisp and Symbolic Computation, 6(3-4):289--360, 1993.]] Google ScholarDigital Library
- A. Sabry and P. Wadler. A Reflection on Call-by-Value. ACM Transactions on Programming Languages and Systems, 19(6):916--941, 1997.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- G. L. Steele Jr. RABBIT: A Compiler for SCHEME. Technical Report AITR-474, Artificial Intelligence Laboratory, Massachusetts Institute of Technology, 1978.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- E. Sumii. An Implementation of Transparent Migration on Standard Scheme. In Proc. Workshop on Scheme and Functional Programming, pages 61--63, 2000.]]Google Scholar
- H. Thielecke. From Control Effects to Typed Continuation Passing. In Proc. 30th Symposium on Principles of Programming Languages, pages 139--149, 2003.]] Google ScholarDigital Library
- P. Thiemann. Cogen in Six Lines. In Proc. International Conference on Functional Programming, pages 180--189, 1996.]] Google ScholarDigital Library
Index Terms
- A sound and complete axiomatization of delimited continuations
Recommendations
A sound and complete axiomatization of delimited continuations
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 ...
An approach to call-by-name delimited continuations
POPL '08We show that a variant of Parigot's λμ-calculus, originally due to de Groote and proved to satisfy Boehm's theorem by Saurin, is canonically interpretable as a call-by-name calculus of delimited control. This observation is expressed using Ariola et al'...
An approach to call-by-name delimited continuations
POPL '08: Proceedings of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesWe show that a variant of Parigot's λμ-calculus, originally due to de Groote and proved to satisfy Boehm's theorem by Saurin, is canonically interpretable as a call-by-name calculus of delimited control. This observation is expressed using Ariola et al'...
Comments