Scaling-up domain-specific modelling languages through modularity services

https://doi.org/10.1016/j.infsof.2019.05.010Get rights and content

Abstract

Context

Model-driven engineering (MDE) promotes the active use of models in all phases of software development. Even though models are at a high level of abstraction, large or complex systems still require building monolithic models that prove to be too big for their processing by existing tools, and too difficult to comprehend by users. While modularization techniques are well-known in programming languages, they are not the norm in MDE.

Objective

Our goal is to ease the modularization of models to allow their efficient processing by tools and facilitate their management by users.

Method

We propose five patterns that can be used to extend a modelling language with services related to modularization and scalability. Specifically, the patterns allow defining model fragmentation strategies, scoping and visibility rules, model indexing services, and scoped constraints. Once the patterns have been applied to the meta-model of a modelling language, we synthesize a customized modelling environment enriched with the defined services, which become applicable to both existing monolithic legacy models and new models.

Results

Our proposal is supported by a tool called EMF-Splitter, combined with the Hawk model indexer. Our experiments show that this tool improves the validation performance of large models. Moreover, the analysis of 224 meta-models from OMG standards, and a public repository with more than 300 meta-models, demonstrates the applicability of our patterns in practice.

Conclusions

Modularity mechanisms typically employed in programming IDEs can be successfully transferred to MDE, leading to more scalable and structured domain-specific modelling languages and environments.

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)

  • R.W. Quong et al.

    Linking programs incrementally

    ACM Trans. Program. Lang. Syst.

    (1991)
  • S.P. Reiss

    An approach to incremental compilation

    SIGPLAN Symposium on Compiler Construction

    (1984)
  • ArgoUML, last accessed in 2018,...
  • Enterprise Architect, last accessed in 2018,...
  • IBM Rational, last accessed in 2018,...
  • MagicDraw, last accessed in 2018,...
  • Modelio, last accessed in 2018,...
  • Papyrus, last accessed in 2018,...
  • A. García-Domínguez et al.

    Stress-testing remote model querying APIs for relational and graph-based stores

    Softw. Syst. Model.

    (2019)
  • A. Garmendia et al.

    EMF Splitter: a structured approach to EMF modularity

    XM@MoDELS

    (2014)
  • T. Mayerhofer et al.

    A model-driven engineering workbench for CAEX supporting language customization and evolution

    IEEE Trans. Industr. Inf.

    (2018)
  • A. Gómez et al.

    On the opportunities of scalable modeling technologies: an experience report on wind turbines control applications development

    ECMFA

    (2017)
  • GMF, last accessed in 2018,...
  • Sirius, last accessed in 2018,...
  • Xtext, last accessed in 2018,...
  • E. Dijkstra, On the role of scientific thought, 1974,...
  • D. Steinberg et al.

    EMF: Eclipse Modeling Framework, 2nd Edition

    (2008)
  • OCL, 2014,...
  • A. Pescador et al.

    Pattern-based development of domain-specific modelling languages

    MODELS

    (2015)
  • T. Kühn et al.

    A combined formal model for relational context-dependent roles

    SLE

    (2015)
  • C. Atkinson et al.

    Rearchitecting the UML infrastructure

    ACM Trans. Model. Comput. Simul.

    (2002)
  • J. de Lara et al.

    When and how to use multilevel modelling

    ACM Trans. Softw. Eng. Methodol.

    (2014)
  • Cited by (0)

    View full text