cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
points_to.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Field-sensitive, location-insensitive points-to analysis
4
5
Author: Daniel Kroening, kroening@kroening.com
6
7
\*******************************************************************/
8
11
12
#ifndef CPROVER_GOTO_INSTRUMENT_POINTS_TO_H
13
#define CPROVER_GOTO_INSTRUMENT_POINTS_TO_H
14
15
#include <iosfwd>
16
17
#include <
goto-programs/goto_model.h
>
18
#include <
goto-programs/cfg.h
>
19
20
#include "
object_id.h
"
21
22
class
points_tot
23
{
24
public
:
25
points_tot
()
26
{
27
}
28
29
void
operator()
(
goto_modelt
&goto_model)
30
{
31
// build the CFG data structure
32
cfg
(goto_model.
goto_functions
);
33
34
// iterate
35
fixedpoint
();
36
}
37
38
const
object_id_sett
&
operator[]
(
const
object_idt
&object_id)
39
{
40
value_mapt::const_iterator it=
value_map
.find(object_id);
41
if
(it!=
value_map
.end())
42
return
it->second;
43
return
empty_set
;
44
}
45
46
void
output
(std::ostream &out)
const
;
47
48
protected
:
49
typedef
cfg_baset<empty_cfg_nodet>
cfgt
;
50
cfgt
cfg
;
51
52
typedef
std::map<object_idt, object_id_sett>
value_mapt
;
53
value_mapt
value_map
;
54
55
void
fixedpoint
();
56
bool
transform
(
const
cfgt::nodet
&);
57
58
const
object_id_sett
empty_set
;
59
};
60
61
inline
std::ostream &
operator<<
(
62
std::ostream &out,
63
const
points_tot
&points_to)
64
{
65
points_to.
output
(out);
66
return
out;
67
}
68
69
#endif
// CPROVER_GOTO_INSTRUMENT_POINTS_TO_H
cfg.h
Control Flow Graph.
cfg_baset
A multi-procedural control flow graph (CFG) whose nodes store references to instructions in a GOTO pr...
Definition
cfg.h:87
cfg_baset< empty_cfg_nodet >::nodet
base_grapht::nodet nodet
Definition
cfg.h:92
goto_modelt
Definition
goto_model.h:27
goto_modelt::goto_functions
goto_functionst goto_functions
GOTO functions.
Definition
goto_model.h:34
object_idt
Definition
object_id.h:23
points_tot
Definition
points_to.h:23
points_tot::fixedpoint
void fixedpoint()
Definition
points_to.cpp:14
points_tot::transform
bool transform(const cfgt::nodet &)
Definition
points_to.cpp:54
points_tot::value_mapt
std::map< object_idt, object_id_sett > value_mapt
Definition
points_to.h:52
points_tot::cfg
cfgt cfg
Definition
points_to.h:50
points_tot::operator()
void operator()(goto_modelt &goto_model)
Definition
points_to.h:29
points_tot::cfgt
cfg_baset< empty_cfg_nodet > cfgt
Definition
points_to.h:49
points_tot::operator[]
const object_id_sett & operator[](const object_idt &object_id)
Definition
points_to.h:38
points_tot::empty_set
const object_id_sett empty_set
Definition
points_to.h:58
points_tot::value_map
value_mapt value_map
Definition
points_to.h:53
points_tot::points_tot
points_tot()
Definition
points_to.h:25
points_tot::output
void output(std::ostream &out) const
Definition
points_to.cpp:33
goto_model.h
Symbol Table + CFG.
object_id.h
Object Identifiers.
object_id_sett
std::set< object_idt > object_id_sett
Definition
object_id.h:58
operator<<
std::ostream & operator<<(std::ostream &out, const points_tot &points_to)
Definition
points_to.h:61
goto-instrument
points_to.h
Generated by
1.17.0