Go to the documentation of this file.
35 const bool found_l0 = !ns.
lookup(obj_identifier, s);
63 std::pair<ssa_exprt, std::size_t> result = *old_value;
114 for(
const auto &delta_item : delta_view)
116 if(!delta_item.is_in_both_maps())
122 if(delta_item.m != delta_item.get_other_map_value())
133 return !r_opt ? 0 : r_opt->get().second;
145 std::pair<ssa_exprt, std::size_t> copy = r_opt->get();
175 if(type.
id() == ID_array)
178 array_type.element_type() =
182 else if(type.
id() == ID_struct || type.
id() == ID_union)
190 else if(type.
id() == ID_pointer)
200 if(type.
id() == ID_array)
202 else if(type.
id() == ID_struct || type.
id() == ID_union)
219 if(expr.
id() == ID_symbol)
221 const auto &type = expr.
type();
223 return type.
id() != ID_code && type.id() != ID_mathematical_function;
226 if(
to_ssa_expr(expr).get_original_expr().type() != type)
245 expr.
id() == ID_address_of &&
251 expr.
id() == ID_address_of &&
258 else if(expr.
id() == ID_symbol)
260 const auto &type = expr.
type();
262 return type.
id() != ID_code && type.id() != ID_mathematical_function;
265 if(
to_ssa_expr(expr).get_original_expr().type() != type)
268 else if(expr.
id() == ID_nil)
std::vector< delta_view_itemt > delta_viewt
Delta view of the key-value pairs in two maps.
const componentst & components() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void set_level_0(std::size_t i)
void get_delta_view(const sharing_mapt &other, delta_viewt &delta_view, const bool only_common=true) const
Get a delta view of the elements in the map.
bool check_renaming_l1(const exprt &expr)
Check that expr is correctly renamed to level 1 and return true in case an error is detected.
#define Forall_operands(it, expr)
void restore_from(const symex_level1t &other)
Insert the content of other into this renaming.
renamedt< ssa_exprt, L2 > operator()(renamedt< ssa_exprt, L1 > l1_expr) const
Set L2 tag to correspond to the current count of the identifier of l1_expr's.
const irep_idt get_level_0() const
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
static irep_idt guard_identifier()
The type of an expression, extends irept.
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
Base type for structs and unions.
typet type
Type of symbol.
std::function< std::size_t(const irep_idt &)> fresh_l2_name_provider
const type_with_subtypet & to_type_with_subtype(const typet &type)
Base class for all expressions.
irep_idt get_object_name() const
std::vector< componentt > componentst
auto component(T &struct_expr, const irep_idt &name, const namespacet &ns) -> decltype(struct_expr.op0())
std::size_t increase_generation(const irep_idt &l1_identifier, const ssa_exprt &lhs, std::function< std::size_t(const irep_idt &)> fresh_l2_name_provider)
Allocates a fresh L2 name for the given L1 identifier, and makes it the latest generation on this pat...
renamedt< ssa_exprt, L0 > symex_level0(ssa_exprt ssa_expr, const namespacet &ns, std::size_t thread_nr)
Set the level 0 renaming of SSA expressions.
const exprt & get_original_expr() const
const underlyingt & get() const
void set_level_1(std::size_t i)
Expression providing an SSA-renamed symbol of expressions.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
typet & type()
Return the type of the expression.
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
bool is_ssa_expr(const exprt &expr)
const ssa_exprt & to_ssa_expr(const exprt &expr)
Cast a generic exprt to an ssa_exprt.
const std::string & id2string(const irep_idt &d)
#define forall_operands(it, expr)
const irep_idt & get_identifier() const
symex_renaming_levelt current_names
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
const irep_idt get_level_2() const
exprt get_original_name(exprt expr)
Undo all levels of renaming.
const irep_idt & id() const
void insert(const renamedt< ssa_exprt, L0 > &ssa, std::size_t index)
Assume ssa is not already known.
nonstd::optional< T > optionalt
bool has_key(const key_type &k) const
Check if key is in map.
void insert(const key_type &k, valueU &&m)
Insert element, element must not exist in map.
void replace(const key_type &k, valueU &&m)
Replace element, element must exist in map.
const irep_idt get_l1_object_identifier() const
void set_level_2(std::size_t i)
symex_renaming_levelt current_names
const irep_idt get_level_1() const
const typet & base_type() const
The type of the data what we point to.
bool check_renaming(const typet &type)
Check that type is correctly renamed to level 2 and return true in case an error is detected.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
Functor to set the level 1 renaming of SSA expressions.
bool has(const renamedt< ssa_exprt, L0 > &ssa) const
renamedt< ssa_exprt, L1 > operator()(renamedt< ssa_exprt, L0 > l0_expr) const
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
unsigned latest_index(const irep_idt &identifier) const
Counter corresponding to an identifier.
Wrapper for expressions or types which have been renamed up to a given level.
bool get_bool(const irep_idt &name) const
optionalt< std::reference_wrapper< const mapped_type > > find(const key_type &k) const
Find element.
optionalt< std::pair< ssa_exprt, std::size_t > > insert_or_replace(const renamedt< ssa_exprt, L0 > &ssa, std::size_t index)
Set the index for ssa to index.