{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,22]],"date-time":"2026-09-22T11:08:56Z","timestamp":1790075336242,"version":"4.0.1"},"reference-count":31,"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"}],"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>Effect handlers and multishot continuations are powerful abstractions for managing control flow; together, they offer concise and modular ways to express and handle nondeterminism, randomness, and more. However, implementing multishot continuations in the presence of stack-allocated lexical resources\u2014lexical effect handlers in particular\u2014is challenging, since stack copying invalidates references to these resources.<\/jats:p>\n                  <jats:p>\n                    We present a novel implementation strategy for lexical effect handlers that fully supports multishot continuations. The key idea is to\n                    <jats:italic toggle=\"yes\">virtualize<\/jats:italic>\n                    the stack space used by continuations. Each stack-allocated handler instance is assigned a virtual address, and all effect invocations through these virtual addresses are mediated by an address translation mechanism. A software-based memory management unit in the runtime system performs these translations efficiently, exploiting the lexical scoping discipline of effect handlers.\n                  <\/jats:p>\n                  <jats:p>We capture the essence of our approach via a new operational semantics for lexical effect handlers and prove it correct with respect to the standard semantics. We also implement it in a compiler and runtime system. Compared to prior languages with lexical effect handlers, our implementation increases expressivity by fully supporting multishot continuations\u2014and, as a happy consequence, unlocks significant performance gains by enabling parallel execution of multishot continuations.<\/jats:p>","DOI":"10.1145\/3808289","type":"journal-article","created":{"date-parts":[[2026,6,8]],"date-time":"2026-06-08T18:04:09Z","timestamp":1780941849000},"page":"1054-1076","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["Virtualizing Continuations"],"prefix":"10.1145","volume":"10","author":[{"ORCID":"https:\/\/orcid.org\/0009-0005-0842-4697","authenticated-orcid":false,"given":"Cong","family":"Ma","sequence":"first","affiliation":[{"name":"University of Waterloo, Waterloo, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0000-4627-5403","authenticated-orcid":false,"given":"Jonghyun","family":"Jung","sequence":"additional","affiliation":[{"name":"University of Waterloo, Waterloo, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-8206-4694","authenticated-orcid":false,"given":"Yizhou","family":"Zhang","sequence":"additional","affiliation":[{"name":"University of Waterloo, Waterloo, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,6,8]]},"reference":[{"key":"e_1_3_1_2_2","unstructured":"2016. runtime: new goroutines can spend excessive time in morestack. https:\/\/github.com\/golang\/go\/issues\/18138 GitHub issue golang\/go repository. Accessed: 2026-03-25."},{"key":"e_1_3_1_3_2","unstructured":"2026. runtime: better adaptive stack sizing. https:\/\/github.com\/golang\/go\/issues\/77893 GitHub issue golang\/go repository. Accessed: 2026-03-25."},{"key":"e_1_3_1_4_2","unstructured":"Bench [n.d.]. Effect handlers benchmarks suite. https:\/\/github.com\/effect-handlers\/effect-handlers-bench Accessed: 2025-10-06."},{"key":"e_1_3_1_5_2","doi-asserted-by":"publisher","DOI":"10.1145\/3371116"},{"key":"e_1_3_1_6_2","doi-asserted-by":"publisher","DOI":"10.1145\/3527320"},{"key":"e_1_3_1_7_2","doi-asserted-by":"publisher","unstructured":"Will Clinger Anne Hartheimer and Eric Ost. 1988. Implementation strategies for continuations. In Proc. of the ACM Conf. on LISP and Functional Programming (LFP). https:\/\/doi.org\/10.1145\/62678.62692 10.1145\/62678.62692","DOI":"10.1145\/62678.62692"},{"key":"e_1_3_1_8_2","doi-asserted-by":"publisher","unstructured":"Karl Crary David Walker and Greg Morrisett. 1999. Typed memory management in a calculus of capabilities. In ACM SIGPLAN Symp. on Principles of Programming Languages (POPL). https:\/\/doi.org\/10.1145\/292540.292564 10.1145\/292540.292564","DOI":"10.1145\/292540.292564"},{"key":"e_1_3_1_9_2","unstructured":"Effekt [n.d.]. Effekt: A language with lexical effect handlers and lightweight effect polymorphism. https:\/\/effekt-lang.org Accessed: 2025-10-08."},{"key":"e_1_3_1_10_2","doi-asserted-by":"publisher","unstructured":"Kavon Farvardin and John Reppy. 2020. From folklore to fact: comparing implementations of stacks and continuations. In ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI). https:\/\/doi.org\/10.1145\/3385412.3385994 10.1145\/3385412.3385994","DOI":"10.1145\/3385412.3385994"},{"key":"e_1_3_1_11_2","doi-asserted-by":"publisher","unstructured":"Matthew Flatt Gang Yu Robert Bruce Findler and Matthias Felleisen. 2007. Adding delimited and composable control to a production programming environment. In ACM SIGPLAN Conf. on Functional Programming (ICFP). https:\/\/doi.org\/10.1145\/1291151.1291178 10.1145\/1291151.1291178","DOI":"10.1145\/1291151.1291178"},{"key":"e_1_3_1_12_2","doi-asserted-by":"publisher","unstructured":"Dan Grossman Greg Morrisett Trevor Jim Michael Hicks Yanling Wang and James Cheney. 2002. Region-based memory management in Cyclone. In ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI). https:\/\/doi.org\/10.1145\/512529.512563 10.1145\/512529.512563","DOI":"10.1145\/512529.512563"},{"key":"e_1_3_1_13_2","doi-asserted-by":"publisher","DOI":"10.1145\/4472.4478"},{"key":"e_1_3_1_14_2","unstructured":"Lexa [n.d.]. The Lexa Programming Language. https:\/\/github.com\/lexa-lang\/lexa"},{"key":"e_1_3_1_15_2","doi-asserted-by":"publisher","DOI":"10.1145\/3763177"},{"key":"e_1_3_1_16_2","doi-asserted-by":"publisher","DOI":"10.1145\/3689770"},{"key":"e_1_3_1_17_2","doi-asserted-by":"publisher","unstructured":"Cong Ma Jonghyun Jung and Yizhou Zhang. 2026. Virtualizing Continuations (Artifact). https:\/\/doi.org\/10.5281\/zenodo.19963144 10.5281\/zenodo.19963144","DOI":"10.5281\/zenodo.19963144"},{"key":"e_1_3_1_18_2","volume-title":"Virtualizing Continuations (Extended Version)","author":"Ma Cong","year":"2026","unstructured":"Cong Ma, Jonghyun Jung, and Yizhou Zhang. 2026. Virtualizing Continuations (Extended Version). Technical Report CS-2026-02. School of Computer Science, University of Waterloo."},{"key":"e_1_3_1_19_2","doi-asserted-by":"publisher","DOI":"10.1145\/3747529"},{"key":"e_1_3_1_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/3622831"},{"key":"e_1_3_1_21_2","doi-asserted-by":"publisher","DOI":"10.2168\/LMCS-9(4:23)2013"},{"key":"e_1_3_1_22_2","volume-title":"Artificial Intelligence: A Modern Approach","author":"Russell Stuart","year":"2020","unstructured":"Stuart Russell and Peter Norvig. 2020. Artificial Intelligence: A Modern Approach (4 ed.). Pearson.","edition":"4"},{"key":"e_1_3_1_23_2","doi-asserted-by":"publisher","unstructured":"Philipp Schuster Jonathan Immanuel Brachth\u00e4user Marius M\u00fcller and Klaus Ostermann. 2022. A typed continuation-passing translation for lexical effect handlers. In ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI). https:\/\/doi.org\/10.1145\/3519939.3523710 10.1145\/3519939.3523710","DOI":"10.1145\/3519939.3523710"},{"key":"e_1_3_1_24_2","doi-asserted-by":"publisher","unstructured":"KC Sivaramakrishnan Stephen Dolan Leo White Tom Kelly Sadiq Jaffer and Anil Madhavapeddy. 2021. Retrofitting effect handlers onto OCaml. In ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI). https:\/\/doi.org\/10.1145\/3453483.3454039 10.1145\/3453483.3454039","DOI":"10.1145\/3453483.3454039"},{"key":"e_1_3_1_25_2","unstructured":"Go Team. 2014. Go 1.3 Release Notes: Stacks. https:\/\/go.dev\/doc\/go1.3#stacks Accessed: 2025-11-13."},{"key":"e_1_3_1_26_2","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1996.2613"},{"key":"e_1_3_1_27_2","doi-asserted-by":"publisher","unstructured":"David Walker and Greg Morrisett. 2000. Alias types for recursive data structures. In International Workshop on Types in Compilation. https:\/\/doi.org\/10.1007\/3-540-45332-6_7 10.1007\/3-540-45332-6_7","DOI":"10.1007\/3-540-45332-6_7"},{"key":"e_1_3_1_28_2","doi-asserted-by":"publisher","unstructured":"Nicolas Wu Tom Schrijvers and Ralf Hinze. 2014. Effect handlers in scope. In Proc. of the 2014 ACM SIGPLAN Symp. on Haskell. https:\/\/doi.org\/10.1145\/2633357.2633358 10.1145\/2633357.2633358","DOI":"10.1145\/2633357.2633358"},{"key":"e_1_3_1_29_2","doi-asserted-by":"publisher","DOI":"10.1145\/3563289"},{"key":"e_1_3_1_30_2","doi-asserted-by":"publisher","DOI":"10.1145\/3290318"},{"key":"e_1_3_1_31_2","doi-asserted-by":"publisher","unstructured":"Yizhou Zhang Guido Salvaneschi Quinn Beightol Barbara Liskov and Andrew C. Myers. 2016. Accepting blame for safe tunneled exceptions. In ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI). https:\/\/doi.org\/10.1145\/2908080.2908086 10.1145\/2908080.2908086","DOI":"10.1145\/2908080.2908086"},{"key":"e_1_3_1_32_2","doi-asserted-by":"publisher","DOI":"10.1145\/3428207"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3808289","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,22]],"date-time":"2026-09-22T10:51:59Z","timestamp":1790074319000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3808289"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,6,8]]},"references-count":31,"journal-issue":{"issue":"PLDI","published-print":{"date-parts":[[2026,6,8]]}},"alternative-id":["10.1145\/3808289"],"URL":"https:\/\/doi.org\/10.1145\/3808289","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,6,8]]},"assertion":[{"value":"2025-11-13","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"}}]}}