Merging upstream version 6.1.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
3c6d649c90
commit
08ecea3adf
61 changed files with 1844 additions and 1555 deletions
|
@ -188,9 +188,7 @@ def absorb_and_eliminate(expression):
|
|||
aa.replace(exp.TRUE if kind == exp.And else exp.FALSE)
|
||||
elif is_complement(b, ab):
|
||||
ab.replace(exp.TRUE if kind == exp.And else exp.FALSE)
|
||||
elif (set(b.flatten()) if isinstance(b, kind) else {b}) < set(
|
||||
a.flatten()
|
||||
):
|
||||
elif (set(b.flatten()) if isinstance(b, kind) else {b}) < set(a.flatten()):
|
||||
a.replace(exp.FALSE if kind == exp.And else exp.TRUE)
|
||||
elif isinstance(b, kind):
|
||||
# eliminate
|
||||
|
@ -227,9 +225,7 @@ def simplify_literals(expression):
|
|||
operands.append(a)
|
||||
|
||||
if len(operands) < size:
|
||||
return functools.reduce(
|
||||
lambda a, b: expression.__class__(this=a, expression=b), operands
|
||||
)
|
||||
return functools.reduce(lambda a, b: expression.__class__(this=a, expression=b), operands)
|
||||
elif isinstance(expression, exp.Neg):
|
||||
this = expression.this
|
||||
if this.is_number:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue