Open costrouc opened 5 years ago
Look at antlr approach for transformations
One idea is to have a function that in the wildcards, and return the match and the replacement.
If they were both strings, it could be like this:
@register_rule
def reduce_psi_assign(x, y):
match = f"<i j> psi {x} assign {y}"
replacement = f"<i j> psi {x} assign <i j> psi {y}"
return match, replacement
Would like to have a less programatic way of performing moa dnf reductions and onf.
Current implementation is as follows.
rule: list of operations transforming ast
How far can this take me?
cc @saulshanabrook would like to talk about approach