Results 1  10
of
149
Typedirected partial evaluation
 Proceedings of the TwentyThird Annual ACM Symposium on Principles of Programming Languages
, 1996
"... Abstract. Typedirected partial evaluation stems from the residualization of arbitrary static values in dynamic contexts, given their type. Its algorithm coincides with the one for coercing asubtype value into a supertype value, which itself coincides with the one of normalization in thecalculus. T ..."
Abstract

Cited by 219 (38 self)
 Add to MetaCart
(Show Context)
Abstract. Typedirected partial evaluation stems from the residualization of arbitrary static values in dynamic contexts, given their type. Its algorithm coincides with the one for coercing asubtype value into a supertype value, which itself coincides with the one of normalization in thecalculus. Typedirected partial evaluation is thus used to specialize compiled, closed programs, given their type. Since Similix, letinsertion is a cornerstone of partial evaluators for callbyvalue procedural programs with computational e ects. It prevents the duplication of residual computations, and more generally maintains the order of dynamic side e ects in residual programs. This article describes the extension of typedirected partial evaluation to insert residual let expressions. This extension requires the userto annotate arrowtypes with e ect information. It is achieved by delimiting and abstracting control, comparably to continuationbased specialization in direct style. It enables typedirected partial evaluation of e ectful programs (e.g.,ade nitional lambdainterpreter for an imperative language) that are in direct style. The residual programs are in Anormal form. 1
How to Declare an Imperative
, 1995
"... How can we integrate interaction into a purely declarative language? This tutorial describes a solution to this problem based on a monad. The solution has been implemented in the functional language Haskell and the declarative language Escher. Comparisons are given to other approaches to interaction ..."
Abstract

Cited by 109 (3 self)
 Add to MetaCart
How can we integrate interaction into a purely declarative language? This tutorial describes a solution to this problem based on a monad. The solution has been implemented in the functional language Haskell and the declarative language Escher. Comparisons are given to other approaches to interaction based on synchronous streams, continuations, linear logic, and side effects.
A Generalization of Exceptions and Control in MLlike Languages
 IN PROC. FPCA
, 1995
"... We add functional continuations and prompts to a language with an MLstyle type system. The operators significantly extend and simplify the control operators in SML/NJ, and can be themselves used to implement (simple) exceptions. We prove that welltyped terms never produce runtime type errors and ..."
Abstract

Cited by 64 (0 self)
 Add to MetaCart
(Show Context)
We add functional continuations and prompts to a language with an MLstyle type system. The operators significantly extend and simplify the control operators in SML/NJ, and can be themselves used to implement (simple) exceptions. We prove that welltyped terms never produce runtime type errors and give a module for implementing them in the latest version of SML/NJ.
Representing Layered Monads
 PROCEEDINGS OF THE TWENTYSIXTH ANNUAL ACM SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES
, 1999
"... There has already been considerable research on constructing modular, monadbased specications of computational effects (state, exceptions, nondeterminism, etc.) in programming languages. We present a simple framework in this tradition, based on a Churchstyle effecttyping system for an MLlike lan ..."
Abstract

Cited by 64 (2 self)
 Add to MetaCart
(Show Context)
There has already been considerable research on constructing modular, monadbased specications of computational effects (state, exceptions, nondeterminism, etc.) in programming languages. We present a simple framework in this tradition, based on a Churchstyle effecttyping system for an MLlike language. The semantics of this language is formally dened by a series of monadic translations, each one expanding away a layer of effects. Such a layered specication is easy to reason about, but its direct implementation (whether by parameterized interpretation or by actual translation) is often prohibitively inefficient. By exploiting deeper semantic properties of monads, however, it is also possible to derive a vastly more efficient implementation: we show that each layer of eects can be uniformly simulated by continuationpassing, and further that multiple such layers can themselves be simulated by a standard semantics for call/cc and mutable state. Thus, even multieffect programs can be execu...
Back to Direct Style
, 1994
"... This paper describes the transformation of lambdaterms from continuationpassing style (CPS) to direct style. This transformation is the left inverse of Plotkin's lefttoright callbyvalue CPS encoding for the pure lambdacalculus. Not all terms are CPS terms, and not all CPS terms encode a ..."
Abstract

Cited by 57 (25 self)
 Add to MetaCart
This paper describes the transformation of lambdaterms from continuationpassing style (CPS) to direct style. This transformation is the left inverse of Plotkin's lefttoright callbyvalue CPS encoding for the pure lambdacalculus. Not all terms are CPS terms, and not all CPS terms encode a lefttoright callbyvalue evaluation. These CPS terms are characterized here; they can be mapped back to direct style. In addition, the two transformations  to continuationpassing style and to direct style  are factored using a language where all intermediate values are named and their computation is sequentialized. The issue of proper tailrecursion is also addressed.
Finally Tagless, Partially Evaluated  Tagless Staged Interpreters for Simpler Typed Languages
 UNDER CONSIDERATION FOR PUBLICATION IN J. FUNCTIONAL PROGRAMMING
"... We have built the first family of tagless interpretations for a higherorder typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically typepreserving interpretations include an ..."
Abstract

Cited by 53 (9 self)
 Add to MetaCart
We have built the first family of tagless interpretations for a higherorder typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically typepreserving interpretations include an evaluator, a compiler (or staged evaluator), a partial evaluator, and callbyname and callbyvalue CPS transformers. Our principal technique is to encode de Bruijn or higherorder abstract syntax using combinator functions rather than data constructors. In other words, we represent object terms not in an initial algebra but using the coalgebraic structure of the λcalculus. Our representation also simulates inductive maps from types to types, which are required for typed partial evaluation and CPS transformations. Our encoding of an object term abstracts uniformly over the family of ways to interpret it, yet statically assures that the interpreters never get stuck. This family of interpreters thus demonstrates again that it is useful to abstract over higherkinded types.
Reflection in logic, functional and objectoriented programming: a short comparative study
 Proc. of the IJCAI’95 Workshop on Reflection and Metalevel Architectures andtheir Applications in AI,1995
"... Département d’informatique et de recherche opérationnelle ..."
Abstract

Cited by 46 (1 self)
 Add to MetaCart
(Show Context)
Département d’informatique et de recherche opérationnelle
A functional correspondence between monadic evaluators and abstract machines for languages with computational effects
 Theoretical Computer Science
, 2005
"... Abstract. We extend our correspondence between evaluators and abstract machines from the pure setting of the λcalculus to the impure setting of the computational λcalculus. We show how to derive new abstract machines from monadic evaluators for the computational λcalculus. Starting from (1) a gen ..."
Abstract

Cited by 44 (20 self)
 Add to MetaCart
Abstract. We extend our correspondence between evaluators and abstract machines from the pure setting of the λcalculus to the impure setting of the computational λcalculus. We show how to derive new abstract machines from monadic evaluators for the computational λcalculus. Starting from (1) a generic evaluator parameterized by a monad and (2) a monad specifying a computational effect, we inline the components of the monad in the generic evaluator to obtain an evaluator written in a style that is specific to this computational effect. We then derive the corresponding abstract machine by closureconverting, CPStransforming, and defunctionalizing this specific evaluator. We illustrate the construction with the identity monad, obtaining yet again the CEK machine, and with a lifted state monad, obtaining a variant of the CEK machine with error and state. In addition, we characterize the tailrecursive stack inspection presented by Clements and Felleisen at ESOP 2003 as a lifted state monad. This enables us to combine the stackinspection monad with other monads and to construct abstract machines for languages with properly tailrecursive stack inspection and other computational effects. The construction scales to other monads—including one more properly dedicated to stack inspection than the lifted state monad—and other monadic evaluators. Keywords. Lambdacalculus, interpreters, abstract machines, closure conversion, transformation into continuationpassing style (CPS), defunctionalization, monads, effects, proper
Semantic Lego
, 1995
"... Denotational semantics [Sch86] is a powerful framework for describing programming languages; however, its descriptions lack modularity: conceptually independent language features influence each others' semantics. We address this problem by presenting a theory of modular denotational semantics. ..."
Abstract

Cited by 43 (0 self)
 Add to MetaCart
(Show Context)
Denotational semantics [Sch86] is a powerful framework for describing programming languages; however, its descriptions lack modularity: conceptually independent language features influence each others' semantics. We address this problem by presenting a theory of modular denotational semantics. Following Mosses [Mos92], we divide a semantics into two parts, a computation ADT and a language ADT (abstract data type). The computation ADT represents the basic semantic structure of the language. The language ADT represents the actual language constructs, as described by a grammar. We define the language ADT using the computation ADT; in fact, language constructs are polymorphic over many different computation ADTs. Following Moggi [Mog89a], we build the computation ADT from composable parts, using monads and monad transformers. These techniques allow us to build many different computation ADTs, and, since our language constructs are polymorphic, many different language semantics. We autom...
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
(Show Context)
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.