From: Andres Notzli Date: Wed, 27 Jul 2016 04:07:24 +0000 (-0700) Subject: Fix warnings in src/proof X-Git-Tag: cvc5-1.0.0~6040^2~14^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=490489a78beca486df5d4a0d8b7704e6235ca6fc;p=cvc5.git Fix warnings in src/proof Fix warning due to `ProofLetCount` being defined as `struct` in `proof_utils.h` and `class` in `proof.h`. Fix warnings due to different number of arguments of `printConstantDisequalityProof()` and `printTheoryLemmaProof()` in subclasses. --- diff --git a/src/proof/bitvector_proof.cpp b/src/proof/bitvector_proof.cpp index 3c96f7cf3..49e0e8e2f 100644 --- a/src/proof/bitvector_proof.cpp +++ b/src/proof/bitvector_proof.cpp @@ -1054,7 +1054,7 @@ bool LFSCBitVectorProof::hasAlias(Expr expr) { return d_assignedAliases.find(expr) != d_assignedAliases.end(); } -void LFSCBitVectorProof::printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2) { +void LFSCBitVectorProof::printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2, const ProofLetMap &globalLetMap) { Assert (c1.isConst()); Assert (c2.isConst()); Assert (utils::getSize(c1) == utils::getSize(c2)); diff --git a/src/proof/bitvector_proof.h b/src/proof/bitvector_proof.h index f89774945..6b952e35c 100644 --- a/src/proof/bitvector_proof.h +++ b/src/proof/bitvector_proof.h @@ -157,7 +157,7 @@ public: virtual void printResolutionProof(std::ostream& os, std::ostream& paren, ProofLetMap& letMap); void calculateAtomsInBitblastingProof(); const std::set* getAtomsInBitblastingProof(); - void printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2); + void printConstantDisequalityProof(std::ostream& os, Expr c1, Expr c2, const ProofLetMap &globalLetMap); void printRewriteProof(std::ostream& os, const Node &n1, const Node &n2); }; diff --git a/src/proof/proof_utils.h b/src/proof/proof_utils.h index 546d419fc..b172217d8 100644 --- a/src/proof/proof_utils.h +++ b/src/proof/proof_utils.h @@ -33,7 +33,8 @@ typedef std::pair NodePair; typedef std::set NodePairSet; -struct ProofLetCount { +class ProofLetCount { +public: static unsigned counter; static void resetCounter() { counter = 0; } static unsigned newId() { return ++counter; } diff --git a/src/proof/theory_proof.cpp b/src/proof/theory_proof.cpp index eae8a68df..8aefaae45 100644 --- a/src/proof/theory_proof.cpp +++ b/src/proof/theory_proof.cpp @@ -1167,7 +1167,8 @@ void LFSCBooleanProof::printAliasingDeclarations(std::ostream& os, std::ostream& void LFSCBooleanProof::printTheoryLemmaProof(std::vector& lemma, std::ostream& os, - std::ostream& paren) { + std::ostream& paren, + const ProofLetMap& map) { Unreachable("No boolean lemmas yet!"); } diff --git a/src/proof/theory_proof.h b/src/proof/theory_proof.h index c622fabee..80a737580 100644 --- a/src/proof/theory_proof.h +++ b/src/proof/theory_proof.h @@ -308,7 +308,7 @@ public: virtual void printOwnedTerm(Expr term, std::ostream& os, const ProofLetMap& map) = 0; virtual void printOwnedSort(Type type, std::ostream& os) = 0; - virtual void printTheoryLemmaProof(std::vector& lemma, std::ostream& os, std::ostream& paren) = 0; + virtual void printTheoryLemmaProof(std::vector& lemma, std::ostream& os, std::ostream& paren, const ProofLetMap& map) = 0; virtual void printSortDeclarations(std::ostream& os, std::ostream& paren) = 0; virtual void printTermDeclarations(std::ostream& os, std::ostream& paren) = 0; virtual void printDeferredDeclarations(std::ostream& os, std::ostream& paren) = 0; @@ -322,7 +322,7 @@ public: {} virtual void printOwnedTerm(Expr term, std::ostream& os, const ProofLetMap& map); virtual void printOwnedSort(Type type, std::ostream& os); - virtual void printTheoryLemmaProof(std::vector& lemma, std::ostream& os, std::ostream& paren); + virtual void printTheoryLemmaProof(std::vector& lemma, std::ostream& os, std::ostream& paren, const ProofLetMap& map); virtual void printSortDeclarations(std::ostream& os, std::ostream& paren); virtual void printTermDeclarations(std::ostream& os, std::ostream& paren); virtual void printDeferredDeclarations(std::ostream& os, std::ostream& paren);