Results 1 
5 of
5
Monadic Encapsulation in ML
 In Proceedings of the 4th ACM SIGPLAN International Conference on Functional Programming (ICFP’99
, 1999
"... In a programming language with procedures and assignments, it is often important to isolate uses of state to particular program fragments. The frameworks of type, region, and effect inference, and monadic state are technologies that have been used to state and enforce the property that an expression ..."
Abstract

Cited by 16 (2 self)
 Add to MetaCart
(Show Context)
In a programming language with procedures and assignments, it is often important to isolate uses of state to particular program fragments. The frameworks of type, region, and effect inference, and monadic state are technologies that have been used to state and enforce the property that an expression has no visible sideeffects. This property has been exploited to justify the deallocation of memory regions despite the presence of dangling pointers. Starting from an idea developed in the context of monadic state in Haskell, we develop an MLlike language with full assignments and an operator that enforces the encapsulation of effects. Using this language, we formalize and prove the folklore connection between effect masking and monadic encapsulation. Then, by employing a novel set of reductions to deal with dangling pointers, we establish the soundness of the typebased encapsulation with a proof based on a standard subject reduction argument. 1 Introduction Two of the recurring theme...
A Contextual Semantics for Concurrent Haskell with Futures
, 2011
"... In this paper we analyze the semantics of a higherorder functional language with concurrent threads, monadic IO and synchronizing variables as in Concurrent Haskell. To assure declarativeness of concurrent programming we extend the language by implicit, monadic, and concurrent futures. As semanti ..."
Abstract

Cited by 8 (5 self)
 Add to MetaCart
In this paper we analyze the semantics of a higherorder functional language with concurrent threads, monadic IO and synchronizing variables as in Concurrent Haskell. To assure declarativeness of concurrent programming we extend the language by implicit, monadic, and concurrent futures. As semantic model we introduce and analyze the process calculus CHF, which represents a typed core language of Concurrent Haskell extended by concurrent futures. Evaluation in CHF is defined by a smallstep reduction relation. Using contextual equivalence based on may and shouldconvergence as program equivalence, we show that various transformations preserve program equivalence. We establish a context lemma easing those correctness proofs. An important result is that callbyneed and callbyname evaluation are equivalent in CHF, since they induce the same program equivalence. Finally we show that the monad laws hold in CHF under mild restrictions on Haskell’s seqoperator, which for instance justifies the use of the donotation.
FUNDIO: A LambdaCalculus with a letrec, case, Constructors, and an IOInterface: Approaching a Theory of unsafePerformIO. Frank report 16, Institut für
 Informatik, J.W. GoetheUniversität Frankfurt, September 2003. SSSS04. Manfred SchmidtSchauß, Marko Schütz, and
"... Abstract. A nondeterministic callbyneed lambdacalculus λndlr with case, constructors, letrec and a (nondeterministic) erratic choice, based on rewriting rules is investigated. A standard reduction is defined as a variant of leftmost outermost reduction. The semantics is defined by contextual e ..."
Abstract

Cited by 8 (0 self)
 Add to MetaCart
(Show Context)
Abstract. A nondeterministic callbyneed lambdacalculus λndlr with case, constructors, letrec and a (nondeterministic) erratic choice, based on rewriting rules is investigated. A standard reduction is defined as a variant of leftmost outermost reduction. The semantics is defined by contextual equivalence of expressions instead of using αβ(η)equivalence. It is shown that several program transformations are correct, for example all (deterministic) rules of the calculus, and in addition the rules for garbage collection, removing indirections and unique copy. This shows that the combination of a context lemma and a metarewriting on reductions using complete sets of commuting (forking, resp.) diagrams is a useful and successful method for providing a semantics of a functional programming language and proving correctness of program transformations. 1
On generic context lemmas for lambda calculi with sharing
, 2008
"... This paper proves several generic variants of context lemmas and thus contributes to improving the tools for observational semantics of deterministic and nondeterministic higherorder calculi that use a smallstep reduction semantics. The generic (sharing) context lemmas are provided for may as we ..."
Abstract

Cited by 5 (3 self)
 Add to MetaCart
This paper proves several generic variants of context lemmas and thus contributes to improving the tools for observational semantics of deterministic and nondeterministic higherorder calculi that use a smallstep reduction semantics. The generic (sharing) context lemmas are provided for may as well as two variants of mustconvergence, which hold in a broad class of extended process and extended lambda calculi, if the calculi satisfy certain natural conditions. As a guideline, the proofs of the context lemmas are valid in callbyneed calculi, in callbyvalue calculi if substitution is restricted to variablebyvariable and in process calculi like variants of the πcalculus. For calculi employing betareduction using a callbyname or callbyvalue strategy or similar reduction rules, some iuvariants of ciutheorems are obtained from our context lemmas. Our results reestablish several context lemmas already proved in the literature, and also provide some new context lemmas as well as some new variants of the ciutheorem. To make the results widely applicable, we use a higherorder abstract syntax that allows untyped calculi as well as certain simple typing schemes. The approach may lead to a unifying view of higherorder calculi, reduction, and observational equality.
Monadic and Substructural Type Systems for RegionBased Memory Management
 Cornell University
, 2007
"... Regionbased memory management is a scheme for managing dynamically allocated data. A defining characteristic of regionbased memory management is the bulk deallocation of data, which avoids both the tedium of malloc/free and the overheads of a garbage collector. Type systems for regionbased memory ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
Regionbased memory management is a scheme for managing dynamically allocated data. A defining characteristic of regionbased memory management is the bulk deallocation of data, which avoids both the tedium of malloc/free and the overheads of a garbage collector. Type systems for regionbased memory managment enhance the utility of this scheme by statically determining when a program is guaranteed to not perform any erroneous region operations. We describe three type systems for regionbased memory management: • a typeandeffect system (à la the TofteTalpin region calculus); • a novel monadic type system; • a novel substructural type system. We demonstrate how to successively encode the typeandeffect system into the monadic type system and the monadic type system into the substructural type system. These type systems and encodings support the argument that the typeandeffect systems that have traditionally been used to ensure the safety of regionbased memory management are neither the simplest nor the most expressive type