1 of 8

COMODO2

L. Andolfato

17/09/2020

2 of 8

Model Transformations

Model

  • Abstract (few details)
  • Platform Independent
  • Graphical or Textual
  • General Purpose or Domain Specific Language

Transformation

  • ModelToModel (M2M) or ModelToText (M2T)
  • Endogenous or Exogenous
  • Unidirectional or Bidirectional

Generated Artifacts

  • Concrete (more details)
  • Platform Dependent
  • Textual
  • General Purpose to be compiled or interpreted

Assumptions

3 of 8

Creating M2T Transformations

EELT INS Application Skeleton

STEP 1

Parse the model

Validate model (optional)

STEP 2

Extract/search information

STEP3

Replace in the templates the placeholders using information from the model, configuration, assumptions

There are specialized programming languages to

  • Validate Model: Check, …
  • Efficiently navigate models (graphs): Xtend, Xtend2, …
  • Write templates and replace placeholders: Xpand, Xtend2, Acceleo, JET, …

4 of 8

COMODO

  • Platform independent toolkit for model transformation to generate SCXML model and platform specific application skeleton.
  • It supports different target platforms: SCXML, ELT-RAD, VLT, ACS, Java+RabbitMQ, Java+JavaPathFinder

COMODO profile allows to model:

  • Modules and components
  • State Machines
  • Command and pub/sub Interfaces
  • Data structures
  • Deployment

5 of 8

Motivation for COMODO2

COMODO tool was developed using:

  • Application Structure and Config: plain Java
  • Model Transformation Workflow: MWE (interpreted DSL)
  • Model Representation: EMF (Ecore & UML2, Java)
  • Model Validation: Check (DSL transformed to Java)
  • Model Navigation: Xtend (DSL transformed to Java)
  • Templates: Xpand (DSL transformed to Java)

Xpand, Xtend, Check declared obsolete -> replaced by Xtend2 (a “better” Java)

MWE obsolete (since long) -> replaced by MWE2

6 of 8

COMODO2v1

Replaced Xpand, Xtend, Check with Xtend2 (~2 weeks for SCXML, MAL, RAD).

Model Validation: disabled

  • With Xtend2 (or Check), it is easy to validate the whole model.
  • Now the tendency is to work with large models but only few packages are for code generation -> we need to validate only some packages
  • Model Validation is more effective when Modeling (use MagicDraw validation rules)
  • Very few rules

Model Transformation Workflow: MWE -> MWE2

Model Navigation: Xtend -> Xtend2

Templates: Xpand -> Xtend2

COMODO Profile: minor changes for CII/MAL Exception + Types

7 of 8

COMODO2v2

Xtend2:

  • DSL on-the-fly transformed to Java and then compiled to jar (2 steps).
  • Xtend and Xtend2 require some learning (functional programming).
  • Generated Java code not optimal.

Model Validation: disabled

Model Transformation Workflow: MWE -> MWE2

Model Navigation: from Xtend -> Xtend2 -> Java (using directly Google Guava)

Templates: from Xpand -> Xtend2 -> Java + TemplateString (or multiline string)

COMODO Profile: minor changes for CII/MAL Exception

Replaced Xtend2 with Java (~1 week, still some work).

8 of 8

COMODO2

  • COMODO2 can be compiled and installed with “waf install” on ELT DevEnv
  • COMODO2 can be used within Eclipse (as it was the case for COMODO)

  • COMODO Profile is on MD Teamwork Cloud (Common Profiles and Libraries/comodoProfile)

  • COMODO2 supports the following target platforms:
    • SCXML (scxml-model.xml)
    • ELT-MAL (MAL-ICD.xml)
    • ELT-RAD (scxml-model.xml, MAL-ICD.xml, C++ RAD application)

Do we need support for other targets?