Implementing modular domain specific languages and analyses

Daniel Ratiu, Markus Völter, Molotnikov, Zaur, Schaetz, Bernhard. Implementing modular domain specific languages and analyses. In Proceedings of the Workshop on {Model}-{Driven} {Engineering}, Verification and Validation - MoDeVVa '12. pages 35-40, ACM Press, Innsbruck, Austria, 2012. [doi]

Abstract

Domain specific languages allow users to directly express domain concepts in their programs and thereby eliminate the accidental complexity resulting from implementation details irrelevant to the domain. Cleaner programs, written in DSLs are much easier to analyze formally. However, domain specific analyses need to be implemented over and over again for each new domain specific language. In this paper we show that the use of language engineering techniques for modularizing languages can drastically improve on this situation. Language fragments (aka. language modules) together with a set of analyses defined for them can be reused between different DSLs, making the implementation of analyses significantly easier. This paper presents our approach for using the Meta-Programming System to implement domain specific languages and analyses both as extensions of C and in the domain of intelligent buildings. The main lesson learned is that modularization at language and analysis level allows rapid instantiation of advanced DSLs and their corresponding analyses.