CBMC
sat_path_enumerator.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Loop Acceleration
4 
5 Author: Matt Lewis
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_GOTO_INSTRUMENT_ACCELERATE_SAT_PATH_ENUMERATOR_H
13 #define CPROVER_GOTO_INSTRUMENT_ACCELERATE_SAT_PATH_ENUMERATOR_H
14 
15 #include <map>
16 
18 
19 #include <analyses/natural_loops.h>
20 
21 #include "path_enumerator.h"
22 #include "path.h"
23 #include "cone_of_influence.h"
24 #include "acceleration_utils.h"
25 
27 {
28 public:
31  symbol_table_baset &_symbol_table,
32  goto_functionst &_goto_functions,
33  goto_programt &_goto_program,
35  goto_programt::targett _loop_header,
38  symbol_table(_symbol_table),
40  goto_functions(_goto_functions),
41  goto_program(_goto_program),
42  loop(_loop),
43  loop_header(_loop_header),
46  {
48  build_fixed();
49  }
50 
51  bool next(patht &path);
52 
53 protected:
56 
57  void build_path(scratch_programt &scratch_program, patht &path);
58  void build_fixed();
59 
60  void record_path(scratch_programt &scratch_program);
61 
68 
69  typedef std::
70  map<goto_programt::targett, exprt, goto_programt::target_less_than>
72  typedef std::map<exprt, bool> distinguish_valuest;
73 
78  std::list<exprt> distinguishers;
81  std::list<distinguish_valuest> accelerated_paths;
82 };
83 
84 #endif // CPROVER_GOTO_INSTRUMENT_ACCELERATE_SAT_PATH_ENUMERATOR_H
Loop Acceleration.
Base class for all expressions.
Definition: expr.h:56
A collection of goto functions.
A generic container class for the GOTO intermediate representation of one function.
Definition: goto_program.h:73
instructionst::iterator targett
Definition: goto_program.h:614
A loop, specified as a set of instructions.
Definition: loop_analysis.h:24
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:94
guard_managert & guard_manager
acceleration_utilst utils
distinguish_mapt distinguishing_points
message_handlert & message_handler
goto_programt::targett loop_header
void build_path(scratch_programt &scratch_program, patht &path)
goto_functionst & goto_functions
std::list< distinguish_valuest > accelerated_paths
symbol_table_baset & symbol_table
goto_programt & goto_program
void record_path(scratch_programt &scratch_program)
std::map< goto_programt::targett, exprt, goto_programt::target_less_than > distinguish_mapt
std::map< exprt, bool > distinguish_valuest
natural_loops_mutablet::natural_loopt & loop
sat_path_enumeratort(message_handlert &message_handler, symbol_table_baset &_symbol_table, goto_functionst &_goto_functions, goto_programt &_goto_program, natural_loops_mutablet::natural_loopt &_loop, goto_programt::targett _loop_header, guard_managert &guard_manager)
std::list< exprt > distinguishers
The symbol table base class interface.
Loop Acceleration.
std::unordered_set< exprt, irep_hash > expr_sett
Concrete Goto Program.
Compute natural loops in a goto_function.
Loop Acceleration.
std::list< path_nodet > patht
Definition: path.h:44
Loop Acceleration.
This is unused by this implementation of guards, but can be used by other implementations of the same...
Definition: guard_expr.h:20