19 if(instruction.is_start_thread())
35 assert(end->is_end_function());
52 end->source_location=source_location;
53 end->source_location.set_comment(
"mutexes must not be locked on thread exit");
54 end->function=
function;
60 std::set<irep_idt> thread_fkts;
68 for(
const auto &instruction : f_it->second.body.instructions)
69 if(instruction.is_function_call())
71 const exprt &
function=
73 if(
function.
id()==ID_symbol)
80 for(
const auto &fkt : thread_fkts)
90 symbol_tablet::symbolst::const_iterator f_it =
103 if(code_assign.
lhs().
type()==lock_type)
108 f_it->second.symbol_expr(),
112 t->make_function_call(call);
123 symbol_tablet::symbolst::const_iterator lock_entry =
136 if(lock_type.
id()!=ID_pointer)
The type of an expression, extends irept.
void insert_before_swap(targett target)
Insertion that preserves jumps to "target".
pointer_typet pointer_type(const typet &subtype)
void mutex_init_instrumentation(const symbol_tablet &symbol_table, goto_programt &goto_program, typet lock_type)
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
The null pointer constant.
function_mapt function_map
typet & type()
Return the type of the expression.
symbol_tablet symbol_table
Symbol table.
static bool has_start_thread(const goto_programt &goto_program)
const code_assignt & to_code_assign(const codet &code)
const irep_idt & id() const
A base class for binary expressions.
instructionst::iterator targett
instructionst instructions
The list of instructions in the goto program.
targett insert_after(const_targett target)
Insertion after the instruction pointed-to by the given instruction iterator target.
codet representation of a function call statement.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
Operator to return the address of an object.
A generic container class for the GOTO intermediate representation of one function.
Base class for all expressions.
const parameterst & parameters() const
#define Forall_goto_functions(it, functions)
const source_locationt & source_location() const
#define Forall_goto_program_instructions(it, program)
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
#define forall_goto_functions(it, functions)
goto_functionst goto_functions
GOTO functions.
A codet representing an assignment in the program.
const code_function_callt & to_code_function_call(const codet &code)
void thread_exit_instrumentation(goto_programt &goto_program)