return true;
}
+bool TheoryArithPrivate::isProofEnabled() const
+{
+ return d_pnm != nullptr;
+}
+
void TheoryArithPrivate::raiseConflict(ConstraintCP a){
Assert(a->inConflict());
d_conflicts.push_back(a);
Debug("arith::bb") << "raiseBlackBoxConflict: " << bb << std::endl;
if (d_blackBoxConflict.get().isNull())
{
- if (options::proofNew())
+ if (isProofEnabled())
{
Debug("arith::bb") << " with proof " << pf << std::endl;
d_blackBoxConflictPf.set(pf);
pf.print(std::cout);
std::cout << std::endl;
}
- Node conflict = confConstraint->externalExplainConflict().getNode();
+ if (Debug.isOn("arith::pf::tree"))
+ {
+ Debug("arith::pf::tree") << "\n\nTree:\n";
+ confConstraint->printProofTree(Debug("arith::pf::tree"));
+ confConstraint->getNegation()->printProofTree(Debug("arith::pf::tree"));
+ }
+
+ TrustNode trustedConflict = confConstraint->externalExplainConflict();
+ Node conflict = trustedConflict.getNode();
++conflicts;
Debug("arith::conflict") << "d_conflicts[" << i << "] " << conflict
Debug("arith::conflict") << "(normalized to) " << conflict << endl;
}
- outputConflict(conflict);
+ if (isProofEnabled())
+ {
+ outputTrustedConflict(trustedConflict);
+ }
+ else
+ {
+ outputConflict(conflict);
+ }
}
}
if(!d_blackBoxConflict.get().isNull()){
bb = flattenAndSort(bb);
Debug("arith::conflict") << "(normalized to) " << bb << endl;
}
-
- outputConflict(bb);
+ if (isProofEnabled() && d_blackBoxConflictPf.get())
+ {
+ auto confPf = d_blackBoxConflictPf.get();
+ outputTrustedConflict(d_pfGen->mkTrustNode(bb, confPf, true));
+ }
+ else
+ {
+ outputConflict(bb);
+ }
}
}
(d_containing.d_out)->lemma(lem);
}
+void TheoryArithPrivate::outputTrustedConflict(TrustNode conf)
+{
+ Debug("arith::channel") << "Arith trusted conflict: " << conf << std::endl;
+ (d_containing.d_out)->conflict(conf.getNode());
+}
+
void TheoryArithPrivate::outputConflict(TNode lit) {
Debug("arith::channel") << "Arith conflict: " << lit << std::endl;
(d_containing.d_out)->conflict(lit);
/** For holding the proof of the above conflict node. */
context::CDO<std::shared_ptr<ProofNode>> d_blackBoxConflictPf;
+ bool isProofEnabled() const;
+
public:
/**
* This adds the constraint a to the queue of conflicts in d_conflicts.
inline context::Context* getSatContext() const { return d_containing.getSatContext(); }
void outputTrustedLemma(TrustNode lem);
void outputLemma(TNode lem);
+ void outputTrustedConflict(TrustNode conf);
void outputConflict(TNode lit);
void outputPropagate(TNode lit);
void outputRestart();