Towards Modular Compilation Using Higher-Order Effects
Compilers transform a human readable source language into machine readable target language. Nanopass compilers simplify this approach by breaking up this transformation into small steps that are more understandable, maintainable, and extensible. We propose a semantics-driven variant of the nanopass compiler architecture exploring the use a effects and handlers to model the intermediate languages and the transformation passes, respectively. Our approach is fully typed and ensures that all cases in the compiler are covered. Additionally, by using an effect system we abstract over the control flow of the intermediate language making the compiler even more flexible. We apply this approach to a minimal compiler from a language with arithmetic and let-bound variables to a string of pretty printed X86 instructions. In the future, we hope to extend this work to compile a larger and more complicated language and we envision a formal verification framework from compilers written in this style.
Wed 5 AprDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
14:00 - 15:30 | Session 3: Parsing & TransformationEelco Visser Commemorative Symposium at Theatre Hall Chair(s): Bernd Fischer Stellenbosch University, South Africa | ||
14:00 10mTalk | Context in Parsing: Techniques and Applications Eelco Visser Commemorative Symposium Eric Van Wyk Department of Computer Science and Engineering, University of Minnesota, USA Pre-print | ||
14:10 10mTalk | Comparing Bottom-up with Top-down Parsing Architectures for the Syntax Definition Formalism from a Disambiguation Standpoint Eelco Visser Commemorative Symposium Jurgen Vinju CWI; Eindhoven University of Technology Pre-print | ||
14:20 10mTalk | Analysing the SML97 Definition: Lexicalisation Eelco Visser Commemorative Symposium Elizabeth Scott Royal Holloway University of London, Adrian Johnstone Royal Holloway University of London | ||
14:30 10mTalk | On the Origins of Coccinelle Eelco Visser Commemorative Symposium Julia Lawall Inria File Attached | ||
14:40 10mTalk | Typed Multi-Language Strategy Combinators Eelco Visser Commemorative Symposium James Koppel Massachusetts Institute of Technology, USA | ||
14:50 10mTalk | Towards Modular Compilation Using Higher-Order Effects Eelco Visser Commemorative Symposium Jaro Reinders TU Delft | ||
15:00 10mTalk | Visitor Optimization Revisited – Realizing Traversal Graph Pruning by Runtime Bytecode Generation Eelco Visser Commemorative Symposium | ||
15:10 10mTalk | Refactoring = Substitution + Rewriting: Towards Generic, Language-Independent Refactorings Eelco Visser Commemorative Symposium DOI Pre-print | ||
15:20 10mOther | Session closing Eelco Visser Commemorative Symposium |