CandidateGeneratorQEAll::CandidateGeneratorQEAll( QuantifiersEngine* qe, Node mpat ) :
d_match_pattern( mpat ), d_qe( qe ){
-
+ d_match_pattern_type = mpat.getType();
+ Assert( mpat.getKind()==INST_CONSTANT );
+ d_f = quantifiers::TermDb::getInstConstAttr( mpat );
+ d_index = mpat.getAttribute(InstVarNumAttribute());
}
void CandidateGeneratorQEAll::resetInstantiationRound() {
Node CandidateGeneratorQEAll::getNextCandidate() {
while( !d_eq.isFinished() ){
Node n = (*d_eq);
+ if( options::instMaxLevel()!=-1 ){
+ n = d_qe->getEqualityQuery()->getInternalRepresentative( n, d_f, d_index );
+ }
++d_eq;
if( n.getType().isSubtypeOf( d_match_pattern.getType() ) ){
//an equivalence class with the same type as the pattern, return it
eq::EqClassesIterator d_eq;
//equality you are trying to match equalities for
Node d_match_pattern;
+ TypeNode d_match_pattern_type;
//einstantiator pointer
QuantifiersEngine* d_qe;
+ // quantifier/index for the variable we are matching
+ Node d_f;
+ unsigned d_index;
public:
CandidateGeneratorQEAll( QuantifiersEngine* qe, Node mpat );
~CandidateGeneratorQEAll(){}
Trace("sg-conjecture-debug") << ", ";\r
}\r
Trace("sg-conjecture-debug") << it->first << " : " << it->second.size() << "/" << d_pattern_fun_id[lhs][it->first];\r
- if( it->second.size()==1 ){\r
- Trace("sg-conjecture-debug") << " (" << it->second[0] << ")";\r
+ //if( it->second.size()==1 ){\r
+ // Trace("sg-conjecture-debug") << " (" << it->second[0] << ")";\r
+ //}\r
+ Trace("sg-conjecture-debug2") << " (";\r
+ for( unsigned j=0; j<it->second.size(); j++ ){\r
+ if( j>0 ){ Trace("sg-conjecture-debug2") << " "; }\r
+ Trace("sg-conjecture-debug2") << it->second[j];\r
}\r
+ Trace("sg-conjecture-debug2") << ")";\r
firstTime = false;\r
}\r
Trace("sg-conjecture-debug") << std::endl;\r
}
void QuantifiersEngine::setInstantiationLevelAttr( Node n, Node qn, uint64_t level ){
- Trace("inst-level-debug") << "IL : " << n << " " << qn << " " << level << std::endl;
+ Trace("inst-level-debug2") << "IL : " << n << " " << qn << " " << level << std::endl;
//if not from the vector of terms we instantiatied
if( qn.getKind()!=BOUND_VARIABLE && n!=qn ){
//if this is a new term, without an instantiation level