Lines Matching refs:RHS
18 // to keep track of whether LHS and RHS are negated.
19 static bool implies(const LExpr *LHS, bool LNeg, const LExpr *RHS, bool RNeg) {
24 return implies(A->left(), LNeg, RHS, RNeg) &&
25 implies(A->right(), LNeg, RHS, RNeg);
34 return implies(A->left(), LNeg, RHS, RNeg) ||
35 implies(A->right(), LNeg, RHS, RNeg);
43 switch (RHS->kind()) {
49 return RNeg ? RightOrOperator(cast<And>(RHS))
50 : RightAndOperator(cast<And>(RHS));
56 return RNeg ? RightAndOperator(cast<Or>(RHS))
57 : RightOrOperator(cast<Or>(RHS));
60 // to return !implies(LHS, RHS).
61 return implies(LHS, LNeg, cast<Not>(RHS)->exp(), !RNeg);
67 // RHS is now a terminal. Recurse on Left.
85 // to return !implies(LHS, RHS).
86 return implies(cast<Not>(LHS)->exp(), !LNeg, RHS, RNeg);
98 return cast<Terminal>(LHS)->expr() == cast<Terminal>(RHS)->expr();
105 bool implies(const LExpr *LHS, const LExpr *RHS) {
106 // Start out by assuming that LHS and RHS are not negated.
107 return ::implies(LHS, false, RHS, false);