|
15 | 15 | #include <iostream>
|
16 | 16 |
|
17 | 17 | #include <util/exit_codes.h>
|
18 |
| -#include <util/string2int.h> |
19 |
| -#include <util/string_utils.h> |
20 | 18 |
|
21 | 19 | #include <langapi/language_util.h>
|
22 | 20 |
|
@@ -319,7 +317,7 @@ void bmct::setup()
|
319 | 317 |
|
320 | 318 | symex.last_source_location.make_nil();
|
321 | 319 |
|
322 |
| - setup_unwind(); |
| 320 | + parse_unwinding_options(options, symex); |
323 | 321 | }
|
324 | 322 |
|
325 | 323 | safety_checkert::resultt bmct::execute(
|
@@ -546,43 +544,6 @@ safety_checkert::resultt bmct::stop_on_fail(prop_convt &prop_conv)
|
546 | 544 | }
|
547 | 545 | }
|
548 | 546 |
|
549 |
| -void bmct::setup_unwind() |
550 |
| -{ |
551 |
| - const std::string &set=options.get_option("unwindset"); |
552 |
| - std::vector<std::string> unwindset_loops; |
553 |
| - split_string(set, ',', unwindset_loops, true, true); |
554 |
| - |
555 |
| - for(auto &val : unwindset_loops) |
556 |
| - { |
557 |
| - unsigned thread_nr=0; |
558 |
| - bool thread_nr_set=false; |
559 |
| - |
560 |
| - if(!val.empty() && |
561 |
| - isdigit(val[0]) && |
562 |
| - val.find(":")!=std::string::npos) |
563 |
| - { |
564 |
| - std::string nr=val.substr(0, val.find(":")); |
565 |
| - thread_nr=unsafe_string2unsigned(nr); |
566 |
| - thread_nr_set=true; |
567 |
| - val.erase(0, nr.size()+1); |
568 |
| - } |
569 |
| - |
570 |
| - if(val.rfind(":")!=std::string::npos) |
571 |
| - { |
572 |
| - std::string id=val.substr(0, val.rfind(":")); |
573 |
| - long uw=unsafe_string2int(val.substr(val.rfind(":")+1)); |
574 |
| - |
575 |
| - if(thread_nr_set) |
576 |
| - symex.set_unwind_thread_loop_limit(thread_nr, id, uw); |
577 |
| - else |
578 |
| - symex.set_unwind_loop_limit(id, uw); |
579 |
| - } |
580 |
| - } |
581 |
| - |
582 |
| - if(options.get_option("unwind")!="") |
583 |
| - symex.set_unwind_limit(options.get_unsigned_int_option("unwind")); |
584 |
| -} |
585 |
| - |
586 | 547 | /// Perform core BMC, using an abstract model to supply GOTO function bodies
|
587 | 548 | /// (perhaps created on demand).
|
588 | 549 | /// \param opts: command-line options affecting BMC
|
|
0 commit comments