Skip to content

Commit 593adac

Browse files
Add perform_symex for resuming from state
1 parent 7f2aaf9 commit 593adac

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

src/goto-checker/bmc_util.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,3 +343,25 @@ void perform_symex(
343343

344344
postprocess_equation(symex, equation, options, ns, ui_message_handler);
345345
}
346+
347+
void perform_symex(
348+
abstract_goto_modelt &goto_model,
349+
symex_bmct &symex,
350+
path_storaget::patht &resume,
351+
symbol_tablet &symex_symbol_table,
352+
const optionst &options,
353+
const namespacet &ns,
354+
ui_message_handlert &ui_message_handler)
355+
{
356+
auto get_goto_function = [&goto_model](const irep_idt &id) ->
357+
const goto_functionst::goto_functiont &
358+
{
359+
return goto_model.get_goto_function(id);
360+
};
361+
362+
// perform symbolic execution
363+
symex.resume_symex_from_saved_state(
364+
get_goto_function, resume.state, &resume.equation, symex_symbol_table);
365+
366+
postprocess_equation(symex, resume.equation, options, ns, ui_message_handler);
367+
}

src/goto-checker/bmc_util.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Author: Daniel Kroening, Peter Schrammel
1515
#include <memory>
1616

1717
#include <goto-programs/safety_checker.h>
18+
#include <goto-symex/path_storage.h>
1819

1920
#include "properties.h"
2021

@@ -79,6 +80,16 @@ void perform_symex(
7980
const namespacet &,
8081
ui_message_handlert &);
8182

83+
/// Perform symbolic execution starting from \p resume.
84+
void perform_symex(
85+
abstract_goto_modelt &,
86+
symex_bmct &,
87+
path_storaget::patht &resume,
88+
symbol_tablet &,
89+
const optionst &,
90+
const namespacet &,
91+
ui_message_handlert &);
92+
8293
void output_coverage_report(
8394
const std::string &cov_out,
8495
const abstract_goto_modelt &goto_model,

0 commit comments

Comments
 (0)