Acacia-Bonsai
This is a modern implementation of universal co-Buchi reactive synthesis algorithms using antichain data structures. The theory and practice is described in:
https://arxiv.org/abs/2204.06079
Docker images
Two images are published on the GitHub Container Registry. Boomslang bundles
Spot's Python bindings, acacia_boomslang, and Jupyter:
docker pull ghcr.io/gaperez64/acacia-boomslang:latest
docker run --rm -p 8888:8888 ghcr.io/gaperez64/acacia-boomslang:latest
The CLI image contains the dependencies and sources. It compiles inside the
container so -march=native can target the host. Its first shipped
configuration uses a native GR(1) realizability pre-pass on TLSF input. The
image includes Rust, cbindgen, the OxiDD source, and cached Cargo
dependencies needed by scripts/compile.sh; that script builds OxiDD before
the native preset:
docker pull ghcr.io/gaperez64/acacia-bonsai:latest
docker run --name acacia -it ghcr.io/gaperez64/acacia-bonsai:latest
./scripts/compile.sh
./scripts/acacia-bonsai.sh -f 'G F req -> G F grant' -i req -o grant
cat examples/realizable.tlsf | ./scripts/acacia-bonsai.sh --tlsf
cat examples/realizable.tlsf | \
./scripts/acacia-synthesis.sh --tlsf > controller.aag
The CLI example intentionally omits --rm: compilation happens inside the
named container, so removing it on exit would discard the binaries. Re-enter
it with docker start -ai acacia.
The wrappers name no configuration and follow the docker_default group. Pass
a name as the first argument to choose a different shipped configuration, or run
a wrapper without arguments to list the ones it accepts. The CLI launcher reads
config/docker-default.list, which tests keep aligned with the registry group;
Python is only needed when compiling configurations. The GR(1) pre-pass is a
decision arm: LTL -f input and synthesis -s use the regular solver arms.
The previous four-arm sparse formula configuration remains available in the
group as the non-native fallback.
Dependencies
This program depends on:
- A modern C++ compiler (C++23 is used)
- The Meson Build System
- The Downset Manipulation Library
- The Spot Library: You will need to compile
and install spot separately. The downset manipulation library requires
compilation with
g++so to link against spot you need to compile it withg++too (setCXXbefore configuring, compiling, and installing). - The Z shell, for some scripts.
Initialize the vendored Posets and TLSF-tools dependencies after cloning:
git submodule update --init
This is deliberately non-recursive. To compile a docker_default preset with
native GR(1) arms, also initialize TLSF-tools' nested OxiDD submodule, install
Rust 1.91 or newer with Cargo and cbindgen, and build its stamped C library
before Meson setup:
git -C subprojects/tlsf-tools submodule update --init external/oxidd
subprojects/tlsf-tools/scripts/build_oxidd.sh
Meson checks the OxiDD source commit and archive hash recorded in that stamp.
The Docker CLI release checkout includes the nested submodule, and
scripts/compile.sh builds its library.
The corpus test driver (tests/check-real-correct.sh) can optionally run the
solver under Valgrind (-V) or Callgrind (-c); no test does so by default,
so Valgrind is only needed if you ask for it.
Installing dependencies on macOS
Note that on macOS the compilation has to happen via GCC.
GCC can be installed using Homebrew: brew install gcc. Once installed,
meson needs to be told to use GCC instead of built-in Clang. This can be done
using the meson-native file, or by setting the CXX and CC environment variables.
For instance, do export CXX=$(brew --prefix)/bin/g++-XX before starting with
meson.
Spot has to be manually compiled using GCC and installed. After compiling it
and installing it, you still need to ensure that meson can find Spot using pkgconfig.
This can be done, for example, by setting the pkg_config_path in a meson-native file
or by issuing export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig before
starting with meson (this works if you installed spot in the default
location).
Compiling, running, benchmarking
To compile and run, use Meson:
meson setup build
cd build
meson compile
src/acacia-bonsai -h
[...]
src/acacia-bonsai -f '((G (F (req))) -> (G (F (grant))))' -i req -o grant
REALIZABLE
This produces a debug build. Build an optimized registered configuration with:
preset=$(python3 scripts/acacia-config.py list-group docker_default | head -1)
./self-benchmark.sh -c $preset -R
The -c option selects a configuration and the -R option disables the
benchmarking step, so that only setup and compilation are done; the build lands
in build_<preset>. If compilation memory is tight, add -L to use the
low-memory compile profile.
The Meson option acacia_enable_tlsf_frontend is off by default, so a bare
meson setup build does not require Flex and Bison. Every configuration preset
enables the frontend, so any self-benchmark.sh -c NAME build includes it:
build_$preset/src/acacia-bonsai -T spec.tlsf
-T/--tlsf FILE parses TLSF natively and the wrapper accepts TLSF on standard
input with --tlsf. No external TLSF converter is needed at runtime, and
Moore-target controller conversion happens inside Acacia.
The first docker_default preset enables acacia_native_arms and includes
both:gr1-real-lift:oxidd in its default TLSF decision portfolio. With
-Dacacia_native_arms=true, the same acacia-bonsai binary accepts
--arms real:gr1:oxidd, --arms unreal:gr1:oxidd, --arms both:gr1:oxidd,
--arms both:gr1-lift:oxidd, --arms both:gr1-real-lift:oxidd,
and --arms real:param-lift:oxidd with -T spec.tlsf. These arms run in
process and can also be selected explicitly. The GR(1) reduction is exact, so
one solve decides
the winner: both:gr1:oxidd reports whichever side it proves, while
both:gr1-lift:oxidd first tries a checked system or environment lift from
shared seeds and falls back to the same exact game solve.
both:gr1-real-lift:oxidd tries only the checked system lift; unreal seeds and
declined lifts go directly to the exact game solve. The real and
unreal forms answer only for their own side. The former Python lifting route lives only in
the research oracle for
differential tests.
Correctness and performance gates, including the sequential measurement
protocol, are documented in benchmarking/README.md.
The comparison with ltlsynt is in
benchmarking/RESULTS.md.
Compile-time configurations
Acacia-Bonsai's optimized variants are compile-time configurations. The registry
holds the options in config/acacia-options.json and the presets that combine
them in config/acacia-presets.json; scripts/acacia-config.py validates
presets and translates them to Meson options, and meson.build writes the
result into acacia_build_config.hh.
The options pick data structures and algorithms, for instance:
acacia_vector_downset: the downset representation (vector_backed,rank_bucketed_vector_backed,kdtree_backed,bboxtree_backed, sharing trees, and others).acacia_vector_impl: the vector type stored in the downset, SIMD or plain (autofollowsacacia_no_simd).acacia_forward_safety_solver: use the on-the-fly forward safety-game solver instead of the backward antichain fixed point.acacia_ios_precomputer: how input/output letters are precomputed (standard,mona,semantic_mona, ...).acacia_k_schedule: how the K loop raises its bound (linear,geometric, ...), withacacia_default_k,_kminand_kincsetting its parameters.acacia_translation_pref: the Spot translator preference,smallby default, alsoany,small+anyanddeterministic.acacia_decompose_spec: decompose the specification before solving.acacia_enable_equivariant_solver: compile the exact equivariant solver. It declines to the classic solver when no verified profitable symmetry is available, or when fewer thanacacia_equivariant_min_blocksclient-state blocks are found.
Some configurations take Spot's on-the-fly paths instead of the frozen automaton
graph, gated by -Dacacia_spot_guarded_backend and -Dacacia_spot_lazy_provider
and selected per polarity through --arms; current results and archived
provider evidence are indexed in benchmarking/RESULTS.md.
Inspect the registry with:
python3 scripts/acacia-config.py validate
python3 scripts/acacia-config.py list-presets # names only
python3 scripts/acacia-config.py list-presets --long # with role and description
python3 scripts/acacia-config.py show best_decomp_mona # resolved options
python3 scripts/acacia-config.py show best_decomp_mona --describe
python3 scripts/acacia-config.py meson-args best_decomp_mona
The configurations we ship are whichever ones the docker_default group names:
python3 scripts/acacia-config.py list-group docker_default
The Docker images, the TLSF examples above and CI all read that group. A preset name is a historical label, not a claim about which configuration is currently best.
Each preset declares a role: shipping for docker_default members,
reference for measurement controls, sweep for comparison arms, diagnostic
for instrumented builds, legacy for historical configurations.
best_decomp_mona is the plain vector-backed downset configuration, kept as the
reference point for downset comparisons, and
best_decomp_rank_bucketed_mona_noequivariant is the classic-solver-only
ablation. A new preset inherits from the nearest existing configuration and
overrides only the values being tested; new names are limited to 40 characters
and cannot contain best, while existing names are grandfathered.
Documentation
This project comes with a doxygen configuration file. Execute the following command to generate documentation:
doxygen Doxyfile
Citing
If you use this tool for your academic work, please make sure to cite the paper we wrote about it.
@inproceedings{DBLP:conf/tacas/CadilhacP23,
author = {Micha{\"{e}}l Cadilhac and
Guillermo A. P{\'{e}}rez},
editor = {Sriram Sankaranarayanan and
Natasha Sharygina},
title = {Acacia-Bonsai: {A} Modern Implementation of Downset-Based {LTL} Realizability},
booktitle = {Tools and Algorithms for the Construction and Analysis of Systems
- 29th International Conference, {TACAS} 2023, Held as Part of the
European Joint Conferences on Theory and Practice of Software, {ETAPS}
2022, Paris, France, April 22-27, 2023, Proceedings, Part {II}},
series = {Lecture Notes in Computer Science},
volume = {13994},
pages = {192--207},
publisher = {Springer},
year = {2023},
url = {https://doi.org/10.1007/978-3-031-30820-8\_14},
doi = {10.1007/978-3-031-30820-8\_14},
timestamp = {Sat, 29 Apr 2023 19:25:03 +0200},
biburl = {https://dblp.org/rec/conf/tacas/CadilhacP23.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
Metadata
Release files for acacia-boomslang 2.5.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 | |
|---|---|---|---|
| acacia_boomslang-2.5.1.tar.gz | 6.7 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| acacia_boomslang-2.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| acacia_boomslang-2.5.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 | Details |
| acacia_boomslang-2.5.1-cp314-cp314-macosx_15_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 15.0+ ARM64 | Details |
| acacia_boomslang-2.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| acacia_boomslang-2.5.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 | Details |
| acacia_boomslang-2.5.1-cp313-cp313-macosx_15_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 15.0+ ARM64 | Details |
Total release size: 231.2 MB
Release files / acacia_boomslang-2.5.1.tar.gz
| Download URL | acacia_boomslang-2.5.1.tar.gz |
|---|---|
| Size | 6.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f8063c37ed9347fc99104ab9d721788ae3cb4728ab100cbc321213ccb126612
|
|
BLAKE2b-256 checksum How to use checksums |
f65ca951f83e2e9c1a07ad14d0121b0b8d0e404be9362b40d1e84ec12627c5bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 4, 2026.
Transparency logRelease files / acacia_boomslang-2.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | acacia_boomslang-2.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 54.5 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
43a1c1d811f9e47503b191285008151a332ecf566b62136fe9b4a901dcae8c57
|
|
BLAKE2b-256 checksum How to use checksums |
bd054b9a21a1bfbcd42e235d1abc0bcb40a347f19e33a92377b5fb2e3b36af9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 4, 2026.
Transparency logRelease files / acacia_boomslang-2.5.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | acacia_boomslang-2.5.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 53.3 MB |
| Tags | CPython 3.14 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
85e76f5a38974208a8083510a41a7026607efe3bba3778b4c0c54f96ac5c2875
|
|
BLAKE2b-256 checksum How to use checksums |
d1166b04d1b754bd041edfa158aa757b250c2dbb02bccf1612005156eeb61681
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 4, 2026.
Transparency logRelease files / acacia_boomslang-2.5.1-cp314-cp314-macosx_15_0_arm64.whl
| Download URL | acacia_boomslang-2.5.1-cp314-cp314-macosx_15_0_arm64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.14 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b5981eb1e1a4f11f807f57993c50c54ab6a3079409cd688be98baf611cad53ba
|
|
BLAKE2b-256 checksum How to use checksums |
588e5b69cb2487302774f42b22f402c99072fbe1a5fb075aa01a1d46b2514455
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 4, 2026.
Transparency logRelease files / acacia_boomslang-2.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | acacia_boomslang-2.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 54.5 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
86505bf7a6cef41ae9bfff59a2018da881b6bbb781e752e5a8c33df56ae1bbe0
|
|
BLAKE2b-256 checksum How to use checksums |
674c601dce7edc9ee0b561d0dce2bf26cb035e7c49f9e7a1dd4cb1767fa10c6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 4, 2026.
Transparency logRelease files / acacia_boomslang-2.5.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | acacia_boomslang-2.5.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 53.3 MB |
| Tags | CPython 3.13 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
b5b396dd004dc542497623e92eb80077040175d884136df144974561214c9b33
|
|
BLAKE2b-256 checksum How to use checksums |
1289bce7593fbf895e8f54954ae21569e9b47e95eed5276c7f158ea6c8a0f321
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 4, 2026.
Transparency logRelease files / acacia_boomslang-2.5.1-cp313-cp313-macosx_15_0_arm64.whl
| Download URL | acacia_boomslang-2.5.1-cp313-cp313-macosx_15_0_arm64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.13 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
bafbdd1dc45537d694ec1000938a968cd314df63ec500803a91e634acc1edbd9
|
|
BLAKE2b-256 checksum How to use checksums |
c09c583a2309d8baafc2b15c35d566601df3f26e860256f3bff725a45d38079f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 4, 2026.
Transparency log