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())
127 std::unordered_set<irep_idt>
Operator to return the address of an object.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
std::string::const_iterator begin() const
Base class for all expressions.
typet & type()
Return the type of the expression.
A collection of goto functions.
function_mapt function_map
static irep_idt entry_point()
Get the identifier of the entry point to a goto model.
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.
const irep_idt & id() const
const typet & subtype() const
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
#define forall_operands(it, expr)
API to expression classes for Pointers.
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
const code_function_callt & to_code_function_call(const codet &code)
API to expression classes.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.