Installation
Tempest and TempestPy are built on top of Storm and stormpy, respectively. Storm is a probabilistic model checker; Tempest extends it with shield synthesis. TempestPy exposes Tempest's synthesis engine as a Python library, following the same layered design as stormpy over Storm. Because of this heritage, setting up either tool begins with satisfying Storm's dependencies.
Dependencies
Tempest inherits Storm's build dependencies. Install them by following the official guide:
TempestPy additionally requires Python 3.10 or newer and pip.
Installing Tempest
Tempest is built from source using CMake. Ninja is recommended for faster incremental builds but is optional.
git clone https://github.com/PrangerStefan/TempestSynthesis
cd tempest
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -GNinja -DSTORM_BUILD_TESTS=OFF
ninja -C build -j$(nproc)
git clone https://github.com/PrangerStefan/TempestSynthesis
cd tempest
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSTORM_BUILD_TESTS=OFF
cmake --build build -j$(nproc)
After a successful build the binary is at build/bin/storm. Note the absolute path to the build/ directory — you will need it in the next step.
Installing TempestPy
TempestPy uses scikit-build-core (CMake + pybind11) and must be pointed at your Tempest build directory at install time.
git clone https://github.com/PrangerStefan/tempestpy
cd tempestpy
pip install . \
--config-settings=cmake.define.STORM_DIR_HINT=/path/to/tempest/build \
--config-settings=cmake.define.CMAKE_BUILD_PARALLEL_LEVEL=4
Replace /path/to/tempest/build with the actual path from the previous step (e.g. /home/alice/tempest/build).
Verify the install:
import tempestpy.shielding as shielding
factory = shielding.ShieldFactory(
model_path="model.prism",
property_str="Pmin=? [F unsafe]",
)
config = shielding.ShieldConfig(threshold=0.05)
result = factory.compute(config)
See the API Reference for full module documentation.
Full Walkthrough
The following is a complete, copy-paste sequence for a clean Ubuntu/Debian system (adjust package manager as needed for other distros or macOS with Homebrew).
1 — System dependencies
Follow the Storm dependency guide for your OS. On Ubuntu 22.04 / 24.04 the core packages are:
sudo apt-get update
sudo apt-get install -y \
build-essential cmake ninja-build git \
libboost-all-dev libgmp-dev libginac-dev \
libeigen3-dev libglpk-dev \
python3.10 python3.10-dev python3-pip
2 — Clone, build, and install
git clone https://github.com/PrangerStefan/TempestSynthesis tempest
git clone https://github.com/PrangerStefan/tempestpy tempestpy
TEMPEST_BUILD="$(pwd)/tempest/build"
cmake -S tempest -B "$TEMPEST_BUILD" -DCMAKE_BUILD_TYPE=Release -GNinja -DSTORM_BUILD_TESTS=OFF
ninja -C "$TEMPEST_BUILD" -j$(nproc)
cd tempestpy
pip install . \
--config-settings=cmake.define.STORM_DIR_HINT="$TEMPEST_BUILD" \
--config-settings=cmake.define.CMAKE_BUILD_PARALLEL_LEVEL=4
cd ..
3 — Verify
python3 -c "import tempestpy.shielding; print('TempestPy OK')"