{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,2]],"date-time":"2026-10-02T07:50:17Z","timestamp":1790927417666,"version":"4.1.0"},"reference-count":78,"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":"NSF","doi-asserted-by":"publisher","award":["2348334"],"award-info":[{"award-number":["2348334"]}],"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                    Managing stateful resources safely and expressively is a longstanding challenge in programming languages, especially in the presence of aliasing. For example, scope-based constructs like Java's\n                    <jats:monospace>synchronized<\/jats:monospace>\n                    blocks offer ease of reasoning, but they restrict expressiveness and parallelism. Conversely, imperative, flow-sensitive approaches enable fine-grained control, but they require sophisticated typestate analyses and often burden programmers with explicit state tracking.\n                  <\/jats:p>\n                  <jats:p>In this work, we present a novel approach that unifies the ease of scoped reasoning with the expressiveness of imperative typestate management. Our design extends traditional flow-insensitive capability mechanisms to a flow-sensitive setting. In particular, we decouple capability lifetimes from lexical scopes, allowing functions to receive, revoke, or return capabilities in a flow-sensitive manner, building on existing mechanisms for the safety and ergonomics of scoped capability programming.<\/jats:p>\n                  <jats:p>We implement our approach as an extension to the Scala 3 compiler, leveraging path-dependent types and implicit resolution to enable concise, statically safe, and expressive typestate programming. Our prototype generically supports a wide range of patterns, including file operations, advanced locking protocols, DOM construction, and session types, showing that expressive and safe typestate management can be achieved with minimal extensions to an existing language with capability support.<\/jats:p>","DOI":"10.1145\/3808323","type":"journal-article","created":{"date-parts":[[2026,6,8]],"date-time":"2026-06-08T18:04:09Z","timestamp":1780941849000},"page":"1915-1939","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Typestate via Revocable Capabilities"],"prefix":"10.1145","volume":"10","author":[{"ORCID":"https:\/\/orcid.org\/0009-0008-2526-0438","authenticated-orcid":false,"given":"Songlin","family":"Jia","sequence":"first","affiliation":[{"name":"Purdue University, West Lafayette, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0003-4113-1306","authenticated-orcid":false,"given":"Craig","family":"Liu","sequence":"additional","affiliation":[{"name":"Purdue University, West Lafayette, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-7130-5592","authenticated-orcid":false,"given":"Siyuan","family":"He","sequence":"additional","affiliation":[{"name":"Purdue University, West Lafayette, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-7096-2646","authenticated-orcid":false,"given":"Haotian","family":"Deng","sequence":"additional","affiliation":[{"name":"Purdue University, West Lafayette, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3832-3134","authenticated-orcid":false,"given":"Yuyan","family":"Bao","sequence":"additional","affiliation":[{"name":"Augusta University, Augusta, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2068-3238","authenticated-orcid":false,"given":"Tiark","family":"Rompf","sequence":"additional","affiliation":[{"name":"Purdue University, West Lafayette, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,6,8]]},"reference":[{"key":"e_1_3_1_2_2","doi-asserted-by":"publisher","DOI":"10.1145\/1639950.1640073"},{"key":"e_1_3_1_3_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-30936-1_14"},{"key":"e_1_3_1_4_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-76637-7_16"},{"key":"e_1_3_1_5_2","doi-asserted-by":"publisher","DOI":"10.1145\/3763116"},{"key":"e_1_3_1_6_2","doi-asserted-by":"publisher","DOI":"10.1145\/3485516"},{"key":"e_1_3_1_7_2","doi-asserted-by":"publisher","DOI":"10.1145\/1297027.1297050"},{"key":"e_1_3_1_8_2","doi-asserted-by":"publisher","DOI":"10.1145\/3498698"},{"key":"e_1_3_1_9_2","doi-asserted-by":"publisher","DOI":"10.1145\/3618003"},{"key":"e_1_3_1_10_2","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-44898-5_4"},{"key":"e_1_3_1_11_2","doi-asserted-by":"publisher","DOI":"10.1145\/3622813"},{"key":"e_1_3_1_12_2","doi-asserted-by":"publisher","DOI":"10.1145\/3527320"},{"key":"e_1_3_1_13_2","doi-asserted-by":"publisher","DOI":"10.1145\/3276481"},{"key":"e_1_3_1_14_2","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796820000027"},{"key":"e_1_3_1_15_2","doi-asserted-by":"publisher","DOI":"10.1145\/91556.91622"},{"key":"e_1_3_1_16_2","doi-asserted-by":"publisher","DOI":"10.1017\/S0960129500001535"},{"key":"e_1_3_1_17_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-24851-4_21"},{"key":"e_1_3_1_18_2","doi-asserted-by":"publisher","unstructured":"Haotian Deng Siyuan He Songlin Jia Yuyan Bao and Tiark Rompf. 2025. Free to Move: Reachability Types with Flow-Sensitive Effects for Safe Deallocation and Ownership Transfer. CoRR abs\/2510.08939 (2025). doi:10.48550\/ARXIV.2510.08939","DOI":"10.48550\/ARXIV.2510.08939"},{"key":"e_1_3_1_19_2","doi-asserted-by":"publisher","DOI":"10.1145\/365230.365252"},{"key":"e_1_3_1_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/3450952"},{"key":"e_1_3_1_21_2","doi-asserted-by":"publisher","DOI":"10.1145\/174675.178047"},{"key":"e_1_3_1_22_2","doi-asserted-by":"publisher","DOI":"10.1145\/292540.292557"},{"key":"e_1_3_1_23_2","doi-asserted-by":"publisher","unstructured":"Stephen J. Fink Eran Yahav Nurit Dor G. Ramalingam and Emmanuel Geay. 2008. Effective typestate verification in the presence of aliasing. ACM Trans. Softw. Eng. Methodol. 17 2 (2008) 9:1\u20139:34. doi:10.1145\/1348250.1348255","DOI":"10.1145\/1348250.1348255"},{"key":"e_1_3_1_24_2","doi-asserted-by":"publisher","DOI":"10.1145\/155090.155113"},{"key":"e_1_3_1_25_2","doi-asserted-by":"publisher","DOI":"10.1145\/2629609"},{"key":"e_1_3_1_26_2","doi-asserted-by":"publisher","DOI":"10.1145\/1706299.1706335"},{"key":"e_1_3_1_27_2","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(87)90045-4"},{"key":"e_1_3_1_28_2","doi-asserted-by":"publisher","DOI":"10.1145\/3450272"},{"key":"e_1_3_1_29_2","doi-asserted-by":"publisher","DOI":"10.1145\/3798254"},{"key":"e_1_3_1_30_2","volume-title":"Advanced Topics in Types and Programming Languages","author":"Henglein Fritz","year":"2005","unstructured":"Fritz Henglein, Henning Makholm, and Henning Niss. 2005. Effect Types and Region-Based Memory Management. In Advanced Topics in Types and Programming Languages, Benjamin C. Pierce (Ed.). MIT Press, Cambridge, Mass."},{"key":"e_1_3_1_31_2","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-57208-2_35"},{"key":"e_1_3_1_32_2","doi-asserted-by":"publisher","DOI":"10.1007\/BFB0053567"},{"key":"e_1_3_1_33_2","doi-asserted-by":"publisher","DOI":"10.1145\/2873052"},{"key":"e_1_3_1_34_2","doi-asserted-by":"publisher","DOI":"10.1145\/3479394.3479414"},{"key":"e_1_3_1_35_2","doi-asserted-by":"publisher","DOI":"10.1145\/2808098.2808100"},{"key":"e_1_3_1_36_2","doi-asserted-by":"publisher","unstructured":"Songlin Jia Craig Liu Siyuan He Haotian Deng Yuyan Bao and Tiark Rompf. 2026. Artifact for \"Typestate via Revocable Capabilities\". doi:10.5281\/zenodo.19614655","DOI":"10.5281\/zenodo.19614655"},{"key":"e_1_3_1_37_2","doi-asserted-by":"publisher","unstructured":"Songlin Jia Craig Liu Siyuan He Haotian Deng Yuyan Bao and Tiark Rompf. 2026. Typestate via Revocable Capabilities (Extended Version). doi:10.48550\/arXiv.2510.08889","DOI":"10.48550\/arXiv.2510.08889"},{"key":"e_1_3_1_38_2","doi-asserted-by":"publisher","DOI":"10.1145\/3808335"},{"key":"e_1_3_1_39_2","doi-asserted-by":"publisher","DOI":"10.1145\/2804302.2804319"},{"key":"e_1_3_1_40_2","doi-asserted-by":"publisher","DOI":"10.1145\/1017472.1017488"},{"key":"e_1_3_1_41_2","doi-asserted-by":"publisher","unstructured":"Wen Kokke. 2019. Rusty Variation: Deadlock-free Sessions with Failure in Rust. In ICE (EPTCS). 48\u201360. doi:10.4204\/EPTCS.304.4","DOI":"10.4204\/EPTCS.304.4"},{"key":"e_1_3_1_42_2","doi-asserted-by":"publisher","DOI":"10.1145\/199448.199528"},{"key":"e_1_3_1_43_2","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009897"},{"key":"e_1_3_1_44_2","doi-asserted-by":"publisher","DOI":"10.1145\/73560.73564"},{"key":"e_1_3_1_45_2","doi-asserted-by":"publisher","DOI":"10.1145\/1481861.1481868"},{"key":"e_1_3_1_46_2","doi-asserted-by":"publisher","DOI":"10.1145\/2663171.2663188"},{"key":"e_1_3_1_47_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-40965-6_15"},{"key":"e_1_3_1_48_2","doi-asserted-by":"publisher","DOI":"10.1145\/1449764.1449792"},{"key":"e_1_3_1_49_2","unstructured":"Martin Odersky et al. 2023. Scala 3 Reference - Capture Checking. https:\/\/docs.scala-lang.org\/scala3\/reference\/experimental\/cc.html"},{"key":"e_1_3_1_50_2","unstructured":"Martin Odersky et al. 2025. Separation Checking. https:\/\/nightly.scala-lang.org\/docs\/reference\/experimental\/capture-checking\/separation-checking.html"},{"key":"e_1_3_1_51_2","doi-asserted-by":"publisher","DOI":"10.1145\/3158130"},{"key":"e_1_3_1_52_2","doi-asserted-by":"publisher","DOI":"10.1145\/3486610.3486893"},{"key":"e_1_3_1_53_2","doi-asserted-by":"publisher","DOI":"10.1145\/360204.360207"},{"key":"e_1_3_1_54_2","doi-asserted-by":"publisher","DOI":"10.1145\/1094811.1094815"},{"key":"e_1_3_1_55_2","doi-asserted-by":"publisher","DOI":"10.1145\/2983990.2984009"},{"key":"e_1_3_1_56_2","doi-asserted-by":"publisher","DOI":"10.1145\/1411286.1411290"},{"key":"e_1_3_1_57_2","doi-asserted-by":"publisher","DOI":"10.1145\/2983990.2984008"},{"key":"e_1_3_1_58_2","doi-asserted-by":"publisher","DOI":"10.1145\/1596550.1596596"},{"key":"e_1_3_1_59_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-31057-7_13"},{"key":"e_1_3_1_60_2","doi-asserted-by":"publisher","DOI":"10.1145\/3689763"},{"key":"e_1_3_1_61_2","doi-asserted-by":"publisher","DOI":"10.1145\/3763173"},{"key":"e_1_3_1_62_2","doi-asserted-by":"publisher","DOI":"10.46298\/LMCS-18(3:33)2022"},{"key":"e_1_3_1_63_2","doi-asserted-by":"publisher","DOI":"10.1145\/3610612.3610624"},{"key":"e_1_3_1_64_2","doi-asserted-by":"publisher","unstructured":"Alceste Scalas and Nobuko Yoshida. 2016. Lightweight Session Programming in Scala. In ECOOP (LIPIcs). Schloss Dagstuhl - Leibniz-Zentrum f\u00fcr Informatik 21:1\u201321:28. doi:10.4230\/LIPICS.ECOOP.2016.21","DOI":"10.4230\/LIPICS.ECOOP.2016.21"},{"key":"e_1_3_1_65_2","doi-asserted-by":"publisher","DOI":"10.1145\/3547626"},{"key":"e_1_3_1_66_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.1986.6312929"},{"key":"e_1_3_1_67_2","doi-asserted-by":"publisher","unstructured":"Wouter Swierstra. 2008. Data types \u00e1 la carte. J. Funct. Program. 18 4 (2008) 423\u2013436. doi:10.1017\/S0956796808006758","DOI":"10.1017\/S0956796808006758"},{"key":"e_1_3_1_68_2","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-58184-7_118"},{"key":"e_1_3_1_69_2","doi-asserted-by":"publisher","DOI":"10.1145\/3720476"},{"key":"e_1_3_1_70_2","doi-asserted-by":"publisher","DOI":"10.1145\/2814270.2814315"},{"key":"e_1_3_1_71_2","doi-asserted-by":"publisher","DOI":"10.1016\/J.TCS.2006.06.028"},{"key":"e_1_3_1_72_2","volume-title":"Programming Concepts and Methods","author":"Wadler Philip","year":"1990","unstructured":"Philip Wadler. 1990. Linear Types can Change the World!. In Programming Concepts and Methods. North-Holland, 561."},{"key":"e_1_3_1_73_2","doi-asserted-by":"publisher","DOI":"10.1145\/143165.143169"},{"key":"e_1_3_1_74_2","doi-asserted-by":"publisher","DOI":"10.1145\/601775.601776"},{"key":"e_1_3_1_75_2","doi-asserted-by":"publisher","DOI":"10.1145\/3632856"},{"key":"e_1_3_1_76_2","doi-asserted-by":"publisher","unstructured":"Anxhelo Xhebraj Oliver Bracevac Guannan Wei and Tiark Rompf. 2022. What If We Don't Pop the Stack? The Return of 2nd-Class Values. In ECOOP (LIPIcs Vol. 222). Schloss Dagstuhl - Leibniz-Zentrum fur Informatik 15:1\u201315:29. doi:10.4230\/LIPICS.ECOOP.2022.15","DOI":"10.4230\/LIPICS.ECOOP.2022.15"},{"key":"e_1_3_1_77_2","doi-asserted-by":"publisher","DOI":"10.1145\/3649853"},{"key":"e_1_3_1_78_2","doi-asserted-by":"publisher","DOI":"10.1145\/3763112"},{"key":"e_1_3_1_79_2","doi-asserted-by":"publisher","unstructured":"Yichen Xu and Martin Odersky. 2023. Formalizing Box Inference for Capture Calculus. CoRR abs\/2306.06496 (2023). doi:10.48550\/ARXIV.2306.06496","DOI":"10.48550\/ARXIV.2306.06496"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3808323","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3808323","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,22]],"date-time":"2026-09-22T10:52:05Z","timestamp":1790074325000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3808323"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,6,8]]},"references-count":78,"journal-issue":{"issue":"PLDI","published-print":{"date-parts":[[2026,6,8]]}},"alternative-id":["10.1145\/3808323"],"URL":"https:\/\/doi.org\/10.1145\/3808323","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"}}]}}