Go to the documentation of this file.
20 std::unordered_set<irep_idt> &address_taken)
25 if(src.
id() == ID_address_of)
30 address.
type().
id() == ID_pointer &&
34 if(target.
id() == ID_symbol)
43 std::unordered_set<irep_idt> &address_taken)
48 if(src.
type().
id()==ID_code &&
56 std::unordered_set<irep_idt> &address_taken)
60 i.apply([&address_taken](
const exprt &expr) {
69 std::unordered_set<irep_idt> &address_taken)
76 std::unordered_set<irep_idt>
79 std::unordered_set<irep_idt> address_taken;
85 std::unordered_set<irep_idt>
88 std::unordered_set<irep_idt> working_queue;
89 std::unordered_set<irep_idt> functions;
94 while(!working_queue.empty())
97 working_queue.erase(working_queue.begin());
99 if(!functions.insert(
id).second)
102 const goto_functionst::function_mapt::const_iterator f_it=
115 if(instruction.is_function_call())
118 instruction.get_function_call().function(), working_queue);
127 std::unordered_set<irep_idt>
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const typet & subtype() const
Base class for all expressions.
function_mapt function_map
std::unordered_set< irep_idt > compute_called_functions(const goto_functionst &goto_functions)
computes the functions that are (potentially) called
void compute_functions(const exprt &src, std::unordered_set< irep_idt > &address_taken)
get all functions in the expression
typet & type()
Return the type of the expression.
#define forall_operands(it, expr)
API to expression classes for Pointers.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const irep_idt & id() const
instructionst instructions
The list of instructions in the goto program.
A collection of goto functions.
goto_functionst goto_functions
GOTO functions.
void compute_address_taken_functions(const exprt &src, std::unordered_set< irep_idt > &address_taken)
get all functions whose address is taken
A generic container class for the GOTO intermediate representation of one function.
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
static irep_idt entry_point()
Get the identifier of the entry point to a goto model.
Operator to return the address of an object.
API to expression classes.