13 #ifndef CPROVER_POINTER_ANALYSIS_VALUE_SET_FIVR_H 14 #define CPROVER_POINTER_ANALYSIS_VALUE_SET_FIVR_H 18 #include <unordered_set> 58 return offset && offset->is_zero();
67 typedef std::map<object_numberingt::number_type, offsett>
objmapt;
93 std::pair<iterator, bool>
94 insert(
const std::pair<object_numberingt::number_type, offsett> &)
122 return (
function==f &&
from<=line && line<=
to);
130 bool set_valid_at(
unsigned inx,
unsigned f,
unsigned line);
132 bool is_valid_at(
unsigned inx,
unsigned f,
unsigned line)
const;
141 dest.
write()[it->first]=it->second;
146 return insert_to(dest, it->first, it->second);
211 entryt(
const idt &_identifier,
const std::string _suffix):
223 typedef std::map<idt, entryt>
valuest;
229 typedef std::unordered_map<idt, entryt, string_hash>
valuest;
238 std::list<exprt> &expr_set,
242 const idt &identifier,
243 const std::string &suffix);
269 std::pair<valuest::iterator, bool>
r=
270 values.insert(std::pair<idt, entryt>(index, e));
272 return r.first->second;
283 for(std::list<entryt>::const_iterator
292 std::ostream &out)
const;
320 bool add_to_sets=
false);
346 const std::string &suffix,
347 const typet &original_type,
376 const std::string &suffix,
397 #endif // CPROVER_POINTER_ANALYSIS_VALUE_SET_FIVR_H The type of an expression, extends irept.
void get_reference_set_sharing(const exprt &expr, object_mapt &dest, const namespacet &ns) const
void get_reference_set(const exprt &expr, expr_sett &expr_set, const namespacet &ns) const
number_type number(const key_type &a)
const std::string & id2string(const irep_idt &d)
void dereference_rec(const exprt &src, exprt &dest) const
void do_end_function(const exprt &lhs, const namespacet &ns)
const_iterator end() const
void add_var(const entryt &e)
void set_from(const irep_idt &function, unsigned inx)
bool recursive_find(const irep_idt &ident, const object_mapt &rhs, recfind_recursion_sett &recursion_set) const
bool make_union(object_mapt &dest, const object_mapt &src) const
objmapt::iterator iterator
void copy_objects(object_mapt &dest, const object_mapt &src) const
void output(const namespacet &ns, std::ostream &out) const
std::unordered_set< exprt, irep_hash > expr_sett
unsigned from_target_index
bool offset_is_zero(const offsett &offset) const
void get_reference_set_sharing_rec(const exprt &expr, object_mapt &dest, const namespacet &ns) const
void set_to(const irep_idt &function, unsigned inx)
validity_ranget(unsigned fnc, unsigned f, unsigned t)
iterator insert(iterator, const std::pair< object_numberingt::number_type, offsett > &)
void get_value_set_rec(const exprt &expr, object_mapt &dest, const std::string &suffix, const typet &original_type, const namespacet &ns, gvs_recursion_sett &recursion_set) const
bool insert_from(object_mapt &dest, const exprt &expr, const offsett &offset) const
bool insert_from(object_mapt &dest, object_map_dt::const_iterator it) const
bool is_valid_at(unsigned inx, unsigned f, unsigned line) const
bool insert_from(object_mapt &dest, const exprt &src) const
nonstd::optional< T > optionalt
void apply_code(const exprt &code, const namespacet &ns)
entryt & get_entry(const entryt &e)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
std::list< validity_ranget > vrange_listt
void do_function_call(const irep_idt &function, const exprt::operandst &arguments, const namespacet &ns)
std::unordered_map< idt, entryt, string_hash > valuest
void get_reference_set_sharing(const exprt &expr, expr_sett &expr_set, const namespacet &ns) const
std::unordered_set< idt, string_hash > gvs_recursion_sett
void assign(const exprt &lhs, const exprt &rhs, const namespacet &ns, bool add_to_sets=false)
void add_vars(const std::list< entryt > &vars)
void get_value_set(const exprt &expr, std::list< exprt > &expr_set, const namespacet &ns) const
bool make_valid_union(object_mapt &dest, const object_mapt &src) const
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
entryt & get_entry(const idt &id, const std::string &suffix)
static object_numberingt object_numbering
typename Map::mapped_type number_type
void flatten(const entryt &e, object_mapt &dest) const
static const object_map_dt blank
bool insert_from(object_mapt &dest, const exprt &src, const mp_integer &offset_value) const
bool insert_to(object_mapt &dest, const exprt &src, const mp_integer &offset_value) const
std::unordered_set< unsigned int > dynamic_object_id_sett
void flatten_rec(const entryt &, object_mapt &, flatten_seent &, unsigned from_function) const
entryt & get_temporary_entry(const idt &id, const std::string &suffix)
std::vector< exprt > operandst
bool set_valid_at(unsigned inx, unsigned f, unsigned line)
validity_rangest validity_ranges
exprt to_expr(object_map_dt::const_iterator it) const
optionalt< mp_integer > offsett
Represents the offset into an object: either a unique integer offset, or an unknown value...
objmapt::const_iterator const_iterator
void assign_rec(const exprt &lhs, const object_mapt &values_rhs, const std::string &suffix, const namespacet &ns, assign_recursion_sett &recursion_set, bool add_to_sets)
bool insert_to(object_mapt &dest, object_map_dt::const_iterator it) const
reference_counting< object_map_dt > object_mapt
bool insert_to(object_mapt &dest, const exprt &expr, const offsett &offset) const
Base class for all expressions.
static hash_numbering< irep_idt, irep_id_hash > function_numbering
std::unordered_set< idt, string_hash > flatten_seent
#define UNREACHABLE
This should be used to mark dead code.
std::map< unsigned, vrange_listt > validity_rangest
entryt(const idt &_identifier, const std::string _suffix)
const_iterator begin() const
std::pair< iterator, bool > insert(const std::pair< object_numberingt::number_type, offsett > &)
void add_var(const idt &id, const std::string &suffix)
std::unordered_set< idt, string_hash > assign_recursion_sett
bool contains(unsigned f, unsigned line) const
offsett & operator[](object_numberingt::number_type k)
std::unordered_set< idt, string_hash > recfind_recursion_sett
bool insert_to(object_mapt &dest, const exprt &src) const
const_iterator find(object_numberingt::number_type k)
std::map< object_numberingt::number_type, offsett > objmapt