// and remove unsupported values for variable
public void reviseVar(int indexVar) throws ContradictionException {
int[] currentSupport;
int val;
if (vars[indexVar].hasEnumeratedDomain()) {
DisposableValueIterator it = vars[indexVar].getValueIterator(true);
int left = Integer.MIN_VALUE;
int right = left;
try {
while (it.hasNext()) {
val = it.next();
if (!isValid(lastSupport(indexVar, val))) {
currentSupport = seekNextSupport(indexVar, val);
if (currentSupport != null) {
setSupport(currentSupport);
} else {
if (val == right + 1) {
right = val;
} else {
vars[indexVar].removeInterval(left, right, this);
left = right = val;
}
// vars[indexVar].removeVal(val, this, false);
}
}
}
vars[indexVar].removeInterval(left, right, this);
} finally {
it.dispose();
}
} else {
int[] inf_supports = lastBoundSupport(indexVar, 0);
if (vars[indexVar].getLB() != inf_supports[indexVar] || !isValid(inf_supports)) {
for (val = vars[indexVar].getLB(); val <= vars[indexVar].getUB(); val++) {