Skip to main content
Jump to: navigation, search




Watch the video (3'03)


Detailed script

The tutorial is based on a simplified version of a modeling tool that we have developed to pilot a Mindstorms Robot.


This Robot can execute a sequence of instructions to catch some objects on a playground.

The set of instructions, that we call a choreography, is composed of basic instructions such as going forward, rotating, grabing or releasing an object. A choreography can also be composed of several other choreographies.

To specify this instructions we can write a Java program and upload it into the EV3 module which equips the Robot.


The modeling tool that we are going to create allows to graphically specify exactly the same kind of choreography.


If you combine it with an Acceleo generator you can generate the corresponding Java source code. In this tutorial we will focus on the definition of the domain model and the creation of the graphical modeling tool.


Sirius and EMF basics

The domain model, that we will define with the Ecore language, allows the end user to create an EMF model which defines choregographies composed of instructions. This model is stored in a file having the mindstorms extension.


On top of the Mindstorms domain model we will use Sirius to create a graphical editor. This graphical editor will allow the end_user to visualize and edit a Mindstorms model. The graphical representations are stored in a specific file in order to separate the data from the views.


During this tutorial, we will use Obeo Designer, a free Eclipse package which includes Sirius and Ecore Tools. Once the domain model has been defined, we will launch a second Eclipse directly from the first one, by using a new Launch Configuration. It will simulate the deployment of the Domain Model and allow us to use it for defining and testing the modeling tool.


Sirius expressions syntaxes

Dynamic parts of a modeling tool created with Sirius require you to write expressions that will be evaluated at runtime.

Some of these expressions return model elements while others simply produce text.

Sirius proposes four main syntaxes to write these queries:

  • var:
    • allows Sirius to evaluate a variable
    • examples:
      • var:self
      • var:container
  • feature:
    • allows Sirius to evaluate an EMF feature (property or reference) on the current context
    • examples:
      • feature:name
      • feature:instructions
  • service:
    • allows Sirius to evaluate a Java method defined in a Class declared as an extension
    • examples:
      • service:getNextInstruction()
      • service:setNextInstruction(i)
  • aql:

Back to the top