Results 1 - 10
of
11
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 169 (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 Call-by-Need Lambda Calculus
- Journal of Functional Programming
, 1994
"... We present a calculus that captures the operational semantics of call-by-need. The call-by-need lambda calculus is confluent, has a notion of standard reduction, and entails the same observational equivalence relation as the call-by-name calculus. The system can be formulated with or without explici ..."
Abstract
-
Cited by 36 (2 self)
- Add to MetaCart
We present a calculus that captures the operational semantics of call-by-need. The call-by-need lambda calculus is confluent, has a notion of standard reduction, and entails the same observational equivalence relation as the call-by-name 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 call-by-value 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. Call-by-name re-evaluates an argument each time it is used, a prohibitive expense. Thus, many lazy languages are implemented using the call-by-need mechanism proposed by Wadsworth (1971), which overwrites an argument with its value the first time it is evaluated, avoiding the need for any s...
A Functional Correspondence between Call-by-Need Evaluators and Lazy Abstract Machines
, 2004
"... ..."
Improvement in a Lazy Context: An Operational Theory for Call-By-Need
- 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 (Update) h ; ..."
Abstract
-
Cited by 31 (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 call-by-need. 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...
Call-by-need and Continuation-passing Style
- Lisp and Symbolic Computation
, 1993
"... . This paper examines the transformation of call-by-need terms into continuation -passing style (CPS). It begins by presenting a simple transformation of call-by-need 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 12 (0 self)
- Add to MetaCart
. This paper examines the transformation of call-by-need terms into continuation -passing style (CPS). It begins by presenting a simple transformation of call-by-need 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 self-reducing 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 call-by-need 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 call-by-need language. The second presentation follows Danvy and Hatcliff 's two-stage decomposition of the call-by-name CPS transformation, resulting in a similar two-stage CPS transformation for call-by-need. Finally, a number of practical matters are...
The Call-by-Need Lambda Calculus (Unabridged)
, 1994
"... We present a calculus that captures the operational semantics of call-by-need. We demonstrate that the calculus is confluent and standardizable and entails the same observational equivalences as call-by-name lambda calculus. 1 Introduction Procedure calls come in three styles: call-by-value, call-b ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
We present a calculus that captures the operational semantics of call-by-need. We demonstrate that the calculus is confluent and standardizable and entails the same observational equivalences as call-by-name lambda calculus. 1 Introduction Procedure calls come in three styles: call-by-value, call-by-name and call-by-need. 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 call-by-value lambda calculi and strict functional languages (such as the pure subset of Standard ML) is quite good. The call-by-value mechanism of evaluating an argument in advance is well suited for practical use. The correspondence between call-by-name lambda calculi and lazy functional languages (such as Miranda or Haskell) is not so good. Call-by-name re-evaluates an argument each time it is used, which is prohibitively expensive. So lazy languages are implemented using the cal...
Answer-Set Programming with Bounded Treewidth ∗
"... In this paper, we present a novel approach to the evaluation of propositional answer-set 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 3 (2 self)
- Add to MetaCart
In this paper, we present a novel approach to the evaluation of propositional answer-set 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 stateof-the-art systems. 1
© 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
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 LAZY-PCF+SHAR due to S. Purushothaman Iyer and Jill Seaman.
© 2008 Science Publications Semantics of Lazy Evaluation using the Two-Level Grammar
"... Abstract: We have formalized the semantics of lazy evaluation for the lambda calculus using the twolevel grammar formalism. The resulting semantics enjoys several properties, e.g., there is a sharing in the recursive computation, there is no conversion, the heap is automatically reclaimed, an attemp ..."
Abstract
- Add to MetaCart
Abstract: We have formalized the semantics of lazy evaluation for the lambda calculus using the twolevel grammar formalism. The resulting semantics enjoys several properties, e.g., there is a sharing in the recursive computation, there is no conversion, the heap is automatically reclaimed, an attempt to evaluate an argument is done at most once and there is a sharing in the evaluation of partial application to functions. Key words: Heap, conversion, partial application to functions

