From: Andrew Reynolds Date: Wed, 20 Jan 2021 15:56:02 +0000 (-0600) Subject: Do not track processed in remove term formulas loop (#5791) X-Git-Tag: cvc5-1.0.0~2373 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6235612ddfdd59432eedf771a65c248d5b3d0469;p=cvc5.git Do not track processed in remove term formulas loop (#5791) The assertion/tracking was spurious, since an eliminated term may occur in multiple contexts. Fixes #5728 (which I could not reproduce currently). Adds a regression from a duplicate of that issue. --- diff --git a/src/smt/term_formula_removal.cpp b/src/smt/term_formula_removal.cpp index 42166d074..f77ae7b49 100644 --- a/src/smt/term_formula_removal.cpp +++ b/src/smt/term_formula_removal.cpp @@ -69,12 +69,9 @@ theory::TrustNode RemoveTermFormulas::run( if (fixedPoint) { size_t i = 0; - std::unordered_set processed; while (i < newAsserts.size()) { theory::TrustNode trn = newAsserts[i]; - AlwaysAssert(processed.find(trn.getProven()) == processed.end()); - processed.insert(trn.getProven()); // do not run to fixed point on subcall, since we are processing all // lemmas in this loop newAsserts[i] = runLemma(trn, newAsserts, newSkolems, false); diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index 328f7df8c..1c51a6c05 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -1545,6 +1545,7 @@ set(regress_1_tests regress1/issue3990-sort-inference.smt2 regress1/issue4273-ext-rew-cache.smt2 regress1/issue4335-unsat-core.smt2 + regress1/issue5739-rtf-processed.smt2 regress1/lemmas/clocksynchro_5clocks.main_invar.base.smtv1.smt2 regress1/lemmas/pursuit-safety-8.smtv1.smt2 regress1/lemmas/simple_startup_9nodes.abstract.base.smtv1.smt2 diff --git a/test/regress/regress1/issue5739-rtf-processed.smt2 b/test/regress/regress1/issue5739-rtf-processed.smt2 new file mode 100644 index 000000000..9ee876e60 --- /dev/null +++ b/test/regress/regress1/issue5739-rtf-processed.smt2 @@ -0,0 +1,14 @@ +; COMMAND-LINE: --cegqi-full +; EXPECT: unsat +(set-logic ALL) +(set-info :status unsat) +(assert + (not + (exists + ((a (_ BitVec 32)) + (b (_ BitVec 32)) + (c (_ BitVec 32)) + (d (_ BitVec 32)) + (e (_ BitVec 32))) + (distinct (bvashr c b) (bvlshr d a) e)))) +(check-sat)