CBMC
linkingt Class Reference

#include <linking_class.h>

+ Inheritance diagram for linkingt:
+ Collaboration diagram for linkingt:

Classes

struct  adjust_type_infot
 

Public Member Functions

 linkingt (symbol_table_baset &_main_symbol_table, const symbol_table_baset &_src_symbol_table, message_handlert &_message_handler)
 
virtual void typecheck ()
 
- Public Member Functions inherited from typecheckt
 typecheckt (message_handlert &_message_handler)
 
virtual ~typecheckt ()
 
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 message_stream using output_generator if the configured verbosity is at least as high as that of message_stream. More...
 

Public Attributes

rename_symbolt rename_symbol
 
casting_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 > &)
 
std::unordered_map< irep_idt, irep_idtrename_symbols (const std::unordered_set< irep_idt > &needs_to_be_renamed)
 
void copy_symbols (const std::unordered_map< irep_idt, irep_idt > &)
 
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 irep_idt &identifier, const exprt &expr) const
 
std::string type_to_string (const irep_idt &identifier, const typet &type) const
 
std::string type_to_string_verbose (const symbolt &symbol, const typet &type) const
 
std::string type_to_string_verbose (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 (const irep_idt &)
 

Protected Attributes

symbol_table_basetmain_symbol_table
 
const symbol_table_basetsrc_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 commandt command (unsigned c)
 Create an ECMA-48 SGR (Select Graphic Rendition) command. More...
 
- Static Public Attributes inherited from messaget
static eomt eom
 
static const commandt reset
 return to default formatting, as defined by the terminal More...
 
static const commandt red
 render text with red foreground color More...
 
static const commandt green
 render text with green foreground color More...
 
static const commandt yellow
 render text with yellow foreground color More...
 
static const commandt blue
 render text with blue foreground color More...
 
static const commandt magenta
 render text with magenta foreground color More...
 
static const commandt cyan
 render text with cyan foreground color More...
 
static const commandt bright_red
 render text with bright red foreground color More...
 
static const commandt bright_green
 render text with bright green foreground color More...
 
static const commandt bright_yellow
 render text with bright yellow foreground color More...
 
static const commandt bright_blue
 render text with bright blue foreground color More...
 
static const commandt bright_magenta
 render text with bright magenta foreground color More...
 
static const commandt bright_cyan
 render text with bright cyan foreground color More...
 
static const commandt bold
 render text with bold font More...
 
static const commandt faint
 render text with faint font More...
 
static const commandt italic
 render italic text More...
 
static const commandt underline
 render underlined text More...
 

Detailed Description

Definition at line 28 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 178 of file linking_class.h.

Constructor & Destructor Documentation

◆ linkingt()

linkingt::linkingt ( symbol_table_baset _main_symbol_table,
const symbol_table_baset _src_symbol_table,
message_handlert _message_handler 
)
inline

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

Definition at line 999 of file linking.cpp.

◆ adjust_object_type_rec()

bool linkingt::adjust_object_type_rec ( const typet type1,
const typet type2,
adjust_type_infot info 
)
protected

Definition at line 807 of file linking.cpp.

◆ copy_symbols()

void linkingt::copy_symbols ( const std::unordered_map< irep_idt, irep_idt > &  new_identifiers)
protected

Definition at line 1373 of file linking.cpp.

◆ detailed_conflict_report()

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

Definition at line 142 of file linking_class.h.

◆ detailed_conflict_report_rec()

void linkingt::detailed_conflict_report_rec ( const symbolt old_symbol,
const symbolt new_symbol,
const typet type1,
const typet type2,
unsigned  depth,
exprt conflict_path 
)
protected

Definition at line 129 of file linking.cpp.

◆ do_type_dependencies()

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

Definition at line 1295 of file linking.cpp.

◆ duplicate_code_symbol()

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

Definition at line 470 of file linking.cpp.

◆ duplicate_non_type_symbol()

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

Definition at line 1104 of file linking.cpp.

◆ duplicate_object_symbol()

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

Definition at line 1014 of file linking.cpp.

◆ duplicate_type_symbol()

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

Definition at line 1143 of file linking.cpp.

◆ expr_to_string()

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

Definition at line 49 of file linking.cpp.

◆ link_error()

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

Definition at line 397 of file linking.cpp.

◆ link_warning()

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

Definition at line 414 of file linking.cpp.

◆ needs_renaming()

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

Definition at line 56 of file linking_class.h.

◆ needs_renaming_non_type()

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

Definition at line 456 of file linking.cpp.

◆ needs_renaming_type()

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

Definition at line 1238 of file linking.cpp.

◆ rename()

irep_idt linkingt::rename ( const irep_idt id)
protected

Definition at line 432 of file linking.cpp.

◆ rename_symbols()

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

Definition at line 1340 of file linking.cpp.

◆ 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 irep_idt identifier,
const typet type 
) const
protected

Definition at line 56 of file linking.cpp.

◆ type_to_string_verbose() [1/2]

std::string linkingt::type_to_string_verbose ( const symbolt symbol) const
inlineprotected

Definition at line 128 of file linking_class.h.

◆ type_to_string_verbose() [2/2]

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

Definition at line 77 of file linking.cpp.

◆ typecheck()

void linkingt::typecheck ( )
virtual

Implements typecheckt.

Definition at line 1439 of file linking.cpp.

Member Data Documentation

◆ main_symbol_table

symbol_table_baset& linkingt::main_symbol_table
protected

Definition at line 172 of file linking_class.h.

◆ ns

namespacet linkingt::ns
protected

Definition at line 175 of file linking_class.h.

◆ object_type_updates

casting_replace_symbolt linkingt::object_type_updates

Definition at line 45 of file linking_class.h.

◆ rename_symbol

rename_symbolt linkingt::rename_symbol

Definition at line 44 of file linking_class.h.

◆ renamed_ids

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

Definition at line 183 of file linking_class.h.

◆ src_symbol_table

const symbol_table_baset& linkingt::src_symbol_table
protected

Definition at line 173 of file linking_class.h.


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