Print Email Facebook Twitter Towards Modular Compilation Using Higher-Order Effects Title Towards Modular Compilation Using Higher-Order Effects Author Reinders, J.S. (TU Delft Programming Languages) Contributor Lammel, Ralf (editor) Mosses, Peter D. (editor) Steimann, Friedrich (editor) Date 2023 Abstract 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. Subject algebraic effects and handlerscompilationhigher-order effectsmodularitymonadic semanticsnanopass To reference this document use: http://resolver.tudelft.nl/uuid:a20ccc22-633e-4693-b482-ae7bd448ed80 DOI https://doi.org/10.4230/OASIcs.EVCS.2023.22 Publisher Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing ISBN 9783959772679 Source Eelco Visser Commemorative Symposium, EVCS 2023 Event 2023 Eelco Visser Commemorative Symposium, EVCS 2023, 2023-04-05, Delft, Netherlands Series OpenAccess Series in Informatics, 2190-6807, 109 Part of collection Institutional Repository Document type conference paper Rights © 2023 J.S. Reinders Files PDF OASIcs_EVCS_2023_22.pdf 594.63 KB Close viewer /islandora/object/uuid:a20ccc22-633e-4693-b482-ae7bd448ed80/datastream/OBJ/view