Metadata-Version: 2.4
Name: mv-sdd
Version: 0.1.0b1
Summary: Multi-Valued Sentential Decision Diagrams — a knowledge-compilation library with k-ary categorical fan-out at vtree leaves
Author: Robin Manhaeve
License-Expression: Apache-2.0
Keywords: sdd,sentential-decision-diagram,knowledge-compilation,multi-valued,categorical,model-counting
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: C
Classifier: Programming Language :: Cython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Dynamic: license-file

# 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

```bash
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

```python
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())
```

## 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

```bash
uv venv
uv pip install -e ".[dev]"
make test
```

Useful targets:

```bash
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:

```bash
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`.
