Fix for issue related to cbqi + E-matching.
authorajreynol <andrew.j.reynolds@gmail.com>
Thu, 15 Jun 2017 17:47:43 +0000 (12:47 -0500)
committerajreynol <andrew.j.reynolds@gmail.com>
Thu, 15 Jun 2017 17:47:43 +0000 (12:47 -0500)
src/theory/quantifiers/inst_match.cpp
src/theory/quantifiers/inst_match_generator.cpp

index 12e15d3539ad5e0abd94402f19fc5204812466c4..9a3fe379c66ce71dbb3edbdca07d063e0da966d7 100644 (file)
@@ -129,6 +129,7 @@ void InstMatch::setValue( int i, TNode n ) {
 }
 
 bool InstMatch::set( QuantifiersEngine* qe, int i, TNode n ) {
+  Assert( i>=0 );
   if( !d_vals[i].isNull() ){
     if( qe->getEqualityQuery()->areEqual( d_vals[i], n ) ){
       return true;
index 889fe667e4db0bc2610260867f113310e33d9a4c..8d7b321c867040d3daa77e08420eb9a6e0cf17ab 100644 (file)
@@ -955,8 +955,10 @@ void InstMatchGeneratorSimple::addInstantiations( InstMatch& m, QuantifiersEngin
     Debug("simple-trigger") << "Actual term is " << t << std::endl;
     //convert to actual used terms
     for( std::map< int, int >::iterator it = d_var_num.begin(); it != d_var_num.end(); ++it ){
-      Debug("simple-trigger") << "...set " << it->second << " " << t[it->first] << std::endl;
-      m.setValue( it->second, t[it->first] );
+      if( it->second>=0 ){
+        Debug("simple-trigger") << "...set " << it->second << " " << t[it->first] << std::endl;
+        m.setValue( it->second, t[it->first] );
+      }
     }
     if( qe->addInstantiation( d_f, m ) ){
       addedLemmas++;