zkp-compiler-shootout
zkp-compiler-shootout copied to clipboard
Triton Generation
Currently my code generator for Triton is quite primitive. I would like the following to be made
- [x] Add a notion of blocks
- blocks are a label + code inside
- nested blocks are not allowed!
- [x] Add a notion of collected labels
- These are all the labels in a function
- This also serves as an abstraction mechanism
- Since functions like
if
create new labels to continue at, it is important to be able to compose this with code that comes next - Meaning that if we end off with a continuation address, and some code after it in it's own block, we should unify the jump points and give the block two names or unify the names
- This means that we can effectively compose any abstractions, even those which create branches
- Since functions like
- [ ] #17
- [ ] Add a notion of functions
- Functions will collect all labels, and compose an entry point
- [ ] Make Program encompass this
- This means that a program will now be some some code that also keeps the relevant functions in mind and generates out the proper calls.
- Further this would be the entry point to the circuit