void TheoryArithPrivate::raiseConflict(ConstraintCP a, InferenceId id){
Assert(a->inConflict());
+ Assert(id != InferenceId::UNKNOWN)
+ << "Must provide an inference id in TheoryArithPrivate::raiseConflict";
d_conflicts.push_back(std::make_pair(a, id));
}
d_updatedBounds.purge();
}
-// void TheoryArithPrivate::raiseConflict(ConstraintCP a, ConstraintCP b){
-// ConstraintCPVec v;
-// v.push_back(a);
-// v.push_back(b);
-// d_conflicts.push_back(v);
-// }
-
-// void TheoryArithPrivate::raiseConflict(ConstraintCP a, ConstraintCP b, ConstraintCP c){
-// ConstraintCPVec v;
-// v.push_back(a);
-// v.push_back(b);
-// v.push_back(c);
-// d_conflicts.push_back(v);
-// }
-
void TheoryArithPrivate::zeroDifferenceDetected(ArithVar x){
if(d_cmEnabled){
Assert(d_congruenceManager.isWatchedVariable(x));
Node conflict = trustedConflict.getNode();
++conflicts;
- Debug("arith::conflict") << "d_conflicts[" << i << "] " << conflict
- << " has proof: " << hasProof << endl;
+ Debug("arith::conflict")
+ << "d_conflicts[" << i << "] " << conflict
+ << " has proof: " << hasProof << ", id = " << conf.second << endl;
if(Debug.isOn("arith::normalize::external")){
conflict = flattenAndSort(conflict);
Debug("arith::conflict") << "(normalized to) " << conflict << endl;
<< " (" << neg_at_j->isTrue() <<") " << neg_at_j << endl
<< " (" << at_j->isTrue() <<") " << at_j << endl;
neg_at_j->impliedByIntHole(vec, true);
- raiseConflict(at_j, InferenceId::UNKNOWN);
+ raiseConflict(at_j, InferenceId::ARITH_CONF_REPLAY_LOG);
break;
}
}
if(!contains(conf, bcneg)){
Debug("approx::branch") << "reraise " << conf << endl;
ConstraintCP conflicting = vectorToIntHoleConflict(conf);
- raiseConflict(conflicting, InferenceId::UNKNOWN);
+ raiseConflict(conflicting, InferenceId::ARITH_CONF_BRANCH_CUT);
}else if(!bci.proven()){
drop(conf, bcneg);
bci.setExplanation(conf);
}
Debug("approx::replayAssert") << "replayAssertion " << c << endl;
if(inConflict){
- raiseConflict(c, InferenceId::UNKNOWN);
+ raiseConflict(c, InferenceId::ARITH_CONF_REPLAY_ASSERT);
}else{
assertionCases(c);
}
}else {
con->impliedByIntHole(exp, true);
Debug("approx::replayLogRec") << "cut into conflict " << con << endl;
- raiseConflict(con, InferenceId::UNKNOWN);
+ raiseConflict(con, InferenceId::ARITH_CONF_REPLAY_LOG_REC);
}
}else{
++d_statistics.d_cutsProofFailed;
case InferenceId::ARITH_CONF_SIMPLEX: return "ARITH_CONF_SIMPLEX";
case InferenceId::ARITH_CONF_SOI_SIMPLEX: return "ARITH_CONF_SOI_SIMPLEX";
case InferenceId::ARITH_CONF_FACT_QUEUE: return "ARITH_CONF_FACT_QUEUE";
+ case InferenceId::ARITH_CONF_BRANCH_CUT: return "ARITH_CONF_BRANCH_CUT";
+ case InferenceId::ARITH_CONF_REPLAY_ASSERT:
+ return "ARITH_CONF_REPLAY_ASSERT";
+ case InferenceId::ARITH_CONF_REPLAY_LOG: return "ARITH_CONF_REPLAY_LOG";
+ case InferenceId::ARITH_CONF_REPLAY_LOG_REC:
+ return "ARITH_CONF_REPLAY_LOG_REC";
+ case InferenceId::ARITH_CONF_UNATE_PROP: return "ARITH_CONF_UNATE_PROP";
case InferenceId::ARITH_SPLIT_DEQ: return "ARITH_SPLIT_DEQ";
case InferenceId::ARITH_TIGHTEN_CEIL: return "ARITH_TIGHTEN_CEIL";
case InferenceId::ARITH_TIGHTEN_FLOOR: return "ARITH_TIGHTEN_FLOOR";
ARITH_CONF_SOI_SIMPLEX,
// conflict when getting constraint from fact queue
ARITH_CONF_FACT_QUEUE,
+ // conflict in tryBranchCut
+ ARITH_CONF_BRANCH_CUT,
+ // conflict in replayAssert
+ ARITH_CONF_REPLAY_ASSERT,
+ // conflict in replayLog
+ ARITH_CONF_REPLAY_LOG,
+ // conflict in replayLogRec
+ ARITH_CONF_REPLAY_LOG_REC,
+ // conflict from handleUnateProp
+ ARITH_CONF_UNATE_PROP,
// introduces split on a disequality
ARITH_SPLIT_DEQ,
// tighten integer inequalities to ceiling