{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,30]],"date-time":"2026-09-30T15:21:23Z","timestamp":1790781683512,"version":"4.1.0"},"reference-count":28,"publisher":"Association for Computing Machinery (ACM)","issue":"PLDI","license":[{"start":{"date-parts":[[2023,6,6]],"date-time":"2023-06-06T00:00:00Z","timestamp":1686009600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/100000001","name":"NSF","doi-asserted-by":"publisher","award":["CCF-1730628"],"award-info":[{"award-number":["CCF-1730628"]}],"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":[[2023,6,6]]},"abstract":"<jats:p>\n            Higher-order functions pose a challenge for both static program analyses and optimizing compilers.  \nTo simplify the analysis and compilation of languages with higher-order functions, a rich body of  \nprior work has proposed a variety of\n            <jats:italic>defunctionalization<\/jats:italic>\n            techniques, which can eliminate  \nhigher-order functions from a program by transforming the program to a semantically-equivalent  \nfirst-order representation. Several modern languages take this a step further,\n            <jats:italic>specializing<\/jats:italic>\n            higher-order functions with respect to the functions on which they operate, and in turn allowing  \ncompilers to generate more efficient code. However, existing specializing defunctionalization  \ntechniques restrict how function values may be used, forcing implementations to fall back on costly  \ndynamic alternatives. We propose\n            <jats:italic>lambda set specialization<\/jats:italic>\n            (LSS), the first specializing  \ndefunctionalization technique which imposes no restrictions on how function values may be used. We  \nformulate LSS in terms of a polymorphic type system which tracks the flow of function values through  \nthe program, and use this type system to recast specialization of higher-order functions with  \nrespect to their arguments as a form of type monomorphization. We show that our type system admits a  \nsimple and tractable type inference algorithm, and give a formalization and fully-mechanized proof  \nin the Isabelle\/HOL proof assistant showing soundness and completeness of the type inference  \nalgorithm with respect to the type system. To show the benefits of LSS, we evaluate its impact on  \nthe run time performance of code generated by the MLton compiler for Standard ML, the OCaml  \ncompiler, and the new Morphic functional programming language. We find that pre-processing with LSS  \nachieves run time speedups of up to 6.85x under MLton, 3.45x for OCaml, and 78.93x for Morphic.\n          <\/jats:p>","DOI":"10.1145\/3591260","type":"journal-article","created":{"date-parts":[[2023,6,6]],"date-time":"2023-06-06T20:06:24Z","timestamp":1686081984000},"page":"977-1000","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":8,"title":["Better Defunctionalization through Lambda Set Specialization"],"prefix":"10.1145","volume":"7","author":[{"ORCID":"https:\/\/orcid.org\/0009-0007-9478-8757","authenticated-orcid":false,"given":"William","family":"Brandon","sequence":"first","affiliation":[{"name":"Massachusetts Institute of Technology, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1901-1880","authenticated-orcid":false,"given":"Benjamin","family":"Driscoll","sequence":"additional","affiliation":[{"name":"Stanford University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0003-9486-4060","authenticated-orcid":false,"given":"Frank","family":"Dai","sequence":"additional","affiliation":[{"name":"University of California at Berkeley, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0009-7376-7652","authenticated-orcid":false,"given":"Wilson","family":"Berkow","sequence":"additional","affiliation":[{"name":"University of California at Berkeley, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3126-7771","authenticated-orcid":false,"given":"Mae","family":"Milano","sequence":"additional","affiliation":[{"name":"University of California at Berkeley, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2023,6,6]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/258948.258951"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/258948.258953"},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/2628136.2628153"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1137\/141000671"},{"key":"e_1_2_2_5_1","unstructured":"William Brandon Benjamin Driscoll Frank Dai and Wilson Berkow. 2023. Morphic Research Language. https:\/\/morphic-lang.org [Online] \t\t\t\t  William Brandon Benjamin Driscoll Frank Dai and Wilson Berkow. 2023. Morphic Research Language. https:\/\/morphic-lang.org [Online]"},{"key":"e_1_2_2_6_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.7712285"},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-46425-5_4"},{"key":"e_1_2_2_8_1","volume-title":"43rd ACM SIGPLAN Conference on Programming Language Design and Implementation.","author":"Souza Corentin De","year":"2022","unstructured":"Corentin De Souza . 2022 . Higher-order function specialization in Infer . Presented at the 43rd ACM SIGPLAN Conference on Programming Language Design and Implementation. Corentin De Souza. 2022. Higher-order function specialization in Infer. Presented at the 43rd ACM SIGPLAN Conference on Programming Language Design and Implementation."},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/507635.507640"},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.2307\/1995158"},{"key":"e_1_2_2_11_1","volume-title":"Higher-order functions for a high-performance programming language for GPUs. Master\u2019s thesis","author":"Hovgaard Anders Kiel","unstructured":"Anders Kiel Hovgaard . 2018. Higher-order functions for a high-performance programming language for GPUs. Master\u2019s thesis . University of Copenhagen. Copenhagen , Denmark. Anders Kiel Hovgaard. 2018. Higher-order functions for a high-performance programming language for GPUs. Master\u2019s thesis. University of Copenhagen. Copenhagen, Denmark."},{"key":"e_1_2_2_12_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-18506-0_7"},{"key":"e_1_2_2_13_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796802004331"},{"key":"e_1_2_2_14_1","volume-title":"The Rust Programming Language","author":"Klabnik Steve","unstructured":"Steve Klabnik and Carol Nichols . 2019. The Rust Programming Language . No Starch Press, San Francisco, CA . Steve Klabnik and Carol Nichols. 2019. The Rust Programming Language. No Starch Press, San Francisco, CA."},{"key":"e_1_2_2_15_1","unstructured":"Xavier Leroy Damien Doligez Alain Frisch Jacques Garrigue Didier R\u00e9my and J\u00e9r\u00f4me Vouillon. 2022. The OCaml system release 4.14: Documentation and user\u2019s manual. \t\t\t\t  Xavier Leroy Damien Doligez Alain Frisch Jacques Garrigue Didier R\u00e9my and J\u00e9r\u00f4me Vouillon. 2022. The OCaml system release 4.14: Documentation and user\u2019s manual."},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/2187671.2187672"},{"key":"e_1_2_2_17_1","doi-asserted-by":"publisher","DOI":"10.1016\/0022-0000(78)90014-4"},{"key":"e_1_2_2_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/237721.237791"},{"key":"e_1_2_2_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/3473593"},{"key":"e_1_2_2_20_1","volume-title":"Types and programming languages","author":"Pierce Benjamin C","unstructured":"Benjamin C Pierce . 2002. Types and programming languages . MIT Press , Cambridge, MA . Benjamin C Pierce. 2002. Types and programming languages. MIT Press, Cambridge, MA."},{"key":"e_1_2_2_21_1","volume-title":"Advanced topics in types and programming languages","author":"Pierce Benjamin C","unstructured":"Benjamin C Pierce . 2005. Advanced topics in types and programming languages . MIT Press , Cambridge, MA . Benjamin C Pierce. 2005. Advanced topics in types and programming languages. MIT Press, Cambridge, MA."},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10990-006-8611-7"},{"key":"e_1_2_2_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/800194.805852"},{"key":"e_1_2_2_24_1","volume-title":"The C++ Programming Language","author":"Stroustrup Bjarne","unstructured":"Bjarne Stroustrup . 2013. The C++ Programming Language . Addison-Wesley, Boston , MA. Bjarne Stroustrup. 2013. The C++ Programming Language. Addison-Wesley, Boston, MA."},{"key":"e_1_2_2_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/75277.75283"},{"key":"e_1_2_2_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/292540.292545"},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/1159876.1159877"},{"key":"e_1_2_2_28_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01018828"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3591260","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3591260","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T16:47:20Z","timestamp":1750178840000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3591260"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,6,6]]},"references-count":28,"journal-issue":{"issue":"PLDI","published-print":{"date-parts":[[2023,6,6]]}},"alternative-id":["10.1145\/3591260"],"URL":"https:\/\/doi.org\/10.1145\/3591260","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,6,6]]},"assertion":[{"value":"2023-06-06","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}