Lines Matching defs:RHS
19 // to keep track of whether LHS and RHS are negated.
20 static bool implies(const LExpr *LHS, bool LNeg, const LExpr *RHS, bool RNeg) {
25 return implies(A->left(), LNeg, RHS, RNeg) &&
26 implies(A->right(), LNeg, RHS, RNeg);
35 return implies(A->left(), LNeg, RHS, RNeg) ||
36 implies(A->right(), LNeg, RHS, RNeg);
44 switch (RHS->kind()) {
50 return RNeg ? RightOrOperator(cast<And>(RHS))
51 : RightAndOperator(cast<And>(RHS));
57 return RNeg ? RightAndOperator(cast<Or>(RHS))
58 : RightOrOperator(cast<Or>(RHS));
61 // to return !implies(LHS, RHS).
62 return implies(LHS, LNeg, cast<Not>(RHS)->exp(), !RNeg);
68 // RHS is now a terminal. Recurse on Left.
86 // to return !implies(LHS, RHS).
87 return implies(cast<Not>(LHS)->exp(), !LNeg, RHS, RNeg);
99 return cast<Terminal>(LHS)->expr() == cast<Terminal>(RHS)->expr();
106 bool implies(const LExpr *LHS, const LExpr *RHS) {
107 // Start out by assuming that LHS and RHS are not negated.
108 return ::implies(LHS, false, RHS, false);