6 #ifndef CPROVER_UTIL_JOURNALLING_SYMBOL_TABLE_H
7 #define CPROVER_UTIL_JOURNALLING_SYMBOL_TABLE_H
12 #include <unordered_set>
111 std::pair<symbolt &, bool> result =
119 erase(
const symbol_table_baset::symbolst::const_iterator &entry)
override
121 const irep_idt entry_name = entry->first;
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
A symbol table wrapper that records which entries have been updated/removedA caller can pass a journa...
virtual iteratort begin() override
const changesett & get_updated() const
static journalling_symbol_tablet wrap(symbol_table_baset &base_symbol_table)
virtual std::pair< symbolt &, bool > insert(symbolt symbol) override
Move or copy a new symbol to the symbol table.
journalling_symbol_tablet(const journalling_symbol_tablet &other)=delete
virtual symbolt * get_writeable(const irep_idt &identifier) override
Find a symbol in the symbol table for read-write access.
virtual const symbol_tablet & get_symbol_table() const override
void validate(const validation_modet vm=validation_modet::INVARIANT) const override
journalling_symbol_tablet(journalling_symbol_tablet &&other)
void on_insert(const irep_idt &id)
virtual iteratort end() override
void on_remove(const irep_idt &id)
std::unordered_set< irep_idt > changesett
journalling_symbol_tablet(symbol_table_baset &base_symbol_table)
const changesett & get_removed() const
symbol_table_baset & base_symbol_table
std::size_t next_unused_suffix(const std::string &prefix) const override
virtual void erase(const symbol_table_baset::symbolst::const_iterator &entry) override
Remove a symbol from the symbol table.
virtual bool move(symbolt &symbol, symbolt *&new_symbol) override
const changesett & get_inserted() const
virtual void clear() override
void on_update(const irep_idt &id)
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.
irep_idt name
The unique identifier.