Results 1  10
of
18
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
The Worker/Wrapper Transformation
 Journal of Functional Programming
, 2009
"... The worker/wrapper transformation is a technique for changing the type of a computation, usually with the aim of improving its performance. It has been used by compiler writers for many years, but the technique is little known in the wider functional programming community, and has never been describ ..."
Abstract

Cited by 24 (14 self)
 Add to MetaCart
The worker/wrapper transformation is a technique for changing the type of a computation, usually with the aim of improving its performance. It has been used by compiler writers for many years, but the technique is little known in the wider functional programming community, and has never been described precisely. In this article we explain, formalise and explore the generality of the worker/wrapper transformation. We also provide a systematic recipe for its use as an equational reasoning technique for improving the performance of programs, and illustrate the power of this recipe using a range of examples. 1
A typetheoretic foundation of delimited continuations. Higher Order Symbol
 Comput
, 2009
"... Abstract. There is a correspondence between classical logic and programming language calculi with firstclass continuations. With the addition of control delimiters, the continuations become composable and the calculi become more expressive. We present a finegrained analysis of control delimiters a ..."
Abstract

Cited by 20 (5 self)
 Add to MetaCart
Abstract. There is a correspondence between classical logic and programming language calculi with firstclass continuations. With the addition of control delimiters, the continuations become composable and the calculi become more expressive. We present a finegrained analysis of control delimiters and formalise that their addition corresponds to the addition of a single dynamicallyscoped variable modelling the special toplevel continuation. From a type perspective, the dynamicallyscoped variable requires effect annotations. In the presence of control, the dynamicallyscoped variable can be interpreted in a purely functional way by applying a storepassing style. At the type level, the effect annotations are mapped within standard classical logic extended with the dual of implication, namely subtraction. A continuationpassingstyle transformation of lambdacalculus with control and subtraction is defined. Combining the translations provides a decomposition of standard CPS transformations for delimited continuations. Incidentally, we also give a direct normalisation proof of the simplytyped lambdacalculus with control and subtraction.
Combining algebraic effects with continuations
, 2007
"... We consider the natural combinations of algebraic computational effects such as sideeffects, exceptions, interactive input/output, and nondeterminism with continuations. Continuations are not an algebraic effect, but previously developed combinations of algebraic effects given by sum and tensor ext ..."
Abstract

Cited by 17 (4 self)
 Add to MetaCart
We consider the natural combinations of algebraic computational effects such as sideeffects, exceptions, interactive input/output, and nondeterminism with continuations. Continuations are not an algebraic effect, but previously developed combinations of algebraic effects given by sum and tensor extend, with effort, to include commonly used combinations of the various algebraic effects with continuations. Continuations also give rise to a third sort of combination, that given by applying the continuations monad transformer to an algebraic effect. We investigate the extent to which sum and tensor extend from algebraic effects to arbitrary monads, and the extent to which Felleisen et al.’s C operator extends from continuations to its combination with algebraic effects. To do all this, we use Dubuc’s characterisation of strong monads in terms of enriched large Lawvere theories.
Answer type polymorphism in callbyname continuation passing
 In Proc. European Symposium on Programming, Springer Lecture Notes in Comput. Sci
, 2004
"... Abstract. This paper studies continuations by means of a polymorphic type system. The traditional callbyname continuation passing style transform admits a typing in which some answer types are polymorphic, even in the presence of firstclass control operators. By building on this polymorphic typin ..."
Abstract

Cited by 10 (0 self)
 Add to MetaCart
(Show Context)
Abstract. This paper studies continuations by means of a polymorphic type system. The traditional callbyname continuation passing style transform admits a typing in which some answer types are polymorphic, even in the presence of firstclass control operators. By building on this polymorphic typing, and using parametricity reasoning, we show that the callbyname transform satisfies the etalaw, and is in fact isomorphic to the more recent CPS transform defined by Streicher. 1
Linear ContinuationPassing
 IN THE 2001 ACM SIGPLAN WORKSHOP ON CONTINUATIONS (CW'01
, 2002
"... Continuations can be used to explain a wide variety of control behaviours, including calling/returning (procedures), raising/handling (exceptions), labelled jumping (goto statements), process switching (coroutines), and backtracking. However, continuations are often manipulated in a highly stylised ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
(Show Context)
Continuations can be used to explain a wide variety of control behaviours, including calling/returning (procedures), raising/handling (exceptions), labelled jumping (goto statements), process switching (coroutines), and backtracking. However, continuations are often manipulated in a highly stylised way, and we show that all of these, bar backtracking, in fact use their continuations linearly ; this is formalised by taking a target language for cps transforms that has both intuitionistic and linear function types.
Functional Pearl: The Great Escape: Or, How to jump the border without getting caught
 ICFP'07
, 2007
"... Filinski showed that callcc and a single mutable reference cell are sufficient to express the delimited control operators shift and reset. However, this implementation interacts poorly with dynamic bindings like exception handlers. We present a variation on Filinskiâs encoding of delimited continu ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Filinski showed that callcc and a single mutable reference cell are sufficient to express the delimited control operators shift and reset. However, this implementation interacts poorly with dynamic bindings like exception handlers. We present a variation on Filinskiâs encoding of delimited continuations that behaves appropriately in the presence of exceptions and give an implementation in Standard ML of New Jersey. We prove the encoding correct with respect to the semantics of delimited dynamic binding.
A System F with callbyname exceptions
"... Abstract. We present an extension of System F with callbyname exceptions. The type system is enriched with two syntactic constructs: a union type A ⋆ ∪ {ε} for programs of type A whose execution may raise the exception ε at top level, and a corruption type A {ε} for programs that may raise the exc ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
Abstract. We present an extension of System F with callbyname exceptions. The type system is enriched with two syntactic constructs: a union type A ⋆ ∪ {ε} for programs of type A whose execution may raise the exception ε at top level, and a corruption type A {ε} for programs that may raise the exception ε in any evaluation context (not necessarily at top level). We present the syntax and reduction rules of the system, as well as its typing and subtyping rules. We then study its properties, such as confluence. Finally, we construct a realizability model using orthogonality techniques, from which we deduce that welltyped programs are weakly normalizing and that the ones who have the type of natural numbers really compute a natural number, without raising exceptions. 1
C∀, a Study in Evolutionary Design in Programming Languages
 UNIVERSITY OF WATERLOO
, 2004
"... New programming languages appear constantly. Many of them are based on existing ones but differ sufficiently so they are incompatible (e.g., C/C++ and Java). Building on the C8 language (Ditchfield [47] and Bilson [16]), this thesis continues the C8 "evolutionary" approach to programming l ..."
Abstract
 Add to MetaCart
New programming languages appear constantly. Many of them are based on existing ones but differ sufficiently so they are incompatible (e.g., C/C++ and Java). Building on the C8 language (Ditchfield [47] and Bilson [16]), this thesis continues the C8 "evolutionary" approach to programming language design based upon the very successful C programming language, preserving its syntax and semantics while extending it with features that considerably enhance its expressiveness. The evolutionary approach allows for the introduction of powerful abstraction mechanisms with minimal disruption to legacy code, truly "making the future safe for the past" [20]...