CBMC
show_value_sets.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Show Value Sets
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #include "show_value_sets.h"
13 #include "value_set_analysis.h"
14 
15 #include <util/xml.h>
16 
17 #include <iostream>
18 
21  const goto_modelt &goto_model,
22  const value_set_analysist &value_set_analysis)
23 {
24  switch(ui)
25  {
27  std::cout << value_set_analysis.output_xml(goto_model);
28  break;
29 
31  value_set_analysis.output(goto_model, std::cout);
32  break;
33 
35  std::cout << value_set_analysis.output_json(goto_model);
36  break;
37  }
38 }
39 
42  const namespacet &ns,
43  const irep_idt &function_name,
44  const goto_programt &goto_program,
45  const value_set_analysist &value_set_analysis)
46 {
47  switch(ui)
48  {
50  std::cout << value_set_analysis.output_xml(ns, function_name, goto_program);
51  break;
52 
54  value_set_analysis.output(ns, function_name, goto_program, std::cout);
55  break;
56 
58  std::cout << value_set_analysis.output_json(
59  ns, function_name, goto_program);
60  break;
61  }
62 }
virtual void output(const namespacet &ns, const irep_idt &function_id, const goto_programt &goto_program, std::ostream &out) const
Output the abstract states for a single function.
Definition: ai.cpp:39
virtual xmlt output_xml(const namespacet &ns, const irep_idt &function_id, const goto_programt &goto_program) const
Output the abstract states for a single function as XML.
Definition: ai.cpp:136
virtual jsont output_json(const namespacet &ns, const irep_idt &function_id, const goto_programt &goto_program) const
Output the abstract states for a single function as JSON.
Definition: ai.cpp:83
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:38
A generic container class for the GOTO intermediate representation of one function.
Definition: goto_program.h:73
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:94
This template class implements a data-flow analysis which keeps track of what values different variab...
void show_value_sets(ui_message_handlert::uit ui, const goto_modelt &goto_model, const value_set_analysist &value_set_analysis)
Show Value Sets.
Value Set Propagation.