On the implementation of construction functions for non-free concrete data types
Fr\'ed\'eric Blanqui (INRIA Lorraine - LORIA), Th\'er\`ese Hardin, (LIP6), Pierre Weis (INRIA Rocquencourt)

TL;DR
This paper explores how to implement construction functions for non-free concrete data types with invariants, proposing a method to ensure correctness and pattern matching, and introduces a prototype called Moca.
Contribution
It provides a detailed study of private data types, their construction functions, and presents Moca, a prototype addressing invariant preservation and pattern matching.
Findings
Private data types enable pattern matching and invariant preservation.
Construction functions can be systematically defined for non-free data types.
Moca prototype demonstrates practical implementation of these concepts.
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Advanced Database Systems and Queries · Logic, Reasoning, and Knowledge
