34 std::set<symbol_exprt> symbols;
36 for(
const auto &i : goto_function.body.instructions)
41 if(i_it==goto_function.body.instructions.begin())
49 if(previous->is_goto() && !previous->condition().is_true())
53 else if(previous->is_function_call())
57 else if(i_it->is_target() || i_it->is_function_call())
69 for(
const auto &symbol_expr : symbols)
73 assertion.push_back(tmp);
76 if(!assertion.empty())
79 goto_function.body.insert_before_swap(i_it);
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Base class for all expressions.
std::vector< exprt > operandst
bool is_true() const
Return whether the expression is a constant representing true.
const source_locationt & source_location() const
function_mapt function_map
::goto_functiont goto_functiont
symbol_tablet symbol_table
Symbol table.
goto_functionst goto_functions
GOTO functions.
static instructiont make_assumption(const exprt &g, const source_locationt &l=source_locationt::nil())
instructionst::iterator targett
instructionst::const_iterator const_targett
exprt make_expression(const symbol_exprt &) const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
static bool find_symbols(symbol_kindt, const typet &, std::function< bool(const symbol_exprt &)>, std::unordered_set< irep_idt > &bindings, const std::vector< irep_idt > &subs_to_find)
Find identifiers with id ID_symbol of the sub expressions and the subs with ID in subs_to_find consid...
#define Forall_goto_program_instructions(it, program)
void interval_analysis(goto_modelt &goto_model)
Initialises the abstract interpretation over interval domain and instruments instructions using inter...
void instrument_intervals(const ait< interval_domaint > &interval_analysis, goto_functionst::goto_functiont &goto_function)
Instruments all "post-branch" instructions with assumptions about variable intervals.
exprt conjunction(const exprt::operandst &op)
1) generates a conjunction for two or more operands 2) for one operand, returns the operand 3) return...