Macros for domain-specific languages
Michael Ballantyne, Alexis King, Matthias Felleisen
摘要
Macros provide a powerful means of extending languages. They have proven useful in both general-purpose and domain-specific programming contexts. This paper presents an architecture for implementing macro-extensible DSLs on top of macro-extensible host languages. The macro expanders of these DSLs inherit the syntax system, hygienic expansion, and more from the host. They transform the extensible DSL syntax into a DSL core language. This arrangement has several important consequences. It becomes straightforward to integrate the syntax of various DSLs and the host language when their expanders share these inherited components. Also, a DSL compiler may be designed around a fixed core language, even for an extensible DSL. Finally, macros empower programmers to safely grow DSLs on their own and tailor them to their needs.
问 Lune
几分钟看清这篇 Paper 的位置,不用再花一下午。
Lune 能读引用它和与它最相关的顶会 Paper,讲清它说了什么、后来怎样、哪里站不住,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
引用它的顶会 Paper3
- Exo 2: Growing a Scheduling LanguageYuka Ikarashi, Kevin Qian, Samir Droubi, Alex Reinking 等ASPLOS 2025 · 7 次引用
- Rhombus: A New Spin on Macros without All the ParenthesesMatthew Flatt, Taylor Allred, Nia Angle, Stephen De Gabrielle 等OOPSLA 2023 · 5 次引用
- Compositional embeddings of domain-specific languagesYaozhu Sun, Utkarsh Dhandhania, Bruno C. d. S. OliveiraOOPSLA 2022 · 4 次引用
相关 Paper
- MimIR: An Extensible and Type-Safe Intermediate Representation for the DSL AgeRoland Leißa, Marcel Ullrich, Joachim Meyer, Sebastian HackPOPL 2025 · 1 次引用
- Dependent type systems as macrosStephen Chang, Michael Ballantyne, Milo Turner, William J. BowmanPOPL 2020 · 8 次引用
- Modular Type Safety for Traits with Extensible Variants and Deep Pattern MatchingAndong Fan, Lionel Parreaux, Ningning XieOOPSLA 2026
- IRDL: an IR definition language for SSA compilersMathieu Fehr, Jeff Niu, River Riddle, Mehdi Amini 等PLDI 2022 · 13 次引用
- Pyrosome: Verified Compilation for Modular MetatheoryDustin Jamner, Gabriel Kammer, Ritam Nag, Adam ChlipalaOOPSLA 2025
