Reasoning with Continuations III : A Complete Calculus of ControlAmr
نویسندگان
چکیده
The-calculus is the simple and elegant, yet powerful basis for the semantic manipulation of functional programs by programmers and programming tools (compilers, optimizers, semantics-based editors) alike. The theory provides a simple system for evaluating programs in a symbolic manner; the typed version is a complete system of program equality for the pure core language. Felleisen et al. 6, 9, 8] and Talcott 24, 25] have recently developed extensions of the-calculus for reasoning about languages with powerful control operators, the v-C-calculus and the rst-order logic IOCC, respectively, but they did not address the issue of completeness. The central result of this paper is an extension of the v-C-calculus for a complete set of control operators and a correspondence theorem between the new theory and the-calculus. Technically, the theorem shows that the two calculi prove the same equations with respect to the well-known continuation-passing style translation (and its inverse), which is the standard tool for deening control operators via translation into a functional language. As a corollary, the calculus proves all program equivalences between terms over the pure language extended with control operators. We believe that this work has important consequences for the direct-style compilation of programming languages with control operators.
منابع مشابه
From shift and reset to polarized linear logic
Griffin [22] pointed out that, just as the pure λ-calculus corresponds to intuitionistic logic, a λ-calculus with firstclass continuations corresponds to classical logic. We study how first-class delimited continuations [13], in the form of Danvy and Filinski’s shift and reset operators [10, 11], can also be logically interpreted. First, we refine Danvy and Filinski’s type system for shift and ...
متن کاملAxiomatizing Higher Level Delimited Continuation
In our previous work we gave a sound and complete axiomatization of the control operators for delimited continuations, shift and reset by Danvy and Filinski and their variants. Since the calculus allows only one use of shift and reset, a next step is to investigate the calculus with many different shift’s and reset’s. In this work, we study the calculus with higher-level delimited continuation ...
متن کاملContinuation Models Are Universal for -calculus
We show that a certain simple call-by-name continuation semantics of Parigot's-calculus is complete. More precisely, for every-theory we construct a cartesian closed category such that the ensuing continuation-style interpretation of , which maps terms to functions sending abstract continuations to responses , is full and faithful. Thus, any-category in the sense of is isomorphic to a continuat...
متن کاملSound and Complete Axiomatisations of Call-by-Value Control Operators
We formulate a typed version of call-by-value-calculus containing variants of Felleisen's control operators A and C which provide explicit access to continuations and logically extend the propositions-as-types correspondence to classical propositional logic. We give an equational theory for this calculus which is shown to be sound and complete with respect to to a class of categorical models ba...
متن کاملEnvironmental Bisimulations for Delimited-Control Operators with Dynamic Prompt Generation
We present sound and complete environmental bisimilarities for a variant of Dybvig et al.’s calculus of multi-prompted delimited-control operators with dynamic prompt generation. The reasoning principles that we obtain generalize and advance the existing techniques for establishing program equivalence in calculi with single-prompted delimited control. The basic theory that we develop is present...
متن کامل