Alloy: fast generic transformations for Haskell

Neil C.C. Brown, Adam T. Sampson

Research output: Chapter in Book/Report/Conference proceedingConference contribution

8 Citations (Scopus)

Abstract

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.
Original languageEnglish
Title of host publicationProceedings of the 2nd ACM SIGPLAN symposium on Haskell
Place of PublicationNew York
PublisherAssociation for Computing Machinery (ACM)
Pages105-116
Number of pages12
ISBN (Print)9781605585086
DOIs
Publication statusPublished - 3 Sep 2009
Event2nd ACM SIGPLAN symposium on Haskell3/9/2003 - Edinburgh, United Kingdom
Duration: 3 Sep 20093 Sep 2009
Conference number: 2nd

Other

Other2nd ACM SIGPLAN symposium on Haskell3/9/2003
Abbreviated titleHaskell 2009
CountryUnited Kingdom
CityEdinburgh
Period3/09/093/09/09

Cite this

Brown, N. C. C., & Sampson, A. T. (2009). Alloy: fast generic transformations for Haskell. In Proceedings of the 2nd ACM SIGPLAN symposium on Haskell (pp. 105-116). New York: Association for Computing Machinery (ACM). https://doi.org/10.1145/1596638.1596652
Brown, Neil C.C. ; Sampson, Adam T. / Alloy : fast generic transformations for Haskell. Proceedings of the 2nd ACM SIGPLAN symposium on Haskell. New York : Association for Computing Machinery (ACM), 2009. pp. 105-116
@inproceedings{db76146f5bd84c37bdffea558b90d25a,
title = "Alloy: fast generic transformations for Haskell",
abstract = "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.",
author = "Brown, {Neil C.C.} and Sampson, {Adam T.}",
year = "2009",
month = "9",
day = "3",
doi = "10.1145/1596638.1596652",
language = "English",
isbn = "9781605585086",
pages = "105--116",
booktitle = "Proceedings of the 2nd ACM SIGPLAN symposium on Haskell",
publisher = "Association for Computing Machinery (ACM)",
address = "United States",

}

Brown, NCC & Sampson, AT 2009, Alloy: fast generic transformations for Haskell. in Proceedings of the 2nd ACM SIGPLAN symposium on Haskell. Association for Computing Machinery (ACM), New York, pp. 105-116, 2nd ACM SIGPLAN symposium on Haskell3/9/2003, Edinburgh, United Kingdom, 3/09/09. https://doi.org/10.1145/1596638.1596652

Alloy : fast generic transformations for Haskell. / Brown, Neil C.C.; Sampson, Adam T.

Proceedings of the 2nd ACM SIGPLAN symposium on Haskell. New York : Association for Computing Machinery (ACM), 2009. p. 105-116.

Research output: Chapter in Book/Report/Conference proceedingConference contribution

TY - GEN

T1 - Alloy

T2 - fast generic transformations for Haskell

AU - Brown, Neil C.C.

AU - Sampson, Adam T.

PY - 2009/9/3

Y1 - 2009/9/3

N2 - 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.

AB - 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.

U2 - 10.1145/1596638.1596652

DO - 10.1145/1596638.1596652

M3 - Conference contribution

SN - 9781605585086

SP - 105

EP - 116

BT - Proceedings of the 2nd ACM SIGPLAN symposium on Haskell

PB - Association for Computing Machinery (ACM)

CY - New York

ER -

Brown NCC, Sampson AT. Alloy: fast generic transformations for Haskell. In Proceedings of the 2nd ACM SIGPLAN symposium on Haskell. New York: Association for Computing Machinery (ACM). 2009. p. 105-116 https://doi.org/10.1145/1596638.1596652