Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Refactoring: Compiler to return new structure for several machines #280

Closed
leolara opened this issue Jul 23, 2024 · 2 comments
Closed

Refactoring: Compiler to return new structure for several machines #280

leolara opened this issue Jul 23, 2024 · 2 comments
Assignees

Comments

@leolara
Copy link
Collaborator

leolara commented Jul 23, 2024

We need to start the path that allows multiple machines. This is a complex refactoring, and from the SBPIR on we will build new compiler to the plonkish IR. But this is not in this task.

We should allow the main compiler src -> SBPIR to return several machines.

For that I would:

  1. rename the current compiler::compile function to compiler::compile_legacy and compiler::CompilerResult to compiler::CompilerResultLegacy. We need this so the previous examples and tests keep working. It should be easy with a refactoring tool like in vscode.
  2. Rename sbpir::SBPIR to sbpir::SBPIRMachine.
  3. Create a new sbpir::SBPIR that contains a hashmap of uuid -> SBPIRMachine and another hashmap from identifier -> uuid.
  4. Create a new compiler::compile that can take a source code with several machines and returns a new compiler::CompilerResult that contains the new sbpir::SBPIR
@leolara
Copy link
Collaborator Author

leolara commented Jul 23, 2024

Even, better SBPIR renamed to SBPIRLegacy and a copy of SBPIR becomes SBPIRMachine that we will be able to modify SBPIRMachine a lot, and create a new plonkish compiler.

Eventually this will end up removing the SuperCircuits that are not that good design, but we inherited from zkEVM.

@alxkzmn
Copy link
Collaborator

alxkzmn commented Aug 7, 2024

Implemented in #284

@alxkzmn alxkzmn closed this as completed Aug 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants