summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryoni206 <yoni206@users.noreply.github.com>2018-09-25 14:52:04 -0500
committerGitHub <noreply@github.com>2018-09-25 14:52:04 -0500
commit7e8a8d4d46c910fcc356e13d83768f21042ccc68 (patch)
tree61c965293620a24b082f16ef8dac0971ae7696f0
parentf4ce78488ae41b4effc140edfc35cbba79d2dcd4 (diff)
carefully printing trusted assertions in proofs (#2505)
-rw-r--r--src/proof/proof_manager.cpp17
-rw-r--r--src/proof/proof_manager.h6
2 files changed, 17 insertions, 6 deletions
diff --git a/src/proof/proof_manager.cpp b/src/proof/proof_manager.cpp
index cc5332cfd..e7b00068a 100644
--- a/src/proof/proof_manager.cpp
+++ b/src/proof/proof_manager.cpp
@@ -808,8 +808,7 @@ void LFSCProof::printPreprocessedAssertions(const NodeSet& assertions,
ProofManager::currentPM()->getTheoryProofEngine()->printTheoryTerm(inputAssertion, os, globalLetMap);
os << " ";
- ProofManager::currentPM()->getTheoryProofEngine()->printTheoryTerm((*it).toExpr(), os, globalLetMap);
-
+ ProofManager::currentPM()->printTrustedTerm(*it, os, globalLetMap);
os << "))";
os << "(\\ "<< ProofManager::getPreprocessedAssertionName(*it, "") << "\n";
paren << "))";
@@ -832,9 +831,7 @@ void LFSCProof::printPreprocessedAssertions(const NodeSet& assertions,
//TODO
os << "(trust_f ";
- if (ProofManager::currentPM()->getTheoryProofEngine()->printsAsBool(*it)) os << "(p_app ";
- ProofManager::currentPM()->getTheoryProofEngine()->printTheoryTerm((*it).toExpr(), os, globalLetMap);
- if (ProofManager::currentPM()->getTheoryProofEngine()->printsAsBool(*it)) os << ")";
+ ProofManager::currentPM()->printTrustedTerm(*it, os, globalLetMap);
os << ") ";
os << "(\\ "<< ProofManager::getPreprocessedAssertionName(*it, "") << "\n";
@@ -1063,5 +1060,13 @@ void ProofManager::printGlobalLetMap(std::set<Node>& atoms,
void ProofManager::ensureLiteral(Node node) {
d_cnfProof->ensureLiteral(node);
}
-
+void ProofManager::printTrustedTerm(Node term,
+ std::ostream& os,
+ ProofLetMap& globalLetMap)
+{
+ TheoryProofEngine* tpe = ProofManager::currentPM()->getTheoryProofEngine();
+ if (tpe->printsAsBool(term)) os << "(p_app ";
+ tpe->printTheoryTerm(term.toExpr(), os, globalLetMap);
+ if (tpe->printsAsBool(term)) os << ")";
+}
} /* CVC4 namespace */
diff --git a/src/proof/proof_manager.h b/src/proof/proof_manager.h
index 89aa66c2d..0342288fe 100644
--- a/src/proof/proof_manager.h
+++ b/src/proof/proof_manager.h
@@ -239,6 +239,12 @@ public:
// for SMT variable names that have spaces and other things
static std::string sanitize(TNode var);
+ // wrap term with (p_app ... ) if the term is printed as a boolean, and print
+ // used for "trust" assertions
+ static void printTrustedTerm(Node term,
+ std::ostream& os,
+ ProofLetMap& globalLetMap);
+
/** Add proof assertion - unlike addCoreAssertion this is post definition expansion **/
void addAssertion(Expr formula);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback