-
Notifications
You must be signed in to change notification settings - Fork 92
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
[WIP] Fix PIL optimizer #2054
[WIP] Fix PIL optimizer #2054
Conversation
pilopt/tests/optimizer.rs
Outdated
|
||
query |i| { | ||
// No-op, but references `x[0]`. | ||
let _ = x[0] + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you are saying that this code snippet x[0]
is not turned into an IndexAccess(Reference("x"), 0)
but instead into a Reference("x[0]")
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not done with the test. Indeed, this seems to work in main
, but something like this seems to be happening in the file referenced in #2051.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a small test to reproduce the issue: #2055
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I based this PR against #2055. Sounds like the way I fixed the issue is wrong though, the core issue is that there is a Reference("x[0]")
in the first place?
This is how this prover function is represented:
{
let intermediate = N::x[0] + 1_expr;
query |i| {
let _: expr = intermediate;
}
}
Do you know how to fix it though? 😬
f901bbb
to
b82352d
Compare
4c25db9
to
82a97f8
Compare
Superseded by #2056 |
Fixes #2051