Results 1  10
of
10
A Simple Implementation Technique for Priority Search Queues
 Proceedings of the 2001 International Conference on Functional Programming
, 2001
"... This paper presents a new implementation technique for priority search queues. This abstract data type is an amazing blend of finite maps and priority queues. Our implementation supports logarithmic access to a binding with a given key and constant access to a binding with the minimum value. Priorit ..."
Abstract

Cited by 10 (2 self)
 Add to MetaCart
(Show Context)
This paper presents a new implementation technique for priority search queues. This abstract data type is an amazing blend of finite maps and priority queues. Our implementation supports logarithmic access to a binding with a given key and constant access to a binding with the minimum value. Priority search queues can be used, for instance, to give a simple, purely functional implementation of Dijkstra's singlesource shortestpaths algorithm.
Constructing RedBlack Trees
, 1999
"... This paper explores the structure of redblack trees by solving an apparently simple problem: given an ascending sequence of elements, construct a redblack tree which contains the elements in symmetric order. Several extreme redblack tree shapes are characterized: trees of minimum and maximum heig ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
(Show Context)
This paper explores the structure of redblack trees by solving an apparently simple problem: given an ascending sequence of elements, construct a redblack tree which contains the elements in symmetric order. Several extreme redblack tree shapes are characterized: trees of minimum and maximum height, trees with a minimal and with a maximal proportion of red nodes. These characterizations are obtained by relating tree shapes to various number systems. In addition, connections to leftcomplete trees, AVL trees, and halfbalanced trees are highlighted. 1 Introduction Redblack trees are an elegant searchtree scheme that guarantees O(log n) worstcase running time of basic dynamicset operations. Recently, C. Okasaki (1998; 1999) presented an impressively simple functional implementation of redblack trees. In this paper we plunge deeper into the structure of redblack trees by solving an apparently simple problem: given an ascending sequence of elements, construct a redblack tree whic...
Numerical Representations as HigherOrder Nested Datatypes
, 1998
"... Number systems serve admirably as templates for container types: a container object of size n is modelled after the representation of the number n and operations on container objects are modelled after their numbertheoretic counterparts. Binomial queues are probably the first data structure that wa ..."
Abstract

Cited by 7 (2 self)
 Add to MetaCart
Number systems serve admirably as templates for container types: a container object of size n is modelled after the representation of the number n and operations on container objects are modelled after their numbertheoretic counterparts. Binomial queues are probably the first data structure that was designed with this analogy in mind. In this paper we show how to express these socalled numerical representations as higherorder nested datatypes. A nested datatype allows to capture the structural invariants of a numerical representation, so that the violation of an invariant can be detected at compiletime. We develop a programming method which allows to adapt algorithms to the new representation in a mostly straightforward manner. The framework is employed to implement three different container types: binary randomaccess lists, binomial queues, and 23 finger search trees. The latter data structure, which is treated in some depth, can be seen as the main innovation from a datastruct...
Parsing Interaction: a multilevel par ~ set formalism based on cascaded ATNs
 Automatic Natural Language Parsing, Chlchester
, 1997
"... ..."
Categorical programming for data types with restricted parametricity. Manuscript, submitted to PostProc
 of TFP
"... Abstract. Many concepts from category theory have proven useful as tools for program abstraction, particularly in functional programming. For example, many parametric data types admit operations defining a functor and related structures such as a monad. However, some parametric data types whose oper ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
Abstract. Many concepts from category theory have proven useful as tools for program abstraction, particularly in functional programming. For example, many parametric data types admit operations defining a functor and related structures such as a monad. However, some parametric data types whose operations are restricted in their parametricity are not amenable to traditional categorytheoretic abstractions in Haskell, despite appearing to satisfy the mathematical definitions. This paper explains the limitations of various traditional categorytheoretic approaches in Haskell, giving a precise account of their categorytheoretic meaning and the categorical implications of restricted parametricity arising from adhoc polymorphism provided by type classes in Haskell. Following from this analysis, we generalise Haskell’s notions of functors, monads and comonads, making use of GHC’s new constraint kinds extension, providing techniques for structuring programs with both unrestricted and restricted polymorphism.
ABSTRACT A Simple Implementation Technique for Priority Search Queues
"... This paper presents a new implementation technique for priority search queues. This abstract data type is an amazing blend of finite maps and priority queues. Our implementation supports logarithmic access to a binding with a given key and constant access to a binding with the minimum value. Priorit ..."
Abstract
 Add to MetaCart
(Show Context)
This paper presents a new implementation technique for priority search queues. This abstract data type is an amazing blend of finite maps and priority queues. Our implementation supports logarithmic access to a binding with a given key and constant access to a binding with the minimum value. Priority search queues can be used, for instance, to give a simple, purely functional implementation of Dijkstra’s singlesource shortestpaths algorithm. data types and views. Priority search queues have been largely ignored by the functional programming community and we believe that they deserve to be known better. Views prove their worth both in defining a convenient interface to the abstract data type and in providing a readable implementation. Categories and Subject Descriptors
Proceedings of the Workshop on Algorithmic Aspects of Advanced Programming Languages WAAAPL'99
, 1999
"... This paper describes a general framework for designing purely functional datatypes that automatically satisfy given size or structural constraints. Using the framework we develop implementations of different matrix types (eg square matrices) and implementations of several tree types (eg Braun trees, ..."
Abstract
 Add to MetaCart
This paper describes a general framework for designing purely functional datatypes that automatically satisfy given size or structural constraints. Using the framework we develop implementations of different matrix types (eg square matrices) and implementations of several tree types (eg Braun trees, 23 trees). Consider, for instance, representing square /102/ matrices. The usual representation using lists of lists fails to meet the structural constraints: there is no way to ensure that the outer list and the inner lists have the same length. The main idea of our approach is to solve in a first step a related, but simpler problem, namely to generate the multiset of all square numbers. In order to describe this multiset we employ recursion equations involving finite multisets, multiset union, addition and multiplication lifted to multisets. In a second step we mechanically derive datatype definitions from these recursion equations, which enforce the `squareness' constraint. The transf...
Programming in Standard ML '97:
 Automatic Natural Language Parsing, Chlchester
, 1997
"... data types 44 7.1 Programming with abstract data types . . . . . . . . . . . . . . . . . . . . . . . . . 45 8 Imperative programming 47 8.1 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 8.2 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . ..."
Abstract
 Add to MetaCart
data types 44 7.1 Programming with abstract data types . . . . . . . . . . . . . . . . . . . . . . . . . 45 8 Imperative programming 47 8.1 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 8.2 Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 8.3 Sequential composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 8.4 Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 8.5 Types and imperative programming . . . . . . . . . . . . . . . . . . . . . . . . . . 50 8.5.1 Type safety conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 8.5.2 Implementing type safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 8.6 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 8.7 Memoisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....