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 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
Weak updates and separation logic
"... Separation logic provides a simple but powerful technique for reasoning about lowlevel imperative programs that use shared data structures. Unfortunately, separation logic supports only “strong updates”, in which mutation to a heap location is safe only if a unique reference is owned. This limits t ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Separation logic provides a simple but powerful technique for reasoning about lowlevel imperative programs that use shared data structures. Unfortunately, separation logic supports only “strong updates”, in which mutation to a heap location is safe only if a unique reference is owned. This limits the applicability of separation logic when reasoning about the interaction between many highlevel languages (e.g., ML, Java, C#) and lowlevel ones since the highlevel languages do not support strong updates. Instead, they adopt the discipline of “weak updates”, in which there is a global “heap type ” to enforce the invariant of typepreserving heap updates. We present SL w, a logic that extends separation logic with reference types and elegantly reasons about the interaction between strong and weak updates. We describe a semantic framework for reference types, which is used to prove the soundness of SL w. Finally, we show how to extend SL w with concurrency.