namespace CVC4 {
-CDProof::CDProof(ProofNodeManager* pnm, context::Context* c, std::string name)
- : d_manager(pnm), d_context(), d_nodes(c ? c : &d_context), d_name(name)
+CDProof::CDProof(ProofNodeManager* pnm,
+ context::Context* c,
+ std::string name,
+ bool autoSymm)
+ : d_manager(pnm),
+ d_context(),
+ d_nodes(c ? c : &d_context),
+ d_name(name),
+ d_autoSymm(autoSymm)
{
}
Trace("cdproof") << "...existing non-assume " << pf->getRule() << std::endl;
return pf;
}
+ else if (!d_autoSymm)
+ {
+ Trace("cdproof") << "...not auto considering symmetry" << std::endl;
+ return pf;
+ }
Node symFact = getSymmFact(fact);
if (symFact.isNull())
{
void CDProof::notifyNewProof(Node expected)
{
+ if (!d_autoSymm)
+ {
+ return;
+ }
// ensure SYMM proof is also linked to an existing proof, if it is an
// assumption.
Node symExpected = getSymmFact(expected);
{
return true;
}
+ else if (!d_autoSymm)
+ {
+ return false;
+ }
Node symFact = getSymmFact(fact);
if (symFact.isNull())
{
class CDProof : public ProofGenerator
{
public:
+ /**
+ * @param pnm The proof node manager responsible for constructor ProofNode
+ * @param c The context this proof depends on
+ * @param name The name of this proof (for debugging)
+ * @param autoSymm Whether this proof automatically adds symmetry steps based
+ * on policy documented above.
+ */
CDProof(ProofNodeManager* pnm,
context::Context* c = nullptr,
- std::string name = "CDProof");
+ std::string name = "CDProof",
+ bool autoSymm = true);
virtual ~CDProof();
/**
* Make proof for fact.
NodeProofNodeMap d_nodes;
/** Name identifier */
std::string d_name;
+ /** Whether we automatically add symmetry steps */
+ bool d_autoSymm;
/** Ensure fact sym */
std::shared_ptr<ProofNode> getProofSymm(Node fact);
/**