From: ajreynol Date: Thu, 15 Jun 2017 17:47:43 +0000 (-0500) Subject: Fix for issue related to cbqi + E-matching. X-Git-Tag: cvc5-1.0.0~5772 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=209b08887bc55349880b9ed6d858e23637267dee;p=cvc5.git Fix for issue related to cbqi + E-matching. --- diff --git a/src/theory/quantifiers/inst_match.cpp b/src/theory/quantifiers/inst_match.cpp index 12e15d353..9a3fe379c 100644 --- a/src/theory/quantifiers/inst_match.cpp +++ b/src/theory/quantifiers/inst_match.cpp @@ -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; diff --git a/src/theory/quantifiers/inst_match_generator.cpp b/src/theory/quantifiers/inst_match_generator.cpp index 889fe667e..8d7b321c8 100644 --- a/src/theory/quantifiers/inst_match_generator.cpp +++ b/src/theory/quantifiers/inst_match_generator.cpp @@ -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++;