diff options
author | Haniel Barbosa <hanielbbarbosa@gmail.com> | 2020-12-24 01:15:40 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-24 01:15:40 -0300 |
commit | e0dfc0a343dfd330f9c8d2a5c1ebd21146366ca9 (patch) | |
tree | 4602faa1f16a2548fe27ad1e7ea6a6a28bec4ee7 /src/prop | |
parent | a539b63c369544ed08a1fa7fa4c8e3d437be3766 (diff) |
[proof-new] Only use old proofs for unsat cores if no proof new (#5725)
Now the old proofs are used for unsat cores only if proofNew is disabled. Later commits will generate unsat cores from the new proofs when requested. Eventually we will compare them and when we confirm the new unsat core generation is better we will delete the old one.
This also does some minor refactoring in some preprocessing. No behavior is changed.
Diffstat (limited to 'src/prop')
-rw-r--r-- | src/prop/minisat/core/Solver.cc | 3 | ||||
-rw-r--r-- | src/prop/minisat/minisat.cpp | 4 | ||||
-rw-r--r-- | src/prop/minisat/simp/SimpSolver.cc | 3 | ||||
-rw-r--r-- | src/prop/prop_engine.cpp | 2 | ||||
-rw-r--r-- | src/prop/theory_proxy.cpp | 5 |
5 files changed, 10 insertions, 7 deletions
diff --git a/src/prop/minisat/core/Solver.cc b/src/prop/minisat/core/Solver.cc index 12246be41..ab3b0cfe7 100644 --- a/src/prop/minisat/core/Solver.cc +++ b/src/prop/minisat/core/Solver.cc @@ -227,8 +227,7 @@ Solver::Solver(CVC4::prop::TheoryProxy* proxy, d_pfManager.reset( new SatProofManager(this, proxy->getCnfStream(), userContext, pnm)); } - - if (options::unsatCores() && !isProofEnabled()) + else if (options::unsatCores()) { ProofManager::currentPM()->initSatProof(this); } diff --git a/src/prop/minisat/minisat.cpp b/src/prop/minisat/minisat.cpp index 8af73140e..c48df4998 100644 --- a/src/prop/minisat/minisat.cpp +++ b/src/prop/minisat/minisat.cpp @@ -159,7 +159,9 @@ ClauseId MinisatSatSolver::addClause(SatClause& clause, bool removable) { return ClauseIdUndef; } d_minisat->addClause(minisat_clause, removable, clause_id); - Assert(!CVC4::options::unsatCores() || clause_id != ClauseIdError); + // FIXME: to be deleted when we kill old proof code for unsat cores + Assert(!options::unsatCores() || options::proofNew() + || clause_id != ClauseIdError); return clause_id; } diff --git a/src/prop/minisat/simp/SimpSolver.cc b/src/prop/minisat/simp/SimpSolver.cc index 5c8922360..4649a67aa 100644 --- a/src/prop/minisat/simp/SimpSolver.cc +++ b/src/prop/minisat/simp/SimpSolver.cc @@ -58,7 +58,8 @@ SimpSolver::SimpSolver(CVC4::prop::TheoryProxy* proxy, subsumption_lim(opt_subsumption_lim), simp_garbage_frac(opt_simp_garbage_frac), use_asymm(opt_use_asymm), - use_rcheck(opt_use_rcheck), + // make sure this is not enabled if unsat cores or proofs are on + use_rcheck(opt_use_rcheck && !options::unsatCores() && !pnm), use_elim(options::minisatUseElim() && !enableIncremental), merges(0), asymm_lits(0), diff --git a/src/prop/prop_engine.cpp b/src/prop/prop_engine.cpp index eeb879a2b..81fadb709 100644 --- a/src/prop/prop_engine.cpp +++ b/src/prop/prop_engine.cpp @@ -117,7 +117,7 @@ PropEngine::PropEngine(TheoryEngine* te, d_ppm.reset( new PropPfManager(userContext, pnm, d_satSolver, d_pfCnfStream.get())); } - if (options::unsatCores()) + else if (options::unsatCores()) { ProofManager::currentPM()->initCnfProof(d_cnfStream, userContext); } diff --git a/src/prop/theory_proxy.cpp b/src/prop/theory_proxy.cpp index 23405675a..7559e4015 100644 --- a/src/prop/theory_proxy.cpp +++ b/src/prop/theory_proxy.cpp @@ -83,11 +83,12 @@ void TheoryProxy::explainPropagation(SatLiteral l, SatClause& explanation) { { d_propEngine->getProofCnfStream()->convertPropagation(tte); } - if (options::unsatCores()) + else if (options::unsatCores()) { ProofManager::getCnfProof()->pushCurrentAssertion(theoryExplanation); } - Debug("prop-explain") << "explainPropagation() => " << theoryExplanation << std::endl; + Debug("prop-explain") << "explainPropagation() => " << theoryExplanation + << std::endl; explanation.push_back(l); if (theoryExplanation.getKind() == kind::AND) { |