21 assert(!loop.empty());
24 std::map<unsigned, goto_programt::targett> loop_map;
26 for(loopt::const_iterator l_it=loop.begin();
29 loop_map[(*l_it)->location_number]=*l_it;
42 for(modifiest::const_iterator
43 m_it=modifies.begin();
52 t->function=loop_head->function;
53 t->source_location=loop_head->source_location;
55 t->code.add_source_location()=loop_head->source_location;
65 if(lhs.
id()==ID_symbol)
67 else if(lhs.
id()==ID_dereference)
70 for(modifiest::const_iterator m_it=m.begin();
71 m_it!=m.end(); m_it++)
74 else if(lhs.
id()==ID_member)
77 else if(lhs.
id()==ID_index)
80 else if(lhs.
id()==ID_if)
94 for(loopt::const_iterator
95 i_it=loop.begin(); i_it!=loop.end(); i_it++)
const if_exprt & to_if_expr(const exprt &expr)
Cast a generic exprt to an if_exprt.
bool is_function_call() const
const natural_loops_mutablet::natural_loopt loopt
The trinary if-then-else operator.
const dereference_exprt & to_dereference_expr(const exprt &expr)
Cast a generic exprt to a dereference_exprt.
This class represents an instruction in the GOTO intermediate representation.
const code_assignt & to_code_assign(const codet &code)
const irep_idt & id() const
instructionst::iterator targett
API to expression classes.
goto_programt::targett get_loop_exit(const loopt &loop)
instructionst::const_iterator const_targett
std::set< exprt > modifiest
A side effect that returns a non-deterministically chosen value.
Helper functions for k-induction and loop invariants.
const source_locationt & source_location() const
A generic container class for the GOTO intermediate representation of one function.
void get_modifies(const local_may_aliast &local_may_alias, const loopt &loop, modifiest &modifies)
targett add_instruction()
Adds an instruction at the end.
Base class for all expressions.
void build_havoc_code(const goto_programt::targett loop_head, const modifiest &modifies, goto_programt &dest)
Compute natural loops in a goto_function.
static void get_modifies_lhs(const local_may_aliast &local_may_alias, goto_programt::const_targett t, const exprt &lhs, modifiest &modifies)
std::set< exprt > get(const goto_programt::const_targett t, const exprt &src) const
Field-insensitive, location-sensitive may-alias analysis.
const code_function_callt & to_code_function_call(const codet &code)