summaryrefslogtreecommitdiff
path: root/src/prop/bvminisat/simp/SimpSolver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/prop/bvminisat/simp/SimpSolver.cc')
-rw-r--r--src/prop/bvminisat/simp/SimpSolver.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/prop/bvminisat/simp/SimpSolver.cc b/src/prop/bvminisat/simp/SimpSolver.cc
index c5b185c95..311ed1dd1 100644
--- a/src/prop/bvminisat/simp/SimpSolver.cc
+++ b/src/prop/bvminisat/simp/SimpSolver.cc
@@ -24,6 +24,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
#include "options/bv_options.h"
#include "options/smt_options.h"
#include "utils/System.h"
+#include "proof/proof.h"
namespace CVC4 {
namespace BVMinisat {
@@ -62,7 +63,7 @@ SimpSolver::SimpSolver(CVC4::context::Context* c) :
, asymm_lits (0)
, eliminated_vars (0)
, elimorder (1)
- , use_simplification (true)
+ , use_simplification (!PROOF_ON())
, occurs (ClauseDeleted(ca))
, elim_heap (ElimLt(n_occ))
, bwdsub_assigns (0)
@@ -162,7 +163,7 @@ lbool SimpSolver::solve_(bool do_simp, bool turn_off_simp)
-bool SimpSolver::addClause_(vec<Lit>& ps)
+bool SimpSolver::addClause_(vec<Lit>& ps, ClauseId& id)
{
#ifndef NDEBUG
for (int i = 0; i < ps.size(); i++)
@@ -174,7 +175,7 @@ bool SimpSolver::addClause_(vec<Lit>& ps)
if (use_rcheck && implied(ps))
return true;
- if (!Solver::addClause_(ps))
+ if (!Solver::addClause_(ps, id))
return false;
if (use_simplification && clauses.size() == nclauses + 1){
@@ -544,9 +545,12 @@ bool SimpSolver::eliminateVar(Var v)
// Produce clauses in cross product:
vec<Lit>& resolvent = add_tmp;
for (int i = 0; i < pos.size(); i++)
- for (int j = 0; j < neg.size(); j++)
- if (merge(ca[pos[i]], ca[neg[j]], v, resolvent) && !addClause_(resolvent))
- return false;
+ for (int j = 0; j < neg.size(); j++) {
+ ClauseId id = -1;
+ if (merge(ca[pos[i]], ca[neg[j]], v, resolvent) &&
+ !addClause_(resolvent, id))
+ return false;
+ }
// Free occurs list for this variable:
occurs[v].clear(true);
@@ -582,8 +586,8 @@ bool SimpSolver::substitute(Var v, Lit x)
}
removeClause(cls[i]);
-
- if (!addClause_(subst_clause))
+ ClauseId id;
+ if (!addClause_(subst_clause, id))
return ok = false;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback