{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2023,10,17]],"date-time":"2023-10-17T05:19:10Z","timestamp":1697519950567},"reference-count":46,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2023,10,16]]},"abstract":"Effect handlers are a high-level abstraction that enables programmers to use effects in a structured \nway. They have gained a lot of popularity within academia and subsequently also in industry. However, \nthe abstraction often comes with a significant runtime cost and there has been intensive research \nrecently on how to reduce this price.<\/jats:p>\n A promising approach in this regard is to implement effect handlers using a CPS translation and \nto provide sufficient information about the nesting of handlers. With this information the \nCPS translation can decide how effects have to be lifted through handlers, i.e., which handlers \nneed to be skipped, in order to handle the effect at the correct place. A structured way to make \nthis information available is to use a calculus with a region system and explicit subregion \nevidence. Such calculi, however, are quite verbose, which makes them impractical to use as a \nsource-level language.<\/jats:p>\n We present a method to infer the lifting information for a calculus underlying a source-level language. \nThis calculus uses second-class capabilities for the safe use of effects. To do so, we define a typed translation \nto a calculus with regions and evidence and we show that this lift-inference translation is typability- \nand semantics-preserving. On the one hand, this exposes the precise relation between the second-class \nproperty and the structure given by regions. On the other hand, it closes a gap in a compiler pipeline \nenabling efficient compilation of the source-level language. We have implemented lift inference in this \ncompiler pipeline and conducted benchmarks which indicate that the approach is indeed working.<\/jats:p>","DOI":"10.1145\/3622831","type":"journal-article","created":{"date-parts":[[2023,10,16]],"date-time":"2023-10-16T15:41:29Z","timestamp":1697470889000},"page":"941-970","update-policy":"http:\/\/dx.doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["From Capabilities to Regions: Enabling Efficient Compilation of Lexical Effect Handlers"],"prefix":"10.1145","volume":"7","author":[{"ORCID":"http:\/\/orcid.org\/0000-0002-0260-6298","authenticated-orcid":false,"given":"Marius","family":"M\u00fcller","sequence":"first","affiliation":[{"name":"University of T\u00fcbingen, T\u00fcbingen, Germany"}]},{"ORCID":"http:\/\/orcid.org\/0000-0001-8011-0506","authenticated-orcid":false,"given":"Philipp","family":"Schuster","sequence":"additional","affiliation":[{"name":"University of T\u00fcbingen, T\u00fcbingen, Germany"}]},{"ORCID":"http:\/\/orcid.org\/0000-0002-0931-7878","authenticated-orcid":false,"given":"Jonathan Lindegaard","family":"Starup","sequence":"additional","affiliation":[{"name":"Aarhus University, Aarhus, Denmark"}]},{"ORCID":"http:\/\/orcid.org\/0000-0001-5294-5506","authenticated-orcid":false,"given":"Klaus","family":"Ostermann","sequence":"additional","affiliation":[{"name":"University of T\u00fcbingen, T\u00fcbingen, Germany"}]},{"ORCID":"http:\/\/orcid.org\/0000-0001-9128-0391","authenticated-orcid":false,"given":"Jonathan Immanuel","family":"Brachth\u00e4user","sequence":"additional","affiliation":[{"name":"University of T\u00fcbingen, T\u00fcbingen, Germany"}]}],"member":"320","published-online":{"date-parts":[[2023,10,16]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jlamp.2014.02.001"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/3158096"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/3371116"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3527320"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/3428194"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0960129500001535"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/3331545.3342589"},{"key":"e_1_2_1_8_1","volume-title":"Multicore OCaml. In OCaml Workshop.","author":"Dolan Stephen","year":"2014","unstructured":"Stephen Dolan , Leo White , and Anil Madhavapeddy . 2014 . Multicore OCaml. In OCaml Workshop. Stephen Dolan, Leo White, and Anil Madhavapeddy. 2014. Multicore OCaml. In OCaml Workshop."},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796807006259"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/3385412.3385994"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2015.11.010"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796898003025"},{"key":"e_1_2_1_13_1","volume-title":"Formal Structures for Computation and Deduction (LIPIcs","author":"Hillerstr\u00f6m Daniel","year":"2017","unstructured":"Daniel Hillerstr\u00f6m , Sam Lindley , Bob Atkey , and KC Sivaramakrishnan . 2017 . Continuation Passing Style for Effect Handlers . In Formal Structures for Computation and Deduction (LIPIcs , Vol. 84). Schloss Dagstuhl\u2013Leibniz-Zentrum f\u00fcr Informatik. Daniel Hillerstr\u00f6m, Sam Lindley, Bob Atkey, and KC Sivaramakrishnan. 2017. Continuation Passing Style for Effect Handlers. In Formal Structures for Computation and Deduction (LIPIcs, Vol. 84). Schloss Dagstuhl\u2013Leibniz-Zentrum f\u00fcr Informatik."},{"key":"e_1_2_1_14_1","unstructured":"Daniel Hillerstr\u00f6m Filip Koprivec and Philipp Schuster (benchmarking chairs). 2023. Effect handlers benchmarks suite. https:\/\/github.com\/effect-handlers\/effect-handlers-bench \t\t\t\t Daniel Hillerstr\u00f6m Filip Koprivec and Philipp Schuster (benchmarking chairs). 2023. Effect handlers benchmarks suite. https:\/\/github.com\/effect-handlers\/effect-handlers-bench"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796820000040"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.2307\/1995158"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-59451-5_4"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/3485479"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/2887747.2804319"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/1411286.1411288"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/3093333.3009872"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0890-5401(03)00088-9"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/199448.199528"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009897"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1016\/0022-0000(78)90014-4"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.7551\/mitpress\/2319.001.0001"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.8315298"},{"key":"e_1_2_1_28_1","volume-title":"Klaus Ostermann, and Jonathan Immanuel Brachth\u00e4user.","author":"M\u00fcller Marius","year":"2023","unstructured":"Marius M\u00fcller , Philipp Schuster , Jonathan Lindegaard Starup , Klaus Ostermann, and Jonathan Immanuel Brachth\u00e4user. 2023 . From Capabilities to Regions : Enabling Efficient Compilation of Lexical Effect Handlers. University of T\u00fcbingen , Germany. https:\/\/se.informatik.uni-tuebingen.de\/publications\/mueller23lift Marius M\u00fcller, Philipp Schuster, Jonathan Lindegaard Starup, Klaus Ostermann, and Jonathan Immanuel Brachth\u00e4user. 2023. From Capabilities to Regions: Enabling Efficient Compilation of Lexical Effect Handlers. University of T\u00fcbingen, Germany. https:\/\/se.informatik.uni-tuebingen.de\/publications\/mueller23lift"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3022671.2984009"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-00590-9_7"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.2168\/LMCS-9(4:23)2013"},{"key":"e_1_2_1_32_1","volume-title":"Axel Faes, and Tom Schrijvers.","author":"Pretnar Matija","year":"2017","unstructured":"Matija Pretnar , Amr Hany Shehata Saleh , Axel Faes, and Tom Schrijvers. 2017 . Efficient compilation of algebraic effects and handlers. Department of Computer Science , KU Leuven; Leuven, Belgium. Matija Pretnar, Amr Hany Shehata Saleh, Axel Faes, and Tom Schrijvers. 2017. Efficient compilation of algebraic effects and handlers. Department of Computer Science, KU Leuven; Leuven, Belgium."},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-89884-1_12"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3331545.3342595"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3240719.3241788"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3519939.3523710"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/3408975"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-99336-8_18"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/3453483.3454039"},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/604131.604144"},{"key":"e_1_2_1_41_1","unstructured":"Mads Tofte Lars Birkedal Martin Elsman Niels Hallenberg and Peter Sestoft. 2001. Programming with Regions in the ML Kit (for Version 4). 10. \t\t\t\t Mads Tofte Lars Birkedal Martin Elsman Niels Hallenberg and Peter Sestoft. 2001. Programming with Regions in the ML Kit (for Version 4). 10."},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1996.2613"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2022.15"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/3408981"},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/3473576"},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/3290318"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3622831","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2023,10,16]],"date-time":"2023-10-16T15:56:24Z","timestamp":1697471784000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3622831"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,10,16]]},"references-count":46,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2023,10,16]]}},"alternative-id":["10.1145\/3622831"],"URL":"https:\/\/doi.org\/10.1145\/3622831","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,10,16]]},"assertion":[{"value":"2023-10-16","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}