10 #ifndef CPROVER_UTIL_NAMESPACE_H 11 #define CPROVER_UTIL_NAMESPACE_H 48 bool not_found =
lookup(name, symbol);
51 "we are assuming that a name exists in the namespace " 52 "when this function is called - identifier " +
175 #endif // CPROVER_UTIL_NAMESPACE_H The type of an expression, extends irept.
A tag-based type, i.e., typet with an identifier.
const std::string & id2string(const irep_idt &d)
symbol_table_listt symbol_table_list
const symbol_table_baset * symbol_table2
A union tag type, i.e., union_typet with an identifier.
A struct tag type, i.e., struct_typet with an identifier.
Structure type, corresponds to C style structs.
std::vector< const symbol_table_baset * > symbol_table_listt
const typet & follow_tag(const union_tag_typet &) const
Follow type tag of union type.
namespacet(const symbol_table_baset &_symbol_table)
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.
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().
namespacet(const symbol_table_baset &_symbol_table1, const symbol_table_baset &_symbol_table2)
const symbol_table_baset & get_symbol_table() const
Return first symbol table registered with the namespace.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
void add(const symbol_table_baset &symbol_table)
Add symbol table to the list of symbol tables this multi-namespace is working with.
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.
multi_namespacet(const symbol_table_baset &symbol_table)
const symbol_table_baset * symbol_table1
A multi namespace is essentially a namespace, with a list of namespaces.
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().
The symbol table base class interface.
namespacet(const symbol_table_baset *_symbol_table1, const symbol_table_baset *_symbol_table2)
Basic interface for a namespace.
Expression to hold a symbol (variable)
virtual std::size_t smallest_unused_suffix(const std::string &prefix) const =0
Returns the minimal integer n such that there is no symbol (in any of the symbol tables) whose name i...
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().