Table Of ContentPh.D dissertation
An agile process for the example-driven
development of modelling languages and
environments
Author: Jesús J. López-Fernández
Supervisors: Esther Guerra, Ph.D / Juan de Lara, Ph.D
Universidad Autónoma de Madrid
Madrid, Spain
Doctorado en Ingeniería Informática y Telecomunicaciones
May 2017
Abstract
Domain-Specific Modelling Languages (DSMLs) are heavily used in model-driven and end-
user development approaches. Compared to general-purpose languages, DSMLs present
numerous benefits like powerful domain-specific primitives, an intuitive syntax for domain
experts, and the possibility of advanced code generation for narrow domains. While a graph-
ical syntax is sometimes desired for a DSML, constructing graphical modelling environments
is a costly and highly technical task. This relegates domain experts to a rather passive role
in their development and hinders a wider adoption of graphical DSMLs.
The aim of this dissertation is achieving a simpler DSML construction process where
domain experts can contribute actively. For this purpose, an example-based process for the
automatic generation of modelling environments for graphical DSMLs is proposed. This way,
starting from examples of the DSML likely provided by domain experts using drawing tools,
the proposed system synthesizes a graphical modelling environment that mimics the syntax
of the provided examples. This includes a meta-model for the abstract syntax of the DSML,
and a graphical concrete syntax supporting spatial relationships.
Moreover, despite being essential activities in this field, there are scarce tools and methods
supporting the Validation and Verification (V&V) of DSMLs. In order to fill this gap, three
complementary meta-model V&V languages are presented. These languages provide means
for testing a DSML through three V&V approches: unit testing, specification-based testing
and reverse testing.
ThesetwocontributionsreceivetoolsupportinaprototypeapplicationcomprisingmetaBup,
asystemforbuildingDSMLeditorsfromgraphicalexamples,andmetaBest,itscorresponding
testing suite. The process and the prototype have been validated through several experi-
ments, including a user study.
Keywords: Model-DrivenEngineering,Domain-SpecificModellingLanguages,Meta-Modelling,
Graphical Modelling Environments, Example-Based Meta-Modelling, Validation & Verifica-
tion, Meta-Model Quality
i
ii
Resumen
Los Lenguajes de Modelado de Dominio Específico (Domain-Specific Modelling Languages
(DSMLs)) se utilizan con frecuencia en la Ingeniería del Software Dirigida por Modelos y en
métodos de desarrollo por el usuario final. En comparación con los lenguajes de propósito
general, los DSMLs presentan numerosas ventajas como la posibilidad de emplear primitivas
de dominio específico, una sintaxis intuitiva para expertos en un dominio, y la posibilidad
de generar código fuente complejo para dominios concretos. Algunos DSMLs tienen una
sintaxis gráfica; sin embargo, construir entornos de modelado gráfico es una tarea altamente
costosa a nivel técnico. Esto relega a los expertos del dominio a un rol pasivo en el desarrollo
de dichos entornos, e impide una adopción más extensa de los DSML gráficos.
El propósito de este trabajo de tesis es lograr un proceso sencillo para la construcción
de DSMLs, en el que los expertos del dominio puedan contribuir de forma activa. Para
ello, se propone un proceso basado en ejemplos para la generación automática de entornos
de modelado de DSMLs gráficos. El sistema propuesto sintetiza, a partir de ejemplos del
DSML esbozados por el experto del dominio en herramientas de dibujo, un entorno gráfico
de modelado que emula la sintaxis de dichos ejemplos. Esto abarca un meta-modelo para
la sintaxis abstracta del DSML, y una sintaxis concreta que además soporta la inclusión de
relaciones espaciales.
Adicionalmente, pese a tratarse de actividades esenciales en el campo del Desarrollo Di-
rigido por Modelos, existen muy pocas herramientas o métodos que den soporte a la Vali-
dación y Verificación (V&V) de DSMLs. Para cubrir esta necesidad se presentan tres lengua-
jes complementarios para la V&V de meta-modelos a través de tres métodos distintos: las
pruebas unitarias, la comprobación de propiedades sobre el meta-modelo, y las pruebas in-
versas.
Las dos contribuciones se han implementado en dos prototipos: metaBup, un sistema para
construir editores de DSMLs a partir de ejemplos gráficos, y metaBest, su correspondiente
entorno de pruebas. Tanto el proceso como el prototipo han sido validados mediante diversos
experimentos, entre los que se incluye una validación con usuarios.
iii
iv
Contents
Abstract i
Resumen iii
Contents iv
List of figures viii
List of tables xii
1 Introduction 3
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1 Technical Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.2 Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.3 Tool Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.4 Research Visits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4 Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2 Background and Related Work 11
2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.1 Model-Driven Engineering . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.2 Approaches for creating DSMLs . . . . . . . . . . . . . . . . . . . . . 14
2.1.3 Approaches to meta-model V&V . . . . . . . . . . . . . . . . . . . . 15
2.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2.1 DSVL development . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2.2 DSML testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3 Example-driven Meta-model Development 25
3.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.2 Overview and Running Example . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.2.2 Running example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.3 From Sketches to Text Fragments . . . . . . . . . . . . . . . . . . . . . . . . 32
v
Contents
3.4 From Fragments to a Meta-model . . . . . . . . . . . . . . . . . . . . . . . . 41
3.4.1 The Meta-model Induction Algorithm . . . . . . . . . . . . . . . . . . 42
3.4.2 Annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.4.3 Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.5 Example-driven Development of Graphical Domain-Specific Languages . . . 53
3.5.1 Graphic property processing . . . . . . . . . . . . . . . . . . . . . . . 54
3.5.2 Environment generation . . . . . . . . . . . . . . . . . . . . . . . . . 65
4 Meta-Model Validation and Verification of DSMLs 71
4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.2 mmUnit: Meta-model Unit Testing . . . . . . . . . . . . . . . . . . . . . . . 74
4.3 mmSpec: Specification-based Meta-model Testing . . . . . . . . . . . . . . . 80
4.4 mmXtens: Example-based Validation of Meta-models . . . . . . . . . . . . . 87
5 Tool support 95
5.1 metaBup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.2 metaBest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
5.2.1 mmUnit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
5.2.2 mmSpec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.2.3 mmXtens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
5.3 Support material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
6 Evaluation 107
6.1 Evaluation of DSVL development . . . . . . . . . . . . . . . . . . . . . . . . 107
6.1.1 Evaluation setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
6.1.2 Evaluation results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
6.1.3 Threats to validity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
6.1.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
6.2 Evaluation of V&V techniques . . . . . . . . . . . . . . . . . . . . . . . . . . 121
6.2.1 Evaluating the Usefulness of mmUnit . . . . . . . . . . . . . . . . . . 121
6.2.2 Evaluating the Conciseness of mmSpec . . . . . . . . . . . . . . . . . 125
6.2.3 Evaluating the Performance of mmSpec . . . . . . . . . . . . . . . . . 127
6.2.4 Evaluating the Expressiveness of mmSpec . . . . . . . . . . . . . . . . 128
6.2.5 Evaluating the Usefulness of mmSpec . . . . . . . . . . . . . . . . . . 131
6.2.6 Evaluating the Usefulness of mmXtens . . . . . . . . . . . . . . . . . 137
7 Conclusions and Future Work 141
vi
Contents
7.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
7.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
8 Conclusiones y Trabajo Futuro 147
8.1 Conclusiones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
8.2 Trabajo Futuro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Appendices 153
A OCL equivalence with metaBup constraint annotations 155
B Encoding of mmUnit primitives in Java 159
C OCL encoding of mmSpec primitives 163
D An mmSpec library of meta-model quality properties 169
E Questionnaire for user validation of metaBup 173
Bibliography 176
vii
Contents
viii
Description:for testing a DSML through three V&V approches: unit testing, specification-based testing . 3.5 Example-driven Development of Graphical Domain-Specific Languages . 53 B Encoding of mmUnit primitives in Java .. Javier Luis Cánovas Izquierdo, Jordi Cabot, Jesús J. López-Fernández, Jesús.