51 if(src.
id() == ID_union_tag)
54 if(src.
id() == ID_struct_tag)
109 if(expr.
id()==ID_symbol)
152 symbol_table_baset::symbolst::const_iterator it;
160 symbol=&(it->second);
171 symbol=&(it->second);
188 m = std::max(m, st->next_unused_suffix(prefix));
203 symbol_table_baset::symbolst::const_iterator s_it;
205 for(symbol_table_listt::const_iterator
210 s_it=(*c_it)->symbols.find(name);
212 if(s_it!=(*c_it)->symbols.end())
214 symbol=&(s_it->second);
const c_enum_typet & to_c_enum_type(const typet &type)
Cast a typet to a c_enum_typet.
const union_tag_typet & to_union_tag_type(const typet &type)
Cast a typet to a union_tag_typet.
const union_typet & to_union_type(const typet &type)
Cast a typet to a union_typet.
C enum tag type, i.e., c_enum_typet with an identifier.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
const irep_idt & id() const
const symbolt & lookup(const irep_idt &name) const
Lookup a symbol in the namespace.
std::size_t smallest_unused_suffix(const std::string &prefix) const override
See documentation for namespace_baset::smallest_unused_suffix().
symbol_table_listt symbol_table_list
const symbolt & lookup(const irep_idt &name) const
Lookup a symbol in the namespace.
const typet & follow(const typet &) const
Resolve type symbol to the type it points to.
void follow_macros(exprt &) const
Follow macros to their values in a given expression.
const union_typet & follow_tag(const union_tag_typet &) const
Follow type tag of union type.
virtual ~namespace_baset()
const symbolt & lookup(const irep_idt &name) const
Lookup a symbol in the namespace.
const symbol_table_baset * symbol_table1
const symbol_table_baset * symbol_table2
std::size_t smallest_unused_suffix(const std::string &prefix) const override
See documentation for namespace_baset::smallest_unused_suffix().
A struct or union tag type.
A struct tag type, i.e., struct_typet with an identifier.
Structure type, corresponds to C style structs.
Base type for structs and unions.
Expression to hold a symbol (variable)
const irep_idt & get_identifier() const
std::size_t next_unused_suffix(const std::string &prefix, std::size_t start_number) const
Find smallest unused integer i so that prefix + std::to_string(i) does not exist in the list symbols.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
typet type
Type of symbol.
exprt value
Initial value of symbol.
A tag-based type, i.e., typet with an identifier.
const irep_idt & get_identifier() const
The type of an expression, extends irept.
A union tag type, i.e., union_typet with an identifier.
#define Forall_operands(it, expr)
#define CHECK_RETURN(CONDITION)
API to expression classes.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const struct_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.