My incomplete attempt at writing a multi-pass Luau decompiler in Haskell.
Some of the passes are quite complete:
- SSA Construction
- Dead Code Elimination (unused variables)
- SSA Destruction by coalescing phi variables
Structuring the control flow graph is yet to be complete. And upvalue analysis is also needed.
- Sebastian Buchwald, Denis Lohner, Sebastian Ullrich. Verified Construction of Static Single Assignment Form
- Delphine Demange, Yon Fernandez de Retana. Mechanizing conventional SSA for a verified destruction with coalescing. 25th International Conference on Compiler Construction, Mar 2016, Barcelona, Spain. ffhal-01378393
- Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes. Closures in Lua
- Khaled Yakdan, Sebastian Eschweiler, Elmar Gerhards-Padilla, Matthew Smith. No More Gotos: Decompilation Using Pattern-Independent Control-Flow Structuring and Semantics-Preserving Transformations