Go to the documentation of this file.
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 an exprt to an if_exprt.
The trinary if-then-else operator.
Base class for all expressions.
targett add_instruction()
Adds an instruction at the end.
typet & type()
Return the type of the expression.
std::set< exprt > modifiest
goto_programt::targett get_loop_exit(const loopt &loop)
const source_locationt & source_location() const
const irep_idt & id() const
const code_function_callt & to_code_function_call(const codet &code)
A side_effect_exprt that returns a non-deterministically chosen value.
const dereference_exprt & to_dereference_expr(const exprt &expr)
Cast an exprt to a dereference_exprt.
const code_assignt & to_code_assign(const codet &code)
void get_modifies(const local_may_aliast &local_may_alias, const loopt &loop, modifiest &modifies)
A generic container class for the GOTO intermediate representation of one function.
instructionst::const_iterator const_targett
static void get_modifies_lhs(const local_may_aliast &local_may_alias, goto_programt::const_targett t, const exprt &lhs, modifiest &modifies)
A codet representing an assignment in the program.
const typedef natural_loops_mutablet::natural_loopt loopt
void build_havoc_code(const goto_programt::targett loop_head, const modifiest &modifies, goto_programt &dest)
bool is_function_call() const
std::set< exprt > get(const goto_programt::const_targett t, const exprt &src) const
This class represents an instruction in the GOTO intermediate representation.
instructionst::iterator targett