On the implementation of construction functions for non-free concrete data types release_sbgd6cz46je2xgw5lop2rf75da

by Frédéric Blanqui, Thérèse Hardin

Released as a article .

2007  

Abstract

Many algorithms use concrete data types with some additional invariants. The set of values satisfying the invariants is often a set of representatives for the equivalence classes of some equational theory. For instance, a sorted list is a particular representative wrt commutativity. Theories like associativity, neutral element, idempotence, etc. are also very common. Now, when one wants to combine various invariants, it may be difficult to find the suitable representatives and to efficiently implement the invariants. The preservation of invariants throughout the whole program is even more difficult and error prone. Classically, the programmer solves this problem using a combination of two techniques: the definition of appropriate construction functions for the representatives and the consistent usage of these functions ensured via compiler verifications. The common way of ensuring consistency is to use an abstract data type for the representatives; unfortunately, pattern matching on representatives is lost. A more appealing alternative is to define a concrete data type with private constructors so that both compiler verification and pattern matching on representatives are granted. In this paper, we detail the notion of private data type and study the existence of construction functions. We also describe a prototype, called Moca, that addresses the entire problem of...
In text/plain format

Archived Files and Locations

application/pdf  254.7 kB
file_7hza3xpzljdlhbds56jyayuasi
archive.org (archive)
Read Archived PDF
Preserved and Accessible
Type  article
Stage   submitted
Date   2007-01-05
Version   v1
Language   en ?
arXiv  cs/0701031v1
Work Entity
access all versions, variants, and formats of this works (eg, pre-prints)
Catalog Record
Revision: a1cc2f38-42ee-4fd8-aadb-e906f5f73e44
API URL: JSON