Fix condition in upwards closure check for sets
authorAndres Noetzli <noetzli@stanford.edu>
Mon, 15 May 2017 15:50:21 +0000 (08:50 -0700)
committerAndres Noetzli <noetzli@stanford.edu>
Mon, 15 May 2017 15:50:21 +0000 (08:50 -0700)
Coverity reported this mismatched iterator.

src/theory/sets/theory_sets_private.cpp

index 0338eb1b3c00b1d50e167426a57bf47f7b472c05..a0748f2b9965c6f09886881b6748cd8aa6cf4182 100644 (file)
@@ -856,7 +856,7 @@ void TheorySetsPrivate::checkUpwardsClosure( std::vector< Node >& lemmas ) {
                     valid = true;
                   }else{
                     // if not, check whether it is definitely not a member, if unknown, split
-                    bool not_in_r2 = itm2n!=d_pol_mems[1].end() && itm2n->second.find( xr )!=itm2->second.end();
+                    bool not_in_r2 = itm2n!=d_pol_mems[1].end() && itm2n->second.find( xr )!=itm2n->second.end();
                     if( !not_in_r2 ){
                       exp.push_back( NodeManager::currentNM()->mkNode( kind::MEMBER, x, it2->second[1] ) );
                       valid = true;