cprover
show_goto_functions.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Show goto functions
4 
5 Author: Peter Schrammel
6 
7 \*******************************************************************/
8 
11 
12 #include "show_goto_functions.h"
13 
14 #include <iostream>
15 
16 #include <util/xml.h>
17 #include <util/json.h>
18 #include <util/json_expr.h>
19 #include <util/xml_expr.h>
20 #include <util/cprover_prefix.h>
21 #include <util/prefix.h>
22 
23 #include <langapi/language_util.h>
26 
27 #include "goto_functions.h"
28 #include "goto_model.h"
29 
31  const namespacet &ns,
33  const goto_functionst &goto_functions)
34 {
35  switch(ui)
36  {
38  {
39  show_goto_functions_xmlt xml_show_functions(ns);
40  xml_show_functions(goto_functions, std::cout);
41  }
42  break;
43 
45  {
46  show_goto_functions_jsont json_show_functions(ns);
47  json_show_functions(goto_functions, std::cout);
48  }
49  break;
50 
52  goto_functions.output(ns, std::cout);
53  break;
54  }
55 }
56 
58  const goto_modelt &goto_model,
60 {
61  const namespacet ns(goto_model.symbol_table);
62  show_goto_functions(ns, ui, goto_model.goto_functions);
63 }
Show the goto functions.
Goto Programs with Functions.
symbol_tablet symbol_table
Definition: goto_model.h:25
void output(const namespacet &ns, std::ostream &out) const
Symbol Table + CFG.
Expressions in JSON.
TO_BE_DOCUMENTED.
Definition: namespace.h:62
void show_goto_functions(const namespacet &ns, ui_message_handlert::uit ui, const goto_functionst &goto_functions)
goto_functionst goto_functions
Definition: goto_model.h:26