diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2014-10-07 15:34:56 +0200 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2014-10-07 15:34:56 +0200 |
commit | 33d0894b7707e3f590404cc51963af7740e7412a (patch) | |
tree | d3861424cc124d6b8919ee99eccf120787986a2c /src/theory/quantifiers/quantifiers_attributes.cpp | |
parent | c83882c37a5568f887badb22bd24397f7d545b9d (diff) |
Refactor quantifiers attributes.
Diffstat (limited to 'src/theory/quantifiers/quantifiers_attributes.cpp')
-rw-r--r-- | src/theory/quantifiers/quantifiers_attributes.cpp | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/src/theory/quantifiers/quantifiers_attributes.cpp b/src/theory/quantifiers/quantifiers_attributes.cpp index 8d479c29e..f58e89c38 100644 --- a/src/theory/quantifiers/quantifiers_attributes.cpp +++ b/src/theory/quantifiers/quantifiers_attributes.cpp @@ -25,31 +25,25 @@ using namespace CVC4::theory::quantifiers; void QuantifiersAttributes::setUserAttribute( const std::string& attr, Node n, std::vector<Node> node_values, std::string str_value ){ Trace("quant-attr-debug") << "Set " << attr << " " << n << std::endl; - if( n.getKind()==FORALL ){ - if( attr=="axiom" ){ - Trace("quant-attr") << "Set axiom " << n << std::endl; - AxiomAttribute aa; - n.setAttribute( aa, true ); - }else if( attr=="conjecture" ){ - Trace("quant-attr") << "Set conjecture " << n << std::endl; - ConjectureAttribute ca; - n.setAttribute( ca, true ); - }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; - QuantInstLevelAttribute qila; - n.setAttribute( qila, lvl ); - }else if( attr=="rr-priority" ){ - Assert( node_values.size()==1 ); - uint64_t lvl = node_values[0].getConst<Rational>().getNumerator().getLong(); - Trace("quant-attr") << "Set rewrite rule priority " << n << " to " << lvl << std::endl; - RrPriorityAttribute rrpa; - n.setAttribute( rrpa, lvl ); - } - }else{ - for( size_t i=0; i<n.getNumChildren(); i++ ){ - setUserAttribute( attr, n[i], node_values, str_value ); - } + if( attr=="axiom" ){ + Trace("quant-attr-debug") << "Set axiom " << n << std::endl; + AxiomAttribute aa; + n.setAttribute( aa, true ); + }else if( attr=="conjecture" ){ + Trace("quant-attr-debug") << "Set conjecture " << n << std::endl; + ConjectureAttribute ca; + n.setAttribute( ca, true ); + }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-debug") << "Set instantiation level " << n << " to " << lvl << std::endl; + QuantInstLevelAttribute qila; + n.setAttribute( qila, lvl ); + }else if( attr=="rr-priority" ){ + Assert( node_values.size()==1 ); + uint64_t lvl = node_values[0].getConst<Rational>().getNumerator().getLong(); + Trace("quant-attr-debug") << "Set rewrite rule priority " << n << " to " << lvl << std::endl; + RrPriorityAttribute rrpa; + n.setAttribute( rrpa, lvl ); } } |