IntSet exclude = coreClausesWithMaxVar(trace, maxVar);
assert !exclude.isEmpty();
// get all clauses reachable from the conflict clause
IntSet next = trace.reachable(Ints.singleton(trace.size()-1));
// remove all clauses backward reachable from the clauses with the given maxVar
next.removeAll(trace.backwardReachable(exclude));
if (!next.isEmpty()) {
return next;
}
}
}