Go to the documentation of this file.
36 exprt * modifiable_expr =
nullptr;
41 modifiable_expr = &it.mutate();
46 if(it->id()==ID_symbol)
48 expr_mapt::const_iterator entry =
54 modifiable_expr = &it.mutate();
60 const typet &c_sizeof_type =
61 static_cast<const typet&
>(it->find(ID_C_c_sizeof_type));
65 modifiable_expr = &it.mutate();
67 rename(
static_cast<typet&
>(modifiable_expr->
add(ID_C_c_sizeof_type)));
70 const typet &va_arg_type =
71 static_cast<const typet&
>(it->find(ID_C_va_arg_type));
75 modifiable_expr = &it.mutate();
77 rename(
static_cast<typet&
>(modifiable_expr->
add(ID_C_va_arg_type)));
96 if(dest.
id()==ID_symbol)
106 const irept &c_sizeof_type=dest.
find(ID_C_c_sizeof_type);
112 const irept &va_arg_type=dest.
find(ID_C_va_arg_type);
136 if(dest.
id()==ID_struct ||
145 else if(dest.
id()==ID_code)
155 expr_mapt::const_iterator e_it =
expr_map.find(p.get_identifier());
159 p.set_identifier(e_it->second);
164 else if(dest.
id()==ID_c_enum_tag ||
165 dest.
id()==ID_struct_tag ||
166 dest.
id()==ID_union_tag)
168 type_mapt::const_iterator it=
177 else if(dest.
id()==ID_array)
200 if(dest.
id()==ID_struct ||
206 for(
const auto &c : struct_union_type.
components())
210 else if(dest.
id()==ID_code)
225 else if(dest.
id()==ID_c_enum_tag ||
226 dest.
id()==ID_struct_tag ||
227 dest.
id()==ID_union_tag)
229 else if(dest.
id()==ID_array)
const componentst & components() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void set_identifier(const irep_idt &identifier)
const typet & subtype() const
depth_iteratort depth_begin()
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
bool have_to_rename(const exprt &dest) const
The type of an expression, extends irept.
Base type for structs and unions.
irept & add(const irep_namet &name)
const irept & find(const irep_namet &name) const
Base class for all expressions.
Expression to hold a symbol (variable)
const exprt & size() const
typet & type()
Return the type of the expression.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const tag_typet & to_tag_type(const typet &type)
Cast a typet to a tag_typet.
void insert(const class symbol_exprt &old_expr, const class symbol_exprt &new_expr)
#define forall_operands(it, expr)
const irep_idt & get_identifier() const
#define Forall_subtypes(it, type)
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const irep_idt & id() const
const parameterst & parameters() const
#define forall_subtypes(it, type)
virtual ~rename_symbolt()
Forward depth-first search iterators These iterators' copy operations are expensive,...
void insert_expr(const irep_idt &old_id, const irep_idt &new_id)
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
const typet & return_type() const
There are a large number of kinds of tree structured or tree-like data in CPROVER.
bool rename(exprt &dest) const
depth_iteratort depth_end()
API to expression classes.
void set_identifier(const irep_idt &identifier)