Skip to main content

Axioms for Delimited Continuations in the CPS Hierarchy

  • Conference paper
  • First Online:
Book cover Computer Science Logic (CSL 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3210))

Included in the following conference series:

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.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Google Scholar 

  2. Asai, K.: Offline Partial Evaluation for Shift and Reset. In: Proc. ACM Workshop on Partial Evaluation and Semantics-Based Program Manipulation (to appear)

    Google Scholar 

  3. 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)

    Google Scholar 

  4. Danvy, O.: Type-directed partial evaluation. In: Proc. 23rd Symposium on Principles of Programming Languages, pp. 242–257 (1996)

    Google Scholar 

  5. 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)

    Google Scholar 

  6. Danvy, O., Filinski, A.: A functional abstraction of typed contexts. Technical Report 89/12, DIKU, University of Copenhagen (1989)

    Google Scholar 

  7. Danvy, O., Filinski, A.: Abstracting Control. In: Proc. 1990 ACM Conference on Lisp and Functional Programming, pp. 151–160 (1990)

    Google Scholar 

  8. Danvy, O., Filinski, A.: Representing Control: a Study of the CPS Transformation. Mathematical Structures in Computer Science 2(4), 361–391 (1992)

    Article  MathSciNet  Google Scholar 

  9. 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)

    Chapter  Google Scholar 

  10. Felleisen, M.: The Theory and Practice of First-Class Prompts. In: Proc. 15th Symposium on Principles of Programming Languages, pp. 180–190 (1988)

    Google Scholar 

  11. Filinski, A.: Representing Layered Monads. In: Proc. 26th Symposium on Principles of Programming Languages, pp. 175–188 (1999)

    Google Scholar 

  12. Friedman, H.: Classically and intuitionistically provably recursive functions. Lecture Notes in Mathematics, vol. 699, pp. 21–28 (1978)

    Google Scholar 

  13. Griffin, T.: A Formulae-as-Types Notion of Control. In: Proc. 17th Symposium on Principles of Programming Languages, pp. 47–58 (1990)

    Google Scholar 

  14. 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)

    Google Scholar 

  15. Hieb, R., Dybvig, R., Anderson, C.W.: Subcontinuations. Lisp and Symbolic Computation 6, 453–484 (1993)

    Google Scholar 

  16. 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)

    Chapter  Google Scholar 

  17. 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)

    Google Scholar 

  18. Kameyama, Y., Hasegawa, M.: A Sound and Complete Axiomatization of Delimited Continuations. In: Proc. ACM International Conference on Functional Programming, pp. 177–188 (2003)

    Google Scholar 

  19. Lawall, J., Danvy, O.: Continuation-based partial evaluation. In: Proc. 1994 ACM Conference on LISP and Functional Programming, pp. 227–238 (1994)

    Google Scholar 

  20. Moggi, E.: Computational Lambda-Calculus and Monads. In: Proc. 4th Symposium on Logic in Computer Science, pp. 14–28 (1989)

    Google Scholar 

  21. 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)

    Google Scholar 

  22. Sabry, A.: Note on Axiomatizing the Semantics of Control Operators. Technical Report CIS-TR-96-03, Dept. of Computer Science, University of Oregon (1996)

    Google Scholar 

  23. Sabry, A., Felleisen, M.: Reasoning about Programs in Continuation-Passing Style. Lisp and Symbolic Computation 6(3-4), 289–360 (1993)

    Article  Google Scholar 

  24. 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)

    Chapter  Google Scholar 

  25. 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.

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics