{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,27]],"date-time":"2026-09-27T01:08:13Z","timestamp":1790471293336,"version":"4.1.0"},"reference-count":32,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2019,7,26]],"date-time":"2019-07-26T00:00:00Z","timestamp":1564099200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"DOE","award":["DE-SC0018050"],"award-info":[{"award-number":["DE-SC0018050"]}]},{"DOI":"10.13039\/100000001","name":"NSF","doi-asserted-by":"publisher","award":["1553471, 1564207"],"award-info":[{"award-number":["1553471, 1564207"]}],"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":[[2019,7,26]]},"abstract":"<jats:p>What makes a good compiler IR? In the context of functional languages, there has been an extensive debate on the advantages and disadvantages of continuation-passing-style (CPS). The consensus seems to be that some form of explicit continuations is necessary to model jumps in a functional style, but that they should have a 2nd-class status, separate from regular functions, to ensure efficient code generation. Building on this observation, a recent study from PLDI 2017 proposed a direct-style IR with explicit join points, which essentially represent local continuations, i.e., functions that do not return or escape. While this IR can work well in practice, as evidenced by the implementation of join points in the Glasgow Haskell Compiler (GHC), there still seems to be room for improvement, especially with regard to the way continuations are handled in the course of optimization.<\/jats:p>\n          <jats:p>\n            In this paper, we contribute to the CPS debate by developing a novel IR with the following features. First, we integrate a control operator that resembles Felleisen\u2019s\n            <jats:italic>C<\/jats:italic>\n            , eliminating certain redundant rewrites observed in the previous study. Second, we treat the non-returning and non-escaping aspects of continuations separately, allowing efficient compilation of well-behaved functions defined by the user. Third, we define a selective CPS translation of our IR, which erases control operators while preserving the meaning and typing of programs. These features enable optimizations in both direct style and full CPS, as well as in any intermediate style with selectively exposed continuations. Thus, we change the spectrum of available options from \u201cCPS yes or no\u201d to \u201cas much or as little CPS as you want, when you want it\u201d.\n          <\/jats:p>","DOI":"10.1145\/3341643","type":"journal-article","created":{"date-parts":[[2019,7,29]],"date-time":"2019-07-29T20:55:51Z","timestamp":1564433751000},"page":"1-28","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":15,"title":["Compiling with continuations, or without? whatever."],"prefix":"10.1145","volume":"3","author":[{"given":"Youyou","family":"Cong","sequence":"first","affiliation":[{"name":"Tokyo Institute of Technology, Japan"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Leo","family":"Osvald","sequence":"additional","affiliation":[{"name":"Purdue University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Gr\u00e9gory M.","family":"Essertel","sequence":"additional","affiliation":[{"name":"Purdue University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Tiark","family":"Rompf","sequence":"additional","affiliation":[{"name":"Purdue University, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2019,7,26]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/2660193.2660199"},{"key":"e_1_2_2_2_1","volume-title":"Compiling with Continuations","author":"Appel Andrew W.","unstructured":"Andrew W. Appel . 1992. Compiling with Continuations . Cambridge University Press . Andrew W. Appel. 1992. Compiling with Continuations. Cambridge University Press."},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/278283.278285"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3162069"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/289423.289435"},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/223428.207154"},{"key":"e_1_2_2_8_1","volume-title":"Representing control: A study of the CPS transformation. Mathematical structures in computer science 2, 4","author":"Danvy Oliver","year":"1992","unstructured":"Oliver Danvy and Andrzex Filinski . 1992. Representing control: A study of the CPS transformation. Mathematical structures in computer science 2, 4 ( 1992 ), 361\u2013391. Oliver Danvy and Andrzex Filinski. 1992. Representing control: A study of the CPS transformation. Mathematical structures in computer science 2, 4 (1992), 361\u2013391."},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/2951913.2951931"},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/368892.368907"},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(87)90109-5"},{"key":"e_1_2_2_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/155090.155113"},{"key":"e_1_2_2_13_1","doi-asserted-by":"publisher","DOI":"10.5555\/2748144.2748390"},{"key":"e_1_2_2_14_1","volume-title":"Proofs and types","author":"Girard Jean-Yves","unstructured":"Jean-Yves Girard , Paul Taylor , and Yves Lafont . 1989. Proofs and types . Vol. 7 . Cambridge University Press . Jean-Yves Girard, Paul Taylor, and Yves Lafont. 1989. Proofs and types. Vol. 7. Cambridge University Press."},{"key":"e_1_2_2_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/2576195.2576205"},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/202529.202532"},{"key":"e_1_2_2_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/1291151.1291179"},{"key":"e_1_2_2_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/12276.13333"},{"key":"e_1_2_2_19_1","doi-asserted-by":"crossref","unstructured":"David A. Kranz Richard Kelsey Jonathan Rees Paul Hudak James Philbin and Norman Adams. 1986b. Orbit: an optimizing compiler for scheme (with retrospective). In Best of PLDI. ACM 175\u2013191.  David A. Kranz Richard Kelsey Jonathan Rees Paul Hudak James Philbin and Norman Adams. 1986b. Orbit: an optimizing compiler for scheme (with retrospective). In Best of PLDI. ACM 175\u2013191.","DOI":"10.1145\/12276.13333"},{"key":"e_1_2_2_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/3062341.3062380"},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-31057-7_6"},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1016\/S1571-0661(04)80969-1"},{"key":"e_1_2_2_23_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01019945"},{"key":"e_1_2_2_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/2983990.2984009"},{"key":"e_1_2_2_25_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796802004331"},{"key":"e_1_2_2_26_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2012.08.016"},{"key":"e_1_2_2_27_1","volume-title":"Proceedings of the Third ACM SIGPLAN Workshop on Continuations (CW \u201901)","author":"Reppy John","year":"2001","unstructured":"John Reppy . 2001 . Local CPS conversion in a direct-style compiler . In Proceedings of the Third ACM SIGPLAN Workshop on Continuations (CW \u201901) . 13\u201322. John Reppy. 2001. Local CPS conversion in a direct-style compiler. In Proceedings of the Third ACM SIGPLAN Workshop on Continuations (CW \u201901). 13\u201322."},{"key":"e_1_2_2_29_1","volume-title":"A List of Successes That Can Change the World (Lecture Notes in Computer Science)","author":"Rompf Tiark","unstructured":"Tiark Rompf . 2016. The Essence of Multi-stage Evaluation in LMS . In A List of Successes That Can Change the World (Lecture Notes in Computer Science) , Vol. 9600 . Springer , 318\u2013335. Tiark Rompf. 2016. The Essence of Multi-stage Evaluation in LMS. In A List of Successes That Can Change the World (Lecture Notes in Computer Science), Vol. 9600. Springer, 318\u2013335."},{"key":"e_1_2_2_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/1631687.1596596"},{"key":"e_1_2_2_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/1868294.1868314"},{"key":"e_1_2_2_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/2429069.2429128"},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.5555\/889478"},{"key":"e_1_2_2_34_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\/3341643","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3341643","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3341643","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T22:41:29Z","timestamp":1750200089000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3341643"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2019,7,26]]},"references-count":32,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2019,7,26]]}},"alternative-id":["10.1145\/3341643"],"URL":"https:\/\/doi.org\/10.1145\/3341643","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2019,7,26]]},"assertion":[{"value":"2019-07-26","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}