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)
 
messagetoperator= (const messaget &other)
 
 messaget (message_handlert &_message_handler)
 
virtual ~messaget ()
 
mstreamtget_mstream (unsigned message_level) const
 
mstreamterror () const
 
mstreamtwarning () const
 
mstreamtresult () const
 
mstreamtstatus () const
 
mstreamtstatistics () const
 
mstreamtprogress () const
 
mstreamtdebug () const
 
void conditional_output (mstreamt &mstream, const std::function< void(mstreamt &)> &output_generator) const
 Generate output to mstream using output_generator if the configured verbosity is at least as high as that of mstream. More...
 

Public Attributes

rename_symbolt rename_symbol
 
replace_symbolt object_type_updates
 

Protected Types

typedef std::unordered_map< irep_idt, std::unordered_set< irep_idt > > used_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 (std::unordered_set< irep_idt > &)
 
void rename_symbols (const std::unordered_set< irep_idt > &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, const 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
 
std::unordered_set< irep_idtrenamed_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 unsigned eval_verbosity (const std::string &user_input, const message_levelt default_verbosity, message_handlert &dest)
 Parse a (user-)provided string as a verbosity level and set it as the verbosity of dest. More...
 
static mstreamteom (mstreamt &m)
 
static mstreamtendl (mstreamt &m)
 

Detailed Description

Definition at line 21 of file linking_class.h.

Member Typedef Documentation

◆ used_byt

typedef std::unordered_map<irep_idt, std::unordered_set<irep_idt> > linkingt::used_byt
protected

Definition at line 174 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.

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 ( std::unordered_set< irep_idt > &  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,
const 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 27 of file linking.cpp.

References from_expr(), and ns.

Referenced by detailed_conflict_report_rec(), and duplicate_object_symbol().

◆ link_error()

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

◆ 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

Definition at line 49 of file linking_class.h.

References symbolt::is_type, needs_renaming_non_type(), and needs_renaming_type().

Referenced by typecheck().

◆ needs_renaming_non_type()

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

Definition at line 427 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

◆ rename_symbols()

void linkingt::rename_symbols ( const std::unordered_set< irep_idt > &  needs_to_be_renamed)
protected

◆ 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 35 of file linking.cpp.

References from_type(), and ns.

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

Definition at line 123 of file linking_class.h.

References ns, symbolt::type, and type_to_string_verbose().

◆ typecheck()

Member Data Documentation

◆ main_symbol_table

symbol_tablet& linkingt::main_symbol_table
protected

Definition at line 168 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(), and duplicate_object_symbol().

◆ rename_symbol

rename_symbolt linkingt::rename_symbol

Definition at line 37 of file linking_class.h.

Referenced by copy_symbols(), duplicate_code_symbol(), and rename_symbols().

◆ renamed_ids

std::unordered_set<irep_idt> linkingt::renamed_ids
protected

Definition at line 179 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: