summaryrefslogtreecommitdiff
path: root/src/proof/theory_proof.h
diff options
context:
space:
mode:
authorguykatzz <katz911@gmail.com>2017-03-09 12:13:12 -0800
committerguykatzz <katz911@gmail.com>2017-03-09 12:14:15 -0800
commit2f287a59e9c775d9087cddd8c72be5169c2706e1 (patch)
tree95a6664e3b013929d9190cff2d1889045e1a2af2 /src/proof/theory_proof.h
parentab68adfc44049598ee79a3c8b4379694d786d9aa (diff)
better proof support for bools and formulas
Diffstat (limited to 'src/proof/theory_proof.h')
-rw-r--r--src/proof/theory_proof.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/proof/theory_proof.h b/src/proof/theory_proof.h
index 34248f7eb..bbdb7d6d7 100644
--- a/src/proof/theory_proof.h
+++ b/src/proof/theory_proof.h
@@ -151,9 +151,9 @@ public:
void printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2, const ProofLetMap &globalLetMap);
- virtual void treatBoolsAsFormulas(bool value) {};
-
virtual void printTheoryTerm(Expr term, std::ostream& os, const ProofLetMap& map) = 0;
+
+ bool printsAsBool(const Node &n);
};
class LFSCTheoryProofEngine : public TheoryProofEngine {
@@ -182,7 +182,6 @@ public:
void performExtraRegistrations();
- void treatBoolsAsFormulas(bool value);
void finalizeBvConflicts(const IdToSatClause& lemmas, std::ostream& os);
private:
@@ -294,7 +293,11 @@ public:
*/
virtual void printRewriteProof(std::ostream& os, const Node &n1, const Node &n2);
- virtual void treatBoolsAsFormulas(bool value) {}
+ // Return true if node prints as bool, false if it prints as a formula.
+ virtual bool printsAsBool(const Node &n) {
+ // Most nodes print as formulas, so this is the default.
+ return false;
+ }
};
class BooleanProof : public TheoryProof {
@@ -318,7 +321,7 @@ public:
class LFSCBooleanProof : public BooleanProof {
public:
LFSCBooleanProof(TheoryProofEngine* proofEngine)
- : BooleanProof(proofEngine), d_treatBoolsAsFormulas(true)
+ : BooleanProof(proofEngine)
{}
virtual void printOwnedTerm(Expr term, std::ostream& os, const ProofLetMap& map);
virtual void printOwnedSort(Type type, std::ostream& os);
@@ -328,12 +331,7 @@ public:
virtual void printDeferredDeclarations(std::ostream& os, std::ostream& paren);
virtual void printAliasingDeclarations(std::ostream& os, std::ostream& paren, const ProofLetMap &globalLetMap);
- void treatBoolsAsFormulas(bool value) {
- d_treatBoolsAsFormulas = value;
- }
-
-private:
- bool d_treatBoolsAsFormulas;
+ bool printsAsBool(const Node &n);
};
} /* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback