Skip to content

Commit cb93427

Browse files
Preprocess shadow memory field declarations
Gathers the __CPROVER_field_decl* calls from the goto model. In the next step we'll pass them to goto_symex.
1 parent 8a43210 commit cb93427

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/goto-checker/multi_path_symex_only_checker.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Author: Daniel Kroening, Peter Schrammel
1313

1414
#include <util/ui_message.h>
1515

16+
#include <goto-symex/shadow_memory.h>
1617
#include <goto-symex/show_program.h>
1718
#include <goto-symex/show_vcc.h>
1819

@@ -72,6 +73,10 @@ operator()(propertiest &properties)
7273

7374
void multi_path_symex_only_checkert::generate_equation()
7475
{
76+
// Gather fields for shadow memory instrumentation
77+
const auto fields =
78+
shadow_memoryt::gather_field_declarations(goto_model, ui_message_handler);
79+
7580
const auto symex_start = std::chrono::steady_clock::now();
7681

7782
symex_symbol_table =

src/goto-checker/single_path_symex_only_checker.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Author: Daniel Kroening, Peter Schrammel
1414
#include <util/ui_message.h>
1515

1616
#include <goto-symex/path_storage.h>
17+
#include <goto-symex/shadow_memory.h>
1718
#include <goto-symex/show_program.h>
1819
#include <goto-symex/show_vcc.h>
1920

@@ -73,6 +74,10 @@ void single_path_symex_only_checkert::initialize_worklist()
7374
unwindset);
7475
setup_symex(symex);
7576

77+
// Gather fields for shadow memory instrumentation
78+
const auto fields =
79+
shadow_memoryt::gather_field_declarations(goto_model, ui_message_handler);
80+
7681
symex.initialize_path_storage_from_entry_point_of(
7782
goto_symext::get_goto_function(goto_model), symex_symbol_table);
7883
}

0 commit comments

Comments
 (0)