cprover
linkingt Class Reference

#include <linking_class.h>

Inheritance diagram for linkingt:
[legend]
Collaboration diagram for linkingt:
[legend]

Classes

struct  adjust_type_infot
 

Public Member Functions

 linkingt (symbol_tablet &_main_symbol_table, symbol_tablet &_src_symbol_table, message_handlert &_message_handler)
 
virtual void typecheck ()
 
- Public Member Functions inherited from typecheckt
 typecheckt (message_handlert &_message_handler)
 
virtual ~typecheckt ()
 
void err_location (const source_locationt &loc)
 
void err_location (const exprt &src)
 
void err_location (const typet &src)
 
virtual bool typecheck_main ()
 
- Public Member Functions inherited from messaget
virtual void set_message_handler (message_handlert &_message_handler)
 
message_handlertget_message_handler ()
 
 messaget ()
 
 messaget (const messaget &other)
 
 messaget (message_handlert &_message_handler)
 
virtual ~messaget ()
 
mstreamtget_mstream (unsigned message_level)
 
mstreamterror ()
 
mstreamtwarning ()
 
mstreamtresult ()
 
mstreamtstatus ()
 
mstreamtstatistics ()
 
mstreamtprogress ()
 
mstreamtdebug ()
 

Public Attributes

rename_symbolt rename_symbol
 
replace_symbolt object_type_updates
 

Protected Types

typedef std::unordered_set< irep_idt, irep_id_hashid_sett
 
typedef std::unordered_map< irep_idt, id_sett, irep_id_hashused_byt
 

Protected Member Functions

bool needs_renaming_type (const symbolt &old_symbol, const symbolt &new_symbol)
 
bool needs_renaming_non_type (const symbolt &old_symbol, const symbolt &new_symbol)
 
bool needs_renaming (const symbolt &old_symbol, const symbolt &new_symbol)
 
void do_type_dependencies (id_sett &)
 
void rename_symbols (const id_sett &needs_to_be_renamed)
 
void copy_symbols ()
 
void duplicate_non_type_symbol (symbolt &old_symbol, symbolt &new_symbol)
 
void duplicate_code_symbol (symbolt &old_symbol, symbolt &new_symbol)
 
void duplicate_object_symbol (symbolt &old_symbol, symbolt &new_symbol)
 
bool adjust_object_type (const symbolt &old_symbol, const symbolt &new_symbol, bool &set_to_new)
 
bool adjust_object_type_rec (const typet &type1, const typet &type2, adjust_type_infot &info)
 
void duplicate_type_symbol (symbolt &old_symbol, symbolt &new_symbol)
 
std::string expr_to_string (const namespacet &ns, const irep_idt &identifier, const exprt &expr) const
 
std::string type_to_string (const namespacet &ns, const irep_idt &identifier, const typet &type) const
 
std::string type_to_string_verbose (const namespacet &ns, const symbolt &symbol, const typet &type) const
 
std::string type_to_string_verbose (const namespacet &ns, const symbolt &symbol) const
 
void detailed_conflict_report_rec (const symbolt &old_symbol, const symbolt &new_symbol, const typet &type1, const typet &type2, unsigned depth, exprt &conflict_path)
 
void detailed_conflict_report (const symbolt &old_symbol, const symbolt &new_symbol, const typet &type1, const typet &type2)
 
void link_error (const symbolt &old_symbol, const symbolt &new_symbol, const std::string &msg)
 
void link_warning (const symbolt &old_symbol, const symbolt &new_symbol, const std::string &msg)
 
void show_struct_diff (const struct_typet &old_type, const struct_typet &new_type)
 
irep_idt rename (irep_idt)
 

Protected Attributes

symbol_tabletmain_symbol_table
 
symbol_tabletsrc_symbol_table
 
namespacet ns
 
id_sett renamed_ids
 
- Protected Attributes inherited from messaget
message_handlertmessage_handler
 
mstreamt mstream
 

Additional Inherited Members

- Public Types inherited from messaget
enum  message_levelt {
  M_ERROR =1, M_WARNING =2, M_RESULT =4, M_STATUS =6,
  M_STATISTICS =8, M_PROGRESS =9, M_DEBUG =10
}
 
- Static Public Member Functions inherited from messaget
static mstreamteom (mstreamt &m)
 
static mstreamtendl (mstreamt &m)
 

Detailed Description

Definition at line 21 of file linking_class.h.

Member Typedef Documentation

§ id_sett

typedef std::unordered_set<irep_idt, irep_id_hash> linkingt::id_sett
protected

Definition at line 41 of file linking_class.h.

§ used_byt

typedef std::unordered_map<irep_idt, id_sett, irep_id_hash> linkingt::used_byt
protected

Definition at line 176 of file linking_class.h.

Constructor & Destructor Documentation

§ linkingt()

linkingt::linkingt ( symbol_tablet _main_symbol_table,
symbol_tablet _src_symbol_table,
message_handlert _message_handler 
)
inline

Definition at line 24 of file linking_class.h.

References typecheck().

Member Function Documentation

§ adjust_object_type()

bool linkingt::adjust_object_type ( const symbolt old_symbol,
const symbolt new_symbol,
bool &  set_to_new 
)
protected

§ adjust_object_type_rec()

§ copy_symbols()

§ detailed_conflict_report()

void linkingt::detailed_conflict_report ( const symbolt old_symbol,
const symbolt new_symbol,
const typet type1,
const typet type2 
)
inlineprotected

§ detailed_conflict_report_rec()

§ do_type_dependencies()

void linkingt::do_type_dependencies ( id_sett needs_to_be_renamed)
protected

§ duplicate_code_symbol()

§ duplicate_non_type_symbol()

void linkingt::duplicate_non_type_symbol ( symbolt old_symbol,
symbolt new_symbol 
)
protected

§ duplicate_object_symbol()

§ duplicate_type_symbol()

void linkingt::duplicate_type_symbol ( symbolt old_symbol,
symbolt new_symbol 
)
protected

§ expr_to_string()

std::string linkingt::expr_to_string ( const namespacet ns,
const irep_idt identifier,
const exprt expr 
) const
protected

Definition at line 29 of file linking.cpp.

References from_expr().

Referenced by detailed_conflict_report_rec(), and duplicate_object_symbol().

§ link_error()

§ link_warning()

void linkingt::link_warning ( const symbolt old_symbol,
const symbolt new_symbol,
const std::string &  msg 
)
protected

§ needs_renaming()

bool linkingt::needs_renaming ( const symbolt old_symbol,
const symbolt new_symbol 
)
inlineprotected

§ needs_renaming_non_type()

bool linkingt::needs_renaming_non_type ( const symbolt old_symbol,
const symbolt new_symbol 
)
protected

Definition at line 431 of file linking.cpp.

References symbolt::is_file_local.

Referenced by needs_renaming().

§ needs_renaming_type()

bool linkingt::needs_renaming_type ( const symbolt old_symbol,
const symbolt new_symbol 
)
protected

§ rename()

irep_idt linkingt::rename ( irep_idt  id)
protected

Definition at line 407 of file linking.cpp.

References id2string(), main_symbol_table, renamed_ids, src_symbol_table, and symbol_tablet::symbols.

Referenced by rename_symbols().

§ rename_symbols()

§ show_struct_diff()

void linkingt::show_struct_diff ( const struct_typet old_type,
const struct_typet new_type 
)
protected

§ type_to_string()

std::string linkingt::type_to_string ( const namespacet ns,
const irep_idt identifier,
const typet type 
) const
protected

Definition at line 37 of file linking.cpp.

References from_type().

Referenced by detailed_conflict_report_rec(), and type_to_string_verbose().

§ type_to_string_verbose() [1/2]

std::string linkingt::type_to_string_verbose ( const namespacet ns,
const symbolt symbol,
const typet type 
) const
protected

§ type_to_string_verbose() [2/2]

std::string linkingt::type_to_string_verbose ( const namespacet ns,
const symbolt symbol 
) const
inlineprotected

§ typecheck()

Member Data Documentation

§ main_symbol_table

symbol_tablet& linkingt::main_symbol_table
protected

Definition at line 170 of file linking_class.h.

Referenced by copy_symbols(), rename(), and typecheck().

§ ns

§ object_type_updates

replace_symbolt linkingt::object_type_updates

Definition at line 38 of file linking_class.h.

Referenced by copy_symbols(), duplicate_object_symbol(), and read_object_and_link().

§ rename_symbol

rename_symbolt linkingt::rename_symbol

§ renamed_ids

id_sett linkingt::renamed_ids
protected

Definition at line 181 of file linking_class.h.

Referenced by rename().

§ src_symbol_table

symbol_tablet& linkingt::src_symbol_table
protected

The documentation for this class was generated from the following files: