Research / cvc5

cvc5 returned a wrong sat on a separation-logic problem.

ReproducedFixed upstream
Result
A cache keyed without polarity let cvc5 return a wrong sat on a separation-logic problem. The fix is released in cvc5 1.4.2.
Boundary
One theory and one class of formula. The rest of cvc5 was not audited, and the failing input was found by another user.
Who did what
Reported by another user (issue #12870). Warren traced the root cause and submitted the fix (PR #12937).
Public evidence

The question

Why does adding a statement that holds for every input flip this SMT solver’s answer from unsat to sat?

cvc5 is one of the main open-source SMT solvers. Verification tools use its answers to decide whether a program is correct, so a wrong sat can turn into a wrong verdict about someone else’s software.

Reported or claimedsat
Independent checkWrong. Two assertions alone give unsat; adding a third that holds for every heap gives sat.

Reproduced: A reported behaviour was reproduced from a minimal, public input. Fixed upstream: The maintainers accepted a fix into the project. Who wrote it is stated on each case.

What was tested

  1. Reproduced the reported input.
  2. Followed the reduction of each assertion through the solver to find where the wrong answer entered.
  3. Checked whether the same caching pattern affects the other separation-logic operators.

What happened

  • TheorySep::reduceFact cached reduced conclusions keyed without polarity. That is valid for the other separation-logic operators, but sep.emp emits a polarity-specific lemma and leaves a null conclusion that was still cached.
  • Changing the cache key removes the wrong answer; regression tests were added with the fix.

Challenge

The objections that would most easily undo the conclusion, and what answered each.

Is it a bug or a question of interpretation?
The reporter had already shown it is a bug: the added assertion is valid, the returned heap breaks the formula, and an option that removes sep.emp early gives the right answer. The open question was why.
Could the cache be wrong for the other operators too?
No. Their cached conclusions do not depend on polarity, so only sep.emp is affected, and the fix changes nothing else.

What survived

Did not survive

  • cvc5’s answer to this separation-logic problem is correct.A wrong sat, caused by a polarity-blind cache in one reduction path. Fixed in PR #12937, merged 1 October 2026.

Survived

  • The other separation-logic operators are unaffected.Their cached conclusions are polarity-independent.

Not established, or not tested

  • No wider audit of cvc5 was made.

Limits

One theory and one class of formula. The failing input was found by someone else; Warren’s part was the root cause and the fix.

Reproduce or inspect

Source
cvc5/cvc5/issues/12870
Revision
cvc5 1.3.x (before the fix); fixed in 1.4.2
Command
cvc5 <input from issue #12870>
Expect
sat before the fix; unsat with the fix

The minimal input is in the issue. The fix and its regression tests are in pull request #12937. The command is given as the repository documents it; it was not re-run for this page.

Public record

Have a question like this?