Shedskin is a Python-to-C++ compiler that infers types statically and emits standard C++ code. This repository provides a reproducible Docker environment that installs both Shedskin and ESBMC so you can convert and verify Python programs without any local setup.
- Docker installed and running
docker build -t esbmc-shedskin .
# or via Make
make docker-buildThe image is based on Ubuntu 22.04 and installs:
- Shedskin (latest release via pip)
- ESBMC (latest release binary from GitHub)
- All required runtime libraries (
libgc,libpcre3, Boost, Z3)
Open a shell inside the container with the repository mounted at /workspace:
make docker-shellThis target copies the examples/ directory into a temporary location inside the container and drops you into a shell there:
make docker-run-example
# Inside the container:
shedskin shedskin_runtime_smoke.py
make
./shedskin_runtime_smokeYou can replace shedskin_runtime_smoke.py with any Shedskin-compatible Python file from the examples/ directory.
# Mount your file into the container and run Shedskin + ESBMC
docker run --rm -v $(pwd):/workspace -w /workspace esbmc-shedskin \
-lc "shedskin examples/shedskin_example_simple.py && make && esbmc shedskin_example_simple"Shedskin supports a statically-typed subset of Python. Key restrictions:
- All variables must have a single, consistent type throughout the program.
- Dynamic features (
eval,exec, arbitrary**kwargs) are not supported. - Only a subset of the standard library is available (see the Shedskin docs).
The example files under examples/shedskin_*.py are written to be Shedskin-compatible and serve as a starting point.
Use --no-cache to force a full rebuild (e.g. after a new Shedskin or ESBMC release):
docker build --no-cache -t esbmc-shedskin .