Skip to content

Conversation

@ThomSerg
Copy link
Collaborator

@ThomSerg ThomSerg commented Oct 31, 2025

Adds support for the cvc5 SMT solver as backend. cvc5 provides a "pythonic" API which closely replicates Z3's API (but no support for optimisation). Unfortunately this API does not expose all cvc5's features, like unsat core extraction. There is also a very verbose C-style python API which exposes much more, maybe something to look at in the future but would require more work (the current wrapper is +- the same as the Z3 one).

There are still two TODOs since I'm not all too certain if I haven't missed any global constraints that cvc5 would support + what constraints it supports in a reified context.

@ThomSerg
Copy link
Collaborator Author

One of the tests will fail on cvc5, one that was also previously linked with a Z3 bug?

x = cp.intvar(0, 1)
m = cp.Model((x >= 0.1) & (x != 1))
s = cp.SolverLookup.get("z3", m)
self.assertFalse(s.solve()) # upgrade z3 with pip install --upgrade z3-solver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants