44 func.second.body.compute_incoming_edges();
52 func.second.body.compute_target_numbers();
60 func.second.body.compute_loop_numbers();
65std::vector<goto_functionst::function_mapt::const_iterator>
68 std::vector<function_mapt::const_iterator> result;
78 [](function_mapt::const_iterator
a, function_mapt::const_iterator
b) {
79 return id2string(a->first) < id2string(b->first);
88 std::vector<function_mapt::iterator> result;
98 [](function_mapt::iterator
a, function_mapt::iterator
b) {
99 return id2string(a->first) < id2string(b->first);
111 const auto &function_name = entry.first;
119 id2string(function_name) +
" parameter count inconsistency\n" +
122 "\nsymbol table: " + std::to_string(parameters.size()));
130 id2string(function_name) +
" parameter type inconsistency\n" +
131 "goto program: " + ns.
lookup(*it).type.id_string() +
132 "\nsymbol table: " +
parameter.type().id_string());
145 !instruction.is_set_return_value(),
146 "void function should not return a value");
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
std::vector< parametert > parameterst
void compute_incoming_edges()
void compute_loop_numbers()
unsigned unused_location_number
A location number such that numbers in the interval [unused_location_number, MAX_UINT] are all unused...
function_mapt function_map
void compute_location_numbers()
void validate(const namespacet &, validation_modet) const
Check that the goto functions are well-formed.
std::vector< function_mapt::const_iterator > sorted() const
returns a vector of the iterators in alphabetical order
void compute_target_numbers()
A goto function, consisting of function body (see body) and parameter identifiers (see parameter_iden...
parameter_identifierst parameter_identifiers
The identifiers of the parameters of this function.
void validate(const namespacet &ns, const validation_modet vm) const
Check that the goto function is well-formed.
A generic container class for the GOTO intermediate representation of one function.
instructionst instructions
The list of instructions in the goto program.
void compute_location_numbers(unsigned &nr)
Compute location numbers.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
Goto Programs with Functions.
const std::string & id2string(const irep_idt &d)
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
#define DATA_CHECK(vm, condition, message)
This macro takes a condition which denotes a well-formedness criterion on goto programs,...