Skip to main content
×
Home
    • Aa
    • Aa
  • Get access
    Check if you have access via personal or institutional login
  • Cited by 47
  • Cited by
    This article has been cited by the following publications. This list is generated based on data provided by CrossRef.

    Kobori, Ikuo Kameyama, Yukiyoshi and Kiselyov, Oleg 2016. Answer-Type Modification without Tears: Prompt-Passing Style Translation for Typed Delimited-Control Operators. Electronic Proceedings in Theoretical Computer Science, Vol. 212, p. 36.


    Sculthorpe, Neil Torrini, Paolo and Mosses, Peter D. 2016. A Modular Structural Operational Semantics for Delimited Continuations. Electronic Proceedings in Theoretical Computer Science, Vol. 212, p. 63.


    Thielecke, Hayo 2016. Command injection attacks, continuations, and the Lambek calculus. Electronic Proceedings in Theoretical Computer Science, Vol. 212, p. 81.


    Bauer, Andrej and Pretnar, Matija 2015. Programming with algebraic effects and handlers. Journal of Logical and Algebraic Methods in Programming, Vol. 84, Issue. 1, p. 108.


    Biernacki, Dariusz Danvy, Olivier and Millikin, Kevin 2015. A Dynamic Continuation-Passing Style for Dynamic Delimited Continuations. ACM Transactions on Programming Languages and Systems, Vol. 38, Issue. 1, p. 1.


    Asai, Kenichi Fennell, Luminous Thiemann, Peter and Zhang, Yang 2014. Proceedings of the 16th International Symposium on Principles and Practice of Declarative Programming - PPDP '14. p. 57.

    Cuadrado, Jesús Sánchez and Aracil, Jesús Perera 2014. Scheduling model-to-model transformations with continuations. Software: Practice and Experience, Vol. 44, Issue. 11, p. 1351.


    Thielecke, Hayo 2014. On the semantics of parsing actions. Science of Computer Programming, Vol. 84, p. 52.


    ESPÍRITO SANTO, JOSÉ MATTHES, RALPH NAKAZAWA, KOJI and PINTO, LUÍS 2013. Monadic translation of classical sequent calculus. Mathematical Structures in Computer Science, Vol. 23, Issue. 06, p. 1111.


    Geron, Bram and Geuvers, Herman 2013. Continuation calculus. Electronic Proceedings in Theoretical Computer Science, Vol. 127, p. 66.


    Ilik, Danko 2013. Type Directed Partial Evaluation for Level-1 Shift and Reset. Electronic Proceedings in Theoretical Computer Science, Vol. 127, p. 86.


    2013. Program Specialization.


    Kobayashi, Naoki Ong, C.-H. and Thomas, Wolfgang 2012. Complexity of Model Checking Recursion Schemes for Fragments of the Modal Mu-Calculus. Logical Methods in Computer Science, Vol. 7, Issue. 4,


    KAMEYAMA, YUKIYOSHI KISELYOV, OLEG and SHAN, CHUNG-CHIEH 2011. Shifting the stage. Journal of Functional Programming, Vol. 21, Issue. 06, p. 617.


    Nakazawa, Koji Tatsuta, Makoto Kameyama, Yukiyoshi and Nakano, Hiroshi 2011. Type checking and typability in domain-free lambda calculi. Theoretical Computer Science, Vol. 412, Issue. 44, p. 6193.


    Rompf, Tiark Sujeeth, Arvind K. Lee, HyoukJoong Brown, Kevin J. Chafi, Hassan Odersky, Martin and Olukotun, Kunle 2011. Building-Blocks for Performance Oriented DSLs. Electronic Proceedings in Theoretical Computer Science, Vol. 66, p. 93.


    Danvy, Olivier and Johannsen, Jacob 2010. Inter-deriving semantic artifacts for object-oriented programming. Journal of Computer and System Sciences, Vol. 76, Issue. 5, p. 302.


    Spoto, Fausto and Payet, Étienne 2010. Magic-sets for localised analysis of Java bytecode. Higher-Order and Symbolic Computation, Vol. 23, Issue. 1, p. 29.


    Asai, Kenichi 2009. On typing delimited continuations: three new solutions to the printf problem. Higher-Order and Symbolic Computation, Vol. 22, Issue. 3, p. 275.


    CARETTE, JACQUES KISELYOV, OLEG and SHAN, CHUNG-CHIEH 2009. Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages. Journal of Functional Programming, Vol. 19, Issue. 05, p. 509.


    ×
  • Mathematical Structures in Computer Science, Volume 2, Issue 4
  • December 1992, pp. 361-391

Representing Control: a Study of the CPS Transformation

  • Oliver Danvy (a1) and Andrzex Filinski (a2)
  • DOI: http://dx.doi.org/10.1017/S0960129500001535
  • Published online: 01 March 2009
Abstract

This paper investigates the transformation of λν-terms into continuation-passing style (CPS). We show that by appropriate η-expansion of Fisher and Plotkin's two-pass equational specification of the CPS transform, we can obtain a static and context-free separation of the result terms into “essential” and “administrative” constructs. Interpreting the former as syntax builders and the latter as directly executable code, We obtain a simple and efficient one-pass transformation algorithm, easily extended to conditional expressions, recursive definitions, and similar constructs. This new transformation algorithm leads to a simpler proof of Plotkin's simulation and indifference results.

We go on to show how CPS-based control operators similar to, more general then, Scheme's call/cc can be naturally accommodated by the new transformation algorithm. To demonstrate the expressive power of these operators, we use them to present an equivalent but even more concise formulation of the efficient CPS transformation algorithm. Finally, we relate the fundamental ideas underlying this derivation to similar concepts from other work on program manipulation; we derive a one-pass CPS transformation of λn-terms; and we outline some promising areas for future research.

Copyright
Linked references
Hide All

This list contains references from the content that can be linked to their source. For a full set of references and notes please see the PDF or HTML where available.

A. Bondorf (1991) Automatic autoprojection of higher-order recursive equations. Science of Computer Programming 17 334.

A. Bondorf and O. Danvy (1991) Automatic autoprojection of recursive equations with global variables and abstract data types. Science of Computer Programming 16 151195.

W. Clinger (1984) The Scheme 311 compiler, an excercise in Denotational Semantics. In: Conference Record of the 1984 ACM Symposium on Lisp and Functional Programming, Austin, Texas356364.

O. Danvy and A. Filinski (1990) Abstracting control. In: Proceedings of the 1990 ACM Conference on Lisp and Functional Programming, Nice, France, 151160.

O. Danvy and J. L. Lawall (1992) Back to direct style II: First-class continuations. In: Proceedings of the 1992 ACM Conference on Lisp and Functional Programming, San Fransisco, California.

M. Felleisen , D.P. Friedman , E. Kohlbecker , and B. Duba (1987b) A syntactic theory of sequential control. Theoretical Computer Science 52(3) 205237.

M. Felleisen M. Wand , D.P. Friedman and B. F. Duba (1988) Abstract continuations: A mathematical semantics for handling full functional jumps. In: Proceedings of the 1988 ACM Conference on Lisp and Functional Programming, Snowbird, Utah, 5262.

P. Fradet and D. Le Métayer (1991) Compilation of functional languages by transformation. ACM Transactions on Programming Languages and Systems 13 2151.

N. D. Jones , P. Sestoft , and H. Søndergaard (1989) MIX: A self-applicable partial evaluator for experiments in compiler generation. LISP and Symbolic Computation 2(1) 950.

E. Moggi (1989) Computational lambda-calculas and monads. In: Proceedings of the Fourth Annual Symposium on Logic in Computer Science, Pacific Grove, California, IEEE, 1423.

F. Nielson (1989) Two-level semantics and abstract interpretaion. Theoretical Computer Science 69(2) 117242.

F. Nielson and H. R. Nielson (1988) Two-level semantics and code generation. Theoretical Computer Science 56(1) 59133.

G. D. Plotkin (1975) Call-by-name, call-by-value and the λ-calculas. Theoretical Computer Science 1 125159.

O. Shivers (1991) The semantics of Scheme control-flow analysis. In: P. Hudak and N. D. Jones ., editors, Symposium on Partial Evaluation and Semantics-Based Program Manipulation. SIGPLAN Notices 26 (9), ACM Press, New Haven, Connecticut. 190198.

M. Wand (1991) Correctness of procedure representations in higher-order assembly language. In: S. Brrokes , M. Main , A. Melton , and D. Schmidt , editors, Mathematical Foundations of Programming Semantics, volume 598 of Lecture Notes in Computer Science, Pittsburgh, Pennsylvania. 7th International Conference, 294311.

Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Mathematical Structures in Computer Science
  • ISSN: 0960-1295
  • EISSN: 1469-8072
  • URL: /core/journals/mathematical-structures-in-computer-science
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×