Results 1 
2 of
2
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 29 (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
Under consideration for publication in J. Functional Programming 1 Types and Trace Effects of Higher Order Programs
"... This paper shows how type effect systems can be combined with modelchecking techniques to produce powerful, automatically verifiable program logics for higher order programs. The properties verified are based on the ordered sequence of events that occur during program execution, so called event tra ..."
Abstract
 Add to MetaCart
(Show Context)
This paper shows how type effect systems can be combined with modelchecking techniques to produce powerful, automatically verifiable program logics for higher order programs. The properties verified are based on the ordered sequence of events that occur during program execution, so called event traces. Our type and effect systems infer conservative approximations of the event traces arising at runtime, and modelchecking techniques are used to verify logical properties of these histories. Our language model is based on the λcalculus. Technical results include a type inference algorithm for a polymorphic type effect system, and a method for applying known modelchecking techniques to the trace effects inferred by the type inference algorithm, allowing static enforcement of historyand stackbased security mechanisms. A type safety result is proven for both unification and subtyping constraint versions of the type system, ensuring that statically welltyped programs do not contain trace event checks that can fail at runtime. 1