This release is a pre-release and may not be stable for production use.
mv-sdd
Multi-valued sentential decision diagrams for Python, backed by a C99 core and exposed through Cython bindings.
The public Python package is mv-sdd; the import package is pymvsdd.
Installation
pip install mv-sdd
The source distribution includes the libmvsdd C sources needed to
build the extension, so users do not need to run make -C libmvsdd
before installing.
Minimal Example
from pymvsdd import Manager, Vtree
vtree = Vtree.right_linear([2, 2])
manager = Manager(vtree)
# Empty CNF over two Boolean variables has 4 models.
node = manager.compile_cnf([])
print(node.model_count())
Formulas can also be built with Apply, and counted with one weight per (variable, value), laid out variable by variable:
from pymvsdd import Manager, Vtree
manager = Manager(Vtree.balanced([3, 2])) # X in {0, 1, 2}, Y in {0, 1}
f = manager.terminal(0, [0, 2]) & ~manager.literal(1, 1) # X in {0, 2} and Y != 1
weights = [0.2, 0.5, 0.3, # X
0.4, 0.6] # Y
print(manager.wmc(f, weights)) # (0.2 + 0.3) * 0.4 = 0.2
Variables a node does not mention contribute the sum of their weights, so
weights need not be normalised; pass log_mode=True for log-space weights.
Repository Layout
libmvsdd/contains the C99 core and C tests.pymvsdd/contains the Cython bindings shipped in the wheel.pymvsdd_ref/contains the pure-Python reference implementation used by tests.
Benchmark harnesses, paper drafts, third-party source copies, and local research artifacts are intentionally not part of the public repository.
Development
uv venv
uv pip install -e ".[dev]"
make test
Useful targets:
make all # build libmvsdd and install the editable binding
make test # pytest plus libmvsdd C tests
make clean # remove local build artifacts
Release
Local validation:
uv run --with build python -m build
uv run --with twine python -m twine check dist/*
python -m venv /tmp/mv-sdd-wheel-test
/tmp/mv-sdd-wheel-test/bin/python -m pip install dist/mv_sdd-*.whl
/tmp/mv-sdd-wheel-test/bin/python -c "from pymvsdd import Vtree, Manager; vt = Vtree.right_linear([2, 2]); print(Manager(vt).compile_cnf([]).model_count())"
GitHub Actions builds the sdist and CPython 3.10-3.13 wheels for Linux
and macOS with cibuildwheel. Pushing a v* tag publishes checked
artifacts to PyPI through Trusted Publishing, using the repository's
pypi environment.
License
Apache-2.0. See LICENSE.
Metadata
Release files for mv-sdd 0.1.0b2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mv_sdd-0.1.0b2.tar.gz | 243.5 kB | Details |
Built distributions (wheels)
Total release size: 6.2 MB
Release files / mv_sdd-0.1.0b2.tar.gz
| Download URL | mv_sdd-0.1.0b2.tar.gz |
|---|---|
| Size | 243.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af9b9cf34df306cec97479b83567a50947517b840723bcd25beb4b4c9a5c1c38
|
|
BLAKE2b-256 checksum How to use checksums |
a27b1a4ce085ef06838b35874161431762afd91d2f86f1c4f4a582ef8eb3a843
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | mv_sdd-0.1.0b2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 859.1 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7e9316128550a75bc742d4891754163097fe38f4b3dd2c48d55b8271ebcab20d
|
|
BLAKE2b-256 checksum How to use checksums |
832e00f514693143efaa0363545e2a251541946382e93f461f43c6a00c7a19cd
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | mv_sdd-0.1.0b2-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 318.8 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
eb0b1bc42c60bd79dfa90cb2eb667e391f9b6d3acc9fcf134add61dbe0607362
|
|
BLAKE2b-256 checksum How to use checksums |
4996405af5bcdb95a0d01d90de7161b0c9891c2dd503292988b49cb6ab5aafb9
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp313-cp313-macosx_10_13_x86_64.whl
| Download URL | mv_sdd-0.1.0b2-cp313-cp313-macosx_10_13_x86_64.whl |
|---|---|
| Size | 331.8 kB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
420600d51394c1a49bfeb137b3d300278b5e050b92b705715449d16f2a3357ac
|
|
BLAKE2b-256 checksum How to use checksums |
16aad160376c05ac77358743f64dd56d338746b627dc59bff59d395bcde3d79c
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | mv_sdd-0.1.0b2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 869.7 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
53e2e0ba7c9e53c9f92472a619ccb3674fc3e2eb07dfffc9bdbef32d65e54f16
|
|
BLAKE2b-256 checksum How to use checksums |
010682e06875c6ab44dd4860be453b875afaf81560823b2c3c35cf02a83edbdb
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | mv_sdd-0.1.0b2-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 319.2 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2d6ffe7a26d4fea37384757580f117853df9f69d7a4b87644633cf998bd48804
|
|
BLAKE2b-256 checksum How to use checksums |
152dc5842c7c6978a0c2eb9d03b1f7842b7858c78be28c5f865b2686654aeecb
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | mv_sdd-0.1.0b2-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 331.7 kB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
4d61fdcdd8673e9c0c7505d9f7691611137f34e4865b29688dca3c0456c189d7
|
|
BLAKE2b-256 checksum How to use checksums |
54a74cf63fd0d45670e77e873b829d00a7ca3292ce51da68fefb53b4c093f777
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | mv_sdd-0.1.0b2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 841.6 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6e626b08dc32e919fbddb29586e787ce72790b368c67c47d917d288a8178e084
|
|
BLAKE2b-256 checksum How to use checksums |
2f5ab36861a1f44061aba6b04c601f4e93256c2835af959056a858e1c87dcb39
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | mv_sdd-0.1.0b2-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 318.7 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9ae962b0910a68b16118bef1aab85c0255f785cd2b35baa92937e0d954879198
|
|
BLAKE2b-256 checksum How to use checksums |
b986a88d49f6e25b7ec5a18ece81a6dd10f8c810cd9ae51c406a32201b19830f
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | mv_sdd-0.1.0b2-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 330.4 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
fd4d14fb90c90e9fea9d7753b49bd08cf65245a89addbe86540162dd5f870398
|
|
BLAKE2b-256 checksum How to use checksums |
af25134739fc4d6de2f090b5adc7567f466b69ff12b9472f1c801f4bcdeaa81b
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | mv_sdd-0.1.0b2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 811.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
e9fa93784480da4c0ad9f919ede03c9cb3d7996f8803c3cda22672a80582d81c
|
|
BLAKE2b-256 checksum How to use checksums |
edbac5b1e372d0ae12a78dafe813d212c4fdb22dca3d8cd7c457e73d8fcbc1cd
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | mv_sdd-0.1.0b2-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 319.2 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cca6427cd9f9a3efbfd2800006b1d803de548cd72438c3b2f0afc7944111bcb6
|
|
BLAKE2b-256 checksum How to use checksums |
fa5c1be7944f37b9280e6e2535aa0b12bad60087f663725825395acc12ebf8ec
|
| 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 Sep 14, 2026.
Transparency logRelease files / mv_sdd-0.1.0b2-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | mv_sdd-0.1.0b2-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 330.7 kB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
f940a46e5483585830eac35b0f8b7b25f36570256ca9c36201a6e08e8c1166e9
|
|
BLAKE2b-256 checksum How to use checksums |
20a2dd3739c1b138b896c6f3dad5c3e12ffcdee090330c6366c6aeb2ce7f8eac
|
| 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 Sep 14, 2026.
Transparency log