summaryrefslogtreecommitdiff
path: root/src/proof/theory_proof.cpp
diff options
context:
space:
mode:
authorlianah <lianahady@gmail.com>2013-10-09 15:48:42 -0400
committerlianah <lianahady@gmail.com>2013-10-09 15:48:42 -0400
commit44485520fae92b34e4385d4d2c4774c9dd7d0dc0 (patch)
tree6a3608afa6276e11e1a72504c439a4991e9dea41 /src/proof/theory_proof.cpp
parent08c8433e4ab849024930a8c4dbe8756e13d08099 (diff)
cleaned up proof code
Diffstat (limited to 'src/proof/theory_proof.cpp')
-rw-r--r--src/proof/theory_proof.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/proof/theory_proof.cpp b/src/proof/theory_proof.cpp
index 5b5a2ae15..4ce804a74 100644
--- a/src/proof/theory_proof.cpp
+++ b/src/proof/theory_proof.cpp
@@ -16,29 +16,15 @@
**/
#include "proof/theory_proof.h"
-
+#include "proof/proof_manager.h"
using namespace CVC4;
TheoryProof::TheoryProof()
- : d_atomSet()
- , d_inputFormulas()
- , d_termDeclarations()
+ : d_termDeclarations()
, d_sortDeclarations()
, d_declarationCache()
{}
-void TheoryProof::addAtom(Expr atom) {
- d_atomSet.insert(atom);
- Assert (atom.getKind() == kind::EQUAL);
- addDeclaration(atom[0]);
- addDeclaration(atom[1]);
-}
-
-void TheoryProof::assertFormula(Expr formula) {
- d_inputFormulas.insert(formula);
- addDeclaration(formula);
-}
-
void TheoryProof::addDeclaration(Expr term) {
if (d_declarationCache.count(term))
return;
@@ -152,8 +138,18 @@ void LFSCTheoryProof::printFormula(Expr atom, std::ostream& os) {
}
void LFSCTheoryProof::printAssertions(std::ostream& os, std::ostream& paren) {
- unsigned counter = 0;
- for (ExprSet::const_iterator it = d_inputFormulas.begin(); it != d_inputFormulas.end(); ++it) {
+ unsigned counter = 0;
+ ProofManager::assertions_iterator it = ProofManager::currentPM()->begin_assertions();
+ ProofManager::assertions_iterator end = ProofManager::currentPM()->end_assertions();
+
+ // collect declarations first
+ for(; it != end; ++it) {
+ addDeclaration(*it);
+ }
+ printDeclarations(os, paren);
+
+ it = ProofManager::currentPM()->begin_assertions();
+ for (; it != end; ++it) {
os << "(% A" << counter++ << " (th_holds ";
printFormula(*it, os);
os << ")\n";
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback