{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,2]],"date-time":"2026-10-02T07:59:57Z","timestamp":1790927997875,"version":"4.1.0"},"reference-count":28,"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\/501100004359","name":"Vetenskapsr\u00e5det","doi-asserted-by":"publisher","award":["2024-04565"],"award-info":[{"award-number":["2024-04565"]}],"id":[{"id":"10.13039\/501100004359","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>Immutability is common in the programming mainstream: deep immutability is the default in functional languages while imperative languages typically provide opt-in support for shallow immutability, usually enforced through static checking.<\/jats:p>\n                  <jats:p>Python is a dynamic imperative language where mutability is inherent: not only are most objects mutable, but programs themselves\u2014modules, classes, functions\u2014are represented by mutable objects at run-time, and libraries routinely rely on this mutability. This makes adding immutability to Python a significant challenge.<\/jats:p>\n                  <jats:p>This paper presents the design and implementation of deep immutability for Python. Our primary motivation is to permit multiple sub-interpreters to directly share object references, which currently requires costly serialisation. Sharing via immutability introduces a soundness challenge, as a violation could corrupt the interpreter\u2019s state.<\/jats:p>\n                  <jats:p>\n                    We identify numerous challenges that stem from decades of design decisions that did not anticipate immutability, and show how they can be overcome through two complementary techniques:\n                    <jats:italic toggle=\"yes\">detachment<\/jats:italic>\n                    , which severs run-time links that would cause immutability to propagate too widely, and\n                    <jats:italic toggle=\"yes\">freezability<\/jats:italic>\n                    , which gives objects run-time control over whether and how they may become immutable. Together, these principles form a general design pattern for deep immutability in dynamic languages. We validate our design with an implementation on CPython 3.15 that is backwards-compatible with existing programs and enables direct, zero-copy sharing of immutable objects across sub-interpreters.\n                  <\/jats:p>","DOI":"10.1145\/3808352","type":"journal-article","created":{"date-parts":[[2026,6,8]],"date-time":"2026-06-08T18:04:09Z","timestamp":1780941849000},"page":"2623-2646","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Dynamically Checked Deep Immutability in Python"],"prefix":"10.1145","volume":"10","author":[{"ORCID":"https:\/\/orcid.org\/0009-0006-5356-280X","authenticated-orcid":false,"given":"Fridtjof","family":"Stoldt","sequence":"first","affiliation":[{"name":"Uppsala University, Uppsala, Sweden"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0004-4049-134X","authenticated-orcid":false,"given":"Sylvan","family":"Clebsch","sequence":"additional","affiliation":[{"name":"Microsoft Azure Research, Austin, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1019-8036","authenticated-orcid":false,"given":"Matthew A.","family":"Johnson","sequence":"additional","affiliation":[{"name":"Microsoft Azure Research, Cambridge, United Kingdom"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0004-3937-1260","authenticated-orcid":false,"given":"Matthew J.","family":"Parkinson","sequence":"additional","affiliation":[{"name":"Microsoft Azure Research, Cambridge, United Kingdom"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4269-5408","authenticated-orcid":false,"given":"Tobias","family":"Wrigstad","sequence":"additional","affiliation":[{"name":"Uppsala University, Uppsala, Sweden"}],"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\/3622846"},{"key":"e_1_3_1_3_2","doi-asserted-by":"publisher","DOI":"10.1145\/185009.185016"},{"key":"e_1_3_1_4_2","doi-asserted-by":"publisher","DOI":"10.1145\/1028976.1028980"},{"key":"e_1_3_1_5_2","volume-title":"Safejava: A Unified Type System for Safe Programming. PhD Thesis","author":"Boyapati Chandrasekhar","year":"2003","unstructured":"Chandrasekhar Boyapati . 2003. Safejava: A Unified Type System for Safe Programming. PhD Thesis. Massachusetts Institute of Technology."},{"key":"e_1_3_1_6_2","doi-asserted-by":"publisher","DOI":"10.1145\/504282.504287"},{"key":"e_1_3_1_7_2","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-45337-7_2"},{"key":"e_1_3_1_8_2","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-18317-5_20"},{"key":"e_1_3_1_9_2","doi-asserted-by":"publisher","DOI":"10.1145\/3622852"},{"key":"e_1_3_1_10_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-89330-1_11"},{"key":"e_1_3_1_11_2","volume-title":"Pony: Co-designing a Type System and a Runtime. PhD Thesis","author":"Clebsch Sylvan","year":"2017","unstructured":"Sylvan Clebsch . 2017. Pony: Co-designing a Type System and a Runtime. PhD Thesis. Imperial College London."},{"key":"e_1_3_1_12_2","doi-asserted-by":"publisher","DOI":"10.1145\/2884781.2884798"},{"key":"e_1_3_1_13_2","unstructured":"Sam Gross . 2023. PEP 703 \u2013 Making the Global Interpreter Lock Optional in CPython. https:\/\/peps.python.org\/pep-0703\/."},{"key":"e_1_3_1_14_2","unstructured":"Raymond Hettinger . 2006. PEP 351 (Python-Dev mailing list). https:\/\/mail.python.org\/pipermail\/python-dev\/2006-February\/060793.html."},{"key":"e_1_3_1_15_2","doi-asserted-by":"publisher","DOI":"10.1002\/spe.372"},{"key":"e_1_3_1_16_2","first-page":"158","article-title":"Flexible Alias Protection","author":"Noble James","year":"1998","unstructured":"James Noble , Jan Vitek , and John Potter . 1998. Flexible Alias Protection. In ECOOP. 158\u2013185.","journal-title":"ECOOP"},{"key":"e_1_3_1_17_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-69824-1_11"},{"key":"e_1_3_1_18_2","doi-asserted-by":"publisher","DOI":"10.1145\/3652024.3665507"},{"key":"e_1_3_1_19_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-36946-9_9"},{"key":"e_1_3_1_20_2","unstructured":"Eric Snow . 2022. PEP 684 \u2013 A Per-Interpreter GIL. https:\/\/peps.python.org\/pep-0684\/."},{"key":"e_1_3_1_21_2","unstructured":"Eric Snow . 2023. PEP 554 \u2013 Multiple Interpreters in the Stdlib. https:\/\/peps.python.org\/pep-0554\/."},{"key":"e_1_3_1_22_2","unstructured":"Eric Snow . 2023. PEP 734 \u2013 Multiple Interpreters in the Stdlib (supersedes [20]). https:\/\/peps.python.org\/pep-0734\/."},{"key":"e_1_3_1_23_2","doi-asserted-by":"publisher","unstructured":"Fridtjof Stoldt Sylvan Clebsch Matthew A. Johnson Matthew J. Parkinson and Tobias Wrigstad . 2026. Artifact: Dynamically Checked Deep Immutability in Python. doi:10.5281\/zenodo.19486173","DOI":"10.5281\/zenodo.19486173"},{"key":"e_1_3_1_24_2","doi-asserted-by":"publisher","DOI":"10.1145\/3729313"},{"key":"e_1_3_1_25_2","unstructured":"Micha\u0142 Szo\u0142ucha . 2024. Freezing data type for parallel access. https:\/\/discuss.python.org\/t\/freezing-data-type-for-parallel-access\/62398\/6."},{"key":"e_1_3_1_26_2","doi-asserted-by":"publisher","DOI":"10.1145\/1094811.1094828"},{"key":"e_1_3_1_27_2","doi-asserted-by":"publisher","DOI":"10.1145\/1103845.1094828"},{"key":"e_1_3_1_28_2","unstructured":"Martin von L\u00f6wis . 2007. PEP 3121 \u2013 Extension Module Initialization and Finalization. https:\/\/peps.python.org\/pep-3121\/."},{"key":"e_1_3_1_29_2","unstructured":"Barry Warsaw . 2005. PEP 351 \u2013 The freeze protocol. https:\/\/peps.python.org\/pep-0351\/."}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3808352","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,22]],"date-time":"2026-09-22T10:41:39Z","timestamp":1790073699000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3808352"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,6,8]]},"references-count":28,"journal-issue":{"issue":"PLDI","published-print":{"date-parts":[[2026,6,8]]}},"alternative-id":["10.1145\/3808352"],"URL":"https:\/\/doi.org\/10.1145\/3808352","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"}}]}}