return output;
}
+ // ChooseMonom makes sure that the the LHS is not contained on the RHS, so we
+ // set this "single" to true in the branch that runs checkMonomial.
+ bool single = false;
if (BVPLUS == lhs.GetKind())
{
rhs =
_simp->SimplifyTerm(_bm->CreateTerm(BVPLUS, len, rhs, leftover_lhs));
lhs = chosen_monom;
+ single = true;
} //end of if(BVPLUS ...)
if (BVUMINUS == lhs.GetKind())
{
case SYMBOL:
{
+ DoNotSolve_TheseVars.insert(lhs);
+
//input is of the form x = rhs first make sure that the lhs
//symbol does not occur on the rhs or that it has not been
//solved for
- if (VarSeenInTerm(lhs, rhs))
+ if (!single && VarSeenInTerm(lhs, rhs))
{
//found the lhs in the rhs. Abort!
- DoNotSolve_TheseVars.insert(lhs);
return eq;
}
// return eq;
// }
- DoNotSolve_TheseVars.insert(lhs);
if (!_simp->UpdateSolverMap(lhs, rhs))
{
return eq;
//identifying variables in the those terms. Prevents double
//counting.
ASTNodeMap TermsAlreadySeenMap;
- ASTNodeMap TermsAlreadySeenMap_ForArrays;
+ //ASTNodeMap TermsAlreadySeenMap_ForArrays;
//solved variables list: If a variable has been solved for then do
//not solve for it again
//Checks for arrayreads in a term. if yes then returns true, else
//return false
- bool CheckForArrayReads(const ASTNode& term);
- bool CheckForArrayReads_TopLevel(const ASTNode& term);
+ //bool CheckForArrayReads(const ASTNode& term);
+ //bool CheckForArrayReads_TopLevel(const ASTNode& term);
//Creates new variables used in solving
ASTNode NewVar(unsigned int n);
TermsAlreadySeenMap.clear();
DoNotSolve_TheseVars.clear();
FormulasAlreadySolvedMap.clear();
- TermsAlreadySeenMap_ForArrays.clear();
+ //TermsAlreadySeenMap_ForArrays.clear();
}
//Top Level Solver: Goes over the input DAG, identifies the
{
DoNotSolve_TheseVars.clear();
FormulasAlreadySolvedMap.clear();
- TermsAlreadySeenMap_ForArrays.clear();
+ //TermsAlreadySeenMap_ForArrays.clear();
} //End of ClearAllTables()
}; //end of class bvsolver