our research lines on model-driven engineering and software engineering

87
What we’re working on – Research lines on MDE and SE (March 2015 Edition) Inria Lillle March 2015 Jordi Cabot (and colleagues) [email protected] http://modeling-languages.com

Upload: jordi-cabot

Post on 15-Jul-2015

598 views

Category:

Software


2 download

TRANSCRIPT

What we’re working on –

Research lines on MDE and SE (March 2015 Edition)

Inria Lillle

March 2015

Jordi Cabot (and colleagues)

[email protected]

http://modeling-languages.com

Research in MDE

MDE = Model-Driven Everything

3

MDE(engineering)

MDSD(software development)

MDE

Pragmatic model verification

5© AtlanMod - atlanmod-contact@mines-

nantes.fr

The need for formal specifications

6

Employee

age: Integer

age > =18

Please no

underaged

employees!

alter = 21

e3:Employeee1:Employee

age = 17

e2:Employee

age = 37

7© AtlanMod - atlanmod-contact@mines-

nantes.fr

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

Student

EnrolsIn20..*

Course

Likes

1

5 1

• Spot the error

It’s not that easy…

Person

name: string children

2

*

+ constraint : Nobody can be his own ancestor

parent

10© AtlanMod - atlanmod-contact@mines-

nantes.fr

…..

No finite (and non-empty) solution

Consistent?

Proven?

Formalism / Logics

• Dynamic Logic (KEY)

• High-Order Logics (HOL-OCL)

• Deductive database queries (CQC)

• SAT (Alloy + UML2Alloy), …

Translate

Prove

Deduce

UML model

1. Class diagram

2. OCL constraints

Typical solutions

MDE

1E+18 scenarios for smallmodels (classes=10)

More than cells in the human body!!!

Verification

Automation Efficiency

Expressiveness Precision (e.g.

completeness)

Decide what to sacrifice

Our pragmatic approach

14 © AtlanMod - [email protected]

Solution?

Constraint Satisfaction Problem

1. Variables – basic types + struct/list

2. Domains – finite

3. Constraints – Prolog (+our OCL Prolog lib)

4. Property Additional Constraint

Translate

Solve

Deduce

Property?+

Model Constraints

Define cardinality variables

Constraints on cardinalities

Assign cardinalities

Define attribute variables

Constraints on attributes

Assign attributes

Proof

Resolution of the CSP

Trade-offs in verification

• Decidability/termination: isautomation possible? Yes

• Completeness: proof for any input?No, bounded verification

• Expressiveness: input language?UML class diagram + full static

OCL• Basic Property: Satisfiabililty

Exists? Post? Find legal

final state

Find legal

initial state

Inconsistent Model Proving

Example

UML Model

OCL

invariants

OCL

precondition

OCL

postcondition

Pre?

NO

YES

NO

YES

YES

NO

Verification of the Weak Executability Property

Also applied to

machine

op1NAC:

machine

LHS:

machine

op2RHS:

c :Class t :Tablec2t :Cl2Tb

namepersistent

name{new}

{new} {new}{new} {new}

ATLTest (testing of M2M)

18© AtlanMod - [email protected]

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

19© AtlanMod - atlanmod-contact@mines-

nantes.fr

Model-based testing

OCL analysis to improve the partitioning –EMFtoCSP to generate the test models

© AtlanMod - atlanmod-

[email protected]

To read more

• Carlos A. González, Jordi Cabot: Formal verification of static

software models in MDE: A systematic review. Information &

Software Technology 56(8): 821-838 (2014)

• Jordi Cabot, Robert Clarisó, Daniel Riera: On the verification

of UML/OCL class diagrams using constraint

programming. Journal of Systems and Software 93: 1-23

(2014)

DSLs

How? Existing tools

Existing tools

No support for DSLs

creation

Our proposal

Collaboro

Participation Collaboration

But… technically?

• 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

Abstract Syntax

Concrete Syntax

Example of DSL creation/improvement with

Collaboro

Participation Collaboration

Participation CollaborationTraceability

Example: after

Collaboro process

Discussing the abstract syntax

Discussing the concrete syntax

Representing collaborations

© AtlanMod - atlanmod-

[email protected]

To read more

• Javier Luis Cánovas Izquierdo, Jordi Cabot: Enabling the

Collaborative Definition of DSMLs. CAiSE 2013: 272-287

Very large models

EMF-REST: A REST API for your

models • 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>

43 © AtlanMod - [email protected]

Architecture of EMF-REST generated application

44 © AtlanMod - [email protected]

EMF

JAX-RS

EJB/CDI

JAXB OCL JPA

JavaScript

API

Browser

REST Client

Validation SecurityNavigation/

Operation

Content

format

Content management

Web ClientWeb Application

45© AtlanMod - atlanmod-contact@mines-

nantes.fr

Scalable persistence: NoSQL + Lazy loading

Sometimes you need to bypass the EMF API

© AtlanMod - atlanmod-

[email protected]

To read more

• Amine Benelallam, Abel Gómez, Gerson Sunyé, Massimo

Tisi, David Launay: Neo4EMF, A Scalable Persistence Layer

for EMF Models.ECMFA 2014: 230-241

• Abel Gómez, Massimo Tisi, Gerson Sunyé and Jordi Cabot.

Map-based transparent persistence for very large models.

FASE 2015, to appear

Core MDE

MoDisco: Legacy to Cloud

Pre-Migration(Feasibility

Assessment)

Migration(Reverse Engineering + Forward Engineering)

Post-Migration (Validation,

Certification)

Migration Artifacts Reuse & Evolution

Target Environment Specification

Target

Requirements

Target

Selection

CloudificationOptimization

Deployment

Business and Organizational aspects

MoDisco ATL Acceleo

CloudML

GoalML

UML

EPF GoalML fUML

50© AtlanMod - atlanmod-contact@mines-

nantes.fr

EMFViews

Model cModel b

Metamodel C

Runtime

Design time1

2

Viewpoint

(Metamodel)

View

(Model)

Metamodel B

Metamodel A

Model a

Viewpoint

Builder

(Virtualization)

View

Builder

(Virtualization)

Conforms to Conforms to

Weaving model

Weaving model

51© AtlanMod - atlanmod-contact@mines-

nantes.fr

Similarly for metamodel extensions

Research by MDE

(MDE techniques to solve SE

challenges)

Security

Reverse Eng. of firewall security policies

Cisco Metamodel

Unify firewall configuration languages (and semantics) for a global analysis

• Similar approach for databases, CMSs and Java web

clients

© AtlanMod - atlanmod-

[email protected]

To read more

• Salvador Martínez Perez, Joaquín García-Alfaro, Frédéric

Cuppens, Nora Cuppens-Boulahia, Jordi Cabot: Model-

Driven Extraction and Analysis of Network Security

Policies. MoDELS 2013: 52-68

• Salvador Martínez Perez, Valerio Cosentino, Jordi

Cabot, Frédéric Cuppens: Reverse Engineering of Database

Security Policies. DEXA (2) 2013: 442-449

Governance

OSS development

59© AtlanMod - [email protected]

How communities make decisions?

Majority? Unanimity?

Minimal participation level?

Depending on the phase? (proposals, comments, solution)

60© AtlanMod - [email protected]

Governance model is a challenge

61© AtlanMod - [email protected]

From a survey among OSS contributors :

– Understanding the governance model (e.g. who/when/how decides to accept a patch or include it in the next release) was very difficult (implicit, scattered,…)

– A clear view of this model would attract more contributors

Let’s help all OSS projects define their governance rules! (with MDE tools)

62© AtlanMod - [email protected]

Tool architecture

63© AtlanMod - [email protected]

Governance metamodel

64© AtlanMod - [email protected]

Example of our DSL syntax (a wizard-based tool to create the rules && a DSL-to-

English translation also available)

65© AtlanMod - [email protected]

Project myProject {Roles: CommittersDeadlines:

myDeadline : 7 daysRules:

myMajorityRule : Majority {applied to Taskwhen TaskReviewpeople Committersrange PresentminVotes 3deadline myDeadline

}}

© AtlanMod - atlanmod-

[email protected]

To read more

• Enabling the Definition and Enforcement of Governance

Rules in Open Source Systems. Javier L. Canovas

Izquierdo; Jordi Cabot. ICSE SEIS 2015, to appear

Software Analysis

Complex ecosystem: We are

human!!!

doc

code

support

request

question

bug

pull request

How Labels are usedTitle

Author

Description

Asignee

Status

Labels

Label Issues in GitHub

bug

duplicate

enhancement

help wanted

invalid

question

wontfix

Default labels

Label Issues in Github

Label Issues in Github

Label Issues in Github

GILA: What can labels teach you about your project?Three simple yet powerful visualizations to better understand WHO is doing WHAT

Label Usage

User

involvement

Label

timeline

Visualize the labels used in your

GitHub project, their frequency and how

they relate to each other

Discover the most active users and

contributors per label: who opens

them? who closes them?

Understand the typical evolution of

issues under each label: when are they

discussed?, solved?, etc.

What can issue labels teach you about your project?

Three simple yet powerful visualizations to better understand WHO is doing WHAT

Label Usage

User

involvement

Label

timeline

Visualize the labels used in your

GitHub project, their frequency and how

they relate to each other

Discover the most active users and

contributors per label: who opens

them? who closes them?

Understand the typical evolution of

issues under each label: when are they

discussed?, solved?, etc.

What can issue labels teach you about your project?

Three simple yet powerful visualizations to better understand WHO is doing WHAT

Label Usage

User

involvement

Label

timeline

Visualize the labels used in your

GitHub project, their frequency and how

they relate to each other

Discover the most active users and

contributors per label: who opens

them? who closes them?

Understand the typical evolution of

issues under each label: when are they

discussed?, solved?, etc.

What can issue labels teach you about your project?

Three simple yet powerful visualizations to better understand WHO is doing WHAT

Label Usage

User

involvement

Label

timeline

Visualize the labels used in your

GitHub project, their frequency and how

they relate to each other

Discover the most active users and

contributors per label: who opens

them? who closes them?

Understand the typical evolution of

issues under each label: when are they

discussed?, solved?, etc.

GitHub Analysis

GHTorrent

RQ1. Label Usage

How many labels are used in Github? How many labels are

used per project? What are the most popular ones?

RQ2. Label Influence

For those projects using labels, does its usage influence the

evolution of the project?

GiLA

Early Research Achievement

Can we detect group of labels commonly used together? Are

there label families?

Label Usage in GitHub

Using Labels122,012

3%

Not Using labels3,635,026

97%

Lesson: Labels are scarcely used in GitHub

Label Influence

26.93

46.18

74.92

101.3111.8

145.7

116.4127.2

116.4

70.4

306.4

148.1

22.53

43.51

48.76

53.2155.27 56.3

58.82 57.95 59.28

63.23

47.59

60.19

0

10

20

30

40

50

60

70

0

50

100

150

200

250

300

350

0 1 2 3 4 5 6 7 8 9 10 >10

# labels used in the project

Med. Time to solve % solved

On average, the percentage of solved labeled issues

tends to increase together with the number of labels

used in the project

It might come at the cost of taking more time to solve

those labeled issues

ρ = 0.80

ρ = 0.73

Detecting families

bug build

contributiondocumentation

duplicate

0 - backlog1 - ready

2 - working

3 - done

docs

enhancement

invalid

urgent

priority-highhigh-priority

priority-low

question

priority-medium

usability

component-logic

component-notyi

component-ui

priority-low

component-mode-perl

component-ui-gtk

frontend-gtkfrontend-pango

milestone

imported

0.0.1

0.0.1

0.0.3

1.0.0.rc1

0.2.0

0.5.01.0.0 update

type-cleanup

p1 p2

p3

taken

fixeddiscuss milestone-release0.4

milestone-release0.7

performance

medium-priority

usability

wontfix

new

type-ask

low-priority

Calculating the bus factor?“Number of key developers who would need to be

incapacitated (hit by a bus), to send the project into

such a disarray that it would not be able to proceed”

Why it is important?

Measuring the concentration of

information per developer

Assessing the employee

turnover risk

Why it is important?

Measuring the concentration of

information per developer

Assessing the employee

turnover risk

Identifying the key

developers in the project

Why it is important?

Measuring the concentration of

information per developer

Assessing the employee

turnover risk

Identifying the key

developers in the project

Identifying the developers

that can be lost

Our tool

Bus factor measurement Employee turnover simulation

© AtlanMod - atlanmod-

[email protected]

To read more

• Jordi Cabot, Javier Luis Canovas Izquierdo, Valerio

Cosentino and Belen Rolandi. Exploring the Use of Labels to

Categorize Issues in Open-Source Software Projects.

SANER’15

• Valerio Cosentino, Javier Luis Canovas Izquierdo and Jordi

Cabot. Assessing the Bus Factor of Git Repositories.

SANER’15