frameworks to create language definitions and tools …scheidge/downloads/poster... · the textual...

1
TEF – Textual Model Notations and Editors [5] The Textual Editing Framework allows to create full fledged textual editors with all the features you are used to. Based on a simple notation descriptions, consisting of a context-free grammar and a Metamodel mapping, you easily create your own DSL editors: text editors real model editors that look like text editors text editors embedded in your graphical DSL editors created with GMF describe text editors with a sim- ple notation definition language embedded text editing EProvide - Prototyping Visual Interpreters and Debuggers [4] With EProvide, a user can prototype visual interpreters and debuggers for a new modelling language. For this, he de- fines the structural operational semantics as a QVT transfor- mation, extends the metamodel with concepts to represent the runtime state of models, and defines an editor for the extended metamodel with GMF. EProvide employs existing GMF editor creation technology and provides the necessary infrastructure to control, debug and visually animate execution of models. Visual Interpreter and Debugger + Metamodel transformation petri_sos(input:petri, output:petri) { // ... top relation produce { checkonly domain input place:Place{ src = trans:Transition{}, token = n:Integer{} }; enforce domain output place:Place{ token = n+1 }; when { fire(trans); trans.src -> excludes(place); } } top relation consume { checkonly domain input place:Place{ snk = trans:Transition{}, token = n:Integer{} }; enforce domain output place:Place{ token = n-1 }; when { fire(trans); trans.snk -> excludes(place); } } } Structural Operational Semantics as QVT Transformation Editor definition Sminco – Simulating and Compiling Models for Specific Target Platforms [3] Sminco allows to describe a modelling language’s execution semantics. It is based on bridging EMF and the Scheme programming language. Sminco provides three options to define the execution semantics: (1) a transformation of an EMF-based model to Scheme code (2) an interpreter that works on a Scheme representation of the EMF-based model (3) an interpreter that is implemented with operations in the language’s metamodel No matter which option the user chooses, Sminco allows to use the execution se- mantics description in two ways: (i) A model can be simu- lated in the development environment. A discrete- event simulation kernel allows to simulate multi- ple instances of a model with time dependencies, e.g. to simulate a distrib- uted system. (ii) A model can be com- piled for a target platform. Each option to define the execution semantics of a language results in a Scheme representation of models. After provid- ing bindings for the tar- get platform, e.g. access to special hardware, this representation can be compiled with standard compilers. Domain-Specific Model (iI) Compilation for a target platform (i) Simulation in the development environment Scheme representation (detection-warning (detection-time-filter (sta-lta (sensor-source) 1000 10000) 5000) 'ff) (1) (2) (3) Different possible translations Simulation results MMUnit – Automated Metamodel testing [6] The abstract syntax of a language can be defined with Metamodels. Metamodels contain errors. Nevertheless, they are not tested system- atically, which leads to late error detection and higher error correction effort. By testing the Metamodel of a language early, this effort can be saved. MMUnit supports early Metamodel testing with JUnit. It is based on a test Metamodel, whose instances describe positive and negative example models of the Metamodel under test. Test-Model A metamodel may contain errors. A testmodel specifies positive and negative example models. MMUnit Test Generator JUnit Tests MMUnit generates a JUnit Test for each example model. Metamodel tests can be executed in standard test infrastructure. Metamodel ECoral – Metamodel adaptation with co-adaptation of models [7,8] Usually, you adapt your Ecore metamodels manually in an ad-hoc fashion. With ECoral, you specify transformational adaptation in scripts, using a library of well-defined adaptation steps. Metamodel adaptation usually requires co-adaptation of models and model transformations. With ECoral, you control co-adaptation eas- ily. ECoral generates co-adaptation scripts for models and model transformations. Simply apply them, and your models and model transformations are compliant to your new metamodel. tools metamodel adaptation models co-adaptation generation templates QVT relations abstractions reuse ecore M3 Actions – Metamodels with Behaviour [1,2] M3Actions is a MOF extension to specify operational semantics of models. Main goal is dynamic model analysis of executable specifi- cations through simulation and test integration. Build on top of EMF/GMF, OCL and QVT the framework consists of a visual editor to define met- amodels, runtime models and their behaviour. An inter- preter and debugger supports the ex- ecution and testing of these models as well as recording of simulation runs. The overall framework provides a multi meta-layer view with an explicit instantiation concept where runtime models are regarded as instances of the abstract syntax, changing over time. With the help of QVT relations, we map between different levels of abstraction, e.g. to import parsed source code and create exectuable models. Introduction In today’s software engineering world, lan- guages are only as good as their supporting tools, and engineering processes are only as good as the languages used in them. New en- gineering paradigms, more domain specific engineering, and the general call for more ef- ficient software engineering cause a high de- mand for new programming and modelling languages including high quality language tools. The eclipse platform, especially the Eclipse Modelling Project [9] with EMF, QVT, GMF, EMFT, and MDT provides the ideal backbone for the generative development of languages and language tools. Over the last years, we developed a series of experimental frameworks based on EMF that enhance the possibilities to describe lan- guage in more detail and derive even better tools from these descriptions. These frameworks tackle all lan- guage aspects, from notations to semantics: we can write, execute, analyse, debug, refactor, test, and compile models for different target platforms. This poster shows a brief display of our work. References [1] Markus Scheidgen, Joachim Fischer: “Human Comprehen- sable and Machine Understandable Operational Semantics”, 3rd European Conference on MDA, 2007. [2] Michael Soden, Hajo Eichler: “An Approach to use Executable Models for Testing”, EMISA, 2007 [3] Daniel A. Sadilek: “Prototyping Domain-Specific Languages for Wireless Sensor Networks”, 4th International Workshop on Software Language Engineering, 2007. [4] EProvide: http://eprovide.sf.net [5] Textual Editing Framework: http://tef.berlios.de [6] MMUnit: http://mmunit.sf.net [7] Guido Wachsmuth: “Metamodel adaptation and model co- adaptation”, ECOOP, 2007. [8] ECoral: https://ecoral.sf.net [9] EclipseModelling Project: http://www.eclipse.org/model- ling Frameworks to Create Language Definitions and Tools on Top of the Eclipse Modelling Project Hajo Eichler, Daniel A. Sadilek, Markus Scheidgen, Michael Soden, Guido Wachsmuth, Stephan Weißleder structural view behavioural view execution “Eclipse Modelling Project in combination with our frameworks provides powerful facilities to create languages and their tools from head to toe”

Upload: vandang

Post on 13-May-2018

219 views

Category:

Documents


1 download

TRANSCRIPT

TEF – Textual Model Notations and Editors [5]

The Textual Editing Framework allows to create full fledged textual editors with all the features you are used to. Based on a simple notation descriptions, consisting of a context-free grammar and a Metamodel mapping, you easily create your own DSL editors:

text editors

real model editors that look like text editors

text editors embedded in your graphical DSL editors created with GMF

describe text editors with a sim-ple notation definition language

embedded text editing

EProvide - Prototyping Visual Interpreters and Debuggers [4]

With EProvide, a user can prototype visual interpreters and debuggers for a new modelling language. For this, he de-fines the structural operational semantics as a QVT transfor-mation, extends the metamodel with concepts to represent the runtime state of models, and defines an editor for the extended metamodel with GMF.

EProvide employs existing GMF editor creation technology and provides the necessary infrastructure to control, debug and visually animate execution of models.

Visual Interpreter and Debugger

+

Metamodel

transformation petri_sos(input:petri, output:petri) {

// ...

top relation produce { checkonly domain input place:Place{

src = trans:Transition{}, token = n:Integer{} };

enforce domain output place:Place{ token = n+1 }; when { fire(trans); trans.src -> excludes(place); }

}

top relation consume { checkonly domain input place:Place{

snk = trans:Transition{}, token = n:Integer{} };

enforce domain output place:Place{ token = n-1 }; when { fire(trans); trans.snk -> excludes(place); }

} }

Structural Operational Semantics as QVT

Transformation

Editor definition

Sminco – Simulating and

Compiling Models for Specific Target Platforms [3]

Sminco allows to describe a modelling language’s execution semantics. It is based on bridging EMF and the Scheme programming language. Sminco provides three options to define the execution semantics:(1) a transformation of an EMF-based model to Scheme code

(2) an interpreter that works on a Scheme representation of the EMF-based model

(3) an interpreter that is implemented with operations in the language’s metamodel

No matter which option the user chooses, Sminco allows to use the execution se-mantics description in two ways:(i) A model can be simu-lated in the development environment. A discrete-event simulation kernel allows to simulate multi-ple instances of a model with time dependencies, e.g. to simulate a distrib-uted system.

(ii) A model can be com-piled for a target platform. Each option to define the execution semantics of a language results in a Scheme representation of models. After provid-ing bindings for the tar-get platform, e.g. access to special hardware, this representation can be compiled with standard compilers.

Domain-Specific Model

(iI) Compilation for a target platform

(i) Simulation in the development environmentScheme representation

(detection-warning (detection-time-filter (sta-lta (sensor-source) 1000 10000) 5000) 'ff)

(1) (2) (3) Different possible translations

Simulation results

MMUnit – Automated Metamodel testing [6]

The abstract syntax of a language can be defined with Metamodels. Metamodels contain errors. Nevertheless, they are not tested system-atically, which leads to late error detection and higher error correction effort. By testing the Metamodel of a language early, this effort can be saved. MMUnit supports early Metamodel testing with JUnit. It is based on a test Metamodel, whose instances describe positive and negative example models of the Metamodel under test.

Test-Model

A metamodel may contain errors.

A testmodel specifiespositive and negative

example models.

MMUnit Test GeneratorJUnit Tests

MMUnit generates a JUnit Testfor each example model.

Metamodel tests can be executedin standard test infrastructure.

Metamodel

ECoral – Metamodel adaptation with co-adaptation of models [7,8]

Usually, you adapt your Ecore metamodels manually in an ad-hoc fashion. With ECoral, you specify transformational adaptation in scripts, using a library of well-defined adaptation steps.

Metamodel adaptation usually requires co-adaptation of models and model transformations. With ECoral, you control co-adaptation eas-ily. ECoral generates co-adaptation scripts for models and model transformations. Simply apply them, and your models and model transformations are compliant to your new metamodel.

tools

metamodeladaptation

modelsco-adaptation

generation

templates

QVT relations

abstractions

reuse

ecore

M3 Actions – Metamodels

with Behaviour [1,2]

M3Actions is a MOF extension to specify operational semantics of models. Main goal is dynamic model analysis of executable specifi-cations through simulation and test integration.

Build on top of EMF/GMF, OCL and QVT the framework consists of a visual editor to define met-

amodels, runtime models and their behaviour. An inter-preter and debugger supports the ex-ecution and testing of these models as well as recording of simulation runs. The overall framework provides a multi meta-layer view with an explicit instantiation concept where runtime models are regarded as instances of the abstract syntax, changing over time.

With the help of QVT relations, we map between different levels of abstraction, e.g. to import parsed source code and create exectuable models.

IntroductionIn today’s software engineering world, lan-guages are only as good as their supporting tools, and engineering processes are only as good as the languages used in them. New en-gineering paradigms, more domain specific engineering, and the general call for more ef-ficient software engineering cause a high de-mand for new programming and modelling languages including high quality language tools. The eclipse platform, especially the Eclipse Modelling Project [9] with EMF, QVT, GMF, EMFT, and MDT provides the ideal backbone for the generative development of languages and language tools. Over the last years, we developed a series of experimental frameworks based on EMF that enhance the possibilities to describe lan-guage in more detail and derive even better tools from these descriptions. These frameworks tackle all lan-guage aspects, from notations to semantics: we can write, execute, analyse, debug, refactor, test, and compile models for different target platforms. This poster shows a brief display of our work.

References[1] Markus Scheidgen, Joachim Fischer: “Human Comprehen-sable and Machine Understandable Operational Semantics”, 3rd European Conference on MDA, 2007.

[2] Michael Soden, Hajo Eichler: “An Approach to use Executable Models for Testing”, EMISA, 2007

[3] Daniel A. Sadilek: “Prototyping Domain-Specific Languages for Wireless Sensor Networks”, 4th International Workshop on Software Language Engineering, 2007.

[4] EProvide: http://eprovide.sf.net

[5] Textual Editing Framework: http://tef.berlios.de

[6] MMUnit: http://mmunit.sf.net

[7] Guido Wachsmuth: “Metamodel adaptation and model co-adaptation”, ECOOP, 2007.

[8] ECoral: https://ecoral.sf.net

[9] EclipseModelling Project: http://www.eclipse.org/model-ling

Frameworks to Create Language Definitions and Tools on Top of the Eclipse Modelling Project

Hajo Eichler, Daniel A. Sadilek, Markus Scheidgen, Michael Soden, Guido Wachsmuth, Stephan Weißleder

structural view

behavioural view

execution

“Eclipse Modelling Project in

combination with our frameworks provides powerful facilities to create

languages and their tools from head to toe”