Implementing an Embedded Compiler using Program Transformation Rules

Abstract : Domain-specific languages (DSLs) are well-recognized to ease programming and improve robustness for a specific domain, by providing high-level domain-specific notations and verifications of domain-specific properties. The compiler of a DSL, however, is often difficult to develop and maintain, due to the need to define a specific treatment for a large and potentially increasing number of language constructs. To address this issue, we propose an approach for specifying a DSL compiler and verifier using control-flow sensitive concrete-syntax based matching rules. These rules either collect information about the source code to carry out verifications or perform transformations to carry out compilation. Because rules only mention the relevant constructs, using their concrete syntax, and hide the complexity of control-flow graph traversal, it is easy to understand the purpose of each rule. Furthermore, new compilation steps can be added using only a small number of lines of code. We explore this approach in the context of the z2z DSL for network gateway development, and show that the core of its compiler and verifier can be implemented in this manner.
Document type :
Journal articles
Liste complète des métadonnées

Cited literature [45 references]  Display  Hide  Download

https://hal.archives-ouvertes.fr/hal-00844536
Contributor : Tegawendé F. Bissyandé <>
Submitted on : Monday, July 15, 2013 - 2:28:37 PM
Last modification on : Monday, December 17, 2018 - 1:24:59 AM
Document(s) archivé(s) le : Wednesday, October 16, 2013 - 4:16:14 AM

File

spe.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-00844536, version 1

Citation

Tegawendé F. Bissyandé, Laurent Réveillère, Julia Lawall, Yérom-David Bromberg, Gilles Muller. Implementing an Embedded Compiler using Program Transformation Rules. Software: Practice and Experience, Wiley, 2013, pp.1.20. 〈hal-00844536〉

Share

Metrics

Record views

550

Files downloads

496