Results 1  10
of
106
Representing control: a study of the CPS transformation
, 1992
"... This paper investigates the transformation of v terms into continuationpassing style (CPS). We show that by appropriate jexpansion of Fischer and Plotkin's twopass equational specification of the CPS transform, we can obtain a static and contextfree separation of the result terms into ..."
Abstract

Cited by 86 (8 self)
 Add to MetaCart
This paper investigates the transformation of v terms into continuationpassing style (CPS). We show that by appropriate jexpansion of Fischer and Plotkin's twopass equational specification of the CPS transform, we can obtain a static and contextfree 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 onepass 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. Further we show how CPSbased control operators similar to but more general than 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 t...
Explaining Crossover and Superiority as LefttoRight Evaluation
 LINGUISTICS AND PHILOSOPHY
, 2006
"... We present a general theory of scope and binding in which both crossover and superiority violations are ruled out by one key assumption: that natural language expressions are normally evaluated (processed) from left to right. Our theory is an extension of Shan’s (2002) account of multiplewh questi ..."
Abstract

Cited by 54 (13 self)
 Add to MetaCart
We present a general theory of scope and binding in which both crossover and superiority violations are ruled out by one key assumption: that natural language expressions are normally evaluated (processed) from left to right. Our theory is an extension of Shan’s (2002) account of multiplewh questions, combining continuations (Barker, 2002) and dynamic typeshifting. Like other continuationbased analyses, but unlike most other treatments of crossover or superiority, our analysis is directly compositional (in the sense of, e.g., Jacobson, 1999). In particular, it does not postulate a level of Logical Form or any other representation distinct from surface syntax. One advantage of using continuations is that they are the standard tool for modeling orderofevaluation in programming languages. This provides us with a natural and independently motivated characterization of what it means to evaluate expressions from left to right. We give a combinatory categorial grammar that models the syntax and the semantics of quantifier scope and whquestion formation. It allows quantificational binding but not crossover, insitu wh but not superiority violations. In addition, the analysis automatically accounts for a variety of sentence types involving binding in the presence of pied piping, including reconstruction cases such as Whose criticism of hisi mother did each personi resent?
Minimal Classical Logic and Control Operators
 In ICALP: Annual International Colloquium on Automata, Languages and Programming, volume 2719 of LNCS
, 2003
"... We give an analysis of various classical axioms and characterize a notion of minimal classical logic that enforces Peirce's law without enforcing Ex Falso Quodlibet. We show that a \natural" implementation of this logic is Parigot's classical natural deduction. ..."
Abstract

Cited by 39 (4 self)
 Add to MetaCart
We give an analysis of various classical axioms and characterize a notion of minimal classical logic that enforces Peirce's law without enforcing Ex Falso Quodlibet. We show that a \natural" implementation of this logic is Parigot's classical natural deduction.
Secure Information Flow via Linear Continuations
 Higher Order and Symbolic Computation
, 2002
"... Securitytyped languages enforce secrecy or integrity policies by typechecking. This paper investigates continuationpassing style (CPS) as a means of proving that such languages enforce noninterference and as a rst step towards understanding their compilation. We present a lowlevel, secure calcu ..."
Abstract

Cited by 35 (7 self)
 Add to MetaCart
(Show Context)
Securitytyped languages enforce secrecy or integrity policies by typechecking. This paper investigates continuationpassing style (CPS) as a means of proving that such languages enforce noninterference and as a rst step towards understanding their compilation. We present a lowlevel, secure calculus with higherorder, imperative features and linear continuations.
Delimited Dynamic Binding
, 2006
"... Dynamic binding and delimited control are useful together in many settings, including Web applications, database cursors, and mobile code. We examine this pair of language features to show that the semantics of their interaction is illdefined yet not expressive enough for these uses. We solve this ..."
Abstract

Cited by 32 (13 self)
 Add to MetaCart
Dynamic binding and delimited control are useful together in many settings, including Web applications, database cursors, and mobile code. We examine this pair of language features to show that the semantics of their interaction is illdefined yet not expressive enough for these uses. We solve this open and subtle problem. We formalise a typed language DB+DC that combines a calculus DB of dynamic binding and a calculus DC of delimited control. We argue from theoretical and practical points of view that its semantics should be based on delimited dynamic binding: capturing a delimited continuation closes over part of the dynamic environment, rather than all or none of it; reinstating the captured continuation supplements the dynamic environment, rather than replacing or inheriting it. We introduce a type and reductionpreserving translation from DB + DC to DC, which proves that delimited control macroexpresses dynamic binding. We use this translation to implement DB + DC in Scheme, OCaml, and Haskell. We extend DB + DC with mutable dynamic variables and a facility to obtain not only the latest binding of a dynamic variable but also older bindings. This facility provides for stack inspection and (more generally) folding over the execution context as an inductive data structure.
Reasoning with Continuations II: Full Abstraction for Models of Control
 In Proceedings of the 1990 ACM Conference on Lisp and Functional Programming
