The HERMIT in the machine: a plugin for the interactive transformation of GHC core language programs

Farmer, A., Gill, A., Komp, E. and Sculthorpe, N. ORCID: 0000-0002-7244-0916, 2012. The HERMIT in the machine: a plugin for the interactive transformation of GHC core language programs. ACM SIGPLAN Notices, 47 (12), pp. 1-12. ISSN 0362-1340

[img]
Preview
Text
PS29357_Sculthorpe.pdf - Post-print

Download (409kB) | Preview

Abstract

The importance of reasoning about and refactoring programs is a central tenet of functional programming. Yet our compilers and development toolchains only provide rudimentary support for these tasks. This paper introduces a programmatic and compiler-centric interface that facilitates refactoring and equational reasoning. To develop our ideas, we have implemented HERMIT, a toolkit enabling informal but systematic transformation of Haskell programs from inside the Glasgow Haskell Compiler’s optimization pipeline. With HERMIT, users can experiment with optimizations and equational reasoning, while the tedious heavy lifting of performing the actual transformations is done for them. HERMIT provides a transformation API that can be used to build higher-level rewrite tools. One use-case is prototyping new optimizations as clients of this API before being committed to the GHC toolchain. We describe a HERMIT application - a read-eval-print shell for performing transformations using HERMIT. We also demonstrate using this shell to prototype an optimization on a specific example, and report our initial experiences and remaining challenges.

Item Type: Journal article
Publication Title: ACM SIGPLAN Notices
Creators: Farmer, A., Gill, A., Komp, E. and Sculthorpe, N.
Publisher: ACM
Date: 2012
Volume: 47
Number: 12
ISSN: 0362-1340
Identifiers:
NumberType
10.1145/2430532.2364508DOI
Divisions: Schools > School of Science and Technology
Record created by: Richard Cross
Date Added: 13 Dec 2016 14:25
Last Modified: 09 Jun 2017 14:09
URI: https://irep.ntu.ac.uk/id/eprint/29357

Actions (login required)

Edit View Edit View

Views

Views per month over past year

Downloads

Downloads per month over past year