prodigy: PRObability DIstributions via GeneratingfunctionologY
prodigy is a prototypical tool for the analysis of probabilistic non-negative integer programs with while-loops. It is based on (probability) generating functions.
It provides a command-line interface and a web GUI.
Contents
- Installation
- Basic Usage
Installation
With pip
Prodigy is on PyPI as prodigy-ppl (the command and the Python package are called prodigy):
pip install prodigy-ppl
This needs Python 3.11 or newer and contains the SymPy, SymEngine and the faster GiNaC engine (--engine ginac).
The GiNaC engine comes from prodigy-ppl-ginac, whose wheels bundle
GiNaC; pip installs it on Linux (x86_64, aarch64, glibc) and macOS with Python 3.11–3.14. Elsewhere, the extra ginac
builds it from source, which needs a C++17 compiler, CMake and GiNaC:
pip install "prodigy-ppl[ginac]"
With Docker
The image contains the command line and the web GUI with the SymPy, GiNaC and SymEngine engines, for amd64 and arm64
(tags: version, e.g. 3.1.0, minor version 3.1, and latest). Without arguments it starts the web GUI on
http://localhost:8080:
docker run --rm -p 8080:8080 ghcr.io/lklinke/prodigy
Arguments are passed to prodigy; mount the folder with your programs to use the command line:
docker run --rm -v "$PWD":/work ghcr.io/lklinke/prodigy main /work/example.pgcl
Dockerfile.artifact builds the full environment for artifacts (all engines including GiNaC, the sources and
the development tools): make docker-artifact, then docker run -ti prodigy-artifact.
From source
To install Prodigy from the repository, follow these steps:
- Make sure Python 3.11 or newer is installed (tested with 3.11 and 3.14).
- Install uv.
- Clone or download the Prodigy repository, open a command prompt in its root folder, and type
./install.sh. This installs Prodigy with the dependency versions locked inuv.lockinto.venv, and the Z3 solver for pysmt.
If no errors occurred, you have successfully installed Prodigy. Now there are two options on how to use the tool. You can either use the command-line interface (CLI) or the web GUI. The next section (Basic Usage) details how to achieve both of these things.
Troubleshooting
If you run into trouble during installation, this subsection might be of help. It lists some common problems that might occur during installation of Prodigy and how you can (hopefully) solve them.
- If you're using Windows, don't (not even WSL). We heavily recommend using either Linux or MacOS, as some of the required libraries have compatibility problems with Windows.
- If pip builds
prodigy-ppl-ginacfrom source (no wheel for your platform, e.g. Alpine Linux), install GiNaC and make sure all of these packages are installed (if you're not using a Debian/Ubuntu based distribution, these might differ slightly):CMakepkg-configbuild-essential(includesmake,g++,gcc, and more)python3-dev(calledpython3-develon some other package managers such asyam)
Basic Usage
CLI
- In the project directory, run prodigy with
uv run prodigy ...(or activate the virtual environment withsource .venv/bin/activateand typeprodigy ...). - For more information, see the help message (
uv run prodigy --help) or have a look into the documentation.
Web GUI
- Type
uv run prodigy web(oruv run prodigy --engine ginac webfor the faster GiNaC engine). The GUI opens in your browser. - Write or load a program, choose a strategy for each loop under Setup, and press Analyze (⌘/Ctrl + Return).
Results come with their guarantee (exact, lower bound with residual mass, upper bound), and
queries are answered with sound intervals. See docs/gui.md, which also
describes the non-interactive analysis API (prodigy analyze --json).
Development
make lint,make mypyandmake testrun the checks of the CI (pylint, mypy, and the tests with coverage; see.github/workflows/main.yml).- Releases: bump
versioninpyproject.toml, merge, and push a tagv<version>(e.g.v3.1.0)..github/workflows/release.ymlruns the checks, waits for approval in the environmentrelease, and publishes to PyPI, the Docker image (Dockerfile) to ghcr.io, and a GitHub release. - Dependencies are locked in
uv.lock. After changing them inpyproject.toml, runuv lockand commit both files.uv lock --upgradeupdates all dependencies within their constraints; Dependabot proposes such updates monthly as pull requests.
Metadata
Release files for prodigy-ppl 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| prodigy_ppl-0.1.1.tar.gz | 777.0 kB | With provenance | Details for prodigy_ppl-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prodigy_ppl-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for prodigy_ppl-0.1.1-py3-none-any.whl |
Total release size: 1.6 MB
Release files / prodigy_ppl-0.1.1.tar.gz
| Download URL | prodigy_ppl-0.1.1.tar.gz |
|---|---|
| Size | 777.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50431b288d282ad8e957bbdc00fdfd87ad0373f542c941a32f364e832c0aa149
|
|
BLAKE2b-256 checksum How to use checksums |
11b1b02732f058b199b90ca4e233f182437c57002e25a3e2ee539c27dcf181e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logRelease files / prodigy_ppl-0.1.1-py3-none-any.whl
| Download URL | prodigy_ppl-0.1.1-py3-none-any.whl |
|---|---|
| Size | 855.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
97fca2adf41df9cefeaf85ccc6520512c80568e7f62d7a3ee8b5bd8b57aaa5af
|
|
BLAKE2b-256 checksum How to use checksums |
3b9172c72c1ee93b08d93176cd5438b6707b6c5e9fbba1c5ae0b4c5fc9b331e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logSecurity for prodigy-ppl 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for prodigy_ppl-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.