Artifact: Dynamically Checked Deep Immutability in Python
Abstract
Our paper is a design paper, describing how deep immutability can be added to Python using dynamic checks. The design aims to be backwards compatible and allow sharing of immutable objects across sub-interpreters. The paper describes several problems and presents our solutions. In this artifact we want to show our working implementation of the proposed design. We claim that this implementation is: functional: We provide a working Python interpreter that implements deep immutability. reusable: Our patched version of CPython can be reused, as a baseline for further research exploring the design space. It include a snapshot of our modified CPython version with all implementation details, including the reversible SCC algorithm described in Section 7, atomic reference counting and inserted write barriers. This artifact can be used as a reference for developers wanting to implement immutability in their language or other Python runtimes. Artifact Information This artifact holds a snapshot of CPython and a patched CPython version with the modifications described in the paper. Differences between the paper and the implementation are documented in DIFFERENCES.md The GUIDE.md file contains links to examples, benchmarks and implementation details that are part of this artifact. System requirements This artifact is packaged using Docker to ensure reproducibility across different systems. We recommend using a machine with: 25+ GB of free disk space to accommodate the Docker image and the datasets. 12+ GB of RAM allocated to Docker. 8+ CPU cores allocated to Docker. A web browser to access the interactive application. Internet access, if you want to build the docker container or from scratch or run the artifact locally on your machine We have tested the artifact on an amd64 Linux (Ubuntu 24.04.3) and ARM MacOS (Tahoe 26.3.1). Working with this Artifact These instructions assume that you have downloaded pyrona-artifact.zip from Zenodo and unzipped the file. Now you should have a new folder pyrona-artifact. Using Pre-Built Docker Images The Zenodo archive includes pre-built Docker image archives for linux-amd64 and linux-arm64. If you're on either of these platforms we recommend that you use the pre-built image like this: Ensure Docker is installed (https://www.docker.com/get-started). We have tested the artifact with Docker version 28.2.2. Select and unzip the docker image for your platform like this: unzip -p docker/pyrona-artifact-linux-amd64.docker.zip | docker load unzip -p docker/pyrona-artifact-linux-arm64.docker.zip | docker load Confirm that the docker image has been loaded: docker images Start the docker image: docker run --rm -p 8501:8501 --memory=12g --cpus=8 pyrona-artifact:immutability Make sure that docker has enough memory and cores allocated to it. On linux you can use the --memory and --cpus arguments in the command above. These flags don't work on Windows and MacOS. If you're using docker desktop you can open "Docker Desktop -> Settings -> Resources" and allocate more resources. When you open http://localhost:8501/ you should see a web application. While the container is running, you can connect to the container to run commands and inspect the file system. For this, first fetch the container by ID running docker ps in a new terminal on your host, and then: docker exec -it /bin/bash The README.md file in pyrona-artifact contains additional instructions for building the image locally License This artifact is licensed under the MIT license. It includes copies of 3rd party software, like CPython, coming with their own licenses.
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 10 April 2026
- Language
- EN