Results 1  10
of
12
Making data structures persistent
, 1989
"... This paper is a study of persistence in data structures. Ordinary data structures are ephemeral in the sense that a change to the structure destroys the old version, leaving only the new version available for use. In contrast, a persistent structure allows access to any version, old or new, at any t ..."
Abstract

Cited by 277 (6 self)
 Add to MetaCart
This paper is a study of persistence in data structures. Ordinary data structures are ephemeral in the sense that a change to the structure destroys the old version, leaving only the new version available for use. In contrast, a persistent structure allows access to any version, old or new, at any time. We develop simple, systematic, and efftcient techniques for making linked data structures persistent. We use our techniques to devise persistent forms of binary search trees with logarithmic access, insertion, and deletion times and O (1) space bounds for insertion and deletion.
Purely Functional RandomAccess Lists
 In Functional Programming Languages and Computer Architecture
, 1995
"... We present a new data structure, called a randomaccess list, that supports array lookup and update operations in O(log n) time, while simultaneously providing O(1) time list operations (cons, head, tail). A closer analysis of the array operations improves the bound to O(minfi; log ng) in the wor ..."
Abstract

Cited by 17 (2 self)
 Add to MetaCart
(Show Context)
We present a new data structure, called a randomaccess list, that supports array lookup and update operations in O(log n) time, while simultaneously providing O(1) time list operations (cons, head, tail). A closer analysis of the array operations improves the bound to O(minfi; log ng) in the worst case and O(log i) in the expected case, where i is the index of the desired element. Empirical evidence suggests that this data structure should be quite efficient in practice. 1 Introduction Lists are the primary data structure in every functional programmer 's toolbox. They are simple, convenient, and usually quite efficient. The main drawback of lists is that accessing the ith element requires O(i) time. In such situations, functional programmers often find themselves longing for the efficient random access of arrays. Unfortunately, arrays can be quite awkward to implement in a functional setting, where previous versions of the array must be available even after an update. Since arra...
Optimal Purely Functional Priority Queues
 JOURNAL OF FUNCTIONAL PROGRAMMING
, 1996
"... Brodal recently introduced the first implementation of imperative priority queues to support findMin, insert, and meld in O(1) worstcase time, and deleteMin in O(log n) worstcase time. These bounds are asymptotically optimal among all comparisonbased priority queues. In this paper, we adapt B ..."
Abstract

Cited by 16 (1 self)
 Add to MetaCart
Brodal recently introduced the first implementation of imperative priority queues to support findMin, insert, and meld in O(1) worstcase time, and deleteMin in O(log n) worstcase time. These bounds are asymptotically optimal among all comparisonbased priority queues. In this paper, we adapt Brodal's data structure to a purely functional setting. In doing so, we both simplify the data structure and clarify its relationship to the binomial queues of Vuillemin, which support all four operations in O(log n) time. Specifically, we derive our implementation from binomial queues in three steps: first, we reduce the running time of insert to O(1) by eliminating the possibility of cascading links; second, we reduce the running time of findMin to O(1) by adding a global root to hold the minimum element; and finally, we reduce the running time of meld to O(1) by allowing priority queues to contain other priority queues. Each of these steps is expressed using MLstyle functors. The last transformation, known as datastructural bootstrapping, is an interesting application of higherorder functors and recursive structures.
An Overview of Edison
 Electronic Notes in Theoretical Computer Science
, 2000
"... Edison is a library of functional data structures implemented in Haskell. It supports three main families of abstractions: sequences, collections (e.g., sets and priority queues), and associative collections (e.g., nite maps). This paper summarizes the design of Edison, with particular attention to ..."
Abstract

Cited by 15 (0 self)
 Add to MetaCart
