Results 1  10
of
13
Improvement in a Lazy Context: An Operational Theory for CallByNeed
 Proc. POPL'99, ACM
, 1999
"... Machine The semantics presented in this section is essentially Sestoft's \mark 1" abstract machine for laziness [Sestoft 1997]. In that paper, he proves his abstract machine 6 A. K. Moran and D. Sands h fx = Mg; x; S i ! h ; M; #x : S i (Lookup) h ; V; #x : S i ! h fx = V g; V; S i (Up ..."
Abstract

Cited by 41 (7 self)
 Add to MetaCart
Machine The semantics presented in this section is essentially Sestoft's \mark 1" abstract machine for laziness [Sestoft 1997]. In that paper, he proves his abstract machine 6 A. K. Moran and D. Sands h fx = Mg; x; S i ! h ; M; #x : S i (Lookup) h ; V; #x : S i ! h fx = V g; V; S i (Update) h ; M x; S i ! h ; M; x : S i (Unwind) h ; x:M; y : S i ! h ; M [ y = x ]; S i (Subst) h ; case M of alts ; S i ! h ; M; alts : S i (Case) h ; c j ~y; fc i ~x i N i g : S i ! h ; N j [ ~y = ~x j ]; S i (Branch) h ; let f~x = ~ Mg in N; S i ! h f~x = ~ Mg; N; S i ~x dom(;S) (Letrec) Fig. 1. The abstract machine semantics for callbyneed. semantics sound and complete with respect to Launchbury's natural semantics, and we will not repeat those proofs here. Transitions are over congurations consisting of a heap, containing bindings, the expression currently being evaluated, and a stack. The heap is a partial function from variables to terms, and denoted in an identical manner to a coll...
Erratic Fudgets: A Semantic Theory for an Embedded Coordination Language
 SCIENCE OF COMPUTER PROGRAMMING
, 2003
"... The powerful abstraction mechanisms of functional programming languages provide the means to develop domainspecific programming languages within the language itself. Typically, this is realised by designing a set of combinators (higherorder reusable programs) for an application area, and by constr ..."
Abstract

Cited by 21 (3 self)
 Add to MetaCart
The powerful abstraction mechanisms of functional programming languages provide the means to develop domainspecific programming languages within the language itself. Typically, this is realised by designing a set of combinators (higherorder reusable programs) for an application area, and by constructing individual applications by combining and coordinating individual combinators. This paper is concerned with a successful example of such an embedded programming language, namely Fudgets, a library of combinators for building graphical user interfaces in the lazy functional language Haskell. The Fudget library has been used to build a number of substantial applications, including a web browser and a proof editor interface to a proof checker for constructive type theory. This paper develops a semantic theory for the nondeterministic stream processors that are at the heart of the Fudget concept. The interaction of two features of stream processors makes the development of such a semantic theory problematic: (i) the sharing of computation provided by the lazy evaluation mechanism of the underlying host language, and (ii) the addition of nondeterministic choice needed to handle the natural concurrency that reactive applications entail We demonstrate that this combination of features in a higherorder functional language can be tamed to provide a tractable semantic theory and induction principles suitable for reasoning about contextual equivalence of Fudgets.
Imprecise Exceptions, CoInductively
"... In a recent paper, Peyton Jones et al. proposed a design for imprecise exceptions in the lazy functional programming language Haskell [PJRH + 99]. The main contribution of the design was that it allowed the language to continue to enjoy its current rich algebra of transformations. However, the den ..."
Abstract

Cited by 8 (2 self)
 Add to MetaCart
In a recent paper, Peyton Jones et al. proposed a design for imprecise exceptions in the lazy functional programming language Haskell [PJRH + 99]. The main contribution of the design was that it allowed the language to continue to enjoy its current rich algebra of transformations. However, the denotational semantics used to formalise the design does not combine easily with other extensions, most notably that of concurrency. We present an alternative semantics for a lazy functional language with imprecise exceptions which is entirely operational in nature, and combines well with other extensions, such as I/O and concurrency. The semantics is based upon a convergence relation, which describes evaluation, and an exceptional convergence relation, which describes the raising of exceptions. Convergence and exceptional convergence lead naturally to a simple notion of renement, where a term M is re ned by N whenever they have identical convergent behaviour, and any exception raised by N c...
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 7 (0 self)
 Add to MetaCart
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.
Correctness of Copy in Calculi with Letrec,
, 2007
"... Abstract. This paper extends the internal frank report 28 as follows: It is shown that for a callbyneed lambda calculus LRCCPλ extending the calculus LRCCλ by por, i.e in a lambdacalculus with letrec, case, constructors, seq and por, copying can be done without restrictions, and also that callby ..."
Abstract

