Make `--solve-int-as-bv=X` robust to rewriting (#6722)
authorAndres Noetzli <andres.noetzli@gmail.com>
Wed, 9 Jun 2021 20:31:45 +0000 (13:31 -0700)
committerGitHub <noreply@github.com>
Wed, 9 Jun 2021 20:31:45 +0000 (20:31 +0000)
commit6017579ab78cbc1390274290736ef311208a251b
tree70714952802ac299ae4cb3e15b35a86aeae80c9c
parent73a3f516e3179141a71d3201e908bebf3061ead0
Make `--solve-int-as-bv=X` robust to rewriting (#6722)

After commit 327a24508ed1d02a3fa233e680ffd0b30aa685a9, the int-to-bv
preprocessing pass is getting rewritten terms. As a result, the terms
can contain negative constants (instead of `(- c)`, i.e., `UMINUS` of a
positive constant) and `NONLINEAR_MULT`. The commit adds support for
those cases, does some minor cleanup, and adds regressions. The
regressions should allow us to detect if/when the preprocessing pass
breaks in the future.
src/preprocessing/passes/int_to_bv.cpp
test/regress/CMakeLists.txt
test/regress/regress0/int-to-bv/basic.smt2 [new file with mode: 0644]
test/regress/regress0/int-to-bv/neg-consts.smt2 [new file with mode: 0644]
test/regress/regress0/int-to-bv/not-enough-bits.smt2 [new file with mode: 0644]
test/regress/regress0/int-to-bv/overflow.smt2 [new file with mode: 0644]