12 #ifndef CPROVER_GOTO_INSTRUMENT_ACCELERATE_ACCELERATION_UTILS_H
13 #define CPROVER_GOTO_INSTRUMENT_ACCELERATE_ACCELERATION_UTILS_H
31 typedef std::unordered_map<exprt, exprt, irep_hash>
expr_mapt;
67 std::set<std::pair<expr_listt, exprt>> &coefficients,
71 std::map<exprt, polynomialt> polynomials,
78 std::map<exprt, polynomialt> &polynomials,
79 std::map<exprt, exprt> &stashed,
87 std::map<exprt, polynomialt> polynomials,
102 typedef std::vector<polynomial_array_assignmentt>
106 std::map<exprt, polynomialt> &polynomials,
114 std::map<exprt, polynomialt> &polynomials,
119 std::map<exprt, polynomialt> &polynomials,
124 std::map<exprt, polynomialt> &polynomials,
std::unordered_map< exprt, exprt, irep_hash > expr_mapt
std::list< exprt > expr_listt
static exprt guard(const exprt::operandst &guards, exprt cond)
symbol_table_baset & symbol_table
void push_nondet(exprt &expr)
bool array_assignments2polys(expr_pairst &array_assignments, std::map< exprt, polynomialt > &polynomials, polynomial_array_assignmentst &array_polynomials, polynomialst &nondet_indices)
void find_modified(const patht &path, expr_sett &modified)
std::vector< polynomial_array_assignmentt > polynomial_array_assignmentst
std::pair< exprt, exprt > expr_pairt
const goto_functionst & goto_functions
bool do_nonrecursive(goto_programt::instructionst &loop_body, std::map< exprt, polynomialt > &polynomials, substitutiont &substitution, expr_sett &nonrecursive, scratch_programt &program)
bool do_arrays(goto_programt::instructionst &loop_body, std::map< exprt, polynomialt > &polynomials, substitutiont &substitution, scratch_programt &program)
void stash_polynomials(scratch_programt &program, std::map< exprt, polynomialt > &polynomials, std::map< exprt, exprt > &stashed, patht &path)
void extract_polynomial(scratch_programt &program, std::set< std::pair< expr_listt, exprt >> &coefficients, polynomialt &polynomial)
bool expr2poly(exprt &expr, std::map< exprt, polynomialt > &polynomials, polynomialt &poly)
message_handlert & message_handler
bool check_inductive(std::map< exprt, polynomialt > polynomials, patht &path, guard_managert &guard_manager)
bool assign_array(const index_exprt &lhs, const exprt &rhs, scratch_programt &program)
void gather_rvalues(const exprt &expr, expr_sett &rvalues)
acceleration_utilst(symbol_table_baset &_symbol_table, message_handlert &message_handler, const goto_functionst &_goto_functions, exprt &_loop_counter)
symbolt fresh_symbol(std::string base, typet type)
void abstract_arrays(exprt &expr, expr_mapt &abstractions)
std::vector< expr_pairt > expr_pairst
bool do_assumptions(std::map< exprt, polynomialt > polynomials, patht &body, exprt &guard, guard_managert &guard_manager)
void ensure_no_overflows(scratch_programt &program)
exprt precondition(patht &path)
void gather_array_accesses(const exprt &expr, expr_sett &arrays)
acceleration_utilst(symbol_table_baset &_symbol_table, message_handlert &message_handler, const goto_functionst &_goto_functions)
void stash_variables(scratch_programt &program, expr_sett modified, substitutiont &substitution)
expr_pairst gather_array_assignments(goto_programt::instructionst &loop_body, expr_sett &arrays_written)
Base class for all expressions.
A collection of goto functions.
A generic container class for the GOTO intermediate representation of one function.
instructionst::const_iterator const_targett
std::list< instructiont > instructionst
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
parentt::loopt natural_loopt
The symbol table base class interface.
The type of an expression, extends irept.
std::unordered_set< exprt, irep_hash > expr_sett
Compute natural loops in a goto_function.
std::list< path_nodet > patht
std::vector< polynomialt > polynomialst
std::map< exprt, exprt > substitutiont
This is unused by this implementation of guards, but can be used by other implementations of the same...