@inproceedings{a20ccc22633e4693b482ae7bd448ed80,
title = "Towards Modular Compilation Using Higher-Order Effects",
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.",
keywords = "algebraic effects and handlers, compilation, higher-order effects, modularity, monadic semantics, nanopass",
author = "Reinders, {Jaro S.}",
year = "2023",
doi = "10.4230/OASIcs.EVCS.2023.22",
language = "English",
series = "OpenAccess Series in Informatics",
publisher = "Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing",
editor = "Ralf Lammel and Mosses, {Peter D.} and Friedrich Steimann",
booktitle = "Eelco Visser Commemorative Symposium, EVCS 2023",
address = "Germany",
note = "2023 Eelco Visser Commemorative Symposium, EVCS 2023 ; Conference date: 05-04-2023 Through 05-04-2023",
}