Go to the documentation of this file.
42 func.second.body.compute_incoming_edges();
50 func.second.body.compute_target_numbers();
58 func.second.body.compute_loop_numbers();
63 std::vector<goto_functionst::function_mapt::const_iterator>
66 std::vector<function_mapt::const_iterator> result;
76 [](function_mapt::const_iterator a, function_mapt::const_iterator b) {
77 return id2string(a->first) < id2string(b->first);
86 std::vector<function_mapt::iterator> result;
96 [](function_mapt::iterator a, function_mapt::iterator b) {
97 return id2string(a->first) < id2string(b->first);
109 const auto &function_name = entry.first;
117 id2string(function_name) +
" parameter count inconsistency\n" +
123 for(
const auto ¶meter : parameters)
127 it->empty() || ns.
lookup(*it).type == parameter.type(),
128 id2string(function_name) +
" parameter type inconsistency\n" +
129 "goto program: " + ns.
lookup(*it).type.id_string() +
130 "\nsymbol table: " + parameter.type().id_string());
143 !instruction.is_set_return_value(),
144 "void function should not return a value");
#define DATA_CHECK(vm, condition, message)
This macro takes a condition which denotes a well-formedness criterion on goto programs,...
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
std::vector< parametert > parameterst
typet type
Type of symbol.
void validate(const namespacet &ns, const validation_modet vm) const
Check that the goto function is well-formed.
void compute_location_numbers()
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
function_mapt function_map
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().
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
void compute_target_numbers()
const std::string & id2string(const irep_idt &d)
void compute_location_numbers(unsigned &nr)
Compute location numbers.
const irep_idt & id() const
A goto function, consisting of function body (see body) and parameter identifiers (see parameter_iden...
void compute_loop_numbers()
const parameterst & parameters() const
instructionst instructions
The list of instructions in the goto program.
A generic container class for the GOTO intermediate representation of one function.
const typet & return_type() const
parameter_identifierst parameter_identifiers
The identifiers of the parameters of this function.
void compute_incoming_edges()
unsigned unused_location_number
A location number such that numbers in the interval [unused_location_number, MAX_UINT] are all unused...