28 const auto &body=
f_it->second.body;
30 std::vector<goto_programt::const_targett> result;
32 for(
auto i_it=body.instructions.begin();
33 i_it!=body.instructions.end();
36 if(
i_it->is_location() ||
44 result.push_back(
i_it);
57 if(instruction.is_location() ||
58 instruction.is_skip())
62 instruction.is_assert() &&
74 const exprt &function,
81 const auto ¶meters=
code_type.parameters();
85 for(
const auto &p : parameters)
87 if(!p.get_identifier().empty() && arguments.size() > count)
109 if(it->is_function_call())
127 for(
const auto &p : preconditions)
const T & as_const(T &value)
Return a reference to the same object but ensures the type is const.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
std::vector< exprt > operandst
A collection of goto functions.
function_mapt function_map
A goto function, consisting of function body (see body) and parameter identifiers (see parameter_iden...
symbol_tablet symbol_table
Symbol table.
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.
void insert_before_swap(targett target)
Insertion that preserves jumps to "target".
static instructiont make_location(const source_locationt &l)
static instructiont make_assertion(const exprt &g, const source_locationt &l=source_locationt::nil())
const irep_idt & id() const
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().
Replace a symbol expression by a given expression.
void insert(const class symbol_exprt &old_expr, const exprt &new_expr)
Sets old_expr to be replaced by new_expr if we don't already have a replacement; otherwise does nothi...
Expression to hold a symbol (variable)
const irep_idt & get_identifier() const
typet type
Type of symbol.
static exprt conditional_cast(const exprt &expr, const typet &type)
std::vector< goto_programt::const_targett > get_preconditions(const symbol_exprt &function, const goto_functionst &goto_functions)
void remove_preconditions(goto_programt &goto_program)
replace_symbolt actuals_replace_map(const exprt &lhs, const exprt &function, const exprt::operandst &arguments, const namespacet &ns)
void instrument_preconditions(const goto_modelt &goto_model, goto_programt &goto_program)
#define PRECONDITION(CONDITION)
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.