}else{
int score = -1;
if( options::quantDynamicSplit()==quantifiers::QUANT_DSPLIT_MODE_AGG ){
- score = dt.isInterpretedFinite() ? 1 : -1;
+ score = dt.isInterpretedFinite() ? 1 : 0;
}else if( options::quantDynamicSplit()==quantifiers::QUANT_DSPLIT_MODE_DEFAULT ){
score = dt.isInterpretedFinite() ? 1 : -1;
}
int vindex = hasPol ? ( pol ? 1 : -1 ) : 0;
if( visited[vindex].find( n )==visited[vindex].end() ){
visited[vindex][n] = true;
+ Trace("quant-epr-debug") << "QuantEPR::registerNode " << n << std::endl;
if( n.getKind()==FORALL ){
if( beneathQuant || !hasPol || !pol ){
for( unsigned i=0; i<n[0].getNumChildren(); i++ ){
- d_non_epr[n[0][i].getType()] = true;
+ TypeNode tn = n[0][i].getType();
+ if( d_non_epr.find( tn )==d_non_epr.end() ){
+ Trace("quant-epr") << "Sort " << tn << " is non-EPR because of nested quantification." << std::endl;
+ d_non_epr[tn] = true;
+ }
}
}else{
beneathQuant = true;
}
}else if( std::find( d_consts[tn].begin(), d_consts[tn].end(), n )==d_consts[tn].end() ){
d_consts[tn].push_back( n );
+ Trace("quant-epr") << "...constant of type " << tn << " : " << n << std::endl;
}
}
}
}
void QuantEPR::finishInit() {
+ Trace("quant-epr-debug") << "QuantEPR::finishInit" << std::endl;
for( std::map< TypeNode, std::vector< Node > >::iterator it = d_consts.begin(); it != d_consts.end(); ++it ){
+ Trace("quant-epr-debug") << "process " << it->first << std::endl;
if( d_non_epr.find( it->first )!=d_non_epr.end() ){
+ Trace("quant-epr-debug") << "...non-epr" << std::endl;
it->second.clear();
}else{
+ Trace("quant-epr-debug") << "...epr, #consts = " << it->second.size() << std::endl;
if( it->second.empty() ){
it->second.push_back( NodeManager::currentNM()->mkSkolem( "e", it->first, "EPR base constant" ) );
}
}
void QuantifiersEngine::ppNotifyAssertions( std::vector< Node >& assertions ) {
- Trace("quant-engine-proc") << "ppNotifyAssertions in QE" << std::endl;
+ Trace("quant-engine-proc") << "ppNotifyAssertions in QE, #assertions = " << assertions.size() << " check epr = " << (d_qepr!=NULL) << std::endl;
if( ( options::instLevelInputOnly() && options::instMaxLevel()!=-1 ) || d_qepr!=NULL ){
for( unsigned i=0; i<assertions.size(); i++ ) {
if( options::instLevelInputOnly() && options::instMaxLevel()!=-1 ){
qepr->d_consts[tn].push_back( e );
}
}
+ //EPR must include nil ref
+ if( qepr && qepr->isEPR( tn ) ){
+ Node nr = getNilRef( tn );
+ if( !qepr->isEPRConstant( tn, nr ) ){
+ qepr->d_consts[tn].push_back( nr );
+ }
+ }
}
}
}