Results 1 
9 of
9
A callbyneed lambdacalculus with locally bottomavoiding choice: Context lemma and correctness of transformations
 MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE
, 2008
"... We present a higherorder callbyneed lambda calculus enriched with constructors, caseexpressions, recursive letrecexpressions, a seqoperator for sequential evaluation and a nondeterministic operator amb that is locally bottomavoiding. We use a smallstep operational semantics in form of a sin ..."
Abstract

Cited by 14 (9 self)
 Add to MetaCart
We present a higherorder callbyneed lambda calculus enriched with constructors, caseexpressions, recursive letrecexpressions, a seqoperator for sequential evaluation and a nondeterministic operator amb that is locally bottomavoiding. We use a smallstep operational semantics in form of a singlestep rewriting system that defines a (nondeterministic) normal order reduction. This strategy can be made fair by adding resources for bookkeeping. As equational theory we use contextual equivalence, i.e. terms are equal if plugged into any program context their termination behaviour is the same, where we use a combination of may as well as mustconvergence, which is appropriate for nondeterministic computations. We show that we can drop the fairness condition for equational reasoning, since the valid equations w.r.t. normal order reduction are the same as for fair normal order reduction. We evolve different proof tools for proving correctness of program transformations, in particular, a context lemma for may as well as mustconvergence is proved, which restricts the number of contexts that need to be examined for proving contextual equivalence. In combination with socalled complete sets of commuting and forking diagrams we show that
all the deterministic reduction rules and also some additional transformations preserve contextual equivalence.We also prove a standardisation theorem for fair normal order reduction. The structure of the ordering <= c is also analysed: Ω is not a least element, and <=c already implies contextual equivalence w.r.t. mayconvergence.
Adequacy of compositional translations for observational semantics
 INTERNATIONAL CONFERENCE ON THEORETICAL COMPUTER SCIENCE
, 2008
"... We investigate methods and tools for analyzing translations between programming languages with respect to observational semantics. The behavior of programs is observed in terms of may and mustconvergence in arbitrary contexts, and adequacy of translations, i.e., the reflection of program equivalenc ..."
Abstract

Cited by 9 (7 self)
 Add to MetaCart
We investigate methods and tools for analyzing translations between programming languages with respect to observational semantics. The behavior of programs is observed in terms of may and mustconvergence in arbitrary contexts, and adequacy of translations, i.e., the reflection of program equivalence, is taken to be the fundamental correctness condition. For compositional translations we propose a notion of convergence equivalence as a means for proving adequacy. This technique avoids explicit reasoning about contexts, and is able to deal with the subtle role of typing in implementations of language extensions.
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.
On Conservativity of Concurrent Haskell
, 2011
"... Abstract. The calculus CHF models Concurrent Haskell extended by concurrent, implicit futures. It is a process calculus with concurrent threads, monadic concurrent evaluation, and includes a pure functional lambdacalculus which comprises data constructors, caseexpressions, letrecexpressions, and ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
Abstract. The calculus CHF models Concurrent Haskell extended by concurrent, implicit futures. It is a process calculus with concurrent threads, monadic concurrent evaluation, and includes a pure functional lambdacalculus which comprises data constructors, caseexpressions, letrecexpressions, and Haskell’s seq. Futures can be implemented in Concurrent Haskell using the primitive unsafeInterleaveIO, which is available in most implementations of Haskell. Our main result is conservativity of CHF, that is, all equivalences of pure functional expressions are also valid in CHF. This implies that compiler optimizations and transformations from pure Haskell remain valid in Concurrent Haskell even if it is extended by futures. We also show that this is no longer valid if Concurrent Haskell is extended by the arbitrary use of unsafeInterleaveIO. 1
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 3 (1 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.
Contextual Equivalence in LambdaCalculi extended with letrec and with a Parametric Polymorphic Type System
, 2009
"... This paper describes a method to treat contextual equivalence in polymorphically typed lambdacalculi, and also how to transfer equivalences from the untyped versions of lambdacalculi to their typed variant, where our specific calculus has letrec, recursive types and is nondeterministic. An additio ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
This paper describes a method to treat contextual equivalence in polymorphically typed lambdacalculi, and also how to transfer equivalences from the untyped versions of lambdacalculi to their typed variant, where our specific calculus has letrec, recursive types and is nondeterministic. An addition of a type label to every subexpression is all that is needed, together with some natural constraints for the consistency of the type labels and wellscopedness of expressions. One result is that an elementary but typed notion of program transformation is obtained and that untyped contextual equivalences also hold in the typed calculus as long as the expressions are welltyped. In order to have a nice interaction between reduction and typing, some reduction rules have to be accompanied with a type modification by generalizing or instantiating types.
An Abstract Machine for Concurrent Haskell with Futures
, 2012
"... Abstract. We show how Sestoft’s abstract machine for lazy evaluation of purely functional programs can be extended to evaluate expressions of the calculus CHF – a process calculus that models Concurrent Haskell extended by imperative and implicit futures. The abstract machine is modularly constructe ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Abstract. We show how Sestoft’s abstract machine for lazy evaluation of purely functional programs can be extended to evaluate expressions of the calculus CHF – a process calculus that models Concurrent Haskell extended by imperative and implicit futures. The abstract machine is modularly constructed by first adding monadic IOactions to the machine and then in a second step we add concurrency. Our main result is that the abstract machine coincides with the original operational semantics of CHF, w.r.t. may and shouldconvergence. 1
On Correctness of Buffer Implementations in a Concurrent Lambda Calculus with Futures
, 2009
"... Abstract. Motivated by the question of correctness of a specific implementation of concurrent buffers in the lambda calculus with futures underlying Alice ML, we prove that concurrent buffers and handled futures can correctly encode each other. Correctness means that our encodings preserve and refle ..."
Abstract
 Add to MetaCart
Abstract. Motivated by the question of correctness of a specific implementation of concurrent buffers in the lambda calculus with futures underlying Alice ML, we prove that concurrent buffers and handled futures can correctly encode each other. Correctness means that our encodings preserve and reflect the observations of may and mustconvergence. This also shows correctness wrt. program semantics, since the encodings are adequate translations wrt. contextual semantics. While these translations encode blocking into queuing and waiting, we also provide an adequate encoding of buffers in a calculus without handles, which is more lowlevel and uses busywaiting instead of blocking. Furthermore we demonstrate that our correctness concept applies to the whole compilation process from highlevel to lowlevel concurrent languages, by translating the calculus with buffers, handled futures and data constructors into a small core language without those constructs. 1
Program Equivalence for a Concurrent Lambda Calculus with Futures
, 2006
"... Abstract. Reasoning about the correctness of program transformations requires a notion of program equivalence. We present an observational semantics for the concurrent lambda calculus with futures λ(fut), which formalizes the operational semantics of the programming language Alice ML. We show that n ..."
Abstract
 Add to MetaCart
Abstract. Reasoning about the correctness of program transformations requires a notion of program equivalence. We present an observational semantics for the concurrent lambda calculus with futures λ(fut), which formalizes the operational semantics of the programming language Alice ML. We show that natural program optimizations, as well as partial evaluation with respect to deterministic rules, are correct for λ(fut). This relies on a number of fundamental properties that we establish for our observational semantics. 1