}else{
Rational res = getCoefficient(*curr1) + c * getCoefficient(*curr2);
if(res != 0){
- ++counts[getArithVar(*curr2)];
+ //The variable is not new so the count stays the same
+ //bug: ++counts[getArithVar(*curr2)];
arr.push_back(make_pair(getArithVar(*curr1), res));
}else{
merge(d_entries, d_contains, justBasic, Rational(1), d_rowCount);
Assert(wellFormed());
+ Assert(d_rowCount[d_basic] == 1);
}
void ReducedRowVector::substitute(const ReducedRowVector& row_s){
Assert(!has(x_s));
Assert(wellFormed());
+ Assert(d_rowCount[basic()] == 1);
}
void ReducedRowVector::pivot(ArithVar x_j){
d_basic = x_j;
Assert(wellFormed());
+ //The invariant Assert(d_rowCount[basic()] == 1); does not hold.
+ //This is because the pivot is within the row first then
+ //is moved through the propagated through the rest of the tableau.
}
Node basicVar = (map.find(basic()))->second;
return NodeBuilder<2>(EQUAL) << basicVar << sum;
}
+
+
+ReducedRowVector::~ReducedRowVector(){
+ //This executes before the super classes destructor RowVector,
+ // which will set this to 0.
+ Assert(d_rowCount[basic()] == 1);
+}
d_selectInitialConflictTime("theory::arith::selectInitialConflictTime"),
d_pivotsAfterConflict("theory::arith::pivotsAfterConflict", 0),
d_checksWithWastefulPivots("theory::arith::checksWithWastefulPivots", 0),
- d_pivotTime("theory::arith::pivotTime")
+ d_pivotTime("theory::arith::pivotTime"),
+ d_avgNumRowsNotContainingOnUpdate("theory::arith::avgNumRowsNotContainingOnUpdate"),
+ d_avgNumRowsNotContainingOnPivot("theory::arith::avgNumRowsNotContainingOnPivot")
{
StatisticsRegistry::registerStat(&d_statPivots);
StatisticsRegistry::registerStat(&d_statUpdates);
StatisticsRegistry::registerStat(&d_pivotsAfterConflict);
StatisticsRegistry::registerStat(&d_checksWithWastefulPivots);
StatisticsRegistry::registerStat(&d_pivotTime);
+
+ StatisticsRegistry::registerStat(&d_avgNumRowsNotContainingOnUpdate);
+ StatisticsRegistry::registerStat(&d_avgNumRowsNotContainingOnPivot);
}
SimplexDecisionProcedure::Statistics::~Statistics(){
StatisticsRegistry::unregisterStat(&d_pivotsAfterConflict);
StatisticsRegistry::unregisterStat(&d_checksWithWastefulPivots);
StatisticsRegistry::unregisterStat(&d_pivotTime);
+
+ StatisticsRegistry::unregisterStat(&d_avgNumRowsNotContainingOnUpdate);
+ StatisticsRegistry::unregisterStat(&d_avgNumRowsNotContainingOnPivot);
}
/* procedure AssertLower( x_i >= c_i ) */
d_partialModel.setAssignment(x_i, v);
+ Assert(d_tableau.getNumRows() >= d_tableau.getRowCount(x_i));
+ double difference = ((double)d_tableau.getNumRows()) - ((double) d_tableau.getRowCount(x_i));
+
+ (d_statistics.d_avgNumRowsNotContainingOnUpdate).addEntry(difference);
if(Debug.isOn("paranoid:check_tableau")){
checkTableau();
}
++(d_statistics.d_pivotsAfterConflict);
}
+ Assert(d_tableau.getNumRows() >= d_tableau.getRowCount(x_j));
+ double difference = ((double)d_tableau.getNumRows()) - ((double) d_tableau.getRowCount(x_j));
+ (d_statistics.d_avgNumRowsNotContainingOnPivot).addEntry(difference);
d_tableau.pivot(x_i, x_j);
+
checkBasicVariable(x_j);
// Debug found conflict