Expr n = MK_CONST( AntlrInput::tokenToInteger($INTEGER_LITERAL) );
std::vector<Expr> values;
values.push_back( n );
- std::string attr_name("inst-level");
+ std::string attr_name("quant-inst-max-level");
Command* c = new SetUserAttributeCommand( attr_name, expr, values );
c->setMuted(true);
PARSER_STATE->preemptCommand(c);
ATTRIBUTE_PATTERN_TOK : ':pattern';
ATTRIBUTE_NO_PATTERN_TOK : ':no-pattern';
ATTRIBUTE_NAMED_TOK : ':named';
-ATTRIBUTE_INST_LEVEL : ':inst-level';
+ATTRIBUTE_INST_LEVEL : ':quant-inst-max-level';
ATTRIBUTE_RR_PRIORITY : ':rr-priority';
// operators (NOTE: theory symbols go here)
Trace("quant-attr") << "Set conjecture " << n << std::endl;
ConjectureAttribute ca;
n.setAttribute( ca, true );
- }else if( attr=="inst-level" ){
+ }else if( attr=="quant-inst-max-level" ){
Assert( node_values.size()==1 );
uint64_t lvl = node_values[0].getConst<Rational>().getNumerator().getLong();
Trace("quant-attr") << "Set instantiation level " << n << " to " << lvl << std::endl;
ret = NodeManager::currentNM()->mkNode( OR, nret, n_str_ind );
}
Trace("quantifiers-sk") << "mkSkolem body for " << f << " returns : " << ret << std::endl;
+ //if it has an instantiation level, set the skolemized body to that level
+ if( f.hasAttribute(InstLevelAttribute()) ){
+ theory::QuantifiersEngine::setInstantiationLevelAttr( ret, f.getAttribute(InstLevelAttribute()) );
+ }
return ret;
}
}
void QuantifiersEngine::setInstantiationLevelAttr( Node n, uint64_t level ){
- InstLevelAttribute ila;
- n.setAttribute(ila,level);
+ if( !n.hasAttribute(InstLevelAttribute()) ){
+ InstLevelAttribute ila;
+ n.setAttribute(ila,level);
+ Trace("inst-level-debug") << "Set instantiation level " << n << " to " << level << std::endl;
+ }
for( int i=0; i<(int)n.getNumChildren(); i++ ){
setInstantiationLevelAttr( n[i], level );
}