Results 1  10
of
18
A transformationbased optimiser for Haskell
, 1998
"... Many compilers do some of their work by means of correctnesspreserving, and hopefully performanceimproving, program transformations. The Glasgow Haskell Compiler (GHC) takes this idea of "compilation by transformation" as its warcry, trying to express as much as possible of the compilat ..."
Abstract

Cited by 87 (12 self)
 Add to MetaCart
Many compilers do some of their work by means of correctnesspreserving, and hopefully performanceimproving, program transformations. The Glasgow Haskell Compiler (GHC) takes this idea of "compilation by transformation" as its warcry, trying to express as much as possible of the compilation process in the form of program transformations. This paper reports on our practical experience of the transformational approach to compilation, in the context of a substantial compiler.
Compiling Haskell by program transformation: a report from the trenches
 In Proc. European Symp. on Programming
, 1996
"... Many compilers do some of their work by means of correctnesspreserving, and hopefully performanceimproving, program transformations. The Glasgow Haskell Compiler (GHC) takes this idea of "compilation by transformation" as its warcry, trying to express as much as possible of the compilat ..."
Abstract

Cited by 65 (4 self)
 Add to MetaCart
Many compilers do some of their work by means of correctnesspreserving, and hopefully performanceimproving, program transformations. The Glasgow Haskell Compiler (GHC) takes this idea of "compilation by transformation" as its warcry, trying to express as much as possible of the compilation process in the form of program transformations. This paper reports on our practical experience of the transformational approach to compilation, in the context of a substantial compiler. The paper appears in the Proceedings of the European Symposium on Programming, Linkoping, April 1996. 1 Introduction Using correctnesspreserving transformations as a compiler optimisation is a wellestablished technique (Aho, Sethi & Ullman [1986]; Bacon, Graham & Sharp [1994]). In the functional programming area especially, the idea of compilation by transformation has received quite a bit of attention (Appel [1992]; Fradet & Metayer [1991]; Kelsey [1989]; Kelsey & Hudak [1989]; Kranz [1988]; Steele [1978]). A ...
Monadic Encapsulation of Effects: A Revised Approach (Extended Version)
 Journal of Functional Programming
, 1999
"... Launchbury and Peyton Jones came up with an ingenious idea for embedding regions of imperative programming in a pure functional language like Haskell. The key idea was based on a simple modification of HindleyMilner's type system. Our first contribution is to propose a more natural encapsulati ..."
Abstract

Cited by 30 (5 self)
 Add to MetaCart
Launchbury and Peyton Jones came up with an ingenious idea for embedding regions of imperative programming in a pure functional language like Haskell. The key idea was based on a simple modification of HindleyMilner's type system. Our first contribution is to propose a more natural encapsulation construct exploiting higherorder kinds, which achieves the same encapsulation effect, but avoids the ad hoc type parameter of the original proposal. The second contribution is a type safety result for encapsulation of strict state using both the original encapsulation construct and the newly introduced one. We establish this result in a more expressive context than the original proposal, namely in the context of the higherorder lambdacalculus. The third contribution is a type safety result for encapsulation of lazy state in the higherorder lambdacalculus. This result resolves an outstanding open problem on which previous proof attempts failed. In all cases, we formalize the intended implementations as simple bigstep operational semantics on untyped terms, which capture interesting implementation details not captured by the reduction semantics proposed previously. 1
Imperative functional programming with isabelle/hol
 In TPHOLs ’08: Proceedings of the 21st International Conference on Theorem Proving in Higher Order Logics
, 2008
"... Abstract. We introduce a lightweight approach for reasoning about programs involving imperative data structures using the proof assistant Isabelle/HOL. It is based on shallow embedding of programs, a polymorphic heap model using enumeration encodings and type classes, and a stateexception monad sim ..."
Abstract

Cited by 17 (3 self)
 Add to MetaCart
