cvc4-1.3
statistics.h
Go to the documentation of this file.
1 /********************* */
18 #include "cvc4_public.h"
19 
20 #ifndef __CVC4__STATISTICS_H
21 #define __CVC4__STATISTICS_H
22 
23 #include "util/sexpr.h"
24 
25 #include <string>
26 #include <ostream>
27 #include <set>
28 #include <iterator>
29 #include <utility>
30 
31 namespace CVC4 {
32 
33 class Stat;
34 
36 protected:
37 
38  static std::string s_regDelim;
39 
41  struct StatCmp {
42  bool operator()(const Stat* s1, const Stat* s2) const;
43  };/* struct StatisticsRegistry::StatCmp */
44 
46  typedef std::set< Stat*, StatCmp > StatSet;
47 
48  std::string d_prefix;
49 
52 
54  StatisticsBase(const StatisticsBase& stats);
55  StatisticsBase& operator=(const StatisticsBase& stats);
56 
57 public:
58 
59  virtual ~StatisticsBase() { }
60 
61  class CVC4_PUBLIC iterator : public std::iterator< std::input_iterator_tag, std::pair<std::string, SExpr> > {
62  StatSet::iterator d_it;
63 
64  iterator(StatSet::iterator it) : d_it(it) { }
65 
66  friend class StatisticsBase;
67 
68  public:
69  iterator() : d_it() { }
70  iterator(const iterator& it) : d_it(it.d_it) { }
71  value_type operator*() const;
72  iterator& operator++() { ++d_it; return *this; }
73  iterator operator++(int) { iterator old = *this; ++d_it; return old; }
74  bool operator==(const iterator& i) const { return d_it == i.d_it; }
75  bool operator!=(const iterator& i) const { return d_it != i.d_it; }
76  };/* class StatisticsBase::iterator */
77 
80 
82  virtual void setPrefix(const std::string& prefix);
83 
85  void flushInformation(std::ostream& out) const;
86 
88  SExpr getStatistic(std::string name) const;
89 
94  const_iterator begin() const;
95 
99  const_iterator end() const;
100 
101 };/* class StatisticsBase */
102 
104  void clear();
105  void copyFrom(const StatisticsBase&);
106 
107 public:
108 
113  Statistics(const StatisticsBase& stats);
114  Statistics(const Statistics& stats);
115 
116  ~Statistics();
117 
122  Statistics& operator=(const StatisticsBase& stats);
123  Statistics& operator=(const Statistics& stats);
124 
125 };/* class Statistics */
126 
127 }/* CVC4 namespace */
128 
129 #endif /* __CVC4__STATISTICS_H */
A helper class for comparing two statistics.
Definition: statistics.h:41
iterator(const iterator &it)
Definition: statistics.h:70
Simple representation of S-expressions.
std::set< Stat *, StatCmp > StatSet
A type for a set of statistics.
Definition: statistics.h:46
This is CVC4 release version For build and installation please see the INSTALL file included with this distribution This first official release of CVC4 is the result of more than three years of efforts by researchers at New York University and The University of Iowa The project leaders are Clark please refer to the AUTHORS file in the source distribution CVC4 is a tool for determining the satisfiability of a first order formula modulo a first order CVC CVC3 but does not directly incorporate code from any previous version CVC4 is intended to be an open and extensible SMT engine It can be used as a stand alone tool or as a library It has been designed to increase the performance and reduce the memory overhead of its predecessors It is written entirely in C and is released under a free software see the INSTALL file that comes with this distribution We recommend that you visit our CVC4 tutorials online please write to the cvc users cs nyu edu mailing list *if you need to report a bug with CVC4
Definition: README:39
#define CVC4_PUBLIC
Definition: cvc4_public.h:30
Macros that should be defined everywhere during the building of the libraries and driver binary...
StatSet d_stats
The set of statistics in this object.
Definition: statistics.h:51
std::string d_prefix
Definition: statistics.h:48
iterator const_iterator
An iterator type over a set of statistics.
Definition: statistics.h:79
struct CVC4::options::out__option_t out
CVC4::Statistics Statistics
Definition: cvc3_compat.h:460
bool operator!=(const iterator &i) const
Definition: statistics.h:75
A simple S-expression.
Definition: sexpr.h:51
static std::string s_regDelim
Definition: statistics.h:38
virtual ~StatisticsBase()
Definition: statistics.h:59
bool operator==(const iterator &i) const
Definition: statistics.h:74