From 761bb503aa475fae1748afd6f583dd9af772f1cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Dejan=20Jovanovi=C4=87?= Date: Thu, 14 Jun 2012 22:20:15 +0000 Subject: [PATCH] fixing the problems with the bvminisat. there was a case when things would get bitblasted, it would restart to add the clauses, and loose propagation information. --- src/prop/bvminisat/bvminisat.cpp | 4 + src/prop/bvminisat/bvminisat.h | 2 + src/prop/bvminisat/core/Solver.cc | 8 +- src/prop/bvminisat/core/Solver.h | 3 +- src/prop/sat_solver.h | 4 +- src/theory/bv/bitblaster.cpp | 4 + src/theory/bv/bitblaster.h | 1 + src/theory/bv/bv_subtheory_bitblast.cpp | 11 ++ src/theory/theory_engine.cpp | 3 +- test/regress/regress0/aufbv/Makefile.am | 5 +- test/regress/regress0/aufbv/fuzz07.smt | 143 +++++++++++++++++++ test/regress/regress0/aufbv/fuzz08.smt | 162 ++++++++++++++++++++++ test/regress/regress0/aufbv/fuzz09.smt | 176 ++++++++++++++++++++++++ 13 files changed, 521 insertions(+), 5 deletions(-) create mode 100644 test/regress/regress0/aufbv/fuzz07.smt create mode 100644 test/regress/regress0/aufbv/fuzz08.smt create mode 100644 test/regress/regress0/aufbv/fuzz09.smt diff --git a/src/prop/bvminisat/bvminisat.cpp b/src/prop/bvminisat/bvminisat.cpp index 4868db6f5..032788806 100644 --- a/src/prop/bvminisat/bvminisat.cpp +++ b/src/prop/bvminisat/bvminisat.cpp @@ -55,6 +55,10 @@ void BVMinisatSatSolver::addClause(SatClause& clause, bool removable) { d_minisat->addClause(minisat_clause); } +SatValue BVMinisatSatSolver::propagate() { + return toSatLiteralValue(d_minisat->propagateAssumptions()); +} + void BVMinisatSatSolver::addMarkerLiteral(SatLiteral lit) { d_minisat->addMarkerLiteral(BVMinisat::var(toMinisatLit(lit))); } diff --git a/src/prop/bvminisat/bvminisat.h b/src/prop/bvminisat/bvminisat.h index 60cdd1c28..d337ff4e6 100644 --- a/src/prop/bvminisat/bvminisat.h +++ b/src/prop/bvminisat/bvminisat.h @@ -72,6 +72,8 @@ public: void addClause(SatClause& clause, bool removable); + SatValue propagate(); + SatVariable newVar(bool theoryAtom = false); SatVariable trueVar() { return d_minisat->trueVar(); } diff --git a/src/prop/bvminisat/core/Solver.cc b/src/prop/bvminisat/core/Solver.cc index 2eadbdf22..94f3a6b74 100644 --- a/src/prop/bvminisat/core/Solver.cc +++ b/src/prop/bvminisat/core/Solver.cc @@ -522,6 +522,12 @@ void Solver::popAssumption() { cancelUntil(assumptions.size()); } +lbool Solver::propagateAssumptions() { + only_bcp = true; + ccmin_mode = 0; + return search(-1); +} + lbool Solver::assertAssumption(Lit p, bool propagate) { // assert(marker[var(p)] == 1); @@ -953,7 +959,7 @@ void Solver::explain(Lit p, std::vector& explanation) { Debug("bvminisat::explain") << OUTPUT_TAG << "starting explain of " << p << std::endl; - __gnu_cxx::hash_set visited; + __gnu_cxx::hash_set visited; visited.insert(var(p)); while(queue.size() > 0) { diff --git a/src/prop/bvminisat/core/Solver.h b/src/prop/bvminisat/core/Solver.h index ea8e98c4c..b50ab632e 100644 --- a/src/prop/bvminisat/core/Solver.h +++ b/src/prop/bvminisat/core/Solver.h @@ -105,7 +105,8 @@ public: bool solve (Lit p, Lit q, Lit r); // Search for a model that respects three assumptions. bool okay () const; // FALSE means solver is in a conflicting state lbool assertAssumption(Lit p, bool propagate); // Assert a new assumption, start BCP if propagate = true - void popAssumption(); // Pop an assumption + lbool propagateAssumptions(); // Do BCP over asserted assumptions + void popAssumption(); // Pop an assumption void toDimacs (FILE* f, const vec& assumps); // Write CNF to file in DIMACS-format. void toDimacs (const char *file, const vec& assumps); diff --git a/src/prop/sat_solver.h b/src/prop/sat_solver.h index 79e54cac2..102f8051b 100644 --- a/src/prop/sat_solver.h +++ b/src/prop/sat_solver.h @@ -95,7 +95,7 @@ public: * Notify about a learnt clause. */ virtual void notify(SatClause& clause) = 0; -}; + }; virtual void setNotify(Notify* notify) = 0; @@ -105,6 +105,8 @@ public: virtual void addMarkerLiteral(SatLiteral lit) = 0; + virtual SatValue propagate() = 0; + virtual void explain(SatLiteral lit, std::vector& explanation) = 0; virtual SatValue assertAssumption(SatLiteral lit, bool propagate = false) = 0; diff --git a/src/theory/bv/bitblaster.cpp b/src/theory/bv/bitblaster.cpp index a9c6d2676..60a98e6e5 100644 --- a/src/theory/bv/bitblaster.cpp +++ b/src/theory/bv/bitblaster.cpp @@ -173,6 +173,10 @@ void Bitblaster::explain(TNode atom, std::vector& explanation) { * */ +bool Bitblaster::propagate() { + return d_satSolver->propagate() == prop::SAT_VALUE_TRUE; +} + bool Bitblaster::assertToSat(TNode lit, bool propagate) { // strip the not TNode atom; diff --git a/src/theory/bv/bitblaster.h b/src/theory/bv/bitblaster.h index b27415e0b..16c50be22 100644 --- a/src/theory/bv/bitblaster.h +++ b/src/theory/bv/bitblaster.h @@ -129,6 +129,7 @@ public: Bitblaster(context::Context* c, bv::TheoryBV* bv); ~Bitblaster(); bool assertToSat(TNode node, bool propagate = true); + bool propagate(); bool solve(bool quick_solve = false); void getConflict(std::vector& conflict); void explain(TNode atom, std::vector& explanation); diff --git a/src/theory/bv/bv_subtheory_bitblast.cpp b/src/theory/bv/bv_subtheory_bitblast.cpp index 334a704e9..a5a9b9a7e 100644 --- a/src/theory/bv/bv_subtheory_bitblast.cpp +++ b/src/theory/bv/bv_subtheory_bitblast.cpp @@ -93,6 +93,17 @@ bool BitblastSolver::addAssertions(const std::vector& assertions, Theory: } } + // We need to ensure we are fully propagated, so propagate now + if (d_useSatPropagation) { + bool ok = d_bitblaster->propagate(); + if (!ok) { + std::vector conflictAtoms; + d_bitblaster->getConflict(conflictAtoms); + d_bv->setConflict(mkConjunction(conflictAtoms)); + return false; + } + } + // solving if (e == Theory::EFFORT_FULL || Options::current()->bitvectorEagerFullcheck) { Assert(!d_bv->inConflict()); diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp index 557acae95..d85d8915b 100644 --- a/src/theory/theory_engine.cpp +++ b/src/theory/theory_engine.cpp @@ -1131,6 +1131,8 @@ theory::LemmaStatus TheoryEngine::lemma(TNode node, bool negated, bool removable void TheoryEngine::conflict(TNode conflict, TheoryId theoryId) { + Debug("theory::conflict") << "TheoryEngine::conflict(" << conflict << ", " << theoryId << ")" << std::endl; + // Mark that we are in conflict d_inConflict = true; @@ -1152,7 +1154,6 @@ void TheoryEngine::conflict(TNode conflict, TheoryId theoryId) { lemma(fullConflict, true, true); } else { // When only one theory, the conflict should need no processing - Debug("theory::conflict") << "TheoryEngine::conflict(" << conflict << ", " << theoryId << ")" << std::endl; Assert(properConflict(conflict)); lemma(conflict, true, true); } diff --git a/test/regress/regress0/aufbv/Makefile.am b/test/regress/regress0/aufbv/Makefile.am index 3335fb0b8..30a88f4a2 100644 --- a/test/regress/regress0/aufbv/Makefile.am +++ b/test/regress/regress0/aufbv/Makefile.am @@ -31,7 +31,10 @@ TESTS = \ fuzz05.delta01.smt \ fuzz05.smt \ fuzz06.delta01.smt \ - fuzz06.smt + fuzz06.smt \ + fuzz07.smt \ + fuzz08.smt \ + fuzz09.smt # failing # fuzz01.smt \ diff --git a/test/regress/regress0/aufbv/fuzz07.smt b/test/regress/regress0/aufbv/fuzz07.smt new file mode 100644 index 000000000..e57d45e7f --- /dev/null +++ b/test/regress/regress0/aufbv/fuzz07.smt @@ -0,0 +1,143 @@ +(benchmark fuzzsmt +:logic QF_AUFBV +:status sat +:extrafuns ((v0 BitVec[6])) +:extrafuns ((v1 BitVec[16])) +:extrafuns ((v2 BitVec[1])) +:extrafuns ((a3 Array[1:16])) +:extrafuns ((a4 Array[16:1])) +:formula +(let (?e5 bv6[4]) +(let (?e6 (ite (bvult v0 (sign_extend[5] v2)) bv1[1] bv0[1])) +(let (?e7 (sign_extend[0] v1)) +(let (?e8 (ite (bvslt ?e5 (zero_extend[3] ?e6)) bv1[1] bv0[1])) +(let (?e9 (store a4 (sign_extend[15] ?e6) ?e8)) +(let (?e10 (select ?e9 (zero_extend[15] ?e6))) +(let (?e11 (select a3 (extract[4:4] v0))) +(let (?e12 (select a3 (extract[0:0] ?e5))) +(let (?e13 (store ?e9 (sign_extend[15] ?e6) (extract[4:4] v1))) +(let (?e14 (select ?e13 ?e11)) +(let (?e15 (select ?e13 ?e12)) +(let (?e16 (bvadd (sign_extend[15] ?e15) v1)) +(let (?e17 (bvlshr ?e12 (sign_extend[12] ?e5))) +(let (?e18 (bvsdiv (zero_extend[15] ?e10) ?e11)) +(let (?e19 (bvlshr ?e14 ?e8)) +(let (?e20 (rotate_right[0] ?e6)) +(let (?e21 (ite (bvugt ?e7 (sign_extend[15] ?e15)) bv1[1] bv0[1])) +(let (?e22 (bvxnor (zero_extend[5] ?e15) v0)) +(let (?e23 (bvsdiv (sign_extend[15] v2) ?e18)) +(flet ($e24 (distinct (zero_extend[15] ?e8) ?e12)) +(flet ($e25 (bvult (sign_extend[5] ?e10) v0)) +(flet ($e26 (bvsle ?e12 ?e16)) +(flet ($e27 (bvsle (zero_extend[15] ?e19) ?e11)) +(flet ($e28 (bvult ?e17 ?e16)) +(flet ($e29 (bvsgt ?e14 ?e15)) +(flet ($e30 (bvsgt v0 (zero_extend[5] ?e14))) +(flet ($e31 (bvslt (zero_extend[15] ?e19) ?e7)) +(flet ($e32 (bvuge v1 ?e7)) +(flet ($e33 (bvsge ?e5 ?e5)) +(flet ($e34 (bvsge (sign_extend[15] ?e20) ?e7)) +(flet ($e35 (= (zero_extend[15] ?e14) v1)) +(flet ($e36 (bvugt ?e15 ?e10)) +(flet ($e37 (bvugt (zero_extend[15] ?e19) ?e18)) +(flet ($e38 (bvule ?e23 (sign_extend[15] ?e19))) +(flet ($e39 (bvsle (sign_extend[15] v2) ?e17)) +(flet ($e40 (bvsle ?e21 v2)) +(flet ($e41 (bvult ?e21 v2)) +(flet ($e42 (bvugt v0 (zero_extend[2] ?e5))) +(flet ($e43 (bvule ?e19 ?e15)) +(flet ($e44 (bvuge v0 (zero_extend[5] v2))) +(flet ($e45 (bvsle ?e8 v2)) +(flet ($e46 (bvsle ?e5 (zero_extend[3] ?e6))) +(flet ($e47 (bvuge ?e15 ?e6)) +(flet ($e48 (bvslt (sign_extend[10] v0) v1)) +(flet ($e49 (distinct ?e11 (sign_extend[10] v0))) +(flet ($e50 (distinct ?e11 ?e18)) +(flet ($e51 (bvugt (zero_extend[15] ?e15) ?e12)) +(flet ($e52 (bvuge ?e16 ?e23)) +(flet ($e53 (bvult ?e15 ?e15)) +(flet ($e54 (distinct ?e20 ?e20)) +(flet ($e55 (= v1 ?e7)) +(flet ($e56 (bvult (zero_extend[15] ?e21) ?e7)) +(flet ($e57 (distinct ?e12 ?e23)) +(flet ($e58 (bvult (zero_extend[5] ?e8) v0)) +(flet ($e59 (bvsle ?e8 ?e19)) +(flet ($e60 (= ?e10 ?e14)) +(flet ($e61 (bvult ?e6 ?e19)) +(flet ($e62 (bvsle ?e17 (zero_extend[15] ?e10))) +(flet ($e63 (bvugt ?e12 ?e18)) +(flet ($e64 (bvsgt ?e20 ?e10)) +(flet ($e65 (= ?e17 v1)) +(flet ($e66 (bvule ?e6 ?e19)) +(flet ($e67 (bvsle (sign_extend[15] ?e8) ?e12)) +(flet ($e68 (bvsle (sign_extend[15] ?e10) v1)) +(flet ($e69 (bvslt ?e23 (zero_extend[15] ?e10))) +(flet ($e70 (bvule ?e7 ?e12)) +(flet ($e71 (bvsle ?e7 (sign_extend[15] v2))) +(flet ($e72 (bvult ?e21 ?e10)) +(flet ($e73 (= v1 (zero_extend[10] v0))) +(flet ($e74 (bvsgt (zero_extend[3] ?e20) ?e5)) +(flet ($e75 (bvule ?e23 (zero_extend[10] ?e22))) +(flet ($e76 (xor $e41 $e34)) +(flet ($e77 (xor $e57 $e53)) +(flet ($e78 (xor $e43 $e46)) +(flet ($e79 (if_then_else $e59 $e49 $e77)) +(flet ($e80 (not $e42)) +(flet ($e81 (iff $e26 $e63)) +(flet ($e82 (xor $e45 $e79)) +(flet ($e83 (xor $e69 $e58)) +(flet ($e84 (xor $e29 $e51)) +(flet ($e85 (iff $e60 $e81)) +(flet ($e86 (or $e55 $e55)) +(flet ($e87 (if_then_else $e33 $e52 $e35)) +(flet ($e88 (if_then_else $e37 $e70 $e87)) +(flet ($e89 (not $e86)) +(flet ($e90 (or $e28 $e84)) +(flet ($e91 (and $e83 $e56)) +(flet ($e92 (and $e85 $e91)) +(flet ($e93 (and $e32 $e80)) +(flet ($e94 (or $e92 $e72)) +(flet ($e95 (and $e36 $e47)) +(flet ($e96 (implies $e40 $e89)) +(flet ($e97 (implies $e94 $e95)) +(flet ($e98 (iff $e71 $e61)) +(flet ($e99 (iff $e93 $e38)) +(flet ($e100 (implies $e27 $e30)) +(flet ($e101 (and $e97 $e96)) +(flet ($e102 (if_then_else $e50 $e99 $e99)) +(flet ($e103 (and $e65 $e48)) +(flet ($e104 (not $e44)) +(flet ($e105 (xor $e103 $e39)) +(flet ($e106 (if_then_else $e82 $e101 $e104)) +(flet ($e107 (or $e68 $e54)) +(flet ($e108 (or $e90 $e90)) +(flet ($e109 (or $e107 $e100)) +(flet ($e110 (xor $e67 $e88)) +(flet ($e111 (xor $e110 $e31)) +(flet ($e112 (or $e102 $e64)) +(flet ($e113 (not $e78)) +(flet ($e114 (if_then_else $e74 $e98 $e66)) +(flet ($e115 (iff $e108 $e109)) +(flet ($e116 (and $e25 $e73)) +(flet ($e117 (xor $e111 $e116)) +(flet ($e118 (xor $e115 $e106)) +(flet ($e119 (or $e112 $e24)) +(flet ($e120 (implies $e76 $e76)) +(flet ($e121 (xor $e113 $e62)) +(flet ($e122 (or $e120 $e120)) +(flet ($e123 (not $e75)) +(flet ($e124 (and $e122 $e118)) +(flet ($e125 (and $e119 $e123)) +(flet ($e126 (or $e105 $e105)) +(flet ($e127 (iff $e124 $e114)) +(flet ($e128 (or $e126 $e117)) +(flet ($e129 (xor $e125 $e121)) +(flet ($e130 (iff $e127 $e129)) +(flet ($e131 (or $e130 $e128)) +(flet ($e132 (and $e131 (not (= ?e11 bv0[16])))) +(flet ($e133 (and $e132 (not (= ?e11 (bvnot bv0[16]))))) +(flet ($e134 (and $e133 (not (= ?e18 bv0[16])))) +(flet ($e135 (and $e134 (not (= ?e18 (bvnot bv0[16]))))) +$e135 +)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) + diff --git a/test/regress/regress0/aufbv/fuzz08.smt b/test/regress/regress0/aufbv/fuzz08.smt new file mode 100644 index 000000000..5e0c090e3 --- /dev/null +++ b/test/regress/regress0/aufbv/fuzz08.smt @@ -0,0 +1,162 @@ +(benchmark fuzzsmt +:logic QF_AUFBV +:status sat +:extrafuns ((v0 BitVec[12])) +:extrafuns ((v1 BitVec[14])) +:extrafuns ((v2 BitVec[9])) +:extrafuns ((a3 Array[5:3])) +:formula +(let (?e4 bv0[2]) +(let (?e5 bv3960[12]) +(let (?e6 (ite (bvsge v0 (sign_extend[3] v2)) bv1[1] bv0[1])) +(let (?e7 (concat ?e4 v1)) +(let (?e8 (ite (bvule (zero_extend[2] ?e5) v1) bv1[1] bv0[1])) +(let (?e9 (select a3 (zero_extend[4] ?e6))) +(let (?e10 (select a3 (extract[7:3] v2))) +(let (?e11 (select a3 (sign_extend[2] ?e9))) +(let (?e12 (select a3 (extract[11:7] v0))) +(let (?e13 (bvneg ?e8)) +(let (?e14 (bvnot ?e9)) +(let (?e15 (rotate_left[2] ?e12)) +(let (?e16 (bvnand (sign_extend[2] ?e6) ?e15)) +(let (?e17 (zero_extend[0] ?e7)) +(let (?e18 (zero_extend[13] ?e9)) +(let (?e19 (bvsrem (zero_extend[6] ?e10) v2)) +(let (?e20 (bvsdiv (sign_extend[4] ?e5) ?e7)) +(let (?e21 (bvxnor v0 (sign_extend[9] ?e14))) +(let (?e22 (bvnot ?e11)) +(let (?e23 (ite (distinct ?e4 ?e4) bv1[1] bv0[1])) +(let (?e24 (ite (= bv1[1] (extract[9:9] v1)) ?e15 ?e9)) +(flet ($e25 (bvsle (zero_extend[13] ?e10) ?e17)) +(flet ($e26 (bvsle ?e5 ?e21)) +(flet ($e27 (bvsgt (zero_extend[1] ?e4) ?e11)) +(flet ($e28 (bvult v1 (sign_extend[11] ?e15))) +(flet ($e29 (= v0 (zero_extend[11] ?e23))) +(flet ($e30 (bvuge ?e7 (sign_extend[15] ?e8))) +(flet ($e31 (bvslt (sign_extend[6] ?e22) ?e19)) +(flet ($e32 (bvuge ?e10 ?e15)) +(flet ($e33 (bvsgt (zero_extend[13] ?e12) ?e7)) +(flet ($e34 (= ?e11 ?e16)) +(flet ($e35 (bvslt (zero_extend[1] ?e4) ?e10)) +(flet ($e36 (= ?e17 (sign_extend[4] ?e21))) +(flet ($e37 (bvsgt (sign_extend[14] ?e4) ?e18)) +(flet ($e38 (bvsgt (zero_extend[15] ?e8) ?e20)) +(flet ($e39 (bvult (zero_extend[13] ?e16) ?e20)) +(flet ($e40 (bvslt v1 (zero_extend[11] ?e12))) +(flet ($e41 (bvsge (sign_extend[11] ?e8) v0)) +(flet ($e42 (bvsge ?e21 ?e5)) +(flet ($e43 (distinct (sign_extend[1] ?e4) ?e12)) +(flet ($e44 (bvsgt ?e17 (sign_extend[13] ?e12))) +(flet ($e45 (bvult v2 (sign_extend[6] ?e9))) +(flet ($e46 (bvuge ?e9 ?e12)) +(flet ($e47 (bvugt ?e24 ?e10)) +(flet ($e48 (bvule (zero_extend[2] ?e13) ?e12)) +(flet ($e49 (bvugt ?e16 ?e10)) +(flet ($e50 (bvuge (sign_extend[2] ?e23) ?e10)) +(flet ($e51 (bvult ?e5 (zero_extend[11] ?e13))) +(flet ($e52 (bvsge ?e17 (zero_extend[13] ?e10))) +(flet ($e53 (bvsle (zero_extend[11] ?e9) v1)) +(flet ($e54 (bvsgt ?e19 (zero_extend[6] ?e10))) +(flet ($e55 (bvslt ?e10 ?e10)) +(flet ($e56 (bvsgt (sign_extend[2] ?e13) ?e10)) +(flet ($e57 (= ?e18 ?e20)) +(flet ($e58 (bvsgt v0 (zero_extend[3] v2))) +(flet ($e59 (distinct (zero_extend[1] ?e6) ?e4)) +(flet ($e60 (bvsge ?e16 ?e15)) +(flet ($e61 (distinct (sign_extend[1] ?e4) ?e10)) +(flet ($e62 (bvule ?e13 ?e6)) +(flet ($e63 (bvsle (sign_extend[2] ?e23) ?e15)) +(flet ($e64 (bvuge (zero_extend[11] ?e6) ?e5)) +(flet ($e65 (bvslt ?e13 ?e6)) +(flet ($e66 (bvule v0 (zero_extend[11] ?e23))) +(flet ($e67 (= (zero_extend[2] ?e8) ?e16)) +(flet ($e68 (bvule ?e24 (sign_extend[2] ?e23))) +(flet ($e69 (bvslt ?e22 ?e16)) +(flet ($e70 (bvslt (zero_extend[5] v2) v1)) +(flet ($e71 (bvult ?e18 (zero_extend[13] ?e10))) +(flet ($e72 (= ?e20 (sign_extend[13] ?e10))) +(flet ($e73 (bvuge ?e11 ?e9)) +(flet ($e74 (bvule ?e13 ?e8)) +(flet ($e75 (= (zero_extend[11] ?e13) ?e5)) +(flet ($e76 (= v2 (sign_extend[8] ?e8))) +(flet ($e77 (distinct (zero_extend[9] ?e24) ?e21)) +(flet ($e78 (bvsgt ?e11 (zero_extend[2] ?e23))) +(flet ($e79 (bvsgt ?e24 (zero_extend[1] ?e4))) +(flet ($e80 (bvslt ?e5 (zero_extend[11] ?e8))) +(flet ($e81 (bvult v0 (sign_extend[9] ?e11))) +(flet ($e82 (bvult ?e20 (zero_extend[13] ?e11))) +(flet ($e83 (bvule ?e18 (zero_extend[13] ?e15))) +(flet ($e84 (bvsgt v0 (sign_extend[9] ?e10))) +(flet ($e85 (= ?e17 (sign_extend[15] ?e8))) +(flet ($e86 (distinct v2 (zero_extend[8] ?e8))) +(flet ($e87 (bvsge ?e18 (zero_extend[13] ?e22))) +(flet ($e88 (bvsle ?e14 (zero_extend[1] ?e4))) +(flet ($e89 (and $e52 $e30)) +(flet ($e90 (xor $e61 $e77)) +(flet ($e91 (or $e32 $e29)) +(flet ($e92 (or $e84 $e66)) +(flet ($e93 (xor $e49 $e39)) +(flet ($e94 (implies $e48 $e73)) +(flet ($e95 (and $e79 $e50)) +(flet ($e96 (or $e88 $e92)) +(flet ($e97 (xor $e28 $e67)) +(flet ($e98 (implies $e75 $e76)) +(flet ($e99 (not $e68)) +(flet ($e100 (iff $e34 $e83)) +(flet ($e101 (iff $e90 $e56)) +(flet ($e102 (xor $e60 $e74)) +(flet ($e103 (if_then_else $e37 $e36 $e100)) +(flet ($e104 (implies $e53 $e26)) +(flet ($e105 (or $e87 $e27)) +(flet ($e106 (if_then_else $e55 $e105 $e59)) +(flet ($e107 (and $e63 $e31)) +(flet ($e108 (if_then_else $e99 $e91 $e106)) +(flet ($e109 (iff $e69 $e103)) +(flet ($e110 (iff $e57 $e44)) +(flet ($e111 (not $e40)) +(flet ($e112 (or $e70 $e108)) +(flet ($e113 (xor $e81 $e71)) +(flet ($e114 (iff $e51 $e41)) +(flet ($e115 (not $e86)) +(flet ($e116 (implies $e82 $e42)) +(flet ($e117 (if_then_else $e107 $e97 $e47)) +(flet ($e118 (and $e80 $e45)) +(flet ($e119 (and $e78 $e115)) +(flet ($e120 (xor $e102 $e85)) +(flet ($e121 (not $e25)) +(flet ($e122 (if_then_else $e110 $e117 $e116)) +(flet ($e123 (and $e109 $e96)) +(flet ($e124 (if_then_else $e101 $e35 $e122)) +(flet ($e125 (iff $e121 $e104)) +(flet ($e126 (if_then_else $e119 $e94 $e125)) +(flet ($e127 (and $e120 $e120)) +(flet ($e128 (not $e58)) +(flet ($e129 (iff $e98 $e38)) +(flet ($e130 (implies $e43 $e111)) +(flet ($e131 (implies $e93 $e54)) +(flet ($e132 (if_then_else $e72 $e129 $e124)) +(flet ($e133 (xor $e33 $e113)) +(flet ($e134 (and $e127 $e133)) +(flet ($e135 (not $e131)) +(flet ($e136 (or $e123 $e64)) +(flet ($e137 (xor $e118 $e134)) +(flet ($e138 (not $e95)) +(flet ($e139 (iff $e62 $e62)) +(flet ($e140 (or $e139 $e89)) +(flet ($e141 (implies $e130 $e135)) +(flet ($e142 (if_then_else $e132 $e128 $e132)) +(flet ($e143 (iff $e46 $e136)) +(flet ($e144 (if_then_else $e137 $e138 $e138)) +(flet ($e145 (and $e126 $e141)) +(flet ($e146 (if_then_else $e114 $e140 $e145)) +(flet ($e147 (implies $e144 $e143)) +(flet ($e148 (iff $e147 $e146)) +(flet ($e149 (if_then_else $e142 $e148 $e65)) +(flet ($e150 (or $e149 $e112)) +(flet ($e151 (and $e150 (not (= ?e7 bv0[16])))) +(flet ($e152 (and $e151 (not (= ?e7 (bvnot bv0[16]))))) +(flet ($e153 (and $e152 (not (= v2 bv0[9])))) +(flet ($e154 (and $e153 (not (= v2 (bvnot bv0[9]))))) +$e154 +)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) + diff --git a/test/regress/regress0/aufbv/fuzz09.smt b/test/regress/regress0/aufbv/fuzz09.smt new file mode 100644 index 000000000..ac9101b36 --- /dev/null +++ b/test/regress/regress0/aufbv/fuzz09.smt @@ -0,0 +1,176 @@ +(benchmark fuzzsmt +:logic QF_AUFBV +:status sat +:extrafuns ((v0 BitVec[4])) +:extrafuns ((v1 BitVec[6])) +:extrafuns ((v2 BitVec[11])) +:extrafuns ((v3 BitVec[1])) +:extrafuns ((v4 BitVec[10])) +:extrafuns ((a5 Array[13:16])) +:formula +(let (?e6 bv2[2]) +(let (?e7 (bvnand v2 (sign_extend[7] v0))) +(let (?e8 (bvsrem (zero_extend[8] ?e6) v4)) +(let (?e9 (bvand (sign_extend[5] v1) v2)) +(let (?e10 (bvneg v3)) +(let (?e11 (store a5 (zero_extend[2] v2) (zero_extend[15] ?e10))) +(let (?e12 (store ?e11 (zero_extend[2] ?e9) (sign_extend[14] ?e6))) +(let (?e13 (store ?e11 (zero_extend[7] v1) (sign_extend[14] ?e6))) +(let (?e14 (select ?e12 (zero_extend[9] v0))) +(let (?e15 (select ?e13 (sign_extend[12] ?e10))) +(let (?e16 (store ?e12 (zero_extend[2] ?e9) ?e15)) +(let (?e17 (select ?e11 (zero_extend[12] ?e10))) +(let (?e18 (store ?e16 (extract[13:1] ?e17) (sign_extend[6] v4))) +(let (?e19 (select ?e16 (sign_extend[12] v3))) +(let (?e20 (ite (bvsge ?e8 (zero_extend[8] ?e6)) bv1[1] bv0[1])) +(let (?e21 (bvnor (zero_extend[15] ?e10) ?e17)) +(let (?e22 (bvand ?e21 (zero_extend[15] ?e20))) +(let (?e23 (bvsdiv (sign_extend[2] v0) v1)) +(let (?e24 (ite (bvsle (zero_extend[9] ?e6) ?e9) bv1[1] bv0[1])) +(let (?e25 (bvxnor ?e15 ?e15)) +(let (?e26 (bvcomp ?e14 ?e25)) +(let (?e27 (bvsdiv (zero_extend[5] ?e7) ?e21)) +(let (?e28 (ite (bvsge ?e19 (sign_extend[15] v3)) bv1[1] bv0[1])) +(let (?e29 (bvnand (zero_extend[10] ?e20) v2)) +(let (?e30 (ite (bvult (zero_extend[1] v4) ?e9) bv1[1] bv0[1])) +(flet ($e31 (bvugt ?e23 (zero_extend[5] ?e24))) +(flet ($e32 (bvslt ?e24 v3)) +(flet ($e33 (bvsle ?e14 (zero_extend[15] v3))) +(flet ($e34 (bvslt (sign_extend[10] v1) ?e17)) +(flet ($e35 (bvult v1 (zero_extend[5] ?e24))) +(flet ($e36 (= (zero_extend[15] ?e24) ?e15)) +(flet ($e37 (bvule (zero_extend[6] v4) ?e14)) +(flet ($e38 (= ?e27 (sign_extend[15] ?e26))) +(flet ($e39 (bvsle ?e8 (zero_extend[8] ?e6))) +(flet ($e40 (bvult ?e21 (zero_extend[5] ?e29))) +(flet ($e41 (bvsge ?e15 (sign_extend[15] ?e24))) +(flet ($e42 (bvsle (zero_extend[5] ?e28) v1)) +(flet ($e43 (bvslt (sign_extend[15] ?e28) ?e21)) +(flet ($e44 (bvsle (zero_extend[10] v1) ?e25)) +(flet ($e45 (bvule ?e8 (zero_extend[9] ?e10))) +(flet ($e46 (bvsle ?e14 (sign_extend[5] ?e9))) +(flet ($e47 (distinct (sign_extend[9] v3) ?e8)) +(flet ($e48 (bvsle ?e8 (sign_extend[4] v1))) +(flet ($e49 (bvuge ?e26 ?e28)) +(flet ($e50 (bvsge ?e21 ?e14)) +(flet ($e51 (= (sign_extend[15] ?e10) ?e22)) +(flet ($e52 (bvsge ?e8 ?e8)) +(flet ($e53 (bvslt ?e14 (sign_extend[6] v4))) +(flet ($e54 (bvugt ?e10 ?e28)) +(flet ($e55 (bvslt v4 (sign_extend[4] ?e23))) +(flet ($e56 (bvsge (zero_extend[15] ?e20) ?e21)) +(flet ($e57 (bvugt v4 (sign_extend[9] ?e28))) +(flet ($e58 (bvsge ?e9 (zero_extend[10] v3))) +(flet ($e59 (bvugt ?e17 ?e27)) +(flet ($e60 (bvsge ?e6 (sign_extend[1] ?e28))) +(flet ($e61 (bvult ?e25 ?e17)) +(flet ($e62 (bvugt ?e25 ?e19)) +(flet ($e63 (bvslt (zero_extend[10] ?e10) ?e9)) +(flet ($e64 (bvsgt v1 (zero_extend[4] ?e6))) +(flet ($e65 (bvsle ?e14 (zero_extend[15] ?e30))) +(flet ($e66 (bvuge ?e22 ?e14)) +(flet ($e67 (bvuge (zero_extend[6] ?e8) ?e27)) +(flet ($e68 (bvsle (sign_extend[10] v3) ?e9)) +(flet ($e69 (bvsge (sign_extend[14] ?e6) ?e21)) +(flet ($e70 (bvugt (sign_extend[15] ?e24) ?e14)) +(flet ($e71 (bvuge (sign_extend[6] v4) ?e22)) +(flet ($e72 (bvslt ?e14 (sign_extend[15] ?e10))) +(flet ($e73 (bvslt (sign_extend[10] ?e23) ?e21)) +(flet ($e74 (bvsle (sign_extend[15] v3) ?e15)) +(flet ($e75 (bvslt ?e21 (zero_extend[15] ?e20))) +(flet ($e76 (bvult (zero_extend[1] v4) v2)) +(flet ($e77 (bvsle ?e25 ?e17)) +(flet ($e78 (bvsle ?e6 (sign_extend[1] ?e30))) +(flet ($e79 (bvsgt ?e27 (zero_extend[5] ?e9))) +(flet ($e80 (bvuge v2 (zero_extend[10] ?e20))) +(flet ($e81 (distinct (zero_extend[15] ?e26) ?e14)) +(flet ($e82 (bvult ?e15 (sign_extend[5] ?e29))) +(flet ($e83 (bvsge (sign_extend[15] ?e26) ?e21)) +(flet ($e84 (bvslt (sign_extend[14] ?e6) ?e19)) +(flet ($e85 (bvule (zero_extend[5] ?e20) ?e23)) +(flet ($e86 (= ?e8 (zero_extend[8] ?e6))) +(flet ($e87 (distinct (sign_extend[10] ?e28) ?e29)) +(flet ($e88 (bvult (zero_extend[14] ?e6) ?e19)) +(flet ($e89 (= v4 (zero_extend[6] v0))) +(flet ($e90 (distinct ?e10 ?e28)) +(flet ($e91 (bvsge v0 (sign_extend[3] ?e20))) +(flet ($e92 (= ?e25 (zero_extend[15] ?e24))) +(flet ($e93 (bvsge (zero_extend[1] ?e10) ?e6)) +(flet ($e94 (bvule v4 (sign_extend[9] ?e30))) +(flet ($e95 (bvugt (zero_extend[6] v4) ?e25)) +(flet ($e96 (distinct (sign_extend[5] ?e7) ?e19)) +(flet ($e97 (not $e90)) +(flet ($e98 (and $e42 $e37)) +(flet ($e99 (and $e46 $e59)) +(flet ($e100 (iff $e31 $e71)) +(flet ($e101 (and $e51 $e43)) +(flet ($e102 (and $e34 $e82)) +(flet ($e103 (iff $e58 $e69)) +(flet ($e104 (implies $e48 $e66)) +(flet ($e105 (xor $e101 $e86)) +(flet ($e106 (or $e103 $e63)) +(flet ($e107 (and $e60 $e76)) +(flet ($e108 (xor $e94 $e54)) +(flet ($e109 (if_then_else $e106 $e57 $e100)) +(flet ($e110 (iff $e73 $e61)) +(flet ($e111 (xor $e95 $e65)) +(flet ($e112 (xor $e75 $e111)) +(flet ($e113 (or $e108 $e84)) +(flet ($e114 (not $e41)) +(flet ($e115 (not $e62)) +(flet ($e116 (if_then_else $e104 $e114 $e99)) +(flet ($e117 (not $e91)) +(flet ($e118 (iff $e50 $e53)) +(flet ($e119 (if_then_else $e113 $e89 $e72)) +(flet ($e120 (and $e79 $e93)) +(flet ($e121 (or $e120 $e83)) +(flet ($e122 (and $e64 $e38)) +(flet ($e123 (if_then_else $e35 $e70 $e39)) +(flet ($e124 (if_then_else $e33 $e87 $e55)) +(flet ($e125 (iff $e109 $e80)) +(flet ($e126 (implies $e122 $e78)) +(flet ($e127 (and $e118 $e45)) +(flet ($e128 (not $e96)) +(flet ($e129 (if_then_else $e112 $e127 $e117)) +(flet ($e130 (not $e121)) +(flet ($e131 (xor $e52 $e77)) +(flet ($e132 (and $e105 $e32)) +(flet ($e133 (iff $e132 $e36)) +(flet ($e134 (and $e92 $e128)) +(flet ($e135 (not $e130)) +(flet ($e136 (iff $e102 $e56)) +(flet ($e137 (xor $e44 $e85)) +(flet ($e138 (and $e126 $e135)) +(flet ($e139 (or $e110 $e49)) +(flet ($e140 (xor $e68 $e67)) +(flet ($e141 (or $e98 $e97)) +(flet ($e142 (xor $e137 $e131)) +(flet ($e143 (or $e115 $e124)) +(flet ($e144 (or $e116 $e40)) +(flet ($e145 (implies $e140 $e107)) +(flet ($e146 (if_then_else $e123 $e123 $e136)) +(flet ($e147 (and $e129 $e119)) +(flet ($e148 (or $e81 $e145)) +(flet ($e149 (if_then_else $e125 $e144 $e144)) +(flet ($e150 (and $e141 $e74)) +(flet ($e151 (not $e148)) +(flet ($e152 (or $e143 $e151)) +(flet ($e153 (implies $e88 $e138)) +(flet ($e154 (or $e146 $e134)) +(flet ($e155 (and $e47 $e150)) +(flet ($e156 (if_then_else $e147 $e142 $e155)) +(flet ($e157 (implies $e139 $e149)) +(flet ($e158 (not $e152)) +(flet ($e159 (if_then_else $e153 $e158 $e154)) +(flet ($e160 (if_then_else $e157 $e133 $e156)) +(flet ($e161 (not $e159)) +(flet ($e162 (xor $e161 $e160)) +(flet ($e163 (and $e162 (not (= ?e21 bv0[16])))) +(flet ($e164 (and $e163 (not (= ?e21 (bvnot bv0[16]))))) +(flet ($e165 (and $e164 (not (= v1 bv0[6])))) +(flet ($e166 (and $e165 (not (= v1 (bvnot bv0[6]))))) +(flet ($e167 (and $e166 (not (= v4 bv0[10])))) +(flet ($e168 (and $e167 (not (= v4 (bvnot bv0[10]))))) +$e168 +)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) + -- 2.30.2