CBMC
Loading...
Searching...
No Matches
disjunctive_polynomial_acceleration.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Loop Acceleration
4
5Author: Matt Lewis
6
7\*******************************************************************/
8
11
12#ifndef CPROVER_GOTO_INSTRUMENT_ACCELERATE_DISJUNCTIVE_POLYNOMIAL_ACCELERATION_H
13#define CPROVER_GOTO_INSTRUMENT_ACCELERATE_DISJUNCTIVE_POLYNOMIAL_ACCELERATION_H
14
15#include <map>
16#include <set>
17
19
21
22#include "path.h"
23#include "cone_of_influence.h"
24#include "acceleration_utils.h"
25
27
29{
30public:
54
55 bool accelerate(path_acceleratort &accelerator);
56
57 bool fit_polynomial(
58 exprt &target,
60 patht &path);
61
62 bool find_path(patht &path);
63
64protected:
66
68 scratch_programt &program,
69 std::map<exprt, exprt> &values,
70 std::set<std::pair<expr_listt, exprt> > &coefficients,
73 exprt &target);
74 void cone_of_influence(const exprt &target, expr_sett &cone);
75
77
79 void build_fixed();
80
82
83 bool depends_on_array(const exprt &e, exprt &array);
84
92
93 typedef std::
94 map<goto_programt::targett, exprt, goto_programt::target_less_than>
96 typedef std::map<exprt, bool> distinguish_valuest;
97
101 std::list<symbol_exprt> distinguishers;
104 std::list<distinguish_valuest> accelerated_paths;
105};
106
107// NOLINTNEXTLINE(whitespace/line_length)
108#endif // CPROVER_GOTO_INSTRUMENT_ACCELERATE_DISJUNCTIVE_POLYNOMIAL_ACCELERATION_H
Loop Acceleration.
void find_modified(const patht &path, expr_sett &modified)
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
void assert_for_values(scratch_programt &program, std::map< exprt, exprt > &values, std::set< std::pair< expr_listt, exprt > > &coefficients, int num_unwindings, goto_programt &loop_body, exprt &target)
natural_loops_mutablet::natural_loopt & loop
void record_path(scratch_programt &scratch_program)
bool fit_polynomial(exprt &target, polynomialt &polynomial, patht &path)
std::map< goto_programt::targett, exprt, goto_programt::target_less_than > distinguish_mapt
void cone_of_influence(const exprt &target, expr_sett &cone)
void build_path(scratch_programt &scratch_program, patht &path)
disjunctive_polynomial_accelerationt(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)
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.
instructionst::iterator targett
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition namespace.h:91
The NIL expression.
Definition std_expr.h:3208
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
This is unused by this implementation of guards, but can be used by other implementations of the same...
Definition guard_expr.h:20