Fix for bug 430. d_delta in PartialModel was never being computed. (Delta remained...
authorTim King <taking@cs.nyu.edu>
Fri, 26 Oct 2012 21:14:58 +0000 (21:14 +0000)
committerTim King <taking@cs.nyu.edu>
Fri, 26 Oct 2012 21:14:58 +0000 (21:14 +0000)
src/theory/arith/partial_model.cpp

index 7e4a2daada00019c53808f411976c1d89dcf4762..73e7943b0752deb6f44333bee0050b2c8e29d52c 100644 (file)
@@ -91,6 +91,9 @@ void ArithPartialModel::initialize(ArithVar x, const DeltaRational& r){
   ++d_mapSize;
 
   d_hasSafeAssignment.push_back( false );
+  // Is wirth mentioning that this is not strictly necessary, but this maintains the internal invariant
+  // that when d_assignment is set this gets set.
+  d_deltaIsSafe = false;
   d_assignment.push_back( r );
   d_safeAssignment.push_back( DeltaRational(0) );
 
@@ -146,6 +149,7 @@ void ArithPartialModel::setLowerBoundConstraint(Constraint c){
   Assert(inMaps(x));
   Assert(greaterThanLowerBound(x, c->getValue()));
 
+  d_deltaIsSafe = false;
   d_lbc.set(x, c);
 }
 
@@ -159,6 +163,7 @@ void ArithPartialModel::setUpperBoundConstraint(Constraint c){
   Assert(inMaps(x));
   Assert(lessThanUpperBound(x, c->getValue()));
 
+  d_deltaIsSafe = false;
   d_ubc.set(x, c);
 }
 
@@ -240,7 +245,7 @@ void ArithPartialModel::clearSafeAssignments(bool revert){
   }
 
   if(revert && !d_history.empty()){
-    d_deltaIsSafe = true;
+    d_deltaIsSafe = false;
   }
 
   d_history.clear();