bool Constraint::wellFormedFarkasProof() const {
Assert(hasProof());
-
+
const ConstraintRule& cr = getConstraintRule();
if(cr.d_constraint != this){ return false; }
if(cr.d_proofType != FarkasAP){ return false; }
}
void Constraint::setAssumption(bool nowInConflict){
+ Debug("constraints::pf") << "setAssumption(" << this << ")" << std::endl;
Assert(!hasProof());
Assert(negationHasProof() == nowInConflict);
Assert(hasLiteral());
* 1*(x <= a) + (-1)*(x > b) => (0 <= a-b)
*/
void Constraint::impliedByUnate(ConstraintCP imp, bool nowInConflict){
+ Debug("constraints::pf") << "impliedByUnate(" << this << ", " << *imp << ")" << std::endl;
Assert(!hasProof());
Assert(imp->hasProof());
Assert(negationHasProof() == nowInConflict);
}
void Constraint::impliedByTrichotomy(ConstraintCP a, ConstraintCP b, bool nowInConflict){
+ Debug("constraints::pf") << "impliedByTrichotomy(" << this << ", " << *a << ", ";
+ Debug("constraints::pf") << *b << ")" << std::endl;
Assert(!hasProof());
Assert(negationHasProof() == nowInConflict);
Assert(a->hasProof());
}
void Constraint::impliedByIntHole(ConstraintCP a, bool nowInConflict){
+ Debug("constraints::pf") << "impliedByIntHole(" << this << ", " << *a << ")" << std::endl;
Assert(!hasProof());
Assert(negationHasProof() == nowInConflict);
Assert(a->hasProof());
}
void Constraint::impliedByIntHole(const ConstraintCPVec& b, bool nowInConflict){
+ Debug("constraints::pf") << "impliedByIntHole(" << this;
+ if (Debug.isOn("constraints::pf")) {
+ for (const ConstraintCP& p : b)
+ {
+ Debug("constraints::pf") << ", " << p;
+ }
+ }
+ Debug("constraints::pf") << ")" << std::endl;
+
Assert(!hasProof());
Assert(negationHasProof() == nowInConflict);
Assert(allHaveProof(b));
* coeff.back() corresponds to the current constraint.
*/
void Constraint::impliedByFarkas(const ConstraintCPVec& a, RationalVectorCP coeffs, bool nowInConflict){
+ Debug("constraints::pf") << "impliedByFarkas(" << this;
+ if (Debug.isOn("constraints::pf")) {
+ for (const ConstraintCP& p : a)
+ {
+ Debug("constraints::pf") << ", " << p;
+ }
+ }
+ Debug("constraints::pf") << ", <coeffs>";
+ Debug("constraints::pf") << ")" << std::endl;
Assert(!hasProof());
Assert(negationHasProof() == nowInConflict);
Assert(allHaveProof(a));
void Constraint::setInternalAssumption(bool nowInConflict){
+ Debug("constraints::pf") << "setInternalAssumption(" << this;
+ Debug("constraints::pf") << ")" << std::endl;
Assert(!hasProof());
Assert(negationHasProof() == nowInConflict);
Assert(!assertedToTheTheory());
void Constraint::setEqualityEngineProof(){
+ Debug("constraints::pf") << "setEqualityEngineProof(" << this;
+ Debug("constraints::pf") << ")" << std::endl;
Assert(truthIsUnknown());
Assert(hasLiteral());
d_database->pushConstraintRule(ConstraintRule(this, EqualityEngineAP));