35 exprt * modifiable_expr =
nullptr;
40 modifiable_expr = &it.mutate();
45 if(it->id()==ID_symbol)
47 expr_mapt::const_iterator entry =
53 modifiable_expr = &it.mutate();
59 const typet &c_sizeof_type =
60 static_cast<const typet&
>(it->find(ID_C_c_sizeof_type));
64 modifiable_expr = &it.mutate();
66 rename(
static_cast<typet&
>(modifiable_expr->
add(ID_C_c_sizeof_type)));
69 const typet &va_arg_type =
70 static_cast<const typet&
>(it->find(ID_C_va_arg_type));
74 modifiable_expr = &it.mutate();
76 rename(
static_cast<typet&
>(modifiable_expr->
add(ID_C_va_arg_type)));
95 if(dest.
id()==ID_symbol)
101 for(
const auto &op : dest.
operands())
107 const irept &c_sizeof_type=dest.
find(ID_C_c_sizeof_type);
113 const irept &va_arg_type=dest.
find(ID_C_va_arg_type);
139 if(dest.
id()==ID_struct ||
148 else if(dest.
id()==ID_code)
159 expr_mapt::const_iterator e_it =
expr_map.find(p.get_identifier());
163 p.set_identifier(e_it->second);
168 const exprt &spec_assigns =
169 static_cast<const exprt &
>(dest.
find(ID_C_spec_assigns));
176 const exprt &spec_frees =
177 static_cast<const exprt &
>(dest.
find(ID_C_spec_frees));
184 const exprt &spec_ensures =
185 static_cast<const exprt &
>(dest.
find(ID_C_spec_ensures));
192 const exprt &spec_requires =
193 static_cast<const exprt &
>(dest.
find(ID_C_spec_requires));
200 else if(dest.
id()==ID_c_enum_tag ||
201 dest.
id()==ID_struct_tag ||
202 dest.
id()==ID_union_tag)
204 type_mapt::const_iterator it=
213 else if(dest.
id()==ID_array)
238 if(dest.
id()==ID_struct ||
244 for(
const auto &c : struct_union_type.
components())
248 else if(dest.
id()==ID_code)
263 const exprt &spec_assigns =
264 static_cast<const exprt &
>(dest.
find(ID_C_spec_assigns));
268 const exprt &spec_ensures =
269 static_cast<const exprt &
>(dest.
find(ID_C_spec_ensures));
273 const exprt &spec_requires =
274 static_cast<const exprt &
>(dest.
find(ID_C_spec_requires));
278 else if(dest.
id()==ID_c_enum_tag ||
279 dest.
id()==ID_struct_tag ||
280 dest.
id()==ID_union_tag)
282 else if(dest.
id()==ID_array)
const exprt & size() const
const typet & return_type() const
const parameterst & parameters() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
depth_iteratort depth_end()
depth_iteratort depth_begin()
typet & type()
Return the type of the expression.
There are a large number of kinds of tree structured or tree-like data in CPROVER.
const irept & find(const irep_idt &name) const
const irep_idt & id() const
irept & add(const irep_idt &name)
void insert(const class symbol_exprt &old_expr, const class symbol_exprt &new_expr)
virtual ~rename_symbolt()
bool have_to_rename(const exprt &dest) const
bool rename(exprt &dest) const
void insert_expr(const irep_idt &old_id, const irep_idt &new_id)
Base type for structs and unions.
const componentst & components() const
Expression to hold a symbol (variable)
void set_identifier(const irep_idt &identifier)
const irep_idt & get_identifier() const
void set_identifier(const irep_idt &identifier)
const irep_idt & get_identifier() const
The type of an expression, extends irept.
Forward depth-first search iterators These iterators' copy operations are expensive,...
API to expression classes.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
const tag_typet & to_tag_type(const typet &type)
Cast a typet to a tag_typet.
const type_with_subtypest & to_type_with_subtypes(const typet &type)
const type_with_subtypet & to_type_with_subtype(const typet &type)