|
cprover
|
#include <show_goto_functions_json.h>
Public Member Functions | |
| show_goto_functions_jsont (const namespacet &_ns, bool _list_only=false) | |
| For outputting the GOTO program in a readable JSON format. More... | |
| json_objectt | convert (const goto_functionst &goto_functions) |
| Walks through all of the functions in the program and returns a JSON object representing all their functions. More... | |
| void | operator() (const goto_functionst &goto_functions, std::ostream &out, bool append=true) |
| Print the json object generated by show_goto_functions_jsont::show_goto_functions to the provided stream (e.g. More... | |
Private Attributes | |
| const namespacet & | ns |
| bool | list_only |
Definition at line 20 of file show_goto_functions_json.h.
|
explicit |
For outputting the GOTO program in a readable JSON format.
| ns | the namespace to use to resolve names with |
| list_only | output only list of functions, but not their bodies |
Definition at line 30 of file show_goto_functions_json.cpp.
| json_objectt show_goto_functions_jsont::convert | ( | const goto_functionst & | goto_functions | ) |
Walks through all of the functions in the program and returns a JSON object representing all their functions.
| goto_functions | the goto functions that make up the program |
Definition at line 39 of file show_goto_functions_json.cpp.
References goto_programt::instructiont::code, json_irept::convert_from_irep(), CPROVER_PREFIX, goto_functionst::function_map, goto_programt::instructiont::guard, has_prefix(), id2string(), irept::is_not_nil(), exprt::is_true(), json(), jsont::json_boolean(), list_only, jsont::make_object(), ns, exprt::operands(), json_arrayt::push_back(), exprt::source_location(), and goto_programt::instructiont::to_string().
Referenced by operator()(), and show_goto_functions().
| void show_goto_functions_jsont::operator() | ( | const goto_functionst & | goto_functions, |
| std::ostream & | out, | ||
| bool | append = true |
||
| ) |
Print the json object generated by show_goto_functions_jsont::show_goto_functions to the provided stream (e.g.
std::cout)
| goto_functions | the goto functions that make up the program |
| out | the stream to write the object to |
| append | should a command and newline be appended to the stream before writing the JSON object. Defaults to true |
Definition at line 131 of file show_goto_functions_json.cpp.
References convert().
|
private |
Definition at line 33 of file show_goto_functions_json.h.
Referenced by convert().
|
private |
Definition at line 32 of file show_goto_functions_json.h.
Referenced by convert().