cprover
|
#include <value_set_fi.h>
Classes | |
struct | entryt |
class | object_map_dt |
Public Types | |
typedef irep_idt | idt |
typedef optionalt< mp_integer > | offsett |
Represents the offset into an object: either a unique integer offset, or an unknown value, represented by !offset . More... | |
typedef reference_counting< object_map_dt > | object_mapt |
typedef std::unordered_set< exprt, irep_hash > | expr_sett |
typedef std::unordered_set< unsigned int > | dynamic_object_id_sett |
typedef std::unordered_map< idt, entryt, string_hash > | valuest |
typedef std::unordered_set< idt, string_hash > | flatten_seent |
typedef std::unordered_set< idt, string_hash > | gvs_recursion_sett |
typedef std::unordered_set< idt, string_hash > | recfind_recursion_sett |
typedef std::unordered_set< idt, string_hash > | assign_recursion_sett |
Public Member Functions | |
value_set_fit () | |
void | set_from (const irep_idt &function, unsigned inx) |
void | set_to (const irep_idt &function, unsigned inx) |
bool | offset_is_zero (const offsett &offset) const |
exprt | to_expr (const object_map_dt::value_type &it) const |
void | set (object_mapt &dest, const object_map_dt::value_type &it) const |
bool | insert (object_mapt &dest, const object_map_dt::value_type &it) const |
bool | insert (object_mapt &dest, const exprt &src) const |
bool | insert (object_mapt &dest, const exprt &src, const mp_integer &offset_value) const |
bool | insert (object_mapt &dest, object_numberingt::number_type n, const offsett &offset) const |
bool | insert (object_mapt &dest, const exprt &expr, const offsett &offset) const |
void | get_value_set (const exprt &expr, std::list< exprt > &dest, const namespacet &ns) const |
expr_sett & | get (const idt &identifier, const std::string &suffix) |
void | make_any () |
void | clear () |
void | add_var (const idt &id, const std::string &suffix) |
void | add_var (const entryt &e) |
entryt & | get_entry (const idt &id, const std::string &suffix) |
entryt & | get_entry (const entryt &e) |
void | add_vars (const std::list< entryt > &vars) |
void | output (const namespacet &ns, std::ostream &out) const |
bool | make_union (object_mapt &dest, const object_mapt &src) const |
bool | make_union (const valuest &new_values) |
bool | make_union (const value_set_fit &new_values) |
void | apply_code (const exprt &code, const namespacet &ns) |
void | assign (const exprt &lhs, const exprt &rhs, const namespacet &ns) |
void | do_function_call (const irep_idt &function, const exprt::operandst &arguments, const namespacet &ns) |
void | do_end_function (const exprt &lhs, const namespacet &ns) |
void | get_reference_set (const exprt &expr, expr_sett &expr_set, const namespacet &ns) const |
Public Attributes | |
unsigned | to_function |
unsigned | from_function |
unsigned | to_target_index |
unsigned | from_target_index |
valuest | values |
bool | changed |
Static Public Attributes | |
static object_numberingt | object_numbering |
static hash_numbering< irep_idt, irep_id_hash > | function_numbering |
Protected Member Functions | |
void | get_reference_set_sharing (const exprt &expr, expr_sett &expr_set, const namespacet &ns) const |
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 |
void | get_value_set (const exprt &expr, object_mapt &dest, const namespacet &ns) const |
void | get_reference_set_sharing (const exprt &expr, object_mapt &dest, const namespacet &ns) const |
void | get_reference_set_sharing_rec (const exprt &expr, object_mapt &dest, const namespacet &ns) const |
void | dereference_rec (const exprt &src, exprt &dest) const |
void | assign_rec (const exprt &lhs, const object_mapt &values_rhs, const std::string &suffix, const namespacet &ns, assign_recursion_sett &recursion_set) |
void | do_free (const exprt &op, const namespacet &ns) |
void | flatten (const entryt &e, object_mapt &dest) const |
void | flatten_rec (const entryt &, object_mapt &, flatten_seent &) const |
Definition at line 27 of file value_set_fi.h.
typedef std::unordered_set<idt, string_hash> value_set_fit::assign_recursion_sett |
Definition at line 203 of file value_set_fi.h.
typedef std::unordered_set<unsigned int> value_set_fit::dynamic_object_id_sett |
Definition at line 190 of file value_set_fi.h.
typedef std::unordered_set<exprt, irep_hash> value_set_fit::expr_sett |
Definition at line 188 of file value_set_fi.h.
typedef std::unordered_set<idt, string_hash> value_set_fit::flatten_seent |
Definition at line 200 of file value_set_fi.h.
typedef std::unordered_set<idt, string_hash> value_set_fit::gvs_recursion_sett |
Definition at line 201 of file value_set_fi.h.
typedef irep_idt value_set_fit::idt |
Definition at line 54 of file value_set_fi.h.
Definition at line 106 of file value_set_fi.h.
typedef optionalt<mp_integer> value_set_fit::offsett |
Represents the offset into an object: either a unique integer offset, or an unknown value, represented by !offset
.
Definition at line 58 of file value_set_fi.h.
typedef std::unordered_set<idt, string_hash> value_set_fit::recfind_recursion_sett |
Definition at line 202 of file value_set_fi.h.
typedef std::unordered_map<idt, entryt, string_hash> value_set_fit::valuest |
Definition at line 199 of file value_set_fi.h.
|
inline |
Definition at line 30 of file value_set_fi.h.
|
inline |
Definition at line 225 of file value_set_fi.h.
References get_entry().
Referenced by add_vars(), and do_function_call().
|
inline |
Definition at line 230 of file value_set_fi.h.
References get_entry(), value_set_fit::entryt::identifier, and value_set_fit::entryt::suffix.
|
inline |
Definition at line 250 of file value_set_fi.h.
References add_var().
Referenced by value_set_analysis_fit::add_vars().
void value_set_fit::apply_code | ( | const exprt & | code, |
const namespacet & | ns | ||
) |
Definition at line 1409 of file value_set_fi.cpp.
References assign(), do_free(), forall_operands, from_function, irept::get(), irept::id(), id2string(), exprt::op0(), exprt::op1(), exprt::operands(), irept::pretty(), to_string(), exprt::type(), and UNREACHABLE.
Referenced by value_set_domain_fit::transform().
void value_set_fit::assign | ( | const exprt & | lhs, |
const exprt & | rhs, | ||
const namespacet & | ns | ||
) |
Definition at line 957 of file value_set_fi.cpp.
References assign_rec(), base_type_eq(), struct_union_typet::components(), exprt::copy_to_operands(), namespace_baset::follow(), forall_operands, format(), get_value_set(), irept::id(), index_type(), irept::is_nil(), exprt::op0(), exprt::op1(), exprt::op2(), exprt::operands(), irept::pretty(), irept::set(), typet::subtype(), to_struct_union_type(), and exprt::type().
Referenced by apply_code(), do_end_function(), and do_function_call().
|
protected |
Definition at line 1195 of file value_set_fi.cpp.
References value_set_fit::object_map_dt::begin(), changed, DATA_INVARIANT, dynamic_object(), value_set_fit::object_map_dt::end(), namespace_baset::follow(), forall_objects, format(), irept::get(), get_entry(), symbol_exprt::get_identifier(), get_reference_set_sharing(), irept::get_string(), get_value_set_rec(), has_prefix(), irept::id(), id2string(), irept::id_string(), irept::is_nil(), make_union(), value_set_fit::entryt::object_map, object_numbering, unary_exprt::op(), exprt::op0(), exprt::operands(), reference_counting< T >::read(), typet::subtype(), to_dynamic_object_expr(), to_expr(), to_string(), to_symbol_expr(), to_typecast_expr(), exprt::type(), and values.
Referenced by assign().
|
inline |
Definition at line 220 of file value_set_fi.h.
References values.
Referenced by value_set_domain_fit::clear(), and value_set_domain_fit::initialize().
Definition at line 687 of file value_set_fi.cpp.
References irept::id(), exprt::op0(), exprt::operands(), and exprt::type().
void value_set_fit::do_end_function | ( | const exprt & | lhs, |
const namespacet & | ns | ||
) |
Definition at line 1396 of file value_set_fi.cpp.
References assign(), from_function, irept::is_nil(), to_string(), and exprt::type().
Referenced by value_set_domain_fit::transform().
|
protected |
Definition at line 1118 of file value_set_fi.cpp.
References changed, dynamic_object(), flatten(), forall_objects, get_value_set(), irept::id(), value_set_fit::entryt::identifier, insert(), exprt::is_true(), value_set_fit::entryt::object_map, object_numbering, reference_counting< T >::read(), to_dynamic_object_expr(), exprt::type(), dynamic_object_exprt::valid(), and values.
Referenced by apply_code().
void value_set_fit::do_function_call | ( | const irep_idt & | function, |
const exprt::operandst & | arguments, | ||
const namespacet & | ns | ||
) |
Definition at line 1347 of file value_set_fi.cpp.
References add_var(), assign(), dstringt::empty(), id2string(), namespacet::lookup(), code_typet::parameters(), to_code_type(), to_string(), and symbolt::type.
Referenced by value_set_domain_fit::transform().
|
protected |
Definition at line 139 of file value_set_fi.cpp.
References flatten_rec(), value_set_fit::entryt::identifier, and value_set_fit::entryt::suffix.
Referenced by do_free(), get_reference_set(), get_reference_set_sharing_rec(), get_value_set(), and output().
|
protected |
Definition at line 155 of file value_set_fi.cpp.
References value_set_fit::object_map_dt::begin(), value_set_fit::object_map_dt::end(), forall_objects, Forall_objects, irept::get(), irept::id(), id2string(), value_set_fit::entryt::identifier, insert(), value_set_fit::entryt::object_map, object_numbering, reference_counting< T >::read(), typet::subtype(), value_set_fit::entryt::suffix, exprt::type(), values, and reference_counting< T >::write().
Referenced by flatten().
Definition at line 235 of file value_set_fi.h.
Referenced by add_var(), and assign_rec().
Definition at line 240 of file value_set_fi.h.
References id2string(), value_set_fit::entryt::identifier, r, value_set_fit::entryt::suffix, and values.
void value_set_fit::get_reference_set | ( | const exprt & | expr, |
expr_sett & | expr_set, | ||
const namespacet & | ns | ||
) | const |
Definition at line 705 of file value_set_fi.cpp.
References value_set_fit::object_map_dt::begin(), value_set_fit::object_map_dt::end(), flatten(), forall_objects, irept::get(), get_reference_set_sharing(), irept::id(), object_numbering, reference_counting< T >::read(), to_expr(), exprt::type(), values, and reference_counting< T >::write().
Referenced by value_set_domain_fit::get_reference_set().
|
protected |
Definition at line 753 of file value_set_fi.cpp.
References forall_objects, reference_counting< T >::read(), and to_expr().
Referenced by assign_rec(), get_reference_set(), get_reference_set_sharing_rec(), and get_value_set_rec().
|
inlineprotected |
Definition at line 323 of file value_set_fi.h.
References get_reference_set_sharing_rec().
|
protected |
Definition at line 765 of file value_set_fi.cpp.
References value_set_fit::object_map_dt::begin(), value_set_fit::object_map_dt::end(), flatten(), namespace_baset::follow(), forall_objects, format(), from_integer(), irept::get(), get_reference_set_sharing(), get_value_set_rec(), irept::id(), irept::id_string(), index_type(), insert(), exprt::is_zero(), exprt::make_typecast(), object_numbering, offset_is_zero(), exprt::op0(), exprt::op1(), exprt::op2(), exprt::operands(), reference_counting< T >::read(), typet::subtype(), to_integer(), exprt::type(), values, and reference_counting< T >::write().
Referenced by get_reference_set_sharing().
void value_set_fit::get_value_set | ( | const exprt & | expr, |
std::list< exprt > & | dest, | ||
const namespacet & | ns | ||
) | const |
Definition at line 296 of file value_set_fi.cpp.
References value_set_fit::object_map_dt::begin(), value_set_fit::object_map_dt::end(), flatten(), forall_objects, format(), object_numbering, reference_counting< T >::read(), to_expr(), values, and reference_counting< T >::write().
Referenced by assign(), do_free(), and value_set_analysis_fit::get_values().
|
protected |
Definition at line 357 of file value_set_fi.cpp.
References get_value_set_rec(), simplify(), and exprt::type().
|
protected |
Definition at line 369 of file value_set_fi.cpp.
References alloc_adapter_prefix, value_set_fit::object_map_dt::begin(), DATA_INVARIANT, dynamic_object(), value_set_fit::object_map_dt::end(), irept::find(), namespace_baset::follow(), forall_objects, forall_operands, format(), from_function, from_target_index, irept::get(), get_reference_set_sharing(), irept::get_string(), has_prefix(), irept::id(), id2string(), irept::id_string(), insert(), exprt::is_constant(), irept::is_not_nil(), make_union(), object_numbering, offset_is_zero(), exprt::op0(), exprt::op1(), exprt::op2(), exprt::operands(), reference_counting< T >::read(), typet::subtype(), to_dynamic_object_expr(), to_integer(), to_string(), to_symbol_expr(), exprt::type(), and values.
Referenced by assign_rec(), get_reference_set_sharing_rec(), and get_value_set().
|
inline |
Definition at line 113 of file value_set_fi.h.
Referenced by do_free(), flatten_rec(), get_reference_set_sharing_rec(), get_value_set_rec(), insert(), and make_union().
|
inline |
Definition at line 118 of file value_set_fi.h.
References insert(), template_numberingt< Map >::number(), and object_numbering.
|
inline |
Definition at line 123 of file value_set_fi.h.
References insert(), template_numberingt< Map >::number(), and object_numbering.
|
inline |
Definition at line 131 of file value_set_fi.h.
References value_set_fit::object_map_dt::end(), value_set_fit::object_map_dt::find(), reference_counting< T >::read(), and reference_counting< T >::write().
|
inline |
Definition at line 166 of file value_set_fi.h.
References insert(), template_numberingt< Map >::number(), and object_numbering.
|
inline |
Definition at line 215 of file value_set_fi.h.
References values.
bool value_set_fit::make_union | ( | object_mapt & | dest, |
const object_mapt & | src | ||
) | const |
Definition at line 283 of file value_set_fi.cpp.
References forall_objects, insert(), and reference_counting< T >::read().
Referenced by assign_rec(), get_value_set_rec(), and make_union().
bool value_set_fit::make_union | ( | const valuest & | new_values | ) |
Definition at line 244 of file value_set_fi.cpp.
References changed, has_prefix(), id2string(), make_union(), value_set_fit::entryt::object_map, UNREACHABLE, and values.
|
inline |
Definition at line 274 of file value_set_fi.h.
References make_union(), and values.
|
inline |
Definition at line 59 of file value_set_fi.h.
Referenced by get_reference_set_sharing_rec(), and get_value_set_rec().
void value_set_fit::output | ( | const namespacet & | ns, |
std::ostream & | out | ||
) | const |
Definition at line 45 of file value_set_fi.cpp.
References symbolt::display_name(), value_set_fit::object_map_dt::end(), flatten(), forall_objects, from_expr(), from_type(), has_prefix(), irept::id(), id2string(), value_set_fit::entryt::identifier, integer2string(), namespacet::lookup(), symbolt::name, object_numbering, reference_counting< T >::read(), value_set_fit::entryt::suffix, exprt::type(), and values.
Referenced by value_set_domain_fit::output().
|
inline |
Definition at line 108 of file value_set_fi.h.
References reference_counting< T >::write().
|
inline |
Definition at line 42 of file value_set_fi.h.
References from_function, from_target_index, and function_numbering.
Referenced by value_set_domain_fit::transform().
|
inline |
Definition at line 48 of file value_set_fi.h.
References function_numbering, to_function, and to_target_index.
Referenced by value_set_domain_fit::transform().
exprt value_set_fit::to_expr | ( | const object_map_dt::value_type & | it | ) | const |
Definition at line 224 of file value_set_fi.cpp.
References from_integer(), index_type(), object_descriptor_exprt::object(), object_numbering, object_descriptor_exprt::offset(), and exprt::type().
Referenced by assign_rec(), get_reference_set(), get_reference_set_sharing(), and get_value_set().
bool value_set_fit::changed |
Definition at line 265 of file value_set_fi.h.
Referenced by assign_rec(), do_free(), make_union(), and value_set_domain_fit::transform().
unsigned value_set_fit::from_function |
Definition at line 37 of file value_set_fi.h.
Referenced by apply_code(), do_end_function(), get_value_set_rec(), value_set_analysis_fit::get_values(), and set_from().
unsigned value_set_fit::from_target_index |
Definition at line 38 of file value_set_fi.h.
Referenced by get_value_set_rec(), value_set_analysis_fit::get_values(), and set_from().
|
static |
Definition at line 40 of file value_set_fi.h.
Referenced by value_set_analysis_fit::get_values(), set_from(), and set_to().
|
static |
Definition at line 39 of file value_set_fi.h.
Referenced by assign_rec(), do_free(), flatten_rec(), get_reference_set(), get_reference_set_sharing_rec(), get_value_set(), get_value_set_rec(), insert(), output(), and to_expr().
unsigned value_set_fit::to_function |
Definition at line 37 of file value_set_fi.h.
Referenced by value_set_analysis_fit::get_values(), and set_to().
unsigned value_set_fit::to_target_index |
Definition at line 38 of file value_set_fi.h.
Referenced by value_set_analysis_fit::get_values(), and set_to().
valuest value_set_fit::values |
Definition at line 263 of file value_set_fi.h.
Referenced by assign_rec(), clear(), do_free(), flatten_rec(), get_entry(), get_reference_set(), get_reference_set_sharing_rec(), get_value_set(), get_value_set_rec(), make_any(), make_union(), and output().