{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,2]],"date-time":"2026-10-02T08:02:08Z","timestamp":1790928128430,"version":"4.1.0"},"reference-count":60,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA1","license":[{"start":{"date-parts":[[2026,4,10]],"date-time":"2026-04-10T00:00:00Z","timestamp":1775779200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode"}],"funder":[{"DOI":"10.13039\/501100000038","name":"Natural Sciences and Engineering Research Council of Canada","doi-asserted-by":"publisher","award":["RGPIN-2023-04632"],"award-info":[{"award-number":["RGPIN-2023-04632"]}],"id":[{"id":"10.13039\/501100000038","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/100006502","name":"Defense Sciences Office, DARPA","doi-asserted-by":"publisher","award":["FA8750-24-C-B047"],"award-info":[{"award-number":["FA8750-24-C-B047"]}],"id":[{"id":"10.13039\/100006502","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/100006602","name":"Air Force Research Laboratory","doi-asserted-by":"publisher","award":["FA8750-24-C-B047"],"award-info":[{"award-number":["FA8750-24-C-B047"]}],"id":[{"id":"10.13039\/100006602","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2026,4,10]]},"abstract":"<jats:p>Multi-stage programming (MSP) languages such as MetaML have subtle semantics, in which familiar properties often fail to hold and hazardous interactions with other language features such as state or polymorphism abound. The ongoing incorporation of MSP features into general purpose languages makes the need to establish confidence in their design increasingly pressing.<\/jats:p>\n                  <jats:p>\n                    Taking inspiration from existing MSP systems, we present a Rocq mechanisation of a core calculus for compile-time and run-time MSP with effects,\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\">\n                        <mml:mrow>\n                          <mml:msubsup>\n                            <mml:mi>\u03bb<\/mml:mi>\n                            <mml:mrow>\n                              <mml:mtext>run<\/mml:mtext>\n                            <\/mml:mrow>\n                            <mml:mtext>$<\/mml:mtext>\n                          <\/mml:msubsup>\n                        <\/mml:mrow>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    , formally establishing key properties such as type and elaboration soundness and phase distinction. We hope that our mechanised semantics will be a useful basis for formal study of other designs, easing the extension of existing languages with support for MSP.\n                  <\/jats:p>","DOI":"10.1145\/3798260","type":"journal-article","created":{"date-parts":[[2026,4,10]],"date-time":"2026-04-10T14:33:43Z","timestamp":1775831623000},"page":"1654-1681","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Mechanised Semantics of Multi-stage Programming"],"prefix":"10.1145","volume":"10","author":[{"ORCID":"https:\/\/orcid.org\/0009-0001-7211-3632","authenticated-orcid":false,"given":"Ka Wing","family":"Li","sequence":"first","affiliation":[{"name":"University of Cambridge, Cambridge, United Kingdom"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0006-0623-2293","authenticated-orcid":false,"given":"Maite","family":"Kramarz","sequence":"additional","affiliation":[{"name":"University of Toronto, Toronto, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5961-1493","authenticated-orcid":false,"given":"Ningning","family":"Xie","sequence":"additional","affiliation":[{"name":"University of Toronto, Toronto, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-1650-6340","authenticated-orcid":false,"given":"Jeremy","family":"Yallop","sequence":"additional","affiliation":[{"name":"University of Cambridge, Cambridge, United Kingdom"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,4,10]]},"reference":[{"key":"e_1_3_2_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/1328438.1328443"},{"key":"e_1_3_2_3_1","unstructured":"Brian Aydemir and Stephanie Weirich. 2010. LNgen: Tool Support for Locally Nameless Representations. 933 (2010)."},{"key":"e_1_3_2_4_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPICS.ECOOP.2017.5"},{"key":"e_1_3_2_5_1","doi-asserted-by":"publisher","unstructured":"Eugene Burmako. 2017. Unification of Compile-Time and Runtime Metaprogramming in Scala. https:\/\/doi.org\/10.5075\/epflthesis-7159 10.5075\/epflthesis-7159","DOI":"10.5075\/epflthesis-7159"},{"key":"e_1_3_2_6_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796802004598"},{"key":"e_1_3_2_7_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-24725-8_7"},{"key":"e_1_3_2_8_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-39815-8_4"},{"key":"e_1_3_2_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/1929501.1929510"},{"key":"e_1_3_2_10_1","doi-asserted-by":"publisher","DOI":"10.1016\/J.SCIC0.2008.09.008"},{"key":"e_1_3_2_11_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796809007205"},{"key":"e_1_3_2_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/3579834"},{"key":"e_1_3_2_13_1","doi-asserted-by":"publisher","unstructured":"Arthur Chargu\u00e9raud. 2012. The Locally Nameless Representation. 49 3 (2012) 363\u2013408. https:\/\/doi.org\/10.1007\/s10817-011-9225-2 10.1007\/s10817-011-9225-2","DOI":"10.1007\/s10817-011-9225-2"},{"key":"e_1_3_2_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/3674649"},{"key":"e_1_3_2_15_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-25935-0_4"},{"key":"e_1_3_2_16_1","doi-asserted-by":"publisher","unstructured":"Rui Ge and Ronald Garcia. 2019. Refining semantics for multi-stage programming. J. Comput. Lang. 51 (2019) 222\u2013240. https:\/\/doi.org\/10.1016\/J.JVLC.2018.10.006 10.1016\/J.JVLC.2018.10.006","DOI":"10.1016\/J.JVLC.2018.10.006"},{"key":"e_1_3_2_17_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-07151-0_7"},{"key":"e_1_3_2_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/96709.96744"},{"key":"e_1_3_2_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/2541568.2541572"},{"key":"e_1_3_2_20_1","doi-asserted-by":"publisher","unstructured":"Danko Ilik. 2013. A formalized type-directed partial evaluator for shift and reset. In Proceedings First Workshop on Control Operators and their Semantics COS 2013 Eindhoven The Netherlands June 24-25 2013 (EPTCS Vol. 127) Ugo de\u2019Liguoro and Alexis Saurin (Eds.). 86\u2013100. https:\/\/doi.org\/10.4204\/EPTCS.127.6 10.4204\/EPTCS.127.6","DOI":"10.4204\/EPTCS.127.6"},{"key":"e_1_3_2_21_1","doi-asserted-by":"publisher","unstructured":"Jun Inoue and Walid Taha. 2016. Reasoning about Multi-Stage Programs. 26 (2016) e22. https:\/\/doi.org\/10.1017\/S0956796816000253 10.1017\/S0956796816000253","DOI":"10.1017\/S0956796816000253"},{"key":"e_1_3_2_22_1","doi-asserted-by":"publisher","unstructured":"Junyoung Jang Samuel G\u00e9lineau Stefan Monnier and Brigitte Pientka. 2022. M\u0153bius: Metaprogramming Using Contextual Types: The Stage Where System f Can Pattern Match on Itself. 6 (2022) 39:1\u201339:27. Issue POPL. https:\/\/doi.org\/10.1145\/3498700 10.1145\/3498700","DOI":"10.1145\/3498700"},{"key":"e_1_3_2_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/1328408.1328430"},{"key":"e_1_3_2_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/1480945.1480962"},{"key":"e_1_3_2_25_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796811000256"},{"key":"e_1_3_2_26_1","doi-asserted-by":"publisher","unstructured":"Yukiyoshi Kameyama Oleg Kiselyov and Chung-chieh Shan. 2015. Combinators for impure yet hygienic code generation. Sci. Comput. Program. 112 (2015) 120\u2013144. https:\/\/doi.org\/10.1016\/J.SCICO.2015.08.007 10.1016\/J.SCICO.2015.08.007","DOI":"10.1016\/J.SCICO.2015.08.007"},{"key":"e_1_3_2_27_1","unstructured":"Yukiyoshi Kameyama Oleg Kiselyov and Chung-chieh Shan. 2011b. Mechanizing Multilevel Metatheory with Control Effects. In Proceedings of 5th ACM SIGPLAN Workshop on Mechanizing Metatheory. Vol. 8."},{"key":"e_1_3_2_28_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-34175-6_4"},{"key":"e_1_3_2_29_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-07151-0_6"},{"key":"e_1_3_2_30_1","doi-asserted-by":"publisher","unstructured":"Oleg Kiselyov. 2015. Generating Code with Polymorphic let: A Ballad of Value Restriction Copying and Sharing. In Proceedings ML Family \/ OCaml Users and Developers workshops ML Family\/OCaml 2015 Vancouver Canada 3rd & 4th September 2015 (EPTCS Vol. 241) Jeremy Yallop and Damien Doligez (Eds.). 1\u201322. https:\/\/doi.org\/10.4204\/EPTCS.241.1 10.4204\/EPTCS.241.1","DOI":"10.4204\/EPTCS.241.1"},{"key":"e_1_3_2_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009880"},{"key":"e_1_3_2_32_1","doi-asserted-by":"publisher","unstructured":"Oleg Kiselyov Yukiyoshi Kameyama and Yuto Sudo. 2016. Refined Environment Classifiers - Type-and Scope-Safe Code Generation with Mutable Cells. In Programming Languages and Systems - 14th Asian Symposium APLAS 2016 Hanoi Vietnam November 21-23 2016 Proceedings (Lecture Notes in Computer Science Vol. 10017) Atsushi Igarashi (Ed.). 271\u2013291. https:\/\/doi.org\/10.1007\/978-3-319-47958-3_15 10.1007\/978-3-319-47958-3_15","DOI":"10.1007\/978-3-319-47958-3_15"},{"key":"e_1_3_2_33_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-25318-8_11"},{"key":"e_1_3_2_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3674648"},{"key":"e_1_3_2_35_1","doi-asserted-by":"publisher","unstructured":"Andr\u00e1s Kov\u00e1cs. 2022. Staged Compilation with Two-Level Type Theory. 6 (2022) 540\u2013569. Issue ICFP. https:\/\/doi.org\/10.1145\/3547641 10.1145\/3547641 arXiv:2209.09729 [cs]","DOI":"10.1145\/3547641"},{"key":"e_1_3_2_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3776681"},{"key":"e_1_3_2_37_1","doi-asserted-by":"publisher","unstructured":"Ka Wing Li Maite Kramarz Ningning Xie and Jeremy Yallop. 2026. Artifact for \"Mechanised Semantics of Multi-Stage Programming\". https:\/\/doi.org\/10.5281\/zenodo.18307307 10.5281\/zenodo.18307307","DOI":"10.5281\/zenodo.18307307"},{"key":"e_1_3_2_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/2364527.2364572"},{"key":"e_1_3_2_39_1","unstructured":"Geoffrey Mainland. 2013. Type-Safe Runtime Code Generation with (Typed) Template Haskell. https:\/\/www.cs.drexel.edu\/~gbm26\/2013\/05\/31\/type-safe-runtime-code-generation-with-typed-template-haskell\/."},{"key":"e_1_3_2_40_1","volume-title":"Lean4\/Src\/Lean\/Expr.Lean at 6fce8f7d \u00b7 Leanprover\/Lean4.","author":"Microsoft Research","year":"2024","unstructured":"Microsoft Research. 2024. Lean4\/Src\/Lean\/Expr.Lean at 6fce8f7d \u00b7 Leanprover\/Lean4. GitHub."},{"key":"e_1_3_2_41_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-49099-X_13"},{"key":"e_1_3_2_42_1","doi-asserted-by":"publisher","unstructured":"Junpei Oishi and Yukiyoshi Kameyama. 2017. Staging with Control: Type-Safe Multi-Stage Programming with Control Operators. 52 12 (2017) 29\u201340. https:\/\/doi.org\/10.1145\/3170492.3136049 10.1145\/3170492.3136049","DOI":"10.1145\/3170492.3136049"},{"key":"e_1_3_2_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/3136000.3136005"},{"key":"e_1_3_2_44_1","doi-asserted-by":"publisher","unstructured":"Lionel Parreaux Antoine Voizard Amir Shaikhha and Christoph E. Koch. 2017b. Unifying Analytic and Statically-Typed Quasiquotes. 2 (2017) 13:1\u201313:33. Issue POPL. https:\/\/doi.org\/10.1145\/3158101 10.1145\/3158101","DOI":"10.1145\/3158101"},{"key":"e_1_3_2_45_1","volume-title":"Programming Language Foundations","author":"Pierce Benjamin C.","year":"2024","unstructured":"Benjamin C. Pierce, Arthur Azevedo de Amorim, Chris Casinghino, Marco Gaboardi, Michael Greenberg, C\u0103t\u0103lin Hri\u0163cu, Vilhelm Sj\u00f6berg, Andrew Tolmach, and Brent Yorgey. 2024. Programming Language Foundations (version 6.7 ed.). Software Foundations, Vol. 2. Online."},{"key":"e_1_3_2_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/3704858"},{"key":"e_1_3_2_47_1","doi-asserted-by":"publisher","DOI":"10.1145\/3240719.3241788"},{"key":"e_1_3_2_48_1","first-page":"49","volume-title":"TOWARD A MATHEMATICAL SEMANTICS FOR COMPUTER LANGUAGES.","author":"Scott Dana","year":"1971","unstructured":"Dana Scott and Christopher Strachey. 1971. TOWARD A MATHEMATICAL SEMANTICS FOR COMPUTER LANGUAGES. Technical Report PRG06. OUCL. 49 pages."},{"key":"e_1_3_2_49_1","doi-asserted-by":"publisher","unstructured":"Peter Sewell Francesco Zappa Nardelli Scott Owens Gilles Peskine Thomas Ridge Susmit Sarkar and Rok Strni\u0161a. 2010. Ott: Effective Tool Support for the Working Semanticist. 20 1 (2010) 71\u2013122. https:\/\/doi.org\/10.1017\/S0956796809990293 10.1017\/S0956796809990293","DOI":"10.1017\/S0956796809990293"},{"key":"e_1_3_2_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/581690.581691"},{"key":"e_1_3_2_51_1","unstructured":"std++ team. 2024. Iris \/Stdpp. https:\/\/gitlab.mpi-sws.org\/iris\/stdpp."},{"key":"e_1_3_2_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/3278122.3278139"},{"key":"e_1_3_2_53_1","doi-asserted-by":"publisher","DOI":"10.1145\/3486609.3487203"},{"key":"e_1_3_2_54_1","unstructured":"Walid Taha. 1999. Multi-Stage Programming: Its Theory and Applications."},{"key":"e_1_3_2_55_1","doi-asserted-by":"publisher","unstructured":"Walid Taha and Tim Sheard. 2000. MetaML and Multi-Stage Programming with Explicit Annotations. 248 1 (2000) 211\u2013242. https:\/\/doi.org\/10.1016\/S0304-3975(00)00053-0 10.1016\/S0304-3975(00)00053-0","DOI":"10.1016\/S0304-3975(00)00053-0"},{"key":"e_1_3_2_56_1","doi-asserted-by":"publisher","DOI":"10.1006\/INCO.1994.1093"},{"key":"e_1_3_2_57_1","doi-asserted-by":"publisher","DOI":"10.1145\/3498723"},{"key":"e_1_3_2_58_1","doi-asserted-by":"publisher","unstructured":"Ningning Xie Leo White Olivier Nicole and Jeremy Yallop. 2023a. MacoCaml: Staging Composable and Compilable Macros. 7(2023). Issue lCFP. https:\/\/doi.org\/10.1145\/3607851 10.1145\/3607851","DOI":"10.1145\/3607851"},{"key":"e_1_3_2_59_1","doi-asserted-by":"publisher","DOI":"10.1145\/3607851"},{"key":"e_1_3_2_60_1","doi-asserted-by":"publisher","DOI":"10.1145\/3110273"},{"key":"e_1_3_2_61_1","article-title":"Modular Macros","author":"Yallop Jeremy","year":"2015","unstructured":"Jeremy Yallop and Leo White. 2015. Modular Macros. OCaml Users and Developers Workshop.","journal-title":"OCaml Users and Developers Workshop"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3798260","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3798260","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,26]],"date-time":"2026-09-26T11:21:06Z","timestamp":1790421666000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3798260"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,4,10]]},"references-count":60,"journal-issue":{"issue":"OOPSLA1","published-print":{"date-parts":[[2026,4,10]]}},"alternative-id":["10.1145\/3798260"],"URL":"https:\/\/doi.org\/10.1145\/3798260","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,4,10]]},"assertion":[{"value":"2025-10-10","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-02-17","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-04-10","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}