Example-Based Generation of Graphical Modelling Environments

Domain-Specific 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

  • PDF / 4,094,031 Bytes
  • 17 Pages / 439.37 x 666.142 pts Page_size
  • 13 Downloads / 222 Views

DOWNLOAD

REPORT


stract. Domain-Specific 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 play a passive role in their development and hinders a wider adoption of graphical DSLs. Targeting a simpler DSL construction process, we propose an examplebased 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 is able to synthesize 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 or attachment. The system is implemented as an Eclipse plugin, and we demonstrate its usage on a running example in the home networking domain. Keywords: Domain-specific modelling languages · Graphical modelling environments · Example-based meta-modelling · Flexible modelling

1

Introduction

Model-Driven Engineering (MDE) is founded on the use of models to describe the systems to be built. Often, these models are defined using Domain-Specific Languages (DSLs) tailored to a particular field [7]. Hence, the need to create DSLs and their associated modelling environments is recurring in MDE projects. The concrete syntax of a DSL may be graphical or textual, though in this paper we focus on graphical DSLs [10]. Many tools have emerged along the years to build environments for graphical DSLs [3,5,6,10,11,17]. However, building such environments still remains a technical, complex and time-consuming task. For example, building a graphical editor with Graphiti [5] requires manual programming based on a large Java API. In the case of GMF [6] and Sirius [17], it is necessary to describe the different aspects of the editor by building one or more models. These models may become very detailed, large and hard to build c Springer International Publishing Switzerland 2016  and H. L¨ onn (Eds.): ECMFA 2016, LNCS 9764, pp. 101–117, 2016. A. Wasowski  DOI: 10.1007/978-3-319-42061-5 7

102

J.J. L´ opez-Fern´ andez et al.

and maintain for non-experts – especially for DSLs beyond toy examples – and frequently they must be constructed using unhandy tree-based editors. Apart from the technical difficulties, a salient issue with most graphical language workbenches is the need to construct a meta-model upfront, and to describe the features of the concrete syntax and the modelling environment using a technical language or notation. This hinders the active participation of domain experts in the DSL construction process, who might find more familiar working with examples than with meta-models [1,12] and might lack the technical knowledge to define complex envir