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.
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
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)
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)
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)
Biernacka, M., Danvy, O.: A syntactic correspondence between context-sensitive calculi and abstract machines. Theoretical Computer Science 375(1-3), 76–108 (2007)
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)
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)
Calvès, C.: Complexity and Implementation of Nominal Algorithms. PhD thesis, King’s College London, London, England (2010)
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)
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)
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)
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)
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)
Kiselyov, O., Shan, C.: Embedded Probabilistic Programming. In: Taha, W.M. (ed.) DSL 2009. LNCS, vol. 5658, pp. 360–384. Springer, Heidelberg (2009)
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)
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)
Shan, C.: A static simulation of dynamic delimited control. Higher-Order and Symbolic Computation 20(4), 371–401 (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)