Abstract
A CPS translation is a syntactic translation of programs, which is useful for describing their operational behavior. By iterating the standard call-by-value CPS translation, Danvy and Filinski discovered the CPS hierarchy and proposed a family of control operators, shift and reset, that make it possible to capture successive delimited continuations in a CPS hierarchy.
Although shift and reset have found their applications in several areas such as partial evaluation, most studies in the literature have been devoted to the base level of the hierarchy, namely, to level-1 shift and reset. In this article, we investigate the whole family of shift and reset. We give a simple calculus with level-n shift and level-n reset for an arbitrary n > 0. We then give a set of equational axioms for them, and prove that these axioms are sound and complete with respect to the CPS translation. The resulting set of axioms is concise and a natural extension of those for level-1 shift and reset.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Asai, K.: Online Partial Evaluation for Shift and Reset. In: Proc. ACM Workshop on Partial Evaluation and Semantics-Based Program Manipulation, pp. 19–30 (2002)
Asai, K.: Offline Partial Evaluation for Shift and Reset. In: Proc. ACM Workshop on Partial Evaluation and Semantics-Based Program Manipulation (to appear)
Biernacka, M., Biernacki, D., Danvy, O.: An operational foundation for delimited continuations. Proc. Fourth ACM SIGPLAN Workshop on Continuations, Technical Report CSR-04-1, School of Computer Science, University of Birmingham, pp. 25–34 (2004)
Danvy, O.: Type-directed partial evaluation. In: Proc. 23rd Symposium on Principles of Programming Languages, pp. 242–257 (1996)
Danvy, O.: On evaluation contexts, continuations, and the rest of the computation. In: Proc. Fourth ACM SIGPLAN Workshop on Continuations, Technical Report CSR-04-1, School of Computer Science, University of Birmingham, pp. 13–23 (2004)
Danvy, O., Filinski, A.: A functional abstraction of typed contexts. Technical Report 89/12, DIKU, University of Copenhagen (1989)
Danvy, O., Filinski, A.: Abstracting Control. In: Proc. 1990 ACM Conference on Lisp and Functional Programming, pp. 151–160 (1990)
Danvy, O., Filinski, A.: Representing Control: a Study of the CPS Transformation. Mathematical Structures in Computer Science 2(4), 361–391 (1992)
Danvy, O., Yang, Z.: An Operational Investigation of the CPS Hierarchy. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, pp. 224–242. Springer, Heidelberg (1999)
Felleisen, M.: The Theory and Practice of First-Class Prompts. In: Proc. 15th Symposium on Principles of Programming Languages, pp. 180–190 (1988)
Filinski, A.: Representing Layered Monads. In: Proc. 26th Symposium on Principles of Programming Languages, pp. 175–188 (1999)
Friedman, H.: Classically and intuitionistically provably recursive functions. Lecture Notes in Mathematics, vol. 699, pp. 21–28 (1978)
Griffin, T.: A Formulae-as-Types Notion of Control. In: Proc. 17th Symposium on Principles of Programming Languages, pp. 47–58 (1990)
Gunter, C.A., Rémy, D., Riecke, J.G.: A Generalization of Exceptions and Control in ML-Like Languages. In: Proc. Functional Programming and Computer Architecture, pp. 12–23 (1995)
Hieb, R., Dybvig, R., Anderson, C.W.: Subcontinuations. Lisp and Symbolic Computation 6, 453–484 (1993)
Kameyama, Y.: A type-theoretic study on partial continuations. In: Watanabe, O., Hagiya, M., Ito, T., van Leeuwen, J., Mosses, P.D. (eds.) TCS 2000. LNCS, vol. 1872, p. 489. Springer, Heidelberg (2000)
Kameyama, Y.: Axiomatizing higher level delimited continuations. In: Proc. 3rd ACM SIGPLAN Workshop on Continuations, Technical Report 545, Computer Science Department, Indiana University, pp. 49–53 (2004)
Kameyama, Y., Hasegawa, M.: A Sound and Complete Axiomatization of Delimited Continuations. In: Proc. ACM International Conference on Functional Programming, pp. 177–188 (2003)
Lawall, J., Danvy, O.: Continuation-based partial evaluation. In: Proc. 1994 ACM Conference on LISP and Functional Programming, pp. 227–238 (1994)
Moggi, E.: Computational Lambda-Calculus and Monads. In: Proc. 4th Symposium on Logic in Computer Science, pp. 14–28 (1989)
Murthy, C.: Control operators, hierarchies, and pseudo-classical type systems: Atranslation at work. In: Proc. First ACM Workshop on Continuations, Technical Report STAN-CS-92-1426, Stanford University, pp. 49–72 (1992)
Sabry, A.: Note on Axiomatizing the Semantics of Control Operators. Technical Report CIS-TR-96-03, Dept. of Computer Science, University of Oregon (1996)
Sabry, A., Felleisen, M.: Reasoning about Programs in Continuation-Passing Style. Lisp and Symbolic Computation 6(3-4), 289–360 (1993)
Sekiguchi, T., Sakamoto, T., Yonezawa, A.: Portable implementation of continuation operators in imperative languages by exception handling. In: Romanovsky, A., Dony, C., Knudsen, J.L., Tripathi, A.R. (eds.) ECOOP-WS 2000. LNCS, vol. 2022, pp. 217–233. Springer, Heidelberg (2001)
H. Thielecke. Answer type polymorphism in call-by-name continuation passing. In Proc. 13th European Symposium on Programming, Lecture Notes in Computer Science 2986, pages 279–293, 2004.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kameyama, Y. (2004). Axioms for Delimited Continuations in the CPS Hierarchy. In: Marcinkowski, J., Tarlecki, A. (eds) Computer Science Logic. CSL 2004. Lecture Notes in Computer Science, vol 3210. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30124-0_34
Download citation
DOI: https://doi.org/10.1007/978-3-540-30124-0_34
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-23024-3
Online ISBN: 978-3-540-30124-0
eBook Packages: Springer Book Archive