Term canonization was used in two places, which are unrelated and don't need to share the instance.
Also removes a few unnecessary methods from QuantifiersEngine.
}
AlphaEquivalence::AlphaEquivalence(QuantifiersEngine* qe)
- : d_aedb(qe->getTermCanonize())
+ : d_termCanon(), d_aedb(&d_termCanon)
{
}
Node reduceQuantifier( Node q );
private:
+ /** a term canonizer */
+ expr::TermCanonize d_termCanon;
/** the database of quantified formulas registered to this class */
AlphaEquivalenceDb d_aedb;
};
}
Node ConjectureGenerator::getFreeVar( TypeNode tn, unsigned i ) {
- return d_quantEngine->getTermCanonize()->getCanonicalFreeVar(tn, i);
+ return d_termCanon.getCanonicalFreeVar(tn, i);
}
bool ConjectureGenerator::isHandledTerm( TNode n ){
if( d_tge.isRelevantTerm( eq ) ){
//make it canonical
Trace("sg-proc-debug") << "get canonical " << eq << std::endl;
- eq = d_quantEngine->getTermCanonize()->getCanonicalTerm(eq);
+ eq = d_termCanon.getCanonicalTerm(eq);
}else{
eq = Node::null();
}
sum += it->second;
for( unsigned i=0; i<it->second; i++ ){
gsubs_vars.push_back(
- d_quantEngine->getTermCanonize()->getCanonicalFreeVar(
- it->first, i));
+ d_termCanon.getCanonicalFreeVar(it->first, i));
}
}
}
#include "context/cdhashmap.h"
#include "expr/node_trie.h"
+#include "expr/term_canonize.h"
#include "theory/quantifiers/quant_util.h"
#include "theory/type_enumerator.h"
unsigned optFullCheckConjectures();
bool optStatsOnly();
+ /** term canonizer */
+ expr::TermCanonize d_termCanon;
};
d_model(nullptr),
d_builder(nullptr),
d_term_util(new quantifiers::TermUtil),
- d_term_canon(new expr::TermCanonize),
d_term_db(new quantifiers::TermDb(qstate, qim, this)),
d_sygus_tdb(nullptr),
d_quant_attr(new quantifiers::QuantAttributes(this)),
/** get default valuation for the quantifiers engine */
Valuation& QuantifiersEngine::getValuation() { return d_qstate.getValuation(); }
-const LogicInfo& QuantifiersEngine::getLogicInfo() const
-{
- return d_te->getLogicInfo();
-}
-
EqualityQuery* QuantifiersEngine::getEqualityQuery() const
{
return d_eq_query.get();
{
return d_term_util.get();
}
-expr::TermCanonize* QuantifiersEngine::getTermCanonize() const
-{
- return d_term_canon.get();
-}
quantifiers::QuantAttributes* QuantifiersEngine::getQuantAttributes() const
{
return d_quant_attr.get();
Trace("quant-debug") << "...finish pre-register " << q << "..." << std::endl;
}
-void QuantifiersEngine::registerPattern( std::vector<Node> & pattern) {
- for(std::vector<Node>::iterator p = pattern.begin(); p != pattern.end(); ++p){
- std::set< Node > added;
- getTermDatabase()->addTerm( *p, added );
- }
-}
-
void QuantifiersEngine::assertQuantifier( Node f, bool pol ){
if (reduceQuantifier(f))
{
#include "context/cdhashset.h"
#include "context/cdlist.h"
#include "expr/attribute.h"
-#include "expr/term_canonize.h"
#include "theory/quantifiers/ematching/trigger_trie.h"
#include "theory/quantifiers/equality_query.h"
#include "theory/quantifiers/first_order_model.h"
OutputChannel& getOutputChannel();
/** get default valuation for the quantifiers engine */
Valuation& getValuation();
- /** get the logic info for the quantifiers engine */
- const LogicInfo& getLogicInfo() const;
//---------------------- end external interface
//---------------------- utilities
/** get the master equality engine */
quantifiers::TermDbSygus* getTermDatabaseSygus() const;
/** get term utilities */
quantifiers::TermUtil* getTermUtil() const;
- /** get term canonizer */
- expr::TermCanonize* getTermCanonize() const;
/** get quantifiers attributes */
quantifiers::QuantAttributes* getQuantAttributes() const;
/** get instantiate utility */
* that are pre-registered to the quantifiers theory.
*/
void preRegisterQuantifier(Node q);
- /** register quantifier */
- void registerPattern( std::vector<Node> & pattern);
/** assert universal quantifier */
void assertQuantifier( Node q, bool pol );
private:
std::unique_ptr<quantifiers::QModelBuilder> d_builder;
/** term utilities */
std::unique_ptr<quantifiers::TermUtil> d_term_util;
- /** term utilities */
- std::unique_ptr<expr::TermCanonize> d_term_canon;
/** term database */
std::unique_ptr<quantifiers::TermDb> d_term_db;
/** sygus term database */