Hygienic-macro-based Domain-specific Language for Multi-stage Programming That Requires No Changes to the Host Implementation
Journal of Information Processing · 2026 · 34 · 413-428
DOI: 10.2197/ipsjjip.34.413 ↗Kurz gefasst
Fachartikel in der Zeitschrift Journal of Information Processing, 2026. Verfasst von Seiji Umatani. Die Arbeit nennt 21 Literaturangaben.
Abstract (Originalsprache)
Extended languages, such as MetaOCaml and Template Haskell, that support multi-stage programming (MSP) provide dedicated syntax for quasiquotation and staged execution, thereby realizing both speedup and abstraction by explicitly handling code generation and execution. By contrast, numerous Lisp-family languages are equipped with quasiquotation and eval, and, except for the benefit of static typing, allow programming in a similar style. However, they have weaknesses in guaranteeing hygiene and in execution efficiency. This study proposes an embedded domain-specific language (DSL) for MSP that, without modifying the host implementation, eliminates eval while achieving both hygiene and high efficiency by associating macro expansion with multi-stage execution. The proposed DSL provides, as natural extensions of macro definition syntax, (1) multi-stage expansion of single-stage descriptions and (2) scope management via embedding and referencing of syntax objects. We perform a comparative evaluation against a naïve MSP implementation and demonstrate that the generated code runs faster.
Zitieren
APA
Umatani, S. (2026). Hygienic-macro-based Domain-specific Language for Multi-stage Programming That Requires No Changes to the Host Implementation. Journal of Information Processing, 34(0), 413-428. https://doi.org/10.2197/ipsjjip.34.413
Vancouver
Umatani S. Hygienic-macro-based Domain-specific Language for Multi-stage Programming That Requires No Changes to the Host Implementation. Journal of Information Processing. 2026;34(0):413-428. doi:10.2197/ipsjjip.34.413
BibTeX
@article{Umatani2026,
author = {Umatani, Seiji},
title = {Hygienic-macro-based Domain-specific Language for Multi-stage Programming That Requires No Changes to the Host Implementation},
journal = {Journal of Information Processing},
year = {2026},
volume = {34},
number = {0},
pages = {413--428},
doi = {10.2197/ipsjjip.34.413}
}
EUVIMED