Results 1  10
of
20
Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreignlanguage calls in Haskell
 Engineering theories of software construction
, 2001
"... Functional programming may be beautiful, but to write real applications we must grapple with awkward realworld issues: input/output, robustness, concurrency, and interfacing to programs written in other languages. These lecture notes give an overview of the techniques that have been developed by th ..."
Abstract

Cited by 113 (1 self)
 Add to MetaCart
(Show Context)
Functional programming may be beautiful, but to write real applications we must grapple with awkward realworld issues: input/output, robustness, concurrency, and interfacing to programs written in other languages. These lecture notes give an overview of the techniques that have been developed by the Haskell community to address these problems. I introduce various proposed extensions to Haskell along the way, and I offer an operational semantics that explains what these extensions mean. This tutorial was given at the Marktoberdorf Summer School 2000. It will appears in the book “Engineering theories of software construction, Marktoberdorf Summer School 2000”, ed CAR Hoare, M Broy, and R Steinbrueggen, NATO ASI Series, IOS Press, 2001, pp4796. This version has a few errors corrected compared with the published version. Change summary: Apr 2005: some examples added to Section 5.2.2, to clarifyevaluate. March 2002: substantial revision 1
Observable sharing for functional circuit description
 In Asian Computing Science Conference
, 1999
"... Pure functional programming languages have been proposed as a vehicle to describe, simulate and manipulate circuit specifications. We propose an extension to Haskell to solve a standard problem when manipulating data types representing circuits in a lazy functional language. The problem is that cir ..."
Abstract

Cited by 53 (3 self)
 Add to MetaCart
