summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/ematching/trigger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory/quantifiers/ematching/trigger.cpp')
-rw-r--r--src/theory/quantifiers/ematching/trigger.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/theory/quantifiers/ematching/trigger.cpp b/src/theory/quantifiers/ematching/trigger.cpp
index 3615ef6f4..b50deea11 100644
--- a/src/theory/quantifiers/ematching/trigger.cpp
+++ b/src/theory/quantifiers/ematching/trigger.cpp
@@ -838,6 +838,7 @@ Node Trigger::getInversion( Node n, Node x ) {
return x;
}else if( n.getKind()==PLUS || n.getKind()==MULT ){
int cindex = -1;
+ bool cindexSet = false;
for( unsigned i=0; i<n.getNumChildren(); i++ ){
if( !quantifiers::TermUtil::hasInstConstAttr(n[i]) ){
if( n.getKind()==PLUS ){
@@ -859,12 +860,15 @@ Node Trigger::getInversion( Node n, Node x ) {
}
x = Rewriter::rewrite( x );
}else{
- Assert( cindex==-1 );
+ Assert(!cindexSet);
cindex = i;
+ cindexSet = true;
}
}
- Assert( cindex!=-1 );
- return getInversion( n[cindex], x );
+ if (cindexSet)
+ {
+ return getInversion(n[cindex], x);
+ }
}
return Node::null();
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback