6 #ifndef CPROVER_UTIL_SYMBOL_TABLE_BUILDER_H
7 #define CPROVER_UTIL_SYMBOL_TABLE_BUILDER_H
52 void erase(
const symbolst::const_iterator &entry)
override
112 std::size_t free_suffix =
114 suffix_iter->second = free_suffix + 1;
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
The symbol table base class interface.
const symbol_base_mapt & symbol_base_map
Read-only field, used to look up symbol names given their base names.
virtual void validate(const validation_modet vm=validation_modet::INVARIANT) const =0
virtual bool move(symbolt &symbol, symbolt *&new_symbol)=0
virtual void erase(const symbolst::const_iterator &entry)=0
Remove a symbol from the symbol table.
const symbol_module_mapt & symbol_module_map
Read-only field, used to look up symbol names given their modules.
virtual iteratort begin()=0
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.
virtual const symbol_tablet & get_symbol_table() const =0
virtual iteratort end()=0
virtual symbolt * get_writeable(const irep_idt &name)=0
Find a symbol in the symbol table for read-write access.
virtual std::pair< symbolt &, bool > insert(symbolt symbol)=0
Move or copy a new symbol to the symbol table.
symbol_table_buildert(symbol_table_baset &base_symbol_table)
symbol_table_buildert(const symbol_table_buildert &)=delete
std::pair< symbolt &, bool > insert(symbolt symbol) override
Move or copy a new symbol to the symbol table.
symbol_table_baset & base_symbol_table
symbolt * get_writeable(const irep_idt &identifier) override
Find a symbol in the symbol table for read-write access.
std::map< std::string, std::size_t > next_free_suffix_for_prefix
bool move(symbolt &symbol, symbolt *&new_symbol) override
void validate(const validation_modet vm=validation_modet::INVARIANT) const override
std::size_t next_unused_suffix(const std::string &prefix) const override
Try to find the next free identity for the passed-in prefix in this symbol table.
symbol_table_buildert & operator=(const symbol_table_buildert &)=delete
static symbol_table_buildert wrap(symbol_table_baset &base_symbol_table)
symbol_table_buildert & operator=(symbol_table_buildert &&)=delete
iteratort begin() override
symbol_table_buildert(symbol_table_buildert &&other)
void erase(const symbolst::const_iterator &entry) override
Remove a symbol from the symbol table.
const symbol_tablet & get_symbol_table() const override