You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Be able to express a wide variety of useful programs in Miden IR
Be able to compile programs from Miden IR to Miden Assembly
Have a test harness set up to exercise the compilation pipeline for verification
Non-Goal(s)
Have a Sway or Move frontend implemented
Details
In order to build a useful compiler from high-level languages to Miden Assembly (MASM), we must have an intermediate representation (IR) which is expressive enough to make lowering from high-level languages directly simple and straightforward, and general enough to be a viable target from a variety of language frontends. This IR must be able to express complex control flow not directly supported in MASM, but which meets certain constraints under which it is possible to transform into a MASM-compatible form. Furthermore, we must be able to express all of the supported MASM operations and their associated types. Additionally, the IR must be converted into a stack machine representation that matches MASM, either by lowering to MASM directly, or by undergoing a series of transformations during lowering that accomplishes that goal.
The IR we have defined currently meets all of the above requirements, but we now need to implement both the control flow transformations and the translation to MASM. Firstly, this requires a test harness which we can use to exercise the compilation pipeline and assert things about its behavior. Secondly, we must implement the translation to stack machine form and lower to MASM. The last piece of the puzzle is to wire up at least one language frontend to the compiler, but we are leaving that as a non-goal/nice-to-have for this milestone, as there are prerequisite tasks which must be tackled before we are ready for that step - namely the control flow transformations described above.
Goal(s)
Non-Goal(s)
Details
In order to build a useful compiler from high-level languages to Miden Assembly (MASM), we must have an intermediate representation (IR) which is expressive enough to make lowering from high-level languages directly simple and straightforward, and general enough to be a viable target from a variety of language frontends. This IR must be able to express complex control flow not directly supported in MASM, but which meets certain constraints under which it is possible to transform into a MASM-compatible form. Furthermore, we must be able to express all of the supported MASM operations and their associated types. Additionally, the IR must be converted into a stack machine representation that matches MASM, either by lowering to MASM directly, or by undergoing a series of transformations during lowering that accomplishes that goal.
The IR we have defined currently meets all of the above requirements, but we now need to implement both the control flow transformations and the translation to MASM. Firstly, this requires a test harness which we can use to exercise the compilation pipeline and assert things about its behavior. Secondly, we must implement the translation to stack machine form and lower to MASM. The last piece of the puzzle is to wire up at least one language frontend to the compiler, but we are leaving that as a non-goal/nice-to-have for this milestone, as there are prerequisite tasks which must be tackled before we are ready for that step - namely the control flow transformations described above.
NOTE: Issues have not yet been created for the above tasks, I'll create those shortly
The text was updated successfully, but these errors were encountered: