Skip to content

Commit 17d006b

Browse files
Add perform_symex for resuming from state
Copied from bmct. Going to be used by single_path_symex_checkert.
1 parent 7bbeadd commit 17d006b

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
@@ -336,3 +336,25 @@ void perform_symex(
336336

337337
postprocess_equation(symex, equation, options, ns, ui_message_handler);
338338
}
339+
340+
void perform_symex(
341+
abstract_goto_modelt &goto_model,
342+
symex_bmct &symex,
343+
path_storaget::patht &resume,
344+
symbol_tablet &symex_symbol_table,
345+
const optionst &options,
346+
const namespacet &ns,
347+
ui_message_handlert &ui_message_handler)
348+
{
349+
auto get_goto_function =
350+
[&goto_model](
351+
const irep_idt &id) -> const goto_functionst::goto_functiont & {
352+
return goto_model.get_goto_function(id);
353+
};
354+
355+
// perform symbolic execution
356+
symex.resume_symex_from_saved_state(
357+
get_goto_function, resume.state, &resume.equation, symex_symbol_table);
358+
359+
postprocess_equation(symex, resume.equation, options, ns, ui_message_handler);
360+
}

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)