Go to the documentation of this file.
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)
78 std::unordered_set<irep_idt>
81 std::unordered_set<irep_idt> address_taken;
87 std::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())
128 std::unordered_set<irep_idt>
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
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.
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)
#define forall_operands(it, expr)
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
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
const typet & base_type() const
The type of the data what we point to.
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.