summaryrefslogtreecommitdiff
path: root/src/theory/arith/dual_simplex.cpp
diff options
context:
space:
mode:
authorTim King <taking@google.com>2016-01-08 16:44:57 -0800
committerTim King <taking@google.com>2016-01-08 16:44:57 -0800
commitf4ef7af0a2295691f281ee1604dfeb4082fe229c (patch)
tree995e512e5669cec6bbc9447d00ec912d5e4c19e3 /src/theory/arith/dual_simplex.cpp
parentdef0a07f9676a292a849d7fc8269ffd0901ce156 (diff)
Removing StatisticsRegistry's static functions current() and registerStat().
- The functionality the get the StatisticsRegistry attached to the SmtEngine was previously through StatisticsRegistry::current(). This is the dominant StatisticsRegistry in the code. (There is another StatisticsRegistry attached to the NodeManager.) Having this be a static function on StatisticsRegistry requires the use of an SmtEngine in the wrong compilation unit. - Usages of StatisticsRegistry::current() that were visible in prop/{bvminisat,minisat} has been removed. A pointer to the relevant StatisticsRegistry should be passed instead into the constructor. - The function StatisticsRegistry::current() has been replaced by SmtScope::currentStatisticsRegistry(). SmtScope is in the libcvc4 package, where SmtEngine is available in the compilation unit. - The function smtStatisticsRegistry() is a synonym for SmtScope::currentStatisticsRegistry() in smt/smt_statistics_registry.h. This header has fewer include dependencies than the one for SmtScope. - Correspondingly, the static functions StatisticsRegistry::{registerStat, unregisterStat} have been removed. One should instead use smtStatisticsRegistry()->{registerStat,unregisterStat} instead. - The KEEP_STATISTIC macro has been moved into smt/smt_statistics_registry.h. - Documents the reason StatisticsRegistry is CVC4_PUBLIC. This lets me remove the warning I added. - Removing most operators for timespec from statistics_registry.h file. These a bit error prone in clang. - Most of the really confusing ifdef's in util/statistics_registry.h are gone.
Diffstat (limited to 'src/theory/arith/dual_simplex.cpp')
-rw-r--r--src/theory/arith/dual_simplex.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/theory/arith/dual_simplex.cpp b/src/theory/arith/dual_simplex.cpp
index 32f81ded8..907d5eefb 100644
--- a/src/theory/arith/dual_simplex.cpp
+++ b/src/theory/arith/dual_simplex.cpp
@@ -14,11 +14,13 @@
** [[ Add lengthier description here ]]
** \todo document this file
**/
+#include "theory/arith/dual_simplex.h"
#include "base/output.h"
#include "options/arith_options.h"
+#include "smt/smt_statistics_registry.h"
#include "theory/arith/constraint.h"
-#include "theory/arith/dual_simplex.h"
+
using namespace std;
@@ -40,21 +42,21 @@ DualSimplexDecisionProcedure::Statistics::Statistics(uint32_t& pivots):
d_searchTime("theory::arith::dual::searchTime"),
d_finalCheckPivotCounter("theory::arith::dual::lastPivots", pivots)
{
- StatisticsRegistry::registerStat(&d_statUpdateConflicts);
- StatisticsRegistry::registerStat(&d_processSignalsTime);
- StatisticsRegistry::registerStat(&d_simplexConflicts);
- StatisticsRegistry::registerStat(&d_recentViolationCatches);
- StatisticsRegistry::registerStat(&d_searchTime);
- StatisticsRegistry::registerStat(&d_finalCheckPivotCounter);
+ smtStatisticsRegistry()->registerStat(&d_statUpdateConflicts);
+ smtStatisticsRegistry()->registerStat(&d_processSignalsTime);
+ smtStatisticsRegistry()->registerStat(&d_simplexConflicts);
+ smtStatisticsRegistry()->registerStat(&d_recentViolationCatches);
+ smtStatisticsRegistry()->registerStat(&d_searchTime);
+ smtStatisticsRegistry()->registerStat(&d_finalCheckPivotCounter);
}
DualSimplexDecisionProcedure::Statistics::~Statistics(){
- StatisticsRegistry::unregisterStat(&d_statUpdateConflicts);
- StatisticsRegistry::unregisterStat(&d_processSignalsTime);
- StatisticsRegistry::unregisterStat(&d_simplexConflicts);
- StatisticsRegistry::unregisterStat(&d_recentViolationCatches);
- StatisticsRegistry::unregisterStat(&d_searchTime);
- StatisticsRegistry::unregisterStat(&d_finalCheckPivotCounter);
+ smtStatisticsRegistry()->unregisterStat(&d_statUpdateConflicts);
+ smtStatisticsRegistry()->unregisterStat(&d_processSignalsTime);
+ smtStatisticsRegistry()->unregisterStat(&d_simplexConflicts);
+ smtStatisticsRegistry()->unregisterStat(&d_recentViolationCatches);
+ smtStatisticsRegistry()->unregisterStat(&d_searchTime);
+ smtStatisticsRegistry()->unregisterStat(&d_finalCheckPivotCounter);
}
Result::Sat DualSimplexDecisionProcedure::dualFindModel(bool exactResult){
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback