28#include "node/node_manager.h"
50 Kernel(node::NodeManager &nm,
const bool &context_propagation =
true,
const bool &symmetry_breaking_perturbation =
true);
62 void apply(node::NodeManager &nm);
92 bool is_commutative(
const size_t &i,
const bool &from_cache =
true);
100 void context_propagate(
const std::vector<size_t> &processing,
const std::vector<size_t> &symbols);
117 void sort_propagate(std::unordered_map<std::string, node::Sort> &sort_key_map, std::vector<std::vector<parser::Parser::DTTypeDecl>> &datatype_blocks);
124 void propagate(
const std::vector<size_t> &processing);
Internal canonicalization kernel for SMTStabilizer.
std::vector< std::vector< size_t > > d_graph
void rebuild_graph()
Keep only currently ambiguous graph regions for next iteration.
std::vector< size_t > d_unique_symbols
void apply(node::NodeManager &nm)
Run the full stabilization pass and mutate node manager state.
bool d_context_propagation
std::vector< size_t > d_context_hash
bool is_commutative(const size_t &i, const bool &from_cache=true)
Check whether node kind at index i is treated as commutative.
std::vector< uint8_t > d_visited
std::vector< std::vector< std::pair< size_t, size_t > > > d_reversed_graph
void context_propagate(const std::vector< size_t > &processing, const std::vector< size_t > &symbols)
Run propagation to a fixed point over a selected subgraph.
std::vector< size_t > d_hash_table
void propagate(const std::vector< size_t > &processing)
One directional propagation pass on the selected nodes.
std::vector< size_t > d_symbols
std::vector< uint8_t > d_is_symbol
void sort_propagate(std::unordered_map< std::string, node::Sort > &sort_key_map, std::vector< std::vector< parser::Parser::DTTypeDecl > > &datatype_blocks)
Incorporate sort/datatype structure into propagation and naming.
bool d_symmetry_breaking_perturbation
std::vector< node::Node > d_nodes
std::vector< size_t > d_processing
std::vector< uint8_t > d_is_commutative
void specific_propagate()
Apply local perturbation to break remaining hash collisions.