cprover
symbolt Class Reference

Symbol table entry. More...

#include <symbol.h>

+ Inheritance diagram for symbolt:
+ Collaboration diagram for symbolt:

Public Member Functions

const irep_idtdisplay_name () const
 Return language specific display name if present. More...
 
 symbolt ()
 
void clear ()
 Zero initialise a symbol object. More...
 
void swap (symbolt &b)
 Swap values between two symbols. More...
 
void show (std::ostream &out) const
 Dump the state of a symbol object to a given output stream. More...
 
class symbol_exprt symbol_expr () const
 Produces a symbol_exprt for a symbol. More...
 
bool is_shared () const
 
bool is_procedure_local () const
 
bool is_function () const
 
bool is_compiled () const
 Returns true iff the the symbol's value has been compiled to a goto program. More...
 
void set_compiled ()
 Set the symbol's value to "compiled"; to be used once the code-typed value has been converted to a goto program. More...
 

Public Attributes

typet type
 Type of symbol. More...
 
exprt value
 Initial value of symbol. More...
 
source_locationt location
 Source code location of definition of symbol. More...
 
irep_idt name
 The unique identifier. More...
 
irep_idt module
 Name of module the symbol belongs to. More...
 
irep_idt base_name
 Base (non-scoped) name. More...
 
irep_idt mode
 Language mode. More...
 
irep_idt pretty_name
 Language-specific display name. More...
 
bool is_type
 
bool is_macro
 
bool is_exported
 
bool is_input
 
bool is_output
 
bool is_state_var
 
bool is_property
 
bool is_static_lifetime
 
bool is_thread_local
 
bool is_lvalue
 
bool is_file_local
 
bool is_extern
 
bool is_volatile
 
bool is_parameter
 
bool is_auxiliary
 
bool is_weak
 

Detailed Description

Symbol table entry.

This is a symbol in the symbol table, stored in an object of type symbol_tablet.

Definition at line 27 of file symbol.h.

Constructor & Destructor Documentation

◆ symbolt()

symbolt::symbolt ( )
inline

Definition at line 69 of file symbol.h.

Member Function Documentation

◆ clear()

void symbolt::clear ( void  )
inline

Zero initialise a symbol object.

Definition at line 75 of file symbol.h.

◆ display_name()

const irep_idt& symbolt::display_name ( ) const
inline

Return language specific display name if present.

Definition at line 55 of file symbol.h.

◆ is_compiled()

bool symbolt::is_compiled ( ) const
inline

Returns true iff the the symbol's value has been compiled to a goto program.

Definition at line 112 of file symbol.h.

◆ is_function()

bool symbolt::is_function ( ) const
inline

Definition at line 105 of file symbol.h.

◆ is_procedure_local()

bool symbolt::is_procedure_local ( ) const
inline

Definition at line 100 of file symbol.h.

◆ is_shared()

bool symbolt::is_shared ( ) const
inline

Definition at line 95 of file symbol.h.

◆ set_compiled()

void symbolt::set_compiled ( )
inline

Set the symbol's value to "compiled"; to be used once the code-typed value has been converted to a goto program.

Definition at line 119 of file symbol.h.

◆ show()

void symbolt::show ( std::ostream &  out) const

Dump the state of a symbol object to a given output stream.

Parameters
outThe stream to output object state to.

Definition at line 18 of file symbol.cpp.

◆ swap()

void symbolt::swap ( symbolt b)

Swap values between two symbols.

Parameters
bThe second symbol to swap values with.

Definition at line 84 of file symbol.cpp.

◆ symbol_expr()

symbol_exprt symbolt::symbol_expr ( ) const

Produces a symbol_exprt for a symbol.

Returns
A new symbol_exprt with the name and type of the symbol object.

Definition at line 120 of file symbol.cpp.

Member Data Documentation

◆ base_name

irep_idt symbolt::base_name

Base (non-scoped) name.

Definition at line 46 of file symbol.h.

◆ is_auxiliary

bool symbolt::is_auxiliary

Definition at line 66 of file symbol.h.

◆ is_exported

bool symbolt::is_exported

Definition at line 61 of file symbol.h.

◆ is_extern

bool symbolt::is_extern

Definition at line 66 of file symbol.h.

◆ is_file_local

bool symbolt::is_file_local

Definition at line 66 of file symbol.h.

◆ is_input

bool symbolt::is_input

Definition at line 61 of file symbol.h.

◆ is_lvalue

bool symbolt::is_lvalue

Definition at line 66 of file symbol.h.

◆ is_macro

bool symbolt::is_macro

Definition at line 61 of file symbol.h.

◆ is_output

bool symbolt::is_output

Definition at line 61 of file symbol.h.

◆ is_parameter

bool symbolt::is_parameter

Definition at line 66 of file symbol.h.

◆ is_property

bool symbolt::is_property

Definition at line 61 of file symbol.h.

◆ is_state_var

bool symbolt::is_state_var

Definition at line 61 of file symbol.h.

◆ is_static_lifetime

bool symbolt::is_static_lifetime

Definition at line 65 of file symbol.h.

◆ is_thread_local

bool symbolt::is_thread_local

Definition at line 65 of file symbol.h.

◆ is_type

bool symbolt::is_type

Definition at line 61 of file symbol.h.

◆ is_volatile

bool symbolt::is_volatile

Definition at line 66 of file symbol.h.

◆ is_weak

bool symbolt::is_weak

Definition at line 66 of file symbol.h.

◆ location

source_locationt symbolt::location

Source code location of definition of symbol.

Definition at line 37 of file symbol.h.

◆ mode

irep_idt symbolt::mode

Language mode.

Definition at line 49 of file symbol.h.

◆ module

irep_idt symbolt::module

Name of module the symbol belongs to.

Definition at line 43 of file symbol.h.

◆ name

irep_idt symbolt::name

The unique identifier.

Definition at line 40 of file symbol.h.

◆ pretty_name

irep_idt symbolt::pretty_name

Language-specific display name.

Definition at line 52 of file symbol.h.

◆ type

typet symbolt::type

Type of symbol.

Definition at line 31 of file symbol.h.

◆ value

exprt symbolt::value

Initial value of symbol.

Definition at line 34 of file symbol.h.


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