Skip to content

Commit

Permalink
repair: improve destruct atom
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Jan 9, 2024
1 parent c67be84 commit 10c5648
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rtlrepair/templates/conditional_overwrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ def collect_condition_atoms(conditions: list) -> list:

def destruct_to_atom(expr: list) -> set:
""" conjunction and negation is already part of our template, thus we want to exclude it from our atoms """
if isinstance(expr, vast.Unot) or isinstance(expr, vast.Ulnot):
if isinstance(expr, vast.UnaryOperator):
return destruct_to_atom(expr.right)
elif isinstance(expr, vast.Land) or isinstance(expr, vast.Uand):
elif isinstance(expr, vast.Land):
return destruct_to_atom(expr.left) | destruct_to_atom(expr.right)
else:
return { expr }

0 comments on commit 10c5648

Please sign in to comment.