Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Lazy evaluation


Related Topics

  
  Lazy evaluation - Wikipedia, the free encyclopedia
In computer programming, lazy evaluation is a technique that attempts to delay computation of expressions until the results of the computation are known to be needed.
The benefits of lazy evaluation include: performance increases due to avoiding unnecessary calculations, avoiding error conditions in the evaluation of compound expressions, the ability to construct infinite data structures, and the ability to define control structures as regular functions rather than built-in primitives.
Languages that use lazy evaluation can be further subdivided into those that use a call-by-name evaluation strategy and those that use call-by-need.
en.wikipedia.org /wiki/Lazy_evaluation   (981 words)

  
 [No title]
Informally, the term "lazy evaluation" means that computation is demand-driven: nothing is computed unless its value is required.
First, it is easy to see that lazy evaluation may incur extra performance overhead, because the decisions about what values must be evaluated are made at runtime.
Second, even though laziness may incur an overhead using a "per-computation step" measure, it is possible for laziness to speed up a program because it does not waste time evaluating unused values.
www.cs.berkeley.edu /~aiken/cs264/lectures/lazy_evaluation   (1453 words)

  
 lazy evaluation Computer Encyclopedia Enterprise Resource Directory Complete Guide to Internet   (Site not responding. Last check: 2007-11-05)
Under normal order evaluation (outermost or call-by-name evaluation) an expression is evaluated only when its value is needed in order for the program to return (the next part of) its result.
Lazy evaluation is one {evaluation strategy} used to implement non-{strict} functions.
A partial kind of lazy evaluation implements lazy data structures or especially {lazy list}s where function arguments are passed evaluated but the arguments of data constructors are not evaluated.
www.jaysir.com /computer-encyclopedia/l/lazy-evaluation-computer-terms.htm   (223 words)

  
 [No title]   (Site not responding. Last check: 2007-11-05)
Lazy evaluation makes it possible to have infinite lists, infinite trees, etc, where the evaluation is done incrementally on demand.
In lazy languages, function arguments may be infinite data structures (especially lists), the components of which are evaluated as needed.
Lazy evaluation is one evaluation strategy which is used to implement non-strict functions.
www.cse.iitd.ernet.in /~saroj/lazy.ppt   (3685 words)

  
 Lazy evaluation: Facts and details from Encyclopedia Topic   (Site not responding. Last check: 2007-11-05)
