An example is worth a thousand words: Creating graphical modelling environments by example

Abstract

Domain-specific languages (DSLs) are heavily used in model-driven and end-user development approaches. Compared to general-purpose languages, DSLs 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 graphical syntax is sometimes desired for a DSL, 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 DSLs. Our aim is achieving a simpler DSL construction process where domain experts can contribute actively. For this purpose, we propose an example-based technique for the automatic generation of modelling environments for graphical DSLs. This way, starting from examples of the DSL likely provided by domain experts using drawing tools like yED, our 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 DSL and a graphical concrete syntax supporting spatial relationships like containment and adjacency. Our system, called metaBUP, is implemented as an Eclipse plug-in. In this paper, we demonstrate its usage on a running example in the home networking domain and evaluate its suitability for the construction of graphical modelling environments by means of a user study.

This is a preview of subscription content, log in to check access.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22
Fig. 23
Fig. 24
Fig. 25
Fig. 26
Fig. 27
Fig. 28
Fig. 29
Fig. 30
Fig. 31
Fig. 32

Notes

  1. 1.

    https://eclipse.org/sirius/gallery.html.

  2. 2.

    https://www.yworks.com/products/yed.

  3. 3.

    We call these examples sketches to distinguish them from models conformant to a meta-model, though they are not hand-drawn but made with diagramming tools.

  4. 4.

    By internal adjacency we mean an object that is simultaneously contained by and adjacent to one of the inner borders of another object.

  5. 5.

    Although this xor constraint would be implicit in UML, we show it explicitly for clarity.

