35 if(symbol.
type.
id()==ID_pointer)
45 new_symbol.
type.
set(ID_C_is_failed_symbol,
true);
47 symbol.
type.
set(ID_C_failed_symbol, new_symbol.
name);
49 if(new_symbol.
type.
id()==ID_pointer)
52 symbol_table.
insert(std::move(new_symbol));
67 if(symbol.
type.
get(ID_C_failed_symbol)!=
"")
81 std::list<const symbolt *> symbol_list;
82 for(
auto &named_symbol : symbol_table.
symbols)
83 symbol_list.push_back(&(named_symbol.second));
85 for(
const symbolt *symbol : symbol_list)
irep_idt name
The unique identifier.
const std::string & id2string(const irep_idt &d)
irep_idt mode
Language mode.
virtual symbolt * get_writeable(const irep_idt &name)=0
Find a symbol in the symbol table for read-write access.
exprt value
Initial value of symbol.
irep_idt module
Name of module the symbol belongs to.
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
void add_failed_symbol_if_needed(const symbolt &symbol, symbol_table_baset &symbol_table)
Create a failed-dereference symbol for the given base symbol if it is pointer-typed, an lvalue, and doesn't already have one.
const irep_idt & id() const
exprt get_failed_symbol(const symbol_exprt &expr, const namespacet &ns)
Get the failed-dereference symbol for the given symbol.
irep_idt failed_symbol_id(const irep_idt &id)
Get the name of the special symbol used to denote an unknown referee pointed to by a given pointer-ty...
API to expression classes.
const irep_idt & get(const irep_namet &name) const
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
typet type
Type of symbol.
void add_failed_symbols(symbol_table_baset &symbol_table)
Create a failed-dereference symbol for all symbols in the given table that need one (i...
Base class for all expressions.
irep_idt base_name
Base (non-scoped) name.
The symbol table base class interface.
virtual std::pair< symbolt &, bool > insert(symbolt symbol)=0
Move or copy a new symbol to the symbol table.
Expression to hold a symbol (variable)
void add_failed_symbol(symbolt &symbol, symbol_table_baset &symbol_table)
Create a failed-dereference symbol for the given base symbol if it is pointer-typed; if not...
const typet & subtype() const
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See namespace_baset::lookup().
void set(const irep_namet &name, const irep_idt &value)