privacy-scaling-explorations / chiquito

DSL for Halo2 circuits
https://docs.pecadorplonkish.xyz/
161 stars 36 forks source link

Changes for the language server #254

Closed alxkzmn closed 2 weeks ago

alxkzmn commented 1 month ago

The following changes were necessary to integrate with the language server:

alxkzmn commented 1 month ago

I see that some tests are failing due to the new usages field in the SymTableEntry, but I'd rather fix them only if the changes make it through the review 😃

leolara commented 4 weeks ago

so, now the changes to the analyser are missing?

alxkzmn commented 4 weeks ago

@leolara maybe I misunderstood but I thought that the conclusion was to extract the usages in a separate pass and put them in a separate data structure. In this case it could all be done in the language server.

leolara commented 3 weeks ago

@alxkzmn That is not the conclusion: https://github.com/privacy-scaling-explorations/chiquito/pull/254#discussion_r1625953580

The conclusion is to remove the lines that check if the state symbol is there and create it if it is not. The state symbol will be there.

alxkzmn commented 3 weeks ago

@leolara to make sure I'm on the right track:

leolara commented 3 weeks ago

Yes, single pass, you don't need a separate data structure. What you had before is ok, just needs to assume that the states are already in the symbol table, because they should be. As I explained, we are already doing kind of two passes, one to collect the state symbols and then to analyse each state after. So when you are analysing a transition you already should have the state in the symbol table

alxkzmn commented 3 weeks ago

@leolara the PR is ready for review.

leolara commented 2 weeks ago

I put all my ideas here together to avoid more cycles:

leolara commented 2 weeks ago

It was aprove already, you can merge