(Show Context)
Edison is a library of functional data structures implemented in Haskell. It supports three main families of abstractions: sequences, collections (e.g., sets and priority queues), and associative collections (e.g., nite maps). This paper summarizes the design of Edison, with particular attention to how that design is inuenced by details of Haskell. 1 Introduction There is a growing recognition that a useful set of libraries is at least as important to the acceptance of a programming language as the design of the language itself. A library of fundamental data structures such as queues, sets, and nite maps is particularly important in this regard. However, highquality examples of such libraries, such as the STL [14] in C++ or the the collection classes [3] in Smalltalk, are rare. Edison is a library of ecient data structures suitable for implementation and use in functional programming languages. It is named after Thomas Alva Edison and for the mnemonic value of EDiSon (Ecient Data ...
Confluently Persistent Deques via DataStructural Bootstrapping
 J. of Algorithms
, 1993
"... We introduce datastructural bootstrapping, a technique to design data structures recursively, and use it to design confluently persistent deques. Our data structure requires O(log 3 k) worstcase time and space per deletion, where k is the total number of deque operations, and constant worstcase t ..."
Abstract

Cited by 14 (4 self)
 Add to MetaCart
(Show Context)
We introduce datastructural bootstrapping, a technique to design data structures recursively, and use it to design confluently persistent deques. Our data structure requires O(log 3 k) worstcase time and space per deletion, where k is the total number of deque operations, and constant worstcase time and space for other operations. Further, the data structure allows a purely functional implementation, with no side effects. This improves a previous result of Driscoll, Sleator, and Tarjan. 1 An extended abstract of this paper was presented at the 4th ACMSIAM Symposium on Discrete Algorithms, 1993. 2 Supported by a Fannie and John Hertz Foundation fellowship, National Science Foundation Grant No. CCR8920505, and the Center for Discrete Mathematics and Theoretical Computer Science (DIMACS) under NSFSTC8809648. 3 Also affiliated with NEC Research Institute, 4 Independence Way, Princeton, NJ 08540. Research at Princeton University partially supported by the National Science Foundatio...
RealTime Deques, Multihead Turing Machines, and Purely Functional Programming
 In Conference on Functional Programming Languages and Computer Architecture
, 1993
"... We answer the following question: Can a deque (double ended queue) be implemented in a purely functional language such that each push or pop operation on either end of a queue is accomplished in O(1) time in the worst case? The answer is yes, thus solving a problem posted by Gajewska and Tarjan [1 ..."
Abstract

Cited by 13 (1 self)
 Add to MetaCart
(Show Context)
We answer the following question: Can a deque (double ended queue) be implemented in a purely functional language such that each push or pop operation on either end of a queue is accomplished in O(1) time in the worst case? The answer is yes, thus solving a problem posted by Gajewska and Tarjan [14] and by Ponder, McGeer, and Ng [25], and refining results of Sarnak [26] and Hoogerwoord [18]. We term such a deque realtime, since its constant worstcase behavior might be useful in real time programs (assuming realtime garbage collection [3], etc.) Furthermore, we show that no restriction of the functional language is necessary, and that push and pop operations on previous versions of a deque can also be achieved in constant time. We present a purely functional implementation of real time deques and its complexity analysis. We then show that the implementation has some interesting implications, and can be used to give a realtime simulation of a multihead Turing machine in a purel...
A Probabilistic Approach to the Problem of Automatic Selection of Data Representations
 In Proceedings of the 1996 ACM SIGPLAN International Conference on Functional Programming
, 1996
"... The design and implementation of efficient aggregate data structures has been an important issue in functional programming. It is not clear how to select a good representation for an aggregate when access patterns to the aggregate are highly variant, or even unpredictable. Previous approaches rely o ..."
Abstract

Cited by 6 (3 self)
 Add to MetaCart
(Show Context)
The design and implementation of efficient aggregate data structures has been an important issue in functional programming. It is not clear how to select a good representation for an aggregate when access patterns to the aggregate are highly variant, or even unpredictable. Previous approaches rely on compiletime analyses or programmer annotations. These methods can be unreliable because they try to predict program behaviors before they are executed. We propose a probabilistic approach, which is based on Markov processes, for automatic selection of data representations. The selection is modeled as a random process moving in a graph with weighted edges. The proposed approach employs coin tossing at runtime to aid choosing suitable data representations. The transition probability function used by the coin tossing is constructed in a simple and common way from a measured cost function. We show that, under this setting, random selection of data representations can be quite effective. Th...
Automated Benchmarking of Functional Data Structures
 In Practical Aspects of Declarative Languages
, 1999
"... . Despite a lot of recent interest in purely functional data structures, for example [Ada93, Oka95, BO96, Oka96, OB97, Erw97], few have been benchmarked. Of these, even fewer have their performance qualified by how they are used. But how a data structure is used can significantly affect performa ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
(Show Context)
. Despite a lot of recent interest in purely functional data structures, for example [Ada93, Oka95, BO96, Oka96, OB97, Erw97], few have been benchmarked. Of these, even fewer have their performance qualified by how they are used. But how a data structure is used can significantly affect performance. This paper makes three original contributions. (1) We present an algorithm for generating a benchmark according to a given use of data structure. (2) We compare use of an automated tool based on this algorithm, with the traditional technique of handpicked benchmarks, by benchmarking six implementations of randomaccess list using both methods. (3) We use the results of this benchmarking to present a decision tree for the choice of randomaccess list implementation, according to how the list will be used. 1 Motivation Recent years have seen renewed interest in purely functional data structures: sets [Ada93], randomaccess lists [Oka95], priority queues [BO96], arrays [OB97], gr...
Functional Data Structures for Typed Racket
"... Scheme provides excellent language support for programming in a functional style, but little in the way of library support. In this paper, we present a comprehensive library of functional data structures, drawing from several sources. We have implemented the library in Typed Racket, a typed variant ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
Scheme provides excellent language support for programming in a functional style, but little in the way of library support. In this paper, we present a comprehensive library of functional data structures, drawing from several sources. We have implemented the library in Typed Racket, a typed variant of Racket, allowing us to maintain the type invariants of the original definitions. 1. Functional Data Structures for a Functional Language Functional programming requires more than just lambda; library support for programming in a functional style is also required. In particular, efficient and persistent functional data structures are needed in almost every program. Scheme does provide one supremely valuable functional data structure—the linked list. This is sufficient to support many forms
Persistent Linked Structures at Constant WorstCase Cost
"... We present a method for making linked structures with nodes of indegree not exceeding 1 partially persistent at a worstcase time cost of O(1) per access step and a worstcase time and space cost of O(1) per update step. The last two improve the best previous result, which gave O(1) amortized bo ..."
Abstract
 Add to MetaCart
(Show Context)
We present a method for making linked structures with nodes of indegree not exceeding 1 partially persistent at a worstcase time cost of O(1) per access step and a worstcase time and space cost of O(1) per update step. The last two improve the best previous result, which gave O(1) amortized bounds on time and space. Our results extend to full persistence. 1 Introduction Making a change to an ordinary data structure destroys the old version, leaving only the new one. Such a structure is said to be ephemeral. With a persistent data structure, on the other hand, old versions are not destroyed, making it possible to access or modify old versions as well as the newest one. A structure is said to be partially persistent if every version can be accessed but only the newest version can be modified and fully persistent if every version can be both accessed and modified. Researchers have devised partially or fully persistent forms for a number of data structures, including stacks [10],...