| 131 | p_int_CMP(s, IRT_LE, ce, ann); |
| 132 | } |
| 133 | void p_int_CMP_reif(FlatZincSpace& s, IntRelType irt, ReifyMode rm, |
| 134 | const ConExpr& ce, AST::Node* ann) { |
| 135 | if (rm == RM_EQV && ce[2]->isBool()) { |
| 136 | if (ce[2]->getBool()) { |
| 137 | p_int_CMP(s, irt, ce, ann); |
| 138 | } else { |
| 139 | p_int_CMP(s, neg(irt), ce, ann); |
| 140 | } |
| 141 | return; |
| 142 | } |
| 143 | if (ce[0]->isIntVar()) { |
| 144 | if (ce[1]->isIntVar()) { |
| 145 | rel(s, s.arg2IntVar(ce[0]), irt, s.arg2IntVar(ce[1]), |
| 146 | Reify(s.arg2BoolVar(ce[2]), rm), s.ann2ipl(ann)); |
| 147 | } else { |
| 148 | rel(s, s.arg2IntVar(ce[0]), irt, ce[1]->getInt(), |
| 149 | Reify(s.arg2BoolVar(ce[2]), rm), s.ann2ipl(ann)); |
| 150 | } |
| 151 | } else { |
| 152 | rel(s, s.arg2IntVar(ce[1]), swap(irt), ce[0]->getInt(), |
| 153 | Reify(s.arg2BoolVar(ce[2]), rm), s.ann2ipl(ann)); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | /* Comparisons */ |
| 158 | void p_int_eq_reif(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) { |
no test coverage detected