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.
问问这篇 Paper
问问你的智能体。
Lune 读过与它相关的顶会 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
