Hostname: page-component-6766d58669-l4t7p Total loading time: 0 Render date: 2026-05-15T05:36:50.373Z Has data issue: false hasContentIssue false

A lightweight approach to datatype-generic rewriting

Published online by Cambridge University Press:  27 September 2010

THOMAS VAN NOORT
Affiliation:
Institute for Computing and Information Sciences, Radboud University Nijmegen, P.O. Box 9010, 6500 GL Nijmegen, The Netherlands (e-mail: thomas@cs.ru.nl)
ALEXEY RODRIGUEZ YAKUSHEV
Affiliation:
Vector Fabrics, Paradijslaan 28, 5611 KN Eindhoven, The Netherlands (e-mail: alexey@vectorfabrics.com, stefan@vectorfabrics.com)
STEFAN HOLDERMANS
Affiliation:
Vector Fabrics, Paradijslaan 28, 5611 KN Eindhoven, The Netherlands (e-mail: alexey@vectorfabrics.com, stefan@vectorfabrics.com)
JOHAN JEURING
Affiliation:
Department of Information and Computing Sciences, Utrecht University, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands and School of Computer Science, Open University of the Netherlands, P.O. Box 2960, 6401 DL Heerlen, The Netherlands (e-mail: johanj@cs.uu.nl)
BASTIAAN HEEREN
Affiliation:
School of Computer Science, Open University of the Netherlands, P.O. Box 2960, 6401 DL Heerlen, The Netherlands (e-mail: bastiaan.heeren@ou.nl)
JOSÉ PEDRO MAGALHÃES
Affiliation:
Department of Information and Computing Sciences, Utrecht University, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands (e-mail: jpm@cs.uu.nl)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Term-rewriting systems can be expressed as generic programs parameterised over the shape of the terms being rewritten. Previous implementations of generic rewriting libraries require users to either adapt the datatypes that are used to describe these terms or to specify rewrite rules as functions. These are fundamental limitations: the former implies a lot of work for the user, while the latter makes it hard if not impossible to document, test, and analyze rewrite rules. In this article, we demonstrate how to overcome these limitations by making essential use of type-indexed datatypes. Our approach is lightweight in that it is entirely expressible in Haskell with GADTs and type families and can be readily packaged for use with contemporary Haskell distributions.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 2010
Submit a response

Discussions

No Discussions have been published for this article.