(Show Context)
Abstract. We introduce a lightweight approach for reasoning about programs involving imperative data structures using the proof assistant Isabelle/HOL. It is based on shallow embedding of programs, a polymorphic heap model using enumeration encodings and type classes, and a stateexception monad similar to known counterparts from Haskell. Existing proof automation tools are easily adapted to provide a verification environment. The framework immediately allows for correct code generation to ML and Haskell. Two case studies demonstrate our approach: An arraybased checker for resolution proofs, and a more efficient bytecode verifier. 1
Fusion of recursive programs with computational effects
 Theoretical Computer Science
"... ..."
(Show Context)
Plogic: property verification for Haskell programs
, 2002
"... Proofsupported logical verification of program properties has been a topic of research interest for more than 30 years. The feasibility of proof construction as a verification technique has been demonstrated through many examples of its application, yet it remains a technique rarely used in prac ..."
Abstract

Cited by 10 (1 self)
 Add to MetaCart
Proofsupported logical verification of program properties has been a topic of research interest for more than 30 years. The feasibility of proof construction as a verification technique has been demonstrated through many examples of its application, yet it remains a technique rarely used in practice for a variety of reasons, both technical and sociological. The lack of verification logics for modern programming languages remains a strong deterrent to the use of proofsupported verification.
Towards Merging Recursion and Comonads
, 2000
"... Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold op ..."
Abstract

Cited by 9 (2 self)
 Add to MetaCart
Comonads are mathematical structures that account naturally for effects that derive from the context in which a program is executed. This paper reports ongoing work on the interaction between recursion and comonads. Two applications are shown that naturally lead to versions of a comonadic fold operator on the product comonad. Both versions capture functions that require extra arguments for their computation and are related with the notion of strong datatype. 1 Introduction One of the main features of recursive operators derivable from datatype definitions is that they impose a structure upon programs which can be exploited for program transformation. Recursive operators structure functional programs according to the data structures they traverse or generate and come equipped with a battery of algebraic laws, also derivable from type definitions, which are used in program calculations [24, 11, 5, 15]. Some of these laws, the socalled fusion laws, are particularly interesting in p...
Monadic Corecursion  Definition, Fusion Laws, and Applications
 Electronic Notes in Theoretical Computer Science
, 1998
"... This paper investigates corecursive definitions which are at the same time monadic. This corresponds to functions that generate a data structure following a corecursive process, while producing a computational effect modeled by a monad. We introduce a functional, called monadic anamorphism, that cap ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
(Show Context)
This paper investigates corecursive definitions which are at the same time monadic. This corresponds to functions that generate a data structure following a corecursive process, while producing a computational effect modeled by a monad. We introduce a functional, called monadic anamorphism, that captures definitions of this kind. We also explore another class of monadic recursive functions, corresponding to the composition of a monadic anamorphism followed by (the lifting of) a function defined by structural recursion on the data structure that the monadic anamorphism generates. Such kind of functions are captured by socalled monadic hylomorphism. We present transformation laws for these monadic functionals. Two nontrivial applications are also described.
The Brisk Project: Concurrent and Distributed Functional Systems
 In Glasgow Functional Programming Workshop, Ullapool
, 1995
"... ©Copyright in this paper belongs to the author(s) Published in collaboration with the ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
(Show Context)
©Copyright in this paper belongs to the author(s) Published in collaboration with the
Efficient monadicstyle backtracking
, 1996
"... Lists are ubiquitous in functional programming. The list constructor forms an instance of a monad capturing nondeterministic computations. Despite its popularity the list monad suffers from serious drawbacks: It relies in an essential way on lazy evaluation, it is inefficient, and it is not modular ..."
Abstract

Cited by 3 (2 self)
 Add to MetaCart
Lists are ubiquitous in functional programming. The list constructor forms an instance of a monad capturing nondeterministic computations. Despite its popularity the list monad suffers from serious drawbacks: It relies in an essential way on lazy evaluation, it is inefficient, and it is not modular. We develop an alternative based on continuations, which remedies these shortcomings. Essential use is made of constructor classes and secondorder types, which sets the work apart from other approaches. Continuationbased backtracking monads behave amazingly well in practice: If an optimizing compiler is used, their performance is commensurate to that of logic languages. The class mechanism greatly eases the task of adding features to the basic machinery. We study three extensions in detail: control