From 209b08887bc55349880b9ed6d858e23637267dee Mon Sep 17 00:00:00 2001 From: ajreynol Date: Thu, 15 Jun 2017 12:47:43 -0500 Subject: [PATCH] Fix for issue related to cbqi + E-matching. --- src/theory/quantifiers/inst_match.cpp | 1 + src/theory/quantifiers/inst_match_generator.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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++; -- 2.30.2