diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-01-30 16:30:47 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 16:30:47 -0600 |
commit | a456ef81b15e2f8612cd41a31ad811af35f47846 (patch) | |
tree | e29a425f369db691a484609c400a555708a9c973 /src | |
parent | 8c4788b6356b46df5cede71bcf02c86f0aebe86c (diff) |
Fix rep set increment for empty domains (#3682)
Diffstat (limited to 'src')
-rw-r--r-- | src/theory/rep_set.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/theory/rep_set.cpp b/src/theory/rep_set.cpp index d293890bf..55cef5ea7 100644 --- a/src/theory/rep_set.cpp +++ b/src/theory/rep_set.cpp @@ -371,8 +371,8 @@ int RepSetIterator::incrementAtIndex(int i) } int RepSetIterator::do_reset_increment( int i, bool initial ) { - bool emptyDomain = false; for( unsigned ii=(i+1); ii<d_index.size(); ii++ ){ + bool emptyDomain = false; int ri_res = resetIndex( ii, initial ); if( ri_res==-1 ){ //failed @@ -383,16 +383,13 @@ int RepSetIterator::do_reset_increment( int i, bool initial ) { emptyDomain = true; } //force next iteration if currently an empty domain - if( emptyDomain ){ - d_index[ii] = domainSize(ii)-1; + if (emptyDomain) + { + Trace("rsi-debug") << "This is an empty domain, increment." << std::endl; + return increment(); } } - if( emptyDomain ){ - Trace("rsi-debug") << "This is an empty domain, increment." << std::endl; - return increment(); - }else{ - return i; - } + return i; } int RepSetIterator::increment(){ |