Patrick Bahr IT University of Copenhagen

Calculating compilers effectively (Functional Pearl)

Zac Garby, Graham Hutton and Patrick Bahr
Proceedings of the 17th ACM SIGPLAN International Haskell Symposium, p. 109–119, 2024.

Abstract

Much work in the area of compiler calculation has focused on pure languages. While this simplifies the reasoning, it reduces the applicability. In this article, we show how an existing compiler calculation methodology can be naturally extended to languages with side-effects. We achieve this by exploiting an algebraic approach to effects, which keeps the reasoning simple and provides flexibility in how effects are interpreted. To make the ideas accessible we only use elementary functional programming techniques.

Categories: Compilers, Formal Verification

Tags: Algebraic Effects, Monads, Program Calculation