bool& continueUpdate)
{
// should it be updated?
- if (!d_cb.shouldUpdate(cur.get()))
+ if (!d_cb.shouldUpdate(cur, continueUpdate))
{
return false;
}
public:
ProofNodeUpdaterCallback();
virtual ~ProofNodeUpdaterCallback();
- /** Should proof pn be updated? */
- virtual bool shouldUpdate(ProofNode* pn) = 0;
+ /** Should proof pn be updated?
+ *
+ * @param pn the proof node that maybe should be updated
+ * @param continueUpdate whether we should continue recursively updating pn
+ * @return whether we should run the update method on pn
+ */
+ virtual bool shouldUpdate(std::shared_ptr<ProofNode> pn,
+ bool& continueUpdate) = 0;
/**
* Update the proof rule application, store steps in cdp. Return true if
* the proof changed. It can be assumed that cdp contains proofs of each
d_elimRules.insert(rule);
}
-bool ProofPostprocessCallback::shouldUpdate(ProofNode* pn)
+bool ProofPostprocessCallback::shouldUpdate(std::shared_ptr<ProofNode> pn,
+ bool& continueUpdate)
{
return d_elimRules.find(pn->getRule()) != d_elimRules.end();
}
d_pedanticFailureOut.str("");
}
-bool ProofPostprocessFinalCallback::shouldUpdate(ProofNode* pn)
+bool ProofPostprocessFinalCallback::shouldUpdate(std::shared_ptr<ProofNode> pn,
+ bool& continueUpdate)
{
PfRule r = pn->getRule();
if (Trace.isOn("final-pf-hole"))
*/
void setEliminateRule(PfRule rule);
/** Should proof pn be updated? */
- bool shouldUpdate(ProofNode* pn) override;
+ bool shouldUpdate(std::shared_ptr<ProofNode> pn,
+ bool& continueUpdate) override;
/** Update the proof rule application. */
bool update(Node res,
PfRule id,
*/
void initializeUpdate();
/** Should proof pn be updated? Returns false, adds to stats. */
- bool shouldUpdate(ProofNode* pn) override;
+ bool shouldUpdate(std::shared_ptr<ProofNode> pn,
+ bool& continueUpdate) override;
/** was pedantic failure */
bool wasPedanticFailure(std::ostream& out) const;