{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,25]],"date-time":"2026-09-25T06:52:16Z","timestamp":1790319136387,"version":"4.1.0"},"reference-count":40,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2017,8,29]],"date-time":"2017-08-29T00:00:00Z","timestamp":1503964800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2017,8,29]]},"abstract":"<jats:p>Traversing and transforming abstract syntax trees that involve name binding is notoriously difficult to do in a correct, concise, modular, customizable manner. We address this problem in the setting of OCaml, a functional programming language equipped with powerful object-oriented features. We use visitor classes as partial, composable descriptions of the operations that we wish to perform on abstract syntax trees. We introduce \"visitors\", a simple type-directed facility for generating visitor classes that have no knowledge of binding. Separately, we present \"alphaLib\", a library of small hand-written visitor classes, each of which knows about a specific binding construct, a specific representation of names, and\/or a specific operation on abstract syntax trees. By combining these components, a wide range of operations can be defined. Multiple representations of names can be supported, as well as conversions between representations. Binding structure can be described either in a programmatic style, by writing visitor methods, or in a declarative style, via preprogrammed binding combinators.<\/jats:p>","DOI":"10.1145\/3110272","type":"journal-article","created":{"date-parts":[[2017,8,29]],"date-time":"2017-08-29T18:19:41Z","timestamp":1504030781000},"page":"1-28","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":6,"title":["Visitors unchained"],"prefix":"10.1145","volume":"1","author":[{"given":"Fran\u00e7ois","family":"Pottier","sequence":"first","affiliation":[{"name":"Inria, France"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2017,8,29]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"crossref","unstructured":"Guillaume Allais James Chapman Conor McBride and James McKinna. 2017. Type-and-scope Safe Programs and Their Proofs . In Certified Programs and Proofs (CPP). 195\u2013207.  Guillaume Allais James Chapman Conor McBride and James McKinna. 2017. Type-and-scope Safe Programs and Their Proofs . In Certified Programs and Proofs (CPP). 195\u2013207.","DOI":"10.1145\/3018610.3018613"},{"key":"e_1_2_1_2_1","doi-asserted-by":"crossref","unstructured":"Brian Aydemir Arthur Chargu\u00e9raud Benjamin C. Pierce Randy Pollack and Stephanie Weirich. 2008. Engineering Formal Metatheory . In Principles of Programming Languages (POPL). 3\u201315.  Brian Aydemir Arthur Chargu\u00e9raud Benjamin C. Pierce Randy Pollack and Stephanie Weirich. 2008. Engineering Formal Metatheory . In Principles of Programming Languages (POPL). 3\u201315.","DOI":"10.1145\/1328897.1328443"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0054285"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796899003366"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/1086365.1086389"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-54434-1_19"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/237721.237805"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1007\/s001650200016"},{"key":"e_1_2_1_10_1","volume-title":"Design Patterns: Elements of Reusable Object-oriented Software","author":"Gamma Erich","year":"1995"},{"key":"e_1_2_1_11_1","volume-title":"International Spring School on Datatype-Generic Programming (Lecture Notes in Computer Science)","author":"Gibbons Jeremy"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/138027.138060"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-04652-0_4"},{"key":"e_1_2_1_14_1","unstructured":"Steven Keuchel and Tom Schrijvers. 2015. InBound: simple yet powerful specification of syntax with binders . (2015). Unpublished.  Steven Keuchel and Tom Schrijvers. 2015. InBound: simple yet powerful specification of syntax with binders . (2015). Unpublished."},{"key":"e_1_2_1_15_1","volume-title":"European Symposium on Programming (ESOP) (Lecture Notes in Computer Science)","volume":"9632","author":"Keuchel Steven","year":"2016"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-36089-3_18"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/1086365.1086391"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-28869-2_22"},{"key":"e_1_2_1_19_1","unstructured":"Xavier Leroy Damien Doligez Alain Frisch Jacques Garrigue Didier R\u00e9my and J\u00e9r\u00f4me Vouillon. 2016. The OCaml system: documentation and user\u2019s manual . (2016).  Xavier Leroy Damien Doligez Alain Frisch Jacques Garrigue Didier R\u00e9my and J\u00e9r\u00f4me Vouillon. 2016. The OCaml system: documentation and user\u2019s manual . (2016)."},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-44957-4_16"},{"key":"e_1_2_1_21_1","unstructured":"Yaron Minsky Anil Madhavapeddy and Jason Hickey. 2013. Real World OCaml: Functional programming for the masses . O\u2019Reilly.  Yaron Minsky Anil Madhavapeddy and Jason Hickey. 2013. Real World OCaml: Functional programming for the masses . O\u2019Reilly."},{"key":"e_1_2_1_22_1","unstructured":"Gopalan Nadathur and Dale Miller. 1988. An Overview of Lambda-Prolog . In Logic Programming. 810\u2013827.  Gopalan Nadathur and Dale Miller. 1988. An Overview of Lambda-Prolog . In Logic Programming. 810\u2013827."},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-46669-8_9"},{"key":"e_1_2_1_24_1","article-title":"Secrets of the Glasgow Haskell Compiler inliner","volume":"12","author":"Jones Simon Peyton","year":"2002","journal-title":"Journal of Functional Programming"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/1328438.1328483"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.entcs.2005.11.039"},{"key":"e_1_2_1_27_1","unstructured":"Fran\u00e7ois Pottier. 2017a. AlphaLib. https:\/\/gitlab.inria.fr\/fpottier\/alphalib . (2017).  Fran\u00e7ois Pottier. 2017a. AlphaLib. https:\/\/gitlab.inria.fr\/fpottier\/alphalib . (2017)."},{"key":"e_1_2_1_28_1","unstructured":"Fran\u00e7ois Pottier. 2017b. The visitors package. https:\/\/gitlab.inria.fr\/fpottier\/visitors . (2017).  Fran\u00e7ois Pottier. 2017b. The visitors package. https:\/\/gitlab.inria.fr\/fpottier\/visitors . (2017)."},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796812000251"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1002\/(SICI)1096-9942(1998)4:1%3C27::AID-TAPO3%3E3.0.CO;2-4"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-22102-1_24"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796809990293"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.entcs.2005.11.040"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/944705.944729"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(93)90240-T"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10817-008-9097-2"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.tcs.2004.06.016"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/1159842.1159844"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/2034773.2034818"},{"key":"e_1_2_1_40_1","doi-asserted-by":"crossref","unstructured":"Hongwei Xi Chiyan Chen and Gang Chen. 2003. Guarded Recursive Datatype Constructors . In Principles of Programming Languages (POPL). 224\u2013235.  Hongwei Xi Chiyan Chen and Gang Chen. 2003. Guarded Recursive Datatype Constructors . In Principles of Programming Languages (POPL). 224\u2013235.","DOI":"10.1145\/640128.604150"},{"key":"e_1_2_1_41_1","unstructured":"Hongbo Zhang and Steve Zdancewic. 2013. Fan: compile-time metaprogramming for OCaml . (2013). Unpublished.  Hongbo Zhang and Steve Zdancewic. 2013. Fan: compile-time metaprogramming for OCaml . (2013). Unpublished."}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3110272","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3110272","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T04:38:44Z","timestamp":1750221524000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3110272"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2017,8,29]]},"references-count":40,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2017,8,29]]}},"alternative-id":["10.1145\/3110272"],"URL":"https:\/\/doi.org\/10.1145\/3110272","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2017,8,29]]},"assertion":[{"value":"2017-08-29","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}