Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajreynol committed Dec 19, 2024
1 parent a217090 commit c06d33b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
4 changes: 0 additions & 4 deletions src/proof/conv_proof_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ std::shared_ptr<ProofNode> TConvProofGenerator::getProofFor(Node f)
if (f[0] == f[1])
{
// assertion failure in debug
Assert(false) << "TConvProofGenerator::getProofFor: " << identify()
<< ": don't ask for trivial proofs";
lpf.addStep(f, ProofRule::REFL, {}, {f[0]});
}
else
Expand Down Expand Up @@ -255,8 +253,6 @@ std::shared_ptr<ProofNode> TConvProofGenerator::getProofForRewriting(Node n)
if (conc[1] == n)
{
// assertion failure in debug
Assert(false) << "TConvProofGenerator::getProofForRewriting: " << identify()
<< ": don't ask for trivial proofs";
lpf.addStep(conc, ProofRule::REFL, {}, {n});
}
std::shared_ptr<ProofNode> pfn = lpf.getProofFor(conc);
Expand Down
9 changes: 5 additions & 4 deletions src/theory/arith/arith_proof_rcons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "expr/term_context.h"
#include "proof/conv_proof_generator.h"
#include "proof/proof.h"
#include "proof/proof_node.h"
#include "theory/arith/arith_msum.h"
#include "theory/arith/arith_subs.h"

Expand Down Expand Up @@ -80,7 +81,7 @@ std::shared_ptr<ProofNode> ArithProofRCons::getProofFor(Node fact)
ArithSubsTermContext astc;
TConvProofGenerator tcnv(d_env,
nullptr,
TConvPolicy::FIXPOINT,
TConvPolicy::ONCE,
TConvCachePolicy::NEVER,
"ArithRConsTConv",
&astc);
Expand All @@ -105,7 +106,7 @@ std::shared_ptr<ProofNode> ArithProofRCons::getProofFor(Node fact)
if (a != as)
{
std::shared_ptr<ProofNode> pfn = tcnv.getProofForRewriting(a);
Assert(pfn.getResult()[1] == as);
Assert(pfn->getResult()[1] == as);
cdp.addProof(pfn);
cdp.addStep(as, ProofRule::EQ_RESOLVE, {a, a.eqNode(as)}, {});
}
Expand Down Expand Up @@ -136,7 +137,7 @@ std::shared_ptr<ProofNode> ArithProofRCons::getProofFor(Node fact)
if (a != as)
{
std::shared_ptr<ProofNode> pfn = tcnv.getProofForRewriting(a);
Assert(pfn.getResult()[1] == as);
Assert(pfn->getResult()[1] == as);
cdp.addProof(pfn);
cdp.addStep(as, ProofRule::EQ_RESOLVE, {a, a.eqNode(as)}, {});
}
Expand Down Expand Up @@ -172,7 +173,7 @@ std::shared_ptr<ProofNode> ArithProofRCons::getProofFor(Node fact)
if (a != as)
{
std::shared_ptr<ProofNode> pfn = tcnv.getProofForRewriting(a);
Assert(pfn.getResult()[1] == as);
Assert(pfn->getResult()[1] == as);
cdp.addProof(pfn);
cdp.addStep(as, ProofRule::EQ_RESOLVE, {a, a.eqNode(as)}, {});
}
Expand Down
16 changes: 9 additions & 7 deletions src/theory/quantifiers/bv_inverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,18 @@ Node BvInverter::mkWitness(const Node& annot) const
d_nm, ProofRule::MACRO_EXISTS_INV_CONDITION, {annot});
Trace("bv-invert-witness")
<< "...returned " << w << " for " << annot << std::endl;
Assert(!w.isNull());
if (d_rewriter != nullptr)
if (!w.isNull())
{
Node neww = d_rewriter->rewrite(w);
if (neww != w)
if (d_rewriter != nullptr)
{
Trace("bv-invert-witness")
<< "Witness " << w << " was rewritten to " << neww << std::endl;
Node neww = d_rewriter->rewrite(w);
if (neww != w)
{
Trace("bv-invert-witness")
<< "Witness " << w << " was rewritten to " << neww << std::endl;
}
w = neww;
}
w = neww;
}
return w;
}
Expand Down

0 comments on commit c06d33b

Please sign in to comment.