A lightweight approach to datatype-generic rewriting

被引:5
|
作者
Van Noort, Thomas [1 ]
Yakushev, Alexey Rodriguez [2 ]
Holdermans, Stefan [2 ]
Jeuring, Johan [3 ,4 ]
Heeren, Bastiaan [4 ]
Magalhaes, Jose Pedro [3 ]
机构
[1] Radboud Univ Nijmegen, Inst Comp & Informat Sci, NL-6500 GL Nijmegen, Netherlands
[2] Vector Fabr, NL-5611 KN Eindhoven, Netherlands
[3] Univ Utrecht, Dept Informat & Comp Sci, NL-3508 TB Utrecht, Netherlands
[4] Open Univ Netherlands, Sch Comp Sci, NL-6401 DL Heerlen, Netherlands
关键词
LANGUAGE;
D O I
10.1017/S0956796810000183
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:375 / 413
页数:39
相关论文
共 50 条
  • [1] A Lightweight Approach to Datatype-Generic Rewriting
    van Noort, Thomas
    Rodriguez, Alexey
    Holdermans, Stefan
    Jeuring, Johan
    Heeren, Bastiaan
    [J]. WGP'08: PROCEEDINGS OF THE 2008 ACM SIGPLAN WORKSHOP ON GENERIC PROGRAMMING, 2008, : 13 - 24
  • [2] Datatype-generic reasoning
    Backhouse, Roland
    [J]. LOGICAL APPROACHES TO COMPUTATIONAL BARRIERS, PROCEEDINGS, 2006, 3988 : 21 - 34
  • [3] Datatype-generic programming
    Gibbons, Jeremy
    [J]. DATATYPE-GENERIC PROGRAMMING, 2007, 4719 : 1 - +
  • [4] Datatype-Generic Termination Proofs
    Roland Backhouse
    Henk Doornbos
    [J]. Theory of Computing Systems, 2008, 43 : 362 - 393
  • [5] Datatype-Generic Termination Proofs
    Backhouse, Roland
    Doornbos, Henk
    [J]. THEORY OF COMPUTING SYSTEMS, 2008, 43 (3-4) : 362 - 393
  • [6] Arity-Generic Datatype-Generic Programming
    Weirich, Stephanie
    Casinghino, Chris
    [J]. PLPV'10: PROCEEDINGS OF THE 2010 ACM SIGPLAN WORKSHOP ON PROGRAMMING LANGUAGES MEETS PROGRAM VERIFICATION, 2010, : 15 - 26
  • [7] Datatype-Generic Programming Meets Elaborator Reflection
    Ko, Hsiang-Shang
    Chen, Liang-Ting
    Lin, Tzu-Chi
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2022, 6 (ICFP):
  • [8] A Formal Comparison of Approaches to Datatype-Generic Programming
    Magalhaes, Jose Pedro
    Loeh, Andres
    [J]. ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2012, (76): : 50 - 67
  • [9] System F-omega with Equirecursive Types for Datatype-Generic Programming
    Cai, Yufei
    Giarrusso, Paolo G.
    Ostermann, Klaus
    [J]. ACM SIGPLAN NOTICES, 2016, 51 (01) : 30 - 43
  • [10] Constructing Datatype-Generic Fully Polynomial-Time Approximation Schemes Using Generalised Thinning
    Mu, Shin-Cheng
    Lyu, Yu-Han
    Morihata, Akimasa
    [J]. WGP 2010: PROCEEDINGS OF THE 2010 ACM SIGPLAN WORKSHOP ON GENERIC PROGRAMMING, 2010, : 97 - 108