Top Banner
1 Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time Dr. Benoit Combemale [email protected] http://www.irisa.fr/triskell/perso_pro/combemale With the help (and the slides) of: Jean-Marc Jézéquel, Olivier Barais, Brice Morin, and Gregory Nain
96

Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Jan 16, 2017

Download

Software

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

1

Hyper-Agility:

A Model-Driven Software Agility from Design-Time to Run-Time

Dr. Benoit Combemale [email protected]

http://www.irisa.fr/triskell/perso_pro/combemale With the help (and the slides) of:

Jean-Marc Jézéquel, Olivier Barais, Brice Morin, and Gregory Nain

Page 2: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Hyper-Agility:

A Model-Driven Software Agility from Design-Time to Run-Time

1

Dr. Benoit Combemale [email protected]

http://www.irisa.fr/triskell/perso_pro/combemale With the help (and the slides) of:

Jean-Marc Jézéquel, Olivier Barais, Brice Morin, and Gregory Nain

Page 3: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Hyper-Agility:

A Model-Driven Software Agility from Design-Time to Run-Time

1

Dr. Benoit Combemale [email protected]

http://www.irisa.fr/triskell/perso_pro/combemale With the help (and the slides) of:

Jean-Marc Jézéquel, Olivier Barais, Brice Morin, and Gregory Nain

Page 4: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Agile Software Development

2

Agile ( Software Development )

Page 5: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Agile Software

3

( Agile Software ) Development

Page 6: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Outline

4

• The Need for Hyper-Agility

• From Software Product-Lines (SPL) … … to Dynamic Adaptive Systems (DAS)

• (Aspect-Oriented) Modeling from Design to Runtime

• Models@Runtime to Support Dynamic Adaptation

Page 7: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Manifesto for Agile Software Development

• Individuals and interactions !over processes and tools • Working software !over comprehensive documentation • Customer collaboration !over contract negotiation • Responding to change !over following a plan

5

Page 8: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

The need for Agile Software @ Design Time

6

Page 9: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

The need for Agile Software @ Design Time

6

Page 10: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

The need for Agile Software @ Design Time

6

- Reutilisability - Durability

Page 11: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

The need for Agile Software @ Design Time

6

- Reutilisability - Durability

- Platform

Page 12: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

The need for Agile Software @ Design Time

6

- Reutilisability - Durability

- Platform

Time To Market!=> Large Scale Agile Development

Page 13: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

(A) Manifesto for Agile Software @ Design Time

• Individuals and interactions (over processes and tools) ➡ separation of concerns • Working software (over comprehensive documentation) ➡ early execution, validation & verification • Customer collaboration (over contract negotiation) ➡ domain-specific concept • Responding to change (over following a plan) ➡ automatic (re-)composition

7

Page 14: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

(A) Manifesto for Agile Software @ Design Time

• Individuals and interactions (over processes and tools) ➡ separation of concerns • Working software (over comprehensive documentation) ➡ early execution, validation & verification • Customer collaboration (over contract negotiation) ➡ domain-specific concept • Responding to change (over following a plan) ➡ automatic (re-)composition

7

➡ Technological Support for Agile Development!

Page 15: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Software Product Lines (SPL)

8

Page 16: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Software Product Lines (SPL)• Families of related software products

8

Page 17: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Software Product Lines (SPL)• Families of related software products• The products have a common part and a variable part

8

Page 18: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

...

Software Product Lines (SPL)

• color = {black}

• full keyboard, touch screen, stylus

• MMS

• GPS

• TCP/IP

• Internet calling

Nokia Product Line

Nokia 3710 Nokia 5230 Nokia 5800 Nokia N900

• color = {plum}

• keypad,large keys

• MMS

• GPS

• TCP/IP

• FM Radio

• color = {white,black}

• touch screen

• MMS

• GPS

• TCP/IP

• FM Radio

• color = {red, blue, black}

• keypad, touch screen, stylus

• MMS

• GPS

• TCP/IP

• FM Radio

• Families of related software products• The products have a common part and a variable part

8

Page 19: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

...

Software Product Lines (SPL)

• color = {black}

• full keyboard, touch screen, stylus

• MMS

• GPS

• TCP/IP

• Internet calling

Nokia Product Line

Nokia 3710 Nokia 5230 Nokia 5800 Nokia N900

• color = {plum}

• keypad,large keys

• MMS

• GPS

• TCP/IP

• FM Radio

• color = {white,black}

• touch screen

• MMS

• GPS

• TCP/IP

• FM Radio

• color = {red, blue, black}

• keypad, touch screen, stylus

• MMS

• GPS

• TCP/IP

• FM Radio

Common

features

• Families of related software products• The products have a common part and a variable part

8

Page 20: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

...

Software Product Lines (SPL)

Variable features:

• color

• input method

• radio

• Internet calling

• color = {black}

• full keyboard, touch screen, stylus

• MMS

• GPS

• TCP/IP

• Internet calling

Nokia Product Line

Nokia 3710 Nokia 5230 Nokia 5800 Nokia N900

• color = {plum}

• keypad,large keys

• MMS

• GPS

• TCP/IP

• FM Radio

• color = {white,black}

• touch screen

• MMS

• GPS

• TCP/IP

• FM Radio

• color = {red, blue, black}

• keypad, touch screen, stylus

• MMS

• GPS

• TCP/IP

• FM Radio

Common

features

• Families of related software products• The products have a common part and a variable part

8

Page 21: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

...

Software Product Lines (SPL)

Variable features:

• color

• input method

• radio

• Internet calling

• color = {black}

• full keyboard, touch screen, stylus

• MMS

• GPS

• TCP/IP

• Internet calling

Nokia Product Line

Nokia 3710 Nokia 5230 Nokia 5800 Nokia N900

• color = {plum}

• keypad,large keys

• MMS

• GPS

• TCP/IP

• FM Radio

• color = {white,black}

• touch screen

• MMS

• GPS

• TCP/IP

• FM Radio

• color = {red, blue, black}

• keypad, touch screen, stylus

• MMS

• GPS

• TCP/IP

• FM Radio

Common

features

• Families of related software products• The products have a common part and a variable part

8

Page 22: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010. 9

The need for Agile Software @ Run Time

Page 23: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

• Home-automation to help disabled people stay home • Aging society • Hospital have limited resources, rooms, etc

•"Very short stays

• Long stays very expensive for people and society • Houses, flats, etc should be equipped

• How do we produce a program for each of them: • Individuals and interactions • Working software • Customer collaboration • Responding to change

Example Application Domain

10

Page 24: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

EnTiMid : Integrating IoS & IoT (Grégory Nain PhD, cf. [ServiceWave ’08])

•OSGi based

•MDE centric

•Generative Approach

Controlling Boiler/Shutters from GoogleAgenda through a browser or an iPhone

11

Page 25: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Entimid

Cf demonstration at « fete de la science 2009 » http://www.irisa.fr/videos/fete-sciences-2009/

12

Page 26: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Entimid

Cf demonstration at « fete de la science 2009 » http://www.irisa.fr/videos/fete-sciences-2009/

12

Page 27: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Many Different Needs 1/2Pi

ctur

e fro

m h

ttp://

ww

w.ap

t.gc.

ca

•Living at home

•Motion troubles

•Memory loss

•Speaks French (only)

•Home equiped with :

•LonWorks (lights)

•Velux (shutters)

Mrs. Dupont

13

Page 28: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Many Different Needs 2/2

•English student

•Living at home

•He had an accident

•He likes technology

•Wheelchair equipped with remote access for:

•Lights and shutters (KNX)

•Multimedia (UPnP)

Pict

ure

from

http

://di

tww

w.ep

fl.ch

Mr. John Doe

14

Page 29: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

# Software Product Lines (SPL)

Their needs

Medical/technical staff should be able to

•Check their health state

•Check home configuration (shutters, lights, heaters…)

Both

Mrs. Dupont Mr. DoeSome daily tasks should be automated (motion troubles) or reminded (memory loss).

Would like to control everything remotely, with a unified protocol

15

Page 30: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

#Protocols ! Low-level protocols: KNX, X2D, X10, etc ! High-level protocols: http, UPnP, DPWS, etc

#Devices ! Lights, heaters, shutters, etc

#Web services !GoogleAgenda, skype, WeatherForecast, MSN !PaaS: Nurse as a Service, Food Delivery, Ooshop

#Adaptation to handicap/current health state ! Motion, memory, perception, etc

#Dynamic reconfiguration ➡ Dynamic Adaptable System

Different variability dimensions

16

Page 31: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

(A) Manifesto for Agile Software @ Run Time

17

• Individuals and interactions (over processes and tools) ➡ multiple variability dimensions • Working software (over comprehensive documentation) ➡ dynamic adaptation • Customer collaboration (over contract negotiation) ➡ user-driven dynamic adaptation • Responding to change (over following a plan) ➡ context-sensitive and safe dynamic adaptation

Page 32: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Outline

18

• The Need for Hyper-Agility

• From Software Product-Lines (SPL) … … to Dynamic Adaptive Systems (DAS)

• (Aspect-Oriented) Modeling from Design to Runtime

• Models@Runtime to Support Dynamic Adaptation

Page 33: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Autonomic Computing

Jeffrey O. Kephart, David M. Chess, "The Vision of Autonomic Computing", IEEE Computer, vol. 36, no. 1, pp. 41-50, Jan. 2003, doi:10.1109/MC.2003.1160055

19

Page 34: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Autonomic Computing

Jeffrey O. Kephart, David M. Chess, "The Vision of Autonomic Computing", IEEE Computer, vol. 36, no. 1, pp. 41-50, Jan. 2003, doi:10.1109/MC.2003.1160055

19

Page 35: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Towards more complex DAS

• Dynamic Adaptive Software (DAS) development: ! Adaptation logic often embedded into application logic ! Adaptation logic hard-coded using low-level APIs ! Readability, maintainability, and communication with other

stakeholder not easy • Exponential growth of possible configurations

! Convergence with Dynamic Software Product Lines

! N features, N tending to be larger and larger • 2N potential program configurations, 2N x (2N-1) transitions

20

Page 36: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

#Explosion of the number of possible configurations of Entimid ! 1014 possible configurations! " 1028 transitions!

#Dynamic Adaptation ! Evolution of the handicap ! No service interruption

• Rebooting the system cannot be a solution (lives depend on the system) #Reliability

! Safe migration path from a valid configuration to another valid configuration

! Performance issue (time) not critical

Challenging Example [ICSE’09]

21

Page 37: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Related works

22

Page 38: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Related works

Dynamic Adaptation

Reliability, Validation

Variability Management

U

22

Page 39: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Related works

B. Cheng et al.ICSE’06, AOSD’09

Dynamic Adaptation

Reliability, Validation

Variability Management

J. Whittle et al.MODELS’07

B. Morin et al.MODELS’08

S. Appel et al.ICSE’06 M. Mezini et al.

FSE’04

E. Figueiredo et al.ICSE’08

K. Czarnecki et al.

GPCE’06

P. David et al.

SC’06

F. Fleurey et al.

[email protected]’08

Hallsteinsen et al.

Computer’08

OSGi, Fractal,OpenCOM, etc

Garlan et al.Computer’04

UOreizy et al.ICSE’98

22

Page 40: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

#How to validate DAS? ! Specify everything!

• all the configurations: >1014 • all the transitions: ~1028

! Model checking, code generation

#Problems ! Explosion: Time consuming, error-prone ! Evolution of the system (not predicted)

• Stop all -> Evolve the specifications -> model check -> re-generate -> re-deploy

Validation VS Variability management…

23

Page 41: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

#How to manage dynamic variability? ! Do not focus on configurations!

• Write reconfiguration scripts, encapsulating « features » ! Depending on the context and/or user needs

• Choose the most adapted scripts • Executes all the selected scripts to dynamically adapt the system

#Problems ! Scripts written by hand (calls to reconfiguration API) ! Interactions, dependencies between scripts? ! Does the configuration (after executing scripts) make sense?

• Hopefully yes…

Validation VS Variability management…

24

Page 42: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

•Focus on variability, not on configurations

•Build (derive) configurations when needed • JIT, On demand at runtime, caching…

•Validate configurations before actual adaptation

•Automate the reconfiguration process

DSPL for Agile Software @ Run Time

25

Page 43: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Outline

26

• The Need for Hyper-Agility

• From Software Product-Lines (SPL) … … to Dynamic Adaptive Systems (DAS)

• (Aspect-Oriented) Modeling from Design to Runtime

• Models@Runtime to Support Dynamic Adaptation

Page 44: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010. 27

Naive Model Driven Engineering

Page 45: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010. 27

Modelling activity

Naive Model Driven Engineering

Page 46: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010. 27

Modelling activity

Naive Model Driven Engineering

Code Model

Page 47: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010. 27

Modelling activity

Naive Model Driven Engineering

Code Model

Page 48: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010. 27

Modelling activity

Naive Model Driven Engineering

Functionality

Code Model

Page 49: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010. 27

Modelling activity

Naive Model Driven Engineering

Safety

Reliability Security, survivability, robustness

Functionality

Code Model

Fault tolerance

Page 50: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010. 28

Aspect Oriented Model Driven Engineering

Page 51: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Distribution

Fault tolerance

Security

Functional behavior

Bookstate : StringUser

borrow

return

deliver

setDamaged

reserve

Use case model

Platform Model

Benoit Combemale (IRISA, Triskell), Oct. 2010. 28

Aspect Oriented Model Driven Engineering

Page 52: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Distribution

Fault tolerance

Security

Functional behavior

Bookstate : StringUser

borrow

return

deliver

setDamaged

reserve

Use case model

Platform Model

Benoit Combemale (IRISA, Triskell), Oct. 2010. 28

Aspect Oriented Model Driven Engineering

AOMDE = Pleonasm because

a Model is an Abstraction of an Aspect of Reality for a given Purpose

Page 53: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Distribution

Fault tolerance

Security

Functional behavior

Bookstate : StringUser

borrow

return

deliver

setDamaged

reserve

Use case model

Platform Model

Benoit Combemale (IRISA, Triskell), Oct. 2010. 28

Aspect Oriented Model Driven Engineering

Design Model

AOMDE = Pleonasm because

a Model is an Abstraction of an Aspect of Reality for a given Purpose

Page 54: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Distribution

Fault tolerance

Security

Functional behavior

Bookstate : StringUser

borrow

return

deliver

setDamaged

reserve

Use case model

Platform Model

Benoit Combemale (IRISA, Triskell), Oct. 2010. 28

Aspect Oriented Model Driven Engineering

Design Model

Code Model

AOMDE = Pleonasm because

a Model is an Abstraction of an Aspect of Reality for a given Purpose

Page 55: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Distribution

Fault tolerance

Security

Functional behavior

Bookstate : StringUser

borrow

return

deliver

setDamaged

reserve

Use case model

Platform Model

Benoit Combemale (IRISA, Triskell), Oct. 2010. 28

Aspect Oriented Model Driven Engineering

Design Model

Code Model

AOMDE = Pleonasm because

a Model is an Abstraction of an Aspect of Reality for a given Purpose

Page 56: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Distribution

Fault tolerance

Security

Functional behavior

Bookstate : StringUser

borrow

return

deliver

setDamaged

reserve

Use case model

Platform Model

Benoit Combemale (IRISA, Triskell), Oct. 2010. 28

Aspect Oriented Model Driven Engineering

Design Model

Code Model

AOMDE = Pleonasm because

a Model is an Abstraction of an Aspect of Reality for a given Purpose

Change one Aspect and Automatically Re-Weave: From AORE, SPL to DAS

Page 57: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Distribution

Fault tolerance

Security

Functional behavior

Bookstate : StringUser

borrow

return

deliver

setDamaged

reserve

Use case model

Platform Model

Benoit Combemale (IRISA, Triskell), Oct. 2010. 28

Aspect Oriented Model Driven Engineering

Design Model

Code Model

AOMDE = Pleonasm because

a Model is an Abstraction of an Aspect of Reality for a given Purpose

Change one Aspect and Automatically Re-Weave: From AORE, SPL to DAS

★ Supports about MDE available at http://www.irisa.fr/triskell/perso_pro/combemale/teaching/mde/★ Vincent Mahé, Benoit Combemale, Juan Cadavid, "Crossing Model Driven Engineering and Agility: Preliminary Thought on Benefits and Challenges", In 3rd Workshop on Model-Driven Tool & Process Integration, in conjunction with ECMFA'10, 2010.

Page 58: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Weaving Aspects: SmartAdapters (Brice Morin PhD)

• SmartAdapters: a generic framework for AOM !Built with Kermeta (a tool to build tools) !Can be adapted to different modeling languages • Aspect Model !What? ➡Advice model = model fragment

!Where? ➡Pointcut model = model fragment

!How? ➡Composition protocol = imperative script

29

Page 59: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Meta-code generator

code generator

Metamodel(conforms to MOF)

Aspect Model(conforms to Metamodel)

MOF(M3 Level)

Metamodel(M2 Level)

require require

Java EMF + Drools* code

produces produces

*Drools (JBoss Rules)

(meta-) metamodels

input(meta-)models

SmartAdapters @ Design Time

30

Page 60: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Meta-code generator

code generator

Metamodel(conforms to MOF)

Aspect Model(conforms to Metamodel)

MOF(M3 Level)

Metamodel(M2 Level)

require require

Java EMF + Drools* code

produces produces

*Drools (JBoss Rules)

(meta-) metamodels

input(meta-)models

Written in Kermeta/KET

SmartAdapters @ Design Time

30

Page 61: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Meta-code generator

code generator

Metamodel(conforms to MOF)

Aspect Model(conforms to Metamodel)

MOF(M3 Level)

Metamodel(M2 Level)

require require

Java EMF + Drools* code

produces produces

*Drools (JBoss Rules)

(meta-) metamodels

input(meta-)models

Written in Kermeta/KET

Visitor on the metamodel: - 2 passes for the pointcut - 2 passes for the advice

SmartAdapters @ Design Time

30

Page 62: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Java EMF +Drools code Runtime AOM

Weaver

In memory base model

In memory woven model

SmartAdapters @ Run Time

31

Page 63: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

!Adoption/Ease of Use ! " Directly rely on domain concepts (here, architecture)

!Expressiveness ! "Flexible pointcut language (model snippet) ! "Advice Sharing

!Performances ! " Compilation to Java/EMF + Drools ! " Weaving «in memory»

!Agility ! " Generative techniques

!Tool support ! " Integrated into DiVA Studio

AOM @ Run Time: Conclusion

32

Page 64: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Outline

33

• The Need for Hyper-Agility

• From Software Product-Lines (SPL) … … to Dynamic Adaptive Systems (DAS)

• (Aspect-Oriented) Modeling from Design to Runtime

• Models@Runtime to Support Dynamic Adaptation

Page 65: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Runningsystem

34

Page 66: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Model@runtime

Runningsystem

34

Page 67: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Model@runtime

Runningsystem

Metamodel

34

Page 68: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Device controllers

Light Shutter

Model@runtime

Runningsystem

Metamodel

EnTiMid

34

Page 69: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Device controllers

Light Shutter

Model@runtime

Runningsystem

Metamodel

EnTiMid Design-timeValidation

34

Page 70: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Device controllers

Light Shutter

Model@runtime

Runningsystem

EnTiMid Design-timeValidation

34

Page 71: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Device controllers

Light Shutter

Model@runtime

Runningsystem

EnTiMid

Pict

ure

from

http

://w

ww.

apt.g

c.ca

Had a flu last week

" stayed in bed

" a nurse every day

Design-timeValidation

34

Page 72: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Device controllers

Light Shutter

Targetconfiguration

Model@runtime

Runningsystem

EnTiMid

Pict

ure

from

http

://w

ww.

apt.g

c.ca

Had a flu last week

" stayed in bed

" a nurse every day

DerivationAOM

Design-timeValidation

34

Page 73: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Device controllers

Light Shutter

Targetconfiguration

Model@runtime

Runningsystem

EnTiMid

Pict

ure

from

http

://w

ww.

apt.g

c.ca

Had a flu last week

" stayed in bed

" a nurse every day

DerivationAOM

Design-timeValidation

Runtime Validation

34

Page 74: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Device controllers

Light Shutter

Targetconfiguration

Model@runtime

Runningsystem

EnTiMid

Pict

ure

from

http

://w

ww.

apt.g

c.ca

Had a flu last week

" stayed in bed

" a nurse every day

DerivationAOM

Design-timeValidation

Runtime Validation

ScriptGenerator

34

Page 75: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Device controllers

Light Shutter

Targetconfiguration

Model@runtime

Runningsystem

EnTiMid

Pict

ure

from

http

://w

ww.

apt.g

c.ca

Had a flu last week

" stayed in bed

" a nurse every day

Now in a better shape

DerivationAOM

Design-timeValidation

Runtime Validation

ScriptGenerator

34

Page 76: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Big picture

Device controllers

Light Shutter

Targetconfiguration

Model@runtime

Runningsystem

EnTiMid

Pict

ure

from

http

://w

ww.

apt.g

c.ca

Had a flu last week

" stayed in bed

" a nurse every day

Now in a better shape

DerivationAOM

Design-timeValidation

Runtime Validation

ScriptGenerator

34

Page 77: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Technical Approach

• Separating business and adaptation concerns

• AOM to analyse and reconfigure crosscutting features dynamically

• MDE to raise the level of abstraction • models at runtime, • model composition • automatic reconfiguration

35

Page 78: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

The running system

Generating reconfiguration scripts

36

Page 79: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Architecture Metamodel

- component, port, binding, etc- invariants

Reflection model (source)

Conforms to

The running system

Strong synchronizationintrospection + listeners

Generating reconfiguration scripts

36

Page 80: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Architecture Metamodel

- component, port, binding, etc- invariants

Reflection model (source)

Conforms to

The running system

Strong synchronizationintrospection + listeners

Reasoning

Context info.

Context model

Design- models

Generating reconfiguration scripts

36

Page 81: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Architecture Metamodel

- component, port, binding, etc- invariants

Reflection model (source)

Woven model (target)

Conforms to

The running system

Strong synchronizationintrospection + listeners

Reasoning

Context info.

Context model

Design- models

Generating reconfiguration scripts

36

Page 82: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Architecture Metamodel

- component, port, binding, etc- invariants

Reflection model (source)

Woven model (target)

Conforms to

The running system

Strong synchronizationintrospection + listeners

Validation

Reasoning

Context info.

Context model

Design- models

Generating reconfiguration scripts

36

Page 83: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Architecture Metamodel

- component, port, binding, etc- invariants

Reflection model (source)

Woven model (target)

Conforms to

Analyzer The running systemadapts

Strong synchronizationintrospection + listeners

Delayed synchronization

Validation

Reasoning

Context info.

Context model

Design- models

Generating reconfiguration scripts

36

Page 84: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Aspect Weaving and Validation

• N aspects " 2N possible programs ! Each aspect can be woven or not ! However, there are some constraint

• Design-time validation ! As much as possible, but not always possible due to combinatorial explosion ! Evolution of requirements, once the system is deployed prevent 100%

beforehand validation • Complemented with runtime validation

! Invariant checking, simulation, etc ! Performed on the model, not on the running system ! Possibly performed outside of the running system

37

Page 85: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Wrap-up

• The Need for Hyper-Agility

• From Software Product-Lines (SPL) … … to Dynamic Adaptive Systems (DAS)

• (Aspect-Oriented) Modeling from Design to Runtime

• Models@Runtime to Support Dynamic Adaptation

38

Page 86: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Handling Variability in DAS

• (D)SPL approach to tame !The combinatorial explosion of configurations !The quadratic explosion of transitions

• AOM to automatically build configuration !Runtime validation before adapting the running system ! Simple roll-back

• MDE to automate reconfiguration !Generation of safe reconfiguration scripts

39

Page 87: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Models@runtime

• Aspect as variability units raised at the model level ! No explicit representation of ALL possible configurations ! Configurations obtained by weaving most adapted aspects on demand

at runtime

• MDE for automation of model composition ! Model Based Validation, Generation of reconfiguration scripts

• Applications ! DiVA: Airport Crisis Management, CRM ! Home Automation for Dependent Persons

• Spin-off from INRIA/U. Rennes to leverage this technology…

Brice Morin, Olivier Barais, Jean-Marc Jézéquel, Franck Fleurey, Arnor Solberg, "Models@ Run.time to Support Dynamic Adaptation", IEEE Computer, vol. 42, no. 10, pp. 44-51, Oct. 2009, doi:10.1109/MC.2009.327

Brice Morin, Olivier Barais, Grégory Nain, and Jean-Marc Jézéquel, "Taming Dynamically Adaptive Systems with Models and Aspects", 31st International Conference on Software Engineering (ICSE'09), May 2009.

40

Page 88: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Conclusion

• Hyper-Agility !Agile (Software Development) + (Agile Software) Development

• Agile Software !Technological support for large-scale agile development

• AOMDE to tame software agility

41

Page 89: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Scientific objectives of Triskell: Combine formal methods & established practice

• Contracts and Aspects: from Requirements to Design to Runtime – Requirements by Contract, Analysis and

Design by Contract (inc. QoS) – Aspect-Oriented Requirements & Design – Integration of IoT &IoS

• Model-Based Testing – requirement based testing,

requirement validation – design based testing, design

validation

42

Page 90: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Scientific objectives of Triskell: Combine formal methods & established practice

• Contracts and Aspects: from Requirements to Design to Runtime – Requirements by Contract, Analysis and

Design by Contract (inc. QoS) – Aspect-Oriented Requirements & Design – Integration of IoT &IoS

• Model-Based Testing – requirement based testing,

requirement validation – design based testing, design

validation

Feed-back loop

42

Page 91: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Scientific objectives of Triskell: Combine formal methods & established practice

• Contracts and Aspects: from Requirements to Design to Runtime – Requirements by Contract, Analysis and

Design by Contract (inc. QoS) – Aspect-Oriented Requirements & Design – Integration of IoT &IoS

• Model-Based Testing – requirement based testing,

requirement validation – design based testing, design

validation

• Executable MetaModeling

– tools for building tools for building software • Eg an aspect weaver for weaving aspect at runtime to handle safe

dynamic adaption of complex system – Thanks to Kermeta this is not just meta-bla-bla

• It works for real! Have a look at http://www.kermeta.org/

Feed-back loop

42

Page 92: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Scientific objectives of Triskell: Combine formal methods & established practice

• Contracts and Aspects: from Requirements to Design to Runtime – Requirements by Contract, Analysis and

Design by Contract (inc. QoS) – Aspect-Oriented Requirements & Design – Integration of IoT &IoS

• Model-Based Testing – requirement based testing,

requirement validation – design based testing, design

validation

• Executable MetaModeling

– tools for building tools for building software • Eg an aspect weaver for weaving aspect at runtime to handle safe

dynamic adaption of complex system – Thanks to Kermeta this is not just meta-bla-bla

• It works for real! Have a look at http://www.kermeta.org/

Feed-back loop

42

Page 93: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Scientific objectives of Triskell: Combine formal methods & established practice

• Contracts and Aspects: from Requirements to Design to Runtime – Requirements by Contract, Analysis and

Design by Contract (inc. QoS) – Aspect-Oriented Requirements & Design – Integration of IoT &IoS

• Model-Based Testing – requirement based testing,

requirement validation – design based testing, design

validation

• Executable MetaModeling

– tools for building tools for building software • Eg an aspect weaver for weaving aspect at runtime to handle safe

dynamic adaption of complex system – Thanks to Kermeta this is not just meta-bla-bla

• It works for real! Have a look at http://www.kermeta.org/

Feed-back loop

42

Page 94: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Scientific objectives of Triskell: Combine formal methods & established practice

• Contracts and Aspects: from Requirements to Design to Runtime – Requirements by Contract, Analysis and

Design by Contract (inc. QoS) – Aspect-Oriented Requirements & Design – Integration of IoT &IoS

• Model-Based Testing – requirement based testing,

requirement validation – design based testing, design

validation

• Executable MetaModeling

– tools for building tools for building software • Eg an aspect weaver for weaving aspect at runtime to handle safe

dynamic adaption of complex system – Thanks to Kermeta this is not just meta-bla-bla

• It works for real! Have a look at http://www.kermeta.org/

Feed-back loop

42

Page 95: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

Benoit Combemale (IRISA, Triskell), Oct. 2010.

Scientific objectives of Triskell: Combine formal methods & established practice

• Contracts and Aspects: from Requirements to Design to Runtime – Requirements by Contract, Analysis and

Design by Contract (inc. QoS) – Aspect-Oriented Requirements & Design – Integration of IoT &IoS

• Model-Based Testing – requirement based testing,

requirement validation – design based testing, design

validation

• Executable MetaModeling

– tools for building tools for building software • Eg an aspect weaver for weaving aspect at runtime to handle safe

dynamic adaption of complex system – Thanks to Kermeta this is not just meta-bla-bla

• It works for real! Have a look at http://www.kermeta.org/

Feed-back loop

Team Members (1st Sept., 2010): 8 Faculty or INRIA members, 1 INRIA delegation, 2 Post-Doc, 15 PhD students, and 4 Temporary Engineers Scientific Leader: Jean-Marc Jézéquel (Prof., Univ. Rennes 1)

42

Page 96: Hyper-Agility: A Model-Driven Software Agility from Design-Time to Run-Time

MERCI !

43

Dr. Benoit Combemale [email protected]

http://www.irisa.fr/triskell/perso_pro/combemale With the help (and the slides) of:

Jean-Marc Jézéquel, Olivier Barais, Brice Morin, and Gregory Nain