diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-04-09 21:18:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-09 21:18:19 -0500 |
commit | f2f1e2312d0dd98e89fef63d6595234e27ba5b3a (patch) | |
tree | 716519d197bc073c17309420ce6da1b2a7d8d9d1 /src/theory/quantifiers/quantifiers_rewriter.cpp | |
parent | 80792d1026600d162f293839615fecdf19665e17 (diff) |
Fix hasSubterm calls for higher-order (#1760)
Diffstat (limited to 'src/theory/quantifiers/quantifiers_rewriter.cpp')
-rw-r--r-- | src/theory/quantifiers/quantifiers_rewriter.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/theory/quantifiers/quantifiers_rewriter.cpp b/src/theory/quantifiers/quantifiers_rewriter.cpp index a8089d229..bb92cbaf7 100644 --- a/src/theory/quantifiers/quantifiers_rewriter.cpp +++ b/src/theory/quantifiers/quantifiers_rewriter.cpp @@ -776,7 +776,8 @@ bool QuantifiersRewriter::isConditionalVariableElim( Node n, int pol ){ }else if( n.getKind()==EQUAL ){ for( unsigned i=0; i<2; i++ ){ if( n[i].getKind()==BOUND_VARIABLE ){ - if( !TermUtil::containsTerm( n[1-i], n[i] ) ){ + if (!n[1 - i].hasSubterm(n[i])) + { return true; } } @@ -874,11 +875,7 @@ Node QuantifiersRewriter::computeCondSplit( Node body, QAttributes& qa ){ } bool QuantifiersRewriter::isVariableElim( Node v, Node s ) { - if( TermUtil::containsTerm( s, v ) || !s.getType().isSubtypeOf( v.getType() ) ){ - return false; - }else{ - return true; - } + return !s.hasSubterm(v) && s.getType().isSubtypeOf(v.getType()); } void QuantifiersRewriter::isVariableBoundElig( Node n, std::map< Node, int >& exclude, std::map< Node, std::map< int, bool > >& visited, bool hasPol, bool pol, |