You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is quite inconvenient to specify a pattern to match, not to say description the equivalence of a given match_and_rewrite rule. While dispatching on type signature like xDSL/MLIR is OK, I'm more leaning towards an actual pattern description language e.g
the actual design probably still need a bit more thoughts but this is why I originally didn't choose to do dispatch/multiple dispatch. We should provide something like https://github.com/JuliaSymbolics/Metatheory.jl which also describes how to do bidirectional rewrite so PRs like QuEraComputing/bloqade#183 are no longer necessary.
So roughly there are decorators/objects that one can optionally use but always fallback to the most generic Python visitor if none of them applies, e.g
It is quite inconvenient to specify a pattern to match, not to say description the equivalence of a given
match_and_rewrite
rule. While dispatching on type signature like xDSL/MLIR is OK, I'm more leaning towards an actual pattern description language e.gthe actual design probably still need a bit more thoughts but this is why I originally didn't choose to do dispatch/multiple dispatch. We should provide something like https://github.com/JuliaSymbolics/Metatheory.jl which also describes how to do bidirectional rewrite so PRs like QuEraComputing/bloqade#183 are no longer necessary.
So roughly there are decorators/objects that one can optionally use but always fallback to the most generic Python visitor if none of them applies, e.g
however, we need to think about how to model this with a proper Python syntax it seems tricky doing this in Python. Could be a special rule class? e.g
The text was updated successfully, but these errors were encountered: