summaryrefslogtreecommitdiff
path: root/src/smt
diff options
context:
space:
mode:
authoryoni206 <yoni206@users.noreply.github.com>2020-10-06 13:47:58 -0700
committerGitHub <noreply@github.com>2020-10-06 15:47:58 -0500
commit5aa526ab1df69783d17750bfce8819a6e358e157 (patch)
treec615abaee6f4bb492ed4d9256d806bbede77cb2e /src/smt
parente10c381b821337c239479d86fbf1d2eb617c590a (diff)
bv-to-int: change order of passes (#5208)
Closes #5095 and replaces #5110. There are two tests in #5095 that produce two different assertion failures when using bv-to-int. The first happens because the substitution map wasn't applied after the pass. The second happens because div (that is introduced in the pass) is not rewritten using witness. Both problems are solved by making sure that apply-substs, theory-preprocess and ite-removal are executed after bv-to-int. The two tests from #5095 are included as regressions.
Diffstat (limited to 'src/smt')
-rw-r--r--src/smt/process_assertions.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/smt/process_assertions.cpp b/src/smt/process_assertions.cpp
index 971288b67..719165048 100644
--- a/src/smt/process_assertions.cpp
+++ b/src/smt/process_assertions.cpp
@@ -201,16 +201,6 @@ bool ProcessAssertions::apply(Assertions& as)
d_passes["bv-intro-pow2"]->apply(&assertions);
}
- // Since this pass is not robust for the information tracking necessary for
- // unsat cores, it's only applied if we are not doing unsat core computation
- if (!options::unsatCores())
- {
- d_passes["apply-substs"]->apply(&assertions);
- }
-
- // Assertions MUST BE guaranteed to be rewritten by this point
- d_passes["rewrite"]->apply(&assertions);
-
// Lift bit-vectors of size 1 to bool
if (options::bitvectorToBool())
{
@@ -219,8 +209,22 @@ bool ProcessAssertions::apply(Assertions& as)
if (options::solveBVAsInt() != options::SolveBVAsIntMode::OFF)
{
d_passes["bv-to-int"]->apply(&assertions);
+ // after running bv-to-int, we need to immediately run
+ // theory-preprocess and ite-removal so that newlly created
+ // terms and assertions are normalized (e.g., div is expanded).
+ d_passes["theory-preprocess"]->apply(&assertions);
}
+ // Since this pass is not robust for the information tracking necessary for
+ // unsat cores, it's only applied if we are not doing unsat core computation
+ if (!options::unsatCores())
+ {
+ d_passes["apply-substs"]->apply(&assertions);
+ }
+
+ // Assertions MUST BE guaranteed to be rewritten by this point
+ d_passes["rewrite"]->apply(&assertions);
+
// Convert non-top-level Booleans to bit-vectors of size 1
if (options::boolToBitvector() != options::BoolToBVMode::OFF)
{
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback