Sign up & Download
Sign in

Model Driven Language Engineering with Kermeta

by Jean-marc Jézéquel, Olivier Barais, Franck Fleurey
Generative and Transformational (2011)

Cite this document (BETA)

Available from www.springerlink.com
Page 1
hidden

Model Driven Language Engineering with Kermeta

Model Driven Language Engineering with
Kermeta
Jean-Marc Jézéquel, Olivier Barais, and Franck Fleurey
INRIA & University of Rennes1
Campus Universitaire de Beaulieu
35042 Rennes CEDEX, France
Abstract. In many domains such as telecom, aerospace and automo-
tive industries, engineers rely on Domain Specific Modeling Languages
(DSML) to solve the complex issues of engineering safety critical soft-
ware. Traditional Language Engineering starts with the grammar of a
language to produce a variety of tools for processing programs expressed
in this language. Recently however, many new languages tend to be first
defined through metamodels, i.e. models describing their abstract syn-
tax. Relying on well tooled standards such as E-MOF, this approach
makes it possible to readily benefit from a set of tools such as reflexive
editors, or XML serialization of models. This article aims at showing
how Model Driven Engineering can easily complement these off-the-shelf
tools to obtain a complete environment for such a language, including
interpreter, compiler, pretty-printer and customizable editors. We illus-
trate the conceptual simplicity and elegance of this approach using the
running example of the well known LOGO programming language, de-
veloped within the Kermeta environment.
1 Introduction
In many domains such as telecom, aerospace and automotive industries [21],
engineers rely on Domain Specific Modeling Languages (DSML) to solve the
complex issues of engineering safety critical software at the right level of ab-
straction. These DSMLs indeed define modeling constructs that are tailored to
the specific needs of a particular domain. When such a new DSML is needed, it is
now often first defined through meta-models, i.e. models describing its abstract
syntax [14] when traditional language engineering would have started with the
grammar of the language. Relying on well tooled standards such as E-MOF, the
meta-modeling approach makes it possible to readily benefit from a set of tools
such as reflexive editors, or XML serialization of models. More importantly, hav-
ing such a tool supported de facto standard for defining models and meta-models
paves the way towards a rich ecosystem of interoperable tools working seamlessly
with these models and meta-models.
Combining this Model Driven approach with a traditional grammar based one
has however produced mixed results in terms of the complexity of the overall
approach. Several groups around the world are thus investigating the idea of a
J.M. Fernandes et al. (Eds.): GTTSE 2009, LNCS 6491, pp. 201–221, 2011.
c
© Springer-Verlag Berlin Heidelberg 2011
Page 2
hidden
202 J.-M. Jézéquel, O. Barais, and F. Fleurey
new Language Engineering completely based on models [22], that we call Model
Driven Language Engineering (MDLE).
In this paper we present one of these approaches, based on the Kernel Meta-
Modeling environment Kermeta [16,7]. We start in Section 2 by giving a quick
overview of executable meta-modeling, and then focusing on Kermeta, seen both
as an aspect-oriented programming language as well as an integration platform
for heterogeneous meta-modeling. We then recall in Section 3 how to model the
abstract syntax of a language in E-MOF, allowing for a direct implementation of
its meta-model in the Eclipse Modeling Framework (EMF). We then show how
to weave both the static and dynamic semantics of the language into the meta-
model using Kermeta to get an interpreter for the language. Then we address
compilation, which is just a special case of model transformation to a platform
specific model [17,3]. We illustrate the conceptual simplicity and elegance of
this approach using the running example of the well known Logo programming
language, for which a complete programming environment is concretely outlined
in this article, from the Logo meta-model to simulation to code generation for
the Lego Mindstorm platform and execution of a Logo program by a Mindstorm
turtle.
2 Executable Meta-modeling
2.1 Introduction
Modeling is not just about expressing a solution at a higher abstraction level
than code. This limited view on modeling has been useful in the past (assembly
languages abstracting away from machine code, 3GL abstracting over assembly
languages, etc.) and it is still useful today to get e.g.; a holistic view on a large
C++ program. But modeling goes well beyond that.
In engineering, one wants to break down a complex system into as many
models as needed in order to address all the relevant concerns in such a way
that they become understandable enough. These models may be expressed with
a general purpose modeling language such as the UML [26], or with Domain
Specific Modeling Languages (DSML) when it is more appropriate. Each of these
models can be seen as the abstraction of an aspect of reality for handling a given
concern. The provision of effective means for handling such concerns makes it
possible to establish critical trade-offs early on in the software life cycle.
Models have been used for long as descriptive artifacts, which was already ex-
tremely useful. In many cases we want to go beyond that, i.e. we want to be able
to perform computations on models, for example to simulate some behavior [16],
or to generate code or tests out of them [19]. This requires that models are no
longer informal, and that the language used to describe them has a well defined
abstract syntax (called its meta-model) and semantics.
Relying on well tooled Eclipse standards such as E-MOF to describe these
meta-models, we can readily benefit from a set of tools such as reflexive editors,
or XML serialization of models, and also from a standard way of accessing models

Sign up today - FREE

Mendeley saves you time finding and organizing research. Learn more

  • All your research in one place
  • Add and import papers easily
  • Access it anywhere, anytime

Start using Mendeley in seconds!

Already have an account? Sign in

Readership Statistics

8 Readers on Mendeley
by Discipline
 
 
by Academic Status
 
63% Ph.D. Student
 
38% Student (Master)
by Country
 
13% Colombia
 
13% Vietnam
 
13% Germany