z-logo
Premium
Interoperable domain‐specific languages families for code generation
Author(s) -
Malohlava Michal,
Plasil Frantisek,
Bures Tomas,
Hnetynka Petr
Publication year - 2013
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.2118
Subject(s) - computer science , programming language , domain specific language , digital subscriber line , code generation , program transformation , interoperability , abstract syntax , software engineering , java , semantics (computer science) , operating system , telecommunications , key (lock)
SUMMARY This paper has been motivated by experience gained with specification and code generation of control elements for a software component platform and general‐purpose programming language like Java and C. The problem to be addressed is two‐fold: first, several domain‐specific languages (DSL) are to be employed to express different element concerns (architecture, deployment context, code pattern) and second, porting to another general‐purpose language should avoid modification of the specification and related code generation process as much as possible. In both respects, the classical template‐based code generation technique proved to be inflexible, requiring the code generator to be blurred with ad hoc encoded DSL facets. The paper addresses the problem by introducing the concept of interoperable DSL family. Each member of the family is built around its core language, which can be further specialized by embedding into a target programming language. Interoperability of these DSLs is achieved at the level of abstract syntax trees (ASTs) with help of queries. As a proof of the concept, we have implemented the queries via the AST transformation rules of the Stratego/XT framework. In the evaluation, we provide a comparison with the original template‐based implementation, which clearly indicates the DSL family and AST transformation benefits. We also provide examples of application areas where the concept of interoperable DSL family can be employed (and also indicate how this can be accomplished). Copyright © 2012 John Wiley & Sons, Ltd.

This content is not available in your region!

Continue researching here.

Having issues? You can contact us here