10#ifndef CPROVER_UTIL_NAMESPACE_H
11#define CPROVER_UTIL_NAMESPACE_H
49 bool not_found =
lookup(name, symbol);
52 "we are assuming that a name exists in the namespace "
53 "when this function is called - identifier " +
157 bool lookup(
const irep_idt &name,
const symbolt *&symbol)
const override;
159 std::size_t smallest_unused_suffix(
const std::string &prefix)
const override;
C enum tag type, i.e., c_enum_typet with an identifier.
Base class for all expressions.
void add(const symbol_table_baset &symbol_table)
Add symbol table to the list of symbol tables this multi-namespace is working with.
multi_namespacet(const symbol_table_baset &symbol_table)
symbol_table_listt symbol_table_list
std::vector< const symbol_table_baset * > symbol_table_listt
Basic interface for a namespace.
const typet & follow(const typet &) const
Resolve type symbol to the type it points to.
const symbolt & lookup(const irep_idt &name) const
Lookup a symbol in the namespace.
void follow_macros(exprt &) const
Follow macros to their values in a given expression.
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...
const union_typet & follow_tag(const union_tag_typet &) const
Follow type tag of union type.
virtual ~namespace_baset()
const symbol_table_baset * symbol_table1
namespacet(const symbol_table_baset &_symbol_table1, const symbol_table_baset &_symbol_table2)
namespacet(const symbol_table_baset &_symbol_table)
const symbol_table_baset & get_symbol_table() const
Return first symbol table registered with the namespace.
const symbol_table_baset * symbol_table2
namespacet(const symbol_table_baset *_symbol_table1, const symbol_table_baset *_symbol_table2)
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)
The symbol table base class interface.
A tag-based type, i.e., typet with an identifier.
The type of an expression, extends irept.
A union tag type, i.e., union_typet with an identifier.
#define SINCE(year, month, day, msg)
const std::string & id2string(const irep_idt &d)
copy_constructor_body add(code_assign_string_expr_to_java_string(arg_this, string_expr, symbol_table, true), loc)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.