`uip` is always true
sfiruch opened this issue · comments
PVS Studio (https://pvs-studio.com/en/order/for-students/#IDD159822EC6) found this potential problem.
The if
statement on analyze.cpp:1186 is superfluous. uip
must be non-zero because of the while loop on line 1093:
uip = 0;
while (!uip) {
assert (i > 0);
const int lit = (*t)[--i];
if (!flags (lit).seen)
continue;
if (var (lit).level == level)
uip = lit;
}
Looks like redundant indeed but not harmful.
It is probably better to keep it as it is, since this function is pretty complex and somewhat defensive code is better in these cases.