Skip to content
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

Closed
wants to merge 3 commits into from
Closed

[WIP] Fix PIL optimizer #2054

wants to merge 3 commits into from

Conversation

georgwiese
Copy link
Collaborator

Fixes #2051


query |i| {
// No-op, but references `x[0]`.
let _ = x[0] + 1;
Copy link
Member

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]")?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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? 😬

@georgwiese georgwiese changed the base branch from main to reproduce-2051 November 7, 2024 11:02
@georgwiese
Copy link
Collaborator Author

Superseded by #2056

@georgwiese georgwiese closed this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PIL optimizer fails with Symbol not found
2 participants