Go to the documentation of this file.
21 assert(!loop.empty());
24 std::map<unsigned, goto_programt::targett> loop_map;
29 loop_map[(*l_it)->location_number]=*l_it;
42 for(modifiest::const_iterator
43 m_it=modifies.begin();
53 t->code.add_source_location()=loop_head->source_location;
63 if(lhs.
id()==ID_symbol)
65 else if(lhs.
id()==ID_dereference)
68 for(modifiest::const_iterator m_it=m.begin();
69 m_it!=m.end(); m_it++)
72 else if(lhs.
id()==ID_member)
75 else if(lhs.
id()==ID_index)
78 else if(lhs.
id()==ID_if)
93 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.
targett add(instructiont &&instruction)
Adds a given instruction at the end.
Base class for all expressions.
natural_loops_mutablet::natural_loopt loopt
static instructiont make_assignment(const code_assignt &_code, const source_locationt &l=source_locationt::nil())
Create an assignment instruction.
typet & type()
Return the type of the expression.
std::set< exprt > modifiest
loop_instructionst::const_iterator const_iterator
Field-insensitive, location-sensitive may-alias analysis.
goto_programt::targett get_loop_exit(const loopt &loop)
codet code
Do not read or modify directly – use get_X() instead.
const source_locationt & source_location() const
void get_modifies_lhs(const local_may_aliast &local_may_alias, goto_programt::const_targett t, const exprt &lhs, modifiest &modifies)
const irep_idt & id() const
const code_function_callt & to_code_function_call(const codet &code)
Helper functions for k-induction and loop invariants.
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)
Compute natural loops in a goto_function.
A generic container class for the GOTO intermediate representation of one function.
instructionst::const_iterator const_targett
A codet representing an assignment in the program.
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.
API to expression classes.
const source_locationt & source_location() const
instructionst::iterator targett