24extern std::unordered_map<EquivLaws::EquivLaw, std::string>
equivalences;
40void preprocess(std::shared_ptr<Expression> lhs, std::shared_ptr<Expression> rhs);
55std::vector<std::vector<std::string>>
proveEquivalence(std::shared_ptr<Expression> lhs, std::shared_ptr<Expression> rhs);
75void generateNextSteps(std::shared_ptr<Expression> expr, std::shared_ptr<Expression> end,
bool &found, std::queue<std::shared_ptr<Expression>> &queue, std::unordered_map<std::string, std::pair<std::string, std::string>> &visited);
Header file for equivalence laws class.
Header file for expression class.
int MAX_EXPRESSION_LENGTH
Maximum length of the expressions in the queue.
void generateNextSteps(std::shared_ptr< Expression > expr, std::shared_ptr< Expression > end, bool &found, std::queue< std::shared_ptr< Expression > > &queue, std::unordered_map< std::string, std::pair< std::string, std::string > > &visited)
Generate the next expressions from the current expression. Creates a new expression for each law that...
std::vector< std::vector< std::string > > proveEquivalence(std::shared_ptr< Expression > lhs, std::shared_ptr< Expression > rhs)
Prove the expressions are equivalence using equivalence laws by solving the left hand side to the rig...
std::unordered_map< EquivLaws::EquivLaw, std::string > equivalences
Map of equivalences to be applied to the expressions.
int MAX_QUEUE_SIZE
Maximum size of the queue of expressions to be processed.
void preprocess(std::shared_ptr< Expression > lhs, std::shared_ptr< Expression > rhs)
Fill the map of equivalences to be applied to the expressions. Must be called before any other functi...