22 std::unordered_set<irep_idt> &address_taken)
27 if(src.
id() == ID_address_of)
32 address.
type().
id() == ID_pointer &&
36 if(target.
id() == ID_symbol)
45 std::unordered_set<irep_idt> &address_taken)
50 if(src.
type().
id()==ID_code &&
58 std::unordered_set<irep_idt> &address_taken)
62 i.apply([&address_taken](
const exprt &expr) {
71 std::unordered_set<irep_idt> &address_taken)
78std::unordered_set<irep_idt>
81 std::unordered_set<irep_idt> address_taken;
87std::unordered_set<irep_idt>
90 std::unordered_set<irep_idt> working_queue;
91 std::unordered_set<irep_idt> functions;
96 while(!working_queue.empty())
99 working_queue.erase(working_queue.begin());
101 if(!functions.insert(
id).second)
104 const goto_functionst::function_mapt::const_iterator f_it=
117 if(instruction.is_function_call())
128std::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 & base_type() const
The type of the data what we point to.
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 pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
static optionalt< smt_termt > get_identifier(const exprt &expr, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_handle_identifiers, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_identifiers)
API to expression classes.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.