Go to the documentation of this file.
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();
99 t->function=loop_head->function;
100 t->source_location=loop_head->source_location;
102 t->code.add_source_location()=loop_head->source_location;
110 assert(!loop.empty());
129 for(loopt::const_iterator
130 l_it=loop.begin(); l_it!=loop.end(); l_it++)
135 for(goto_programt::targetst::iterator
136 t_it=instruction.
targets.begin();
137 t_it!=instruction.
targets.end();
154 for(loopt::const_iterator
155 i_it=loop.begin(); i_it!=loop.end(); i_it++)
168 const exprt &lhs=code_function_call.
lhs();
void get_modifies(const loopt &, modifiest &)
goto_functionst::goto_functiont goto_functiont
void remove_skip(goto_programt &goto_program, goto_programt::targett begin, goto_programt::targett end)
remove unnecessary skip statements
Base class for all expressions.
targetst targets
The list of successor instructions.
havoc_loopst(function_modifiest &_function_modifies, goto_functiont &_goto_function)
targett add_instruction()
Adds an instruction at the end.
typet & type()
Return the type of the expression.
codet representation of a function call statement.
goto_functiont & goto_function
const source_locationt & source_location() const
const typedef natural_loops_mutablet::natural_loopt loopt
std::set< exprt > modifiest
const code_function_callt & to_code_function_call(const codet &code)
A goto function, consisting of function type (see type), function body (see body),...
natural_loops_mutablet natural_loops
void build_havoc_code(const goto_programt::targett loop_head, const modifiest &modifies, goto_programt &dest)
local_may_aliast local_may_alias
#define Forall_goto_functions(it, functions)
A side_effect_exprt that returns a non-deterministically chosen value.
::goto_functiont goto_functiont
goto_functionst goto_functions
GOTO functions.
const code_assignt & to_code_assign(const codet &code)
void havoc_loop(const goto_programt::targett loop_head, const loopt &)
A generic container class for the GOTO intermediate representation of one function.
function_modifiest & function_modifies
void havoc_loops(goto_modelt &goto_model)
void insert_before_swap(targett target)
Insertion that preserves jumps to "target".
A codet representing an assignment in the program.
const typedef natural_loops_mutablet::natural_loopt loopt
bool is_function_call() const
This class represents an instruction in the GOTO intermediate representation.
goto_programt::targett get_loop_exit(const loopt &)
instructionst::iterator targett
std::set< goto_programt::targett > natural_loopt
void get_modifies_lhs(const local_may_aliast &, const goto_programt::const_targett, const exprt &lhs, modifiest &)