27 const auto malloc_failure_mode_id =
38 "if malloc_may_fail is in the symbol table then so should "
39 "malloc_failure_mode");
44 initialize_function_name) == 1);
45 auto &initialize_function =
48 const auto initialize_function_end =
49 --initialize_function.body.instructions.end();
51 initialize_function.body.insert_before(
52 initialize_function_end,
58 initialize_function.body.insert_before(
59 initialize_function_end,
62 malloc_failure_mode_id,
code_assignt make_integer_assignment(const symbol_table_baset &symbol_table, const irep_idt &symbol_name, T &&value)
void add_malloc_may_fail_variable_initializations(goto_modelt &goto_model)
Some variables have different initial values based on what flags are being passed to cbmc; since the ...
A codet representing an assignment in the program.
struct configt::ansi_ct ansi_c
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
function_mapt function_map
const goto_functionst & get_goto_functions() const override
Accessor to get a raw goto_functionst.
symbol_tablet symbol_table
Symbol table.
goto_functionst goto_functions
GOTO functions.
static instructiont make_assignment(const code_assignt &_code, const source_locationt &l=source_locationt::nil())
Create an assignment instruction.
The symbol table base class interface.
const symbolt & lookup_ref(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
bool has_symbol(const irep_idt &name) const
Check whether a symbol exists in the symbol table.
class symbol_exprt symbol_expr() const
Produces a symbol_exprt for a symbol.
#define PRECONDITION(CONDITION)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
#define INITIALIZE_FUNCTION
malloc_failure_modet malloc_failure_mode