ICFP 2022
Sun 11 - Fri 16 September 2022 Ljubljana, Slovenia
Fri 16 Sep 2022 11:00 - 11:30 at E3 - Session 2 Chair(s): Andy Keep

We present the design and implementation of a macro-embedding of a family of compiler intermediate languages, from a Scheme-like language to x86-64, into Racket. This embedding is used as part of a testing framework for a compilers course to derive interpreters for all the intermediate languages. The embedding implements features including safe, functional abstractions as well as unsafe assembly features, and the interactions between the two at various intermediate stages.

This paper aims to demonstrate language-oriented techniques and abstractions for implementing (1) a large family of languages and (2) interoperability between low- and high-level languages. The primary strength of this approach is the high degree of code reuse and interoperability compared to implementing each interpreter separately. The design emphasizes modularity and compositionality of an open set of language features by local macro expansion into a single host language, rather than implementing a language pre-defined by a closed set of features. This enables reuse from both the host language (Racket) and between intermediate languages, and enables interoperability between high- and low-level features, simplifying development of the intermediate language semantics. It also facilitates extending or redefining individual language features in intermediate languages, and exposing multiple interfaces to the embedded languages.

William J. Bowman is an assistant professor of computer science at the University of British Columbia in Vancouver. Broadly speaking, he is interested in making it easier for programmers to communicate their intent to machines, and preserving that intent through the stages of compilation. More specifically, his research interests include secure and verified compilation, dependently typed programming, verification, and meta-programming. His recent work examines type-preserving compilation of dependently typed programming language like Coq, a technique that can enable preserving security and correctness invariants of verified software through compilation and statically enforcing those invariants in the low-level (assembly-like) code generated by compilers.

Fri 16 Sep

Displayed time zone: Belgrade, Bratislava, Budapest, Ljubljana, Prague change

11:00 - 12:30
Session 2Scheme at E3
Chair(s): Andy Keep Meta Reality Labs Research
11:00
30m
Full-paper
Macro-embedding Compiler Intermediate Languages in Racket
Scheme
William J. Bowman University of British Columbia
Pre-print
11:30
30m
Talk
Scheme Requests for Implementation Status Report
Scheme
Arthur Gleckler SRFI Editor
12:00
30m
Short-paper
Automating the Design RecipeVirtual
Scheme
Hazel Levine Indiana University, Sam Tobin-Hochstadt Indiana University