// the current proof. Instead, it is only linked, and ignored on
// future calls to getProofFor due to the check above.
std::shared_ptr<ProofNode> pgc = pg->getProofFor(cfactGen);
- if (isSym)
+ // If the proof was null, then the update is not performed. This is
+ // not considered an error, since this behavior is equivalent to
+ // if pg had provided the proof (ASSUME cfactGen). Ensuring the
+ // proper behavior wrt closed proofs should be done outside this
+ // method.
+ if (pgc != nullptr)
{
- d_manager->updateNode(cur, PfRule::SYMM, {pgc}, {});
- }
- else
- {
- d_manager->updateNode(cur, pgc.get());
+ Trace("lazy-cdproof-gen")
+ << "LazyCDProof: stored proof: " << *pgc.get() << std::endl;
+
+ if (isSym)
+ {
+ d_manager->updateNode(cur, PfRule::SYMM, {pgc}, {});
+ }
+ else
+ {
+ d_manager->updateNode(cur, pgc.get());
+ }
+ Trace("lazy-cdproof") << "LazyCDProof: Successfully added fact for "
+ << cfactGen << std::endl;
}
- Trace("lazy-cdproof") << "LazyCDProof: Successfully added fact for "
- << cfactGen << std::endl;
}
else
{
bool ProofNodeManager::updateNode(ProofNode* pn, ProofNode* pnr)
{
+ Assert(pn != nullptr);
+ Assert(pnr != nullptr);
if (pn->getResult() != pnr->getResult())
{
return false;
const std::vector<Node>& args,
bool needsCheck)
{
+ Assert(pn != nullptr);
// ---------------- check for cyclic
std::unordered_map<const ProofNode*, bool> visited;
std::unordered_map<const ProofNode*, bool>::iterator it;