Domain-Specific Languages (DSLs)
Summary of Most Relevant Topic Papers
The ability to abstraction is one of the basic cognitive abilities of human beings. Both science and philosophy use models to understand and describe the concepts and phenomena in their fields. Engineering disciplines use models to describe the systems they intend to design. All human beings use models, but only informatics started to define and study the set of valid models, namely the modeling language explicitly. This is made necessary because computer scientists use models not only to communicate among each other, but also with computers.
Informatics, therefore, is very much about languages. We use universally applicable modeling languages to describe problems and problem contexts. We employ general-purpose programming languages (GPLs) to implement solutions. We specify properties, architect and design solutions. And we define tests, as well as an increasing number of application specific languages and DSLs tailored for a concrete target area.
A DSL is always constructed with a particular domain in mind. Examples include HTML for websites, Matlab for numerical computation, or SQL for relational database management. In each instance, the DSL trades some expressiveness of GPLs in order to allow for more concise models in the target domain.
As software systems have become essential components of nearly all innovative products, increasingly many non-ICT experts now find themselves working with these systems. Furthermore, complexity of software-based systems is increasing. While modeling languages such as the Unified Modeling Language (UML) provide a high level of abstraction to deal with complexity, these languages are usually still too technical (hence UML profiles are useful, as discussed in [GHK+07] and [PFR02]). DSLs address both of these problems. Non-ICT experts benefit from DSLs by being able to transfer already familiar language concepts to the new application. Experienced users benefit by having a smaller mental gap between the software system and the associated real world models.
The main drawback of domain specific languages currently is still their challenging creation process. Not only does the creation of a computer language necessitate the fundamentals, such as a carefully defined grammar and corresponding translation programs. Productive usage of a language also requires extensive tool support. Generative Software Engineering techniques are at the center of attention for attempts to meet these challenges. In [SRVK10] we discuss the state of the art and current efforts to develop languages through meta-modeling.
The figure below depicts the architecture of a typical DSL processing tool in a model-based software engineering process. DSLs and the models expressed with them are becoming first-class elements of the software engineering process. In order to support this development, research was and is necessary focusing on new, effective, and efficient ways of creating DSLs and corresponding tool support. The processing of a model is relatively similar to classical compiler architecture it consists of a front end handling the input, an internal validation and transformation part and a back and to produce the desired results. Like in classical compiler construction parts of this infrastructure is generated using a meta-tool, in this case MontiCore.
DSL Definition
DSLs have to be designed carefully to meet their respective requirements. The core design of a DSL consists of a desired concrete and abstract syntax [CFJ+16]. We examine the relations between concrete and abstract syntax and propose a language definition format in [KRV07b] and [KRV10], which allows the combined definition of concrete and abstract syntax.
Our experience shows that guidelines for the creation of DSLs tremendously improve their quality. They target and enable suitability, reuse, conciseness, and usability. In [FHR08], we discuss metrics and potential guidelines, that help to achieve high quality models and extend this into a collection of design guidelines for DSLs in [KKP+09]. We discuss the needed roles in software development using domain specific languages already in [KRV06].
Another important aspect is how to define the semantics of DSLs. Variability in syntax and semantics for DSLs in general and UML in particular has been discussed in [GR11] and [GMR+16]. Controlled and extensible variability of concrete and abstract syntax with independent language features are defined in [BEK+18b]. These are both prerequisites for a systematic composition of independently defined language features amounting to a language product line [BEK+19]. From such a product line, many individual languages can be defined, fitting perfectly to the desired needs of the users.
[BDL+18] also presents a method to derive internal DSLs, i.e. pure Java APIs, that allow to directly build and manipulate the abstract syntax of a model, without offering a concrete syntax, from grammars. Similarly, grammars are translated to accurate metamodels as described in [BJRW18].
For an extensive discussion on semantics we refer the reader to Semantics of Modeling Languages.
Composition of DSLs
Modularity is a key concept in software development and the enabler for efficient reuse. We investigated the application of modularity to the development of DSLs in [GKR+07], [KRV08], [Voe11], and with a special focus on analysis techniques in [TAB+21].
This approach is extended by compositional techniques for a relativ classical form of analysis, namely context conditions and especially symbol tables in [HLN+15] and [HLN+15a]. These internal composition techniques extend the ability to reuse and compose tool internal algorithms that can be applied on the abstract syntax and thus goes far beyond a mere reuse of definitions of context-free language constructs (i.e. the grammar).
Therefore, modularity has been successfully applied in various areas of the DSL development process, such as concrete and abstract syntax, context conditions, and symbol table structures and has been implemented in our language workbench MontiCore [HKR21].
We can compose independently developed languages into integrated families of DSLs, which allows us to describe a system from various viewpoints using these different DSLs. The language family UML/P, initially realized in [Sch12], serves as an example of this technique.
We can reuse existing languages by embedding them as sub-languages, e.g., Java’s expression language can be used for various purposes within a modeling DSL. Consequently, we have integrated both, Java statements and expressions, into UML/P. We are further investigating the decomposition of generators and modular composition of generated code. Another important aspect for composition is inheritance and adaption of existing concepts.
As described in [KRV08] [HRW18], we can inherit from existing languages and adapt certain language concepts. An often used example is to extend an action language by new forms of actions. These concrete techniques are summarized in the broader discussion on the so called “global” integration of domain specific modeling languages and techniques in a conceptual model [CBCR15], which is published in [CCF+15a].
DSL Tooling
As previously mentioned, the usability of a language depends on the availability of powerful tooling. We have implemented the MontiCore DSL workbench as a realization of all the aforementioned concepts regarding DSLs. It is available as a stand-alone tool as well as a collection of Eclipse plugins. It also creates stand-alone tools as well as tailored Eclipse-based plugins for the defined DSLs [KRV07a]. We generate editors with syntax highlighting, syntactic and semantic content assist and auto-completion, graphical outlines, error reporting, hyperlinks, etc., just from the DSL definition.
Moreover, there is a strong need for evolution and management of models [LRSS10], especially for comfortable transformation languages. Therefore, [Wei12] [HRW15] [Hoe18] present a tool that creates an infrastructure for transformations that are specifically dedicated to an underlying DSL. The generated transformation language is quite understandable for domain experts and comes with an engine dedicated to transform models of this DSL.
MontiCore
More details about the MontiCore Language Workbench for DSLs can be found in [GKR+06], [KRV08], [KRV10], [GKR+08] and [Kra10] as well as on the MontiCore Website.
Some successful applications are also documented in the unusual domains of Air Traffic Management [ZPK+11] and television [DHH+20].
Key Statements
- DSLs are a promising technology to deal with complexity of software products and the perversion of software into various domains.
- Quality assurance and efficient ways to create, manage, and evolve DSLs are essential for the success of DSLs.
- Key factors for efficient DSL tooling design are compositionality and thus reusability of tooling and language infrastructures.
- MontiCore is a successful tooling infrastructure for the development of DSLs.
Selected Topic-Specific Publications
-
[Kus21]Aachener Informatik-Berichte, Software Engineering, Band 49, ISBN 978-3-8440-8286-9, Shaker Verlag, Nov. 2021.
-
[TAB+21]In: Composing Model-Based Analysis Tools, Heinrich, Robert and Duran, Francisco and Talcott, Carolyn and Zschaler, Steffen (Eds.), pp. 45-70, ISBN 978-3-030-81914-9, Springer, Jul. 2021.
-
[BHR+21]In: Composing Model-Based Analysis Tools, Heinrich, Robert and Duran, Francisco and Talcott, Carolyn and Zschaler, Steffen (Eds.), pp. 217-234, ISBN 978-3-030-81914-9, Springer, Jul. 2021.
-
[HKR21]Aachener Informatik-Berichte, Software Engineering, Band 48, ISBN 978-3-8440-8010-0, Shaker Verlag, May 2021.
-
[BEH+20]In: Journal of Object Technology (JOT), L. Hamann, R. Paige, A. Pierantonio, B. Rumpe, A. Vallecillo (Eds.), Volume 19(3), pp. 3:1-16, AITO - Association Internationale pour les Technologies Objets, Oct. 2020.
-
[BPR+20]In: Proceedings of the 23rd ACM/IEEE International Conference on Model Driven Engineering Languages and Systems, pp. 35-46, ACM, Oct. 2020.
-
[HJRW20]In: Modellierung 2020, D. Bork, D. Karagiannis, H. C. Mayr (Eds.), pp. 189-190, Gesellschaft für Informatik e.V., Feb. 2020.
-
[DHH+20]In: Modellierung 2020, D. Bork, D. Karagiannis, H. C. Mayr (Eds.), pp. 173-188, Gesellschaft für Informatik e.V., Feb. 2020.
-
[Gre19]Aachener Informatik-Berichte, Software Engineering, Band 42, ISBN 978-3-8440-6879-5, Shaker Verlag, Aug. 2019.
-
[HMR+19]In: Journal of Object Technology (JOT), A. Pierantonio, M. van den Brand, B. Combemale (Eds.), Volume 18(1), pp. 1-60, AITO - Association Internationale pour les Technologies Objets, Jul. 2019.
-
[Her19]Aachener Informatik-Berichte, Software Engineering, Band 41, ISBN 978-3-8440-6707-1, Shaker Verlag, Jun. 2019.
-
[BEK+19]In: Journal of Systems and Software (JSS), R. C. Sevilla, L. Fuentes, M. Lochau (Eds.), Volume 152, pp. 50-69, Elsevier, Jun. 2019.
-
[Hoe18]Aachener Informatik-Berichte, Software Engineering, Band 36, ISBN 978-3-8440-6322-6, Shaker Verlag, Dec. 2018.
-
[BEK+18b]In: International Conference on Systems and Software Product Line (SPLC’18), ACM, Sep. 2018.
-
[Plo18]Aachener Informatik-Berichte, Software Engineering, Band 33, ISBN 978-3-8440-5779-9, Shaker Verlag, Feb. 2018.
-
[BDL+18]In: International Conference on Software Language Engineering (SLE’18), pp. 187-199, ACM, 2018.
-
[BJRW18]In: International Conference on Software Language Engineering (SLE’18), pp. 174-186, ACM, 2018.
-
[HRW18]In: Journal Computer Languages, Systems & Structures, Volume 54, pp. 386-405, Elsevier, 2018.
-
[Rot17]Aachener Informatik-Berichte, Software Engineering, Band 31, ISBN 978-3-8440-5688-4, Shaker Verlag, Dec. 2017.
-
[AHRW17]In: International Conference on Robotic Computing (IRC’17), pp. 172-179, IEEE, Apr. 2017.
-
[Loo17]Aachener Informatik-Berichte, Software Engineering, Band 27, ISBN 978-3-8440-5131-5, Shaker Verlag, Mar. 2017.
-
[Wor16]Aachener Informatik-Berichte, Software Engineering, Band 25, Shaker Verlag, Nov. 2016.
-
[CFJ+16]Chapman & Hall/CRC Innovations in Software Engineering and Software Development Series, Nov. 2016.
-
[MRRW16]In: Workshop on Model-Driven Engineering for Component-Based Software Systems (ModComp’16), Volume 1723, pp. 19-24, CEUR Workshop Proceedings, Oct. 2016.
-
[Hab16]Aachener Informatik-Berichte, Software Engineering, Band 24, Shaker Verlag, Sep. 2016.
-
[Rei16]Aachener Informatik-Berichte, Software Engineering, Band 22, ISBN 978-3-8440-4446-1, Shaker Verlag, May 2016.
-
[GMR+16]In: Modellierung 2016 Conference, Volume 254, pp. 141-156, LNI, Bonner Köllen Verlag, Mar. 2016.
-
[PBI+16]In: Modellierung 2016 Conference, Volume 254, pp. 93-108, LNI, Bonner Köllen Verlag, Mar. 2016.
-
[HLN+15a]In: Model-Driven Engineering and Software Development, Volume 580, pp. 45-66, Communications in Computer and Information Science, Springer, 2015.
-
[CBCR15]In: Globalizing Domain-Specific Languages, pp. 7-20, LNCS 9400, Springer, 2015.
-
[CCF+15a]LNCS 9400, Springer, 2015.
-
[HRW15]In: Conference on Model Driven Engineering Languages and Systems (MODELS’15), pp. 136-145, ACM/IEEE, 2015.
-
[HHR+15]In: Workshop on Model-Driven Engineering for Component-Based Software Systems (ModComp’15), Volume 1463, pp. 18-23, CEUR Workshop Proceedings, 2015.
-
[RRW15]In: MORSE/VAO Workshop on Model-Driven Robot Software Engineering and View-based Software-Engineering, pp. 41-47, ACM, 2015.
-
[HLN+15]In: Model-Driven Engineering and Software Development Conference (MODELSWARD’15), pp. 19-31, SciTePress, 2015.
-
[Pin14]Aachener Informatik-Berichte, Software Engineering, Band 17, ISBN 978-3-8440-2876-8, Shaker Verlag, 2014.
-
[HRR12]RWTH Aachen University, AIB-2012-03, Technical Report, Feb. 2012.
-
[Wei12]Aachener Informatik-Berichte, Software Engineering, Band 12, ISBN 978-3-8440-1191-3, Shaker Verlag, 2012.
-
[Sch12]Aachener Informatik-Berichte, Software Engineering, Band 11, ISBN 978-3-8440-0864-7, Shaker Verlag, 2012.
-
[GR11]In: Workshop on Modeling, Development and Verification of Adaptive Systems, pp. 17-32, LNCS 6662, Springer, 2011.
-
[ZPK+11]In: Proceedings of the SESAR Innovation Days, EUROCONTROL, 2011.
-
[Voe11]Aachener Informatik-Berichte, Software Engineering, Band 9, ISBN 978-3-8440-0328-4, Shaker Verlag, 2011.
-
[KRV10]In: International Journal on Software Tools for Technology Transfer (STTT), Volume 12(5), pp. 353-372, Springer, Sep. 2010.
-
[SRVK10]In: Model-Based Engineering of Embedded Real-Time Systems Workshop (MBEERTS’10), pp. 57-76, LNCS 6100, Springer, 2010.
-
[LRSS10]In: Model-Based Engineering of Embedded Real-Time Systems Workshop (MBEERTS’10), pp. 241-270, LNCS 6100, Springer, 2010.
-
[Ber10]Aachener Informatik-Berichte, Software Engineering, Band 6, ISBN 978-3-8322-9378-9, Shaker Verlag, 2010.
-
[Kra10]Aachener Informatik-Berichte, Software Engineering, Band 1, ISBN 978-3-8322-8948-5, Shaker Verlag, März. 2010.
-
[KKP+09]In: Domain-Specific Modeling Workshop (DSM’09), pp. 7-13, Techreport B-108, ISBN 978-952-488-371-9, Helsinki School of Economics, Oct. 2009.
-
[FHR08]In: Informatik-Spektrum, Band 31(5), pp. 408-424, Oktober. 2008.
-
[KRV08]In: Conference on Objects, Models, Components, Patterns (TOOLS-Europe’08), pp. 297-315, LNBIP 11, Springer, 2008.
-
[GKR+08]In: 30th International Conference on Software Engineering (ICSE 2008), Leipzig, Germany, May 10-18, 2008, Companion Volume, pp. 925-926, 2008.
-
[GHK+07]In: Object-oriented Modelling of Embedded Real-Time Systems Workshop (OMER4’07), 2007.
-
[KRV07a]In: Domain-Specific Modeling Workshop (DSM’07), Technical Reports TR-38, ISBN 978-951-39-2915-2, Jyväskylä University, Finland, 2007.
-
[KRV07b]In: Conference on Model Driven Engineering Languages and Systems (MODELS’07), pp. 286-300, LNCS 4735, Springer, 2007.
-
[GKR+07]In: 4th International Workshop on Software Language Engineering, Nashville, Informatik-Bericht 4/2007, Johannes-Gutenberg-Universität Mainz, 2007.
-
[GKR+06]CFG-Fakultät, TU Braunschweig, 2006-04, Informatik-Bericht, Aug. 2006.
-
[KRV06]In: Domain-Specific Modeling Workshop (DSM’06), pp. 150-158, Technical Report TR-37, Jyväskylä University, Finland, 2006.
-
[PFR02]In: Software Product Lines Conference (SPLC’02), pp. 188-197, LNCS 2379, Springer, 2002.
Related Topics
- Agile Model-Based Software Engineering
- Compositionality/Modularity of Models
- Evolution & Transformation of Models
- Generative Software Engineering
- MontiArc - Architectural Modeling
- MontiCore - Language Workbench
- Semantics of Modeling Languages
- Software Language Engineering (SLE)
- Unified Modeling Language (UML)
- Variability & Software Product Lines (SPL)