A Generative Programming Approach To Developing DSL Compilers

Domain-Specific Languages (DSLs) represent a proven approach to raising the abstraction level of programming. They offer high-level constructs and notations dedicated to a domain, structuring program design, easing program writing, masking the intricacies of underlying software layers, and guaranteeing critical properties. On the one hand, DSLs facilitate a straightforward mapping between a conceptual model and a solution expressed in a specific programming language. On the other hand, DSLs complicate the compilation process because of the gap in the abstraction level between the source and target language. The nature of DSLs make their compilation very different from the compilation of common General-Purpose Languages (GPLs). In fact, a DSL compiler generally produces code written in a GPL; low-level compilation is left to the compiler of the target GPL. In essence, a DSL compiler defines some mapping of the high-level information and features of a DSL into the target GPL and underlying layers (e.g., middleware, protocols, objects, ...). This paper presents a methodology to develop DSL compilers, centered around the use of generative programming tools. Our approach enables to structure the development of a DSL compiler on facets that represent dimensions of compilation. Each facet can then be implemented in a modular way, using aspects, annotations and specialization. Because these tools are high level, they match the needs of a DSL, facilitating the development of the DSL compiler, and making it modular and re-targetable. We illustrate our approach with a DSL for telephony services. The structure of the DSL compiler is presented, as well as practical uses of generative tools for some compilation facets.

Data and Resources

Additional Info

Field Value
Source https://inria.hal.science/inria-00070457
Author Consel, Charles, Fabien, Latry, Réveillère, Laurent, Cointe, Pierre
Maintainer CCSD
Last Updated May 16, 2026, 02:51 (UTC)
Created May 16, 2026, 02:51 (UTC)
Identifier Report N°: RR-5550
Language en
Rights https://about.hal.science/hal-authorisation-v1/
contributor Programming Language Technology For Communication Services (PHOENIX) ; INRIA Futurs ; Institut National de Recherche en Informatique et en Automatique (Inria)-Institut National de Recherche en Informatique et en Automatique (Inria)-Université Sciences et Technologies - Bordeaux 1 (UB)-École Nationale Supérieure d'Électronique, Informatique et Radiocommunications de Bordeaux (ENSEIRB)
creator Consel, Charles
date 2005-05-16T00:00:00
harvest_object_id 700ba4d3-730e-425d-b18b-0cf3a816bc0c
harvest_source_id 3374d638-d20b-4672-ba96-a23232d55657
harvest_source_title test moissonnage SELUNE
metadata_modified 2025-05-26T00:00:00
set_spec type:REPORT