From: Guy Date: Wed, 3 Aug 2016 22:51:22 +0000 (-0700) Subject: Fixed an issue where arrays proofs would sometimes have an extra ")" at the end. X-Git-Tag: cvc5-1.0.0~6040^2~13 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c82514b57252444df982b35af4809e0fd4635e37;p=cvc5.git Fixed an issue where arrays proofs would sometimes have an extra ")" at the end. --- diff --git a/src/proof/array_proof.cpp b/src/proof/array_proof.cpp index ccc072eca..514d81184 100644 --- a/src/proof/array_proof.cpp +++ b/src/proof/array_proof.cpp @@ -1324,6 +1324,7 @@ void LFSCArrayProof::printTermDeclarations(std::ostream& os, std::ostream& paren printSort(array_type.getConstituentType(), os); os << "))\n"; + paren << ")"; } else { Assert(term.isVariable()); if (ProofManager::getSkolemizationManager()->isSkolem(*it)) { @@ -1333,10 +1334,9 @@ void LFSCArrayProof::printTermDeclarations(std::ostream& os, std::ostream& paren os << "(% " << ProofManager::sanitize(term) << " "; os << "(term "; os << term.getType() << ")\n"; + paren << ")"; } } - - paren << ")"; } Debug("pf::array") << "Declaring terms done!" << std::endl; diff --git a/src/proof/proof_manager.cpp b/src/proof/proof_manager.cpp index 42319153f..e987f1c6f 100644 --- a/src/proof/proof_manager.cpp +++ b/src/proof/proof_manager.cpp @@ -596,6 +596,7 @@ void LFSCProof::toStream(std::ostream& out) { smt::SmtScope scope(d_smtEngine); std::ostringstream paren; out << "(check\n"; + paren << ")"; out << " ;; Declarations\n"; // declare the theory atoms @@ -618,6 +619,7 @@ void LFSCProof::toStream(std::ostream& out) { Debug("pf::pm") << std::endl << "LFSCProof::toStream: print assertions DONE" << std::endl; out << "(: (holds cln)\n\n"; + paren << ")"; // Have the theory proofs print deferred declarations, e.g. for skolem variables. out << " ;; Printing deferred declarations \n\n"; @@ -659,20 +661,15 @@ void LFSCProof::toStream(std::ostream& out) { Debug("pf::pm") << "Proof manager: printing theory lemmas DONE!" << std::endl; if (options::bitblastMode() == theory::bv::BITBLAST_MODE_EAGER && ProofManager::getBitVectorProof()) { - // print actual resolution proof - // d_satProof->printResolutions(out, paren); ProofManager::getBitVectorProof()->getSatProof()->printResolutionEmptyClause(out, paren); - paren <<")))\n;;"; - out << paren.str(); - out << "\n"; } else { // print actual resolution proof d_satProof->printResolutions(out, paren); d_satProof->printResolutionEmptyClause(out, paren); - paren <<")))\n;;"; - out << paren.str(); - out << "\n"; } + + out << paren.str(); + out << "\n;;\n"; } void LFSCProof::printPreprocessedAssertions(const NodeSet& assertions, diff --git a/src/proof/sat_proof_implementation.h b/src/proof/sat_proof_implementation.h index fc2bae19b..76b5efbe6 100644 --- a/src/proof/sat_proof_implementation.h +++ b/src/proof/sat_proof_implementation.h @@ -1093,6 +1093,7 @@ template void LFSCSatProof::printResolution(ClauseId id, std::ostream& out, std::ostream& paren) { out << "(satlem_simplify _ _ _ "; + paren << ")"; const ResChain& res = this->getResolutionChain(id); const typename ResChain::ResSteps& steps = res.getSteps(); @@ -1118,7 +1119,7 @@ void LFSCSatProof::printResolution(ClauseId id, std::ostream& out, } out << "(\\ " << this->clauseName(id) << "\n"; // bind to lemma name - paren << "))"; // closing parethesis for lemma binding and satlem + paren << ")"; } /// LFSCSatProof class