{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,22]],"date-time":"2026-09-22T11:07:38Z","timestamp":1790075258695,"version":"4.0.1"},"reference-count":62,"publisher":"Association for Computing Machinery (ACM)","issue":"PLDI","license":[{"start":{"date-parts":[[2026,6,8]],"date-time":"2026-06-08T00:00:00Z","timestamp":1780876800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode"}],"funder":[{"DOI":"10.13039\/100000001","name":"National Science Foundation","doi-asserted-by":"publisher","award":["2212537"],"award-info":[{"award-number":["2212537"]}],"id":[{"id":"10.13039\/100000001","id-type":"DOI","asserted-by":"publisher"}]},{"DOI":"10.13039\/100000001","name":"National Science Foundation","doi-asserted-by":"publisher","award":["2212538"],"award-info":[{"award-number":["2212538"]}],"id":[{"id":"10.13039\/100000001","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,6,8]]},"abstract":"<jats:p>\n                    One of the key implementation challenges for higher-order functional languages is managing the representation of first-class function values. The standard approach to this problem is\n                    <jats:italic toggle=\"yes\">closure conversion,<\/jats:italic>\n                    which is a compiler transformation that introduces an explicit data structure to represent the environment of a function value. Constructing the closure for a nested function usually involves copying data from the enclosing function\u2019s closure. To avoid this copying, one might use linked representations, but that choice makes variable access slow and can introduce space leaks. Shao and Appel developed an effective closure converter that reduces copying and is safe-for-space, but their converter is based on a weak, first-order analysis.\n                  <\/jats:p>\n                  <jats:p>In this paper, we present a new safe-for-space closure converter that uses a higher-order flow analysis to inform closure-representation decisions. We describe how this information can be used to improve two aspects of closure optimization: sharing heap-allocated tuples of variables and spreading variables into argument registers. We have implemented our converter in the Standard ML of New Jersey system and demonstrated that it produces better code on average than the Shao and Appel converter, with significant performance gains for some benchmarks.<\/jats:p>","DOI":"10.1145\/3808262","type":"journal-article","created":{"date-parts":[[2026,6,8]],"date-time":"2026-06-08T18:04:09Z","timestamp":1780941849000},"page":"379-404","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Flow-Analysis-Based Closure Optimization"],"prefix":"10.1145","volume":"10","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-5881-298X","authenticated-orcid":false,"given":"John","family":"Reppy","sequence":"first","affiliation":[{"name":"University of Chicago, Chicago, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8171-386X","authenticated-orcid":false,"given":"Olin","family":"Shivers","sequence":"additional","affiliation":[{"name":"Northeastern University, Boston, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0006-8671-3547","authenticated-orcid":false,"given":"Byron","family":"Zhong","sequence":"additional","affiliation":[{"name":"University of Chicago, Chicago, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,6,8]]},"reference":[{"key":"e_1_3_2_2_2","doi-asserted-by":"publisher","DOI":"10.1145\/2746325.2746327"},{"key":"e_1_3_2_3_2","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-54444-5_83"},{"key":"e_1_3_2_4_2","doi-asserted-by":"publisher","DOI":"10.5555\/129099"},{"key":"e_1_3_2_5_2","volume-title":"Optimizing Closure Environment Representations","author":"Appel Andrew W.","year":"1988","unstructured":"Andrew W. Appel and Trevor Jim. 1988. Optimizing Closure Environment Representations. Technical Report CS-TR-168-88. Princeton University, Princeton, NJ, USA. Available from https:\/\/www.cs.princeton.edu\/research\/techreps\/696."},{"key":"e_1_3_2_6_2","doi-asserted-by":"publisher","DOI":"10.1145\/75277.75303"},{"key":"e_1_3_2_7_2","doi-asserted-by":"publisher","DOI":"10.1007\/BF01807505"},{"key":"e_1_3_2_8_2","doi-asserted-by":"publisher","DOI":"10.1145\/258948.258953"},{"key":"e_1_3_2_9_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-16478-1_6"},{"key":"e_1_3_2_10_2","doi-asserted-by":"publisher","DOI":"10.1145\/3591260"},{"key":"e_1_3_2_11_2","doi-asserted-by":"publisher","DOI":"10.1145\/800055.802037"},{"key":"e_1_3_2_12_2","doi-asserted-by":"publisher","DOI":"10.1145\/3747516"},{"key":"e_1_3_2_13_2","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-46425-5_4"},{"key":"e_1_3_2_14_2","doi-asserted-by":"publisher","DOI":"10.1145\/53990.53999"},{"key":"e_1_3_2_15_2","doi-asserted-by":"publisher","DOI":"10.1145\/3462172.3462193"},{"key":"e_1_3_2_16_2","doi-asserted-by":"publisher","DOI":"10.1145\/507635.507640"},{"key":"e_1_3_2_17_2","doi-asserted-by":"publisher","DOI":"10.4204\/EPTCS.285.5"},{"key":"e_1_3_2_18_2","doi-asserted-by":"publisher","DOI":"10.1145\/3385412.3385994"},{"key":"e_1_3_2_19_2","doi-asserted-by":"publisher","DOI":"10.1145\/3462172.3462191"},{"key":"e_1_3_2_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/1248648.1248656"},{"key":"e_1_3_2_21_2","doi-asserted-by":"publisher","DOI":"10.1017\/S095679680000085X"},{"key":"e_1_3_2_22_2","doi-asserted-by":"publisher","DOI":"10.1145\/258915.258939"},{"key":"e_1_3_2_23_2","first-page":"94","volume-title":"Approximation Algorithms for NP-Hard Problems","author":"Hochbaum Dorit S.","year":"1997","unstructured":"Dorit S. Hochbaum. 1997. Approximating Covering and Packing Problems: Set Cover, Vertex Cover, Independent Set, and Related Problems. In Approximation Algorithms for NP-Hard Problems, Dorit S. Hochbaum (Ed.). PWS Publishing, Boston, MA, USA, Chapter 3, 94\u2013143."},{"key":"e_1_3_2_24_2","volume-title":"Intel Advanced Performance Extensions (Intel APX): Architecture Specification","author":"Intel Corporation","year":"2026","unstructured":"Intel Corporation 2026. Intel Advanced Performance Extensions (Intel APX): Architecture Specification. Intel Corporation."},{"key":"e_1_3_2_25_2","doi-asserted-by":"publisher","DOI":"10.1093\/comjnl\/6.4.308"},{"key":"e_1_3_2_26_2","doi-asserted-by":"publisher","DOI":"10.1145\/2858949.2784736"},{"key":"e_1_3_2_27_2","doi-asserted-by":"publisher","DOI":"10.1145\/143165.143205"},{"key":"e_1_3_2_28_2","unstructured":"Xavier Leroy. 1997. The Effectiveness of Type-Based Unboxing. In Proceedings of the 1997 ACM SIGPLAN Workshop on Types in Compilation (TIC \u201897). HAL Amsterdam Netherlands 1\u20138. Available at https:\/\/inria.hal.science\/hal-01499964\/document."},{"key":"e_1_3_2_29_2","doi-asserted-by":"publisher","DOI":"10.1145\/2187671.2187672"},{"key":"e_1_3_2_30_2","volume-title":"Subcubic Control Flow Analysis Algorithms","author":"Midtgaard Jan","year":"2009","unstructured":"Jan Midtgaard and David Van Horn. 2009. Subcubic Control Flow Analysis Algorithms. Computer Science Research Report 125. Roskilde University, Roskilde, Denmark."},{"key":"e_1_3_2_31_2","volume-title":"MLton, a Whole Program Optimizing Compiler for Standard ML","year":"2025","unstructured":"MLton 2025. MLton, a Whole Program Optimizing Compiler for Standard ML. MLton. http:\/\/mlton.org"},{"key":"e_1_3_2_32_2","doi-asserted-by":"publisher","DOI":"10.1145\/155332.155353"},{"key":"e_1_3_2_33_2","unstructured":"Steven S. Muchnick. 1998. Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers Inc. San Francisco CA USA."},{"key":"e_1_3_2_34_2","doi-asserted-by":"publisher","DOI":"10.1145\/3341687"},{"key":"e_1_3_2_35_2","doi-asserted-by":"publisher","DOI":"10.1145\/99370.99377"},{"key":"e_1_3_2_36_2","doi-asserted-by":"publisher","DOI":"10.1145\/330249.330250"},{"key":"e_1_3_2_37_2","doi-asserted-by":"publisher","unstructured":"Fran\u00e7ois Pottier and Nadji Gauthier. 2006. Polymorphic Typed Defunctionalization and Concretization. Higher-Order and Symbolic Computation 19 (2006) 125\u2013162. doi:10.1007\/s10990-006-8611-7","DOI":"10.1007\/s10990-006-8611-7"},{"key":"e_1_3_2_38_2","doi-asserted-by":"publisher","DOI":"10.1145\/3729280"},{"key":"e_1_3_2_39_2","doi-asserted-by":"publisher","DOI":"10.1145\/1596550.1596588"},{"key":"e_1_3_2_40_2","doi-asserted-by":"publisher","unstructured":"John Reppy Olin Shivers and Byron Zhong. 2026. Supplemental Material for \u201cFlow-Analysis-Based Closure Optimization\u201d. doi:10.1145\/3808262","DOI":"10.1145\/3808262"},{"key":"e_1_3_2_41_2","doi-asserted-by":"publisher","unstructured":"John Reppy and Byron Zhong. 2026. Artifact for \u201cFlow-analysis-based Closure Optimizations\u201d. doi:10.5281\/zenodo.19616287","DOI":"10.5281\/zenodo.19616287"},{"key":"e_1_3_2_42_2","doi-asserted-by":"publisher","DOI":"10.5555\/317040"},{"key":"e_1_3_2_43_2","doi-asserted-by":"publisher","DOI":"10.1145\/800194.805852"},{"key":"e_1_3_2_44_2","volume-title":"HaMLet","author":"Rossberg Andreas","year":"2001","unstructured":"Andreas Rossberg. 2001. HaMLet. Max Planck Institute for Software Systems, https:\/\/people.mpi-sws.org\/~rossberg\/hamlet\/"},{"key":"e_1_3_2_45_2","volume-title":"Bigloo, a Practical Scheme Compiler","author":"Serrano Manuel","year":"1992","unstructured":"Manuel Serrano. 1992. Bigloo, a Practical Scheme Compiler. Inria. http:\/\/www-sop.inria.fr\/indes\/fp\/Bigloo\/"},{"key":"e_1_3_2_46_2","doi-asserted-by":"publisher","DOI":"10.1145\/258948.258958"},{"key":"e_1_3_2_47_2","doi-asserted-by":"publisher","DOI":"10.1145\/182409.156783"},{"key":"e_1_3_2_48_2","doi-asserted-by":"publisher","DOI":"10.1145\/345099.345125"},{"key":"e_1_3_2_49_2","doi-asserted-by":"publisher","DOI":"10.1145\/53990.54007"},{"key":"e_1_3_2_50_2","doi-asserted-by":"publisher","DOI":"10.5555\/124950"},{"key":"e_1_3_2_51_2","doi-asserted-by":"publisher","DOI":"10.1145\/1133981.1134016"},{"key":"e_1_3_2_52_2","doi-asserted-by":"publisher","DOI":"10.1145\/2034574.2034783"},{"key":"e_1_3_2_53_2","volume-title":"Flow-Directed Lightweight Closure Conversion","author":"Siskind Jeffrey M.","year":"1999","unstructured":"Jeffrey M. Siskind. 1999. Flow-Directed Lightweight Closure Conversion. Technical Report 99-190R. NEC Research Institute, Princeton, New Jersey."},{"key":"e_1_3_2_54_2","doi-asserted-by":"publisher","DOI":"10.1145\/239912.239915"},{"key":"e_1_3_2_55_2","doi-asserted-by":"publisher","DOI":"10.5555\/889232"},{"key":"e_1_3_2_56_2","doi-asserted-by":"publisher","DOI":"10.1145\/3610612.3610622"},{"key":"e_1_3_2_57_2","doi-asserted-by":"publisher","DOI":"10.1145\/231379.231414"},{"key":"e_1_3_2_58_2","doi-asserted-by":"publisher","DOI":"10.1145\/800087.802786"},{"key":"e_1_3_2_59_2","doi-asserted-by":"publisher","DOI":"10.1016\/0096-0551(78)90042-5"},{"key":"e_1_3_2_60_2","doi-asserted-by":"publisher","DOI":"10.1145\/174675.178044"},{"key":"e_1_3_2_61_2","doi-asserted-by":"publisher","DOI":"10.1145\/192724.192725"},{"key":"e_1_3_2_62_2","doi-asserted-by":"publisher","DOI":"10.6082\/uchicago.15612"},{"key":"e_1_3_2_63_2","doi-asserted-by":"publisher","unstructured":"Lukasz Ziarek Stephen Weeks and Suresh Jagannathan. 2008. Flattening Tuples in an SSA Intermediate Representation. Higher-Order and Symbolic Computation 21 (2008) 333\u2013358. doi:10.1007\/s10990-008-9035-3","DOI":"10.1007\/s10990-008-9035-3"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3808262","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3808262","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,22]],"date-time":"2026-09-22T10:43:49Z","timestamp":1790073829000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3808262"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,6,8]]},"references-count":62,"journal-issue":{"issue":"PLDI","published-print":{"date-parts":[[2026,6,8]]}},"alternative-id":["10.1145\/3808262"],"URL":"https:\/\/doi.org\/10.1145\/3808262","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,6,8]]},"assertion":[{"value":"2025-11-14","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-04-03","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-06-08","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}