Fix invalid expression after minimization

In rare edge cases where IS NULL is used the minimization process can
generate an expression that's not equivilant to the original one.
This commit is contained in:
Zaid Abdulla committed 2020-10-16 17:33:29 -07:00
1 parent 91d7152ca7
commit 44a2fe11ee
1 file changed
+1 -2
+1 -2
View File
@@ -1019,8 +1019,7 @@ function boolExprSynthToExpression(boolExpr: BoolExprSynth): Expression {
const { dcSet, isNull } = generateDcSetAndIsNull(variables);
minterms = sanitizeMinterms(minterms, isNull);
const canRaise = (idx: number, set: Set<number>): boolean =>
!isNull.has(idx >> 2) || !(idx & 1) || !set.has(idx ^ 3);
const canRaise = getCanRaiseCallback(isNull);
minterms = espresso(minterms, dcSet, { canRaise });
return sopToExpression(minterms, variables);
}