29 loop_idst::const_iterator l_it=loop_ids.begin();
32 if(l_it==loop_ids.end())
34 if(!it->is_backwards_goto())
37 const unsigned loop_id=it->loop_number;
55 if(l_it!=loop_ids.end())
57 message.
error() <<
"Loop " << *l_it <<
" not found"
66 const std::string &loop_ids,
74 std::string val=loop_ids.substr(idx, next-idx);
77 if(delim==std::string::npos)
80 std::string fn=val.substr(0, delim);
83 loop_map[fn].insert(nr);
85 if(next==std::string::npos)
95 const std::string &loop_ids,
107 loop_mapt::const_iterator it=loop_map.begin();
110 if(it == loop_map.end() || it->first < gf_entry.first)
112 else if(it->first == gf_entry.first)
114 if(
skip_loops(gf_entry.second.body, it->second, message))
119 if(it!=loop_map.end())
121 message.
error() <<
"No function " << it->first <<
" in goto program"
const source_locationt & source_location() const
function_mapt function_map
goto_functionst goto_functions
GOTO functions.
A generic container class for the GOTO intermediate representation of one function.
instructionst instructions
The list of instructions in the goto program.
instructionst::iterator targett
static instructiont make_goto(targett _target, const source_locationt &l=source_locationt::nil())
targett insert_before(const_targett target)
Insertion before the instruction pointed-to by the given instruction iterator target.
Class that provides messages with a built-in verbosity 'level'.
The Boolean constant true.
#define Forall_goto_program_instructions(it, program)
static bool parse_loop_ids(const std::string &loop_ids, loop_mapt &loop_map)
std::map< irep_idt, loop_idst > loop_mapt
static bool skip_loops(goto_programt &goto_program, const loop_idst &loop_ids, messaget &message)
std::set< unsigned > loop_idst
Skip over selected loops by adding gotos.
#define CHECK_RETURN(CONDITION)
unsigned safe_string2unsigned(const std::string &str, int base)