<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Engineering a ROVER Language in GEMOC STUDIO &amp; MONTICORE: A Comparison of Language Reuse Support</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Thomas</forename><surname>Degueule</surname></persName>
							<email>degueule@cwi.nl</email>
							<affiliation key="aff0">
								<orgName type="department">Centrum Wiskunde &amp; Informatica (CWI)</orgName>
								<address>
									<settlement>Amsterdam</settlement>
									<country key="NL">Netherlands</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Tanja</forename><surname>Mayerhofer</surname></persName>
							<email>mayerhofer@big.tuwien.ac.at</email>
							<affiliation key="aff1">
								<orgName type="institution">TU Wien</orgName>
								<address>
									<settlement>Vienna</settlement>
									<country key="AT">Austria</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Andreas</forename><surname>Wortmann</surname></persName>
							<email>wortmann@se-rwth.de</email>
							<affiliation key="aff2">
								<orgName type="institution">RWTH Aachen University</orgName>
								<address>
									<settlement>Aachen</settlement>
									<country key="DE">Germany</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Engineering a ROVER Language in GEMOC STUDIO &amp; MONTICORE: A Comparison of Language Reuse Support</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">0EE2EF038CFF1B953BC24411009D74B9</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T01:16+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>Software Language Engineering</term>
					<term>Language Reuse</term>
					<term>Language Workbenches</term>
					<term>Rover</term>
					<term>GEMOC Studio</term>
					<term>Monti-Core</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Domain-specific languages (DSLs) improve engineering productivity through powerful abstractions and automation. To support the development of DSLs, the software language engineering (SLE) community has produced various solutions for the systematic engineering of DSLs that manifest in language workbenches. In this paper, we investigate the applicability of the language workbenches GEMOC STUDIO and MONTICORE to the MDETools'17 ROVER challenge. To this effect, we refine the challenge's requirements and show how GEMOC STUDIO and MONTICORE can be leveraged to engineer a Rover-specific DSL by reusing existing DSLs and tooling of GEMOC STUDIO and MONTICORE. Through this, we reflect on the SLE state of the art, detail capabilities of the two workbenches focusing particularly on language reuse support, and sketch how modelers can approach ROVER programming with modern modeling tools.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>Domain-specific languages (DSL) improve software engineering productivity and system quality through powerful domain abstractions and increased automation. To support DSL development, the software language engineering (SLE) <ref type="bibr" target="#b0">[1]</ref> community has proposed various solutions for the systematic development, use, deployment, and maintenance of DSLs and related tools. These solutions manifest in language workbenches <ref type="bibr" target="#b1">[2]</ref> that assist language engineers in all DSL engineering phases.</p><p>In this paper, we present the language workbenches GEMOC STUDIO <ref type="bibr" target="#b2">[3]</ref> and MONTICORE <ref type="bibr" target="#b3">[4]</ref> to demonstrate and compare their language engineering support on the MDETools'17 ROVER challenge <ref type="bibr" target="#b4">[5]</ref>. GEMOC STUDIO is based on the Eclipse Modeling Framework (EMF) <ref type="bibr" target="#b5">[6]</ref> and provides support for implementing executable DSLs and supporting tooling. This includes meta-programming approaches for defining DSL interpreters and generic components for efficiently developing DSL tools including model animators and debuggers. MONTICORE offers support for implementing textual DSLs with context-free grammars and provides a powerful infrastructure for developing analyzers, transformations, and code generators.</p><p>We present implementations of the RASPIROVER DSL, a DSL for defining the architecture and behavior of Raspberry Pi operated rovers, with both language workbenches. In these implementations, we aimed at reusing as many DSLs as possible to ease and speed up the DSL engineering process for the RASPIROVER DSL. We show (i) how to develop DSLs for software-controlled rovers with both language workbenches by reusing existing DSLs, (ii) the tool support that both workbenches offer to engineers for using the developed DSLs, and (iii) the individual strengths of GEMOC STUDIO and MONTICORE with regard to their support for engineering DSLs and supporting tools. We put a particular emphasis on language reuse <ref type="bibr" target="#b6">[7]</ref> techniques offered by both language workbenches to facilitate DSL engineering.</p><p>In the following, Section II details the ROVER challenge studied in this paper. Section III and Section IV describe the solutions developed with GEMOC STUDIO and MONTICORE, respectively. Section V compares the language engineering support provided by the two studied language workbenches focusing particularly on language reuse. Finally, Section VI concludes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. ROVER LANGUAGE ENGINEERING CHALLENGE</head><p>Both GEMOC STUDIO and MONTICORE have been used in the past for implementing DSLs facilitating the development of software-controlled rovers. The ARDUINOML language <ref type="bibr" target="#b7">[8]</ref> has been implemented using GEMOC STUDIO for modeling the architecture and behavior of Arduino-based systems, such as Arduino-operated rovers. The MONTIARCAUTOMATON (MAA) <ref type="bibr" target="#b8">[9]</ref> architecture description language has been implemented using MONTICORE for modeling the architecture and behavior of robotics applications, such as the architecture and behavior of LEGO NXT operated rovers as well as powerful service robots <ref type="bibr" target="#b8">[9]</ref>. While MAA is designed to be a platformindependent DSL for developing robotics applications running on any kind of platform, ARDUINOML is specific to the Arduino platform.</p><p>In this paper, we present a case study on reusing these and other existing DSLs to develop a new RASPIROVER DSL customized for the development of Raspberry Pi operated rovers, such as the Eclipse PolarSys Rover <ref type="bibr" target="#b9">[10]</ref>. Our goal is to showcase the language reuse support offered by MONTICORE Before we present the implementations of RASPIROVER DSL with GEMOC STUDIO and MONTICORE, we first describe the requirements imposed on the development of RASPIROVER DSL regarding desired language features, reuse of existing DSLs, and DSL tooling.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Language Requirements</head><p>To set the language requirements for RASPIROVER DSL, we investigated several DSLs that have been used in the past to model rover systems. In particular, we investigated ARDUINOML and MAA mentioned before, as well as the UML-RT implementation of PAPYRUS-RT <ref type="bibr" target="#b10">[11]</ref>. What the investigated modeling languages have in common is that they provide concepts for modeling both the hardware architecture of a rover and the behavior of the rover's control software. There are however considerable differences, in particular in how behavioral aspects are described. For instance, ARDUINOML provides an action language for defining the behavior, while PAPYRUS-RT relies on UML state machines with embedded C++ code. Based on our investigations, we decide to include in RASPIROVER DSL a hardware architecture description language and an action language as detailed in the following.</p><p>Rover Hardware Architecture Description Language: RASPIROVER DSL should enable the definition of the hardware setup of a Raspberry Pi operated rover. This includes defining hardware parts of the rover, such as the different actuators and sensors, as well as their connection to the rover's control unit through describing the mapping of the rover's board's pins to hardware modules. The primary rationale for including the hardware mapping into the DSL is to make this mapping explicit in a rover model, such that it can be leveraged in code generation and for interacting with the rover when executing a rover model.</p><p>Rover Control Language (RCL): For defining the behavior of rovers, RASPIROVER DSL should provide an imperative rover control language. We choose an action language because even if other behavioral languages (such as UML state machines) are used, an action language is still required to define finegrained behaviors. Furthermore, the action language should abstract from a concrete programming language used to implement rover control software by providing high-level actions commonly supported by rovers. Therefore, RCL should comprise <ref type="bibr" target="#b0">(1)</ref>  and conditional statements as well as variables, primitive values, and variable assignments; (2) rover-specific queries and actions, in particular, dedicated queries for retrieving the temperature and humidity of a rover's environment, for obstacles in front of and behind the rover, and for messages posted to a central message board (e.g., messages remotely sent to a rover), as well as actions for moving forward and backward, turning, stopping, logging, and sending messages; (3) units for defining distances to travel forward or backward, as well as the rotation angle for turning.</p><p>Fig. <ref type="figure" target="#fig_0">1</ref> shows an exemplary rover hardware description model that should be definable with RASPIROVER DSL. It features a control unit, two motors allowing the rover to drive forward, backward, and turn, an obstacle sensor on the front of the rover, as well as a message subscriber component allowing the rover to receive input commands. Fig. <ref type="figure">2</ref> shows an example of a rover control program written with RASPIROVER DSL defining that the rover should travel between two obstacles. In particular, it specifies that the rover should travel forward for 3 cm as long as no obstacle is detected in front of the rover (ll. <ref type="bibr" target="#b3">[4]</ref><ref type="bibr" target="#b4">[5]</ref><ref type="bibr" target="#b5">[6]</ref>. When an obstacle is detected, the rover should turn in the opposite direction (l. 7). This is repeated until a "stop" command is received via the message board (l. 3).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Reuse Requirements</head><p>Since we focus in this study on a comparison of language reuse support offered by the investigated language workbenches, we require that existing DSLs previously engineered with GEMOC STUDIO and MONTICORE should be reused wherever possible.</p><p>For implementing RASPIROVER DSL as specified above, we identify several DSLs that can be reused in GEMOC STUDIO and MONTICORE as shown in Table <ref type="table" target="#tab_1">I</ref>. In particular, we aim to reuse ARDUINOML for the GEMOC STUDIO solution, as well as MAA and Java/P for the MONTICORE solution.</p><p>The GEMOC STUDIO solution relies on a revised version of the unit domain model proposed in <ref type="bibr" target="#b11">[12]</ref>, while the units are implemented by hand in the MONTICORE solution. We manually implement the rover-specific queries and actions from scratch in both cases.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Tool Requirements</head><p>Regarding tooling support, we want to reuse any existing tool of the reused languages for the resulting RASPIROVER General Action Language ARDUINOML Java/P <ref type="bibr" target="#b12">[13]</ref> Units Reused Newly from <ref type="bibr" target="#b11">[12]</ref> implemented Rover Actions Newly implemented DSL language. This comprises, for instance, editors, model animators, model debuggers and code generators available for ARDUINOML and MAA. Other than that, we impose no further requirements, as the set of tools that can be developed with GEMOC STUDIO and MONTICORE is quite diverse. For instance, GEMOC STUDIO mostly supports graphical languages, while MONTICORE focuses on textual languages.</p><p>As another example, GEMOC STUDIO specializes in language interpreters while MONTICORE specializes in code generators.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. THE RASPIROVER DSL IN GEMOC STUDIO</head><p>The GEMOC STUDIO <ref type="bibr" target="#b2">[3]</ref> is a language workbench for designing and using executable DSLs. It is built atop various modeling technologies of the Eclipse ecosystem (e.g., EMF, Xtext, Sirius) and contributes new components, such as a model animator and a model debugger <ref type="bibr" target="#b13">[14]</ref>, along with customizable execution engines <ref type="bibr" target="#b14">[15]</ref>. Following the GEMOC approach, the abstract syntax of a DSL is specified in Ecore <ref type="bibr" target="#b5">[6]</ref>, its concrete syntax in either Xtext or Sirius, and its execution semantics using various meta-languages (e.g., K3 <ref type="bibr" target="#b15">[16]</ref>, ALE <ref type="bibr" target="#b16">[17]</ref>, or xMOF <ref type="bibr" target="#b17">[18]</ref>). By specifying these artifacts, users of GEMOC STUDIO then enjoy various facilities, e.g., language-specific debuggers and animators <ref type="bibr" target="#b14">[15]</ref>.</p><p>As one of the showcases of the GEMOC STUDIO, the authors designed ARDUINOML, a DSL with simulation and animation capabilities for designing programs that can be deployed on a given configuration of an Arduino board. The metamodel describing the abstract syntax of ARDUINOML consists of two main parts: a description of the hardware deployed on a given Arduino board (the set of modules and their associated pins), and a description of the scenario putting these modules into play with a simple action language providing basic control structures, variables, and expressions. The ARDUINOML language also comes with an associated interpreter.</p><p>Rather than starting the development of a new DSL for the PolarSys rover from scratch, one could reuse some parts of ARDUINOML and customize them to the specificities of the PolarSys rover, thereby obtaining a customized RASPIROVER DSL. To achieve this, GEMOC STUDIO includes MELANGE, a meta-language that allows language designers to reuse and compose various DSLs in the creation of new ones <ref type="bibr" target="#b18">[19]</ref>. Using MELANGE, it is possible to prune the Arduino-specific parts of the ARDUINOML language, merge new concepts specific to the PolarSys rover (i.e., rover actions and units as described in Section II-A), and customize the existing execution semantics (i.e., override certain methods of the interpreter) to make the different parts fit together. Fig. <ref type="figure" target="#fig_1">3</ref> depicts the definitions of the various languages reused for implementing RASPIROVER DSL in MELANGE, along with the definition of the RASPIROVER DSL itself. The language implementations are available online. <ref type="foot" target="#foot_0">1</ref>First, the rover control language RCL is defined (ll. 3-6). It consists of its abstract syntax, defined in Ecore (l. 4), along with its execution semantics defined in K3 (l. 5). The Units and ArduinoML languages are defined in a similar way (ll. 7-10 and 11-14). Finally, the RasPiRover language composes the reused language components in a meaningful way. First, it slices <ref type="bibr" target="#b18">[19]</ref> the ArduinoML language (l. 17) to extract the hardware-definition part and remove the Arduino-specific parts that should not be reused in the new language. Then, it merges the two other languages RCL and Units into the RasPiRover DSL (ll. 20-21). Finally, additional K3 aspects are woven to glue together the different components both syntactically and semantically (l. 22). As an example, Fig. <ref type="figure" target="#fig_2">4</ref> depicts the ProjectToProgramGlue and OverridenProjectInterpreter aspects that, respectively, insert a new containment reference from ArduinoML's Project (l. 1) to RCL's RoverProgram (l. 3), and override the execution semantics of Project to instead delegate to the interpreter of RCL (ll. 7-9). The renaming clauses (Fig. <ref type="figure" target="#fig_1">3</ref>, ll. 18-21) simply ensure that all concepts of the three languages end up in the same logical package.</p><p>Overall, the MELANGE meta-language allows us to compose the three languages and reuse (parts of) their syntax and semantics (interpreter). As a result, the model execution capabilities of GEMOC STUDIO can be employed for executing RASPIROVER DSL models. The main limitation of the reuse support offered by MELANGE is that the composition operators do not cope with concrete syntax, i.e., the concrete syntax of the resulting language must be defined by hand to benefit from the animation and debugging facilities of GEMOC STUDIO. For more information on the reuse support offered by MELANGE, we refer the interested reader to <ref type="bibr" target="#b18">[19]</ref>, <ref type="bibr" target="#b19">[20]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. THE RASPIROVER DSL IN MONTICORE</head><p>MONTICORE <ref type="bibr" target="#b3">[4]</ref> is a workbench for the development of modular, textual languages based on extended context-free grammars, Java context conditions and translational realizations of semantics using template-based code generation. It enables reusing (parts of) languages via inheritance, embedding, and aggregation <ref type="bibr" target="#b20">[21]</ref>. Inheritance enables reusing productions from the inherited grammar for which MONTICORE generates parsers, abstract syntax classes, context condition checking infrastructures, and code generation infrastructures. This supports specializing or extending languages while reusing existing tooling from the inherited language. With embedding, extension points in the host grammar are filled with productions from embedded grammars. This enables, for instance, reusing languages for well-defined concerns, such as expression languages. Aggregation loosely combines languages for joint analysis. To this effect, elements used in models of one language that reference elements of models of another language (such as references to data types in an architecture language) are interpreted specific to the integration. This integration is external to both languages and, hence, does not require participating languages to be aware of the integration.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Reusable MONTICORE Languages</head><p>Many of the languages required for realizing RASPIROVER DSL are already available in MONTICORE: MAA <ref type="bibr" target="#b8">[9]</ref> enables describing software components and can thus be reused for the hardware architecture description language of RASPIROVER DSL through language inheritance. For realizing the rover control language RCL of RASPIROVER DSL, JAVA/P, the action language of UML/P <ref type="bibr" target="#b21">[22]</ref> can be refined and extended as required. For this, we can first restrict JAVA/P to feature only variable assignments, statements, conditionals, and whileloops. This is achieved by inheritance, i.e., RCL inherits from JAVA/P, and an adds additional context condition that prevents instances of unsupported JAVA/P abstract syntax classes from being used in RASPIROVER DSL models. Then we add new primitives dedicated to movement, sensing, and communication to RCL. Furthermore, the UNITS language RCLEmbedding implements Element = "behavior" Name "{" Statement+"}"; } from RCL from MontiArcAutomaton Fig. <ref type="figure">6</ref>. Grammars RCL and RasPiRover realizing the definition and integration of RASPIROVER DSL into MAA is embedded into RCL. Consequently, the overall language composition of RASPIROVER DSL is as depicted in Fig. <ref type="figure" target="#fig_3">5</ref>. MONTICORE combines the parsers and abstract syntax classes of the languages accordingly.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Combining Syntaxes for the RASPIROVER DSL</head><p>Leveraging JAVA/P through inheritance enables the integration of new primitives for rover actions and queries via its various interfaces. To this end, rover actions, which resemble statements in JAVA/P, are designed to implement JAVA/P's Statement interface. This enables the usage of the new actions wherever statements are supported, e.g., loops and conditionals. Queries, which resemble literals, are analogously designed to implement MONTICORE's Literal interface, enabling their use wherever literals are supported. With this, the complete RCL grammar is only 17 lines of code (15 new productions) as illustrated in Fig. <ref type="figure">6</ref> (top). In MONTICORE, embedding is a specific usage of grammar inheritance that links productions of the grammar to be embedded into extension points of the host grammar. For embedding RCL into RASPIROVER DSL, we leverage MONTICORE's multiple inheritance to realize embedding as linking one interface from the host grammar MAA to productions from the embedded grammar RCL. This is depicted in Fig. <ref type="figure">6</ref> (bottom). With this, we obtain a textual concrete syntax as illustrated in Fig. <ref type="figure" target="#fig_4">7</ref>.</p><p>Well-formedness of RCL programs is checked by new context conditions that ensure, for instance, that results of receive? queries (which return strings) are not compared to numbers. To this end, adapters between the abstract syntax classes generated from MAA's ports and RCL's primitives enable interpreting the latter as method calls of the appropriate return types, i.e., whenever MONTICORE looks up what receive? in the context of JAVA/P is, the adapters return </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Combining Code Generators for the RASPIROVER DSL</head><p>Integrating the behavior of MAA (scheduling, message passing) and RCL (commanding the rover to perform actions) requires ( <ref type="formula">1</ref>) the integration of their template-based code generators, and (2) a mapping from rover primitives to sending/receiving messages in the architecture (e.g., mapping the primitive forward to sending a messages to a motor).</p><p>The MAA code generator requires that for embedded behavior models (in our case RCL programs), a Java class is generated that implements a specific interface of MAA's common Java run-time environment <ref type="bibr" target="#b8">[9]</ref>. This interface prescribes a compute() method that takes a set of named values (read from incoming ports) as input and returns another set of named values (that are assigned to outgoing ports) as output. Every time a component (e.g., a rover's control unit) should execute its behavior, this method is invoked by MAA. The body of the compute() method is generated by the code generator of RCL. For this, the RCL generator can reuse the JAVA/P generator templates for translating control structure, conditionals, etc. The translation of RCL primitives into sending and receiving messages is specific to the RCL generator and must be implemented accordingly. To take into account the connection among rover components, the generator takes as additional input a map from RCL primitives to port names. Based on this, the generator translates actions to sending messages, and queries to receiving messages.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D. Summary</head><p>Overall, MONTICORE facilitates reusing the syntax and semantics of independently developed DSLs. The central artifacts for this are MONTICORE grammars, Java context conditions, the symbol table, and template-based code generators, out of which only the grammars require learning a specific meta-language while the rest is implemented in Java. Hence, MONTICORE focuses on programmatic language engineering. This, however, confronts language engineers with the complexities of Java. Moreover, there is no support for producing graphical editors for MONTICORE languages. The language implementations are available online. <ref type="foot" target="#foot_1">2</ref>V. DISCUSSION</p><p>As illustrated, the language reuse capabilities of GEMOC STUDIO and MONTICORE differ in the language constituents that can be reused as shown in Table <ref type="table" target="#tab_2">II</ref>. For both workbenches, reusing abstract syntax, semantics, and transformations<ref type="foot" target="#foot_2">3</ref> is supported. MONTICORE also supports the reuse of concrete syntax as the concrete syntax integrated into the grammars defining the abstract syntax as well. However, the reuse mechanisms of GEMOC STUDIO and MONTICORE differ in their expressiveness (see Table <ref type="table" target="#tab_2">II</ref>). While GEMOC STUDIO supports removing abstract syntax elements through slicing, MONTICORE only supports removing abstract syntax elements through well-formedness rules that actively prevent their instantiation. Adding new abstract syntax elements is supported through inheritance by both language workbenches. GEMOC STUDIO also supports merging two metamodels on joint classes. MONTICORE also supports inheriting concrete syntax. Through inheritance, both workbenches also support to change language concepts, whereas embedding, i.e., specification and binding of dedicated language extension points is specific to MONTICORE.</p><p>We also investigated the impact of reuse in GEMOC STUDIO and MONTICORE with respect to the reuse that could be achieved in the implementations of RASPIROVER DSL. For GEMOC STUDIO, we measured the numbers of reused metamodel elements (classes, features, operations) and lines of code of the existing interpreters. For the new artifacts, we considered the size of the new RCL language (metamodel</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Fig. 1 .</head><label>1</label><figDesc>Fig. 1. Example rover hardware architecture defined with RASPIROVER DSL</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Fig. 3 .</head><label>3</label><figDesc>Fig. 3. Using MELANGE to compose the ARDUINOML, RCL and UNITS languages to form a new customized RASPIROVER DSL</figDesc><graphic coords="3,312.11,50.81,250.74,184.59" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Fig. 4 .</head><label>4</label><figDesc>Fig. 4. Syntactically and semantically gluing ARDUINOML's Project with RCL's RoverProgram using K3 aspects</figDesc><graphic coords="4,49.10,50.68,250.74,83.81" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Fig. 5 .grammargrammar</head><label>5</label><figDesc>Fig. 5. Relationships of the languages reused to implement RASPIROVER DSL in MONTICORE</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>Fig. 7 .</head><label>7</label><figDesc>Fig. 7. Example RASPIROVER DSL model defined in MONTICORE</figDesc><graphic coords="5,166.13,176.84,134.43,57.01" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head></head><label></label><figDesc>general control structures, such as blocks, loops,</figDesc><table><row><cell cols="3">variable</cell><cell></cell><cell></cell></row><row><cell>01</cell><cell cols="4">program TravelBetweenObstacles() {</cell></row><row><cell>02</cell><cell cols="3">var step = 3 cm;</cell><cell>number with unit</cell></row><row><cell>03</cell><cell cols="4">while (not message? = "stop") {</cell></row><row><cell>04</cell><cell></cell><cell cols="3">while (not obstacle-front?) {</cell></row><row><cell>05 06</cell><cell>loop</cell><cell>}</cell><cell cols="2">forward step primitive rover action</cell><cell>comparison of strings</cell></row><row><cell>07 08</cell><cell>}</cell><cell cols="2">turn 180 deg</cell><cell cols="2">primitive rover query</cell></row><row><cell>09</cell><cell>}</cell><cell></cell><cell></cell><cell></cell></row><row><cell cols="6">Fig. 2. Example rover control program defined with RASPIROVER DSL</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head>TABLE I LANGUAGES</head><label>I</label><figDesc>REUSED FOR DEVELOPING RASPIROVER DSL</figDesc><table><row><cell>Sub-language</cell><cell>GEMOC STUDIO</cell><cell>MONTICORE</cell></row><row><cell>Architecture Description</cell><cell>ARDUINOML</cell><cell>MAA [9]</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_2"><head>TABLE II COMPARISON</head><label>II</label><figDesc>OF REUSE SUPPORT IN GEMOC STUDIO AND MONTICORE</figDesc><table><row><cell>Reuse Support</cell><cell>GEMOC STUDIO</cell><cell>MONTICORE</cell></row><row><cell>Language Components:</cell><cell></cell><cell></cell></row><row><cell>Abstract Syntax</cell><cell></cell><cell></cell></row><row><cell>Concrete Syntax</cell><cell></cell><cell></cell></row><row><cell>Semantics</cell><cell>(interpreters)</cell><cell>(generators)</cell></row><row><cell>Transformations</cell><cell></cell><cell></cell></row><row><cell>Mechanisms:</cell><cell></cell><cell></cell></row><row><cell>Removing Concepts</cell><cell>(slicing)</cell><cell>(context condition)</cell></row><row><cell>Adding Concepts</cell><cell>(merging/inheritance)</cell><cell>(inheritance)</cell></row><row><cell>Changing Concepts</cell><cell>(weaving/inheritance)</cell><cell>(inheritance)</cell></row><row><cell>Language Embedding</cell><cell></cell><cell></cell></row></table></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">https://github.com/tdegueul/gemoc-pirover/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1">http://www.se-rwth.de/materials/rcl/</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_2">Please note that we did not explicitly discuss the reuse of transformations in this paper.</note>
		</body>
		<back>
			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>and interpreter), the glue code, and the MELANGE file. For MONTICORE, we measured the lines of code in the new grammars and in the reused grammars, as well as their size in terms of new and reused productions. For MONTICORE's generators, we also measured the lines of code of new and reused code. The results are depicted in Table <ref type="table">III</ref>. As can be seen from these results, we could reuse a large portion of RASPIROVER DSL from existing languages and only needed to implement RCL and some glue code from scratch in both language workbenches. VI. CONCLUSION We presented the quintessential constituents and activities required for implementing RASPIROVER DSL, a DSL for defining the hardware architecture and control software behavior of rovers, with GEMOC STUDIO and MONTICORE. For both language workbenches, we could rely on existing DSLs to build the new rover-specific DSL. Through both case studies, we showed how the different language reuse mechanisms are applied and highlighted how they differ. We hope that this supports practitioners in creating custom DSLs with minimal effort.</p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<monogr>
		<title level="m" type="main">Software Language Engineering: Creating Domain-Specific Languages Using Metamodels</title>
		<author>
			<persName><forename type="first">A</forename><surname>Kleppe</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2008">2008</date>
			<publisher>Addison-Wesley</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">The State of the Art in Language Workbenches</title>
		<author>
			<persName><forename type="first">S</forename><surname>Erdweg</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Van Der Storm</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Völter</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 6th International Conference on Software Language Engineering</title>
				<meeting>the 6th International Conference on Software Language Engineering</meeting>
		<imprint>
			<publisher>Springer International Publishing</publisher>
			<date type="published" when="2013">2013</date>
			<biblScope unit="page" from="197" to="217" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">The GEMOC Studio</title>
		<ptr target="http://gemoc.org/studio.html" />
	</analytic>
	<monogr>
		<title level="m">The GEMOC Initiative</title>
				<imprint>
			<date type="published" when="2017">2017</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">MontiCore: a framework for compositional development of domain specific languages</title>
		<author>
			<persName><forename type="first">H</forename><surname>Krahn</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Rumpe</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Völkel</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">STTT</title>
		<imprint>
			<biblScope unit="volume">12</biblScope>
			<biblScope unit="issue">5</biblScope>
			<biblScope unit="page" from="353" to="372" />
			<date type="published" when="2010">2010</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<monogr>
		<ptr target="http://mase.cs.queensu.ca/mdetools/index.php?id=rover" />
		<title level="m">Model-Driven Engineering Tools Challenge (MDETools&apos;17</title>
				<imprint/>
	</monogr>
	<note>Rover Challenge Problem</note>
</biblStruct>

<biblStruct xml:id="b5">
	<monogr>
		<author>
			<persName><forename type="first">D</forename><surname>Steinberg</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Budinsky</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Paternostro</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Merks</surname></persName>
		</author>
		<title level="m">EMF: Eclipse Modeling Framework</title>
				<imprint>
			<publisher>Addison-Wesley Professional</publisher>
			<date type="published" when="2008">2008</date>
		</imprint>
	</monogr>
	<note>2nd ed</note>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Language Composition Untangled</title>
		<author>
			<persName><forename type="first">S</forename><surname>Erdweg</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><forename type="middle">G</forename><surname>Giarrusso</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Rendel</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 12th Workshop on Language Descriptions, Tools, and Applications</title>
				<meeting>the 12th Workshop on Language Descriptions, Tools, and Applications</meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2012">2012</date>
			<biblScope unit="page">8</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Arduino Modeling GitHub Project</title>
		<ptr target="https://github.com/gemoc/arduinomodeling" />
	</analytic>
	<monogr>
		<title level="m">The GEMOC Initiative</title>
				<imprint/>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Language and Code Generator Composition for Model-Driven Engineering of Robotics Component &amp; Connector Systems</title>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">O</forename><surname>Ringert</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Roth</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Rumpe</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Wortmann</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Journal of Software Engineering for Robotics</title>
		<imprint>
			<biblScope unit="volume">6</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="33" to="57" />
			<date type="published" when="2015">2015</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<monogr>
		<title level="m" type="main">PolarSys Rover</title>
		<author>
			<persName><surname>Polarsys</surname></persName>
		</author>
		<ptr target="https://www.polarsys.org/projects/polarsys.rover" />
		<imprint/>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<monogr>
		<ptr target="https://eclipse.org/papyrus-rt/" />
		<title level="m">The Eclipse Foundation</title>
				<imprint/>
	</monogr>
	<note>Papyrus Real Time</note>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">Adding Uncertainty and Units to Quantity Types in Software Models</title>
		<author>
			<persName><forename type="first">T</forename><surname>Mayerhofer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Wimmer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Vallecillo</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 9th International Conference on Software Language Engineering</title>
				<meeting>the 9th International Conference on Software Language Engineering</meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2016">2016</date>
			<biblScope unit="page" from="118" to="131" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<author>
			<persName><forename type="first">M</forename><surname>Schindler</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Eine Werkzeuginfrastruktur zur agilen Entwicklung mit der UML/P, ser</title>
		<title level="s">Aachener Informatik-Berichte</title>
		<imprint>
			<publisher>Shaker Verlag</publisher>
			<date type="published" when="2012">2012</date>
			<biblScope unit="volume">11</biblScope>
		</imprint>
		<respStmt>
			<orgName>Software Engineering</orgName>
		</respStmt>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">Supporting Efficient and Advanced Omniscient Debugging for xDSMLs</title>
		<author>
			<persName><forename type="first">E</forename><surname>Bousse</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Corley</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Combemale</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Gray</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Baudry</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 8th International Conference on Software Language Engineering</title>
				<meeting>the 8th International Conference on Software Language Engineering</meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2015">2015</date>
			<biblScope unit="page" from="137" to="148" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<analytic>
		<title level="a" type="main">Execution Framework of the GEMOC Studio (Tool Demo)</title>
		<author>
			<persName><forename type="first">E</forename><surname>Bousse</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Degueule</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Vojtisek</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Mayerhofer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Deantoni</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Combemale</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 9th International Conference on Software Language Engineering</title>
				<meeting>the 9th International Conference on Software Language Engineering</meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2016">2016</date>
			<biblScope unit="page" from="84" to="89" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b15">
	<monogr>
		<title level="m" type="main">K3 -Executable Metamodeling</title>
		<author>
			<persName><forename type="first">Inria</forename><surname>Diverse</surname></persName>
		</author>
		<ptr target="http://diverse-project.github.io/k3/" />
		<imprint>
			<date type="published" when="2017">2017</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b16">
	<analytic>
		<title level="a" type="main">Revisiting Visitors for Modular Extension of Executable DSMLs</title>
		<author>
			<persName><forename type="first">M</forename><surname>Leduc</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Degueule</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Combemale</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Van Der Storm</surname></persName>
		</author>
		<author>
			<persName><forename type="first">O</forename><surname>Barais</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 20th International Conference on Model-Driven Engineering Languages and Systems</title>
				<meeting>the 20th International Conference on Model-Driven Engineering Languages and Systems</meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2017">2017</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b17">
	<analytic>
		<title level="a" type="main">xMOF: Executable DSMLs based on fUML</title>
		<author>
			<persName><forename type="first">T</forename><surname>Mayerhofer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Langer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Wimmer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Kappel</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 6th International Conference on Software Language Engineering, ser</title>
		<title level="s">Lecture Notes in Computer Science</title>
		<meeting>the 6th International Conference on Software Language Engineering, ser</meeting>
		<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2013">2013</date>
			<biblScope unit="volume">8225</biblScope>
			<biblScope unit="page" from="56" to="75" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b18">
	<analytic>
		<title level="a" type="main">Melange: A Meta-language for Modular and Reusable Development of DSLs</title>
		<author>
			<persName><forename type="first">T</forename><surname>Degueule</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Combemale</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Blouin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">O</forename><surname>Barais</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J.-M</forename><surname>Jézéquel</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 8th International Conference on Software Language Engineering</title>
				<meeting>the 8th International Conference on Software Language Engineering</meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2015">2015</date>
			<biblScope unit="page" from="25" to="36" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b19">
	<analytic>
		<title level="a" type="main">Safe model polymorphism for flexible modeling</title>
		<author>
			<persName><forename type="first">T</forename><surname>Degueule</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Combemale</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Blouin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">O</forename><surname>Barais</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Jézéquel</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Computer Languages, Systems &amp; Structures</title>
		<imprint>
			<biblScope unit="volume">49</biblScope>
			<biblScope unit="page" from="176" to="195" />
			<date type="published" when="2017">2017</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b20">
	<analytic>
		<title level="a" type="main">Composition of Heterogeneous Modeling Languages</title>
		<author>
			<persName><forename type="first">A</forename><surname>Haber</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Look</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><forename type="middle">M S</forename><surname>Nazari</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">N</forename><surname>Perez</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Rumpe</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 3rd International Conference on Model-Driven Engineering and Software Development</title>
				<meeting>the 3rd International Conference on Model-Driven Engineering and Software Development</meeting>
		<imprint>
			<publisher>Springer International Publishing</publisher>
			<date type="published" when="2015">2015</date>
			<biblScope unit="page" from="45" to="66" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b21">
	<monogr>
		<title level="m" type="main">Modeling with UML: Language, Concepts, Methods</title>
		<author>
			<persName><forename type="first">B</forename><surname>Rumpe</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2016-07">July 2016</date>
			<publisher>Springer International</publisher>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