Cited by 5 (3 self)
 Add to MetaCart
Abstract. This paper extends the internal frank report 28 as follows: It is shown that for a callbyneed lambda calculus LRCCPλ extending the calculus LRCCλ by por, i.e in a lambdacalculus with letrec, case, constructors, seq and por, copying can be done without restrictions, and also that callbyneed and callbyname strategies are equivalent w.r.t. contextual equivalence. 1
Equivalence of callbyname and callbyneed for lambdacalculi with letrec
, 2007
"... We develop a proof method to show that in a (deterministic) lambda calculus with letrec and equipped with contextual equivalence the callbyname and the callbyneed evaluation are equivalent, and also that the unrestricted copyoperation is correct. Given a letbinding x = t, the copyoperation re ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
We develop a proof method to show that in a (deterministic) lambda calculus with letrec and equipped with contextual equivalence the callbyname and the callbyneed evaluation are equivalent, and also that the unrestricted copyoperation is correct. Given a letbinding x = t, the copyoperation replaces an occurrence of the variable x by the expression t, regardless of the form of t. This gives an answer to unresolved problems in several papers, it adds a strong method to the tool set for reasoning about contextual equivalence in higherorder calculi with letrec, and it enables a class of transformations that can be used as optimizations. The method can be used in different kind of lambda calculi with cyclic sharing. Probably it can also be used in nondeterministic lambda calculi if the variable x is “deterministic”, i.e., has no interference with nondeterministic executions. The main technical idea is to use a restricted variant of the infinitary lambdacalculus, whose objects are the expressions that are unrolled w.r.t. let, to define the infinite developments as a reduction calculus on the infinite trees and showing a standardization theorem.
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 2 (1 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
Correctness of copy in calculi with letrec, case and constructors
, 2007
"... Callbyneed lambda calculi with letrec provide a rewritingbased operational semantics for (lazy) callbyname functional languages. These calculi model the sharing behavior during evaluation more closely than letbased calculi that use a fixpoint combinator. In a previous paper we showed that the ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Callbyneed lambda calculi with letrec provide a rewritingbased operational semantics for (lazy) callbyname functional languages. These calculi model the sharing behavior during evaluation more closely than letbased calculi that use a fixpoint combinator. In a previous paper we showed that the copytransformation is correct for the small calculus LRλ. In this paper we demonstrate that the proof method based on a calculus on infinite trees for showing correctness of instantiation operations can be extended to the calculus LRCCλ with case and constructors, and show that copying at compiletime can be done without restrictions. We also show that the callbyneed and callbyname strategies are equivalent w.r.t. contextual equivalence. A consequence is correctness of all the transformations like instantiation, inlining, specialization and common subexpression elimination in LRCCλ. We are confident that the method scales up for proving correctness of copyrelated transformations in nondeterministic lambda calculi if restricted to “deterministic” subterms.
Program transformation for functional circuit descriptions
, 2007
"... We model sequential synchronous circuits on the logical level by signalprocessing programs in an extended lambda calculus Lpor with letrec, constructors, case and parallel or (por) employing contextual equivalence. The model describes gates as (parallel) boolean operators, memory using a delay, whi ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
We model sequential synchronous circuits on the logical level by signalprocessing programs in an extended lambda calculus Lpor with letrec, constructors, case and parallel or (por) employing contextual equivalence. The model describes gates as (parallel) boolean operators, memory using a delay, which in turn is modeled as a shift of the list of signals, and permits also constructive cycles due to the parallel or. It opens the possibility of a large set of program transformations that correctly transform the expressions and thus the represented circuits and provides basic tools for equivalence testing and optimizing circuits. A further application is the correct manipulation by transformations of software components combined with circuits. The main part of our work are proof methods for correct transformations of expressions in the lambda calculus Lpor, and to propose the appropriate program transformations.