12 #ifndef CPROVER_GOTO_SYMEX_SHADOW_MEMORY_H
13 #define CPROVER_GOTO_SYMEX_SHADOW_MEMORY_H
20 #define SHADOW_MEMORY_PREFIX "SM__"
21 #define SHADOW_MEMORY_FIELD_DECL "field_decl"
22 #define SHADOW_MEMORY_GLOBAL_SCOPE "_global"
23 #define SHADOW_MEMORY_LOCAL_SCOPE "_local"
24 #define SHADOW_MEMORY_GET_FIELD "get_field"
25 #define SHADOW_MEMORY_SET_FIELD "set_field"
26 #define SHADOW_MEMORY_SYMBOL_PREFIX "__SM"
132 const typet &field_type);
Abstract interface to eager or lazy GOTO models.
goto_instruction_codet representation of a function call statement.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
std::vector< exprt > operandst
Central data structure: state.
Class that provides messages with a built-in verbosity 'level'.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
The shadow memory field definitions.
std::map< irep_idt, exprt > field_definitiont
A field definition mapping a field name to its initial value.
The shadow memory instrumentation performed during symbolic execution.
const symbol_exprt & add_field(goto_symex_statet &state, const exprt &expr, const irep_idt &field_name, const typet &field_type)
Registers a shadow memory field for the given original memory.
void symex_get_field(goto_symex_statet &state, const exprt &lhs, const exprt::operandst &arguments)
Symbolically executes a __CPROVER_get_field call.
static void convert_field_declaration(const code_function_callt &code_function_call, shadow_memory_field_definitionst::field_definitiont &fields, bool is_global, message_handlert &message_handler)
Converts a field declaration.
void symex_field_dynamic_init(goto_symex_statet &state, const exprt &expr, const side_effect_exprt &code)
Initialize global-scope shadow memory for dynamically allocated memory.
void symex_field_static_init(goto_symex_statet &state, const ssa_exprt &lhs)
Initialize global-scope shadow memory for global/static variables.
const std::function< void(goto_symex_statet &, const exprt &, const exprt)> symex_assign
void symex_field_static_init_string_constant(goto_symex_statet &state, const ssa_exprt &expr, const exprt &rhs)
Initialize global-scope shadow memory for string constants.
static shadow_memory_field_definitionst gather_field_declarations(const abstract_goto_modelt &goto_model, message_handlert &message_handler)
Gathers the available shadow memory field definitions (__CPROVER_field_decl calls) from the goto mode...
void symex_field_local_init(goto_symex_statet &state, const ssa_exprt &expr)
Initialize local-scope shadow memory for local variables and parameters.
shadow_memoryt(const std::function< void(goto_symex_statet &, const exprt &, const exprt &)> symex_assign, const namespacet &ns, message_handlert &message_handler)
void initialize_shadow_memory(goto_symex_statet &state, exprt expr, const shadow_memory_field_definitionst::field_definitiont &fields)
Allocates and initializes a shadow memory field for the given original memory.
void symex_set_field(goto_symex_statet &state, const exprt::operandst &arguments)
Symbolically executes a __CPROVER_set_field call.
An expression containing a side effect.
Expression providing an SSA-renamed symbol of expressions.
Expression to hold a symbol (variable)
The type of an expression, extends irept.
Symex Shadow Memory Field Definitions.