Results 1 
7 of
7
Computational types from a logical perspective
 Journal of Functional Programming
, 1998
"... Moggi’s computational lambda calculus is a metalanguage for denotational semantics which arose from the observation that many different notions of computation have the categorical structure of a strong monad on a cartesian closed category. In this paper we show that the computational lambda calculus ..."
Abstract

Cited by 54 (6 self)
 Add to MetaCart
Moggi’s computational lambda calculus is a metalanguage for denotational semantics which arose from the observation that many different notions of computation have the categorical structure of a strong monad on a cartesian closed category. In this paper we show that the computational lambda calculus also arises naturally as the term calculus corresponding (by the CurryHoward correspondence) to a novel intuitionistic modal propositional logic. We give natural deduction, sequent calculus and Hilbertstyle presentations of this logic and prove strong normalisation and confluence results. 1
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 encapsulation co ..."
Abstract

Cited by 28 (4 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
What is a Purely Functional Language?
 Journal of Functional Programming
, 1998
"... Functional programming languages are informally classified into pure and impure languages. The precise meaning of this distinction has been a matter of controversy. We therefore investigate a formal definition of purity. We begin by showing that some proposed definitions that rely on confluence, sou ..."
Abstract

Cited by 14 (6 self)
 Add to MetaCart
Functional programming languages are informally classified into pure and impure languages. The precise meaning of this distinction has been a matter of controversy. We therefore investigate a formal definition of purity. We begin by showing that some proposed definitions that rely on confluence, soundness of the beta axiom, preservation of pure observational equivalences, and independence of the order of evaluation, do not withstand close scrutiny. We propose instead a definition based on parameterpassing independence. Intuitively, the definition implies that functions are pure mappings from arguments to results; the operational decision of how to pass the arguments is irrelevant. In the context of Haskell, our definition is consistent with the fact that the traditional callbyname denotational semantics coincides with the traditional callbyneed implementation. Furthermore, our definition is compatible with the streambased, continuationbased, and monadbased integration of computa...
Fully Persistent Arrays for Efficient Incremental Updates and Voluminous Reads
 4th European Symposium on Programming
, 1992
"... The array update problem in a purely functional language is the following: once an array is updated, both the original array and the newly updated one must be preserved to maintain referential transparency. We devise a very simple, fully persistent data structure to tackle this problem such that ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
The array update problem in a purely functional language is the following: once an array is updated, both the original array and the newly updated one must be preserved to maintain referential transparency. We devise a very simple, fully persistent data structure to tackle this problem such that ffl each incremental update costs O(1) worstcase time, ffl a voluminous sequence of r reads cost in total O(r) amortized time, and ffl the data structure use O(n + u) space, where n is the size of the array and u is the total number of updates. A sequence of r reads is voluminous if r is \Omega\Gamma n) and the sequence of arrays being read forms a path of length O(r) in the version tree. A voluminous sequence of reads may be mixed with updates without affecting either the performance of reads or updates. An immediate consequence of the above result is that if a functional program is singlethreaded, then the data structure provides a simple and efficient implementation of funct...
Note on Algol and Conservatively Extending Functional Programming
, 1995
"... A simple Idealized Algol is considered, based on Reynolds's "essence of Algol." It is shown that observational equivalence in this language conservatively extends observational equivalence in its assignmentfree functional sublanguage. 1 Introduction In "The essence of Algol," Reynolds (1981) prese ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
A simple Idealized Algol is considered, based on Reynolds's "essence of Algol." It is shown that observational equivalence in this language conservatively extends observational equivalence in its assignmentfree functional sublanguage. 1 Introduction In "The essence of Algol," Reynolds (1981) presents a view of Algol as a callbyname language based on the typed calculus, with "imperative" primitive types. A central feature of the design is the interaction between assignment and procedures. Side effects are wholly isolated in a primitive type comm of commands, and do not occur when computing a value of functional type. That is to say, side effects in procedures are latent, in the sense that an effect occurs only by evaluating a procedure call as a term of type comm. As a result, function types retain a genuine "functional character." For instance, the full fi and j laws are valid equivalences in Algollike languages. This functional aspect of Algol has been emphasized strongly by Reyn...
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
Deriving Monad Transformers
, 1999
"... In a paper about pretty printing J. Hughes introduced two fundamental techniques for deriving programs from their specification, where a specification consists of a signature and properties that the operations of the signature are required to satisfy. Very briefly, the first technique, the term impl ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
In a paper about pretty printing J. Hughes introduced two fundamental techniques for deriving programs from their specification, where a specification consists of a signature and properties that the operations of the signature are required to satisfy. Very briefly, the first technique, the term implementation, represents the operations by terms and works by defining a mapping from operations to observations  this mapping can be seen as defining a simple interpreter. The second, the contextpassing implementation, represents operations as functions from their calling context to observations. We apply both techniques to derive among others a backtracking monad transformer which adds backtracking to an arbitrary monad. In addition to the usual backtracking operations  failure and nondeterministic choice  the prolog cut and an operation for delimiting the effect of a cut are supported. 1 Introduction Why should one derive a program from its specification? Ideally, a derivation ex...