References

  1. 1.

    Amatriain, X., Arumí, P.: Frameworks generate domain-specific languages: a case study in the multimedia domain. IEEE Trans. Softw. Eng. 37(4), 544–558 (2011)

    Article  Google Scholar 

  2. 2.

    Avazpour, I., Grundy, J., Grunske, L.: Specifying model transformations by direct manipulation using concrete visual notations and interactive recommendations. J. Vis. Lang. Comput. 28, 195–211 (2015)

    Article  Google Scholar 

  3. 3.

    Bak, K.,  Zayan, D., Czarnecki, K., Antkiewicz, M., Diskin, Z., Wasowski, A., Rayside, D.: Example-driven modeling: model = abstractions + examples. In: IEEE/ACM ICSE, pp. 1273–1276 (2013)

  4. 4.

    Baki, I., Sahraoui, H.A.: Multi-step learning and adaptive search for learning complex model transformations from examples. ACM Trans. Softw. Eng. Methodol. 25(3), 20 (2016)

    Article  Google Scholar 

  5. 5.

    Balogh, Z., Varró, D.: Model transformation by example using inductive logic programming. Softw. Syst. Model. 8(3), 347–364 (2009)

    Article  Google Scholar 

  6. 6.

    Beck, K.: Test Driven Development: by Example. Addison-Wesley Professional, Boston (2003)

  7. 7.

    Bottoni, P., Fish, A.: Coloured Euler diagrams: a tool for visualizing dynamic systems and structured information. In: Proceedings Diagrams, volume 6170 of Lecture Notes in Computer Science, pp. 39–53. Springer (2010)

  8. 8.

    Bottoni, P., Grau, A.: A suite of metamodels as a basis for a classification of visual languages. In: IEEE Computer Society VL/HCC, pp. 83–90 (2004)

  9. 9.

    Cho ,H., Gray, J.G., Syriani, E.: Creating visual domain-specific modeling languages from end-user demonstration. In: MiSE@ICSE, pp. 22–28 (2012)

  10. 10.

    de Lara, J., Vangheluwe, H.: AToM\(^{{3}}\): a tool for multi-formalism and meta-modelling. In: FASE, volume 2306 of LNCS, pp. 174–188. Springer (2002)

  11. 11.

    Feder, J.: Plex languages. Inf. Sci. 3(3), 225–241 (1971)

    MathSciNet  Article  MATH  Google Scholar 

  12. 12.

    Garmendia, A., Pescador, A., Guerra, E., de Lara, J.: Towards the generation of graphical modelling environments aided by patterns. In: SLATE, volume 563 of CCIS, pp. 160–168. Springer (2015)

  13. 13.

    Ghannem, A., El-Boussaidi, G., Kessentini, M.: Model refactoring using examples: a search-based approach. J. Softw. Evol. Process 26(7), 692–713 (2014)

    Article  Google Scholar 

  14. 14.

    Golra, F.R., Beugnard, A., Dagnat, F., Guerin, S., Guychard, C.: Using free modeling as an agile method for developing domain specific modeling languages. In: MoDELS, pp. 24–34. ACM (2016)

  15. 15.

    Graphiti. https://eclipse.org/graphiti/

  16. 16.

    Gronback, R.C.: Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit. Addison-Wesley Professional, Boston (2009)

    Google Scholar 

  17. 17.

    Grundy, J.C., Hosking, J.G., Li, K.N., Ali, N.M., Huh, J., Li, R.L.: Generating domain-specific visual language tools from abstract visual specifications. IEEE Trans. Softw. Eng. 39(4), 487–515 (2013)

    Article  Google Scholar 

  18. 18.

    Hili, N.: A metamodeling framework for promoting flexibility and creativity over strict model conformance. In: FlexMDE @ MoDELS, volume 1694 of CEUR Workshop Proceedings, pp. 2–11. CEUR-WS.org (2016)

  19. 19.

    Hutchinson, J., Whittle, J., Rouncefield, M.: Model-driven engineering practices in industry: social, organizational and managerial factors that lead to success or failure. Sci. Comput. Program. 89, 144–161 (2014)

    Article  Google Scholar 

  20. 20.

    Jiménez-Pastor, A., Garmendia, A., de Lara, J.: Scalable model exploration for model-driven engineering. J. Syst. Softw. 132, 204–225 (2017)

    Article  Google Scholar 

  21. 21.

    Jouault, F., Allilaire, F., Bézivin, J., Kurtev, I.: ATL: A model transformation tool. Sci. Comp. Programm. 72(1), 31–39 (2008)

    MathSciNet  Article  MATH  Google Scholar 

  22. 22.

    Kahraman, G., Bilgen, S.: A framework for qualitative assessment of domain-specific languages. Softw. Syst. Model. 14(4), 1505–1526 (2015)

    Article  Google Scholar 

  23. 23.

    Kang, K.C., Cohen, S.G., Hess, J.A., Novak, W.E., Peterson, A.S.: Feature-oriented domain analysis (foda) feasibility study. In: Technical Report, Carnegie-Mellon University Software Engineering Institute (1990)

  24. 24.

    Kappel, G., Langer, P., Retschitzegger, W., Schwinger, W., Wimmer, M.: Model transformation by-example: a survey of the first wave. In: Conceptual Modelling and Its Theo. Foundations, volume 7260 of LNCS, pp. 197–215. Springer (2012)

  25. 25.

    Kelly, S., Pohjonen, R.: Worst practices for domain-specific modeling. IEEE Softw. 26(4), 22–29 (2009)

    Article  Google Scholar 

  26. 26.

    Kelly, S., Tolvanen, J.: Domain-Specific Modeling—Enabling Full Code Generation. Wiley, Hoboken (2008)

    Google Scholar 

  27. 27.

    Kessentini, M., Sahraoui, H.A., Boukadoum, M., Benomar, O.: Search-based model transformation by example. Softw. Syst. Model. 11(2), 209–226 (2012)

    Article  Google Scholar 

  28. 28.

    Ko, A.J., Abraham, R., Beckwith, L., Blackwell, A.F., Burnett, M.M., Erwig, M., Scaffidi, C., Lawrance, J., Lieberman, H., Myers, B.A., Rosson, M.B., Rothermel, G., Shaw, M., Wiedenbeck, S.: The state of the art in end-user software engineering. ACM Comput. Surv. 43(3), 21 (2011)

    Article  Google Scholar 

  29. 29.

    Ko, A.J., LaToza, T.D., Burnett, M.M.: A practical guide to controlled experiments of software engineering tools with human participants. Empir. Softw. Eng. 20(1), 110–141 (2015)

    Article  Google Scholar 

  30. 30.

    Kolovos, D.S., García-Domínguez, A., Rose, L.M., Paige, R.F.: Eugenia: towards disciplined and automated development of gmf-based graphical model editors. Softw. Syst. Model. 16(1), 229–255 (2017)

    Article  Google Scholar 

  31. 31.

    Kolovos, D.S., Matragkas, N.D., Rodriguez, H.H., Paige, R.F.: Programmatic muddle management. In: XM@MoDELS, volume 1089 of CEUR Workshop Proceedings, pp. 2–10. CEUR-WS.org (2013)

  32. 32.

    Kolovos, D.S., Rose, L.M., bin Abid, S., Paige, R.F., Polack, F.A.C., Botterweck, G.: Taming EMF and GMF using model transformation. In: MoDELS Part I, volume 6394 of LNCS, pp. 211–225. Springer (2010)

  33. 33.

    Kosar, T., Bohra, S., Mernik, M.: Domain-specific languages: a systematic mapping study. Inf. Softw. Technol. 71, 77–91 (2016)

    Article  Google Scholar 

  34. 34.

    López-Fernández, J.J., Cuadrado, J.S., Guerra, E., de Lara, J.: Example-driven meta-model development. Softw. Syst. Model. 14(4), 1323–1347 (2015)

    Article  Google Scholar 

  35. 35.

    López-Fernández, J.J., Garmendia, A., Guerra, E., de Lara, J.: Example-based generation of graphical modelling environments. In: ECMFA, volume 9764 of LNCS, pp. 101–117. Springer (2016)

  36. 36.

    López-Fernández, J.J., Guerra, E., de Lara, J.: Example-based validation of domain-specific visual languages. In: SLE, pp. 101–112. ACM (2015)

  37. 37.

    López-Fernández, J.J., Guerra, E., de Lara, J.: Combining unit and specification-based testing for meta-model validation and verification. Inf. Syst. 62, 104–135 (2016)

    Article  Google Scholar 

  38. 38.

    Mangano ,N., Baker, A., Dempsey, M., Navarro, E.O., van der Hoek, A.: Software design sketching with calico. In: ASE, pp. 23–32. ACM (2010)

  39. 39.

    Mernik, M., Heering, J., Sloane, A.M.: When and how to develop domain-specific languages. ACM Comput. Surv. 37(4), 316–344 (2005)

    Article  Google Scholar 

  40. 40.

    Microsoft. https://msdn.microsoft.com/en-us/library/aa937723(v=vs.113).aspx (2017)

  41. 41.

    Moody, D.L.: The “physics” of notations: toward a scientific basis for constructing visual notations in software engineering. IEEE Trans. Softw. Eng. 35(6), 756–779 (2009)

    Article  Google Scholar 

  42. 42.

    Pescador, A., de Lara, J.: Dsl-maps: from requirements to design of domain-specific languages. In: ASE, pp. 438–443. ACM (2016)

  43. 43.

    Rensink, A., Dotor, A., Ermel, C., Jurack, S., Kniemeyer, O., de Lara, J., Maier, S., Staijen, T., Zündorf, A.: Ludo: a case study for graph transformation tools. In: Proc. AGTIVE, volume 5088 of Lecture Notes in Computer Science, pp. 49–513. Springer (2007)

  44. 44.

    Rosa, M.D., Fish, A., Fuccella, V., Saleh, R., Swartwood, S., Costagliola, G.: A toolkit for knot diagram sketching, encoding and re-generation. In: Proceedings DMS, pp. 16–25. KSI Research Inc./Knowledge Systems Institute Graduate School (2016)

  45. 45.

    Rose, L.M., Kolovos, D.S., Paige, R.F.: Eugenia live: a flexible graphical modelling tool. In: XM @ MoDELS, pp. 15–20. ACM (2012)

  46. 46.

    Sangiorgi, U.B., Barbosa, S.D.: SKETCH: modeling using freehand drawing in eclipse graphical editors. In: FlexiTools @ ICSE (2010)

  47. 47.

    Semeráth, O., Barta, A., Horváth, A., Szatmári, Z., Varró, D.: Formal validation of domain-specific languages with derived features and well-formedness constraints. In press, Software and System Modeling (2016)

  48. 48.

    Sirius. https://eclipse.org/sirius/

  49. 49.

    Sobernig, S., Hoisl, B., Strembeck, M.: Extracting reusable design decisions for uml-based domain-specific languages: a multi-method study. J. Syst. Softw. 113, 140–172 (2016)

    Article  Google Scholar 

  50. 50.

    Sottet, J., Biri, N.: JSMF: a javascript flexible modelling framework. In: FlexMDE @ MoDELS, volume 1694 of CEUR Workshop Proceedings, pp. 42–51. CEUR-WS.org (2016)

  51. 51.

    Stapleton, G., Howse, J., Taylor, J., Thompson, S.J.: The expressiveness of spider diagrams. J. Log. Comput. 14(6), 857–880 (2004)

    MathSciNet  Article  MATH  Google Scholar 

  52. 52.

    Stapleton, G., Jamnik, M., Shimojima, A.: What makes an effective representation of information: a formal account of observational advantages. J. Logic Lang. Inf. 26(2), 143–177 (2017)

    MathSciNet  Article  MATH  Google Scholar 

  53. 53.

    Stapleton, G., Thompson, S.J., Fish, A., Howse, J., Taylor, J.: A new language for the visualization of logic and reasoning. In: Proceedings DMS, pp. 287–292. Knowledge Systems Institute (2005)

  54. 54.

    Steinberg, D., Budinsky, F., Paternostro, M., Merks, E.: EMF: Eclipse Modeling Framework, 2nd edn. Addison-Wesley Professional, Boston (2008)

    Google Scholar 

  55. 55.

    Sun, Y., Gray, J., White, J.: A demonstration-based model transformation approach to automate model scalability. Softw. Syst. Model. 14(3), 1245–1271 (2015)

    Article  Google Scholar 

  56. 56.

    Wuest, D., Seyff, N., Glinz, M.: Flexisketch team: collaborative sketching and notation creation on the fly. ICSE 2, 685–688 (2015)

    Google Scholar 

  57. 57.

    Yoder, C., Schrag, M.: Nassi-Shneiderman charts: an alternative to flowcharts for design. In: ACM SIGSOFT/BIGMETRICS Software and Assurance, Workshop, , pp. 386–393 (1978)

  58. 58.

    Zolotas, A., Clariso, R., Matragkas, N., Kolovos, D.S., Paige, R.F.: Constraint programming for type inference in flexible model-driven engineering. In: Computer Languages, Systems & Structures, to Appear (2017)

  59. 59.

    Zolotas, A., Kolovos, D.S., Matragkas, N.D. , Paige, R.F.: Assigning semantics to graphical concrete syntaxes. In: XM @ MoDELS, volume 1239 of CEUR Workshop Proceedings, pp. 12–21. CEUR-WS.org (2014)

