12 #ifndef CPROVER_LINKING_LINKING_CLASS_H
13 #define CPROVER_LINKING_LINKING_CLASS_H
21 #include <unordered_set>
41 ns(_main_symbol_table),
78 const std::unordered_set<irep_idt> &needs_to_be_renamed);
81 const std::unordered_map<irep_idt, irep_idt> &);
129 const exprt &expr)
const;
133 const typet &type)
const;
137 const typet &type)
const;
154 exprt &conflict_path);
175 const std::string &msg);
180 const std::string &msg);
bool replace_symbol_expr(symbol_exprt &dest) const override
bool replace(exprt &dest) const override
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
std::unordered_map< irep_idt, irep_idt > rename_symbols(const symbol_table_baset &, const std::unordered_set< irep_idt > &needs_to_be_renamed)
void duplicate_non_type_symbol(symbolt &old_symbol, symbolt &new_symbol)
bool adjust_object_type(const symbolt &old_symbol, const symbolt &new_symbol, bool &set_to_new)
bool link(const symbol_table_baset &src_symbol_table)
Merges the symbol table src_symbol_table into main_symbol_table, renaming symbols from src_symbol_tab...
renamingt needs_renaming(const symbolt &old_symbol, const symbolt &new_symbol)
linkingt(symbol_table_baset &_main_symbol_table, message_handlert &_message_handler)
std::string type_to_string_verbose(const symbolt &symbol) const
bool adjust_object_type_rec(const typet &type1, const typet &type2, adjust_type_infot &info)
rename_symbolt rename_main_symbol
void copy_symbols(const symbol_table_baset &, const std::unordered_map< irep_idt, irep_idt > &)
irep_idt rename(const symbol_table_baset &, const irep_idt &)
renamingt needs_renaming_type(const symbolt &old_symbol, const symbolt &new_symbol)
void show_struct_diff(const struct_typet &old_type, const struct_typet &new_type)
symbol_table_baset & main_symbol_table
std::string expr_to_string(const irep_idt &identifier, const exprt &expr) const
void link_warning(const symbolt &old_symbol, const symbolt &new_symbol, const std::string &msg)
renamingt needs_renaming_non_type(const symbolt &old_symbol, const symbolt &new_symbol)
void duplicate_object_symbol(symbolt &old_symbol, symbolt &new_symbol)
casting_replace_symbolt object_type_updates
std::string type_to_string(const irep_idt &identifier, const typet &type) const
std::unordered_set< irep_idt > renamed_ids
bool detailed_conflict_report_rec(const symbolt &old_symbol, const symbolt &new_symbol, const typet &type1, const typet &type2, unsigned depth, exprt &conflict_path)
Returns true iff the conflict report on a particular branch of the tree of types was a definitive res...
void duplicate_type_symbol(symbolt &old_symbol, const symbolt &new_symbol)
std::string type_to_string_verbose(const symbolt &symbol, const typet &type) const
rename_symbolt rename_new_symbol
void detailed_conflict_report(const symbolt &old_symbol, const symbolt &new_symbol, const typet &type1, const typet &type2)
void duplicate_code_symbol(symbolt &old_symbol, symbolt &new_symbol)
message_handlert & message_handler
void link_error(const symbolt &old_symbol, const symbolt &new_symbol, const std::string &msg)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Replace a symbol expression by a given expression.
Structure type, corresponds to C style structs.
Expression to hold a symbol (variable)
static symbol_exprt typeless(const irep_idt &id)
Generate a symbol_exprt without a proper type.
The symbol table base class interface.
typet type
Type of symbol.
The type of an expression, extends irept.
API to expression classes.
const symbolt & old_symbol
adjust_type_infot(const symbolt &_old_symbol, const symbolt &_new_symbol)
std::unordered_set< irep_idt > o_symbols
std::unordered_set< irep_idt > n_symbols
const symbolt & new_symbol