Formalizing and testing the consistency of DSL transformations
article
A domain specific language (DSL) focuses on the essential concepts in a specific problem domain, and abstracts from low-level implementation details. The development of DSLs usually centers around the metamodel,
grammar and code generator, possibly extended with transformations to analysis models. Typically, little attention is given to the formal semantics of the language, whereas this is essential for reasoning about DSL models, and for assessing the correctness of the generated code and analysis models.We argue that the semantics of a DSL should be defined explicitly and independently of any code generator, to avoid all kinds of complexities fromlow-level implementation details.As the generated analysis modelsmust reflect some of these implementation details, we propose to formalize them separately. To assess the correctness and consistency of the generated code and analysis models in a practicalway,we use conformance testing.We extensively illustrate this general approach using specific formalizations for an industrial DSL on collision prevention.We do not aim for a generic semantic model for any DSL, but this specific DSL indicates the potential of a modular semantics to facilitate reuse among DSLs.
grammar and code generator, possibly extended with transformations to analysis models. Typically, little attention is given to the formal semantics of the language, whereas this is essential for reasoning about DSL models, and for assessing the correctness of the generated code and analysis models.We argue that the semantics of a DSL should be defined explicitly and independently of any code generator, to avoid all kinds of complexities fromlow-level implementation details.As the generated analysis modelsmust reflect some of these implementation details, we propose to formalize them separately. To assess the correctness and consistency of the generated code and analysis models in a practicalway,we use conformance testing.We extensively illustrate this general approach using specific formalizations for an industrial DSL on collision prevention.We do not aim for a generic semantic model for any DSL, but this specific DSL indicates the potential of a modular semantics to facilitate reuse among DSLs.
TNO Identifier
545035
Source
Formel aspects of computing(28), pp. 181-206.
Pages
181-206