cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
value_set_analysis.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Value Set Propagation
4
5
Author: Daniel Kroening, kroening@kroening.com
6
7
\*******************************************************************/
8
11
12
#ifndef CPROVER_POINTER_ANALYSIS_VALUE_SET_ANALYSIS_H
13
#define CPROVER_POINTER_ANALYSIS_VALUE_SET_ANALYSIS_H
14
15
#include <
analyses/ai.h
>
16
17
#include "
value_set_domain.h
"
// IWYU pragma: keep
18
#include "
value_sets.h
"
19
24
template
<
class
VSDT>
25
class
value_set_analysis_templatet
:
public
value_setst
,
public
ait
<VSDT>
26
{
27
private
:
28
const
namespacet
&
ns
;
29
30
public
:
31
typedef
VSDT
domaint
;
32
typedef
ait<domaint>
baset
;
33
typedef
typename
baset::locationt
locationt
;
34
35
explicit
value_set_analysis_templatet
(
const
namespacet
&_ns)
36
:
baset
(
std
::make_unique<
ai_domain_factory_location_constructort
<VSDT>>()),
37
ns
(_ns)
38
{
39
}
40
41
// interface value_sets
42
std::vector<exprt>
43
get_values
(
const
irep_idt
&,
locationt
l,
const
exprt
&expr)
override
44
{
45
auto
s = this->
abstract_state_before
(l);
46
auto
d = std::dynamic_pointer_cast<const domaint>(s);
47
return
d->value_set.get_value_set(expr,
ns
);
48
}
49
};
50
51
typedef
52
value_set_analysis_templatet<value_set_domain_templatet<value_sett>
>
53
value_set_analysist
;
54
55
#endif
// CPROVER_POINTER_ANALYSIS_VALUE_SET_ANALYSIS_H
ai.h
Abstract Interpretation.
ai_baset::abstract_state_before
virtual cstate_ptrt abstract_state_before(locationt l) const
Get a copy of the abstract state before the given instruction, without needing to know what kind of d...
Definition
ai.h:225
ai_domain_factory_location_constructort
Definition
ai_domain.h:240
ait< domaint >::locationt
goto_programt::const_targett locationt
Definition
ai.h:589
ait< VSDT >::ait
ait()
Definition
ai.h:569
exprt
Base class for all expressions.
Definition
expr.h:57
namespacet
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition
namespace.h:91
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:26
value_set_analysis_templatet::domaint
VSDT domaint
Definition
value_set_analysis.h:31
value_set_analysis_templatet::locationt
baset::locationt locationt
Definition
value_set_analysis.h:33
value_set_analysis_templatet::baset
ait< domaint > baset
Definition
value_set_analysis.h:32
value_set_analysis_templatet< value_set_domain_templatet< value_sett > >::ns
const namespacet & ns
Definition
value_set_analysis.h:28
value_set_analysis_templatet::get_values
std::vector< exprt > get_values(const irep_idt &, locationt l, const exprt &expr) override
Definition
value_set_analysis.h:43
value_set_analysis_templatet::value_set_analysis_templatet
value_set_analysis_templatet(const namespacet &_ns)
Definition
value_set_analysis.h:35
value_setst::value_setst
value_setst()
Definition
value_sets.h:24
std
STL namespace.
value_set_analysist
value_set_analysis_templatet< value_set_domain_templatet< value_sett > > value_set_analysist
Definition
value_set_analysis.h:53
value_set_domain.h
Value Set.
value_sets.h
Value Set Propagation.
irep_idt
dstringt irep_idt
Definition
verification_result.h:16
pointer-analysis
value_set_analysis.h
Generated by
1.17.0