Removed ActivityMonitor from arithmetic. This was only used for row ejection, and...
authorTim King <taking@cs.nyu.edu>
Thu, 17 Feb 2011 18:00:30 +0000 (18:00 +0000)
committerTim King <taking@cs.nyu.edu>
Thu, 17 Feb 2011 18:00:30 +0000 (18:00 +0000)
src/theory/arith/arith_utilities.h
src/theory/arith/simplex.cpp
src/theory/arith/simplex.h
src/theory/arith/tableau.cpp
src/theory/arith/tableau.h
src/theory/arith/theory_arith.cpp
src/theory/arith/theory_arith.h

index c8532f1a26c49a59c559b75ba4d0dee4ecde4ff4..6a9102a19e5b8ea060df5e472e1dee19bbf7ab9c 100644 (file)
@@ -56,9 +56,6 @@ inline void setArithVar(TNode x, ArithVar a){
   return x.setAttribute(ArithVarAttr(), (uint64_t)a);
 }
 
-typedef std::vector<uint64_t> ActivityMonitor;
-
-
 inline Node mkRationalNode(const Rational& q){
   return NodeManager::currentNM()->mkConst<Rational>(q);
 }
index 9e3ba726a9242b51a06d7bc3db659d272c7bf993..6e7685570777115b133482a8526a424335b23da7 100644 (file)
@@ -129,7 +129,6 @@ bool SimplexDecisionProcedure::AssertLower(ArithVar x_i, const DeltaRational& c_
 
   d_partialModel.setLowerConstraint(x_i,original);
   d_partialModel.setLowerBound(x_i, c_i);
-  d_activityMonitor[x_i] = 0;
 
   if(!d_basicManager.isMember(x_i)){
     if(d_partialModel.getAssignment(x_i) < c_i){
@@ -167,8 +166,6 @@ bool SimplexDecisionProcedure::AssertUpper(ArithVar x_i, const DeltaRational& c_
   d_partialModel.setUpperConstraint(x_i,original);
   d_partialModel.setUpperBound(x_i, c_i);
 
-  d_activityMonitor[x_i] = 0;
-
   if(!d_basicManager.isMember(x_i)){
     if(d_partialModel.getAssignment(x_i) > c_i){
       update(x_i, c_i);
@@ -220,7 +217,6 @@ bool SimplexDecisionProcedure::AssertEquality(ArithVar x_i, const DeltaRational&
 
   d_partialModel.setUpperConstraint(x_i,original);
   d_partialModel.setUpperBound(x_i, c_i);
-  d_activityMonitor[x_i] = 0;
 
   if(!d_basicManager.isMember(x_i)){
     if(!(d_partialModel.getAssignment(x_i) == c_i)){
@@ -255,8 +251,6 @@ void SimplexDecisionProcedure::update(ArithVar x_i, const DeltaRational& v){
       DeltaRational  nAssignment = assignment+(diff * a_ji);
       d_partialModel.setAssignment(x_j, nAssignment);
 
-      d_activityMonitor[x_j] += 1;
-
       checkBasicVariable(x_j);
     }
   }
@@ -322,8 +316,6 @@ void SimplexDecisionProcedure::pivotAndUpdate(ArithVar x_i, ArithVar x_j, DeltaR
       DeltaRational nextAssignment = d_partialModel.getAssignment(x_k) + (theta * a_kj);
       d_partialModel.setAssignment(x_k, nextAssignment);
 
-      d_activityMonitor[x_j] += 1;
-
       checkBasicVariable(x_k);
     }
   }
index 7589e7936f15f2465c8396cdfc5151c739d36ebb..e02e001e3568d6619a5b797ae94ff4fdf52351a0 100644 (file)
@@ -56,11 +56,9 @@ private:
   ArithPartialModel& d_partialModel;
 
   ArithVarSet& d_basicManager;
-  ActivityMonitor& d_activityMonitor;
 
   OutputChannel* d_out;
 
-
   Tableau& d_tableau;
 
   ArithVar d_numVariables;
@@ -72,13 +70,11 @@ public:
                            ArithPartialModel& pm,
                            ArithVarSet& bm,
                            OutputChannel* out,
-                           ActivityMonitor& am,
                            Tableau& tableau) :
     d_possiblyInconsistent(),
     d_constants(constants),
     d_partialModel(pm),
     d_basicManager(bm),
-    d_activityMonitor(am),
     d_out(out),
     d_tableau(tableau),
     d_numVariables(0),
index 95ea166af91e88a02313cb5100fafc65e106a20f..75363af7ff5c007205d388a705d1fdb918219527 100644 (file)
@@ -101,7 +101,6 @@ void Tableau::pivot(ArithVar x_r, ArithVar x_s){
 
     ReducedRowVector& row_k = lookup(basic);
     if(row_k.has(x_s)){
-      d_activityMonitor[basic] += 30;
       row_k.substitute(*row_s);
     }
   }
index 5f2a36505274305f38a6e7b36064eb4f2d6615c7..f74e662cf3560d6d85e91c880cd444266b78d63e 100644 (file)
@@ -45,8 +45,6 @@ private:
   ArithVarSet d_activeBasicVars;
   RowsTable d_rowsTable;
 
-
-  ActivityMonitor& d_activityMonitor;
   ArithVarSet& d_basicManager;
 
   std::vector<uint32_t> d_rowCount;
@@ -55,10 +53,9 @@ public:
   /**
    * Constructs an empty tableau.
    */
-  Tableau(ActivityMonitor &am, ArithVarSet& bm) :
+  Tableau(ArithVarSet& bm) :
     d_activeBasicVars(),
     d_rowsTable(),
-    d_activityMonitor(am),
     d_basicManager(bm)
   {}
 
index ecc7406553ab279b6235ab48b808395fb6e8130e..ca3b76410fc22dfb578203ca19287fde3067800c 100644 (file)
@@ -59,11 +59,10 @@ TheoryArith::TheoryArith(context::Context* c, OutputChannel& out) :
   d_partialModel(c),
   d_basicManager(),
   d_userVariables(),
-  d_activityMonitor(),
   d_diseq(c),
-  d_tableau(d_activityMonitor, d_basicManager),
+  d_tableau(d_basicManager),
   d_propagator(c, out),
-  d_simplex(d_constants, d_partialModel, d_basicManager,  d_out, d_activityMonitor, d_tableau),
+  d_simplex(d_constants, d_partialModel, d_basicManager,  d_out, d_tableau),
   d_statistics()
 {}
 
@@ -262,9 +261,6 @@ ArithVar TheoryArith::requestArithVar(TNode x, bool basic){
 
   setArithVar(x,varX);
 
-  Assert(varX == d_activityMonitor.size());
-  d_activityMonitor.push_back(0);
-
   d_basicManager.init(varX,basic);
   d_userVariables.init(varX, !basic);
   d_tableau.increaseSize();
index fa60b5fcf889730b94a24dc91e3f149ff5f281df..fd3cf0c45c2f7b8d7036b7a79d125474e4bd0547 100644 (file)
@@ -86,7 +86,6 @@ private:
 
   ArithVarSet d_basicManager;
   ArithVarSet d_userVariables;
-  ActivityMonitor d_activityMonitor;
 
   /**
    * List of all of the inequalities asserted in the current context.