CBMC
value_set_analysis_fi.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Value Set Propagation (flow insensitive)
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_POINTER_ANALYSIS_VALUE_SET_ANALYSIS_FI_H
13 #define CPROVER_POINTER_ANALYSIS_VALUE_SET_ANALYSIS_FI_H
14 
16 
17 #include "value_set_domain_fi.h"
18 #include "value_sets.h"
19 
20 class symbolt;
21 
23  public value_setst,
24  public flow_insensitive_analysist<value_set_domain_fit>
25 {
26 public:
28 
29  // constructor
31  const namespacet &_ns,
32  track_optionst _track_options=TRACK_ALL_POINTERS):
34  track_options(_track_options)
35  {
36  }
37 
39 
40  void initialize(const goto_programt &goto_program) override;
41  void initialize(const goto_functionst &goto_functions) override;
42 
43 protected:
45 
46  bool check_type(const typet &type);
47  void get_globals(std::list<value_set_fit::entryt> &dest);
48  void add_vars(const goto_functionst &goto_functions);
49  void add_vars(const goto_programt &goto_programa);
50 
51  void get_entries(
52  const symbolt &symbol,
53  std::list<value_set_fit::entryt> &dest);
54 
55  void get_entries_rec(
56  const irep_idt &identifier,
57  const std::string &suffix,
58  const typet &type,
59  std::list<value_set_fit::entryt> &dest);
60 
61 public:
62  // interface value_sets
63  std::vector<exprt> get_values(
64  const irep_idt &function_id,
65  locationt l,
66  const exprt &expr) override;
67 };
68 
69 #endif // CPROVER_POINTER_ANALYSIS_VALUE_SET_ANALYSIS_FI_H
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:38
Base class for all expressions.
Definition: expr.h:56
goto_programt::const_targett locationt
A collection of goto functions.
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
Symbol table entry.
Definition: symbol.h:28
The type of an expression, extends irept.
Definition: type.h:29
bool check_type(const typet &type)
value_set_analysis_fit(const namespacet &_ns, track_optionst _track_options=TRACK_ALL_POINTERS)
std::vector< exprt > get_values(const irep_idt &function_id, locationt l, const exprt &expr) override
void get_entries(const symbolt &symbol, std::list< value_set_fit::entryt > &dest)
void add_vars(const goto_functionst &goto_functions)
void get_entries_rec(const irep_idt &identifier, const std::string &suffix, const typet &type, std::list< value_set_fit::entryt > &dest)
void get_globals(std::list< value_set_fit::entryt > &dest)
void initialize(const goto_programt &goto_program) override
flow_insensitive_analysist< value_set_domain_fit > baset
Flow Insensitive Static Analysis.
Value Set (Flow Insensitive)
Value Set Propagation.