Go to the documentation of this file.
32 : ns(_ns), list_only(_list_only)
47 xmlt xml_functions=
xmlt(
"functions");
49 const auto sorted = goto_functions.
sorted();
51 for(
const auto &function_entry : sorted)
53 const irep_idt &function_name = function_entry->first;
59 "is_body_available",
function.body_available());
70 if(
function.body_available())
74 function.body.instructions)
79 "instruction_id", instruction.
to_string());
87 std::ostringstream instruction_builder;
88 function.body.output_instruction(
89 ns, function_name, instruction_builder, instruction);
91 xmlt &instruction_value=
93 instruction_value.
data=instruction_builder.str();
117 out <<
convert(goto_functions);
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
std::string to_string() 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...
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
const std::string & id2string(const irep_idt &d)
xmlt xml(const irep_idt &property_id, const property_infot &property_info)
codet code
Do not read or modify directly – use get_X() instead.
show_goto_functions_xmlt(const namespacet &_ns, 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...
::goto_functiont goto_functiont
A collection of goto functions.
void set_attribute(const std::string &attribute, unsigned value)
void set_attribute_bool(const std::string &attribute, bool value)
Goto Programs with Functions.
bool has_prefix(const std::string &s, const std::string &prefix)
This class represents an instruction in the GOTO intermediate representation.
std::vector< function_mapt::const_iterator > sorted() const
returns a vector of the iterators in alphabetical order
const source_locationt & source_location() const
xmlt & new_element(const std::string &key)