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

Optimizer should remove equal-constrained witness columns. #2081

Open
chriseth opened this issue Nov 13, 2024 · 0 comments
Open

Optimizer should remove equal-constrained witness columns. #2081

chriseth opened this issue Nov 13, 2024 · 0 comments

Comments

@chriseth
Copy link
Member

The optimizer seems to not remove equal-constrained witness columns.

When run on the poseidon_gl std test:

cargo run   pil -f test_data/std/poseidon_gl_test.asm 

The optimized pil contains the following code:

col witness X11_const;
main::X11 = main::X11_const;

Both X11 and X11_const are witness column.

I would propose the following:
If we have a polynomial constraint of the form w = v, where both w and v are witness columns, then replace all occurrences of w by v (replace the longer witness columns with the shorter one) and remove w.

Note that we cannot do that for array elements currently.

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