A Haskell Hosted DSL for Writing Transformation Systems

  • Andy Gill
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5658)


KURE is a Haskell hosted Domain Specific Language (DSL) for writing transformation systems based on rewrite strategies. When writing transformation systems, a significant amount of engineering effort goes into setting up plumbing to make sure that specific rewrite rules can fire. Systems like Stratego and Strafunski provide most of this plumbing as infrastructure, allowing the DSL user to focus on the rewrite rules. KURE is a strongly typed strategy control language in the tradition of Stratego and Strafunski. It is intended for writing reasonably efficient rewrite systems, makes use of type families to provide a delimited generic mechanism for tree rewriting, and provides support for efficient identity rewrite detection.


Program Transformation Syntax Tree Tree Traversal Identity Preserve Universal Type 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Peyton Jones, S. (ed.): Haskell 98 Language and Libraries – The Revised Report. Cambridge University Press, Cambridge (2003)zbMATHGoogle Scholar
  2. 2.
    Sheard, T., Peyton Jones, S.: Template metaprogramming for Haskell. In: Chakravarty, M.M.T. (ed.) ACM SIGPLAN Haskell Workshop 2002, pp. 1–16. ACM Press, New York (2002)Google Scholar
  3. 3.
    Chakravarty, M.M.T., Keller, G., Jones, S.P.: Associated type synonyms. In: ICFP 2005: Proceedings of the tenth ACM SIGPLAN international conference on Functional programming, pp. 241–253. ACM, New York (2005)CrossRefGoogle Scholar
  4. 4.
    Visser, E.: Program transformation with Stratego/XT: Rules, strategies, tools, and systems in StrategoXT-0.9. In: Lengauer, C., Batory, D., Consel, C., Odersky, M. (eds.) Domain-Specific Program Generation. LNCS, vol. 3016, pp. 216–238. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  5. 5.
    Lämmel, R., Visser, J.: Typed Combinators for Generic Traversal. In: Krishnamurthi, S., Ramakrishnan, C.R. (eds.) PADL 2002. LNCS, vol. 2257, pp. 137–154. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  6. 6.
    Gill, A.: Introducing the Haskell Equational Reasoning Assistant. In: Proceedings of the 2006 ACM SIGPLAN Workshop on Haskell, pp. 108–109. ACM Press, New York (2006)CrossRefGoogle Scholar
  7. 7.
    Hutton, G., Meijer, E.: Monadic parsing in Haskell. Journal of Functional Programing 8(4), 437–444 (1998)CrossRefzbMATHGoogle Scholar
  8. 8.
    Lämmel, R., Peyton Jones, S.: Scrap your boilerplate: a practical design pattern for generic programming. ACM SIGPLAN Notices 38(3), 26–37 (2003); Proc. of the ACM SIGPLAN Workshop on Types in Language Design and Implementation (TLDI 2003) CrossRefGoogle Scholar
  9. 9.
    Bravenboer, M., van Dam, A., Olmos, K., Visser, E.: Program transformation with scoped dynamic rewrite rules. Fundamenta Informaticae 69(1–2), 123–178 (2006)MathSciNetzbMATHGoogle Scholar
  10. 10.
    Dolstra, E.: Functional stratego. In: Visser, E. (ed.) Proceedings of the Second Stratego Users Day (SUD 2001), pp. 10–17 (2001)Google Scholar
  11. 11.
    Dolstra, E.: First-class rules and generic traversal for program transformation languages. Master’s thesis, Utrecht University, Utrecht, The Netherlands, INF/SCR-2001-15 (August 2001)Google Scholar
  12. 12.
    Dolstra, E., Visser, E.: First-class rules and generic traversal. Technical Report UU-CS-2001-38, Institute of Information and Computing Sciences, Utrecht University, Utrecht, The Netherlands (2001)Google Scholar
  13. 13.
    Hall, C., Hammond, K., Jones, S.P., Wadler, P.: Type classes in Haskell. ACM Transactions on Programming Languages and Systems 18, 241–256 (1996)CrossRefGoogle Scholar
  14. 14.
    Borovansky, P., Kirchner, C., Kirchner, H., Ringeissen, C.: Rewriting with strategies in ELAN: A functional semantics. International Journal of Foundations of Computer Science 1, 69–95 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Leijen, D., Meijer, E.: Domain specific embedded compilers. In: 2nd USENIX Conference on Domain Specific Languages (DSL 1999), Austin, Texas, October 1999, pp. 109–122 (1999)Google Scholar
  16. 16.
    Lämmel, R., Visser, J.: Type-safe functional strategies. In: Scottish Functional Programming Workshop (2000)Google Scholar
  17. 17.
    Liang, S., Hudak, P., Jones, M.: Monad transformers and modular interpreters. In: ACM (ed.) Conference record of POPL 1995, 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Francisco, California, pp. 333–343. ACM Press, New York (1995)Google Scholar
  18. 18.
    Hughes, J.: Generalising monads to arrows. Science of Computer Programming 37, 67–111 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Appel, A.W.: Modern Compiler Implementation in Java, 2nd edn. Cambridge University Press, Cambridge (2002)CrossRefzbMATHGoogle Scholar
  20. 20.
    Jones, M.P., Diatchki, I.S.: Language and program design for functional dependencies. In: Haskell 2008: Proceedings of the first ACM SIGPLAN symposium on Haskell, pp. 87–98. ACM, New York (2008)CrossRefGoogle Scholar
  21. 21.
    Gill, A., Hutton, G.: The worker/wrapper transformation. Journal of Functional Programming 19(2), 227–251 (2009)CrossRefzbMATHGoogle Scholar
  22. 22.
    Visser, E., Benaissa, Z., Tolmach, A.: Building program optimizers with rewriting strategies. In: Proceedings of the third ACM SIGPLAN International Conference on Functional Programming (ICFP 1998), pp. 13–26. ACM Press, New York (1998)CrossRefGoogle Scholar
  23. 23.
    Visser, E.: A survey of rewriting strategies in program transformation systems. In: Gramlich, B., Lucas, S. (eds.) Workshop on Reduction Strategies in Rewriting and Programming (WRS 2001), Utrecht, The Netherlands. Electronic Notes in Theoretical Computer Science, vol. 57. Elsevier Science Publishers, Amsterdam (2001)Google Scholar
  24. 24.
    Weaver, P., Kimmell, G., Frisby, N., Alexander, P.: Constructing language processors with algebra combinators. In: GPCE 2007: Proceedings of the 6th international conference on Generative programming and component engineering, pp. 155–164. ACM, New York (2007)Google Scholar
  25. 25.
    Harrison, W.L., Kamin, S.N.: Metacomputation-based compiler architecture. In: Mathematics of Program Construction, pp. 213–229 (2000)Google Scholar
  26. 26.
    Balland, E., Moreau, P.E., Reilles, A.: Rewriting strategies in Java. Electron. Notes Theor. Comput. Sci. 219, 97–111 (2008)CrossRefGoogle Scholar
  27. 27.
    Mainland, G.: Why it’s nice to be quoted: quasiquoting for Haskell. In: Haskell 2007: Proceedings of the ACM SIGPLAN workshop on Haskell, pp. 73–82. ACM, New York (2007)Google Scholar

Copyright information

© IFIP International Federation for Information Processing 2009

Authors and Affiliations

  • Andy Gill
    • 1
  1. 1.Information Technology and Telecommunication Center, Department of Electrical Engineering and Computer ScienceThe University of KansasLawrence

Personalised recommendations