powdr-labs / powdr

A modular stack for zkVMs, with a focus on productivity, security and performance.
Apache License 2.0
380 stars 77 forks source link

Allow PIL functions to declare more objects #1517

Open georgwiese opened 2 months ago

georgwiese commented 2 months ago

PIL functions can already declare stage-0 witness columns, which are added to the namespace of the caller. In addition, we should allow them to create:

chriseth commented 2 months ago

I think PIL should not be able to explicitly specify a stage for witness columns. Challenges can already be declared, but I think we should also use a built in function that just returns a challenge with an unused ID in the current stage.

So the only thing that currently cannot be declared is fixed columns. The main restriction here is that we need the LetStatementInsideBlock to allow to specify a type (and a type scheme / template var).