-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bogus redefinition in synthesized RHS? #808
Comments
aie!!! looks wrong. please tell us how to repro. |
I'll leave steps to repro to @jubitaneja since this was in a set of results that she synthesized, and I'm not 100% sure exactly what flags she used. |
I modified the enumerative synthesis and cache_infer script to run the synthesis experiment. Here is the branch that has the changes on the souper's side. I took LHSes harvested from Nick's souper-harvester that is integrated in wasmtime/cranelift and just inferred the RHSes using modified cache_infer script. |
Looking through the results, it looks like this only happens when the LHS doesn't start at |
@fitzgen you pointed out the right pattern. I tested this test case individually as well with master branch of souper and the issue can be reproduced.
I think there is some logic in writing RHSes with Lvalue numbering that counts the number of instructions on LHS and starts the count from there and hence, we are seeing the first instruction on RHS with lvalue label number as |
ok, I'll explain how this works (hopefully correctly -- it's been a couple of years since I messed with this part of souper) internally, these instruction numbers don't exist, they're purely an artifact of printing when you print souper to text, there's a context object that keeps track of names. if you want the names to be consistent across a LHS and RHS, you have to use the same context object. now in the message above, we're seeing two different tool executions -- so they're clearly not sharing a context object. so there's no reason to expect consistent numbering. I could easily be missing something, just taking a quick look here. but Jubi, if you want to show us a souper bug, you have to show the LHS and RHS being printed together, incorrectly. if you're printing them separately, you shouldn't expect any name consistency. |
We should probably change souper-check so that the whole replacement is printed after enumerative synthesis, not just the RHS. |
pretty sure there's a command line argument for doing exactly that |
@zhengyang92 pointed out the option to print the entire replacement after the synthesis is done instead of writing the RHSes only. I tested with
|
I'm seeing synthesized RHSes that redefine variables from the LHS like this:
Is that redefinition of
%3
valid? It doesn't look like it should be.+cc @jubitaneja
The text was updated successfully, but these errors were encountered: