summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/proof/proof_manager.cpp5
-rw-r--r--src/proof/proof_manager.h1
-rw-r--r--src/proof/sat_proof.h1
-rw-r--r--src/proof/sat_proof_implementation.h5
4 files changed, 12 insertions, 0 deletions
diff --git a/src/proof/proof_manager.cpp b/src/proof/proof_manager.cpp
index 9b3d9a289..09fc5dc8b 100644
--- a/src/proof/proof_manager.cpp
+++ b/src/proof/proof_manager.cpp
@@ -292,8 +292,13 @@ void ProofManager::traceUnsatCore() {
}
}
+bool ProofManager::unsatCoreAvailable() const {
+ return d_satProof->derivedEmptyClause();
+}
+
void ProofManager::getLemmasInUnsatCore(theory::TheoryId theory, std::vector<Node> &lemmas) {
Assert(PROOF_ON(), "Cannot compute unsat core when proofs are off");
+ Assert(unsatCoreAvailable(), "Cannot get unsat core at this time. Mabye the input is SAT?" );
d_satProof->constructProof();
diff --git a/src/proof/proof_manager.h b/src/proof/proof_manager.h
index 954b65bbc..b1cfc54b5 100644
--- a/src/proof/proof_manager.h
+++ b/src/proof/proof_manager.h
@@ -246,6 +246,7 @@ public:
assertions_iterator end_unsat_core() const { return d_outputCoreFormulas.end(); }
size_t size_unsat_core() const { return d_outputCoreFormulas.size(); }
+ bool unsatCoreAvailable() const;
void getLemmasInUnsatCore(theory::TheoryId theory, std::vector<Node> &lemmas);
int nextId() { return d_nextId++; }
diff --git a/src/proof/sat_proof.h b/src/proof/sat_proof.h
index bda8094be..c571a7b06 100644
--- a/src/proof/sat_proof.h
+++ b/src/proof/sat_proof.h
@@ -199,6 +199,7 @@ class TSatProof {
void constructProof(ClauseId id);
void constructProof() { constructProof(d_emptyClauseId); }
void collectClauses(ClauseId id);
+ bool derivedEmptyClause() const;
prop::SatClause* buildClause(ClauseId id);
virtual void printResolution(ClauseId id, std::ostream& out,
diff --git a/src/proof/sat_proof_implementation.h b/src/proof/sat_proof_implementation.h
index 1e01e4dce..cd2473937 100644
--- a/src/proof/sat_proof_implementation.h
+++ b/src/proof/sat_proof_implementation.h
@@ -998,6 +998,11 @@ prop::SatClause* TSatProof<Solver>::buildClause(ClauseId id) {
}
template <class Solver>
+bool TSatProof<Solver>::derivedEmptyClause() const {
+ return hasResolutionChain(d_emptyClauseId);
+}
+
+template <class Solver>
void TSatProof<Solver>::collectClauses(ClauseId id) {
if (d_seenInputs.find(id) != d_seenInputs.end() ||
d_seenLemmas.find(id) != d_seenLemmas.end() ||
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback