Publication View

Proceedings of the Workshop on Algorithmic Aspects of Advanced Programming Languages WAAAPL'99 (1999)

Abstract
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, 2-3 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...

Publication details
Download http://citeseerx.ist.psu.edu/viewdoc/summary?doi=?doi=10.1.1.39.5334
Source http://www.cs.columbia.edu/~cdo/waaapl99.pdf
Contributors CiteSeerX
Repository CiteSeerX - Scientific Literature Digital Library and Search Engine (United States)
Keywords Ricardo Peña, Yolanda Ortega, and Fernando Rubio (Universidad Complutense de Madrid, Spain
Type text
Language English
Relation 10.1.1.54.6229, 10.1.1.46.3691