Go to the documentation of this file.
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);
82 t->source_location_nonconst() = i_it->source_location();
#define Forall_goto_program_instructions(it, program)
static bool find_symbols(symbol_kindt, const typet &, std::function< bool(const symbol_exprt &)>, std::unordered_set< irep_idt > &bindings)
exprt conjunction(const exprt::operandst &op)
1) generates a conjunction for two or more operands 2) for one operand, returns the operand 3) return...
Base class for all expressions.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
bool is_true() const
Return whether the expression is a constant representing true.
function_mapt function_map
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
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.
std::vector< exprt > operandst
::goto_functiont goto_functiont
goto_functionst goto_functions
GOTO functions.
exprt make_expression(const symbol_exprt &) const
instructionst::const_iterator const_targett
static instructiont make_assumption(const exprt &g, const source_locationt &l=source_locationt::nil())
symbol_tablet symbol_table
Symbol table.
instructionst::iterator targett
void interval_analysis(goto_modelt &goto_model)
Initialises the abstract interpretation over interval domain and instruments instructions using inter...