Pure functional programming languages have been proposed as a vehicle to describe, simulate and manipulate circuit specifications. We propose an extension to Haskell to solve a standard problem when manipulating data types representing circuits in a lazy functional language. The problem is that circuits are finite graphs  but viewing them as an algebraic (lazy) datatype makes them indistinguishable from potentially infinite regular trees. However, implementations of Haskell do indeed represent cyclic structures by graphs. The problem is that the sharing of nodes that creates such cycles is not observable by any function which traverses such a structure. In this paper we propose an extension to callbyneed languages which makes graph sharing observable. The extension is based on non updatable reference cells and an equality test (sharing detection) on this type. We show that this simple and practical extension has wellbehaved semantic properties, which means that many typical sourcetosource program transformations, such as might be performed by a compiler, are still valid in the presence of this extension.
Macros as multistage computations: Typesafe, generative, binding macros in MacroML
 IN MACROML. IN THE INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING (ICFP ’01
, 2001
"... ..."
Functional Nets
 IN PROC. EUROPEAN SYMPOSIUM ON PROGRAMMING, NUMBER 1782 IN LNCS
, 2000
"... Functional nets combine key ideas of functional programming and Petri nets to yield a simple and general programming notation. They ..."
Abstract

Cited by 39 (5 self)
 Add to MetaCart
Functional nets combine key ideas of functional programming and Petri nets to yield a simple and general programming notation. They
Monadic Regions
, 2004
"... Regionbased type systems provide programmer control over memory management without sacrificing typesafety. However, the type systems for regionbased languages, such as the MLKit or Cyclone, are relatively complicated, so proving their soundness is nontrivial. This paper shows that the complicati ..."
Abstract

Cited by 23 (2 self)
 Add to MetaCart
(Show Context)
Regionbased type systems provide programmer control over memory management without sacrificing typesafety. However, the type systems for regionbased languages, such as the MLKit or Cyclone, are relatively complicated, so proving their soundness is nontrivial. This paper shows that the complication is in principle unnecessary. In particular, we show that plain old parametric polymorphism, as found in Haskell, is all that is needed. We substantiate this claim by giving a type and meaningpreserving translation from a regionbased language based on core Cyclone to a monadic variant of System F with region primitives whose types and operations are inspired by (and generalize) the ST monad.
Witnessing sideeffects
 In Proceedings of the 10th ACM SIGPLAN International Conference on Functional Programming. ACM
, 2005
"... We present a new approach to the old problem of adding global mutable state to purely functional languages. Our idea is to extend the language with “witnesses, ” which is based on an arguably more pragmatic motivation than past approaches. We give a semantic condition for correctness and prove it is ..."
Abstract

Cited by 13 (5 self)
 Add to MetaCart
(Show Context)
We present a new approach to the old problem of adding global mutable state to purely functional languages. Our idea is to extend the language with “witnesses, ” which is based on an arguably more pragmatic motivation than past approaches. We give a semantic condition for correctness and prove it is sufficient. We also give a somewhat surprising static checking algorithm that makes use of a network flow property equivalent to the semantic condition via reduction to a satisfaction problem for a system of linear inequalities.
Monadic regions: Formal type soundness and correctness
, 2004
"... Drawing together two lines of research (that done in typesafe regionbased memory management and that done in monadic encapsuation of effects), we give a typepreserving translation from a variation of the region calculus of Tofte and Talpin into an extension of System F augmented with monadic type ..."
Abstract

Cited by 3 (3 self)
 Add to MetaCart
(Show Context)
Drawing together two lines of research (that done in typesafe regionbased memory management and that done in monadic encapsuation of effects), we give a typepreserving translation from a variation of the region calculus of Tofte and Talpin into an extension of System F augmented with monadic types and operations. Our source language is a novel region calculus, dubbed the Single Effect Calculus, in which sets of effects are specified by a single region representing an upper bound on the set. Our target language is F RGN, which provides an encapsulation operator whose parametric type ensures that regions (and values allocated therein) are neither accessible nor visible outside the appropriate scope. 1
Proof Abstraction for Imperative Languages
, 2003
"... Modularity in programming language semantics derives from abstracting over the structure of underlying denotations, yielding semantic descriptions that are more abstract and reusable. One such semantic framework is Liang’s modular monadic semantics in which the underlying semantic structure is encap ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Modularity in programming language semantics derives from abstracting over the structure of underlying denotations, yielding semantic descriptions that are more abstract and reusable. One such semantic framework is Liang’s modular monadic semantics in which the underlying semantic structure is encapsulated with a monad. Such abstraction can be at odds with program verification, however, because program specifications require access to the (deliberately) hidden semantic representation. The techniques for reasoning about modular monadic definitions of imperative programs introduced here overcome this barrier. And, just like program definitions in modular monadic semantics, our program specifications and proofs are representationindependent and hold for whole classes of monads, thereby yielding proofs of great generality.
A Programming Language for Probabilistic Computation
, 2005
"... As probabilistic computations play an increasing role in solving various problems, researchers have designed probabilistic languages to facilitate their modeling. Most of the existing probabilistic languages, however, focus only on discrete distributions, and there has been little effort to develop ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
As probabilistic computations play an increasing role in solving various problems, researchers have designed probabilistic languages to facilitate their modeling. Most of the existing probabilistic languages, however, focus only on discrete distributions, and there has been little effort to develop probabilistic languages whose expressive power is beyond discrete distributions. This dissertation presents a probabilistic language, called PTP (ProbabilisTic Programming), which supports all kinds of probability distributions.
Lazy modules
 UNDER CONSIDERATION FOR PUBLICATION IN J. FUNCTIONAL PROGRAMMING
, 2009
"... We investigate evaluation strategies for MLstyle modules supporting recursion. More precisely we propose and examine five evaluation strategies: a callbyvalue strategy and four callbyneed strategies with different degrees of laziness. We formalize the strategies by translating a source syntax f ..."
Abstract
 Add to MetaCart
We investigate evaluation strategies for MLstyle modules supporting recursion. More precisely we propose and examine five evaluation strategies: a callbyvalue strategy and four callbyneed strategies with different degrees of laziness. We formalize the strategies by translating a source syntax for modules into target languages, which are very much inspired by Felleisen and Hieb’s callbyvalue lambda calculus with state and Ariola and Felleisen’s callbyneed cyclic lambda calculus. Different strategies are expressed by tweaking the translation as well as the operational semantics of the target languages. We look at the strategies through a series of examples and state inclusion between the strategies.