Results 11  20
of
111
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 33 (20 self)
 Add to MetaCart
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
From reductionbased to reductionfree normalization
 Proceedings of the Fourth International Workshop on Reduction Strategies in Rewriting and Programming (WRS'04
, 2004
"... We document an operational method to construct reductionfree normalization functions. Starting from a reductionbased normalization function from a reduction semantics, i.e., the iteration of a onestep reduction function, we successively subject it to refocusing (i.e., deforestation of the inte ..."
Abstract

Cited by 28 (13 self)
 Add to MetaCart
(Show Context)
We document an operational method to construct reductionfree normalization functions. Starting from a reductionbased normalization function from a reduction semantics, i.e., the iteration of a onestep reduction function, we successively subject it to refocusing (i.e., deforestation of the intermediate successive terms in the reduction sequence), equational simplication, refunctionalization (i.e., the converse of defunctionalization), and directstyle transformation (i.e., the converse of the CPS transformation), ending with a reductionfree normalization function of the kind usually crafted by hand. We treat in detail four simple examples: calculating arithmetic expressions, recognizing Dyck words, normalizing lambdaterms with explicit substitutions and call/cc, and attening binary trees. The overall method builds on previous work by the author and his students on a syntactic correspondence between reduction semantics and abstract machines and on a functional correspondence between evaluators and abstract machines. The measure of success of these two correspondences is that each of the interderived semantic artifacts (i.e., manmade constructs) could plausibly have been written by hand, as is the actual case for several ones derived here.
Thunks and the λcalculus
 IN THE JOURNAL OF FUNCTIONAL PROGRAMMING. RS976 OLIVIER DANVY AND ULRIK
, 1997
"... Plotkin, in his seminal article Callbyname, callbyvalue and the λcalculus, formalized evaluation strategies and simulations using operational semantics and continuations. In particular, he showed how callbyname evaluation could be simulated under callbyvalue evaluation and vice versa. Si ..."
Abstract

Cited by 27 (10 self)
 Add to MetaCart
Plotkin, in his seminal article Callbyname, callbyvalue and the λcalculus, formalized evaluation strategies and simulations using operational semantics and continuations. In particular, he showed how callbyname evaluation could be simulated under callbyvalue evaluation and vice versa. Since Algol 60, however, callbyname is both implemented and simulated with thunks rather than with continuations. We recast
Defunctionalized interpreters for programming languages
, 2008
"... This document illustrates how functional implementations of formal semantics (structural operational semantics, reduction semantics, smallstep and bigstep abstract machines, natural semantics, and denotational semantics) can be transformed into each other. These transformations were foreshadowed ..."
Abstract

Cited by 26 (4 self)
 Add to MetaCart
(Show Context)
This document illustrates how functional implementations of formal semantics (structural operational semantics, reduction semantics, smallstep and bigstep abstract machines, natural semantics, and denotational semantics) can be transformed into each other. These transformations were foreshadowed by Reynolds in Definitional Interpreters for HigherOrder Programming Languages for functional implementations of denotational semantics, natural semantics, and bigstep abstract machines using closure conversion, CPS transformation, and defunctionalization. Over the last few years, the author and his students have further observed that machines are related using fusion by xedpoint promotion and that functional implementations of reduction semantics and of smallstep abstract machines are related using refocusing and transition
The Occurrence of Continuation Parameters in CPS Terms
, 1995
"... We prove an occurrence property about formal parameters of continuations in ContinuationPassing Style (CPS) terms that have been automatically produced by CPS transformation of pure, callbyvalue terms. Essentially, parameters of continuations obey a stacklike discipline. This property was intro ..."
Abstract

Cited by 25 (18 self)
 Add to MetaCart
(Show Context)
We prove an occurrence property about formal parameters of continuations in ContinuationPassing Style (CPS) terms that have been automatically produced by CPS transformation of pure, callbyvalue terms. Essentially, parameters of continuations obey a stacklike discipline. This property was introduced, but not formally proven, in an earlier work on the DirectStyle transformation (the inverse of the CPS transformation). The proof has been implemented in Elf, a constraint logic programming language based on the logical framework LF. In fact, it was the implementation that inspired the proof. Thus this note also presents a case study of machineassisted proof discovery. All the programs are available in ( ftp.daimi.aau.dk:pub/danvy/Programs/danvypfenningElf93.tar.gz ftp.cs.cmu.edu:user/fp/papers/cpsocc95.tar.gz Most of the research reported here was carried out while the first author visited Carnegie Mellon University in the Spring of 1993. Current address: Olivier Danvy, Ny Munkeg...
An operational foundation for delimited continuations
 in the CPS hierarchy. Logical Methods in Computer Science
, 2005
"... ..."
From Control Effects to Typed Continuation Passing
 In 30th SIGPLANSIGACT Symposium on Principles of Programming Languages (POPL’03
, 2003
"... Firstclass continuations are a powerful computational effect, allowing the programmer to express any form of jumping. Types and effect systems can be used to reason about continuations, both in the source language and in the target language of the continuationpassing transform. In this paper, we e ..."
Abstract

Cited by 24 (2 self)
 Add to MetaCart
(Show Context)
Firstclass continuations are a powerful computational effect, allowing the programmer to express any form of jumping. Types and effect systems can be used to reason about continuations, both in the source language and in the target language of the continuationpassing transform. In this paper, we establish the connection between an effect system for firstclass continuations and typed versions of continuationpassing style. A region in the effect system determines a local answer type for continuations, such that the continuation transforms of pure expressions are parametrically polymorphic in their answer types. We use this polymorphism to derive transforms that make use of effect information, in particular, a mixed linear/nonlinear continuationpassing transform, in which expressions without control effects are passed their continuations linearly.
On proving syntactic properties of CPS programs
, 1999
"... Higherorder program transformations raise new challenges for proving properties of their output, since they resist traditional, rstorder proof techniques. In this work, we consider (1) the \onepass" continuationpassing style (CPS) transformation, which is secondorder, and (2) the occur ..."
Abstract

Cited by 23 (8 self)
 Add to MetaCart
Higherorder program transformations raise new challenges for proving properties of their output, since they resist traditional, rstorder proof techniques. In this work, we consider (1) the \onepass" continuationpassing style (CPS) transformation, which is secondorder, and (2) the occurrences of parameters of continuations in its output. To this end, we specify the onepass CPS transformation relationally and we use the proof technique of logical relations.
From Interpreter to Logic Engine by Defunctionalization
, 2004
"... Starting from a continuationbased interpreter for a simple logic programming language, propositional Prolog with cut, we derive the corresponding logic engine in the form of an abstract machine. The derivation originates in previous work (our article at PPDP 2003) where it was applied to the la ..."
Abstract

Cited by 23 (14 self)
 Add to MetaCart
Starting from a continuationbased interpreter for a simple logic programming language, propositional Prolog with cut, we derive the corresponding logic engine in the form of an abstract machine. The derivation originates in previous work (our article at PPDP 2003) where it was applied to the lambdacalculus. The key transformation here is Reynolds's defunctionalization that transforms a tailrecursive, continuationpassing interpreter into a transition system, i.e., an abstract machine. Similar denotational and operational semantics were studied by de Bruin and de Vink (their article at TAPSOFT 1989), and we compare their study with our derivation. Additionally, we present a directstyle interpreter of propositional Prolog expressed with control operators for delimited continuations.