********************************************************************/
// -*- c++ -*-
-#include "ASTUtil.h"
+#include "UsefulDefs.h"
#include "../main/Globals.h"
namespace BEEV
{
if (!strcmp(functionname, "print_func_stats"))
{
cout << endl;
- for (function_counters::iterator it = s.begin(), itend = s.end(); it != itend; it++)
- cout << "Number of times the function: " << it->first << ": is called: " << it->second << endl;
+ for (function_counters::iterator
+ it = s.begin(), itend = s.end();
+ it != itend; it++)
+ cout << "Number of times the function: "
+ << it->first
+ << ": is called: "
+ << it->second << endl;
return;
}
s[functionname] += 1;
+++ /dev/null
-/********************************************************************
- * AUTHORS: Vijay Ganesh
- *
- * BEGIN DATE: November, 2005
- *
- * LICENSE: Please view LICENSE file in the home dir of this Program
- ********************************************************************/
-// -*- c++ -*-
-
-#ifndef ASTUTIL_H
-#define ASTUTIL_H
-
-#include <iostream>
-#include <vector>
-#include <cstring>
-
-#ifdef EXT_HASH_MAP
- #include <ext/hash_set>
- #include <ext/hash_map>
-#elif defined(TR1_UNORDERED_MAP)
- #include <tr1/unordered_map>
- #include <tr1/unordered_set>
-#else
- #include <hash_set>
- #include <hash_map>
-#endif
-
-#define HASHMAP hash_map
-#define HASHSET hash_set
-#define HASHMULTISET hash_multiset
-
-using namespace std;
-namespace BEEV {
-#ifdef EXT_HASH_MAP
- using namespace __gnu_cxx;
-#endif
-
- extern void (*vc_error_hdlr)(const char* err_msg);
- /*Spacer class is basically just an int, but the new class allows
- overloading of << with a special definition that prints the int as
- that many spaces. */
- class Spacer {
- public:
- int _spaces;
- Spacer(int spaces) { _spaces = spaces; }
- friend ostream& operator<<(ostream& os, const Spacer &ind);
- };
-
- inline Spacer spaces(int width) {
- Spacer sp(width);
- return sp;
- }
-
- struct eqstr {
- bool operator()(const char* s1, const char* s2) const {
- return strcmp(s1, s2) == 0;
- }
- };
-
- // Table for storing function count stats.
-#ifdef TR1_UNORDERED_MAP
- typedef tr1::unordered_map<
- const char*,
- int,
- tr1::hash<const char *>,
- eqstr> function_counters;
-#else
- typedef HASHMAP<
- const char*,
- int,
- hash<char *>,
- eqstr> function_counters;
-#endif
-
- void CountersAndStats(const char * functionname);
-}; // end namespace.
-#endif
#include <algorithm>
#include <assert.h>
-#define INITIAL_TABLE_SIZE 100
+#include "../main/Globals.h"
+#include "ASTKind.h"
+#include "../extlib-constbv/constantbv.h"
+#include "RunTimes.h"
#ifdef EXT_HASH_MAP
#include <ext/hash_set>
#include <hash_map>
#endif
-#include "../main/Globals.h"
-#include "ASTUtil.h"
-#include "ASTKind.h"
-#include "../extlib-constbv/constantbv.h"
-#include "RunTimes.h"
-
#define HASHMAP hash_map
#define HASHSET hash_set
#define HASHMULTISET hash_multiset
+#define INITIAL_TABLE_SIZE 100
namespace BEEV {
-
using namespace std;
using namespace MINISAT;
#ifdef EXT_HASH_MAP
typedef vector<ASTNode> ASTVec;
typedef unsigned int * CBV;
extern ASTVec _empty_ASTVec;
+
+ // Error handling function
+ extern void (*vc_error_hdlr)(const char* err_msg);
+
+ /******************************************************************
+ * Class Spacer:
+ *
+ * Spacer class is basically just an int, but the new class allows
+ * overloading of << with a special definition that prints the int
+ * as that many spaces.
+ ******************************************************************/
+ class Spacer {
+ public:
+ int _spaces;
+ Spacer(int spaces)
+ {
+ _spaces = spaces;
+ }
+ friend ostream& operator<<(ostream& os, const Spacer &ind);
+ }; //End of class spacer
+
+ inline Spacer spaces(int width) {
+ Spacer sp(width);
+ return sp;
+ }
+
+ struct eqstr {
+ bool operator()(const char* s1, const char* s2) const {
+ return strcmp(s1, s2) == 0;
+ }
+ };
+
+ // function_counters: Table for storing function count stats.
+#ifdef TR1_UNORDERED_MAP
+ typedef tr1::unordered_map<
+ const char*,
+ int,
+ tr1::hash<const char *>,
+ eqstr> function_counters;
+#else
+ typedef HASHMAP<const char*,
+ int,
+ hash<char *>,
+ eqstr> function_counters;
+#endif
+
+ // Function that computes various kinds of statistics for the phases
+ // of STP
+ void CountersAndStats(const char * functionname);
}; //end of namespace
#endif