@@ -13,6 +13,7 @@ Author: Daniel Kroening, kroening@kroening.com
13
13
#include < util/string2int.h>
14
14
#include < util/i2string.h>
15
15
#include < util/source_location.h>
16
+ #include < util/string_utils.h>
16
17
#include < util/time_stopping.h>
17
18
#include < util/message.h>
18
19
#include < util/json.h>
@@ -381,8 +382,9 @@ void bmct::show_program()
381
382
{
382
383
std::string string_value;
383
384
languages.from_expr (step.ssa_lhs , string_value);
384
- std::cout << " (" << count << " ) SHARED_" << (step.is_shared_write ()?" WRITE" :" READ" ) << " ("
385
- << string_value <<" ) " << " \n " ;
385
+ std::cout << " (" << count << " ) SHARED_"
386
+ << (step.is_shared_write ()?" WRITE" :" READ" )
387
+ << " (" << string_value <<" )\n " ;
386
388
387
389
if (!step.guard .is_true ())
388
390
{
@@ -665,13 +667,11 @@ Function: bmct::setup_unwind
665
667
void bmct::setup_unwind ()
666
668
{
667
669
const std::string &set=options.get_option (" unwindset" );
668
- std::string::size_type length=set.length ();
670
+ std::vector<std::string> unwindset_loops;
671
+ split_string (set, ' ,' , unwindset_loops, true , true );
669
672
670
- for (std::string::size_type idx= 0 ; idx<length; idx++ )
673
+ for (auto & val : unwindset_loops )
671
674
{
672
- std::string::size_type next=set.find (" ," , idx);
673
- std::string val=set.substr (idx, next-idx);
674
-
675
675
unsigned thread_nr;
676
676
bool thread_nr_set=false ;
677
677
@@ -695,9 +695,6 @@ void bmct::setup_unwind()
695
695
else
696
696
symex.set_unwind_loop_limit (id, uw);
697
697
}
698
-
699
- if (next==std::string::npos) break ;
700
- idx=next;
701
698
}
702
699
703
700
if (options.get_option (" unwind" )!=" " )
0 commit comments