<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Coping with Semantic Variation Points in Domain-Specific Modeling Languages</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Florent Latombe</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Xavier Cre´gut</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Julien Deantoniy</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marc Pantel</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Benoit Combemalez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Toulouse</institution>
          ,
          <addr-line>IRIT, Toulouse</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <fpage>21</fpage>
      <lpage>27</lpage>
      <abstract>
        <p>-Even if they exhibit differences, many DomainSpecific Modeling Languages (DSMLs) share elements from their concepts, notations and semantics. StateCharts is a wellknown family of DSMLs that share many concepts but exhibit notational differences and many execution semantics variants (called Semantic Variation Points - SVPs -). For instance, when two conflicting transitions in a state machine are enabled by the same event occurrence, which transition is fired depends on the language variant (Harel original StateCharts, UML, Rhapsody, etc.) supported by the execution tool. Tools usually provide only one implementation of SVPs. It complicates communication both between tools and end-users, and hinders the co-existence of multiple variants. More generally, Language Workbenches dedicated to the specification and implementation of eXecutable Domain-Specific Modeling Languages (xDSMLs) often do not offer the tools and facilities to manage these SVPs, making it a time-consuming and troublesome activity. In this paper, we describe a modularized approach to the operational execution semantics of xDSMLs and show how it allows us to manage SVPs. We illustrate this proposal on StateCharts.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>
        Domain-Specific Modeling Languages (DSMLs) provide
