Scaling-up domain-specific modelling languages through modularity services
Introduction
Model-driven engineering (MDE) promotes models as the central assets in software development [1], [2]. Models are described either using general-purpose modelling languages, like the UML, or with domain-specific modelling languages (DSMLs) tailored to an area of interest [3]. In both cases, models abstract away accidental details of the system being built, focusing on its essential features. However, models of large complex systems may become too big and hence difficult to understand by humans and to process by tools [4].
For decades, the programming languages community has developed modularity mechanisms to cope with large programs [5]. These include the possibility to fragment programs into language units (e.g., classes or interfaces) which are stored in different files and organized in modules (e.g., packages in Java). Many programming languages also support scoping and visibility rules controlling which elements are visible and can be accessed from other modules (e.g., through access level modifiers). Other techniques that contribute to the efficient management of large programs focus on ways to avoid recompiling a whole program upon localized changes, e.g., by incremental type-checking, compilation and linking mechanisms [6], [7].
In contrast, DSMLs often lack modularity mechanisms, and models expressed with them are frequently monolithic and reside in a single file. This is so as many language development frameworks do not provide intuitive means to enhance the definition of DSMLs with modularity facilities, like fragmentation strategies for models, or incremental validation of constraints within a given scope. Although some environments provide ad-hoc modularization services for specific modelling languages (e.g., UML) [8], [9], [10], [11], [12], [13], these are not readily available to developers of new DSMLs. Instead, developers need to program the required services manually for the platform where the DSML environment is being built. Since this is a complex task that requires expert knowledge, most DSMLs end up lacking these features, which hinders the scalability of modelling in practice.
To improve the scalability of domain-specific modelling in MDE, we propose generic modularity services comparable to those existing for programming languages. This is in general challenging as programming languages come with explicitly defined semantics that drive the abstraction mechanisms, but meta-models often have an implicit semantics. Hence, our proposal covers a subset of modularity concepts that seem useful to many languages (information hiding and compilation unit) and do not necessarily rely on an explicit specification of the meta-model semantics.
Our approach is based on extending the meta-model of the DSML with information about the modular organization of models, scope of references, object visibility rules, attribute indexing, and validation scope of DSML constraints. Model modularization permits describing strategies to fragment models into packages and different kinds of units, which are stored in separate files. As a model is fragmented into smaller parts, reference scoping and object visibility rules permit customising how objects can be accessed and cross-linked across units. To improve efficiency, constraints can define a scope and be validated incrementally, while attributes and references can be indexed for more efficient queries [14].
We have realized our proposal in a tool called EMF-Splitter [15]. This describes the different modularization services as patterns which are instantiated on top of the DSML meta-model, and from which a scalable modelling environment with the defined services is synthesized. To improve efficiency, the generated environment makes use of Hawk [14], a model indexer supporting efficient querying across fragmented resources.
We have evaluated the benefits of our proposal by means of three experiments. The first one demonstrates the applicability of our approach, based on the analysis of a public repository of more than 300 meta-models, and 224 meta-models from specifications of the Object Management Group (OMG). The second and third experiments focus on performance. In particular, the second experiment evaluates the efficiency gains of scoped constraint validation on a fragmented model, with respect to standard constraint validation on monolithic models. The third one is a case study where our tooling shows performance gains over existing tools in the industrial automation domain [16].
This paper continues our work on facilitating the construction of scalable modelling environments [15], [17] by presenting four new services: reference scoping, object visibility, indexing, and scoped constraints. Moreover, we show the integration of EMF-Splitter with indexing services [14], and evaluate the efficiency gains and applicability of our approach with three experiments.
The rest of the paper is organized as follows. Section 2 motivates the need for modularity services for DSMLs based on a running example. Section 3 describes our approach, which is based on patterns and code generation. Section 4 introduces our modularization patterns for fragmentation, reference scoping, visibility, indexing, and scoped constraints. Section 5 presents tool support, and Section 6 reports on our evaluation. Section 7 compares with related research, and finally, Section 8 ends with the conclusions and directions for future work.
Section snippets
Motivation and running example
In this section, we introduce a motivating running example from which we elicit a number of requirements for scalable modelling environments.
As an example, we will be using an architectural language inspired by the industrial modelling case on wind turbine control system development presented in [18]. Fig. 1 shows the meta-model of the language. It allows describing two aspects of wind turbine control systems: (i) the constituent types of system components and how they can be connected (classes
A pattern-based approach to modularity in DSMLs
Fig. 2 shows a scheme of our approach to the development of modelling environments with support for modularity services. The approach provides a catalogue of modularity services expressed as meta-model patterns [25], which can be applied to the domain meta-model for which the environment is being developed (label 1). The modelling language designer can apply as many patterns as required to the domain meta-model. Each pattern application produces a customization of the corresponding service for
Catalogue of modularity patterns and services
In this section, we present our catalogue of modularity services and their associated patterns, which are illustrated using the running example.
Architecture and tool support
We have realized our approach as an Eclipse-based solution [35]. Fig. 10 shows its architecture. It relies on the Eclipse Modelling Framework (EMF) [23] to represent the domain meta-models and their instances. It contains a modelling front-end called DSL-tao [25] which permits creating domain meta-models graphically and offers a repository of patterns with services to configure the functionality of the generated modelling environment. DSL-tao patterns describe the pattern structure by means of
Evaluation
This section evaluates two relevant aspects of our approach, applicability and performance, which we reformulate as the following two research questions:
- RQ1:
Is the proposed model fragmentation approach into projects, packages and units applicable in practice?
- RQ2:
Is the evaluation of scoped constraints on fragmented models more efficient than the evaluation of standard constraints on monolithic models?
Next, Sections 6.1 and 6.2 describe the experiments we have performed to answer these questions and
Related work
Modularization (i.e., breaking a large system into smaller parts) is an essential mechanism for tackling the complexity of systems, and is common in many modelling notations [39]. However, support for modularity is often developed ad-hoc for each modelling language [40], which can be laborious to implement manually. Therefore, we contribute a generic pattern-based approach to customize fragmentation and other modularity services for arbitrary DSML meta-models.
The reuse of DSMLs is a major
Conclusions and future work
In this paper, we have discussed the need for modularization services to improve the scalability of DSMLs. For this purpose, we have proposed five modularity services (fragmentation, reference scoping, object visibility, field indexing, and scoped validation) which can be configured by means of patterns. We have presented tool support (EMF-Splitter), evaluated its applicability (by analysing meta-model repositories built by third parties), assessed the efficiency gains on a synthetic running
Conflicts of interest
The authors declare that no conflicts of interest exist.
Acknowledgements
Work partially funded by the R&D programme of the Madrid Region (project FORTE, S2018/TCS-4314), and the Spanish Ministry of Science (project MASSIVE, RTI2018-095255-B-I00). We thank the anonymous referees for their useful comments.
References (64)
- et al.
Scalable model exploration for model-driven engineering
J. Syst. Softw.
(2017) - et al.
Maintaining consistency across engineering artifacts
IEEE Comput.
(2018) - et al.
Eclipse Plugins, 3rd Edition
(2008) - et al.
A survey on UML-based aspect-oriented design modeling
ACM Comput. Surv.
(2011) - et al.
DSL Engineering - Designing, Implementing and Using Domain-Specific Languages
(2013) - et al.
Model-Driven Software Engineering in Practice
(2012) Guest editor’s introduction: model-driven engineering
Computer
(2006)- et al.
Domain-Specific Modeling - Enabling Full Code Generation
(2008) - et al.
A research roadmap towards achieving scalability in model driven engineering
BigMDE@STAF
(2013) - et al.
Programming-in-the-large versus programming-in-the-small
IEEE Trans. Software Eng.
(1976)