4#include <unordered_map>
17 std::string
name()
const override {
18 return "AssumptionsAnalysis";
24 std::unordered_map<Node*, symbolic::Assumptions> own_assumptions_;
25 std::unordered_map<Node*, Node*> parent_scope_;
26 std::unordered_map<Node*, Node*> scope_of_;
28 std::unordered_map<Node*, symbolic::Assumptions> assumptions_;
29 std::unordered_map<Node*, symbolic::Assumptions> assumptions_with_trivial_;
30 std::unordered_map<Node*, symbolic::SymbolSet> constant_symbols_;
31 std::unordered_map<Node*, symbolic::SymbolSet> constant_symbols_with_trivial_;
33 std::shared_ptr<const symbolic::Assumptions::Map> root_with_trivial_;
45 bool with_branch_conditions_ =
false;
47 void traverse(Node& current, Node& scope);
Symbol assumptions for reasoning about bounds, constness, and evolution.
Definition structured_sdfg.h:30
Analysis(StructuredSDFG &sdfg)
AssumptionsAnalysis(StructuredSDFG &sdfg, bool with_branch_conditions)
bool is_parameter(const std::string &container)
bool invalidate(structured_control_flow::ControlFlowNode &changed) override
Traverses the subtree of changed again in the scope around it; scopes elsewhere keep their assumption...
bool is_parameter(const symbolic::Symbol &container)
const symbolic::SymbolSet & parameters()
AssumptionsAnalysis(StructuredSDFG &sdfg)
const symbolic::SymbolSet & constant_symbols(structured_control_flow::ControlFlowNode &node, bool include_trivial_bounds=false)
Symbols whose assumption at node is constant(); equals filtering get(node, ...), without the scan.
static symbolic::SymbolSet per_symbol_refined_symbols(const symbolic::Condition &cond)
std::string name() const override
Definition assumptions_analysis.h:17
const symbolic::Assumptions & get(structured_control_flow::ControlFlowNode &node, bool include_trivial_bounds=false)
void run(analysis::AnalysisManager &analysis_manager) override
Base class for all structured control flow nodes in a StructuredSDFG.
Definition control_flow_node.h:44
Base class for structured loop constructs.
Definition structured_loop.h:244
Map from symbols to their assumptions.
Definition assumptions.h:313
SymEngine::RCP< const SymEngine::Symbol > Symbol
Reference-counted pointer to a SymEngine Symbol.
Definition symbolic.h:71
std::set< Symbol, SymEngine::RCPBasicKeyLess > SymbolSet
Ordered set of symbols.
Definition symbolic.h:95
SymEngine::RCP< const SymEngine::Boolean > Condition
Reference-counted pointer to a boolean condition expression.
Definition symbolic.h:86
Symbolic system for integer-based symbol analysis.