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

PIL optimizer fails with Symbol not found #2051

Open
georgwiese opened this issue Nov 6, 2024 · 0 comments
Open

PIL optimizer fails with Symbol not found #2051

georgwiese opened this issue Nov 6, 2024 · 0 comments

Comments

@georgwiese
Copy link
Collaborator

georgwiese commented Nov 6, 2024

To reproduce: Get block_to_block_with_bus.pil and run:

$ cargo run pil output/block_to_block_with_bus.pil -o output -f         
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s
     Running `target/debug/powdr pil output/block_to_block_with_bus.pil -o output -f`
Analyzing PIL and computing constraints...
Writing output/block_to_block_with_bus_analyzed.pil.
done.
Optimizing pil...
thread 'main' panicked at /Users/georg/coding/powdr/pilopt/src/lib.rs:94:13:
Symbol not found: main_arith::sel[0]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I tried debugging this a little bit:

  • The problem appears to be this block, which adds a hint. Commenting this out makes the bug disappear.
  • collect_required_symbols appears to return main_arith::sel[0], which in my understanding is wrong. It should return main_arith::sel instead.
  • main_arith::sel[0] does not have a definition (only the array main_arith::sel)
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 a pull request may close this issue.

1 participant