24 : list_only(_list_only)
39 xmlt xml_functions=
xmlt(
"functions");
41 const auto sorted = goto_functions.
sorted();
43 for(
const auto &function_entry : sorted)
45 const irep_idt &function_name = function_entry->first;
51 "is_body_available",
function.body_available());
61 if(
function.body_available())
65 function.body.instructions)
70 "instruction_id", instruction.
to_string());
78 std::ostringstream instruction_builder;
79 instruction.
output(instruction_builder);
81 xmlt &instruction_value=
83 instruction_value.
data=instruction_builder.str();
107 out <<
convert(goto_functions);
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
bool starts_with(const char *s) const
equivalent of as_string().starts_with(s)
const source_locationt & source_location() const
A collection of goto functions.
::goto_functiont goto_functiont
std::vector< function_mapt::const_iterator > sorted() const
returns a vector of the iterators in alphabetical order
This class represents an instruction in the GOTO intermediate representation.
const goto_instruction_codet & code() const
Get the code represented by this instruction.
std::string to_string() const
std::ostream & output(std::ostream &) const
Output this instruction to the given stream.
xmlt convert(const goto_functionst &goto_functions)
Walks through all of the functions in the program and returns an xml object representing all their fu...
show_goto_functions_xmlt(bool _list_only=false)
For outputting the GOTO program in a readable xml format.
void operator()(const goto_functionst &goto_functions, std::ostream &out, bool append=true)
Print the xml object generated by show_goto_functions_xmlt::show_goto_functions to the provided strea...
void set_attribute_bool(const std::string &attribute, bool value)
void set_attribute(const std::string &attribute, unsigned value)
xmlt & new_element(const std::string &key)
Goto Programs with Functions.
const std::string & id2string(const irep_idt &d)
xmlt xml(const irep_idt &property_id, const property_infot &property_info)