(lazy evaluation is a concept that attempts to minimize the work the computer has to do.
(lazy evaluation is a design pattern[Click link for more facts about this topic] often seen in general computer programming.
In computer programming, lazy initialization is the tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until...
www.absoluteastronomy.com /encyclopedia/l/la/lazy_evaluation.htm   (1257 words)

  
 Lazy Evaluation and Missing Arguments   (Site not responding. Last check: 2007-11-05)
The S evaluation model for function calls is unusual in that arguments are evaluated during evaluation of the body of the called function, not before the call, and then only when the value is really needed.
Argument evaluation is described on pages 181-183 of "Programming with Data"; in particular, page 182 describes when the actual evaluation takes place; roughly, when using an interface to C, etc., when copying as for a local assignment, and when looking for a method.
A subtle implementation detail is that the S evaluator has to handle such situations by checking the actual object reference (to use Java terminology) rather than the contents of the object.
cm.bell-labs.com /cm/ms/departments/sia/Sbook/lazyEval.html   (416 words)

  
 CSC 330 Lecture Notes Week 10
In the tree-based evaluation model, we evaluate using a sequential depth-first traversal of the tree (post-order).
The basic idea of lazy evaluation is not to evaluate an argument until it is actually used in the body of the function.
An interesting aspect of lazy evaluation is that it can cope effectively with computations that may not compute at all with eager evaluation.
www.csc.calpoly.edu /~gfisher/classes/330/lectures/10.html   (1805 words)

  
 Lazy Evaluation for Best-First Contextual Handwriting Recognition
Lazy evaluation is a best-first state space search method for contextual handwriting recognition which searches an ordered space and applies constraints at the earliest possible opportunity to maximize computational efficiency.
Lazy evaluation is well-suited to multi-level hypothesis verification because it operates recursively on a hierarchical semantic tree of context constraints.
This paper describes the lazy evaluation algorithm in detail, and proves that, if ordered hypotheses for the lowest-level sub-patterns are provided as inputs, and the combined belief function is monotonic, then overall interpretations are guaranteed to be generated in best-first order.
csdl.computer.org /comp/proceedings/icdar/1999/0318/00/03180589abs.htm   (176 words)

  
 Python Desktop Server Weblog 25.12.2004
Lazy evaluation is a way to delay execution to some later point in time - you build up a promise to deliver the result, but you only deliver it when it really is needed.
Lazy evaluation is usefull when you have complicated calculations whose result might not be needed at all - but you don't know up front.
Lazy languages push this concept over the border: all expressions are evaluated lazily.
pyds.muensterland.org /weblog/2004/12/25.html   (447 words)

  
 [No title]   (Site not responding. Last check: 2007-11-05)
Lazy Evaluation in SML The evaluation rule in SML is eager (strict) evaluation, while most of pure functional languages adopt lazy evaluation.
The effect is same as that of lazy evaluation and the function is behaving as non strict function.
Lazy evaluation: - val x = get (3, gen(1)); > val x = [1,2,3] It gives a list of first 3 elements from infinite list generated by function gen because the elements in a list are only evaluated when required by another function.
www.cse.iitd.ernet.in /~saroj/lazy_eager.doc   (3605 words)

  
 Research: Lazy Evaluation in Expert Systems
Lazy Evaluation is an area that has not been sufficiently explored in the practical application of Expert Systems, and I am hopeful that the model we are approaching will indeed improve the usefulness of these systems.
I believe lazy evaluation is a versatile and potentially powerful tool that needs to be explored thoroughly, especially for its possible use as a tool in logic programming.
Lazy composites can also act as feeder lists for expert system "fuzzifiers," or for supplemental certainty factors that may be used to double-check results.
www.sonic.net /~foggy/Leha/html/research.html   (1167 words)

  
 OLisp: Lazy Evaluation in a Small Purely Functional Lisp System   (Site not responding. Last check: 2007-11-05)
Lazy evaluation liberates the programmer from defining termination conditions in recursive functions and from the need of explicitly specifying the flow of control in parallel, coroutine -like computations.
With functional languages the terms delayed and lazy evaluation mean an evaluation strategy where the values of argument forms in a function call are not computed until actually needed.
The aim of the paper is to present a practical Lisp-based solution where evaluation order and parameter handling are normal except with list constructor functions, which delay their last argument, causing the cdr of a list to be constructed not until it is accessed for the first time.
www.lassila.org /publications/1986/STeP86-abstract.shtml   (311 words)

  
 Operational Semantics of Sharing in Lazy Evaluation   (Site not responding. Last check: 2007-11-05)
From an implementation perspective, lazy evaluation is often equated with the call-by-need method, which is similar to call-by-name except that arguments are shared.
However, it has proven rather difficult to formalize the rules of lazy evaluation with sharing, or call-by-need, in such a way that it both captures sharing and is useful for reasoning.
In this paper, an operational semantics of PCF is presented which captures the sharing inherent in the call-by-need implementation of lazy evaluation in a form that is suitable for reasoning.
www4.ncsu.edu /eos/users/p/purush/www/Papers/scp.html   (237 words)

  
 No Title
Arguments to function and constructor applications are evaluated to values (base types, datatypes, functions, etc.) before the function is entered or the construction is made.
Under lazy evaluation, expressions are not evaluated until they are needed, i.e., used as arguments to a primitive function or subjected to a case pattern match.
For this reason, side-effects don't fit in well with lazy languages, since the order of their execution is important.
www.cs.pdx.edu /~apt/cs457_1997/lecture14/14.html   (437 words)

  
 Lecture 6: Eager vs. Lazy Evaluation. Higher-Order Functions
The evaluation strategy in which function arguments are evaluated before the function call is made is known as an "eager" evaluation.
Eager evaluation is used by most well-known modern programming languages, and it might seem so natural that we don't even consider the possibility of alternative evaluation strategies.
Function definitions are evaluated by creating an internal representation for them, without actually executing their body (the body is executed only at the time of a function call, after all actual function arguments have been provided).
www.cs.cornell.edu /courses/cs312/2004fa/lectures/lecture6.htm   (1389 words)

  
 Research: Lazy Evaluation in Expert Systems, continued
The application of lazy evaluation to a fuzzy expert system proves to be one of considerable complexity, with some significant problem areas.
We discovered the Watt model of separation of control from calculation using lazy evaluation, and we found this to be an interesting concept to apply in the expert system arena.
We found many were capable of fuzziness, but only one had been altered to include lazy evaluation at all, and this only a partially lazy amendment to the existing language (Prolog).
www.sonic.net /~foggy/Leha/html/research2.html   (1277 words)

  
 Lazy evaluation at opensource encyclopedia   (Site not responding. Last check: 2007-11-05)
This is the normal evaluation method in most programming languages.
Minimal evaluation is when an expression is only evaluated until the point where its final value is known.
Delayed evaluation has the added advantage of being able to create infinite lists without infinite loops or size matters in computation.
www.wiki.tatet.com /Lazy_evaluation.html   (423 words)

  
 An Interpreter with Lazy Evaluation
The thunk must contain the information required to produce the value of the argument when it is needed, as if it had been evaluated at the time of the application.
Cy D. Fect, a reformed C programmer, is worried that some side effects may never take place, because the lazy evaluator doesn't force the expressions in a sequence.
to be a procedure of four arguments, where the first and third arguments are evaluated when the procedure is called, the second argument is delayed, and the fourth argument is both delayed and memoized.
mitpress.mit.edu /sicp/full-text/sicp/book/node86.html   (1372 words)

  
 [TYPES] Combining lazy and eager evaluation of terms
In an attempt to combine some of the benefits of lazy and eager evaluation, I have implemented a language with an evaluation strategy which is strict with respect to divergence, but performs lazy evaluation on certain intermediate subterms to allow a more expressive use of recursion.
Thus every subterm is always fully evaluated eventually, but certain recursive terms are supported which would, in an eager language, either be disallowed or result in access to uninitialized data.
This unboxing process becomes tricky with function closures; in the general case, two versions of a closure's environment and code pointer need to be kept around to support its evaluation in both both thunked and unboxed contexts, and in some cases only the thunked version may be safely invoked.
lists.seas.upenn.edu /pipermail/types-list/2004/000340.html   (773 words)

  
 [No title]
COMMENTS ON LAZY EVALUATION The principle of "information-hiding" is that programs should be decomposed into highly independent pieces, with restricted interfaces.
This principle underlies several slogans: "retargetable frontends" "divide and conquer" "separation of concerns" Lazy evaluation is a control abstraction: control details are filled in automatically.
With eager evaluation, for each function F there is a time function t such that the time to evaluate F(A) is F time(F(A)) = t (value(A)) + time(A) F With eager evaluation running time is a compositional property that depends on the semantics of arguments (i.e.
www-cse.ucsd.edu /classes/wi98/cse230/Feb12   (789 words)

  
 Problems with nested scopes and lazy evaluation
The standard scoping rules are inconvenient for the lazy evaluation of generator expressions, but it's very strange for a list comprehension and an apparently identical generator expression to produce different results.
The target of the generator expression is evaluated in a copy of the environment that the gen expr was defined in.
The examples discussed on the list involved a free variable that in a generator expression that is rebound after the gen expr is created.
www.python.org /~jeremy/weblog/040204.html   (845 words)

  
 [No title]
Lazy Evaluation We're used to eager evaluation of expressions: f(x + y, g z) (x+y) :: (g z) :: nil Arguments to function and constructor applications are evaluated to values (base types, datatypes, func- tions, etc.) before the function is entered or the con- struction is made.
Evaluating arguments can be expensive (perhaps in- finitely so), and sometimes this effort is wasted: fun g c =...very expensive...
When a value is needed, we must obtain it by forcing the expression, i.e., applying it to ():unit.
www.cs.pdx.edu /~apt/cs457_1997/lecture14.tty   (85 words)

  
 [TYPES] Combining lazy and eager evaluation of terms
My recommendation is to read the paper "Compilation of extended recursion in call-by-value functional languages" which can be found here: http://pauillac.inria.fr/~hirschow/ Their approach in short: They only do call-by-value, no other evaluation order is used.
Thus every subterm is always fully > evaluated eventually, but certain recursive terms are supported which > would, in an eager language, either be disallowed or result in access to > uninitialized data.
> > - The evaluation scheme is more complex than either a traditional > normal-order or applicative-order evaluator, in particular in its > treatment of transitions between thunked lazy evaluation and unboxed > eager evaluation.
lists.seas.upenn.edu /pipermail/types-list/2004/000347.html   (884 words)

  
 CS334 Lecture 4
Lazy: Substitute operand in for formal parameter and evaluate, evaluating operand only when needed.
Lazy evaluation gives proper behavior so don't stack up lots of data between boxes.
If lazy evaluation need to check whether parameter has been evaluated - can be quite expensive to support.
www.cs.williams.edu /~kim/cs334.97/Lec4.html   (2015 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.