32 : ns(_ns), list_only(_list_only)
45 xmlt xml_functions=
xmlt(
"functions");
46 for(
const auto &function_entry : goto_functions.
function_map)
48 const irep_idt &function_name=function_entry.first;
54 "is_body_available",
function.body_available());
65 if(
function.body_available())
69 function.body.instructions)
74 "instruction_id", instruction.
to_string());
82 std::ostringstream instruction_builder;
83 function.body.output_instruction(
84 ns, function_name, instruction_builder, instruction);
86 xmlt &instruction_value=
88 instruction_value.
data=instruction_builder.str();
112 out <<
convert(goto_functions);
void set_attribute_bool(const std::string &attribute, bool value)
const std::string & id2string(const irep_idt &d)
std::string to_string() const
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...
Goto Programs with Functions.
function_mapt function_map
xmlt xml(const source_locationt &location)
This class represents an instruction in the GOTO intermediate representation.
void set_attribute(const std::string &attribute, unsigned value)
::goto_functiont goto_functiont
bool has_prefix(const std::string &s, const std::string &prefix)
xmlt & new_element(const std::string &name)
show_goto_functions_xmlt(const namespacet &_ns, bool _list_only=false)
For outputting the GOTO program in a readable xml format.
const source_locationt & source_location() const
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...