64 if(src.
id() == ID_union_tag)
67 if(src.
id() == ID_struct_tag)
70 if(src.
id() != ID_symbol_type)
80 if(symbol->
type.
id() == ID_symbol_type)
95 symbol.
type.
id() == ID_union || symbol.
type.
id() == ID_incomplete_union);
107 symbol.
type.
id() == ID_struct || symbol.
type.
id() == ID_incomplete_struct);
119 symbol.
type.
id() == ID_c_enum || symbol.
type.
id() == ID_incomplete_c_enum);
127 if(expr.
id()==ID_symbol)
170 symbol_tablet::symbolst::const_iterator it;
178 symbol=&(it->second);
189 symbol=&(it->second);
206 m = std::max(m, st->next_unused_suffix(prefix));
221 symbol_tablet::symbolst::const_iterator s_it;
223 for(symbol_table_listt::const_iterator
228 s_it=(*c_it)->symbols.find(name);
230 if(s_it!=(*c_it)->symbols.end())
232 symbol=&(s_it->second);
The type of an expression, extends irept.
A tag-based type, i.e., typet with an identifier.
const irep_idt & get_identifier() const
symbol_table_listt symbol_table_list
const symbol_table_baset * symbol_table2
const irep_idt & get_identifier() const
const symbol_typet & to_symbol_type(const typet &type)
Cast a typet to a symbol_typet.
exprt value
Initial value of symbol.
A union tag type, i.e., union_typet with an identifier.
A struct tag type, i.e., struct_typet with an identifier.
#define CHECK_RETURN(CONDITION)
const typet & follow_tag(const union_tag_typet &) const
Follow type tag of union type.
const symbolt & lookup(const irep_idt &name) const
Lookup a symbol in the namespace.
virtual ~namespace_baset()
void follow_macros(exprt &) const
Follow macros to their values in a given expression.
const irep_idt & id() const
A reference into the symbol table.
std::size_t smallest_unused_suffix(const std::string &prefix) const override
See documentation for namespace_baset::smallest_unused_suffix().
const union_tag_typet & to_union_tag_type(const typet &type)
Cast a typet to a union_tag_typet.
API to expression classes.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const typet & follow(const typet &) const
Resolve type symbol to the type it points to.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const symbol_table_baset * symbol_table1
typet type
Type of symbol.
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
Base class for all expressions.
std::size_t smallest_unused_suffix(const std::string &prefix) const override
See documentation for namespace_baset::smallest_unused_suffix().
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.
#define Forall_operands(it, expr)
Expression to hold a symbol (variable)
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
C enum tag type, i.e., c_enum_typet with an identifier.
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
const irep_idt & get_identifier() const