Skip to main content

A Dynamic Interpretation of the CPS Hierarchy

  • Conference paper
Programming Languages and Systems (APLAS 2012)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7705))

Included in the following conference series:

Abstract

The CPS hierarchy of control operators shift i /reset i of Danvy and Filinski is a natural generalization of the shift and reset static control operators that allow for abstracting delimited control in a structured and CPS-guided manner. In this article we show that a dynamic variant of shift/reset, known as shift 0/reset 0, where the discipline of static access to the stack of delimited continuations is relaxed, can fully express the CPS hierarchy. This result demonstrates the expressive power of shift 0 /reset 0 and it offers a new perspective on practical applications of the CPS hierarchy.

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. Biernacka, M., Biernacki, D.: Context-based proofs of termination for typed delimited-control operators. In: López-Fraguas, F.J. (ed.) Proceedings of the 11th ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming, PPDP 2009, Coimbra, Portugal. ACM Press (September 2009)

    Google Scholar 

  2. Biernacka, M., Biernacki, D., Danvy, O.: An operational foundation for delimited continuations in the CPS hierarchy. Logical Methods in Computer Science 1(2:5), 1–39 (2005)

    MathSciNet  Google Scholar 

  3. Biernacka, M., Biernacki, D., Lenglet, S.: Typing control operators in the CPS hierarchy. In: Hanus, M. (ed.) Proceedings of the 13th ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming, PPDP 2011, Odense, Denmark. ACM Press (July 2011)

    Google Scholar 

  4. Biernacka, M., Danvy, O.: A syntactic correspondence between context-sensitive calculi and abstract machines. Theoretical Computer Science 375(1-3), 76–108 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  5. Biernacki, D., Danvy, O., Millikin, K.: A dynamic continuation-passing style for dynamic delimited continuations. Technical Report BRICS RS-06-15, DAIMI, Department of Computer Science, Aarhus University, Aarhus, Denmark (October 2006)

    Google Scholar 

  6. Biernacki, D., Lenglet, S.: Applicative Bisimulations for Delimited-Control Operators. In: Birkedal, L. (ed.) FOSSACS 2012. LNCS, vol. 7213, pp. 119–134. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  7. Calvès, C.: Complexity and Implementation of Nominal Algorithms. PhD thesis, King’s College London, London, England (2010)

    Google Scholar 

  8. Danvy, O., Filinski, A.: Abstracting control. In: Wand, M. (ed.) Proceedings of the 1990 ACM Conference on Lisp and Functional Programming, Nice, France, pp. 151–160. ACM Press (June 1990)

    Google Scholar 

  9. Filinski, A.: Representing monads. In: Boehm, H.J. (ed.) Proceedings of the Twenty-First Annual ACM Symposium on Principles of Programming Languages, Portland, Oregon, pp. 446–457. ACM Press (January 1994)

    Google Scholar 

  10. Kameyama, Y., Kiselyov, O., Shan, C.: Shifting the stage: Staging with delimited control. In: Puebla, G., Vidal, G. (eds.) Proceedings of the 2009 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, PEPM 2009, Savannah, GA, pp. 111–120. ACM Press (January 2009)

    Google Scholar 

  11. Kiselyov, O.: Delimited Control in OCaml, Abstractly and Concretely: System Description. In: Blume, M., Kobayashi, N., Vidal, G. (eds.) FLOPS 2010. LNCS, vol. 6009, pp. 304–320. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  12. Kiselyov, O., Shan, C.: A Substructural Type System for Delimited Continuations. In: Ronchi Della Rocca, S. (ed.) TLCA 2007. LNCS, vol. 4583, pp. 223–239. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  13. Kiselyov, O., Shan, C.: Embedded Probabilistic Programming. In: Taha, W.M. (ed.) DSL 2009. LNCS, vol. 5658, pp. 360–384. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  14. Masuko, M., Asai, K.: Direct implementation of shift and reset in the MinCaml compiler. In: Rossberg, A. (ed.) Proceedings of the ACM SIGPLAN Workshop on ML, ML 2009, Edinburgh, UK, pp. 49–60 (August 2009)

    Google Scholar 

  15. Materzok, M., Biernacki, D.: Subtyping delimited continuations. In: Danvy, O. (ed.) Proceedings of the 2011 ACM SIGPLAN International Conference on Functional Programming, ICFP 2011, Tokyo, Japan, pp. 81–93. ACM Press (September 2011)

    Google Scholar 

  16. Shan, C.: A static simulation of dynamic delimited control. Higher-Order and Symbolic Computation 20(4), 371–401 (2007)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Materzok, M., Biernacki, D. (2012). A Dynamic Interpretation of the CPS Hierarchy. In: Jhala, R., Igarashi, A. (eds) Programming Languages and Systems. APLAS 2012. Lecture Notes in Computer Science, vol 7705. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-35182-2_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-35182-2_21

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-35181-5

  • Online ISBN: 978-3-642-35182-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics