lightweight model-driven engineering - gdr...

122
Lightweight Model-Driven Engineering Jordi Cabot @softmodeling jordicabot.com June 2017

Upload: others

Post on 23-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Lightweight Model-Driven Engineering

Jordi Cabot

@softmodeling – jordicabot.com June 2017

Page 2: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

About

Page 3: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

SOM Research LabSoftware runs the world. Models run the software

Page 4: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Nuestra misión

Interested in the broad area of systems and

software engineering, especially promoting the rigorous use of software

models and engineering principles in all software

engineering tasks.

Flickr/clement127

Page 5: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 6: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Disclaimer

Page 7: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

“As a writer, my job is to change your perspective and make you think

outside the box.” - Mary Sage Nguyen

Page 8: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Based on my background

▪ But keynote used as an excuse to reflect about

▪ Algú tirant-se a la piscina

Page 9: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 10: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

MDE Preliminaries

Page 11: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

• Grady Booch – history of softwre engineering

The entire history of software engineering is that of the rise in levels of abstraction

- Grady Booch

Goal: Write less and less codeto produce the same SW

Page 12: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Everybody is doing it

Page 13: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

MDE is just the logical next step

Page 14: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 15: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Model

Rapid prototyping

Static analysis

Code generation

Automated testing

Refactoring/Transformation

Documentation

[Illustration by Bernhard Rumpe]

MDE = Models as key elements in all aspects of Software Engineering

Page 16: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

The MDE equation

Models +

Transformations =

Software

Page 17: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Original

model1st

refinement

nth

refinement

Model-to-model Transformation

Model-to-text Transformation

...

Requirements

Use Case

Class Diagram

Java Project

Page 18: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

What is a model

18

City of Nantes = “system” to be modeled

A map is a model of this system

Its legend is the grammar/ metamodel

Different maps can focus on different “views” of the city

Page 19: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Not so different from languages

MDE Grammarware

MOF (metametamodel)

UML (metamodel)

ABank.uml

EBNF.g

Java.g

MyProgram.java

Page 20: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

(common-sense) code generation

Page 21: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

MDE benefits

+productivity +quality +Maintenance ….

2X – 8X 1.2X – 4X 80%

Page 22: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

http://matt.might.net/articles/phd-school-in-pictures

I’ll skip my over 500 “introductory” slides to MDE (but they are onine)

Page 23: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Lightweight adoption of MDE

Page 24: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

BUT he is saying

this since 1985

Page 25: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Is MDE dead?

Page 26: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

There is still money to be made on this market

Page 27: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Do you really think Agile has moremarket penetration?

Page 28: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

MDE Adoption

Page 29: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

• Asterix view : resistentes al modelado

Page 30: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 31: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

To model, or not to model, this is the WRONG question

- Shakespeare

Page 32: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

What/when/how many

models ?

- Depends on: Size,

Team, Domain,

Complexity

Real question

Page 33: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Why lightweight MDE

Page 34: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Even if MDE is not dead…

We can do

better

Increaseadoption

Focus onwhat

matters tousers

Not losingthe

perspective

Page 35: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

MDE Research vs Userneeds & interests

Page 36: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Nés papites que el papaOh great UML Spirit,

please grant methe insight to valuably

use the UML,the strength to

challenge its misuse,and the wisdom to see

the difference

Page 37: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

MetaModelers anonymousMetamodelers anonymous

Page 38: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

UML Fever + UML prayer

Page 39: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Operación bikini

Page 40: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Revisiting MDE under a ligthweight perspective

Page 41: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Lightweight application of MDE

Page 42: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Everything is a model

Page 43: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Models in real development processes

Page 44: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Agile Modeling

Page 45: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Collaboro: end-user driven DSL Development

• Providing means to discuss about language elements

• Overcoming technical barriers

Participation

• Suitable environment fostering end-user discussion

• Facilitating voting and decision processes

• Keeping traceability

Collaboration

Page 46: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Collaboro process

Page 47: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Discussing the abstract syntax

Page 48: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Discussing the concrete syntax

Page 49: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Representing collaborations

Page 50: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Lightweight learning of MDE

Page 51: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

MDE4EDU

Page 52: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 53: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 54: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 55: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

What can we learnfrom this? How to effectively teach

MDE?

Page 56: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 57: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

1st Attempt: Students as MDE devs

45h

MDE Foundations

MDE coretechnologies

DSLs M2M M2T

Methodologyand

Infrastructure

Exercises on building

new MDE artefacts

(e.g. a new modeling

language with code-

generation)

Too complicated – surviving mode

MDE as devs – unlikely role in practice

Page 58: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

2nd Attempt: Students as MDE users

45h

MDE FoundationsMDE core

technologiesMethodology and

Infrastructure

Case Study 1: Java – to – UML reverse

engineering

Caset Study 2: Code-generationof a CRUD web-

based app

CSs chosen to highlight the benefits of MDE

Page 59: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Better in theory – Blame the tools for the results

Lots of installation problems

Lack of optimization for the generated app

Tool crashes and corrupted projects

Lack of documentation

Difficult to customize the code

Page 60: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Blame the chosen examples

Maybe good for the database and back-end, not the front-end

This can already be done with current programming frameworks

Missing common pre-implemented patterns (login, social networks)

Difficult trade-off.

• Too expressive and people feel it’s a huge investment to learn

• Too simple and people don’t perceive the benefits

Page 61: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 62: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

• Start with a very compelling development scenario

• Change the requirements late in the development

• Use a repetitive scenario

• Compile a set of reference examples to give a kickstart

• Keep you target audience in mind

For instructors

• Document, document and document

• Hide all underlying technical details (also for errors)

• Offer a well-packaged and standalone installation

• Keep up with the trends in the software industry

• Favour trust over everything else

For tool vendors

Page 63: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

MDE4EDUhttps://mde4edu.github.io/

Page 64: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

PAPYRUS GAMIFICATION

Page 65: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

GAMIFICATION FRAMEWORK FOR END USERS - THE DSL

Page 66: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

GAMIFICATION FOR END USERS - THE TOOL

NOTIFICATIONS

SUBMIT FORMQUERY DEFINITIONS

GAME STATISTICS

https://github.com/SOM-Research/gamification-modeling-learning

Page 67: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Lightweight verification for MDE

Page 68: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

68

Original

model1st

refinement

nth

refinement

Model Transformation

Model Transformation

Source Code

...

MDE-based software development process

Errors in models breed and generate more errors in the code

Why model verification

Page 69: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Even “trivial” models can be wrong

Student

EnrolsIn20..*

Course

Likes

1

5 1

Page 70: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Person

name: string children

2

*

+ constraint : Nobody can be his own ancestor

parent

Page 71: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

71 © AtlanMod - [email protected]

….

.No finite (and non-empty) solution

Page 72: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Consistent?

Proven?

Formalism / Logics

• Dynamic Logic (KEY)

• High-Order Logics (HOL-OCL)

• Deductive database queries (CQC)

• SAT (Alloy + UML2Alloy), …

Translate

Prove

Deduce

UML model

Class diagram + OCL constraints

Typical solutions

Page 73: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

MDE

A Grand Challenge

Page 74: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Verification

Automation Efficiency

Expressiveness Precision(completeness)

Pick only 2-3

Page 75: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Our pragmatic approach: Bounded verification

75

Solution?

Constraint Satisfaction Problem

1. Variables – basic types + struct/list

2. Domains – finite

3. Constraints – Prolog

4. Property Additional Constraint

Translate

Solve

Deduce

Property?+Model Constraints

Page 76: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Resolution of the CSPDefine cardinality variablesConstraints on cardinalities

Assign cardinalities

Define attribute variables

Constraints on attributes

Assign attributesProof

Page 77: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

ATLTest (testing of M2M)

77

White-box approach: Analyzing the ATL code to derive test models that “exercise” it

Page 78: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Lightweight MDE tooling

Page 79: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Eclipse, Papyrus… are great for our community

OPEN SOURCE Part of eclipse

POWERFUL STABLE AND RELIABLE

WORLDWIDE USED

INDUSTRIAL-GRADE

Page 80: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Moving to the web: Back-end

Page 81: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Java

Environment

XMI

EMF-REST proposal

81

JAVASCRIPT

+

Web

Environment

JAVASCRIPT

+

REST API

EMF-REST

Page 82: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

EMF-REST proposal

82

Collaboration Scalability

Portability

Page 83: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

• Addressable resources– Eclipse: platform:/resource/project/Simpsons.xmi

– Web API: https://example.com/rest/Family/Simpsons

▪ Uniform and Constrained Interface & Statelessness‒ CRUD operations using HTTP verbs : POST, GET, PUT, DELETE

PUT https://example.com/rest/Family/Simpsons/parents/Homer

• Representation-oriented– JSON: {"family":{"address":"742 Evergreen Terrace",…}}

– XML: <family><address>742 Evergreen Terrace</address></family>

83

Page 84: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

NeoEMF

Page 85: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Moving to the web: Client-side

Page 86: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Towards Automatic Generation of Web-based Modeling Editors

Manuel Wimmer, Irene Garrigós, and Sergio Firmenich

ICWE 2017

Page 87: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

JavaScript client

87

Existing solution: IDE-based Modeling Editor

M2T

Java code

EuGENia GMFM2MM2T

Stencilcode

JointJs Runtime GMF Runtime

DSML Definition

Our contribution:Web-based Modeling Editor

Platform

Platform

▪ Model-to-Text (M2T) transformation to generate Stencils for the JointJSplatform from EuGENia annotated metamodels

Page 88: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Examples Web-based Editor

Page 89: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Show me only what I need to see

Page 90: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Lightweight MDE in other fields

Page 91: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Governance of open source projects

Page 92: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Code

Community

Page 93: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 94: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Governance of

open source

projects is not

explicit

Page 95: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

******

Page 96: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Project myProject {Roles: CommittersDeadlines: myDeadline : 7 days

Rules:myMajorityRule : Majority {

applied to Taskwhen TaskReviewpeople Committersrange PresentminVotes 3deadline myDeadline

}}

All the proposals for new development

tasks will be accepted or rejected in 7

days by the committers of the project.

Verbalization

Page 97: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 98: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Lightweight MdE for open data

Page 99: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

“the goal of the project is to

make the promise of

open data a reality by

giving non-technical

users tools they can use

to find and compose the

information they need”

Page 100: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

?

API Discovery: What APIs / open data sources?

Page 101: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

?

S1

S2S1 S2

¿Y cómo los puedo combinar?

Page 102: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

JSON Discoverer – Extracting implicitmodels in JSON documents

Page 103: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

JSON DiscovererThe advanced mode analyzes sets of JSON definitions and discover the common schema among them.

Page 104: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Open Data for All

Page 105: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

UML

IFML

GraphQLSchema

Page 106: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 107: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Lightweight Knowledge to use MDE

Page 108: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Cognification:

The application of knowledge to boost the performance and impact of a process

Page 109: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

During the industrial revolution, every machine got an electrified version

The next revolution is thecognificatinof everything via cheap access to specializedAIs

Page 110: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Co

gnif

icat

ion

ML

Crowdsourcing

Ontologies

Big Data

Page 111: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Cognifying MDE: 5 examples

Modeling bot as virtual assistant

Model inferences to discover schema of unstructured data

A code generator that mimicks a company programmingstyle

A real-time model reviewer

A morphing modeling tool that adapts to the user profile

Page 112: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 113: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

PhD thesis – CEA + SOMPhD Thesis: CEA + SOM

Page 114: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Final Thoughts: Research on Lightweight MDE

Page 115: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Most research papers on MDE are completelyirrelevant for (most) end-users

Category Theory for MT

ATL MapReduce

Temporal UML

Page 116: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Moreresearch on usefultopics!

Page 117: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

We live in a MDE multi-verse

We need to

develop domain-

specific MDEs to

better serve the

needs of users in

different domains

Page 118: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

"Publishing something in the most advanced journal doesn't change the world … What changes the world is converting research to something that is available in the market, pleases customers and improves the quality of life“ – Tharman. Deputy PM. Singapore

Page 119: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes
Page 120: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

GrandMDE at STAF’17

• Screenshot of the program

Page 121: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

http://modeling-languages.com

Page 122: Lightweight Model-Driven Engineering - GDR GPLgdr-gpl.cnrs.fr/sites/default/files/documentsGPL/JourneesNationales/GPL2017/... · Lack of optimization for the generated app Tool crashes

Get in

touch

[email protected]

@softmodeling