The role of lazy evaluation in amortized data structures

Traditional techniques for designing and analyzing amortized data structures in an imperative setting are of limited use in a functional setting because they apply only to single-threaded data structures, yet functional data structures can be non-single-threaded. In earlier work, we showed how lazy evaluation supports functional amortized data structures and described a technique (the banker's method) for analyzing such data structures. In this paper, we present a new analysis technique (the physicist's method) and show how one can sometimes derive a worst-case data structure from an amortized data structure by appropriately scheduling the premature execution of delayed components. We use these techniques to develop new implementations of FIFO queues and binomial queues.

[1]  Robert Todd Hood,et al.  The Efficient Implementation of Very-high-level Programming Language Constructs , 1982 .

[2]  David A. Schmidt Detecting global variables in denotational specifications , 1985, TOPL.

[3]  Benjamin Goldberg,et al.  Real-time deques, multihead Turing machines, and purely functional programming , 1993, FPCA '93.

[4]  Chris Okasaki,et al.  Amortization, lazy evaluation, and persistence: lists with catenation via lazy linking , 1995, Proceedings of IEEE 36th Annual Foundations of Computer Science.

[5]  S. Holmström,et al.  A composition approach to time analysis of first order lazy functional programs , 1989, FPCA.

[6]  R. Tarjan Amortized Computational Complexity , 1985 .

[7]  F. Warren Burton,et al.  An Efficient Functional Implementation of FIFO Queues , 1982, Information Processing Letters.

[8]  Robert E. Tarjan,et al.  Making data structures persistent , 1986, STOC '86.

[9]  Philip Wadler,et al.  Strictness analysis aids time analysis , 1988, POPL '88.

[10]  Robin Milner,et al.  Definition of standard ML , 1990 .

[11]  Rob R. Hoogerwoord,et al.  Functional Pearls A symmetric set of efficient list operations , 1992, Journal of Functional Programming.

[12]  C. M. Khoong,et al.  Double-Ended Binomial Queues , 1993, ISAAC.

[13]  Chris Okasaki,et al.  Simple and efficient purely functional queues and deques , 1995, Journal of Functional Programming.

[14]  Robert HOOD,et al.  Real-Time Queue Operation in Pure LISP , 1980, Inf. Process. Lett..

[15]  David Sands Complexity Analysis for a Lazy Higher-Order Language , 1990 .

[16]  David J. King Functional Binomial Queues , 1994, Functional Programming.

[17]  David Sands,et al.  A Naïve Time Analysis and its Theory of Cost Equivalence , 1995, J. Log. Comput..

[18]  Lam Berry Schoenmakers,et al.  Data structures and amortized complexity in a functional setting , 1992 .

[19]  Jean Vuillemin,et al.  A data structure for manipulating priority queues , 1978, CACM.

[20]  David Gries,et al.  The Science of Programming , 1981, Text and Monographs in Computer Science.

[21]  G. Brodal,et al.  Optimal Purely Functional Priority Queues , 1996 .

[22]  Haim Kaplan,et al.  Persistent lists with catenation via recursive slow-down , 1995, STOC '95.

[23]  John Hughes,et al.  Why Functional Programming Matters , 1989, Comput. J..

[24]  Simon L. Peyton Jones,et al.  Report on the programming language Haskell: a non-strict, purely functional language version 1.2 , 1992, SIGP.

[25]  Rajeev Raman,et al.  Eliminating Amortization: On Data Structures with Guaranteed Response Time , 1993 .

[26]  David Sands,et al.  Complexity Analysis for a Lazy Higher-Order Language , 1989, Functional Programming.