Download references

Acknowledgements

Work funded by the Spanish Ministry of Economy and Competitivity (TIN2014-52129-R), and the R&D programme of the Madrid Region (S2013/ICE-3006).

Author information

Affiliations

Authors

Corresponding author

Correspondence to Esther Guerra.

Additional information

Communicated by Prof. Andrzej Wasowski and Pieter van Gorp.

Appendices

Appendix 1

This appendix contains the following documents provided to the participants in our evaluation: formulation of the expected DSL requirements, instructions of the experiment, and questionnaires. Questionnaire 1 was answered by all the participants, in order to convey their opinions on the first version of the generated modelling tool. Questionnaire 2 was only answered by the participants that opted for generating a second version of the modelling tool. Mandatory questions are marked with an asterisk.

Formulation of DSL requirements:

figureg

Instructions:

figureh

Questionnaire 1:

figurei

Questionnaire 2:

figurej

Appendix 2

Table 5 shows the changes made by the modelling expert on the fragments provided by the participants in our evaluation (cf. Sect. 7). The columns contain the participant identifiers, the number of fragments, the editing actions, and the time employed to commit them in seconds.

Table 5 Manual changes made by the modelling expert to the fragments provided in the evaluation, and time taken

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

López-Fernández, J.J., Garmendia, A., Guerra, E. et al. An example is worth a thousand words: Creating graphical modelling environments by example. Softw Syst Model 18, 961–993 (2019). https://doi.org/10.1007/s10270-017-0632-7

Download citation

Keywords

  • Domain-specific modelling languages
  • Graphical modelling environments
  • Example-based meta-modelling
  • Flexible modelling