}
}
-bool TermDb::isTermEligibleForInstantiation( TNode n, TNode f, bool print ) {
+bool TermDb::isTermEligibleForInstantiation(TNode n, TNode f)
+{
if( options::lteRestrictInstClosure() ){
//has to be both in inst closure and in ground assertions
if( !isInstClosure( n ) ){
}
}
}
- return true;
+ // it cannot have instantiation constants, which originate from
+ // counterexample-guided instantiation strategies.
+ return !TermUtil::hasInstConstAttr(n);
}
Node TermDb::getEligibleTermInEqc( TNode r ) {
Node h;
eq::EqualityEngine* ee = d_quantEngine->getActiveEqualityEngine();
eq::EqClassIterator eqc_i = eq::EqClassIterator( r, ee );
- while( h.isNull() && !eqc_i.isFinished() ){
+ while (!eqc_i.isFinished())
+ {
TNode n = (*eqc_i);
++eqc_i;
- if( hasTermCurrent( n ) ){
+ if (isTermEligibleForInstantiation(n, TNode::null()))
+ {
h = n;
+ break;
}
}
d_term_elig_eqc[r] = h;