15#ifndef CPROVER_GOTO_INSTRUMENT_CONTRACTS_CFG_INFO_H
16#define CPROVER_GOTO_INSTRUMENT_CONTRACTS_CFG_INFO_H
74 "is_local_composite_access: unexpected assignment to member of '" +
148 for(
const auto &t : loop)
151 locals.insert(t->decl_symbol().get_identifier());
173 auto it =
exprs.begin();
174 while(it !=
exprs.end())
179 std::find_if(symbols.begin(), symbols.end(), [
this](
const irep_idt &s) {
183 it =
exprs.erase(it);
211 dirtyt is_dirty(goto_function);
Expression classes for byte-level operators.
const byte_extract_exprt & to_byte_extract_expr(const exprt &expr)
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Stores information about a goto function computed from its CFG.
virtual bool is_not_local_or_dirty_local(const irep_idt &ident) const =0
Returns true iff the given ident is either non-locally declared or is locally-declared but dirty.
virtual bool is_local(const irep_idt &ident) const =0
Returns true iff ident is locally declared.
bool is_local_composite_access(const exprt &expr) const
Returns true iff expr is an access to a locally declared symbol and does not contain dereference or a...
Dirty variables are ones which have their address taken so we can't reliably work out where they may ...
const std::unordered_set< irep_idt > & get_dirty_ids() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
bool is_local(const irep_idt &ident) const override
Returns true iff ident is a local or parameter of the goto_function.
std::unordered_set< irep_idt > parameters
bool is_not_local_or_dirty_local(const irep_idt &ident) const override
Returns true iff the given ident is either not a goto_function local or is a local that is dirty.
function_cfg_infot(const goto_functiont &_goto_function)
A goto function, consisting of function body (see body) and parameter identifiers (see parameter_iden...
goto_program_cfg_infot(const goto_programt &goto_program)
bool is_local(const irep_idt &ident) const override
Returns true iff ident is a loop local.
std::set< irep_idt > dirty
bool is_not_local_or_dirty_local(const irep_idt &ident) const override
Returns true iff the given ident is either not a loop local or is a loop local that is dirty.
std::set< irep_idt > locals
A generic container class for the GOTO intermediate representation of one function.
void copy_from(const goto_programt &src)
Copy a full goto program, preserving targets.
void get_decl_identifiers(decl_identifierst &decl_identifiers) const
get the variables in decl statements
const std::string & id_string() const
const irep_idt & id() const
bool is_not_local_or_dirty_local(const irep_idt &ident) const override
Returns true iff the given ident is either not a loop local or is a loop local that is dirty.
bool is_local(const irep_idt &ident) const override
Returns true iff ident is a loop local.
void erase_locals(std::set< exprt > &exprs)
std::unordered_set< irep_idt > locals
loop_cfg_infot(goto_functiont &_goto_function, const loopt &loop)
The type of an expression, extends irept.
Thrown when we encounter an instruction, parameters to an instruction etc.
static std::unordered_set< irep_idt > find_symbol_identifiers(const goto_programt &src)
Find all identifiers in src.
Variables whose address is taken.
Templated functions to cast to specific exprt-derived classes.
Utilities for building havoc code for expressions.
Local variables whose address is taken.
Helper functions for k-induction and loop invariants.
natural_loops_mutablet::natural_loopt loopt
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
const if_exprt & to_if_expr(const exprt &expr)
Cast an exprt to an if_exprt.
const member_exprt & to_member_expr(const exprt &expr)
Cast an exprt to a member_exprt.
const complex_imag_exprt & to_complex_imag_expr(const exprt &expr)
Cast an exprt to a complex_imag_exprt.
const complex_real_exprt & to_complex_real_expr(const exprt &expr)
Cast an exprt to a complex_real_exprt.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.