19 std::unordered_set<irep_idt> &address_taken)
24 if(src.
id() == ID_address_of)
29 address.
type().
id() == ID_pointer &&
33 if(target.
id() == ID_symbol)
42 std::unordered_set<irep_idt> &address_taken)
47 if(src.
type().
id()==ID_code &&
55 std::unordered_set<irep_idt> &address_taken)
67 std::unordered_set<irep_idt> &address_taken)
74 std::unordered_set<irep_idt>
77 std::unordered_set<irep_idt> address_taken;
83 std::unordered_set<irep_idt>
86 std::unordered_set<irep_idt> working_queue;
87 std::unordered_set<irep_idt> functions;
92 while(!working_queue.empty())
95 working_queue.erase(working_queue.begin());
97 if(!functions.insert(
id).second)
100 const goto_functionst::function_mapt::const_iterator f_it=
113 if(i_it->is_function_call())
126 std::unordered_set<irep_idt>
void compute_functions(const exprt &src, std::unordered_set< irep_idt > &address_taken)
get all functions in the expression
void compute_address_taken_functions(const exprt &src, std::unordered_set< irep_idt > &address_taken)
get all functions whose address is taken
std::unordered_set< irep_idt > compute_called_functions(const goto_functionst &goto_functions)
computes the functions that are (potentially) called
function_mapt function_map
typet & type()
Return the type of the expression.
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
const irep_idt & id() const
API to expression classes.
#define forall_operands(it, expr)
A collection of goto functions.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Operator to return the address of an object.
A generic container class for the GOTO intermediate representation of one function.
static irep_idt entry_point()
Get the identifier of the entry point to a goto model.
Base class for all expressions.
const typet & subtype() const
#define forall_goto_functions(it, functions)
#define forall_goto_program_instructions(it, program)
goto_functionst goto_functions
GOTO functions.
const code_function_callt & to_code_function_call(const codet &code)