{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,29]],"date-time":"2026-10-29T06:17:50Z","timestamp":1793254670937,"version":"4.5.0"},"reference-count":94,"publisher":"Cambridge University Press (CUP)","license":[{"start":{"date-parts":[[2021,10,19]],"date-time":"2021-10-19T00:00:00Z","timestamp":1634601600000},"content-version":"unspecified","delay-in-days":291,"URL":"https:\/\/www.cambridge.org\/core\/terms"}],"content-domain":{"domain":["cambridge.org"],"crossmark-restriction":true},"short-container-title":["J. Funct. Prog."],"published-print":{"date-parts":[[2021]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>\n                    The syntax of almost every programming language includes a notion of binder and corresponding bound occurrences, along with the accompanying notions of \u03b1-equivalence, capture-avoiding substitution, typing contexts, runtime environments, and so on. In the past, implementing and reasoning about programming languages required careful handling to maintain the correct behaviour of bound variables. Modern programming languages include features that enable constraints like scope safety to be expressed in types. Nevertheless, the programmer is still forced to write the same boilerplate over again for each new implementation of a scope-safe operation (e.g., renaming, substitution, desugaring, printing), and then again for correctness proofs. We present an expressive universe of syntaxes with binding and demonstrate how to (1) implement scope-safe traversals once and for all by generic programming; and (2) how to derive properties of these traversals by generic proving. Our universe description, generic traversals and proofs, and our examples have all been formalised in Agda and are available in the accompanying material available online at\n                    <jats:uri xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" xlink:href=\"https:\/\/github.com\/gallais\/generic-syntax\">https:\/\/github.com\/gallais\/generic-syntax<\/jats:uri>\n                    .\n                  <\/jats:p>","DOI":"10.1017\/s0956796820000076","type":"journal-article","created":{"date-parts":[[2021,10,19]],"date-time":"2021-10-19T09:49:47Z","timestamp":1634636987000},"update-policy":"https:\/\/doi.org\/10.1017\/policypage","source":"Crossref","is-referenced-by-count":16,"title":["A type- and scope-safe universe of syntaxes with binding: their semantics and proofs"],"prefix":"10.1017","volume":"31","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-4091-657X","authenticated-orcid":false,"given":"GUILLAUME","family":"ALLAIS","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4414-5047","authenticated-orcid":false,"given":"ROBERT","family":"ATKEY","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9036-8252","authenticated-orcid":false,"given":"JAMES","family":"CHAPMAN","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1487-0886","authenticated-orcid":false,"given":"CONOR","family":"MCBRIDE","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6745-2560","authenticated-orcid":false,"given":"JAMES","family":"MCKINNA","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"56","published-online":{"date-parts":[[2021,10,19]]},"reference":[{"key":"S0956796820000076_ref20","doi-asserted-by":"publisher","DOI":"10.1016\/0167-6423(94)00022-0"},{"key":"S0956796820000076_ref39","unstructured":"Dagand, P. (2013) A cosmology of datatypes : reusability and dependent types. Ph.D. thesis. University of Strathclyde, Glasgow, UK."},{"key":"S0956796820000076_ref60","doi-asserted-by":"publisher","DOI":"10.1145\/242224.242477"},{"key":"S0956796820000076_ref8","first-page":"1","article-title":"Relative monads formalised","volume":"7","author":"Altenkirch","year":"2014","journal-title":"Journal of Formalized Reasoning."},{"key":"S0956796820000076_ref66","unstructured":"Keuchel, S. (2011 ) Generic Programming With Binders and Scope. Master\u2019s thesis. Utrecht University."},{"key":"S0956796820000076_ref81","doi-asserted-by":"publisher","DOI":"10.1007\/11617990_16"},{"key":"S0956796820000076_ref30","doi-asserted-by":"publisher","DOI":"10.1145\/1863543.1863547"},{"key":"S0956796820000076_ref53","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796809007291"},{"key":"S0956796820000076_ref88","volume-title":"Association for Computing Machinery and Morgan and Claypool","author":"Stump","year":"2016"},{"key":"S0956796820000076_ref29","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-54833-8_19"},{"key":"S0956796820000076_ref25","doi-asserted-by":"publisher","DOI":"10.1109\/LICS.1991.151645"},{"key":"S0956796820000076_ref51","unstructured":"Ghani, N. , Hamana, M. , Uustalu, T. & Vene, V. (2006) Representing cyclic structures as nested datatypes. Proceedings of 7th Trends in Functional Programming, 2006. Intellect. pp. 173\u2013188."},{"key":"S0956796820000076_ref24","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0037100"},{"key":"S0956796820000076_ref64","doi-asserted-by":"publisher","DOI":"10.1145\/3167098"},{"key":"S0956796820000076_ref2","doi-asserted-by":"publisher","DOI":"10.4204\/EPTCS.43.2"},{"key":"S0956796820000076_ref52","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-54833-8_18"},{"key":"S0956796820000076_ref62","unstructured":"Jander, P. (2019) Verifying Type-and-Scope Safe Program Transformations. Master\u2019s thesis. University of Edinburgh."},{"key":"S0956796820000076_ref93","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-03044-5_5"},{"key":"S0956796820000076_ref49","doi-asserted-by":"publisher","DOI":"10.1109\/LICS.1999.782615"},{"key":"S0956796820000076_ref77","doi-asserted-by":"publisher","DOI":"10.1145\/3167081"},{"key":"S0956796820000076_ref17","doi-asserted-by":"publisher","DOI":"10.1007\/11541868_4"},{"key":"S0956796820000076_ref42","first-page":"381","volume-title":"Indagationes Mathematicae","author":"de Bruijn","year":"1972"},{"key":"S0956796820000076_ref78","doi-asserted-by":"publisher","DOI":"10.7551\/mitpress\/2319.001.0001"},{"key":"S0956796820000076_ref84","doi-asserted-by":"publisher","DOI":"10.1145\/2628136.2628160"},{"key":"S0956796820000076_ref61","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796897002864"},{"key":"S0956796820000076_ref73","doi-asserted-by":"publisher","DOI":"10.1016\/S0049-237X(09)70189-2"},{"key":"S0956796820000076_ref75","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796803004829"},{"key":"S0956796820000076_ref7","doi-asserted-by":"publisher","DOI":"10.1145\/3018610.3018613"},{"key":"S0956796820000076_ref21","first-page":"265","article-title":"Universes for generic programs and proofs in dependent type theory","volume":"10","author":"Benke","year":"2003","journal-title":"Nordic Journal of Computing."},{"key":"S0956796820000076_ref10","doi-asserted-by":"publisher","DOI":"10.1017\/S095679681500009X"},{"key":"S0956796820000076_ref87","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-39634-2_29"},{"key":"S0956796820000076_ref11","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-60164-3_27"},{"key":"S0956796820000076_ref28","doi-asserted-by":"publisher","DOI":"10.1145\/1173706.1173724"},{"key":"S0956796820000076_ref44","doi-asserted-by":"publisher","DOI":"10.1145\/964001.964025"},{"key":"S0956796820000076_ref9","doi-asserted-by":"publisher","DOI":"10.2168\/LMCS-11(1:3)2015"},{"key":"S0956796820000076_ref6","unstructured":"Allais, G. (2018) agdarsec \u2013 Total parser combinators. JFLA 2018 Journ\u00e9es Francophones des Langages Applicatifs. Banyuls-sur-Mer, France. publi\u00e9 par les auteurs. pp. 45\u201359."},{"key":"S0956796820000076_ref27","doi-asserted-by":"publisher","DOI":"10.1017\/S095679681300018X"},{"key":"S0956796820000076_ref47","doi-asserted-by":"crossref","unstructured":"Eisenberg, R. A. (2020) Stitch: the sound type-indexed type checker (Functional Pearl). Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell, Haskell@ICFP 2020, Virtual Event, USA, August 7, 2020. ACM. pp. 39\u201353.","DOI":"10.1145\/3406088.3409015"},{"key":"S0956796820000076_ref16","unstructured":"Atkey, R. & Wood, J. (2018) Context constrained computation. 3rd Workshop on Type-Driven Development (TyDe \u201918), Extended Abstract."},{"key":"S0956796820000076_ref54","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-02273-9_11"},{"key":"S0956796820000076_ref40","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796814000069"},{"key":"S0956796820000076_ref91","doi-asserted-by":"publisher","DOI":"10.1145\/41625.41653"},{"key":"S0956796820000076_ref38","doi-asserted-by":"publisher","DOI":"10.1145\/3240719.3241787"},{"key":"S0956796820000076_ref5","first-page":"27","volume-title":"ACM SIGPLAN Notices","author":"Abel","year":"2013"},{"key":"S0956796820000076_ref37","first-page":"75","article-title":"Intuitionistic model constructions and normalization proofs","volume":"7","author":"Coquand","year":"1997","journal-title":"MSCS."},{"key":"S0956796820000076_ref59","doi-asserted-by":"publisher","DOI":"10.1109\/LICS.1994.316071"},{"key":"S0956796820000076_ref63","unstructured":"Jeffrey, A. (2011) Associativity for free! http:\/\/thread.gmane.org\/gmane.comp.lang.agda\/3259."},{"key":"S0956796820000076_ref65","doi-asserted-by":"publisher","DOI":"10.1145\/2544174.2500618"},{"key":"S0956796820000076_ref71","doi-asserted-by":"publisher","DOI":"10.1145\/1863523.1863529"},{"key":"S0956796820000076_ref90","unstructured":"Thibodeau, D. , Momigliano, A. & Pientka, B. (2016) A case-study in programming coinductive proofs: Howe\u2019s method. Technical report. Technical report, McGill University."},{"key":"S0956796820000076_ref13","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-48168-0_32"},{"key":"S0956796820000076_ref32","doi-asserted-by":"publisher","DOI":"10.1007\/s10817-011-9225-2"},{"key":"S0956796820000076_ref46","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-48959-2_11"},{"key":"S0956796820000076_ref69","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-28869-2_22"},{"key":"S0956796820000076_ref92","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(90)90147-A"},{"key":"S0956796820000076_ref33","doi-asserted-by":"publisher","DOI":"10.1145\/1088454.1088459"},{"key":"S0956796820000076_ref31","unstructured":"Chapman, J. M. (2009) Type checking and normalisation. Ph.D. thesis. University of Nottingham (UK)."},{"key":"S0956796820000076_ref34","doi-asserted-by":"publisher","DOI":"10.1145\/1411204.1411226"},{"key":"S0956796820000076_ref67","doi-asserted-by":"publisher","DOI":"10.1145\/2364394.2364403"},{"key":"S0956796820000076_ref22","doi-asserted-by":"publisher","DOI":"10.1007\/s10817-011-9219-0"},{"key":"S0956796820000076_ref83","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796802004495"},{"key":"S0956796820000076_ref79","doi-asserted-by":"publisher","DOI":"10.1016\/0168-0072(91)90067-V"},{"key":"S0956796820000076_ref14","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796897002839"},{"key":"S0956796820000076_ref19","unstructured":"Barber, A. (1996) Dual intuitionistic linear logic. Technical Report ECS-LFCS-96-347. LFCS, University of Edinburgh."},{"key":"S0956796820000076_ref3","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796819000170"},{"key":"S0956796820000076_ref4","unstructured":"Abel, A. , Momigliano, A. & Pientka, B. (2017) POPLMark Reloaded. Proceedings of the Logical Frameworks and Meta-Languages: Theory and Practice Workshop."},{"key":"S0956796820000076_ref43","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-21401-6_26"},{"key":"S0956796820000076_ref76","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796807006326"},{"key":"S0956796820000076_ref45","doi-asserted-by":"publisher","DOI":"10.1007\/BF01211308"},{"key":"S0956796820000076_ref89","first-page":"423","article-title":"Data types \u00e0 la carte","volume":"18","author":"Swiestra","year":"2008","journal-title":"Journal of Functional Programming."},{"key":"S0956796820000076_ref80","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(91)90052-4"},{"key":"S0956796820000076_ref35","unstructured":"Copello, E. (2017) On the Formalisation of the Metatheory of the Lambda Calculus and Languages with Binders. Ph.D. thesis. Universidad de la Rep\u00fablica (Uruguay)."},{"key":"S0956796820000076_ref55","doi-asserted-by":"publisher","DOI":"10.1145\/174675.178053"},{"key":"S0956796820000076_ref18","doi-asserted-by":"publisher","DOI":"10.1145\/3158104"},{"key":"S0956796820000076_ref68","doi-asserted-by":"crossref","unstructured":"Keuchel, S. , Weirich, S. & Schrijvers, T. (2016) Needle & Knot: Binder boilerplate tied up. Proceedings of the 25th European Symposium on Programming Languages and Systems - Volume 9632. Springer-Verlag New York, Inc. pp. 419\u2013445.","DOI":"10.1007\/978-3-662-49498-1_17"},{"key":"S0956796820000076_ref94","doi-asserted-by":"publisher","DOI":"10.1145\/2034773.2034818"},{"key":"S0956796820000076_ref1","first-page":"1","article-title":"\u03b4 for data: Differentiating data structures","volume":"65","author":"Abbott","year":"2005","journal-title":"Fundamenta Informaticae."},{"key":"S0956796820000076_ref26","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796899003366"},{"key":"S0956796820000076_ref56","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796898003153"},{"key":"S0956796820000076_ref15","unstructured":"Atkey, R. (2015) An algebraic approach to typechecking and elaboration. http:\/\/bentnib.org\/posts\/2015-04-19-algebraic-approach-typechecking-and-elaboration.html."},{"key":"S0956796820000076_ref41","doi-asserted-by":"publisher","DOI":"10.1145\/1863543.1863585"},{"key":"S0956796820000076_ref82","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-04652-0_5"},{"key":"S0956796820000076_ref48","unstructured":"\u00c9rdi, G. (2018) Generic description of well-scoped, well-typed syntaxes. CoRR. abs\/1804.00119."},{"key":"S0956796820000076_ref70","unstructured":"Licata, D. R. , Shulman, M. & Riley, M. (2017) A fibrational framework for substructural and modal logics. 2nd International Conference on Formal Structures for Computation and Deduction, FSCD 2017, September 3-9, 2017, Oxford, UK. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik. pp. 25:1\u201325:22.L\u00f6h, A. & Magalh\u00e3es, J. P. (2011) Generic programming with indexed functors. Proceedings of the seventh ACM SIGPLAN workshop on Generic programming, WGP@ICFP 2011, Tokyo, Japan, September 19-21, 2011. ACM. pp. 1\u201312."},{"key":"S0956796820000076_ref86","doi-asserted-by":"publisher","DOI":"10.1145\/345099.345100"},{"key":"S0956796820000076_ref12","doi-asserted-by":"crossref","unstructured":"Altenkirch, T. & McBride, C. (2002) Generic programming within dependently typed programming. Generic Programming, IFIP TC2\/WG2.1 Working Conference on Generic Programming, July 11-12, 2002, Dagstuhl, Germany. Kluwer. pp. 1\u201320.","DOI":"10.1007\/978-0-387-35672-3_1"},{"key":"S0956796820000076_ref23","doi-asserted-by":"publisher","DOI":"10.1007\/BFb0037099"},{"key":"S0956796820000076_ref50","doi-asserted-by":"publisher","DOI":"10.1007\/s001650200016"},{"key":"S0956796820000076_ref74","unstructured":"The Coq Development Team. (2017) The Coq proof assistant reference manual. \u03c0r 2 Team. Version 8.6."},{"key":"S0956796820000076_ref58","doi-asserted-by":"publisher","DOI":"10.1007\/s10817-010-9207-9"},{"key":"S0956796820000076_ref57","doi-asserted-by":"publisher","DOI":"10.1016\/S1571-0661(05)80542-0"},{"key":"S0956796820000076_ref72","doi-asserted-by":"publisher","DOI":"10.1016\/0167-6423(90)90023-7"},{"key":"S0956796820000076_ref36","doi-asserted-by":"publisher","DOI":"10.1023\/A:1019964114625"},{"key":"S0956796820000076_ref85","unstructured":"Pfenning, F. (2004) Lecture 17: Bidirectional type checking. 15-312: Foundations of Programming Languages."}],"container-title":["Journal of Functional Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S0956796820000076","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T22:36:56Z","timestamp":1779835016000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S0956796820000076\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021]]},"references-count":94,"alternative-id":["S0956796820000076"],"URL":"https:\/\/doi.org\/10.1017\/s0956796820000076","relation":{},"ISSN":["0956-7968","1469-7653"],"issn-type":[{"value":"0956-7968","type":"print"},{"value":"1469-7653","type":"electronic"}],"subject":[],"published":{"date-parts":[[2021]]},"assertion":[{"value":"\u00a9 The Author(s), 2021. Published by Cambridge University Press","name":"copyright","label":"Copyright","group":{"name":"copyright_and_licensing","label":"Copyright and Licensing"}}],"article-number":"e22"}}