summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2013-05-03 15:16:50 -0400
committerTim King <taking@cs.nyu.edu>2013-05-03 15:16:50 -0400
commit753e84e5b3068efe973be1871b6456abf9b9470b (patch)
tree043231ca65ace707ee5e2dbe83dfe21797dbe31c /src
parent69410776fdd18f8020a5c0a1daec8bc928ab8551 (diff)
Code cleanup. Reducing misc. warnings in arithmetic.
Diffstat (limited to 'src')
-rw-r--r--src/theory/arith/approx_simplex.cpp3
-rw-r--r--src/theory/arith/dual_simplex.cpp37
-rw-r--r--src/theory/arith/options2
-rw-r--r--src/theory/arith/soi_simplex.cpp2
4 files changed, 23 insertions, 21 deletions
diff --git a/src/theory/arith/approx_simplex.cpp b/src/theory/arith/approx_simplex.cpp
index d6be9f657..5777337ee 100644
--- a/src/theory/arith/approx_simplex.cpp
+++ b/src/theory/arith/approx_simplex.cpp
@@ -147,6 +147,7 @@ public:
}
virtual void setOptCoeffs(const ArithRatPairVec& ref);
+ static void printGLPKStatus(int status, std::ostream& out);
private:
Solution extractSolution(bool mip) const;
};
@@ -361,7 +362,7 @@ void ApproxGLPK::setOptCoeffs(const ArithRatPairVec& ref){
* check with FCSimplex
*/
-static void printGLPKStatus(int status, std::ostream& out){
+void ApproxGLPK::printGLPKStatus(int status, std::ostream& out){
switch(status){
case GLP_OPT:
out << "GLP_OPT" << endl;
diff --git a/src/theory/arith/dual_simplex.cpp b/src/theory/arith/dual_simplex.cpp
index 7caee6708..a9304ae76 100644
--- a/src/theory/arith/dual_simplex.cpp
+++ b/src/theory/arith/dual_simplex.cpp
@@ -196,19 +196,19 @@ bool DualSimplexDecisionProcedure::searchForFeasibleSolution(uint32_t remainingI
//DeltaRational beta_i = d_variables.getAssignment(x_i);
ArithVar x_j = ARITHVAR_SENTINEL;
- int32_t prevErrorSize = d_errorSet.errorSize();
+ int32_t prevErrorSize CVC4_UNUSED = d_errorSet.errorSize();
if(d_variables.cmpAssignmentLowerBound(x_i) < 0 ){
x_j = d_linEq.selectSlackUpperBound(x_i, pf);
if(x_j == ARITHVAR_SENTINEL ){
Unreachable();
- ++(d_statistics.d_statUpdateConflicts);
- reportConflict(x_i);
- ++(d_statistics.d_simplexConflicts);
+ // ++(d_statistics.d_statUpdateConflicts);
+ // reportConflict(x_i);
+ // ++(d_statistics.d_simplexConflicts);
// Node conflict = d_linEq.generateConflictBelowLowerBound(x_i); //unsat
// d_conflictVariable = x_i;
// reportConflict(conflict);
- return true;
+ // return true;
}else{
const DeltaRational& l_i = d_variables.getLowerBound(x_i);
d_linEq.pivotAndUpdate(x_i, x_j, l_i);
@@ -217,13 +217,13 @@ bool DualSimplexDecisionProcedure::searchForFeasibleSolution(uint32_t remainingI
x_j = d_linEq.selectSlackLowerBound(x_i, pf);
if(x_j == ARITHVAR_SENTINEL ){
Unreachable();
- ++(d_statistics.d_statUpdateConflicts);
- reportConflict(x_i);
- ++(d_statistics.d_simplexConflicts);
+ // ++(d_statistics.d_statUpdateConflicts);
+ // reportConflict(x_i);
+ // ++(d_statistics.d_simplexConflicts);
// Node conflict = d_linEq.generateConflictAboveUpperBound(x_i); //unsat
// d_conflictVariable = x_i;
// reportConflict(conflict);
- return true;
+ // return true;
}else{
const DeltaRational& u_i = d_variables.getUpperBound(x_i);
d_linEq.pivotAndUpdate(x_i, x_j, u_i);
@@ -232,16 +232,19 @@ bool DualSimplexDecisionProcedure::searchForFeasibleSolution(uint32_t remainingI
Assert(x_j != ARITHVAR_SENTINEL);
bool conflict = processSignals();
- int32_t currErrorSize = d_errorSet.errorSize();
+ int32_t currErrorSize CVC4_UNUSED = d_errorSet.errorSize();
d_pivots++;
- // cout << "#" << d_pivots
- // << " c" << conflict
- // << " d" << (prevErrorSize - currErrorSize)
- // << " f" << d_errorSet.inError(x_j)
- // << " h" << d_conflictVariables.isMember(x_j)
- // << " " << x_i << "->" << x_j
- // << endl;
+ if(Debug.isOn("arith::dual")){
+ Debug("arith::dual")
+ << "#" << d_pivots
+ << " c" << conflict
+ << " d" << (prevErrorSize - currErrorSize)
+ << " f" << d_errorSet.inError(x_j)
+ << " h" << d_conflictVariables.isMember(x_j)
+ << " " << x_i << "->" << x_j
+ << endl;
+ }
if(conflict){
return true;
diff --git a/src/theory/arith/options b/src/theory/arith/options
index 35cede8b4..7d92f5351 100644
--- a/src/theory/arith/options
+++ b/src/theory/arith/options
@@ -94,7 +94,7 @@ option exportDioDecompositions --dio-decomps bool :default false :read-write
option newProp --new-prop bool :default false :read-write
Use the new row propagation system
-option arithPropAsLemmaLength --arith-prop-clauses int :default 8 :read-write
+option arithPropAsLemmaLength --arith-prop-clauses uint16_t :default 8 :read-write
Rows shorter than this are propagated as clauses
option soiQuickExplain --soi-qe bool :default false :read-write
diff --git a/src/theory/arith/soi_simplex.cpp b/src/theory/arith/soi_simplex.cpp
index cbbdcb7f3..d0595321c 100644
--- a/src/theory/arith/soi_simplex.cpp
+++ b/src/theory/arith/soi_simplex.cpp
@@ -711,8 +711,6 @@ std::vector< ArithVarVec > SumOfInfeasibilitiesSPD::greedyConflictSubsets(){
underConstruction.push_back(v);
d_soiVar = constructInfeasiblityFunction(d_statistics.d_soiConflictMinimization, v);
- bool uniqueChoices = true;
-
//cout << "trying " << v << endl;
const Tableau::Entry* spoiler = NULL;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback