Patrick Bahr
Monadic compiler calculation (functional pearl)
Bahr, Patrick; Hutton, Graham
Abstract
Bahr and Hutton recently developed a new approach to calculating correct compilers directly from specifications of their correctness. However, the methodology only considers converging behaviour of the source language, which means that the compiler could potentially produce arbitrary, erroneous code for source programs that diverge. In this article, we show how the methodology can naturally be extended to support the calculation of compilers that address both convergent and divergent behaviour simultaneously, without the need for separate reasoning for each aspect. Our approach is based on the use of the partiality monad to make divergence explicit, together with the use of strong bisimilarity to support equational-style calculations, but also generalises to other forms of effect by changing the underlying monad.
Citation
Bahr, P., & Hutton, G. (2022). Monadic compiler calculation (functional pearl). Proceedings of the ACM on Programming Languages, 6(ICFP), 80-108. https://doi.org/10.1145/3547624
Journal Article Type | Article |
---|---|
Acceptance Date | Jul 1, 2022 |
Online Publication Date | Aug 31, 2022 |
Publication Date | Aug 29, 2022 |
Deposit Date | Sep 5, 2022 |
Publicly Available Date | Sep 6, 2022 |
Journal | Proceedings of the ACM on Programming Languages |
Electronic ISSN | 2475-1421 |
Publisher | Association for Computing Machinery (ACM) |
Peer Reviewed | Peer Reviewed |
Volume | 6 |
Issue | ICFP |
Article Number | 93 |
Pages | 80-108 |
DOI | https://doi.org/10.1145/3547624 |
Keywords | Safety, Risk, Reliability and Quality, Software |
Public URL | https://nottingham-repository.worktribe.com/output/10638695 |
Publisher URL | https://dl.acm.org/doi/10.1145/3547624 |
Files
Monadic compiler calculation (functional pearl)
(299 Kb)
PDF
Publisher Licence URL
https://creativecommons.org/licenses/by/4.0/
You might also like
Calculating Compilers Effectively (Functional Pearl)
(2024)
Presentation / Conference Contribution
Beyond Trees: Calculating Graph-Based Compilers (Functional Pearl)
(2024)
Journal Article
Quotient Haskell: Lightweight Quotient Types for All
(2024)
Journal Article
Programming language semantics: It’s easy as 1,2,3
(2023)
Journal Article
Calculating dependently-typed compilers (functional pearl)
(2021)
Journal Article
Downloadable Citations
About Repository@Nottingham
Administrator e-mail: discovery-access-systems@nottingham.ac.uk
This application uses the following open-source libraries:
SheetJS Community Edition
Apache License Version 2.0 (http://www.apache.org/licenses/)
PDF.js
Apache License Version 2.0 (http://www.apache.org/licenses/)
Font Awesome
SIL OFL 1.1 (http://scripts.sil.org/OFL)
MIT License (http://opensource.org/licenses/mit-license.html)
CC BY 3.0 ( http://creativecommons.org/licenses/by/3.0/)
Powered by Worktribe © 2025
Advanced Search