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 <
goto-programs/goto_model.h
>
16
17
#include <
util/invariant.h
>
18
#include <
util/xml.h
>
19
20
#include <iostream>
21
22
void
show_value_sets
(
23
ui_message_handlert::uit
ui,
24
const
goto_modelt
&goto_model,
25
const
value_set_analysist
&value_set_analysis)
26
{
27
switch
(ui)
28
{
29
case
ui_message_handlert::uit::XML_UI
:
30
{
31
xmlt
xml
;
32
convert
(goto_model.
goto_functions
, value_set_analysis,
xml
);
33
std::cout <<
xml
<<
'\n'
;
34
}
35
break
;
36
37
case
ui_message_handlert::uit::PLAIN
:
38
value_set_analysis.
output
(goto_model.
goto_functions
, std::cout);
39
break
;
40
41
case
ui_message_handlert::uit::JSON_UI
:
42
UNIMPLEMENTED
;
43
}
44
}
45
46
void
show_value_sets
(
47
ui_message_handlert::uit
ui,
48
const
goto_programt
&goto_program,
49
const
value_set_analysist
&value_set_analysis)
50
{
51
switch
(ui)
52
{
53
case
ui_message_handlert::uit::XML_UI
:
54
{
55
xmlt
xml
;
56
convert
(goto_program, value_set_analysis,
xml
);
57
std::cout <<
xml
<<
'\n'
;
58
}
59
break
;
60
61
case
ui_message_handlert::uit::PLAIN
:
62
value_set_analysis.
output
(goto_program, std::cout);
63
break
;
64
65
case
ui_message_handlert::uit::JSON_UI
:
66
UNIMPLEMENTED
;
67
}
68
}
static_analysis_baset::output
virtual void output(const goto_functionst &goto_functions, std::ostream &out) const
Definition:
static_analysis.cpp:66
UNIMPLEMENTED
#define UNIMPLEMENTED
Definition:
invariant.h:525
ui_message_handlert::uit::XML_UI
@ XML_UI
invariant.h
value_set_analysis_templatet
This template class implements a data-flow analysis which keeps track of what values different variab...
Definition:
value_set_analysis.h:37
goto_model.h
goto_modelt
Definition:
goto_model.h:25
xml.h
show_value_sets
void show_value_sets(ui_message_handlert::uit ui, const goto_modelt &goto_model, const value_set_analysist &value_set_analysis)
Definition:
show_value_sets.cpp:22
ui_message_handlert::uit
uit
Definition:
ui_message.h:24
convert
static bool convert(const irep_idt &identifier, const std::ostringstream &s, symbol_tablet &symbol_table, message_handlert &message_handler)
Definition:
builtin_factory.cpp:41
xml
xmlt xml(const irep_idt &property_id, const property_infot &property_info)
Definition:
properties.cpp:110
ui_message_handlert::uit::JSON_UI
@ JSON_UI
xmlt
Definition:
xml.h:20
goto_modelt::goto_functions
goto_functionst goto_functions
GOTO functions.
Definition:
goto_model.h:33
ui_message_handlert::uit::PLAIN
@ PLAIN
show_value_sets.h
goto_programt
A generic container class for the GOTO intermediate representation of one function.
Definition:
goto_program.h:72
value_set_analysis.h
src
pointer-analysis
show_value_sets.cpp
Generated by
1.8.17