The HERMIT in the Tree - Mechanizing Program Transformations in the GHC Core Language

This paper describes our experience using the HERMIT toolkit to apply well-known transformations to the internal core language of the Glasgow Haskell Compiler. HERMIT provides several mechanisms to support writing general-purpose transformations: a domain-specific language for strategic programming specialized to GHC’s core language, a library of primitive rewrites, and a shell-style–based scripting language for interactive and batch usage.

[1]  Huiqing Li,et al.  Refactoring with wrangler, updated: data and process refactorings, and integration with eclipse , 2008, ERLANG '08.

[2]  Richard S. Bird,et al.  Tabulation Techniques for Recursive Programs , 1980, CSUR.

[3]  Simon L. Peyton Jones,et al.  Giving Haskell a promotion , 2012, TLDI '12.

[4]  Nicolas Frisby,et al.  The Kansas University rewrite engine - A Haskell-Embedded Strategic Programming Language with Custom Closed Universes , 2014, J. Funct. Program..

[5]  Alberto Pettorossi,et al.  A powerful strategy for deriving efficient programs by transformation , 1984, LFP '84.

[6]  John Darlington,et al.  A Transformation System for Developing Recursive Programs , 1977, J. ACM.

[7]  David A. Schmidt,et al.  Denotationaisemantics: a methodology for language development , 1986 .

[8]  Graham Hutton,et al.  Work it, wrap it, fix it, fold it , 2014, J. Funct. Program..

[9]  Peter Gammie,et al.  The Worker/Wrapper Transformation , 2009, Arch. Formal Proofs.

[10]  Andy Gill Introducing the Haskell equational reasoning assistant , 2006, Haskell '06.

[11]  Simon L. Peyton Jones,et al.  The Implementation of Functional Programming Languages , 1987 .

[12]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[13]  Simon Peyton Jones,et al.  Playing by the rules: rewriting as a practical optimisation technique in GHC , 2001 .

[14]  S. Jones,et al.  A Transformation-Based Optimiser for Haskell , 1998, Sci. Comput. Program..

[15]  Alan Bundy,et al.  Constructing Induction Rules for Deductive Synthesis Proofs , 2006, CLASE.

[16]  Wei-Ngan Chin,et al.  Redundant Call Elimination via Tupling , 2006, Fundam. Informaticae.

[17]  Graham Hutton,et al.  Programming in Haskell , 2007 .

[18]  Simon L. Peyton Jones,et al.  System F with type equality coercions , 2007, TLDI '07.

[19]  P. Hudak,et al.  Path, a program transformation system for haskell , 2002 .

[20]  Ed Komp,et al.  The HERMIT in the machine: a plugin for the interactive transformation of GHC core language programs , 2012, Haskell.

[21]  John Hughes,et al.  A Novel Representation of Lists and its Application to the Function "reverse" , 1986, Inf. Process. Lett..

[22]  Akihiko Takano,et al.  Tupling calculation eliminates multiple data traversals , 1997, ICFP '97.

[23]  Simon Peyton Jones,et al.  The Implementation of Functional Programming Languages (Prentice-hall International Series in Computer Science) , 1987 .

[24]  Philip Wadler The Concatenate Vanishes , 1987 .

[25]  Ton Vullinghs,et al.  Tool Support for the Interactive Derivation of Formally Correct Functional Programs , 2003, J. Univers. Comput. Sci..

[26]  Simon L. Peyton Jones,et al.  Unboxed Values as First Class Citizens in a Non-Strict Functional Language , 1991, FPCA.

[27]  André L. M. Santos,et al.  Compilation by transformation in non-strict functional languages , 1995 .

[28]  Huiqing Li,et al.  The Haskell Refactorer, HaRe, and its API , 2005, Electron. Notes Theor. Comput. Sci..

[29]  Yanhong A. Liu,et al.  Dynamic Programming via Static Incrementalization , 1999, High. Order Symb. Comput..