cprover
|
#include <value_set_fivrns.h>
Classes | |
struct | entryt |
class | object_map_dt |
class | objectt |
Public Types | |
typedef irep_idt | idt |
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 |
Public Member Functions | |
value_set_fivrnst () | |
void | set_from (const irep_idt &function, unsigned inx) |
void | set_to (const irep_idt &function, unsigned inx) |
exprt | to_expr (object_map_dt::const_iterator it) const |
void | set (object_mapt &dest, object_map_dt::const_iterator it) const |
bool | insert_to (object_mapt &dest, object_map_dt::const_iterator it) const |
bool | insert_to (object_mapt &dest, const exprt &src) const |
bool | insert_to (object_mapt &dest, const exprt &src, const mp_integer &offset) const |
bool | insert_to (object_mapt &dest, unsigned n, const objectt &object) const |
bool | insert_to (object_mapt &dest, const exprt &expr, const objectt &object) const |
bool | insert_from (object_mapt &dest, object_map_dt::const_iterator it) const |
bool | insert_from (object_mapt &dest, const exprt &src) const |
bool | insert_from (object_mapt &dest, const exprt &src, const mp_integer &offset) const |
bool | insert_from (object_mapt &dest, unsigned n, const objectt &object) const |
bool | insert_from (object_mapt &dest, const exprt &expr, const objectt &object) const |
void | get_value_set (const exprt &expr, std::list< exprt > &expr_set, 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) |
entryt & | get_temporary_entry (const idt &id, const std::string &suffix) |
void | add_vars (const std::list< entryt > &vars) |
void | output (const namespacet &ns, std::ostream &out) const |
void | output_entry (const entryt &e, const namespacet &ns, std::ostream &out) const |
bool | make_union (object_mapt &dest, const object_mapt &src) const |
bool | make_valid_union (object_mapt &dest, const object_mapt &src) const |
void | copy_objects (object_mapt &dest, const object_mapt &src) const |
void | apply_code (const exprt &code, const namespacet &ns) |
bool | handover () |
void | assign (const exprt &lhs, const exprt &rhs, const namespacet &ns, bool add_to_sets=false) |
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 |
valuest | temporary_values |
Static Public Attributes | |
static object_numberingt | object_numbering |
static hash_numbering< irep_idt, irep_id_hash > | function_numbering |
Protected Member Functions | |
void | get_value_set_rec (const exprt &expr, object_mapt &dest, const std::string &suffix, const typet &original_type, const namespacet &ns) const |
void | get_value_set (const exprt &expr, object_mapt &dest, const namespacet &ns) const |
void | get_reference_set (const exprt &expr, object_mapt &dest, const namespacet &ns) const |
void | get_reference_set_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, bool add_to_sets) |
void | do_free (const exprt &op, const namespacet &ns) |
Definition at line 27 of file value_set_fivrns.h.
typedef std::unordered_set<unsigned int> value_set_fivrnst::dynamic_object_id_sett |
Definition at line 223 of file value_set_fivrns.h.
typedef std::unordered_set<exprt, irep_hash> value_set_fivrnst::expr_sett |
Definition at line 221 of file value_set_fivrns.h.
typedef irep_idt value_set_fivrnst::idt |
Definition at line 51 of file value_set_fivrns.h.
Definition at line 143 of file value_set_fivrns.h.
typedef std::unordered_map<idt, entryt, string_hash> value_set_fivrnst::valuest |
Definition at line 228 of file value_set_fivrns.h.
|
inline |
Definition at line 30 of file value_set_fivrns.h.
|
inline |
Definition at line 250 of file value_set_fivrns.h.
References get_entry().
Referenced by add_vars(), apply_code(), do_end_function(), and do_function_call().
|
inline |
Definition at line 255 of file value_set_fivrns.h.
References get_entry(), value_set_fivrnst::entryt::identifier, and value_set_fivrnst::entryt::suffix.
|
inline |
Definition at line 281 of file value_set_fivrns.h.
References add_var(), output(), and output_entry().
Referenced by value_set_analysis_fivrnst::add_vars().
void value_set_fivrnst::apply_code | ( | const exprt & | code, |
const namespacet & | ns | ||
) |
Definition at line 1228 of file value_set_fivrns.cpp.
References add_var(), assign(), do_free(), forall_operands, from_function, irept::get(), irept::id(), id2string(), exprt::op0(), exprt::op1(), exprt::operands(), irept::pretty(), and exprt::type().
Referenced by value_set_domain_fivrnst::transform().
void value_set_fivrnst::assign | ( | const exprt & | lhs, |
const exprt & | rhs, | ||
const namespacet & | ns, | ||
bool | add_to_sets = false |
||
) |
Definition at line 768 of file value_set_fivrns.cpp.
References assign_rec(), base_type_eq(), struct_union_typet::components(), exprt::copy_to_operands(), namespace_baset::follow(), forall_operands, from_expr(), get_value_set(), irept::id(), index_type(), exprt::op0(), exprt::op1(), exprt::op2(), exprt::operands(), irept::pretty(), irept::set(), typet::subtype(), to_struct_type(), and exprt::type().
Referenced by apply_code(), do_end_function(), and do_function_call().
|
protected |
Definition at line 1004 of file value_set_fivrns.cpp.
References value_set_fivrnst::object_map_dt::begin(), dynamic_object(), value_set_fivrnst::object_map_dt::end(), namespace_baset::follow(), forall_objects, get_entry(), dynamic_object_exprt::get_instance(), get_reference_set(), get_temporary_entry(), has_prefix(), irept::id(), id2string(), make_union(), make_valid_union(), value_set_fivrnst::entryt::object_map, object_numbering, typecast_exprt::op(), reference_counting< T >::read(), to_dynamic_object_expr(), to_expr(), to_typecast_expr(), and values.
Referenced by assign(), and get_reference_set().
|
inline |
Definition at line 245 of file value_set_fivrns.h.
References values.
Referenced by value_set_domain_fivrnst::clear(), and value_set_domain_fivrnst::initialize().
void value_set_fivrnst::copy_objects | ( | object_mapt & | dest, |
const object_mapt & | src | ||
) | const |
Definition at line 252 of file value_set_fivrns.cpp.
References forall_valid_objects, from_function, from_target_index, reference_counting< T >::read(), value_set_fivrnst::object_map_dt::validity_ranges, and reference_counting< T >::write().
Referenced by get_value_set_rec().
Definition at line 588 of file value_set_fivrns.cpp.
References irept::id(), exprt::op0(), exprt::operands(), and exprt::type().
Referenced by get_reference_set().
void value_set_fivrnst::do_end_function | ( | const exprt & | lhs, |
const namespacet & | ns | ||
) |
Definition at line 1213 of file value_set_fivrns.cpp.
References add_var(), assign(), from_function, irept::is_nil(), and exprt::type().
Referenced by value_set_domain_fivrnst::transform().
|
protected |
Definition at line 926 of file value_set_fivrns.cpp.
References dynamic_object(), forall_objects, forall_valid_objects, dynamic_object_exprt::get_instance(), get_temporary_entry(), get_value_set(), irept::id(), insert_to(), exprt::is_true(), value_set_fivrnst::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(), and get_reference_set().
void value_set_fivrnst::do_function_call | ( | const irep_idt & | function, |
const exprt::operandst & | arguments, | ||
const namespacet & | ns | ||
) |
Definition at line 1146 of file value_set_fivrns.cpp.
References add_var(), assign(), from_function, from_target_index, id2string(), namespacet::lookup(), make_union(), code_typet::parameters(), temporary_values, to_code_type(), to_function, to_target_index, symbolt::type, and values.
Referenced by value_set_domain_fivrnst::transform().
Definition at line 260 of file value_set_fivrns.h.
Referenced by add_var(), and assign_rec().
Definition at line 265 of file value_set_fivrns.h.
References id2string(), value_set_fivrnst::entryt::identifier, r, value_set_fivrnst::entryt::suffix, and values.
void value_set_fivrnst::get_reference_set | ( | const exprt & | expr, |
expr_sett & | expr_set, | ||
const namespacet & | ns | ||
) | const |
Definition at line 606 of file value_set_fivrns.cpp.
References forall_objects, reference_counting< T >::read(), and to_expr().
Referenced by assign_rec(), value_set_domain_fivrnst::get_reference_set(), get_reference_set_rec(), and get_value_set_rec().
|
inlineprotected |
Definition at line 355 of file value_set_fivrns.h.
References assign_rec(), dereference_rec(), do_free(), and get_reference_set_rec().
|
protected |
Definition at line 618 of file value_set_fivrns.cpp.
References exprt::copy_to_operands(), namespace_baset::follow(), forall_objects, from_expr(), from_integer(), irept::get(), get_reference_set(), get_value_set_rec(), irept::id(), irept::id_string(), index_type(), insert_from(), exprt::is_zero(), object_numbering, value_set_fivrnst::objectt::offset, value_set_fivrnst::objectt::offset_is_set, value_set_fivrnst::objectt::offset_is_zero(), exprt::op0(), exprt::op1(), exprt::op2(), exprt::operands(), reference_counting< T >::read(), typet::subtype(), to_integer(), and exprt::type().
Referenced by get_reference_set().
|
inline |
Definition at line 275 of file value_set_fivrns.h.
References id2string(), and temporary_values.
Referenced by assign_rec(), and do_free().
void value_set_fivrnst::get_value_set | ( | const exprt & | expr, |
std::list< exprt > & | expr_set, | ||
const namespacet & | ns | ||
) | const |
Definition at line 266 of file value_set_fivrns.cpp.
References forall_objects, from_expr(), reference_counting< T >::read(), and to_expr().
Referenced by assign(), do_free(), and value_set_analysis_fivrnst::get_values().
|
protected |
Definition at line 284 of file value_set_fivrns.cpp.
References get_value_set_rec(), simplify(), and exprt::type().
|
protected |
Definition at line 295 of file value_set_fivrns.cpp.
References alloc_adapter_prefix, value_set_fivrnst::object_map_dt::begin(), copy_objects(), dynamic_object(), value_set_fivrnst::object_map_dt::end(), namespace_baset::follow(), forall_objects, forall_operands, from_function, from_target_index, dynamic_object_exprt::get_instance(), get_reference_set(), irept::get_string(), has_prefix(), irept::id(), id2string(), insert_from(), object_numbering, value_set_fivrnst::objectt::offset_is_set, reference_counting< T >::read(), dynamic_object_exprt::set_instance(), to_dynamic_object_expr(), to_integer(), exprt::type(), dynamic_object_exprt::valid(), and values.
Referenced by get_reference_set_rec(), and get_value_set().
bool value_set_fivrnst::handover | ( | void | ) |
Definition at line 1511 of file value_set_fivrns.cpp.
References Forall_valid_objects, id2string(), make_union(), value_set_fivrnst::object_map_dt::set_valid_at(), temporary_values, to_function, to_target_index, values, and reference_counting< T >::write().
Referenced by value_set_domain_fivrnst::transform().
|
inline |
Definition at line 178 of file value_set_fivrns.h.
Referenced by get_reference_set_rec(), get_value_set_rec(), and insert_from().
|
inline |
Definition at line 183 of file value_set_fivrns.h.
References insert_from(), hash_numbering< T, hash_fkt >::number(), and value_set_fivrnst::objectt::objectt().
|
inline |
Definition at line 188 of file value_set_fivrns.h.
References insert_from(), hash_numbering< T, hash_fkt >::number(), and value_set_fivrnst::objectt::objectt().
bool value_set_fivrnst::insert_from | ( | object_mapt & | dest, |
unsigned | n, | ||
const objectt & | object | ||
) | const |
Definition at line 1368 of file value_set_fivrns.cpp.
References value_set_fivrnst::object_map_dt::end(), value_set_fivrnst::object_map_dt::find(), from_function, from_target_index, value_set_fivrnst::objectt::offset, value_set_fivrnst::objectt::offset_is_set, value_set_fivrnst::object_map_dt::set_valid_at(), and reference_counting< T >::write().
|
inline |
Definition at line 198 of file value_set_fivrns.h.
References insert_from(), and hash_numbering< T, hash_fkt >::number().
|
inline |
Definition at line 150 of file value_set_fivrns.h.
Referenced by do_free(), insert_to(), make_union(), and make_valid_union().
|
inline |
Definition at line 155 of file value_set_fivrns.h.
References insert_to(), hash_numbering< T, hash_fkt >::number(), and value_set_fivrnst::objectt::objectt().
|
inline |
Definition at line 160 of file value_set_fivrns.h.
References insert_to(), hash_numbering< T, hash_fkt >::number(), and value_set_fivrnst::objectt::objectt().
bool value_set_fivrnst::insert_to | ( | object_mapt & | dest, |
unsigned | n, | ||
const objectt & | object | ||
) | const |
Definition at line 1327 of file value_set_fivrns.cpp.
References value_set_fivrnst::object_map_dt::end(), value_set_fivrnst::object_map_dt::find(), value_set_fivrnst::objectt::offset, value_set_fivrnst::objectt::offset_is_set, value_set_fivrnst::object_map_dt::set_valid_at(), to_function, to_target_index, and reference_counting< T >::write().
|
inline |
Definition at line 170 of file value_set_fivrns.h.
References insert_to(), and hash_numbering< T, hash_fkt >::number().
|
inline |
Definition at line 240 of file value_set_fivrns.h.
References values.
bool value_set_fivrnst::make_union | ( | object_mapt & | dest, |
const object_mapt & | src | ||
) | const |
Definition at line 222 of file value_set_fivrns.cpp.
References forall_objects, insert_to(), and reference_counting< T >::read().
Referenced by assign_rec(), do_function_call(), and handover().
bool value_set_fivrnst::make_valid_union | ( | object_mapt & | dest, |
const object_mapt & | src | ||
) | const |
Definition at line 237 of file value_set_fivrns.cpp.
References forall_valid_objects, insert_to(), and reference_counting< T >::read().
Referenced by assign_rec().
void value_set_fivrnst::output | ( | const namespacet & | ns, |
std::ostream & | out | ||
) | const |
Definition at line 57 of file value_set_fivrns.cpp.
References output_entry(), and values.
Referenced by add_vars(), and value_set_domain_fivrnst::output().
void value_set_fivrnst::output_entry | ( | const entryt & | e, |
const namespacet & | ns, | ||
std::ostream & | out | ||
) | const |
Definition at line 68 of file value_set_fivrns.cpp.
References symbolt::display_name(), value_set_fivrnst::object_map_dt::empty(), value_set_fivrnst::object_map_dt::end(), forall_valid_objects, from_expr(), from_function, from_target_index, from_type(), function_numbering, irept::id(), id2string(), value_set_fivrnst::entryt::identifier, integer2string(), namespacet::lookup(), symbolt::name, value_set_fivrnst::entryt::object_map, object_numbering, reference_counting< T >::read(), value_set_fivrnst::entryt::suffix, exprt::type(), and value_set_fivrnst::object_map_dt::validity_ranges.
Referenced by add_vars(), and output().
|
inline |
Definition at line 145 of file value_set_fivrns.h.
References reference_counting< T >::write().
|
inline |
Definition at line 39 of file value_set_fivrns.h.
References hash_numbering< T, hash_fkt >::number().
Referenced by value_set_analysis_fivrnst::output(), and value_set_domain_fivrnst::transform().
|
inline |
Definition at line 45 of file value_set_fivrns.h.
References hash_numbering< T, hash_fkt >::number().
Referenced by value_set_analysis_fivrnst::output(), and value_set_domain_fivrnst::transform().
exprt value_set_fivrnst::to_expr | ( | object_map_dt::const_iterator | it | ) | const |
Definition at line 202 of file value_set_fivrns.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(), and get_value_set().
unsigned value_set_fivrnst::from_function |
Definition at line 34 of file value_set_fivrns.h.
Referenced by apply_code(), copy_objects(), do_end_function(), do_function_call(), get_value_set_rec(), value_set_analysis_fivrnst::get_values(), insert_from(), and output_entry().
unsigned value_set_fivrnst::from_target_index |
Definition at line 35 of file value_set_fivrns.h.
Referenced by copy_objects(), do_function_call(), get_value_set_rec(), value_set_analysis_fivrnst::get_values(), insert_from(), and output_entry().
|
static |
Definition at line 37 of file value_set_fivrns.h.
Referenced by value_set_analysis_fivrnst::get_values(), and output_entry().
|
static |
Definition at line 36 of file value_set_fivrns.h.
Referenced by assign_rec(), do_free(), get_reference_set_rec(), get_value_set_rec(), output_entry(), and to_expr().
valuest value_set_fivrnst::temporary_values |
Definition at line 300 of file value_set_fivrns.h.
Referenced by do_function_call(), get_temporary_entry(), and handover().
unsigned value_set_fivrnst::to_function |
Definition at line 34 of file value_set_fivrns.h.
Referenced by do_function_call(), value_set_analysis_fivrnst::get_values(), handover(), and insert_to().
unsigned value_set_fivrnst::to_target_index |
Definition at line 35 of file value_set_fivrns.h.
Referenced by do_function_call(), value_set_analysis_fivrnst::get_values(), handover(), and insert_to().
valuest value_set_fivrnst::values |
Definition at line 299 of file value_set_fivrns.h.
Referenced by assign_rec(), clear(), do_free(), do_function_call(), get_entry(), get_value_set_rec(), handover(), make_any(), and output().