34 for(std::size_t
i=0;
i<count;
i++)
54 sym.is_weak = (flags &(1 << 16))!=0;
55 sym.is_type = (flags &(1 << 15))!=0;
56 sym.is_property = (flags &(1 << 14))!=0;
57 sym.is_macro = (flags &(1 << 13))!=0;
58 sym.is_exported = (flags &(1 << 12))!=0;
59 sym.is_input = (flags &(1 << 11))!=0;
60 sym.is_output = (flags &(1 << 10))!=0;
61 sym.is_state_var = (flags &(1 << 9))!=0;
62 sym.is_parameter = (flags &(1 << 8))!=0;
63 sym.is_auxiliary = (flags &(1 << 7))!=0;
65 sym.is_lvalue = (flags &(1 << 5))!=0;
66 sym.is_static_lifetime = (flags &(1 << 4))!=0;
67 sym.is_thread_local = (flags &(1 << 3))!=0;
68 sym.is_file_local = (flags &(1 << 2))!=0;
69 sym.is_extern = (flags &(1 << 1))!=0;
70 sym.is_volatile = (flags &1)!=0;
89 typedef std::map<goto_programt::targett, std::list<unsigned> > target_mapt;
90 target_mapt target_map;
115 if(instruction.is_target() &&
118 std::make_pair(instruction.target_number,
itarget))->second!=
itarget)
131 instruction.labels.push_back(label);
142 for(target_mapt::iterator
tit = target_map.begin();
143 tit!=target_map.end();
148 for(std::list<unsigned>::iterator
nit =
tit->second.begin();
156 "something from the target map should also be in the reverse target "
158 ins->targets.push_back(entry->second);
178 const std::string &filename,
187 hdr[0]=
static_cast<char>(in.get());
188 hdr[1]=
static_cast<char>(in.get());
189 hdr[2]=
static_cast<char>(in.get());
191 if(
hdr[0]==
'G' &&
hdr[1]==
'B' &&
hdr[2]==
'F')
197 hdr[3]=
static_cast<char>(in.get());
198 if(
hdr[0]==0x7f &&
hdr[1]==
'G' &&
hdr[2]==
'B' &&
hdr[3]==
'F')
202 else if(
hdr[0]==0x7f &&
hdr[1]==
'E' &&
hdr[2]==
'L' &&
hdr[3]==
'F')
204 if(!filename.empty())
205 message.
error() <<
"Sorry, but I can't read ELF binary '" << filename
208 message.
error() <<
"Sorry, but I can't read ELF binaries"
215 message.
error() <<
"'" << filename <<
"' is not a goto-binary"
232 "The input was compiled with an old version of "
243 "The input was compiled with an unsupported version of "
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Data structure for representing an arbitrary statement in a program.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
A collection of goto functions.
function_mapt function_map
::goto_functiont goto_functiont
void compute_location_numbers()
A goto function, consisting of function body (see body) and parameter identifiers (see parameter_iden...
This class represents an instruction in the GOTO intermediate representation.
instructionst::iterator targett
Class that provides messages with a built-in verbosity 'level'.
bool add(const symbolt &symbol)
Add a new symbol to the symbol table.
The type of an expression, extends irept.
Goto Programs with Functions.
goto_program_instruction_typet
The type of an instruction in a GOTO program.
binary irep conversions with hashing
static bool read_bin_goto_object(std::istream &in, symbol_tablet &symbol_table, goto_functionst &functions, irep_serializationt &irepconverter)
read goto binary format
#define UNREACHABLE
This should be used to mark dead code.
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
#define GOTO_BINARY_VERSION