23 #define INITIALIZE CPROVER_PREFIX "initialize" 30 initialize.
mode=
"jsil";
46 initialize.
value=init_code;
48 if(symbol_table.
add(initialize))
66 std::list<irep_idt> matches;
71 symbol_tablet::symbolst::const_iterator s_it=
72 symbol_table.
symbols.find(it->second);
74 if(s_it==symbol_table.
symbols.end())
77 if(s_it->second.type.id()==ID_code)
78 matches.push_back(it->second);
97 main_symbol=matches.front();
103 symbol_tablet::symbolst::const_iterator s_it=
104 symbol_table.
symbols.find(main_symbol);
106 if(s_it==symbol_table.
symbols.end())
114 const symbolt &symbol=s_it->second;
120 message.
error() <<
"main symbol `" << main_symbol
132 symbol_tablet::symbolst::iterator init_it=
135 if(init_it==symbol_table.
symbols.end())
141 call_init.
function()=init_it->second.symbol_expr();
165 if(symbol_table.
move(new_symbol))
irep_idt name
The unique identifier.
virtual bool lookup(const irep_idt &name, const symbolt *&symbol) const
const std::string & id2string(const irep_idt &d)
irep_idt mode
Language mode.
Goto Programs with Functions.
void move_to_operands(exprt &expr)
exprt value
Initial value of symbol.
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
symbol_base_mapt symbol_base_map
static mstreamt & eom(mstreamt &m)
void add(const codet &code)
class symbol_exprt symbol_expr() const
produces a symbol_exprt for a symbol
static void create_initialize(symbol_tablet &symbol_table)
static irep_idt entry_point()
virtual void set_message_handler(message_handlert &_message_handler)
bool add(const symbolt &symbol)
Add a new symbol to the symbol table.
bool move(symbolt &symbol, symbolt *&new_symbol)
Move a symbol into the symbol table.
bool jsil_entry_point(symbol_tablet &symbol_table, message_handlert &message_handler)
typet type
Type of symbol.
source_locationt location
Source code location of definition of symbol.
#define forall_symbol_base_map(it, expr, base_name)
irep_idt base_name
Base (non-scoped) name.
source_locationt & add_source_location()
Expression to hold a symbol (variable)
const typet & return_type() const