fitzgen commented on issue #5647:
cc @jameysharp, any idea what might be causing this ISLE codegen bug?
jameysharp commented on issue #5647:
I think there's a codegen bug here that I should look into, but I don't think it's urgent because this bug can only happen with multi-terms, and I believe there's an easy workaround applicable to rules in any multi-constructor.
I think if you remove the priorities from these rules, everything will work. You've forced ISLE to evaluate two rules in a specific order, where both rules need to loop over the same
inst_data
multi-extractor result. By giving ISLE the freedom to schedule these rules in any order, you'll allow it to loop over that extractor only once, so it won't try to reuse an iterator that's already been consumed.Since egraph simplifications are specified in a multi-constructor term, all matches will be returned, so you don't need to set rule priorities to ensure that the right rule wins. I don't believe there's any significant impact on elaboration results from the order that simplifications are returned in, either.
fitzgen commented on issue #5647:
That fixed it! Thanks @jameysharp!
Last updated: Nov 22 2024 at 16:03 UTC