ACM Home Page
Please provide us with feedback. Feedback
Scrap your nameplate: (functional pearl)
Full text PdfPdf (225 KB)
Source International Conference on Functional Programming archive
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming table of contents
Tallinn, Estonia
SESSION: Session 7 table of contents
Pages: 180 - 191  
Year of Publication: 2005
ISBN:1-59593-064-7
Also published in ...
Author
James Cheney  University of Edinburgh, Edinburgh, United Kingdom
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 12,   Downloads (12 Months): 47,   Citation Count: 4
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Review this Article  
Save this Article to a Binder    Display Formats: BibTex  EndNote ACM Ref   
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1086365.1086389
What is a DOI?

ABSTRACT

Recent research has shown how boilerplate code, or repetitive code for traversing datatypes, can be eliminated using generic programming techniques already available within some implementations of Haskell. One particularly intractable kind of boilerplate is nameplate, or code having to do with names, name-binding, and fresh name generation. One reason for the difficulty is that operations on data structures involving names, as usually implemented, are not regular instances of standard map, fold, or zip operations. However, in nominal abstract syntax, an alternative treatment of names and binding based on swapping, operations such as α-equivalence, capture-avoiding substitution, and free variable set functions are much better-behaved.In this paper, we show how nominal abstract syntax techniques similar to those of FreshML can be provided as a Haskell library called FreshLib. In addition, we show how existing genericmprogramming techniques can be used to reduce the amount of nameplate code that needs to be written for new datatypes involving names and binding to almost nothing—in short, how to scrap your nameplate.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Glasgow Parallel Haskell, June 2005. http://www.macs.hw.ac.uk/-~dsg/gph/.
 
2
M. Abadi, L. Cardelli, P.-L. Curien, and J.-J. Lévy. Explicit substitutions. Journal of Functional Programming, 1(4):375--416, 1991.
 
3
 
4
Lennart Augustsson, Mikael Rittri, and Dan Synek. On generating unique names. J. Funct. Program., 4(1):117--123, 1994.
 
5
Brian E. Aydemir, Aaron Bohannon, Matthew Fairbairn, J. Nathan Foster, Benjamin C. Pierce, Peter Sewell, Dimitrios Vytiniotis, Geoffrey Washburn, Stephanie Weirich, and Steve Zdancewic. Mechanized metatheory for the masses: The POPLmark Challenge. In Proceedings of the Eighteenth International Conference on Theorem Proving in Higher Order Logics (TPHOLs 2005), 2005. To appear.
6
 
7
J. Cheney and C. Urban. Alpha-Prolog: A logic programming language with names, binding and alpha-equivalence. In Proc. 20th Int. Conf. on Logic Programming (ICLP 2004), number 3132 in LNCS, pages 269--283, 2004.
8
 
9
N. G. de Bruijn. Lambda-calculus notation with nameless dummies, a tool for automatic formula manipulation. Indagationes Mathematicae, 34(5):381--392, 1972.
 
10
 
11
M. J. Gabbay and A. M. Pitts. A new approach to abstract syntax with variable binding. Formal Aspects of Computing, 13:341--363, 2002.
12
 
13
Ralf Hinze and Simon Peyton Jones. Derivable type classes. In Graham Hutton, editor, Proceedings of the 2000 ACM SIGPLAN Haskell Workshop, volume 41.1 of Electronic Notes in Theoretical Computer Science. Elsevier, 2001.
 
14
J. Hughes. Restricted data types in Haskell. In E. Meijer, editor, Proceedings of the 1999 Haskell Workshop, number UU-CS-1999-28 in Technical report, Utrecht University, Department of Computer Science, 1999.
 
15
16
17
18
 
19
Ralf Lämmel and Simon Peyton Jones. Scrap your boilerplate with class. In Benjamin Pierce, editor, Proceedings of the 10th International Conference on Functional Programming (ICFP 2005), Tallinn, Estonia, 2005.
 
20
Andres Löh and Johan Jeuring (editors). The Generic Haskell user's guide, version 1.42 - coral release. Technical Report UU-CS-2005-004, Utrecht University, 2005.
 
21
 
22
 
23
G. Nadathur and D. Miller. Higher-order logic programming. In D. M. Gabbay, C. J. Hogger, and J. A. Robinson, editors, Handbook of Logic in Artificial Intelligence and Logic Programming, volume 5,chapter 8, pages 499--590. Oxford University Press, 1998.
24
 
25
 
26
 
27
François Pottier. An overview of Cαml, June 2005. Available at http://cristal.inria.fr/~fpottier/publis/-fpottier-alphacaml.pdf.
 
28
Tim Sheard, March 2005. Personal communication.
29
30
 
31
Olin Shivers and Mitchell Wand. Bottom-up β-reduction: Uplinks and λ-DAGs. In M. Sagiv, editor, Proceedings of the 14th European Symposium on Programming (ESOP 2005), number 3444 in LNCS, pages 217--232, 2005.
 
32
 
33
 
34
C. Urban and C. Tasson. Nominal techniques in Isabelle/HOL. In Proceedings of the 20th International Conference on Automated Deduction (CADE 2005), 2005. To appear.
 
35
Phil Wadler, Andrew Pitts, and Koen Claessen, September 2003. Personal communication.