Results 1 -
9 of
9
Real-Time 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 11 (1 self)
- Add to MetaCart
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 real--time, since its constant worstcase behavior might be useful in real time programs (assuming real--time 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 real--time simulation of a multihead Turing machine in a purel...
Fast Meldable Priority Queues
, 1995
"... We present priority queues that support the operations MakeQueue, FindMin, Insert and Meld in worst case time O(1) and Delete and DeleteMin in worst case time O(log n). They can be implemented on the pointer machine and require linear space. The time bounds are optimal for all implementations wh ..."
Abstract
-
Cited by 9 (1 self)
- Add to MetaCart
We present priority queues that support the operations MakeQueue, FindMin, Insert and Meld in worst case time O(1) and Delete and DeleteMin in worst case time O(log n). They can be implemented on the pointer machine and require linear space. The time bounds are optimal for all implementations where Meld takes worst case time o(n).
The essence of monotonic state
, 2009
"... We extend a static type-and-capability system with new mechanisms for expressing the promise that a certain abstract value evolves monotonically with time; for enforcing this promise; and for taking advantage of this promise to establish non-trivial properties of programs. These mechanisms are inde ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
We extend a static type-and-capability system with new mechanisms for expressing the promise that a certain abstract value evolves monotonically with time; for enforcing this promise; and for taking advantage of this promise to establish non-trivial properties of programs. These mechanisms are independent of the treatment of mutable state, but combine with it to offer a flexible account of “monotonic state”. To demonstrate their use, we present a simple yet challenging example, namely monotonic integer counters. We then show how an implementation of thunks in terms of references can be assigned types that reflect time complexity properties, in the style of Danielsson (2008). This offers a foundational explanation of Danielsson’s system and, at the same time, extends it to a calculus with mutable state. Last, we sketch an application to hash-consing.
Amortized Resource Analysis with Polynomial Potential A Static Inference of Polynomial Bounds for Functional Programs (Extended Version)
"... Abstract. In 2003, Hofmann and Jost introduced a type system that uses a potential-based amortized analysis to infer bounds on the resource consumption of (first-order) functional programs. This analysis has been successfully applied to many standard algorithms but is limited to bounds that are line ..."
Abstract
-
Cited by 9 (5 self)
- Add to MetaCart
Abstract. In 2003, Hofmann and Jost introduced a type system that uses a potential-based amortized analysis to infer bounds on the resource consumption of (first-order) functional programs. This analysis has been successfully applied to many standard algorithms but is limited to bounds that are linear in the size of the input. Here we extend this system to polynomial resource bounds. An automatic amortized analysis is used to infer these bounds for functional programs without further annotations if a maximal degree for the bounding polynomials is given. The analysis is generic in the resource and can obtain good bounds on heap-space, stack-space and time usage.
Fully Persistent Arrays for Efficient Incremental Updates and Voluminous Reads
- 4th European Symposium on Programming
, 1992
"... The array update problem in a purely functional language is the following: once an array is updated, both the original array and the newly updated one must be preserved to maintain referential transparency. We devise a very simple, fully persistent data structure to tackle this problem such that ..."
Abstract
-
Cited by 5 (2 self)
- Add to MetaCart
The array update problem in a purely functional language is the following: once an array is updated, both the original array and the newly updated one must be preserved to maintain referential transparency. We devise a very simple, fully persistent data structure to tackle this problem such that ffl each incremental update costs O(1) worst--case time, ffl a voluminous sequence of r reads cost in total O(r) amortized time, and ffl the data structure use O(n + u) space, where n is the size of the array and u is the total number of updates. A sequence of r reads is voluminous if r is \Omega\Gamma n) and the sequence of arrays being read forms a path of length O(r) in the version tree. A voluminous sequence of reads may be mixed with updates without affecting either the performance of reads or updates. An immediate consequence of the above result is that if a functional program is single--threaded, then the data structure provides a simple and efficient implementation of funct...
Amortized Constant Relaxed Rebalancing Using Standard Rotations
- Acta Informatica
, 1998
"... The idea of relaxed balance is to uncouple the rebalancing in search trees from the updating in order to speed up request processing in main-memory databases during bursts of updates. This paper contains the first proof that amortized constant time rebalancing can be obtained in a relaxed binary sea ..."
Abstract
-
Cited by 4 (3 self)
- Add to MetaCart
The idea of relaxed balance is to uncouple the rebalancing in search trees from the updating in order to speed up request processing in main-memory databases during bursts of updates. This paper contains the first proof that amortized constant time rebalancing can be obtained in a relaxed binary search tree using only standard single and double rotations. 1 Introduction The idea of relaxed balance is to uncouple the rebalancing in search trees from the updating in order to speed up request processing in main-memory databases. The motivation is two-fold: If search and update requests for a search tree come in bursts (possibly from several external sources), the search tree may occasionally not be able to process the requests as fast as it might be desirable. For this reason, it would be convenient to be able to "turn off" rebalancing for a short period of time in order to speed up the request processing. However, when the burst is over, the tree should be rebalanced again, while search...
Amortized Resource Analysis with Polymorphic Recursion and Partial Big-Step Operational Semantics Extended Version
"... Abstract. This paper studies the problem of statically determining upper bounds on the resource consumption of first-order functional programs. A previous work approached the problem with an automatic typebased amortized analysis for polynomial resource bounds. The analysis is parametric in the reso ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
Abstract. This paper studies the problem of statically determining upper bounds on the resource consumption of first-order functional programs. A previous work approached the problem with an automatic typebased amortized analysis for polynomial resource bounds. The analysis is parametric in the resource and can be instantiated to heap space, stack space, or clock cycles. Experiments with a prototype implementation have shown that programs are analyzed efficiently and that the computed bounds exactly match the measured worst-case resource behavior for many functions. This paper describes the inference algorithm that is used in the implementation of the system. It can deal with resourcepolymorphic recursion which is required in the type derivation of many functions. The computation of the bounds is fully automatic if a maximal degree of the polynomials is given. The soundness of the inference is proved with respect to a novel operational semantics for partial evaluations to show that the inferred bounds hold for terminating as well as non-terminating computations. A corollary is that run-time bounds also establish the termination of programs. 1
Relaxed Multi-Way Trees with Group Updates
- In Proceedings of the twentieth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems
, 2000
"... Data structures with relaxed balance dier from standard structures in that rebalancing can be delayed and interspersed with updates. This gives extra exibility in both sequential and parallel applications. We study the version of multi-way trees called (a; b)-trees (which includes B-trees) with ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
Data structures with relaxed balance dier from standard structures in that rebalancing can be delayed and interspersed with updates. This gives extra exibility in both sequential and parallel applications. We study the version of multi-way trees called (a; b)-trees (which includes B-trees) with the operations insertion, deletion, and group insertion. The latter has applications in for instance document databases and WWW search engines. We prove that we obtain the optimal asymptotic rebalancing complexities of amortized constant time for insertion and deletion and amortized logarithmic time in the size of the group for group insertion. These results hold even for the relaxed version. Our results also demonstrate that a binary tree scheme with the same complexities can be designed. This is an improvement over the existing results. 1 Introduction We focus on the type of multi-way trees usually referred to as (a; b)-trees [8, 15], and in particular, we adopt the relaxed (a...
Languages, Theory
"... We extend a static type-and-capability system with new mechanisms for expressing the promise that a certain abstract value evolves monotonically with time; for enforcing this promise; and for taking advantage of this promise to establish non-trivial properties of programs. These mechanisms are indep ..."
Abstract
- Add to MetaCart
We extend a static type-and-capability system with new mechanisms for expressing the promise that a certain abstract value evolves monotonically with time; for enforcing this promise; and for taking advantage of this promise to establish non-trivial properties of programs. These mechanisms are independent of the treatment of mutable state, but combine with it to offer a flexible account of “monotonic state”. We apply these mechanisms to solve two reasoning challenges that involve mutable state. First, we show how an implementation of thunks in terms of references can be assigned types that reflect time complexity properties, in the style of Danielsson (2008). Second, we show how an implementation of hash-consing can be assigned a specification that conceals the existence of an internal state yet guarantees that two pieces of input data receive the same code if and only if they are equal.

