Platform-tagged wheels bundling the Yices 2 SMT solver (CLI + shared library)
Project description
yices-solver
A platform-tagged Python package bundling the Yices 2 SMT solver binaries, available on PyPI.
What is Yices?
Yices is a fast and open source SMT (Satistifiability Modulo Theories) solver, comparable to Z3, CVC5, Bitwuzla, etc.
SMT solvers are commonly used in software verification, bug finding, constraint solving and optimization.
For instance, a16z/halmos is a symbolic testing tool that uses SMT solvers such as Yices as a backend.
Why a yices-solver Python package?
Until now, there was no easy way for a Python application to require the Yices runtime. Users would typically be instructeed to install Yices separately or to build it from source. This package solves this, it is now possible to require installation of the Yices binaries directly:
# pyproject.toml
[project]
dependencies = [
"yices-solver==2.6.5"
]
The dependency resolution mechanism will take care of resolving the appropriate version of the package to install given the current platform and architecture (e.g. Linux/x86, macOS/ARM, etc.).
Difference with the yices package
Note that this package only includes the binaries and not the Python bindings for yices. The Python bindings are released separately as the yices package on PyPI, published by the authors of Yices.
In summary:
- yices-solver (this package): binaries and shared libraries only, no Python bindings
- yices (published by SRI): Python bindings only, no binaries or shared libraries
Quick start
To use the solver interactively, we recommend using uv:
# this will:
# - create a virtual environment,
# - install yices-solver in it
# - make the binaries (e.g. yices-smt2) available on the PATH
uv tool install yices-solver
# check that the binary is available
yices-smt2 --version
# solve a simple smt2 query
echo "(set-logic QF_LIA) (declare-const x Int) (assert (< x 10)) (check-sat) (get-model)" | yices-smt2
Advanced usage
In projects
To install in a manually managed venv using pip:
python -m venv .venv
source .venv/bin/activate
python -m pip install "yices-solver~=2.6.5"
# check that the binary is available
yices --version
[!TIP] In order to keep the version number of this package and of yices in sync (e.g. version 2.6.5 of
yices-solvershould bundle version 2.6.5 of the Yices binaries), we use post-release tags when we make changes to the CI scripts. As a result, you should probably use a version specifier like"yices-solver~=2.6.5"to pick-up the latest post-release tag for the 2.6.5 version.
In scripts
You can also add it to your pyproject.toml as a dependency or inline as a script using a uv shebang:
#! /usr/bin/env uv run
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "yices-solver~=2.6.5",
# ]
# ///
import subprocess
# this should print the location the yices binary installed inside the temporary venv
subprocess.run(["which", "yices-smt2"])
# this should invoke the yices binary as an external process and print `sat`
subprocess.run(
['yices-smt2'],
input='(set-logic QF_LIA) (declare-const x Int) (assert (> x 0)) (check-sat)',
text=True
)
With the Python bindings
Support is experimental and needs to be documented, but it should be possible to:
- install both
yicesandyices-solver - locate the
lib/directory in the venv - overwrite the dynamic library loading path (e.g.
DYLD_LIBRARY_PATHon macOS) - import
yicessuch that libyices loads properly and the API can be used normally
How this works
Build process
We publish 4 wheels:
yices_solver-x.y.z-py3-none-manylinux_2_28_x86_64.whlyices_solver-x.y.z-py3-none-macosx_13_0_x86_64.whlyices_solver-x.y.z-py3-none-macosx_14_0_arm64.whlyices_solver-x.y.z-py3-none-win_amd64.whl
The Linux and macOS wheels are:
- built from source with the appropriate Yices tag (meaning that
yices_solver-x.y.zshould package the binaries for Yices tagx.y.z) - with MCSAT support enabled
- statically linked against libcudd, libpoly and GMP
The Windows wheel is not built from source, we extract the official Yices release binaries and repackage them as a wheel. A build from source on Windows would be a welcome contribution!
We try to make the publishing process as transparent and secure as possible, which is why we use Trusted Publishing.
The build scripts can be found here:
- .github/workflows/build-linux.yml
- .github/workflows/build-mac.yml .github/workflows/build-windows.yml
Installation
When you install the yices-solver package (e.g. with pip), the resolver should pick the right wheel for your OS and architecture. The macOS/Linux wheels are organized like this:
yices_solver-x.y.z
├── yices_solver
│ └── lib
│ ├── libyices.2.dylib /
│ └── libyices.a
├── yices_solver-x.y.z.data
│ └── data
│ └── bin
│ ├── yices
│ ├── yices-sat
│ ├── yices-smt
│ └── yices-smt2
└── yices_solver-x.y.z.dist-info
├── METADATA
├── RECORD
├── WHEEL
├── licenses
│ └── LICENSE
└── top_level.txt
And similarly, the Windows wheel:
yices_solver-x.y.z-py3-none-win_amd64
├── yices_solver
│ └── lib
│ └── libyices.dll
├── yices_solver-x.y.z.data
│ └── data
│ └── Scripts
│ ├── yices-sat.exe
│ ├── yices-smt.exe
│ ├── yices-smt2.exe
│ └── yices.exe
└── yices_solver-x.y.z.dist-info
├── licenses
│ └── LICENSE
├── METADATA
├── RECORD
├── top_level.txt
└── WHEEL
As a result, when the wheels are installed in a virtual environment, the binaries should be placed under <venv>/bin (resp. <venv>\Scripts) and available in PATH.
License
The yices-solver package is a binary distribution of Yices with no modifications to the source code, and inherits the GPL-3.0 license of Yices itself.
Acknowledgements
Yices is developed independently by the Computer Science Laboratory at SRI International (https://yices.csl.sri.com/), all credits go to the developers and contributors.
Please refer to the Yices manual for questions about usage, issues, bug reports, etc.
Disclaimer
This code is being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the code. It has not been audited and as such there can be no assurance it will work as intended, and users may experience delays, failures, errors, omissions or loss of transmitted information. Nothing in this repo should be construed as investment advice or legal advice for any particular facts or circumstances and is not meant to replace competent counsel. It is strongly advised for you to contact a reputable attorney in your jurisdiction for any questions or concerns with respect thereto. a16z is not liable for any use of the foregoing, and users should proceed with caution and use at their own risk. See a16z.com/disclosures for more info.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yices_solver-2.6.5.post24-py3-none-win_amd64.whl.
File metadata
- Download URL: yices_solver-2.6.5.post24-py3-none-win_amd64.whl
- Upload date:
- Size: 3.7 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54fa27464a3cd4cceceb86169abb79a30463aa4220bf5efb4c58c4623c301226
|
|
| MD5 |
a44c6e987fd60619183bd1c3e00212a2
|
|
| BLAKE2b-256 |
c92535b86ae854fc7b0b72547ce237e0ebc4e8cddf2eb0b9ffcc7ca92c5e509a
|
Provenance
The following attestation bundles were made for yices_solver-2.6.5.post24-py3-none-win_amd64.whl:
Publisher:
release.yml on a16z/yices-solver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yices_solver-2.6.5.post24-py3-none-win_amd64.whl -
Subject digest:
54fa27464a3cd4cceceb86169abb79a30463aa4220bf5efb4c58c4623c301226 - Sigstore transparency entry: 226434831
- Sigstore integration time:
-
Permalink:
a16z/yices-solver@b926ae45b72eb0852a1a32de757cc18be21c9ed1 -
Branch / Tag:
refs/tags/v2.6.5 - Owner: https://github.com/a16z
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b926ae45b72eb0852a1a32de757cc18be21c9ed1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yices_solver-2.6.5.post24-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: yices_solver-2.6.5.post24-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 10.4 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0a7c8fad531fe3a2cd1616bab1b73bd1619604f0bf8fa2d55236e092c2f4219
|
|
| MD5 |
b5eb16e044f27c817b2f3882b5a0923f
|
|
| BLAKE2b-256 |
285c85c81dcb3d772345a9bea5deb40d7ba4b24c8ab2423e7bd7175db9239aaa
|
Provenance
The following attestation bundles were made for yices_solver-2.6.5.post24-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on a16z/yices-solver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yices_solver-2.6.5.post24-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
d0a7c8fad531fe3a2cd1616bab1b73bd1619604f0bf8fa2d55236e092c2f4219 - Sigstore transparency entry: 226434844
- Sigstore integration time:
-
Permalink:
a16z/yices-solver@b926ae45b72eb0852a1a32de757cc18be21c9ed1 -
Branch / Tag:
refs/tags/v2.6.5 - Owner: https://github.com/a16z
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b926ae45b72eb0852a1a32de757cc18be21c9ed1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yices_solver-2.6.5.post24-py3-none-macosx_14_0_arm64.whl.
File metadata
- Download URL: yices_solver-2.6.5.post24-py3-none-macosx_14_0_arm64.whl
- Upload date:
- Size: 6.2 MB
- Tags: Python 3, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c856e5d7f6bebd4ec8ccc5eee0713d01cb6b0f4c00fb8eb1a292c93d58f430e9
|
|
| MD5 |
87433840e265c5d467b6545f20799d3b
|
|
| BLAKE2b-256 |
c99d13bac80514525cb3189a3aae8088d0a7aefd2bf450f7ec0f8448dea297f2
|
Provenance
The following attestation bundles were made for yices_solver-2.6.5.post24-py3-none-macosx_14_0_arm64.whl:
Publisher:
release.yml on a16z/yices-solver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yices_solver-2.6.5.post24-py3-none-macosx_14_0_arm64.whl -
Subject digest:
c856e5d7f6bebd4ec8ccc5eee0713d01cb6b0f4c00fb8eb1a292c93d58f430e9 - Sigstore transparency entry: 226434837
- Sigstore integration time:
-
Permalink:
a16z/yices-solver@b926ae45b72eb0852a1a32de757cc18be21c9ed1 -
Branch / Tag:
refs/tags/v2.6.5 - Owner: https://github.com/a16z
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b926ae45b72eb0852a1a32de757cc18be21c9ed1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yices_solver-2.6.5.post24-py3-none-macosx_13_0_x86_64.whl.
File metadata
- Download URL: yices_solver-2.6.5.post24-py3-none-macosx_13_0_x86_64.whl
- Upload date:
- Size: 6.5 MB
- Tags: Python 3, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
168a026b0e6b1715bec10699d498b93089d160afd13060b7dfc1408ece1c045b
|
|
| MD5 |
96786dcb91454d05960ac7ae9d522bf6
|
|
| BLAKE2b-256 |
6ecbb5289d59ae98cc3ace0e1cd3c86999be738a98a80ec8f4623162da665383
|
Provenance
The following attestation bundles were made for yices_solver-2.6.5.post24-py3-none-macosx_13_0_x86_64.whl:
Publisher:
release.yml on a16z/yices-solver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yices_solver-2.6.5.post24-py3-none-macosx_13_0_x86_64.whl -
Subject digest:
168a026b0e6b1715bec10699d498b93089d160afd13060b7dfc1408ece1c045b - Sigstore transparency entry: 226434822
- Sigstore integration time:
-
Permalink:
a16z/yices-solver@b926ae45b72eb0852a1a32de757cc18be21c9ed1 -
Branch / Tag:
refs/tags/v2.6.5 - Owner: https://github.com/a16z
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b926ae45b72eb0852a1a32de757cc18be21c9ed1 -
Trigger Event:
push
-
Statement type: