CBMC
sese_regions.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Single-entry, single-exit region analysis
4 
5 Author: Diffblue Ltd.
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_ANALYSES_SESE_REGIONS_H
13 #define CPROVER_ANALYSES_SESE_REGIONS_H
14 
16 #include <analyses/natural_loops.h>
17 #include <util/optional.h>
18 
20 {
21 public:
22  void operator()(const goto_programt &goto_program);
25  {
26  auto find_result = sese_regions.find(entry);
27  if(find_result == sese_regions.end())
28  return {};
29  else
30  return find_result->second;
31  }
32 
33  void output(
34  std::ostream &out,
35  const goto_programt &goto_program,
36  const namespacet &ns) const;
37 
38 private:
39  std::unordered_map<
45  const goto_programt &goto_program,
46  const natural_loopst &natural_loops);
47 };
48 
49 #endif // CPROVER_ANALYSES_SESE_REGIONS_H
sese_region_analysist::sese_regions
std::unordered_map< goto_programt::const_targett, goto_programt::const_targett, const_target_hash > sese_regions
Definition: sese_regions.h:43
sese_region_analysist::output
void output(std::ostream &out, const goto_programt &goto_program, const namespacet &ns) const
Definition: sese_regions.cpp:230
optional.h
cfg_dominators.h
namespacet
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:90
sese_region_analysist::get_region_exit
optionalt< goto_programt::const_targett > get_region_exit(goto_programt::const_targett entry) const
Definition: sese_regions.h:24
natural_loopst
A concretized version of natural_loops_templatet<const goto_programt, goto_programt::const_targett>
Definition: natural_loops.h:83
const_target_hash
Definition: goto_program.h:1184
optionalt
nonstd::optional< T > optionalt
Definition: optional.h:35
natural_loops.h
goto_programt
A generic container class for the GOTO intermediate representation of one function.
Definition: goto_program.h:72
goto_programt::const_targett
instructionst::const_iterator const_targett
Definition: goto_program.h:587
sese_region_analysist::compute_sese_regions
void compute_sese_regions(const goto_programt &goto_program, const natural_loopst &natural_loops)
Definition: sese_regions.cpp:121
sese_region_analysist::operator()
void operator()(const goto_programt &goto_program)
Definition: sese_regions.cpp:18
sese_region_analysist
Definition: sese_regions.h:19