21 #define XML_VERSION "1.4" 34 const std::string &filename,
54 "The input was compiled with a different version of " 64 if(top.
name.substr(0, 11)==
"goto-object")
66 for(xmlt::elementst::const_iterator
72 if(sec.
name==
"irep_hash_map")
74 for(xmlt::elementst::const_iterator
80 irepconverter.
convert(*irep_it, i);
81 irepconverter.
insert(irep_it->get_attribute(
"id"), i);
84 else if(sec.
name==
"symbols")
86 for(xmlt::elementst::const_iterator
92 symbolconverter.
convert(*sym_it, symbol);
103 symbol_table.
add(symbol);
106 else if(sec.
name==
"functions")
108 for(xmlt::elementst::const_iterator
113 std::string fname = fun_it->get_attribute(
"name");
116 gfconverter.
convert(*fun_it, f);
121 message.
error() <<
"Unknown Section '" << sec.
name irep_idt name
The unique identifier.
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
static mstreamt & eom(mstreamt &m)
XML-irep conversions with hashing.
std::string get_attribute(const std::string &attribute) const
void convert(const xmlt &, goto_functionst::goto_functiont &)
constructs the goto_function according to the information in the xml structure.
void convert(const irept &irep, xmlt &xml)
const irep_idt & id() const
Base class for tree-like data structures with sharing.
virtual void set_message_handler(message_handlert &_message_handler)
bool add(const symbolt &symbol)
Add a new symbol to the symbol table.
goto_function_templatet< goto_programt > goto_functiont
function_mapt function_map
Convert goto functions into xml structures and back (with irep hashing).
unsigned long insert(unsigned long, const irept &)
inserts an irep into the hashtable
typet type
Type of symbol.
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
XML-symbol conversions with irep hashing.
bool read_goto_object(std::istream &in, const std::string &filename, symbol_tablet &symbol_table, goto_functionst &functions, message_handlert &message_handler)
reads a goto object xml file back into a symbol and a function table
void convert(const symbolt &, xmlt &)
converts a symbol to an xml symbol node
xml_parse_treet parse_tree