summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuy <guy@Guy-X260>2016-09-16 15:43:47 -0700
committerGuy <guy@Guy-X260>2016-09-16 15:43:47 -0700
commit976ee5b66b7584b9fe46eab1facf5e5f857e723f (patch)
treeed2c5d2d641a8ba6c610eef50fb17cd0379419fc /src
parentcb3c0cd5a3ceba5fcd65202bcd3e4cf4074ee0b2 (diff)
Let arith_proof print its own terms
Diffstat (limited to 'src')
-rw-r--r--src/proof/arith_proof.cpp12
-rw-r--r--src/proof/arith_proof.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/proof/arith_proof.cpp b/src/proof/arith_proof.cpp
index 4e813d646..b7ed0b2ec 100644
--- a/src/proof/arith_proof.cpp
+++ b/src/proof/arith_proof.cpp
@@ -636,6 +636,10 @@ void ArithProof::registerTerm(Expr term) {
d_realMode = true;
}
+ if (term.isVariable() && !ProofManager::getSkolemizationManager()->isSkolem(term)) {
+ d_declarations.insert(term);
+ }
+
// recursively declare all other terms
for (unsigned i = 0; i < term.getNumChildren(); ++i) {
// could belong to other theories
@@ -824,6 +828,14 @@ void LFSCArithProof::printSortDeclarations(std::ostream& os, std::ostream& paren
}
void LFSCArithProof::printTermDeclarations(std::ostream& os, std::ostream& paren) {
+ for (ExprSet::const_iterator it = d_declarations.begin(); it != d_declarations.end(); ++it) {
+ Expr term = *it;
+ Assert(term.isVariable());
+ os << "(% " << ProofManager::sanitize(term) << " ";
+ os << "(term ";
+ os << term.getType() << ")\n";
+ paren << ")";
+ }
}
void LFSCArithProof::printDeferredDeclarations(std::ostream& os, std::ostream& paren) {
diff --git a/src/proof/arith_proof.h b/src/proof/arith_proof.h
index 126e89ed2..08985487d 100644
--- a/src/proof/arith_proof.h
+++ b/src/proof/arith_proof.h
@@ -53,7 +53,7 @@ protected:
// std::map<Expr, std::string> d_constRationalString; // all the variable/function declarations
// TypeSet d_sorts; // all the uninterpreted sorts in this theory
- // ExprSet d_declarations; // all the variable/function declarations
+ ExprSet d_declarations; // all the variable/function declarations
bool d_realMode;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback