Skip to content

Commit 5b49246

Browse files
author
svorenova
committed
Finish path exploration early if possible
If no command line options have been specified that require exhaustive path exploration, finish path symex as soon as there are no properties left to check.
1 parent 2c63234 commit 5b49246

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
279279

280280
// generate unwinding assertions
281281
if(cmdline.isset("unwinding-assertions"))
282+
{
282283
options.set_option("unwinding-assertions", true);
284+
options.set_option("paths-symex-explore-all", true);
285+
}
283286

284287
if(cmdline.isset("partial-loops"))
285288
options.set_option("partial-loops", true);
@@ -416,9 +419,12 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
416419
}
417420

418421
if(cmdline.isset("symex-coverage-report"))
422+
{
419423
options.set_option(
420424
"symex-coverage-report",
421425
cmdline.get_value("symex-coverage-report"));
426+
options.set_option("paths-symex-explore-all", true);
427+
}
422428

423429
if(cmdline.isset("validate-ssa-equation"))
424430
{

src/goto-checker/single_path_symex_checker.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ operator()(propertiest &properties)
7070
goto_symext::get_goto_function(goto_model), symex_symbol_table);
7171
}
7272

73-
while(!worklist->empty())
73+
while(!worklist->empty() &&
74+
(options.get_bool_option("paths-symex-explore-all") ||
75+
has_properties_to_check(properties)))
7476
{
7577
path_storaget::patht &resume = worklist->peek();
7678
symex_bmct symex(

src/goto-checker/single_path_symex_only_checker.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ operator()(propertiest &properties)
5353
goto_symext::get_goto_function(goto_model), symex_symbol_table);
5454
}
5555

56-
while(!worklist->empty())
56+
while(!worklist->empty() &&
57+
(options.get_bool_option("paths-symex-explore-all") ||
58+
has_properties_to_check(properties)))
5759
{
5860
path_storaget::patht &resume = worklist->peek();
5961
symex_bmct symex(

0 commit comments

Comments
 (0)