From b976f4da9bf79670226d7fa55e02d4c0e4c7e8ba Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Thu, 4 Sep 2014 20:42:23 -0400 Subject: [PATCH] add couple of stats --- src/theory/sets/theory_sets_private.cpp | 8 ++++++++ src/theory/sets/theory_sets_private.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/theory/sets/theory_sets_private.cpp b/src/theory/sets/theory_sets_private.cpp index bfcb477cb..8db4c5688 100644 --- a/src/theory/sets/theory_sets_private.cpp +++ b/src/theory/sets/theory_sets_private.cpp @@ -913,15 +913,21 @@ Node mkAnd(const std::vector& conjunctions) { TheorySetsPrivate::Statistics::Statistics() : d_checkTime("theory::sets::time") , d_getModelValueTime("theory::sets::getModelValueTime") + , d_memberLemmas("theory::sets::lemmas::member", 0) + , d_disequalityLemmas("theory::sets::lemmas::disequality", 0) { StatisticsRegistry::registerStat(&d_checkTime); StatisticsRegistry::registerStat(&d_getModelValueTime); + StatisticsRegistry::registerStat(&d_memberLemmas); + StatisticsRegistry::registerStat(&d_disequalityLemmas); } TheorySetsPrivate::Statistics::~Statistics() { StatisticsRegistry::unregisterStat(&d_checkTime); StatisticsRegistry::unregisterStat(&d_getModelValueTime); + StatisticsRegistry::unregisterStat(&d_memberLemmas); + StatisticsRegistry::unregisterStat(&d_disequalityLemmas); } @@ -991,11 +997,13 @@ void TheorySetsPrivate::addToPending(Node n) { if(n.getKind() == kind::MEMBER) { Debug("sets-pending") << "[sets-pending] \u2514 added to member queue" << std::endl; + ++d_statistics.d_memberLemmas; d_pending.push(n); } else { Debug("sets-pending") << "[sets-pending] \u2514 added to equality queue" << std::endl; Assert(n.getKind() == kind::EQUAL); + ++d_statistics.d_disequalityLemmas; d_pendingDisequal.push(n); } d_external.d_out->lemma(getLemma()); diff --git a/src/theory/sets/theory_sets_private.h b/src/theory/sets/theory_sets_private.h index e5f160fda..3d93adb48 100644 --- a/src/theory/sets/theory_sets_private.h +++ b/src/theory/sets/theory_sets_private.h @@ -75,6 +75,8 @@ private: public: TimerStat d_checkTime; TimerStat d_getModelValueTime; + IntStat d_memberLemmas; + IntStat d_disequalityLemmas; Statistics(); ~Statistics(); -- 2.30.2