cprover
xml_symbol_hashing.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: XML-symbol conversions with irep hashing
4 
5 Author: CM Wintersteiger
6 
7 Date: July 2006
8 
9 \*******************************************************************/
10 
13 
14 #include "xml_irep_hashing.h"
15 
16 #include "xml_symbol_hashing.h"
17 
21 void xml_symbol_convertt::convert(const symbolt &sym, xmlt &root)
22 {
23  xmlt &xmlsym = root.new_element("symbol");
24  irepcache.push_back(irept());
25  sym.to_irep(irepcache.back());
27 }
28 
32 void xml_symbol_convertt::convert(const xmlt &xmlsym, symbolt &symbol)
33 {
34  irept t;
35 
36  irepconverter.convert(xmlsym, t);
38  symbol.from_irep(t);
39 }
xml_irep_convertt irepconverter
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
Definition: symbol.h:33
void reference_convert(const irept &irep, xmlt &xml)
XML-irep conversions with hashing.
void resolve_references(const irept &cur)
resolves references to ireps from an irep after reading an irep hash map into memory.
void convert(const irept &irep, xmlt &xml)
std::list< irept > irepcache
Definition: xml.h:18
Base class for tree-like data structures with sharing.
Definition: irep.h:87
xmlt & new_element(const std::string &name)
Definition: xml.h:86
XML-symbol conversions with irep hashing.
void from_irep(const irept &src)
Definition: symbol.cpp:126
irept to_irep() const
Definition: symbol.cpp:76
void convert(const symbolt &, xmlt &)
converts a symbol to an xml symbol node