}
}
+CDInstMatchTrie::~CDInstMatchTrie() {
+ for(std::map< Node, CDInstMatchTrie* >::iterator i = d_data.begin(),
+ iend = d_data.end(); i != iend; ++i) {
+ CDInstMatchTrie* current = (*i).second;
+ delete current;
+ }
+ d_data.clear();
+}
+
bool CDInstMatchTrie::addInstMatch( QuantifiersEngine* qe, Node f, std::vector< Node >& m,
context::Context* c, bool modEq, bool modInst, int index, bool onlyExist ){
if( !onlyExist ){
// std::map< Node, CDInstMatchTrie* >::iterator it = d_data.find( n );
CDInstMatchTrie* imt = new CDInstMatchTrie( c );
+ Assert(d_data.find(n) == d_data.end());
d_data[n] = imt;
imt->addInstMatch( qe, f, m, c, modEq, modInst, index+1, false );
}
public:
std::vector< int > d_order;
};/* class InstMatchTrie ImtIndexOrder */
-public:
+
/** the data */
std::map< Node, InstMatchTrie > d_data;
private:
/** trie for InstMatch objects */
class CDInstMatchTrie {
-public:
+private:
/** the data */
std::map< Node, CDInstMatchTrie* > d_data;
/** is valid */
context::CDO< bool > d_valid;
-private:
+
void print( std::ostream& out, Node q, std::vector< TNode >& terms ) const;
void getInstantiations( std::vector< Node >& insts, Node q, std::vector< Node >& terms, QuantifiersEngine * qe ) const;
public:
CDInstMatchTrie( context::Context* c ) : d_valid( c, false ){}
- ~CDInstMatchTrie(){}
-public:
+ ~CDInstMatchTrie();
+
/** return true if m exists in this trie
modEq is if we check modulo equality
modInst is if we return true if m is an instance of a match that exists