dv-solve
Domain-agnostic CLP(FD) constraint solver. No Zuspec runtime dependency.
Install
pip install dv-solve
For Zuspec-powered benchmarks and tests:
pip install dv-solve[zuspec]
Quick start
from dv_solve.builder import SolveProblemBuilder
from dv_solve.ctx import SolveCtx, SOLVE_OK
b = SolveProblemBuilder()
x = b.add_variable("x", 0, 255, signed=False, bits=8)
b.add_constraint(b.gt(b.var(x), b.constant(100, 8)))
prob_bytes, _ = b.finalize()
ctx = SolveCtx(prob_bytes)
ctx.compile()
assert ctx.solve() == SOLVE_OK
print("x =", ctx.get_value(x))
Module map
| Module | Purpose |
|---|---|
dv_solve.lib |
ctypes loader for libdv_solve.so |
dv_solve.problem |
SolveProblem buffer wrapper and expression constants |
dv_solve.builder |
SolveProblemBuilder — build constraint problems |
dv_solve.ctx |
SolveCtx — compile and solve problems |
dv_solve.icl |
ICL (Instance Constraint Library) tables |
dv_solve.partitioner |
Decompose a problem into independent subproblems |
dv_solve.structural_solver |
State-chain inference engine |
dv_solve.stream_solver |
Stream-linked constraint merging |
dv_solve.flow_constraint_store |
Flow-based constraint accumulation |
dv_solve.buffer_inference |
Buffer supply inference with ICL lookup and backtracking |
dv_solve.state_graph |
State transition graphs |
dv_solve.scheduling_graph |
Scheduling constraint graphs |
Zuspec integration
Install zuspec-solver to wire this solver into zuspec-dataclasses randomization
via the zuspec.solver.backend entry point.
Building the C library
cmake -S . -B build
cmake --build build
The shared library (libdv_solve.so) is installed alongside the Python package.
The C source prefix (zsp_) will be renamed to dvs_ in a future release.
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 dv_solve-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl.
File metadata
- Download URL: dv_solve-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08cc4232102b6bb62a4dbd7c9d4ca460716df243aebe08ba471390fe038acae1
|
|
| MD5 |
97c9dcb75c3c407cc57b2f0d1357aefb
|
|
| BLAKE2b-256 |
f128f44caec41a458f6ceb7cf34197eb3808ad682f47d4847defd299ef5d0060
|
File details
Details for the file dv_solve-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: dv_solve-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd155d65d89156f60befa02825e3f1c6eb9441763569a69d0d6cf3df87d2a9e3
|
|
| MD5 |
13e67a017f037e3430c54d9d6d9543c6
|
|
| BLAKE2b-256 |
fe1d96f9aaa1716b35a74bb7512d13de24f56855af6309ecfe93b5589579da89
|