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)
105 const irept &c_sizeof_type=dest.
find(ID_C_c_sizeof_type);
111 const irept &va_arg_type=dest.
find(ID_C_va_arg_type);
137 if(dest.
id()==ID_struct ||
146 else if(dest.
id()==ID_code)
156 expr_mapt::const_iterator e_it =
expr_map.find(p.get_identifier());
160 p.set_identifier(e_it->second);
165 else if(dest.
id()==ID_c_enum_tag ||
166 dest.
id()==ID_struct_tag ||
167 dest.
id()==ID_union_tag)
169 type_mapt::const_iterator it=
178 else if(dest.
id()==ID_array)
203 if(dest.
id()==ID_struct ||
209 for(
const auto &c : struct_union_type.
components())
213 else if(dest.
id()==ID_code)
228 else if(dest.
id()==ID_c_enum_tag ||
229 dest.
id()==ID_struct_tag ||
230 dest.
id()==ID_union_tag)
232 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)
The type of an expression, extends irept.
const typet & subtype() const
#define forall_operands(it, expr)
Forward depth-first search iterators These iterators' copy operations are expensive,...
static optionalt< smt_termt > get_identifier(const exprt &expr, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_handle_identifiers, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_identifiers)
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)