mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-04-20 03:03:25 -04:00
This PR attempts various issues around using challenges in hints, which is blocking #1306: 1. Hints of later-phase witness columns are now removed in witgen, as these columns don't need to be computed yet anyway and the hint might be accessing a challenge that does not exist. 2. The query callback is now cloned for each phase of witness generation (because otherwise it was only available in the first phase). 3. `SymbolicEvaluator` no longer panics when encountering challenges, but returns an error. This evaluator is used to detect patterns in identities, like `A' - A = 0`. This means that we can't detect patterns in identities that involve challenges, but at least it doesn't panic. 4. `witgen::query_processor::Symbols` can now evaluate challenges. 5. `witgen::query_processor::Symbols` now also looks up intermediate "polynomials" (which includes challenges). This is necessary because we don't currently inline intermediate polynomials in hints (which we do for identities). I added a test that demonstrates that challenges can now be used in hints.