{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T01:08:41Z","timestamp":1760058521058,"version":"build-2065373602"},"reference-count":36,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA1","license":[{"start":{"date-parts":[[2025,4,9]],"date-time":"2025-04-09T00:00:00Z","timestamp":1744156800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/100016744","name":"Naval Information Warfare Center Pacific","doi-asserted-by":"publisher","award":["NN66001-22-C-4027"],"award-info":[{"award-number":["NN66001-22-C-4027"]}],"id":[{"id":"10.13039\/100016744","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/100000185","name":"Defense Advanced Research Projects Agency","doi-asserted-by":"publisher","award":["NN66001-22-C-4027"],"award-info":[{"award-number":["NN66001-22-C-4027"]}],"id":[{"id":"10.13039\/100000185","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/501100000038","name":"Natural Sciences and Engineering Research Council of Canada","doi-asserted-by":"publisher","award":["RGPIN-2019-04207"],"award-info":[{"award-number":["RGPIN-2019-04207"]}],"id":[{"id":"10.13039\/501100000038","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":[[2025,4,9]]},"abstract":"<jats:p>Type-preserving compilation seeks to make intent as much as a part of compilation as computation. Specifications of intent in the form of types are preserved and exploited during compilation and linking, alongside the mere computation of a program. This provides lightweight guarantees for compilation, optimization, and linking. Unfortunately, type-preserving compilation typically interferes with important optimizations. In this paper, we study typed closure representation and optimization. We analyze limitations in prior typed closure conversion representations, and the requirements of many important closure optimizations. We design a new typed closure representation in our Flat-Closure Calculus (FCC) that admits all these optimizations, prove type safety and subject reduction of FCC, prove type preservation from an existing closure converted IR to FCC, and implement common closure optimizations for FCC.<\/jats:p>","DOI":"10.1145\/3720437","type":"journal-article","created":{"date-parts":[[2025,4,9]],"date-time":"2025-04-09T13:48:26Z","timestamp":1744206506000},"page":"649-675","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["Type-Preserving Flat Closure Optimization"],"prefix":"10.1145","volume":"9","author":[{"ORCID":"https:\/\/orcid.org\/0009-0008-8137-7577","authenticated-orcid":false,"given":"Adam T.","family":"Geller","sequence":"first","affiliation":[{"name":"University of British Columbia, Vancouver, Canada"}]},{"ORCID":"https:\/\/orcid.org\/0009-0007-5231-8618","authenticated-orcid":false,"given":"Sean","family":"Bocirnea","sequence":"additional","affiliation":[{"name":"University of British Columbia, Vancouver, Canada"}]},{"ORCID":"https:\/\/orcid.org\/0009-0000-6365-7171","authenticated-orcid":false,"given":"Chester J. F.","family":"Gould","sequence":"additional","affiliation":[{"name":"University of British Columbia, Vancouver, Canada"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0325-3305","authenticated-orcid":false,"given":"Paulette","family":"Koronkevich","sequence":"additional","affiliation":[{"name":"University of British Columbia, Vancouver, Canada"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-6402-4840","authenticated-orcid":false,"given":"William J.","family":"Bowman","sequence":"additional","affiliation":[{"name":"University of British Columbia, Vancouver, Canada"}]}],"member":"320","published-online":{"date-parts":[[2025,4,9]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/1411204.1411227"},{"volume-title":"Compiling with Continuations","author":"Appel Andrew W.","key":"e_1_2_1_2_1","unstructured":"Andrew W. Appel. 2006. Compiling with Continuations (second ed.). Cambridge University Press."},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/3192366.3192372"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","unstructured":"Luca Cardelli. 1984. Compiling a functional language. In LISP and Functional Programming (LFP). https:\/\/doi.org\/10.1145\/800055.802037 10.1145\/800055.802037","DOI":"10.1145\/800055.802037"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/1806596.1806612"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796801004282"},{"volume-title":"Three Implementation Models for Scheme. Ph. D","author":"Dybvig R. Kent","key":"e_1_2_1_7_1","unstructured":"R. Kent Dybvig. 1987. Three Implementation Models for Scheme. Ph. D. Dissertation. Chapel Hill. https:\/\/www.cs.unm.edu\/~williams\/cs491\/three-imp.pdf"},{"key":"e_1_2_1_8_1","volume-title":"Robert Bruce Findler, and Matthew Flatt","author":"Felleisen Matthias","year":"2009","unstructured":"Matthias Felleisen, Robert Bruce Findler, and Matthew Flatt. 2009. Semantics Engineering with PLT Redex. MIT Press. isbn:978-0-262-06275-6 https:\/\/mitpress.mit.edu\/9780262062756\/"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.14941604"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/3062341.3062363"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1016\/0020-0190(95)00178-6"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/99583.99603"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/2661103.2661106"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/2103656.2103691"},{"key":"e_1_2_1_15_1","unstructured":"Andr\u00e1s Kov\u00e1cs. 2018. Closure Conversion for Dependent Type Theory with Type-Passing Polymorphism. In International Workshop on Types for Proofs and Programs (TYPES). https:\/\/github.com\/AndrasKovacs\/misc-stuff\/blob\/master\/MemControl\/types2018\/abstract-types-2018-cconv.pdf"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/143165.143205"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10817-009-9155-4"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/237721.237791"},{"key":"e_1_2_1_19_1","doi-asserted-by":"crossref","unstructured":"Yasuhiko Minamide Greg Morrisett and Robert Harper. 1996. Typed Closure Conversion. https:\/\/www.cs.cmu.edu\/~rwh\/papers\/closures\/tr.pdf","DOI":"10.1145\/237721.237791"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/3290325"},{"volume-title":"Compiling with Types. Ph. D. Dissertation","author":"Morrisett Greg","key":"e_1_2_1_21_1","unstructured":"Greg Morrisett. 1995. Compiling with Types. Ph. D. Dissertation. Carnegie Mellon University. https:\/\/www.cs.cmu.edu\/~rwh\/theses\/morrisett.pdf"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1016\/s1571-0661(05)80702-9"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/319301.319345"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/2951913.2951941"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/3371126"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-61055-3_27"},{"volume-title":"Types and Programming Languages","author":"Pierce Benjamin C.","key":"e_1_2_1_27_1","unstructured":"Benjamin C. Pierce. 2002. Types and Programming Languages. MIT Press Ltd. isbn:0-262-16209-1"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/315891.315934"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/182409.156783"},{"key":"e_1_2_1_30_1","volume-title":"RABBIT: A Compiler for SCHEME (A Study in Compiler Optimization). MIT Artificial Intelligence Lab. https:\/\/dspace.mit.edu\/bitstream\/handle\/1721.1\/6913\/AITR-474.pdf","author":"Steele Guy Lewis","year":"1978","unstructured":"Guy Lewis Steele Jr. 1978. RABBIT: A Compiler for SCHEME (A Study in Compiler Optimization). MIT Artificial Intelligence Lab. https:\/\/dspace.mit.edu\/bitstream\/handle\/1721.1\/6913\/AITR-474.pdf"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/2676726.2676985"},{"volume-title":"Design and implementation of code optimizations for a type-directed compiler for Standard ML. Ph. D. Dissertation","author":"Tarditi David","key":"e_1_2_1_32_1","unstructured":"David Tarditi. 1996. Design and implementation of code optimizations for a type-directed compiler for Standard ML. Ph. D. Dissertation. Carnegie Mellon University. https:\/\/csd.cmu.edu\/sites\/default\/files\/phd-thesis\/CMU-CS-97-108.pdf"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/231379"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-55511-0_15"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1016\/0890-5401(91)90050-C"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1994.1093"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3720437","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3720437","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T17:12:11Z","timestamp":1760029931000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3720437"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,4,9]]},"references-count":36,"journal-issue":{"issue":"OOPSLA1","published-print":{"date-parts":[[2025,4,9]]}},"alternative-id":["10.1145\/3720437"],"URL":"https:\/\/doi.org\/10.1145\/3720437","relation":{},"ISSN":["2475-1421"],"issn-type":[{"type":"electronic","value":"2475-1421"}],"subject":[],"published":{"date-parts":[[2025,4,9]]},"assertion":[{"value":"2024-10-16","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-02-18","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-04-09","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}