summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/term_util.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2017-11-25 14:12:00 -0600
committerGitHub <noreply@github.com>2017-11-25 14:12:00 -0600
commitf3270fb3629cbc62012ae7eb30843a1bc6d4e3c2 (patch)
tree1b0ee90651913c1f59513ecf8c3703f20c3d2827 /src/theory/quantifiers/term_util.cpp
parent3ab0db55341e7e752411bb003fb203fcd9ec9120 (diff)
Fixes for higher-order (#1405)
Diffstat (limited to 'src/theory/quantifiers/term_util.cpp')
-rw-r--r--src/theory/quantifiers/term_util.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/theory/quantifiers/term_util.cpp b/src/theory/quantifiers/term_util.cpp
index 4e75f7df8..def9a68bc 100644
--- a/src/theory/quantifiers/term_util.cpp
+++ b/src/theory/quantifiers/term_util.cpp
@@ -113,10 +113,19 @@ Node TermUtil::getRemoveQuantifiers2( Node n, std::map< Node, Node >& visited )
Node TermUtil::getInstConstAttr( Node n ) {
if (!n.hasAttribute(InstConstantAttribute()) ){
Node q;
- for( unsigned i=0; i<n.getNumChildren(); i++ ){
- q = getInstConstAttr(n[i]);
- if( !q.isNull() ){
- break;
+ if (n.hasOperator())
+ {
+ q = getInstConstAttr(n.getOperator());
+ }
+ if (q.isNull())
+ {
+ for (const Node& nc : n)
+ {
+ q = getInstConstAttr(nc);
+ if (!q.isNull())
+ {
+ break;
+ }
}
}
InstConstantAttribute ica;
@@ -277,6 +286,10 @@ void TermUtil::computeVarContains2( Node n, Kind k, std::vector< Node >& varCont
varContains.push_back( n );
}
}else{
+ if (n.hasOperator())
+ {
+ computeVarContains2(n.getOperator(), k, varContains, visited);
+ }
for( unsigned i=0; i<n.getNumChildren(); i++ ){
computeVarContains2( n[i], k, varContains, visited );
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback