diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2014-08-29 16:06:50 +0200 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2014-08-29 16:06:50 +0200 |
commit | e9fb730333b2719cddaa0a9209aa7953d7f30b0b (patch) | |
tree | da178be240ac8121635bed7cdfde8c58449e65a5 /src/theory | |
parent | 4397bf2a96fabe124ebd18e9ae9957689852afb3 (diff) |
Set instantiation level on skolemized bodies of quantifiers. Rename inst-level attribute to quant-inst-max-level
Diffstat (limited to 'src/theory')
-rw-r--r-- | src/theory/quantifiers/quantifiers_attributes.cpp | 2 | ||||
-rw-r--r-- | src/theory/quantifiers/term_database.cpp | 4 | ||||
-rw-r--r-- | src/theory/quantifiers_engine.cpp | 7 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/theory/quantifiers/quantifiers_attributes.cpp b/src/theory/quantifiers/quantifiers_attributes.cpp index b41987923..8d479c29e 100644 --- a/src/theory/quantifiers/quantifiers_attributes.cpp +++ b/src/theory/quantifiers/quantifiers_attributes.cpp @@ -34,7 +34,7 @@ void QuantifiersAttributes::setUserAttribute( const std::string& attr, Node n, s 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; diff --git a/src/theory/quantifiers/term_database.cpp b/src/theory/quantifiers/term_database.cpp index 5cc79b9b6..cf68c198e 100644 --- a/src/theory/quantifiers/term_database.cpp +++ b/src/theory/quantifiers/term_database.cpp @@ -685,6 +685,10 @@ Node TermDb::mkSkolemizedBody( Node f, Node n, std::vector< TypeNode >& argTypes 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; } diff --git a/src/theory/quantifiers_engine.cpp b/src/theory/quantifiers_engine.cpp index d6bd8e574..a00592e8b 100644 --- a/src/theory/quantifiers_engine.cpp +++ b/src/theory/quantifiers_engine.cpp @@ -446,8 +446,11 @@ void QuantifiersEngine::setInstantiationLevelAttr( Node n, Node qn, uint64_t lev } 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 ); } |