Fix model issues with --bitblast=eager. (#6753)
authorMathias Preiner <mathias.preiner@gmail.com>
Mon, 21 Jun 2021 19:11:10 +0000 (12:11 -0700)
committerGitHub <noreply@github.com>
Mon, 21 Jun 2021 19:11:10 +0000 (19:11 +0000)
commit331187d557b2c54b079de6348ff1f597a72f50a2
treee0651d38c6ae1597b91ee6a2b6b7d419a27718bc
parent62cf9381eac3609e4af0509ffce3abf58ba71238
Fix model issues with --bitblast=eager. (#6753)

For model construction we only compute model values for relevant terms. The set of relevant terms is computed in https://github.com/cvc5/cvc5/blob/master/src/theory/model_manager_distributed.cpp#L58, which skips equalities by default because equalities are usually handled by the equality engine.
When --bitblast=eager is enabled all assertions are wrapped into BITVECTOR_EAGER_ATOM nodes and passed to the BV solver, which results in equalities below BITVECTOR_EAGER_ATOM nodes not being handled by the equality engine but by the BV solver directly. These equalities, however, are skipped when computing the relevant terms and therefore the BV solver is not asked to compute model values for variables below these equalities.

If --bitblast=eager is enabled the BV solver now additionally adds the variables encountered during bit-blasting to the relevant terms via computeRelevantTerms.

Co-authored-by: Andres Noetzli <andres.noetzli@gmail.com>
src/theory/bv/bitblast/simple_bitblaster.cpp
src/theory/bv/bitblast/simple_bitblaster.h
src/theory/bv/bv_solver.h
src/theory/bv/bv_solver_bitblast.cpp
src/theory/bv/bv_solver_bitblast.h
src/theory/bv/theory_bv.cpp
src/theory/bv/theory_bv.h
test/regress/CMakeLists.txt
test/regress/regress0/issue6741.smt2 [new file with mode: 0644]