user-friendly abstractions for domain experts who are not
necessarily well-versed in the use of programming languages even
when limited to domain-specific libraries (i.e., API dedicated
to a domain like security, fault tolerance, etc.). A DSML is
called executable (xDSML) when it represents systems which
evolve during time (i.e., it captures the behavior(s) of the
systems). Being domain-specific eases the design of complex
software-intensive systems whereas being executable enables
early verification and validation of the systems [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Semantic Variation Points (SVPs) are language
specification parts left intentionally under-specified to allow further
language adaptation to specific uses. SVPs must be dealt with
either through further refinement of the language specification
(in the case of UML, through stereotypes or profiles) or by
making arbitrary choices in the implementation. The latter
is most often the case when accommodating specific types
of execution platform (e.g., distributed, highly-parallel, etc.),
allowing various implementations of the concurrency concerns
(e.g., parallelism or thread interleaving). For instance, the
concurrency in CPython, the reference implementation of Python,
is subject to the Global Interpreter Lock (GIL), which prevents
multithreaded programs from taking advantage of
multiprocessor systems; while Jython, the Java implementation of Python
supports parallelism through the Java Virtual Machine (JVM).
Another example is fUML [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], whose specification delegates
the notions of time, communications and concurrency to the
tool implementors. Tool vendors are thus responsible for
specifying and documenting the implemented solution.
      </p>
      <p>SVPs are usually identified informally in the DSML syntax
and semantics specification documents. In the context of this
paper, we will draw the difference between a Language (the
specification of a syntax and of a semantics that may contain
SVPs) and its Dialects (which implement a language, making
choices about some – possibly all – SVPs of the language).
Tools commonly only provide one dialect, thus constraining
the end-user to work with the selected specific implementation
of SVPs, which may not be the best-suited for their needs.
Besides, it also complicates the cooperation between tools,
since they may implement SVPs differently, giving a different
semantics to the same syntax. Two engineers with different
backgrounds may also assume different meanings for the same
model, which impairs communication. Finally, large projects
may need to use several dialects cooperatively, which means
that this issue cannot be simply reduced to the choice of a
unique tool: one dialect with an associated tool may be the
best fit for a particular aspect of a system, but other ones may
be better-suited for other aspects of the system.</p>
      <p>
        This paper describes an approach to the specification of the
execution semantics of an xDSML that eases the specification
and management of SVPs. The approach is implemented in the
GEMOC Studio1. It is illustrated with Finite State Machines
(FSMs), a common formalism to represent complex system
behaviors. StateCharts [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] is a common xDSML to model
FSMs that exhibits many SVPs, as shown by a comparative
study of its most popular versions [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>Modern systems (IoT, etc.) increasingly rely on
concurrency, and modern platforms provide more and more concrete
concurrency facilities (many-core, GPU, etc.). xDSMLs must
provide sophisticated concurrency concepts with well-defined
semantics, to enable early concurrency-aware analyses, and</p>
    </sec>
    <sec id="sec-2">
      <title>1http://www.gemoc.org</title>
      <p>
        SVPs related to the concurrency concerns to allow
refinements to specific platforms. But the concurrency concerns
and SVPs of xDSMLs are usually implicit, embedded in the
underlying execution environment or in the meta-languages
used to define the xDSMLs. The GEMOC executable
metamodeling approach makes explicit the concurrency aspects
in an xDSML specification, relying on event structures [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]
which define a partial ordering over a set of events. This
paper advocates that this paradigm is not only suitable for
specifying the concurrency concerns, but also for defining
many of the concurrency-related SVPs by leaving some parts
of the semantics under-constrained. Then, implementing these
SVPs consist in reducing the partial ordering of the event
structure with additional constraints.
      </p>
      <p>This paper is structured as follows: Section II summarizes
the StateCharts example. Section III describes the GEMOC
executable modeling approach and illustrates how it is
particularly suitable for the specification of SVPs. The
implementation in the GEMOC Studio is described in Section IV. Finally,
Section V gives related work and Section VI concludes and
proposes insights on future works.</p>
      <p>
        II. SEMANTIC VARIATION POINTS OF STATECHARTS
The StateCharts formalism is an extension of Finite State
Machines (FSMs) with hierarchy, concurrency and broadcast
communications [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. A comparative study by M. Crane and
J. Dingel [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] identifies and compares some of the existing
StateCharts dialects. For the purpose of this paper, we will
consider the original Harel Statecharts (denominated as
Original) [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and the UML StateCharts [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. The study also classifies
the differences between these dialects into three categories:
notation (the least critical, a notation translation can ensure
compatibility); well-formedness (when a formalism has an
exclusive construct, model refactoring can most of the time
make it compatible with the other formalisms); and semantics
(the most critical one). For the purpose of this paper, we only
consider the semantic differences between the dialects, and
assume that notation and well-formedness issues have been
solved beforehand.
      </p>
      <sec id="sec-2-1">
        <title>A. Common Syntax of Statecharts</title>
        <p>In StateCharts, an FSM is composed of Regions and Events.
Each Region is composed of States and Transitions between
these States. A State can be composed of Regions, thus
defining a hierarchy between the States. Each Region has an
initial State. A Transition can have a Guard (predicate
expression) and an Effect (collection of behavior expressions named
Actions). A Transition has a Trigger which is a reference to
an Event.</p>
      </sec>
      <sec id="sec-2-2">
        <title>B. Common Semantics of Statecharts</title>
        <p>The bulk of the semantics is common to all three StateCharts
dialects. When an Event occurs, it enables all the Transitions
whose Trigger references the occurring Event. Depending on
their Guard evaluation result, they may then be fired. When
a Transition is fired, its source State is exited, its Effect is
executed and its target State is entered.</p>
      </sec>
      <sec id="sec-2-3">
        <title>C. Semantic Variation Points</title>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>We consider the three following SVPs:</title>
      <p>Simultaneous Events: Can different Events occur at the
same time? In the original formalism, they can, and they
are dealt with simultaneously (concurrently). The UML
formalism adheres to the concept of run-to-completion
(RTC) which means that Event occurrences are handled
one by one (possibly with priorities), thus simultaneous
Events are not allowed.</p>
      <p>Order of execution of Actions: When a Transition is fired,
how are the Actions that compose its Effect executed? In
parallel in the original formalism and in sequence in the
UML version.</p>
      <p>Priorities of conflicting Transitions: When several
Transitions are enabled by the same Event occurrence, how
are they handled if their executions conflict (e.g. their
application would lead to an inconsistent model state) ? In
the original formalism, priority is given to the Transition
which is highest in the hierarchy, while in UML, priority
is given to the Transition which is lowest in the hierarchy.</p>
      <p>Let us consider the example model from Figure 1,
representing a simple music player.</p>
      <p>The following scenarios illustrate the 3 targeted SVPs:
When in State “Off”, “StartEvent” and “StopEvent”
occur.</p>
      <p>– Original: they are dealt with concurrently, resulting
in the Transition from “Off” to “On” being fired.
– UML: not supported.</p>
      <p>When, in States “On” and “Paused”, the Event
“StartEvent” occurs (assuming x and y both start at 0),
triggering the firing of the Transition from “Paused” to
“Playing”.</p>
      <p>– Original: when reaching State “Playing”, the values
of x and y are respectively 1 and 0.
– UML: when reaching State “Playing”, the values of
x and y are respectively 1 and 1.</p>
      <p>When, in States “On” and “Playing”, the Event
“StopEvent” occurs.</p>
      <p>– Original: the Transition from “On” to “Off” is fired.
– UML: the Transition from “Playing” to “Paused” is
fired.</p>
      <p>So far, these differences have to be deduced from the
documentation of the respective tools or specifications, or
through tests of the tools. It is not explicit, when considering
the model, what the associated version of the semantics is.
III. CONTRIBUTION AND APPLICATION TO STATECHARTS</p>
      <p>This section describes the GEMOC executable
metamodeling approach and how we propose to deal with SVPs. We
illustrate it on StateCharts.</p>
      <sec id="sec-3-1">
        <title>A. GEMOC Executable Metamodeling Approach</title>
        <p>
          The language and modeling communities specify languages
with an Abstract Syntax (AS), one or more Concrete Syntaxes
(CSs) and mappings from the AS to one or more Semantic
Domains (SDs) [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]. Based on this proposal and work from the
concurrency theory community, previous contributions [
          <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
          ]
have proposed to cross-fertilize both approaches to specify
Concurrency-aware xDSMLs by making the concurrency
concerns explicit and suitable for analyses like determinism or
deadlock freeness. The mapping between the AS and the SD,
inspired from Structured Operational Semantics (SOS) [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], is
split into two parts: the Semantic Rules, dedicated to sequential
actions (not to be confused with StateCharts Actions) specified
in an operational manner; and a declarative Concurrency
Model that orchestrates the Semantic Rules. A Communication
Protocol defines the relations between the Semantic Rules and
the Concurrency Model. The class diagram from Figure 2
summarizes the architecture of the specification of
concurrencyaware xDSMLs execution semantics in GEMOC.
        </p>
        <p>The Semantic Rules specify the sequential evolutions of the
model state at runtime (not to be confused with StateCharts
States). The Execution Data (ED) represent at the language
level the runtime state of the model. Execution Functions (EF)
specify how the ED evolve during execution. For instance,
a Region has a “currentState” reference in its ED which
represents its current State during the execution. It is updated
by the EF “fire” on Transitions.</p>
        <p>The Concurrency Model is captured by the Model of</p>
      </sec>
      <sec id="sec-3-2">
        <title>Concurrency and Communication (MoCC). The MoCC is an</title>
        <p>
          EventType structure, specifying at the language level how, for
a given model, the event structure [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] defining its concurrent
control flow is built from a partial ordering over events (events
of the event structure, not to be confused with StateCharts
Events). This event structure represents all the possible
execution paths of the model (including all possible interleavings of
events occurring concurrently). Figure 3 shows the simplified
event structure corresponding to the example from Figure 1.
In this representation, a node is a configuration : an unordered
set of event occurrences that have happened at this point in the
execution. Event structures allow focusing on the concurrency,
synchronization and the, possibly timed, causalities between
actions. The actions themselves are opaque, thus the data
manipulation they realize are abstracted away. In other words,
it allows specifying the pure concurrent control flow of a
model in order to ease reasoning on it. Note that in the case
of StateCharts, the nature of the language (with 3 different
possible inputs at every steps, depending on which events
occur) makes the Event Structure very large and difficult to
represent.
        </p>
        <p>The full semantics is built thanks to the Communication
Protocol which maps some of the EventTypes from the MoCC
to the EFs. This means that, at the model level, when an event
occurs, it triggers the execution of the associated EF on an
element of the model. For instance, if the Communication
Protocol specifies that the EventType “et FireTransition” is mapped
to Transition::fire(), then the event “e FireOn2Off”
(instance of “et FireTransition” for the Transition from “On”
to “Off”, “On2Off”) triggers the execution of On2Off
.fire(). Figure 4 shows the different concerns, at the model
level, of our example: the bottom part of the Event Structure
(MoCC at the model level), the Execution Functions and
the Communication Protocol (both at the model level). The</p>
        <p>Communication Protocol allows the MoCC and the Semantic
Rules to remain independent, enabling modular changes in
either part.</p>
      </sec>
      <sec id="sec-3-3">
        <title>B. Coping with Semantic Variation Points</title>
        <p>If several execution paths are allowed at a point in the
event structure, it means that there is either Concurrency or
Conflict. The first one means that other events are happening
concurrently (interleaved or in parallel), in which case the
execution paths will eventually merge. It does not mean that
the executed model reaches the same state, but instead that in
terms of pure control flow (independent of any data from the
model) it is at the same point in the execution. Our example
model is sequential, so there is no need for parallelism or
interleavings. The second one means that there is a disjunction
among the possible execution paths, which ultimately results
in different final configurations of the event structure. Conflicts
are a sign of nondeterminism in the semantics of the language,
which means that either the language is indeterministic by
intention, or that there is a SVP pertaining to the concurrency
concern of the language. In the case of StateCharts, depending
on the Events occurring, the execution will go one way or
another, therefore there are many conflicts to represent the
possible inputs (Events occurring).</p>
        <p>SVPs can occur in any parts of the execution semantics.</p>
        <p>The ones in Semantic Rules target the model runtime state
representation and/or evolution. For instance, changing a List
into a Stack to have a LIFO policy instead of FIFO, or
incrementing a value twice instead of once to double a ressource
consumption. In StateCharts, a Transition Effect is a collection
of Actions executed in parallel (in the original formalism)
or in sequence (in UML). This SVP can be implemented
in the EF that executes the Effect of the Transition being
fired, with a parallel or sequential implementation. Another
solution consists in providing both versions of the EF, but in
changing the Communication Protocol to use the sequential
one or the parallel one depending on the dialect we wish to
use. The imperative nature of these implementations makes
them complex to manage.</p>
        <p>Thus, we propose to rely on the language’s declarative
MoCC to represent the superset of possibilities for all allowed
concurrency-related SVPs, and to refine the MoCC for each
dialect by removing the execution paths that do not correspond
to the expected semantics. Nondeterminisms in the MoCC
(resulting in conflicts in a model event structure) can be seen
as potential SVPs. SVP implementations restrain the number
of outgoing execution paths at a conflict point. In StateCharts
(where a scenario, user, or environment drives the execution),
there will be a lot of nondeterminisms left in the MoCC
even after implementing the SVPs of the various dialects (to
represent the possible inputs, Events being allowed to occur
at every step of the execution). SVP implementations cannot
add new EventTypes in the MoCC, as it would result in new
execution paths that were not initially present in the language’s
MoCC specification.</p>
        <p>For instance, let us consider the SVP concerning
simultaneous Events. The part of the event structure corresponding
to this situation is represented in Figure 5. For this particular</p>
        <p>SVP, the UML dialect implements a subset of the original
formalism’s possibilities. Individual Events “e StartEvent” and
“e StopEvent” are possible in both situations, but having
both “e StartEvent” and “e StopEvent” is only allowed in
the original formalism. The part of the MoCC responsible for
implementing this SVP in UML is an extension of the part of
the MoCC for the original formalism, with the addition of a
constraint preventing simultaneous Event occurrences.</p>
        <p>The SVP concerning conflicting Transition is different: there
is a disjunction between the original formalism and the UML
one. Figure 6 shows an example event structure of a situation
where, in the State “On” and “Playing”, the Event “StopEvent”
(or both “StartEvent” and “StopEvent”) occur. In this case, the
original formalism gives priority to “On2Off”, while UML
gives priority to “Playing2Paused”. Therefore, the MoCC of
the language representing the superset of possibilities for
all allowed variants must allow both solutions. Each dialect
then extends the MoCC of the language to add constraints
resulting in the removal of some of the execution paths not
corresponding to the implemented semantics.</p>
        <p>The difference between specializing a language for a
specific environment and implementing a Semantic Variation
Point is blurry. SVPs sometimes represent adaptation points for
a specific platform (distributed, highly parallel, . . . ). Therefore
the event structure used to define the concurrency concerns in
the semantics of xDSMLs is also a good fit for defining a
language while still allowing dialects to be implemented by
extending the concurrency model. SVPs can also be
implemented in a modular way so that dialects are then realized by
merging specific SVP implementations; similar to creating a
new class in Aspect-Oriented Programming by extending an
existing class and weaving existing aspects onto it.</p>
        <p>
          MoCC. The definition of the EventType structure relies on
the Event Constraint Language (ECL) [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ], an extension of
OCL which allows the definition of EventTypes for concepts
from the AS. It can also use constraints defined in MoCCML
to specify how the event structure at the model level is
built. Listing 2 shows an excerpt from the MoCC of the
fUML dialect of StateCharts. EventTypes are declared in the
context of concepts from the AS, and the exclusion constraint
implements the simultaneous events SVP for fUML. This
relation ensures that events cannot occur simultaneously.
        </p>
        <p>Listing 2
EXCERPT FROM THE MOCC OF THE UML DIALECT OF STATECHARTS</p>
        <p>SPECIFIED USING ECL. THE ADDITIONAL CONSTRAINT
“NOSIMULTANEOUSEVENTS” IMPLEMENTS THE SIMULTANEOUS EVENTS</p>
        <p>SVP.
1 import ’platform:/resource/org.gemoc.sample.</p>
        <p>statecharts.model/model/statecharts.ecore’
2</p>
        <p>
          IV. IMPLEMENTATION 43 -co-ntDexetfiSntiantgeMtahcehiEnveentTypes in their context
The GEMOC executable metamodeling approach is imple- 5 def: mocc_initialize : Event = self
omnenptreedviionusa wlaonrgku[a1g0e].wIotriksbinetnecghr,attehde iGnEthMeOECcliSptsuedMio2odbealsinedg 876 codnetfe:xtmoTcrca_nfsiirteio:n Event = self
Framework (EMF) [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] to benefit from its large ecosystem. 9
        </p>
        <p>
          The AS is specified with Ecore, the Eclipse Modeling 10 context StatechartEvent
11 def: mocc_occur : Event = self
Framework implementation of EMOF, and with the Object 12
Constraint Language (OCL) for the static semantics. Both 13 -- Constraint for UML
EMOF [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] and OCL [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] are standards from the Object 14 context StateMachine
Management Group (OMG). 1165 invRneloaStiionmuElxtcalnuseioonu(ssEevlfe.netvse:nts.mocc_occur)
        </p>
        <p>
          The EFs are implemented with the Kermeta 3 Action
Language (K3AL) [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ], built on top of xTend [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]. K3AL
allows the definition of aspects for Ecore metaclasses, allowing
us to weave the additional classes, attributes, references and
operation implementations specifying the ED and the EFs.
        </p>
        <p>K3AL, just like xTend, compiles into Java Bytecode and
provides an executor based on the Java Reflection API to
dynamically execute the EFs. Listing 1 shows the
implementation of the StateMachine.initialize() Execution
Function in K3AL.</p>
      </sec>
      <sec id="sec-3-4">
        <title>The MoCC is compiled to a Clock Constraint Specifi</title>
        <p>
          cation Language (CCSL) [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] model interpreted by the
TimeSquare [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ] tool. Practically, computing the whole Event
Structure is not doable because if the model is very large or
highly parallel, then the exponential number of configurations
(possibly infinite) makes it too costly to compute or too big
to be usable. Instead, TimeSquare provides only the next set
of possible configurations of the Event Structure. Due to its
constraint-based approach, the runtime of CCSL provided by
TimeSquare is called a Solver.
        </p>
        <p>
          The Communication Protocol is specified using the Gemoc
Events Language (GEL) [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ]. Listing 3 shows an excerpt of
the Communication Protocol of StateCharts. Mappings are
implemented by what we call Domain-Specific Events (DSEs)
which link an EventType (specified in ECL, see Listing 2), to
an Execution Function).
        </p>
        <p>At runtime, an Execution Engine written mostly in Java
coordinates the K3AL interpreter, the GEL interpreter and
the CCSL solver to execute a model. Figure 7 shows the
sequence diagram for an execution step. First, the
Execution Engine retrieves from the CCSL Solver the next set
of possible configurations (scheduling solutions). Its heuristic
Listing 1
IMPLEMENTATION OF THE EXECUTION FUNCTION ”INITIALIZE” OF</p>
        <p>STATEMACHINE IN KERMETA 3.
1 @Aspect(className=StateMachine)
2 class StateMachineAspect {
3 // Initializes each Region with its initial state
4 def public void initialize() {
5 self.regions.forEach [ region |
6 region.currentState = region.initialState
7 ]
8 }
9 }</p>
        <p>
          MoCCML [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ], a declarative meta-language designed to
express constraints between events, is used to specify the
        </p>
        <p>Listing 3
EXCERPT FROM THE COMMUNICATION PROTOCOL OF STATECHARTS</p>
        <p>SPECIFIED USING GEL.
1 DSE InitializeStateMachine:
2 upon mocc_initialize
3 triggers StateMachine.initialize
4 end
5
6 DSE FireTransition:
7 upon mocc_fire
8 triggers Transition.fire
9 end
then selects one solution among the possible ones. A default
implementation consists in letting the user do the selection to
manage indeterministic situations manually when developing
an xDSML. Based on the Communication Protocol, the set of
EFs to execute is deduced from the selected solution. All the
EFs are executed in parallel, resulting in an updated runtime
state of the model.</p>
        <p>Figure 8 gives the architecture of our implementation of
StateCharts.</p>
        <p>The modularization of our approach effectively allows the
reuse of part of the operational semantics (in our case, of
the ED and EFs and of parts of the Communication Protocol
and of the MoCC) for the various dialects of StateCharts.</p>
        <p>To implement our second SVP, “Communication Protocol for
UML” maps “Transition.executeEffectSequentially()” while
for original StateCharts, “Transition.executeEffectInParallel()”
is mapped. In “UML StateCharts MoCC”, a constraint is added
to exclude simultaneous occurrences of Events (as shown in
Listing 2). Priority is given to the inner Transition in case
of conflicting Transitions (third SVP) while the “Original
StateCharts MoCC” gives priority to the outer Transition.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>V. RELATED WORK</title>
      <p>
        DMSL editors, also called Language Workbenches [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ],
such as Metacase’s MetaEdit+ [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] or JetBrain’s MPS [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ]
usually do not provide explicit means to handle the SVPs
of the DSMLs. Existing executable metamodeling approaches
such as xMOF [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] or Kermeta [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ] usually only provide
semantic variability through operations redefinitions and strategy
design pattern uses. SVPs are a recurrent issue for executable
metamodeling, in particular for executable UML. In [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ],
the authors draw inspiration from the notion of Genericity
available in object-oriented GPLs such as Java or C++ to
introduce a notion of template parameters at the metamodel
level which can be bound either at the model level or at the
metamodel level. This approach is exclusively at a structural
level, with the assumption that behaviors are encapsulated in
operations and triggered by operation calls. In our approach,
we only consider the behavioral aspects and how the SVPs
are implemented, assuming that the structural issues have been
resolved beforehand. In [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ] is introduced the notion of inner
semantics of a language (semantics where the SVPs are left
open) which corresponds, for us, to using the common MoCC
of the language without extending it with SVP
implementations. Our approach is closer to what was done for the
SVPs of UML State Machines in [
        <xref ref-type="bibr" rid="ref29">29</xref>
        ], where the SVPs are
reified in their own models to avoid tying the semantic choices
to the implementing tool. The UML model to be executed
is then transformed into a target UML model reflecting the
semantic variations selected. In our approach, the SVPs are
always specified in their own models at the language level
since our Execution Engine is generic and able to execute
any model conforming to a language described using our
language workbench. Our approach also bears resemblance
to [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ], in which the authors have developed a framework
to analyze the different variants of StateCharts thanks to
pluggable semantics implemented in Java which parameterize
their execution engine. In our case, the different semantic
variants are models belonging to the language definition which
are interpreted (after compilation for a specific model) by the
generic execution engine making our approach generic and not
tied to a family of languages.
      </p>
    </sec>
    <sec id="sec-5">
      <title>VI. CONCLUSION AND PERSPECTIVES</title>
      <p>Semantic Variation Points (SVPs) are usually poorly
identified in language specifications, and their implementations are
often hardcoded into the implementing tools, hindering the
end-users from choosing their own variation of the language,
particularly one that may be a better fit for a particular
class of problems. The GEMOC executable metamodeling
approach separates the semantic mapping of xDSMLs to make
explicit the Concurrency Model, completed by Semantic Rules
describing how the runtime state of the model evolves, and
by a Communication Protocol to connect both. Its event
structure-based approach to the concurrency model eases the
specification of nondeterministic situations, corresponding to
potential SVPs. Implementing a SVP is then done by extending
the concurrency model with additional constraints, resolving
partially or totally nondeterminisms that were left in the
language’s Concurrency Model. The SVP implementations
are thus weaved into the language definition, allowing the
execution tool to remain independent from any arbitrary choice
with regards to the SVPs. Future work will be concerned
with adding the possibility to hinder parts of the concurrency
model of the language from being extended by dialects. So
far in our approach, every point of nondeterminism left in
the concurrency model is considered as a potential SVP. But
sometimes, the nondeterminisms left in the concurrency model
are integrally part of the semantics of all variants allowed
and should not be extended and resolved by dialects. We also
plan to consider the case of SVPs which spread through the
three units constituting the semantics (Concurrency Model,
Semantic Rules or Communication Protocol) because so far,
we have only considered SVPs which are contained in only
one of these units. At last, we target the integration of these
proposals with SVPs at the syntax level, both abstract and
concrete; and to experiment the use of variability management
techniques to make the management of language variants more
explicit.</p>
    </sec>
    <sec id="sec-6">
      <title>ACKNOWLEDGMENT</title>
      <p>This work is partially supported by the ANR INS Project
GEMOC (ANR-12-INSE-0011).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>T.</given-names>
            <surname>Kosar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Oliveira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mernik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. J. M.</given-names>
            <surname>Pereira</surname>
          </string-name>
          , M. Cˇrepinsˇek,
          <string-name>
            <surname>C. D. Da</surname>
            , and
            <given-names>R. P.</given-names>
          </string-name>
          <string-name>
            <surname>Henriques</surname>
          </string-name>
          , “
          <article-title>Comparing general-purpose and domain-specific languages: An empirical study</article-title>
          ,
          <source>” ComSIS</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2] OMG, “
          <source>fUML specification v1.1</source>
          ,”
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>D.</given-names>
            <surname>Harel</surname>
          </string-name>
          , “
          <article-title>Statecharts: A visual formalism for complex systems</article-title>
          ,” Science of computer programming,
          <year>1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>M. L.</given-names>
            <surname>Crane</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Dingel</surname>
          </string-name>
          , “
          <article-title>UML vs</article-title>
          .
          <article-title>Classical vs. Rhapsody statecharts: not all models are created equal</article-title>
          ,” SoSyM,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>G.</given-names>
            <surname>Winskel</surname>
          </string-name>
          , Event structures. Springer,
          <year>1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Harel</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Naamad</surname>
          </string-name>
          , “
          <article-title>The STATEMATE semantics of statecharts,” TOSEM</article-title>
          , vol.
          <volume>5</volume>
          , no.
          <issue>4</issue>
          , pp.
          <fpage>293</fpage>
          -
          <lpage>333</lpage>
          ,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7] OMG, “
          <source>UML superstructure specification v2.4</source>
          .1,”
          <year>2011</year>
          . [Online]. Available: http://www.omg.org/spec/UML/2.4.1/ Superstructure/PDF/
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>D.</given-names>
            <surname>Harel</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Rumpe</surname>
          </string-name>
          , “
          <article-title>Meaningful modeling: what's the semantics of</article-title>
          ”semantics”?” Computer,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>B.</given-names>
            <surname>Combemale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Hardebolle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Jacquet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Boulanger</surname>
          </string-name>
          , and
          <string-name>
            <given-names>B.</given-names>
            <surname>Baudry</surname>
          </string-name>
          , “
          <article-title>Bridging the Chasm between Executable Metamodeling and Models of Computation,” in SLE2012, ser</article-title>
          .
          <source>LNCS</source>
          . Springer, Sep.
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>B.</given-names>
            <surname>Combemale</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. De Antoni</surname>
            ,
            <given-names>M. Vara</given-names>
          </string-name>
          <string-name>
            <surname>Larsen</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Mallet</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          <string-name>
            <surname>Barais</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Baudry</surname>
          </string-name>
          , and R. France, “
          <article-title>Reifying Concurrency for Executable Metamodeling,” in SLE 2013, ser</article-title>
          . LNCS. SpringerVerlag.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>G. D.</given-names>
            <surname>Plotkin</surname>
          </string-name>
          , “
          <article-title>The origins of structural operational semantics,”</article-title>
          <source>The Journal of Logic and Algebraic Programming</source>
          , vol.
          <volume>60</volume>
          , pp.
          <fpage>3</fpage>
          -
          <lpage>15</lpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Eclipse</surname>
            <given-names>Foundation</given-names>
          </string-name>
          , “EMF homepage,”
          <year>2015</year>
          . [Online]. Available: http://www.eclipse.org/modeling/emf/
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13] OMG, “MOF specification
          <year>v2</year>
          .5,”
          <year>2015</year>
          . [Online]. Available: http://www.omg.org/spec/MOF/
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14] --,
          <source>“OCL specification v2.4</source>
          ,”
          <year>2014</year>
          . [Online]. Available: http://www.omg.org/spec/OCL/
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <article-title>DIVERSE-team, “Github for K3AL</article-title>
          ,”
          <year>2015</year>
          . [Online]. Available: http://github.com/diverse-project/k3/
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>L.</given-names>
            <surname>Bettini</surname>
          </string-name>
          ,
          <article-title>Implementing Domain-Specific Languages with Xtext and Xtend</article-title>
          . Packt Publishing Ltd,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <surname>J. De Antoni</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Issa Diallo</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Teodorov</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Champeau</surname>
            , and
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Combemale</surname>
          </string-name>
          , “
          <article-title>Towards a Meta-Language for the Concurrency Concern in DSLs</article-title>
          ,” in DATE'
          <volume>15</volume>
          ,
          <string-name>
            <surname>Mar</surname>
          </string-name>
          .
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <surname>J. De Antoni</surname>
            and
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Mallet</surname>
          </string-name>
          , “
          <article-title>ECL: the event constraint language, an extension of OCL with events</article-title>
          ,
          <source>” Inria, Tech. Rep.</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>F.</given-names>
            <surname>Mallet</surname>
          </string-name>
          , “
          <article-title>Clock constraint specification language: specifying clock constraints with uml/marte</article-title>
          ,”
          <source>Innovations in Systems and Software Engineering</source>
          , vol.
          <volume>4</volume>
          , no.
          <issue>3</issue>
          , pp.
          <fpage>309</fpage>
          -
          <lpage>314</lpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <surname>J. De Antoni</surname>
            and
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Mallet</surname>
          </string-name>
          , “Timesquare:
          <article-title>Treat your models with logical time</article-title>
          ,” in Objects, Models, Components, Patterns. Springer,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>F.</given-names>
            <surname>Latombe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Cregut</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Combemale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Deantoni</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Pantel</surname>
          </string-name>
          , “
          <article-title>Weaving Concurrency in eXecutable DomainSpecific Modeling Languages,” in SLE 2015</article-title>
          . ACM, Oct.
          <year>2015</year>
          . [Online]. Available: https://hal.inria.fr/hal-01185911
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>M.</given-names>
            <surname>Fowler</surname>
          </string-name>
          , “
          <article-title>Language workbenches: The killer-app for domain specific languages</article-title>
          ,”
          <year>2005</year>
          . [Online]. Available: http: //martinfowler.com/articles/languageWorkbench.html
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>J.-P.</given-names>
            <surname>Tolvanen</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Kelly</surname>
          </string-name>
          , “
          <article-title>MetaEdit+: defining and using integrated domain-specific modeling languages,” in</article-title>
          <string-name>
            <surname>OOPSLA</surname>
          </string-name>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>M.</given-names>
            <surname>Voelter</surname>
          </string-name>
          and
          <string-name>
            <given-names>V.</given-names>
            <surname>Pech</surname>
          </string-name>
          , “
          <article-title>Language modularity with the MPS language workbench,” in ICSE</article-title>
          . IEEE,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mayerhofer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Langer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Wimmer</surname>
          </string-name>
          , and G. Kappel, “xMOF:
          <source>Executable DSMLs based on fUML,” in Software Language Engineering</source>
          . Springer,
          <year>2013</year>
          , pp.
          <fpage>56</fpage>
          -
          <lpage>75</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <surname>J.-M. Je</surname>
          </string-name>
          <article-title>´ze´quel,</article-title>
          <string-name>
            <surname>O. Barais</surname>
            , and
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Fleurey</surname>
          </string-name>
          , “
          <article-title>Model driven language engineering with kermeta,” in Generative and Transformational Techniques in Software Engineering III</article-title>
          . Springer,
          <year>2011</year>
          , pp.
          <fpage>201</fpage>
          -
          <lpage>221</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>A.</given-names>
            <surname>Cuccuru</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Mraidha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Terrier</surname>
          </string-name>
          , and S. Ge´rard, “
          <article-title>Templatable metamodels for semantic variation points,” in Model Driven Architecture-Foundations and Applications</article-title>
          . Springer,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <given-names>H.</given-names>
            <surname>Gro</surname>
          </string-name>
          <article-title>¨nniger and B</article-title>
          .
          <string-name>
            <surname>Rumpe</surname>
          </string-name>
          , “
          <article-title>Modeling language variability,” in Foundations of Computer Software</article-title>
          . Modeling, Development, and
          <source>Verification of Adaptive Systems</source>
          . Springer,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>F.</given-names>
            <surname>Chauvel</surname>
          </string-name>
          and
          <string-name>
            <surname>J.-M. Je</surname>
          </string-name>
          <article-title>´ze´quel, “Code generation from UML models with semantic variation points</article-title>
          ,
          <source>” in Model Driven Engineering Languages and Systems</source>
          . Springer,
          <year>2005</year>
          , pp.
          <fpage>54</fpage>
          -
          <lpage>68</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <given-names>D.</given-names>
            <surname>Balasubramanian</surname>
          </string-name>
          , C. S. Pa˘sa˘reanu,
          <string-name>
            <given-names>M. W.</given-names>
            <surname>Whalen</surname>
          </string-name>
          , G. Karsai, and
          <string-name>
            <given-names>M.</given-names>
            <surname>Lowry</surname>
          </string-name>
          , “
          <article-title>Polyglot: modeling and analysis for multiple statechart formalisms,” in ISSTA</article-title>
          . ACM,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>