#include "util/bitvector.h"
using namespace std;
-using namespace CVC4;
using namespace CVC4::kind;
using namespace CVC4::context;
-using namespace CVC4::theory;
-using namespace CVC4::theory::quantifiers;
-
using namespace CVC4::theory::inst;
+namespace CVC4 {
+namespace theory {
+namespace quantifiers {
+
TNode TermArgTrie::existsTerm( std::vector< TNode >& reps, int argIndex ) {
if( argIndex==(int)reps.size() ){
if( d_data.empty() ){
}
}
-TermDb::TermDb( context::Context* c, context::UserContext* u, QuantifiersEngine* qe ) : d_quantEngine( qe ), d_inactive_map( c ), d_op_id_count( 0 ), d_typ_id_count( 0 ) {
- d_true = NodeManager::currentNM()->mkConst( true );
- d_false = NodeManager::currentNM()->mkConst( false );
- d_zero = NodeManager::currentNM()->mkConst( Rational( 0 ) );
- d_one = NodeManager::currentNM()->mkConst( Rational( 1 ) );
- if( options::ceGuidedInst() ){
- d_sygus_tdb = new TermDbSygus( c, qe );
- }else{
- d_sygus_tdb = NULL;
+TermDb::TermDb(context::Context* c, context::UserContext* u,
+ QuantifiersEngine* qe)
+ : d_quantEngine(qe),
+ d_inactive_map(c),
+ d_op_id_count(0),
+ d_typ_id_count(0),
+ d_sygus_tdb(NULL) {
+ d_true = NodeManager::currentNM()->mkConst(true);
+ d_false = NodeManager::currentNM()->mkConst(false);
+ d_zero = NodeManager::currentNM()->mkConst(Rational(0));
+ d_one = NodeManager::currentNM()->mkConst(Rational(1));
+ if (options::ceGuidedInst()) {
+ d_sygus_tdb = new TermDbSygus(c, qe);
+ }
+}
+TermDb::~TermDb(){
+ if(d_sygus_tdb) {
+ delete d_sygus_tdb;
}
}
}
}
+}/* CVC4::theory::quantifiers namespace */
+}/* CVC4::theory namespace */
+}/* CVC4 namespace */
std::map< Node, std::map< TypeNode, Node > > d_par_op_map;
/** whether master equality engine is UF-inconsistent */
bool d_consistent_ee;
-public:
- TermDb( context::Context* c, context::UserContext* u, QuantifiersEngine* qe );
- ~TermDb(){}
+
+ public:
+ TermDb(context::Context* c, context::UserContext* u, QuantifiersEngine* qe);
+ ~TermDb();
/** boolean terms */
Node d_true;
Node d_false;
/** constants */
Node d_zero;
Node d_one;
-public:
+
+ public:
/** presolve (called once per user check-sat) */
void presolve();
/** reset (calculate which terms are active) */
bool reset( Theory::Effort effort );
/** identify */
std::string identify() const { return "TermDb"; }
-private:
+ private:
/** map from operators to ground terms for that operator */
std::map< Node, std::vector< Node > > d_op_map;
/** map from type nodes to terms of that type */