summaryrefslogtreecommitdiff
path: root/src/proof/theory_proof.cpp
diff options
context:
space:
mode:
authorGuy <katz911@gmail.com>2016-06-03 14:27:00 -0700
committerGuy <katz911@gmail.com>2016-06-03 14:27:00 -0700
commit8bfab32eed06973d53ce8ae066a9a26d4ae8a489 (patch)
tree4fb698b165bfe4aa80560d91f7334f27965dc641 /src/proof/theory_proof.cpp
parent90b909a89c78c75afae69e119feea20b478c0795 (diff)
Better infrastructure for proving constant disequality.
Added support for the BV case
Diffstat (limited to 'src/proof/theory_proof.cpp')
-rw-r--r--src/proof/theory_proof.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/proof/theory_proof.cpp b/src/proof/theory_proof.cpp
index eaf21846b..fe67ec94d 100644
--- a/src/proof/theory_proof.cpp
+++ b/src/proof/theory_proof.cpp
@@ -114,13 +114,11 @@ void TheoryProofEngine::markTermForFutureRegistration(Expr term, theory::TheoryI
}
void TheoryProofEngine::printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2) {
- LetMap emptyMap;
+ Assert(c1.isConst());
+ Assert(c2.isConst());
- os << "(trust_f (not (= _ ";
- printBoundTerm(c1, os, emptyMap);
- os << " ";
- printBoundTerm(c2, os, emptyMap);
- os << ")))";
+ Assert(theory::Theory::theoryOf(c1) == theory::Theory::theoryOf(c2));
+ getTheoryProof(theory::Theory::theoryOf(c1))->printConstantDisequalityProof(os, c1, c2);
}
void TheoryProofEngine::registerTerm(Expr term) {
@@ -1100,4 +1098,16 @@ void LFSCBooleanProof::printTheoryLemmaProof(std::vector<Expr>& lemma,
Unreachable("No boolean lemmas yet!");
}
+void TheoryProof::printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2) {
+ // By default, we just print a trust statement. Specific theories can implement
+ // better proofs.
+ LetMap emptyMap;
+
+ os << "(trust_f (not (= _ ";
+ d_proofEngine->printBoundTerm(c1, os, emptyMap);
+ os << " ";
+ d_proofEngine->printBoundTerm(c2, os, emptyMap);
+ os << ")))";
+}
+
} /* namespace CVC4 */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback