Results 1 - 10
of
19
A Generic Account of Continuation-Passing Styles
- Proceedings of the Twenty-first Annual ACM Symposium on Principles of Programming Languages
, 1994
"... We unify previous work on the continuation-passing style (CPS) transformations in a generic framework based on Moggi's computational meta-language. This framework is used to obtain CPS transformations for a variety of evaluation strategies and to characterize the corresponding administrative reducti ..."
Abstract
-
Cited by 79 (33 self)
- Add to MetaCart
We unify previous work on the continuation-passing style (CPS) transformations in a generic framework based on Moggi's computational meta-language. This framework is used to obtain CPS transformations for a variety of evaluation strategies and to characterize the corresponding administrative reductions and inverse transformations. We establish generic formal connections between operational semantics and equational theories. Formal properties of transformations for specific evaluation orders follow as corollaries. Essentially, we factor transformations through Moggi's computational meta-language. Mapping -terms into the meta-language captures computational properties (e.g., partiality, strictness) and evaluation order explicitly in both the term and the type structure of the meta-language. The CPS transformation is then obtained by applying a generic transformation from terms and types in the meta-language to CPS terms and types, based on a typed term representation of the continuation ...
Monads and Effects
- IN INTERNATIONAL SUMMER SCHOOL ON APPLIED SEMANTICS APPSEM’2000
, 2000
"... A tension in language design has been between simple semantics on the one hand, and rich possibilities for side-effects, exception handling and so on on the other. The introduction of monads has made a large step towards reconciling these alternatives. First proposed by Moggi as a way of structu ..."
Abstract
-
Cited by 39 (6 self)
- Add to MetaCart
A tension in language design has been between simple semantics on the one hand, and rich possibilities for side-effects, exception handling and so on on the other. The introduction of monads has made a large step towards reconciling these alternatives. First proposed by Moggi as a way of structuring semantic descriptions, they were adopted by Wadler to structure Haskell programs, and now offer a general technique for delimiting the scope of effects, thus reconciling referential transparency and imperative operations within one programming language. Monads have been used to solve long-standing problems such as adding pointers and assignment, inter-language working, and exception handling to Haskell, without compromising its purely functional semantics. The course will introduce monads, effects and related notions, and exemplify their applications in programming (Haskell) and in compilation (MLj). The course will present typed metalanguages for monads and related categorica...
Thunks and the λ-calculus
- IN THE JOURNAL OF FUNCTIONAL PROGRAMMING. RS-97-6 OLIVIER DANVY AND ULRIK
, 1997
"... Plotkin, in his seminal article Call-by-name, call-by-value and the λ-calculus, formalized evaluation strategies and simulations using operational semantics and continuations. In particular, he showed how call-by-name evaluation could be simulated under call-by-value evaluation and vice versa. Si ..."
Abstract
-
Cited by 21 (9 self)
- Add to MetaCart
Plotkin, in his seminal article Call-by-name, call-by-value and the λ-calculus, formalized evaluation strategies and simulations using operational semantics and continuations. In particular, he showed how call-by-name evaluation could be simulated under call-by-value evaluation and vice versa. Since Algol 60, however, call-by-name is both implemented and simulated with thunks rather than with continuations. We recast
Minimal thunkification
- Proceedings of the Third International Workshop on Static Analysis WSA'93, volume 724 of Lecture Notes in Computer Science
, 1993
"... Abstract. By “thunkifying ” the arguments to function applications and “dethunkifying ” variables one can translate a λ-expression e into a λ-expression e ′ , such that call-by-value evaluation of e ′ gives the same result as call-by-name evaluation of e. By using the result of a strictness analysis ..."
Abstract
-
Cited by 15 (1 self)
- Add to MetaCart
Abstract. By “thunkifying ” the arguments to function applications and “dethunkifying ” variables one can translate a λ-expression e into a λ-expression e ′ , such that call-by-value evaluation of e ′ gives the same result as call-by-name evaluation of e. By using the result of a strictness analysis, some of these thunkifications can be avoided. In this paper we present a type system for strictness analysis; present a translation algorithm which exploits the strictness proof tree; and give a combined proof of the correctness of the analysis/translation. 1
Proving the Correctness of Compiler Optimisations Based on a Global Analysis: A Study of Strictness Analysis
, 1992
"... A substantial amount of work has been devoted to the proof of correctness of various program analyses but much less attention has been paid to the correctness of compiler optimisations based on these analyses. In this paper we tackle the problem in the context of strictness analysis for lazy functio ..."
Abstract
-
Cited by 15 (3 self)
- Add to MetaCart
A substantial amount of work has been devoted to the proof of correctness of various program analyses but much less attention has been paid to the correctness of compiler optimisations based on these analyses. In this paper we tackle the problem in the context of strictness analysis for lazy functional languages. We show that compiler optimisations based on strictness analysis can be expressed formally in the functional framework using continuations. This formal presentation has two benefits: it allows us to give a rigorous correctness proof of the optimised compiler; and it exposes the various optimisations made possible by a strictness analysis. 1 Introduction Realistic compilers for imperative or functional languages include a number of optimisations based on non-trivial global analyses. Proving the correctness of such optimising compilers can be done in three steps: 1. proving the correctness of the original (unoptimised) compiler; Correspondence regarding this paper should be ...
On the Transformation between Direct and Continuation Semantics
- Proceedings of the 9th Conference on Mathematical Foundations of Programming Semantics, number 802 in Lecture Notes in Computer Science
, 1993
"... . Proving the congruence between a direct semantics and a continuation semantics is often surprisingly complicated considering that direct-style -terms can be transformed into continuation style automatically. However, transforming the representation of a direct-style semantics into continuation sty ..."
Abstract
-
Cited by 13 (10 self)
- Add to MetaCart
. Proving the congruence between a direct semantics and a continuation semantics is often surprisingly complicated considering that direct-style -terms can be transformed into continuation style automatically. However, transforming the representation of a direct-style semantics into continuation style usually does not yield the expected representation of a continuation-style semantics (i.e., one written by hand). The goal of our work is to automate the transformation between textual representations of direct semantics and of continuation semantics. Essentially, we identify properties of a direct-style representation (e.g., totality), and we generalize the transformation into continuation style accordingly. As a result, we can produce the expected representation of a continuation semantics, automatically. It is important to understand the transformation between representations of direct and of continuation semantics because it is these representations that get processed in any kind of ...
Assessing the Overhead of ML Exceptions by Selective CPS . . .
- In Proceedings of the 1998 ACM SIGPLAN Workshop on ML
, 1998
"... ML's exception handling makes it possible to describe exceptional execution ows conveniently, but it also forms a performance bottleneck. ..."
Abstract
-
Cited by 12 (1 self)
- Add to MetaCart
ML's exception handling makes it possible to describe exceptional execution ows conveniently, but it also forms a performance bottleneck.
Call-by-need and Continuation-passing Style
- Lisp and Symbolic Computation
, 1993
"... . This paper examines the transformation of call-by-need terms into continuation -passing style (CPS). It begins by presenting a simple transformation of call-by-need terms into program graphs and a reducer for such graphs. From this, an informal derivation is carried out, resulting in a translat ..."
Abstract
-
Cited by 12 (0 self)
- Add to MetaCart
. This paper examines the transformation of call-by-need terms into continuation -passing style (CPS). It begins by presenting a simple transformation of call-by-need terms into program graphs and a reducer for such graphs. From this, an informal derivation is carried out, resulting in a translation from terms into self-reducing program graphs, where the graphs are represented as CPS terms involving storage operations. Though informal, the derivation proceeds in simple steps, and the resulting translation is taken to be our canonical CPS transformation for call-by-need terms. In order to define the CPS transformation more formally, two alternative presentations are given. The first takes the form of a continuation semantics for the call-by-need language. The second presentation follows Danvy and Hatcliff 's two-stage decomposition of the call-by-name CPS transformation, resulting in a similar two-stage CPS transformation for call-by-need. Finally, a number of practical matters are...
Monadic Type Systems: Pure Type Systems for Impure Settings (Preliminary Report)
- In Proceedings of the Second HOOTS Workshop
, 1997
"... Pure type systems and computational monads are two parameterized frameworks that have proved to be quite useful in both theoretical and practical applications. We join the foundational concepts of both of these to obtain monadic type systems. Essentially, monadic type systems inherit the parameteriz ..."
Abstract
-
Cited by 8 (2 self)
- Add to MetaCart
Pure type systems and computational monads are two parameterized frameworks that have proved to be quite useful in both theoretical and practical applications. We join the foundational concepts of both of these to obtain monadic type systems. Essentially, monadic type systems inherit the parameterized higher-order type structure of pure type systems and the monadic term and type structure used to capture computational effects in the theory of computational monads. We demonstrate that monadic type systems nicely characterize previous work and suggest how they can support several new theoretical and practical applications. A technical foundation for monadic type systems is laid by recasting and scaling up the main results from pure type systems (confluence, subject reduction, strong normalisation for particular classes of systems, etc.) and from operational presentations of computational monads (notions of operational equivalence based on applicative similarity, co-induction proof techni...
Derivation of Static Analysers of Functional Programs From Path Properties of a Natural Semantics
, 1995
"... : We advocate the use of operational semantics as a basis for specifying program analyses for functional languages. We put forward a methodology for defining a static analysis by successive refinements of the natural semantics of the language. We use paths as the abstract representation of proof tre ..."
Abstract
-
Cited by 7 (2 self)
- Add to MetaCart
: We advocate the use of operational semantics as a basis for specifying program analyses for functional languages. We put forward a methodology for defining a static analysis by successive refinements of the natural semantics of the language. We use paths as the abstract representation of proof trees and we provide a language for defining properties in terms of recurrence equations on paths. We show the specification of several standard properties on paths (neededness, absence, uniqueness, : : : ) and the mechanical derivation of the corresponding analyses. Key-words: functional languages, operational semantics, neededness analysis, paths analysis, optimising compilers. (R'esum'e : tsvp) gouranto@irisa.fr lemetaye@irisa.fr Unite de recherche INRIA Rennes IRISA, Campus universitaire de Beaulieu, 35042 RENNES Cedex (France) Telephone : (33) 99 84 71 00 -- Telecopie : (33) 99 84 71 D'erivation d'analyseurs de programmes fonctionnels `a partir de propri'et'es de chemin d'une s'ema...

