ACM Home Page
Please provide us with feedback. Feedback
A lightweight approach to datatype-generic rewriting
Full text PdfPdf (258 KB)
Source
International Conference on Functional Programming archive
Proceedings of the ACM SIGPLAN workshop on Generic programming table of contents
Victoria, BC, Canada
SESSION: Session 1 table of contents
Pages 13-24  
Year of Publication: 2008
ISBN:978-1-60558-060-9
Authors
Thomas van Noort  Radboud University Nijmegen, Nijmegen, Netherlands
Alexey Rodriguez  Utrecht University, Utrecht, Netherlands
Stefan Holdermans  Utrecht University, Utrecht, Netherlands
Johan Jeuring  Utrecht University, Utrecht, and Open University of the Netherlands, Heerlen, Netherlands
Bastiaan Heeren  Open University of the Netherlands, Heerlen, Netherlands
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): n/a,   Downloads (12 Months): n/a,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1411318.1411321
What is a DOI?

ABSTRACT

Previous implementations of generic rewriting libraries have a number of limitations: they require the user to either adapt the datatype on which rewriting is applied, or the rewriting rules are specified as functions, which makes it hard or impossible to document, test, and analyse them. We describe a library that demonstrates how to overcome these limitations by defining rules in terms of datatypes, and show how to use a type-indexed datatype to automatically extend a datatype for syntax trees with a case for metavariables. We then show how rewrite rules can be implemented without any knowledge of how the datatype is extended with metavariables. We use Haskell, extended with associated type synonyms, to implement both type-indexed datatypes and generic functions. We analyse the performance of our library and compare it with other approaches to generic rewriting.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Artem Alimarine and Sjaak Smetsers. Improved fusion for optimizing generics. In Manuel V. Hermenegildo and Daniel Cabeza, editors, Practical Aspects of Declarative Languages, 7th International Symposium, PADL 2005, Long Beach, CA, USA, January 10-11, 2005, Proceedings, volume 3350 of Lecture Notes in Computer Science, pages 203--218. Springer-Verlag, 2005.
 
2
Peter Borovanský, Claude Kirchner, Hélèene Kirchner, and Christophe Ringeissen. Rewriting with strategies in ELAN: A functional semantics. International Journal of Foundations of Computer Science, 12(1): 69--95, 2001.
3
 
4
Neil C. C. Brown and Adam T. Sampson. Matching and modifying with generics. In Peter Achten, Pieter Koopman, and Marco T. Morazán, editors, Draft Proceedings of the Ninth Symposium on Trends in Functional Programming (TFP), May 26-28 2008, Center Parcs 'Het Heijderbos', The Netherlands, pages 304--318, 2008. The draft proceedings of the symposium have been published as a technical report (ICIS-R08007) at Radboud University Nijmegen.
5
 
6
Manuel M. T. Chakravarty, Gabriele Keller, Roman Leshchinskiy, and Simon Peyton Jones. Generic programming with type families, 2008. Work in progress.
7
8
 
9
 
10
 
11
 
12
Stefan Holdermans, Johan Jeuring, Andres Löh, and Alexey Rodriguez. Generic views on data types. In Tarmo Uustalu, editor, Mathemathics of Program Construction, 8th International Conference, MPC 2006, Kuressaare, Estonia, July 3-5, 2006, Proceedings, volume 4014 of Lecture Notes in Computer Science, pages 209--234. Springer-Verlag, 2006.
 
13
 
14
Patrik Jansson and Johan Jeuring. A framework for polytypic programming on terms, with an application to rewriting. In Johan Jeuring, editor, Proceedings Workshop on Generic Programming (WGP2000), July 6, 2000, Ponte de Lima, Portugal, pages 33--45, 2000. The proceedings of the workshop have been published as a technical report (UU-CS-2000-19) at Utrecht University.
15
 
16
17
 
18
19
 
20
Thomas van Noort. Generic views for generic types. Master's thesis, Utrecht University, 2008.
 
21
Ulf Norell and Patrik Jansson. Polytypic programming in Haskell. In Philip W. Trinder, Greg Michaelson, and Ricardo Pena, editors, Implementation of Programming Languages, 15th International Workshop, IFL 2003, Edinburgh, UK, September 8-11, 2003, Revised Papers, volume 3145 of Lecture Notes in Computer Science, pages 168--184. Springer-Verlag, 2004.
22
 
23
Alexey Rodriguez, Stefan Holdermans, Andres Löh, and Johan Jeuring. Generic programming with fixed points for mutually recursive datatypes. Technical Report UU-CS-2008-019, Utrecht University, 2008.
24
25

Collaborative Colleagues:
Thomas van Noort: colleagues
Alexey Rodriguez: colleagues
Stefan Holdermans: colleagues
Johan Jeuring: colleagues
Bastiaan Heeren: colleagues