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:
1 parent
c06538f9cc
commit
b0d50b07e7
1 file changed
+1
-7
@@ -1108,13 +1108,7 @@ function getCanRaiseCallback(
|
|||||||
return (idx: number, set: Set<number>): boolean => {
|
return (idx: number, set: Set<number>): boolean => {
|
||||||
const i = idx >> 2;
|
const i = idx >> 2;
|
||||||
const vars = context.getIsNullRelations(i);
|
const vars = context.getIsNullRelations(i);
|
||||||
if (!context.isIsNull(i)) {
|
if (!context.isIsNull(i)) return !(idx & 1) || !set.has(idx ^ 3);
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const k of vars) {
|
for (const k of vars) {
|
||||||
if (set.has((k << 2) ^ 1)) continue;
|
if (set.has((k << 2) ^ 1)) continue;
|
||||||
|
|||||||
Reference in new issue
Block a user