Results 1  10
of
13
A Natural Semantics for Lazy Evaluation
, 1993
"... We define an operational semantics for lazy evaluation which provides an accurate model for sharing. The only computational structure we introduce is a set of bindings which corresponds closely to a heap. The semantics is set at a considerably higher level of abstraction than operational semantics f ..."
Abstract

Cited by 196 (3 self)
 Add to MetaCart
We define an operational semantics for lazy evaluation which provides an accurate model for sharing. The only computational structure we introduce is a set of bindings which corresponds closely to a heap. The semantics is set at a considerably higher level of abstraction than operational semantics for particular abstract machines, so is more suitable for a variety of proofs. Furthermore, because a heap is explicitly modelled, the semantics provides a suitable framework for studies about space behaviour of terms under lazy evaluation.
The CallbyNeed Lambda Calculus
 Journal of Functional Programming
, 1994
"... We present a calculus that captures the operational semantics of callbyneed. The callbyneed lambda calculus is confluent, has a notion of standard reduction, and entails the same observational equivalence relation as the callbyname calculus. The system can be formulated with or without explici ..."
Abstract

Cited by 45 (2 self)
 Add to MetaCart
We present a calculus that captures the operational semantics of callbyneed. The callbyneed lambda calculus is confluent, has a notion of standard reduction, and entails the same observational equivalence relation as the callbyname calculus. The system can be formulated with or without explicit let bindings, admits useful notions of marking and developments, and has a straightforward operational interpretation. Introduction The correspondence between callbyvalue lambda calculi and strict functional languages (such as the pure subset of Standard ML) is quite good; the correspondence between callby name lambda calculi and lazy functional languages (such as Miranda or Haskell) is not so good. Callbyname reevaluates an argument each time it is used, a prohibitive expense. Thus, many lazy languages are implemented using the callbyneed mechanism proposed by Wadsworth (1971), which overwrites an argument with its value the first time it is evaluated, avoiding the need for any s...
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 43 (8 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...
A Functional Correspondence between CallbyNeed Evaluators and Lazy Abstract Machines
, 2004
"... ..."
Callbyneed and Continuationpassing Style
 Lisp and Symbolic Computation
, 1993
"... . This paper examines the transformation of callbyneed terms into continuation passing style (CPS). It begins by presenting a simple transformation of callbyneed terms into program graphs and a reducer for such graphs. From this, an informal derivation is carried out, resulting in a translat ..."
Abstract

Cited by 18 (0 self)
 Add to MetaCart
(Show Context)
. This paper examines the transformation of callbyneed terms into continuation passing style (CPS). It begins by presenting a simple transformation of callbyneed terms into program graphs and a reducer for such graphs. From this, an informal derivation is carried out, resulting in a translation from terms into selfreducing program graphs, where the graphs are represented as CPS terms involving storage operations. Though informal, the derivation proceeds in simple steps, and the resulting translation is taken to be our canonical CPS transformation for callbyneed terms. In order to define the CPS transformation more formally, two alternative presentations are given. The first takes the form of a continuation semantics for the callbyneed language. The second presentation follows Danvy and Hatcliff 's twostage decomposition of the callbyname CPS transformation, resulting in a similar twostage CPS transformation for callbyneed. Finally, a number of practical matters are...
AnswerSet Programming with Bounded Treewidth
, 2009
"... In this paper, we present a novel approach to the evaluation of propositional answerset programs. In particular, for programs with bounded treewidth, our algorithm is capable of (i) computing the number of answer sets in linear time and (ii) enumerating all answer sets with linear delay. Our algori ..."
Abstract

Cited by 4 (3 self)
 Add to MetaCart
In this paper, we present a novel approach to the evaluation of propositional answerset programs. In particular, for programs with bounded treewidth, our algorithm is capable of (i) computing the number of answer sets in linear time and (ii) enumerating all answer sets with linear delay. Our algorithm relies on dynamic programming. Therefore, our approach significantly differs from standard ASP systems which implement techniques stemming from SAT or CSP, and thus usually do not exploit fixed parameter properties of the programs. We provide first experimental results which underline that, for programs with low treewidth, even a prototypical implementation is competitive compared to stateoftheart systems.
The CallbyNeed Lambda Calculus (Unabridged)
, 1994
"... We present a calculus that captures the operational semantics of callbyneed. We demonstrate that the calculus is confluent and standardizable and entails the same observational equivalences as callbyname lambda calculus. 1 Introduction Procedure calls come in three styles: callbyvalue, callb ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
We present a calculus that captures the operational semantics of callbyneed. We demonstrate that the calculus is confluent and standardizable and entails the same observational equivalences as callbyname lambda calculus. 1 Introduction Procedure calls come in three styles: callbyvalue, callbyname and callbyneed. The first two of these possess elegant models in the form of corresponding lambda calculi. This paper shows that the third may be equipped with a similar model. The correspondence between callbyvalue lambda calculi and strict functional languages (such as the pure subset of Standard ML) is quite good. The callbyvalue mechanism of evaluating an argument in advance is well suited for practical use. The correspondence between callbyname lambda calculi and lazy functional languages (such as Miranda or Haskell) is not so good. Callbyname reevaluates an argument each time it is used, which is prohibitively expensive. So lazy languages are implemented using the cal...
The Callbyneed Lambda Calculus, Revisited
"... Abstract. The existing callbyneed λ calculi describe lazy evaluation via equational logics. A programmer can use these logics to safely ascertain whether one term is behaviorally equivalent to another or to determine the value of a lazy program. However, neither of the existing calculi models eval ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
Abstract. The existing callbyneed λ calculi describe lazy evaluation via equational logics. A programmer can use these logics to safely ascertain whether one term is behaviorally equivalent to another or to determine the value of a lazy program. However, neither of the existing calculi models evaluation in a way that matches lazy implementations. Both calculi suffer from the same two problems. First, the calculi never discard function calls, even after they are completely resolved. Second, the calculi include reassociation axioms even though these axioms are merely administrative steps with no counterpart in any implementation. In this paper, we present an alternative axiomatization of lazy evaluation using a single axiom. It eliminates both the function call retention problem and the extraneous reassociation axioms. Our axiom uses a grammar of contexts to describe the exact notion of a needed computation. Like its predecessors, our new calculus satisfies consistency and standardization properties and is thus suitable for reasoning about behavioral equivalence. In addition, we establish a correspondence between our semantics and Launchbury’s natural semantics.
© 2007 Science Publications Operational Semantics for Lazy Evaluation
"... Abstract: An operational semantics for lazy evaluation of a calculus without higher order functions was defined. Although it optimizes many aspects of implementation, e.g. there is a sharing in the recursive computation, there is no conversion, the heap is automatically reclaimed, and an attempt to ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract: An operational semantics for lazy evaluation of a calculus without higher order functions was defined. Although it optimizes many aspects of implementation, e.g. there is a sharing in the recursive computation, there is no conversion, the heap is automatically reclaimed, and an attempt to evaluate an argument is done at most once. It is still suitable for reasoning about program behavior and proofs of program correctness; this is primarily due to the definition via inferences and axioms which allows for proofs by induction on the height of the proof tree. We also proved the correctness of this operational semantics by showing that it is equivalent with respect to the values calculated to the operational semantics of LAZYPCF+SHAR due to S. Purushothaman Iyer and Jill Seaman.