, 1990
"... A fully abstract model of a programming language assigns the same meaning to two terms if and only if they have the same operational behavior. Such models are wellknown for functional languages but little is known about extended functional languages with sophisticated control structures. We show th ..."
Abstract

Cited by 31 (3 self)
 Add to MetaCart
(Show Context)
A fully abstract model of a programming language assigns the same meaning to two terms if and only if they have the same operational behavior. Such models are wellknown for functional languages but little is known about extended functional languages with sophisticated control structures. We show that a direct model with error values and the conventional continuation model are adequate for functional languages augmented with first and higherorder control facilities, respectively. Furthermore, both models become fully abstract on adding a control delimiter and a parallel conditional to the programming languages.
Cogen in Six Lines
 Proc. International Conference on Functional Programming
, 1996
"... We have designed and implemented a programgenerator generator (PGG) for an untyped higherorder functional programming language. The program generators perform continuationbased multilevel offline specialization and thus combine the most powerful and general offline partial evaluation techniques. ..."
Abstract

Cited by 31 (11 self)
 Add to MetaCart
We have designed and implemented a programgenerator generator (PGG) for an untyped higherorder functional programming language. The program generators perform continuationbased multilevel offline specialization and thus combine the most powerful and general offline partial evaluation techniques. The correctness of the PGG is ensured by deriving it from a multilevel specializer. Our PGG is extremely simple to implement due to the use of multilevel techniques and higherorder abstract syntax. Keywords: partial evaluation, multilevel computation, continuations. 1 Introduction An attractive feature of partial evaluation is the ability to generate generating extensions. A generating extension for a program p with two inputs inp s and inp d is a program pgen which accepts the static input inp s of p and produces a residual program p s which accepts the dynamic input inp d and produces the same result as JpK inp s inp d , provided both p and p s terminate. JpgenK inp ...
A Dynamic Extent Control Operator for Partial Continuations
 In Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages
, 1991
"... : A partial continuation is a prefix of the computation that remains to be done. We propose in this paper a new operator which precisely controls which prefix is to be abstracted into a partial continuation. This operator is strongly related to the notion of dynamic extent which we denotationally ch ..."
Abstract

Cited by 30 (6 self)
 Add to MetaCart
: A partial continuation is a prefix of the computation that remains to be done. We propose in this paper a new operator which precisely controls which prefix is to be abstracted into a partial continuation. This operator is strongly related to the notion of dynamic extent which we denotationally characterize. Some programming examples are commented and we also show how to express previously proposed control operators. A suggested implementation is eventually discussed. Keywords: continuation, partial continuation, dynamic and indefinite extent, escape feature. Continuations were introduced within denotational semantics to express the "rest of the computation" in these cases where some constructs of a language can alter it. Non local exits or jumps (stop, goto), exception handling, failure semantics in Prologlike languages are usually described with continuations [Stoy 77, Schmidt 86]. The Scheme language [Rees & Clinger 86] offers procedural firstclass continuations with indefinit...
A rational deconstruction of Landin’s SECD machine
 Implementation and Application of Functional Languages, 16th International Workshop, IFL’04, number 3474 in Lecture Notes in Computer Science
, 2004
"... Abstract. Landin’s SECD machine was the first abstract machine for applicative expressions, i.e., functional programs. Landin’s J operator was the first control operator for functional languages, and was specified by an extension of the SECD machine. We present a family of evaluation functions corre ..."
Abstract

Cited by 28 (19 self)
 Add to MetaCart
(Show Context)
Abstract. Landin’s SECD machine was the first abstract machine for applicative expressions, i.e., functional programs. Landin’s J operator was the first control operator for functional languages, and was specified by an extension of the SECD machine. We present a family of evaluation functions corresponding to this extension of the SECD machine, using a series of elementary transformations (transformation into continuationpassing style (CPS) and defunctionalization, chiefly) and their left inverses (transformation into direct style and refunctionalization). To this end, we modernize the SECD machine into a bisimilar one that operates in lockstep with the original one but that (1) does not use a data stack and (2) uses the callersave rather than the calleesave convention for environments. We also identify that the dump component of the SECD machine is managed in a calleesave way. The callersave counterpart of the modernized SECD machine precisely corresponds to Thielecke’s doublebarrelled continuations and to Felleisen’s encoding of J in terms of call/cc. We then variously characterize the J operator in terms of CPS and in terms of delimitedcontrol operators in the CPS hierarchy. As a byproduct, we also present several reduction semantics for applicative expressions