From fff97c76bc1ba86594114ea91ba6b23944964f55 Mon Sep 17 00:00:00 2001 From: Guy Date: Thu, 28 Jul 2016 11:24:07 -0700 Subject: Bug fix involving negated lemmas --- src/proof/proof_manager.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/proof') diff --git a/src/proof/proof_manager.cpp b/src/proof/proof_manager.cpp index a86991963..3249ed19d 100644 --- a/src/proof/proof_manager.cpp +++ b/src/proof/proof_manager.cpp @@ -41,6 +41,15 @@ namespace CVC4 { +std::string nodeSetToString(const std::set& nodes) { + std::ostringstream os; + std::set::const_iterator it; + for (it = nodes.begin(); it != nodes.end(); ++it) { + os << *it << " "; + } + return os.str(); +} + std::string append(const std::string& str, uint64_t num) { std::ostringstream os; os << str << num; @@ -315,17 +324,23 @@ void ProofManager::getLemmasInUnsatCore(theory::TheoryId theory, std::vector seen; + Debug("pf::lemmasUnsatCore") << "Dumping all lemmas in unsat core" << std::endl; for (it = used_lemmas.begin(); it != used_lemmas.end(); ++it) { std::set lemma = satClauseToNodeSet(it->second); + Debug("pf::lemmasUnsatCore") << nodeSetToString(lemma); // TODO: we should be able to drop the "haveProofRecipe" check. // however, there are some rewrite issues with the arith solver, resulting // in non-registered recipes. For now we assume no one is requesting arith lemmas. LemmaProofRecipe recipe; - if (!getCnfProof()->haveProofRecipe(lemma)) + if (!getCnfProof()->haveProofRecipe(lemma)) { + Debug("pf::lemmasUnsatCore") << "\t[no recipe]" << std::endl; continue; + } recipe = getCnfProof()->getProofRecipe(lemma); + Debug("pf::lemmasUnsatCore") << "\t[owner = " << recipe.getTheory() + << ", original = " << recipe.getOriginalLemma() << "]" << std::endl; if (recipe.simpleLemma() && recipe.getTheory() == theory && seen.find(recipe.getOriginalLemma()) == seen.end()) { lemmas.push_back(recipe.getOriginalLemma()); seen.insert(recipe.getOriginalLemma()); -- cgit v1.2.3