Fix synthesized expressions being non-minimal

Let's try this again. The implementation of canRaise callback was
overly complicated and was causing the minimizer to ocassionally
get stuck in a local optima.
This commit is contained in:
Zaid Abdulla committed 2022-06-14 11:23:33 -07:00
1 parent c06538f9cc
commit b0d50b07e7
1 file changed
+1 -7
+1 -7
View File
@@ -1108,13 +1108,7 @@ function getCanRaiseCallback(
return (idx: number, set: Set<number>): boolean => {
const i = idx >> 2;
const vars = context.getIsNullRelations(i);
if (!context.isIsNull(i)) {
if (!(idx & 1)) return true;
for (const n of vars) if (set.has((n << 2) ^ 3)) return true;
if (set.has(idx ^ 3)) return false;
for (const n of vars) if (!set.has((n << 2) ^ 2)) return false;
return true;
}
if (!context.isIsNull(i)) return !(idx & 1) || !set.has(idx ^ 3);
for (const k of vars) {
if (set.has((k << 2) ^ 1)) continue;