30 goto_functiont &_goto_function):
56 const modifiest &modifies,
68 assert(!loop.empty());
71 std::map<unsigned, goto_programt::targett> loop_map;
73 for(loopt::const_iterator l_it=loop.begin();
76 loop_map[(*l_it)->location_number]=*l_it;
89 for(modifiest::const_iterator
90 m_it=modifies.begin();
98 t->function=loop_head->function;
99 t->source_location=loop_head->source_location;
101 t->code.add_source_location()=loop_head->source_location;
109 assert(!loop.empty());
128 for(loopt::const_iterator
129 l_it=loop.begin(); l_it!=loop.end(); l_it++)
131 goto_programt::instructiont &instruction=**l_it;
132 if(instruction.is_goto())
134 for(goto_programt::targetst::iterator
135 t_it=instruction.targets.begin();
136 t_it!=instruction.targets.end();
153 for(loopt::const_iterator
154 i_it=loop.begin(); i_it!=loop.end(); i_it++)
156 const goto_programt::instructiont &instruction=**i_it;
158 if(instruction.is_assign())
163 else if(instruction.is_function_call())
167 const exprt &lhs=code_function_call.
lhs();
targett add_instruction()
Adds an instruction at the end.
void get_modifies(const loopt &, modifiest &)
std::set< goto_programt::targett > natural_loopt
const code_assignt & to_code_assign(const codet &code)
havoc_loopst(function_modifiest &_function_modifies, goto_functiont &_goto_function)
local_may_aliast local_may_alias
void get_modifies_lhs(const local_may_aliast &, const goto_programt::const_targett, const exprt &lhs, modifiest &)
API to expression classes.
std::set< exprt > modifiest
A side effect that returns a non-deterministically chosen value.
natural_loops_mutablet natural_loops
A specialization of goto_program_templatet over goto programs in which instructions have codet type...
const natural_loops_mutablet::natural_loopt loopt
void remove_skip(goto_programt &goto_program)
remove unnecessary skip statements
Base class for all expressions.
goto_functionst::goto_functiont goto_functiont
goto_functiont & goto_function
#define Forall_goto_functions(it, functions)
void build_havoc_code(const goto_programt::targett loop_head, const modifiest &modifies, goto_programt &dest)
void havoc_loop(const goto_programt::targett loop_head, const loopt &)
function_modifiest & function_modifies
Compute natural loops in a goto_function.
goto_programt::targett get_loop_exit(const loopt &)
Field-insensitive, location-sensitive may-alias analysis.
const code_function_callt & to_code_function_call(const codet &code)
instructionst::iterator targett