## Generating Power of Lazy Semantics (1997)

Venue: | Theoretical Computer Science |

Citations: | 9 - 3 self |

### BibTeX

@ARTICLE{Karczmarczuk97generatingpower,

author = {Jerzy Karczmarczuk},

title = {Generating Power of Lazy Semantics},

journal = {Theoretical Computer Science},

year = {1997},

volume = {187},

pages = {203--219}

}

### OpenURL

### Abstract

We discuss the use of the lazy evaluation scheme as coding tool in some algebraic manipulations. We show --- on several examples --- how to process the infinite power series or other open-ended data structures with co-recurrent algorithms, which simplify enormously the coding of recurrence relations or solving equations in the power series domain. The important point is not the "infinite" length of the data, but the fact that the algorithms use open recursion, and the user never thinks about the truncation. 1 Introduction This article develops some applications of the functional lazy evaluation schemes to symbolic calculus. Neither the idea of non-strict semantics, nor its application to generate infinite, open structures such as power series, are new, see for example [1, 2], some books on functional programming ([3, 4]), etc. The lazy evaluation (or call by need is a protocol which delays the evaluation of the arguments of a function: while evaluating f(x) the code for f is entered, ...

### Citations

1347 | Imperative functional programming
- Jones, Wadler
- 1993
(Show Context)
Citation Context ...culus. Neither the idea of non-strict semantics, nor its application to generate infinite, open structures such as power series, are new, see for example [1, 2], some books on functional programming (=-=[3, 4]-=-), etc. The lazy evaluation (or call by need is a protocol which delays the evaluation of the arguments of a function: while evaluating f(x) the code for f is entered, but if f doesn't need x, nothing... |

769 |
Structure and interpretation of computer programs
- Abelson, Sussman, et al.
- 1996
(Show Context)
Citation Context ...tional lazy evaluation schemes to symbolic calculus. Neither the idea of non-strict semantics, nor its application to generate infinite, open structures such as power series, are new, see for example =-=[1, 2]-=-, some books on functional programming ([3, 4]), etc. The lazy evaluation (or call by need is a protocol which delays the evaluation of the arguments of a function: while evaluating f(x) the code for ... |

174 |
The Art of Computer
- Knuth
- 2005
(Show Context)
Citation Context ...algorithm dealing with such series is not entirely trivial. The algorithms are usually dominated by the administration of the truncation trivia. In fact, if one implements the algorithms discussed in =-=[13]-=- or [14] using indexed vectors, one sees mainly summing loops and the evaluation of the bounds of these loops, which becomes quite boring. Here the addition and the subtraction term by term is given b... |

108 |
Recursive programming techniques
- Burge
- 1975
(Show Context)
Citation Context ...culus. Neither the idea of non-strict semantics, nor its application to generate infinite, open structures such as power series, are new, see for example [1, 2], some books on functional programming (=-=[3, 4]-=-), etc. The lazy evaluation (or call by need is a protocol which delays the evaluation of the arguments of a function: while evaluating f(x) the code for f is entered, but if f doesn't need x, nothing... |

99 | Average-case analysis of algorithms and data structures
- Flajolet, Vitter
- 1990
(Show Context)
Citation Context ...x 2 ) 2 +s(x 3 ) 3 + : : : +s(x m ) m + : : : ' : (22) There is no closed expression known for the coefficients ofs. Such formulae might be interesting for people working in the theory of complexity (=-=[22]-=-), or for physicists using the diagrammatic expansions in perturbation theory, and computing several combinatorial factors ([23]). The expression above seems not to be computable because of the infini... |

89 |
Effective Polynomial Computation
- Zippel
- 1993
(Show Context)
Citation Context ...m dealing with such series is not entirely trivial. The algorithms are usually dominated by the administration of the truncation trivia. In fact, if one implements the algorithms discussed in [13] or =-=[14] usin-=-g indexed vectors, one sees mainly summing loops and the evaluation of the bounds of these loops, which becomes quite boring. Here the addition and the subtraction term by term is given by the "z... |

75 |
Exact real computer arithmetic with continued fractions
- Vuillemin
- 1988
(Show Context)
Citation Context ...he power series are not the only "infinite" data structures which can be processed by lazy algorithms, although here the co-recursion is particularly simple. But already in 1972 Gosper [19] =-=(see also [13, 20]-=-) has shown that the arithmetic of continued fractions can be very elegantly realized through incremental stream processing. We could give here a particularly simple realization of such arithmetic pac... |

66 |
et al. Report on the programming language Haskell — a non-strict, purely functional language, version 1.2
- Hudak, Jones, et al.
(Show Context)
Citation Context ...sm, etc. To present the examples we shall not use any computer algebra system, but we will show some examples in the style of a lazy polymorphic programming language Gofer([6]), a dialect of Haskell (=-=[7]-=-). Our aim is not to suggest that something can be done, but how. We will omit the discussion of the polymorphic overloading of standard arithmetic operators permitting to write u \Delta v where u and... |

37 |
Automatic Feynman graph generation
- Nogueira
- 1993
(Show Context)
Citation Context ...y book on Quantum Field Thory. Sometimes the authors remark casually that these equations are not very practical. For the actual Feynman diagram generation other frameworks are used, see for example (=-=[25]-=-) and references therein. One reason for this disfavour is clear, the D-S equations are open recursive formulae. However, from the lazy semantics standpoint they are not just recurrences but algorithm... |

12 | Introduction to Gauss
- Gruntz, Monagan
- 1994
(Show Context)
Citation Context ... evaluation is very well known, constitutes one of the bases of the modern functional programming, and a priori it has nothing to do with algebraic manipulation, although it is obviously used therein =-=[2, 5]-=-. However, the superficial analogy between an algebraic formula with some symbolic indeterminates, and a function body waiting to be evaluated, is quite explicit. Perhaps, paradoxically, this is one o... |

9 |
1976] Newton's Method: A Great Algebraic Algorithm
- Lipson
(Show Context)
Citation Context ... more complicated, non-linear equation f(U) = 0, the lazy approach may influence also the construction of the Newton algorithm. The idea of using Newton algorithm in the series domain is not new, see =-=[16, 17]-=-. Again, instead of coding a loop broken by some convergence criteria, we construct shamelessly an infinite list of infinite iterates. For example, if W = p U , then we get [W (0) ; W (1) ; : : : ; W ... |

8 |
Circular programs and self-referential structures. Software—Practice and Experience
- Allison
- 1989
(Show Context)
Citation Context ...to handle infinite structures, but the following: ffl The possibility to code effectively the fixed point definitions: ff = g(ff), where ff is just a data structure, and not a recursive function (see =-=[9]). The inf-=-inite list of 1 might be coded as ones = 1 : ones where the colon is the infix "cons" operator --- the list constructor. For a useful and not so trivial example see the equation (1). ffl The... |

5 | Squinting at power series
- McIlroy
- 1990
(Show Context)
Citation Context ...niverse is finite. Of course, with lazy streams it is easy to create potentially infinite data structures such as series, continuous fractions, etc. not necessarily in the context of computer algebra =-=[12]-=-, or to construct the non-deterministic algorithms, but there are more universal arguments for the lazy functional programming: thanks to the deferred evaluation and higher order functions it is easie... |

3 |
Functional Programming Environment
- Jones, Gofer
- 1991
(Show Context)
Citation Context ...tion semantics, nondeterminism, etc. To present the examples we shall not use any computer algebra system, but we will show some examples in the style of a lazy polymorphic programming language Gofer(=-=[6]-=-), a dialect of Haskell ([7]). Our aim is not to suggest that something can be done, but how. We will omit the discussion of the polymorphic overloading of standard arithmetic operators permitting to ... |

3 |
Elementary Strong Functional
- Turner
- 1995
(Show Context)
Citation Context ...extrapolating recursion. While "standard" recursion descends on, and analyses the data, the co-recursion creates the data. The proof techniques of some co-recurrent identities are a little u=-=northodox [10, 11]-=-, as the standard induction might have nothing to induct on. Take for example the definition of a sequence of iterates:[x; f(x); f(f (x)); f(f (f (x))); : : :], (very useful for the lazy approach to t... |

2 |
A Tutorial on Co-induction and
- Gordon
- 1994
(Show Context)
Citation Context ...extrapolating recursion. While "standard" recursion descends on, and analyses the data, the co-recursion creates the data. The proof techniques of some co-recurrent identities are a little u=-=northodox [10, 11]-=-, as the standard induction might have nothing to induct on. Take for example the definition of a sequence of iterates:[x; f(x); f(f (x)); f(f (f (x))); : : :], (very useful for the lazy approach to t... |

2 |
Fast Algorithms for Manipulating Formal
- Brent, Kung
- 1978
(Show Context)
Citation Context ...de in three lines the Lagrange reversion algorithm (see [13]), or use the Newton method to solve iteratively the equation f(t) = t + v 2 t 2 + : : : \Gamma z = 0, and obtain t as a function of z (see =-=[16]-=-). But in this case one should first read the next section. 3 Iterative approximation which pretends to be exact If a series satisfies a more complicated, non-linear equation f(U) = 0, the lazy approa... |

1 |
Graph Theory and Embeddings
- Domb
- 1974
(Show Context)
Citation Context ...ae might be interesting for people working in the theory of complexity ([22]), or for physicists using the diagrammatic expansions in perturbation theory, and computing several combinatorial factors (=-=[23]). The exp-=-ression above seems not to be computable because of the infinite sum in the exponent. But if we introduce / such thats= x/ we see that the exponent satisfies in fact a "decent" recurrence re... |