* @param x2
* @param x3
* @throws ContradictionException
*/
public void ite(int y, int x1, int x2, int x3) throws ContradictionException {
IVecInt clause = new VecInt(5);
// y <=> (x1 -> x2) and (not x1 -> x3)
// y -> (x1 -> x2) and (not x1 -> x3)
clause.push(-y).push(-x1).push(x2);
processClause(clause);
clause.clear();
clause.push(-y).push(x1).push(x3);
processClause(clause);
// y <- (x1 -> x2) and (not x1 -> x3)
// not(x1 -> x2) or not(not x1 -> x3) or y
// x1 and not x2 or not x1 and not x3 or y
// (x1 and not x2) or ((not x1 or y) and (not x3 or y))
// (x1 or not x1 or y) and (not x2 or not x1 or y) and (x1 or not x3 or
// y) and (not x2 or not x3 or y)
// not x1 or not x2 or y and x1 or not x3 or y and not x2 or not x3 or y
clause.clear();
clause.push(-x1).push(-x2).push(y);
processClause(clause);
clause.clear();
clause.push(x1).push(-x3).push(y);
processClause(clause);
clause.clear();
clause.push(-x2).push(-x3).push(y);
processClause(clause);
// taken from Niklas Een et al SAT 2007 paper
// Adding the following redundant clause will improve unit propagation
// y -> x2 or x3
clause.clear();
clause.push(-y).push(x2).push(x3);
processClause(clause);
}