Skip to main content

Alloy: Fast Generic Transformations for Haskell

Brown, Neil C.C. and Sampson, Adam T. (2009) Alloy: Fast Generic Transformations for Haskell. In: Haskell '09 Proceedings of the 2nd ACM SIGPLAN symposium on Haskell. ICFP International Conference on Functional Programming . ACM, New York, USA, pp. 182-196. ISBN 978-1-60558-508-6. (doi:10.1145/1596638.1596652) (KAR id:30595)

PDF Author's Accepted Manuscript
Language: English
Download (703kB)
[thumbnail of Alloy.pdf]
This file may not be suitable for users of assistive technology.
Request an accessible format
Official URL:


Data-type generic programming can be used to traverse and manipulate specific parts of large heterogeneously-typed tree structures, without the need for tedious boilerplate. Generic programming is often approached from a theoretical perspective, where the emphasis lies on the power of the representation rather than on efficiency. We describe use cases for a generic system derived from our work on a nanopass compiler, where efficiency is a real concern, and detail a new generics approach (Alloy) that we have developed in Haskell to allow our compiler passes to traverse the abstract syntax tree quickly. We benchmark our approach against several other Haskell generics approaches and statistically analyse the results, finding that Alloy is fastest on heterogeneously-typed trees.

Item Type: Book section
DOI/Identification number: 10.1145/1596638.1596652
Uncontrolled keywords: determinacy analysis, Craig interpolants
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Depositing User: Neil Brown
Date Deposited: 21 Sep 2012 09:49 UTC
Last Modified: 16 Nov 2021 10:08 UTC
Resource URI: (The current URI for this page, for reference purposes)
  • Depositors only (login required):


Downloads per month over past year