Results 1 
7 of
7
Generalizing Generalized Tries
, 1999
"... A trie is a search tree scheme that employs the structure of search keys to organize information. Tries were originally devised as a means to represent a collection of records indexed by strings over a fixed alphabet. Based on work by C.P. Wadsworth and others, R.H. Connelly and F.L. Morris generali ..."
Abstract

Cited by 35 (8 self)
 Add to MetaCart
A trie is a search tree scheme that employs the structure of search keys to organize information. Tries were originally devised as a means to represent a collection of records indexed by strings over a fixed alphabet. Based on work by C.P. Wadsworth and others, R.H. Connelly and F.L. Morris generalized the concept to permit indexing by elements of an arbitrary monomorphic datatype. Here we go one step further and define tries and operations on tries generically for arbitrary firstorder polymorphic datatypes. The derivation is based on techniques recently developed in the context of polytypic programming. It is well known that for the implementation of generalized tries nested datatypes and polymorphic recursion are needed. Implementing tries for polymorphic datatypes places even greater demands on the type system: it requires rank2 type signatures and higherorder polymorphic nested datatypes. Despite these requirements the definition of generalized tries for polymorphic datatypes is...
Manufacturing Datatypes
, 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

Cited by 24 (3 self)
 Add to MetaCart
(Show Context)
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 n \Theta n 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 tra...
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...
Perfect Trees and Bitreversal Permutations
, 1999
"... A famous algorithm is the Fast Fourier Transform, or FFT. An efficient iterative version of the FFT algorithm performs as a first step a bitreversal permutation of the input list. The bitreversal permutation swaps elements whose indices have binary representations that are the reverse of each othe ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
A famous algorithm is the Fast Fourier Transform, or FFT. An efficient iterative version of the FFT algorithm performs as a first step a bitreversal permutation of the input list. The bitreversal permutation swaps elements whose indices have binary representations that are the reverse of each other. Using an amortized approach this operation can be made to run in linear time on a randomaccess machine. An intriguing question is whether a lineartime implementation is also feasible on a pointer machine, that is in a purely functional setting. We show that the answer to this question is in the affirmative. In deriving a solution we employ several advanced programming language concepts such as nested datatypes, associated fold and unfold operators, rank2 types, and polymorphic recursion. 1 Introduction A bitreversal permutation operates on lists whose length is n = 2 k for some natural number k and swaps elements whose indices have binary representations that are the reverse of eac...
First balance sheet of a formal approach in the teaching of Data Structures
"... A formal method, eb, inspired by B method, has been used for the first time for teaching “data structures”. Starting on one hand from a set oriented specification of an abstract type and on the other from the specification of an implementation, method eb favours the calculation of the representation ..."
Abstract
 Add to MetaCart
(Show Context)
A formal method, eb, inspired by B method, has been used for the first time for teaching “data structures”. Starting on one hand from a set oriented specification of an abstract type and on the other from the specification of an implementation, method eb favours the calculation of the representation of concrete operations. We present the principle of this approach as well as several examples. The context of its application in a data structures teaching module is then detailed. A first balance sheet is drawn up.
Categories and Subject Descriptors
"... The abstract data type onesided flexible array, also called randomaccess list, supports lookup and update of elements and can grow and shrink at one end. We describe a purely functional implementation based on weightbalanced multiway trees that is both simple and versatile. A novel feature of the ..."
Abstract
 Add to MetaCart
(Show Context)
The abstract data type onesided flexible array, also called randomaccess list, supports lookup and update of elements and can grow and shrink at one end. We describe a purely functional implementation based on weightbalanced multiway trees that is both simple and versatile. A novel feature of the representation is that the running time of the operations can be tailored to one’s needs—even dynamically at arraycreation time. In particular, one can trade the running time of lookup operations for the running time of update operations. For instance, if the multiway trees have a fixed degree, the operations take Θ(log n) time, where n is the size of the flexible array. If the degree doubles levelwise, lookup speeds up to Θ ( √ logn) while update slows down to Θ(2 √ logn). We show that different tree shapes can be conveniently modelled after mixedradix number systems.
Bootstrapping Onesided Flexible Arrays
"... The abstract data type onesided flexible array, also called randomaccess list, supports lookup and update of elements and can grow and shrink at one end. We describe a purely functional implementation based on weightbalanced multiway trees that is both simple and versatile. A novel feature of the ..."
Abstract
 Add to MetaCart
(Show Context)
The abstract data type onesided flexible array, also called randomaccess list, supports lookup and update of elements and can grow and shrink at one end. We describe a purely functional implementation based on weightbalanced multiway trees that is both simple and versatile. A novel feature of the representation is that the running time of the operations can be tailored to one’s needs—even dynamically at arraycreation time. In particular, one can trade the running time of lookup operations for the running time of update operations. For instance, if the multiway trees have a fixed degree, the operations take Θ log n time, where n is the size of the flexible array. If the degree doubles levelwise, lookup speeds up to Θ logn while update slows down to Θ 2 logn. We show that different tree shapes can be conveniently modelled after mixedradix number systems.