Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dv_solve-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64manylinux: glibc 2.34+ x86-64

dv_solve-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

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

File hashes

Hashes for dv_solve-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 08cc4232102b6bb62a4dbd7c9d4ca460716df243aebe08ba471390fe038acae1
MD5 97c9dcb75c3c407cc57b2f0d1357aefb
BLAKE2b-256 f128f44caec41a458f6ceb7cf34197eb3808ad682f47d4847defd299ef5d0060

See more details on using hashes here.

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

File hashes

Hashes for dv_solve-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd155d65d89156f60befa02825e3f1c6eb9441763569a69d0d6cf3df87d2a9e3
MD5 13e67a017f037e3430c54d9d6d9543c6
BLAKE2b-256 fe1d96f9aaa1716b35a74bb7512d13de24f56855af6309ecfe93b5589579da89

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page