LogiXpr
|
Header file for solver functions. More...
#include "equivLaws.h"
#include "expression.h"
#include <queue>
#include <utility>
#include <vector>
#include <algorithm>
Go to the source code of this file.
Functions | |
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 functions in this file. | |
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 right hand side. Required that the expressions are actually equivalent for this to work. | |
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 can be applied to the current expression and adds it to the queue of steps to be processed if the expression has not already been visited. | |
Variables | |
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. | |
int | MAX_EXPRESSION_LENGTH |
Maximum length of the expressions in the queue. | |
Header file for solver functions.
Definition in file solver.h.