Strings like not ((N > 20) != 0) (== Not(Ne(Gt(N, 20), 0))) were incorrectly interpreted by sympy.sympify as constant "False". This is a limitation by sympy, which does not assume integer 0 to be a Falsy, and enforces exact equivalence (or difference) checks with Ne. To get around this limitation, the DaCe internal AST preprocessor now replaces constants with boolean values if they are arguments to Comparison operations, where the other operand is also a comparison operation, thus returning a boolean.
This fixes an issue with DeadStateElimination, closing issue #1129.
Strings like
not ((N > 20) != 0)
(==Not(Ne(Gt(N, 20), 0))
) were incorrectly interpreted bysympy.sympify
as constant "False". This is a limitation by sympy, which does not assume integer 0 to be a Falsy, and enforces exact equivalence (or difference) checks withNe
. To get around this limitation, the DaCe internal AST preprocessor now replaces constants with boolean values if they are arguments to Comparison operations, where the other operand is also a comparison operation, thus returning a boolean.This fixes an issue with
DeadStateElimination
, closing issue #1129.