SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
Olivier Le Goaër
olivier.legoaer@univ-pau.fr
Séminaire LIRMM
Montpellier, 30/09/2016
Executable modelingExecutable modeling
&&
dynamic adaptationdynamic adaptation
2/31
A short bioA short bio
 Positions
● Ph.D in 2009 – AeLoS team, LINA
● Associate Professor since 2010 – MOVIES team, LIUPPA
 Research topics
● Software Evolution/Adaptation
● Software Architecture
● Model-Driven Engineering
 Hobbies
● Mobile technologies
● Web technologies
3/31
Domain-specific languages (DSL)Domain-specific languages (DSL)
 General Purpose Languages
● Not targeted to a particular kind of problem, but to any kinds of
software problem
 Domain-Specific Languages
● Targeted to a particular kind of problem
– with dedicated notations (textual or graphical), support (editor, checkers, etc.)
● Promises: more « efficient » languages for resolving a set of
specific problems in a domain
● Each concern described in its own language
– For software developpers (modeling, programming, querying, building,
documenting, ...), for software architects (ADL), for statisticians (R), for biologists, for
sociologists, ...
4/31
Shapes for a DSLShapes for a DSL
 Internal
● Hosted by a
GPL
 External
● Stand-alone
 Implicit
● API-like
C# & Linq SQL Querydsl SQL
Java API
QCustomer customer;
customer = new QCustomer("c");
SQLQuery<?> query =
new SQLQuery<Void>(connection);
List<String> lastNames =
query.select(customer.lastName)
.from(customer)
.where(customer.firstName.eq("Bob"))
.fetch();
System.out.print(lastNames);
SELECT lastName
FROM customer
WHERE firstName = 'Bob';
var queryBobCustomers =
from cust in customer
where cust.firstName == "Bob"
select cust.lastName;
foreach (var n in queryBobCustomers)
{
Console.WriteLine(n);
}
5/31
Shapes for a DSLShapes for a DSL
 Internal
● Hosted by a
GPL
 External
● Stand-alone
 Implicit
● API-like
C# & Linq SQL Querydsl SQL
Java API
QCustomer customer;
customer = new QCustomer("c");
SQLQuery<?> query =
new SQLQuery<Void>(connection);
List<String> lastNames =
query.select(customer.lastName)
.from(customer)
.where(customer.firstName.eq("Bob"))
.fetch();
System.out.print(lastNames);
SELECT lastName
FROM customer
WHERE firstName = 'Bob';
var queryBobCustomers =
from cust in customer
where cust.firstName == "Bob"
select cust.lastName;
foreach (var n in queryBobCustomers)
{
Console.WriteLine(n);
}
6/31
Models are taking a new roleModels are taking a new role
« marauders map » – Harry Potter
Model playing a static role
(design-time)
Model playing a dynamic role
(run-time)
● Tells us about the
structure of the castle
(every classroom,
every hallway, and
every corner)
● Tells us about moving
persons (shows foot
prints)
7/31
Crossing the demarcation lineCrossing the demarcation line
Model of a
system
(conforms to a
metamodel)
S
Running
system
IN
TER
PR
ETATIO
N
Running system
=
model under execution
Design-time
Run-time
C
O
M
PILATIO
N
</xml>
sub{ }
MDA ®
MM
exec(M)exec(M)
8/31
Executable modeling (xModeling)Executable modeling (xModeling)
 Compilation
● Translational semantics
– Code generation in a target language
 Direct execution (~VM/interpreter)
● Operational semantics
– Using an « action » language
– Using a M2M transformation (rare in practice)
 Breathing life into models
● Simulation, V&V, rapid prototyping...
● Ultimately, skip the implementation stage !
9/31
Controversies and debatesControversies and debates
 Executable models "can be run, tested,
debugged, and measured for performance"
 UML / fUML as prominent examples
● Is a class diagram executable? Alone ?
● Is a paquage diagram executable?
● Is a sequence diagram executable?
 Raises the question of an executable nature
● Behavior of a software system captured by a model M
● Ability to define a current execution state within M
● Ability to compute the next state (aka « step ») within M
10/31
xModeling built with MDExModeling built with MDE
 Meta-models are just a specific OO data
structures to represent abstract syntax trees
● Operational semantics = computation steps and runtime data
● A VM/interpreter is a program working with such AST and that
implements a given operational semantics
 Executable metamodeling
● xMOF (eXecutable MOF)
● Kermeta
● Ecore + body of operation(s) written Java/EMF
● …
11/31
xModeling's componentsxModeling's components
Abstract Syntax
Metamodel
+
Well-formedness rules
Concrete Syntax
Graphical or textual
Semantics
How it behaves at runtime ?
12/31
Modeling with StatechartsModeling with Statecharts
--The instance of the finite state machine is unique (root)
context StateMachine inv singleStateMachine:
StateMachine.allInstances()->size() = 1 and self.container.oclIsUndefined()
--All the states are included in composites except the finite state machine herself
context State inv containerForAllStates:
not self.oclIsTypeOf(StateMachine) implies not self.container.oclIsUndefined()
13/31
Train Cruise Control ModelTrain Cruise Control Model
14/31
xModeling with StatechartsxModeling with Statecharts
runToCompletion()
isActive:boolean
0..1
lastKnownActiveState
-- When an history state exists and references a state, the latter must belongs to the composite
context CompositeState inv historyInComposite:
if self.historyState.oclIsUndefined()
then true
else
if self.historyState.referencedState.oclIsUndefined()
then true
else self.states->includes(self.historyState.lastKnownActiveState)
endif
endif
15/31
xModeling with StatechartsxModeling with Statecharts
runToCompletion()
isActive:boolean
0..1
lastKnownActiveState
-- When an history state exists and references a state, the latter must belongs to the composite
context CompositeState inv R3:
if self.historyState.oclIsUndefined()
then true
else
if self.historyState.referencedState.oclIsUndefined()
then true
else self.states->includes(self.historyState.lastKnownActiveState)
endif
endif
//operationnal semantics of UML2
aspect class StateMachine {
operation runToCompletion(e : Event)
is do
// suivre la transition trouvée en activant l'état
// cible et en modifiant en conséquence la hiérarchie d'états actifs
end
}
//operationnal semantics of UML2
aspect class StateMachine {
operation runToCompletion(e : Event)
is do
// suivre la transition trouvée en activant l'état
// cible et en modifiant en conséquence la hiérarchie d'états actifs
end
}
16/31
Running system = exec(Model)Running system = exec(Model)
17/31
Model@run.timeModel@run.time
 Overloaded term
● Deals originally with software
adaptation issues at runtime
 Advantage
● Provides a reasoning support
on a running system
 Drawback
● Holding a causal link: M has to
remain the strict reflect of S
MM
SS
adaptation ?
représentation modification
Adaptation
loop
18/31
Model@run.time + xModelingModel@run.time + xModeling
 Treats the specific case where the considered
running system is a model under execution
 Idea : collapsing the adaptation loop
● Solves the causal link issue...
● ...but the merge may leads to a burdened model M''
M
S = exec(M')S = exec(M')
adaptation ?
représentation modification S = exec(M'')
adaptation ?
modification
collapse
19/31
Non-supervised adaptation (self-*)Non-supervised adaptation (self-*)
 Detect a situation requiring adaptation
● Known versus unknown context (e.g. a new signal)
– Green runtime event is sometimes ignored (designer's choice at design-time)
– White runtime event is actually unknown at design-time
 Perform adaptation actions
● CRUD operators on any runtime data
 Metamodel specialization unlocks adaptation
● Model (sub)typing : adding new metaclasses and new constraints
– Adding new operations accordingly : for (a) detect and (b) perform
● Choosing the right level of specialization is tactful
– Domain adaptations are rare but apply on any model instance of the metamodel
– Business adaptations are frequent but only apply on some models
20/31
Subtyped Cruise Control ModelSubtyped Cruise Control Model
com
pleteness
tagged
value
+
Consistency
21/31
Dynamic adaptation of the modelDynamic adaptation of the model
22/31
Adaptable xModelingAdaptable xModeling
RunToCompletion()*
-- Each state must be associated to a transition for each identified event
context State def: knownEvents : Set(String) = Set{...};
context State inv Completeness:
self.knownEvents -> forAll( e | self.existsTransitionFor(e))
-- A transition tagged with {p, v} leads to a state also tagged with with {p, v}
context StateMachine inv Consistency:
...
...
23/31
Adaptable xModelingAdaptable xModeling
RunToCompletion()*
-- Each state must be associated to a transition for each identified event
context State def: knownEvents : Set(String) = Set{...};
context State inv Completeness:
self.knownEvents -> forAll( e | self.existsTransitionFor(e))
-- A transition tagged with {p, v} leads to a state tagged with with {p, v}
context StateMachine inv Consistency:
...
...
//adaptation operational semantics
aspect class StateMachine {
operation runToCompletion(e : Event)
is do
if not e.isKnown() then
//introduces the new state and transitions thereof
end
//same as usual (nominal behavior)
end
}
//adaptation operational semantics
aspect class StateMachine {
operation runToCompletion(e : Event)
is do
if not e.isKnown() then
//introduces the new state and transitions thereof
end
//same as usual (nominal behavior)
end
}
aspect class Event {
operation isKnown() : Boolean
is do
//checks if an event is unknown or not
end
}
aspect class Event {
operation isKnown() : Boolean
is do
//checks if an event is unknown or not
end
}isKnown()*
24/31
From craft to engineering with MDEFrom craft to engineering with MDE
Modeling
xModeling
Adaptable
xModeling
Metamodel (static)
+ [exec. translational semantics]
Metamodel (static + dynamic)
+ exec. operational semantics
Metamodel (static + dynamic + adaptative) +
adapt. operational semantics
25/31
Adaptation extends executionAdaptation extends execution
 Execution semantics
● Deals with the nominal behavior (known context)
● Operation(s) only apply on the dynamic part (the static part is on
read-only mode)
 Adaptation semantics
● Is-a-kind-of execution semantics
● Deals with extra-ordinary situation (unknown context)
● Operation(s) may apply on all parts (static, dynamic, adaptation)
 The two kinds of semantics are mixed
26/31
Implementation ChoicesImplementation Choices
 Classic programming
● Adaptation is tangled into execution
 OO programming
● Adaptation overrides execution (and calls « super »)
 Contract-based programming
● Adaptation occurs when a precondition of execution is violated
 Aspect-oriented programming
● Adaptation is woven into execution
 xModeling !
● Adaptation is modeled with a DSL and calls back to execution
27/31
xModeling built without MDExModeling built without MDE
 PauWare engine (www.pauware.com)
● Execution engine (VM) for statechart models
● Implements the complete UML2 execution semantics specification
● API written in Java (hence ported effortlessly to Android)
JavaJava
PauWare APIPauWare API
Code/xml that describes the
statechart model to be loaded
Engine that executes the model
loaded (« run-to-completion »)
Free implementation of
the actions
(called by reflection from the engine)
Consumes an
event for each
execution step
28/31
Android + PauWareAndroid + PauWare
SERVICE
BROADCAST
RECEIVER
Android OS
ANDROID
CONNECTOR
e1/foo
e1
public void foo() {
//do something
}
public void bar() {
//do other thing
}
A statechart model
runs-to-completion
starts invokes
PauWare
Execution
Engine
Java
xmi
scxml
29/31
Supervised adaptationSupervised adaptation
 Ability to load a new model on-the-fly
● A model is just a runtime data taken as input of the engine
● Actions' implementation have to stay unchanged
SERVICE
BROADCAST
RECEIVER
Android OS
ANDROID
CONNECTOR
events
runs-to-completion
starts invokes
PauWare
Execution
Engine
Model
Server
Google
Cloud
Messaging
Push
Notification
Fresh data retrieval
Adapter
e1/foo
public void foo() {
//do something
}
public void bar() {
//do other thing
}
30/31
World Wide Modeling (wwm)World Wide Modeling (wwm)
 MDE-specific URI
● model://host[:port]/M3/M2/M1
– model://localhost/Ecore/UML2/train
– model://localhost/Ecore/OCL/
 Commands
● model://host/M3?list
● model://host/M3/M2?info
● model://host/M3/M2/M1#fragment
 Getting started (requires )
● $> npm install wwm
● JavaScript API for client-side and server-side programming
31/31
Thank you for your attentionThank you for your attention
?

Weitere ähnliche Inhalte

Was ist angesagt?

Standards-Based Executable UML: Today's Reality and Tomorrow's Promise
Standards-Based Executable UML: Today's Reality and Tomorrow's PromiseStandards-Based Executable UML: Today's Reality and Tomorrow's Promise
Standards-Based Executable UML: Today's Reality and Tomorrow's PromiseEd Seidewitz
 
Model-Driven Engineering: a bottom-up approach based on meta-programming (ELA...
Model-Driven Engineering: a bottom-up approach based on meta-programming (ELA...Model-Driven Engineering: a bottom-up approach based on meta-programming (ELA...
Model-Driven Engineering: a bottom-up approach based on meta-programming (ELA...Jean-Michel Bruel
 
An Introduction To C++Templates
An Introduction To C++TemplatesAn Introduction To C++Templates
An Introduction To C++TemplatesGanesh Samarthyam
 
OOP in C++
OOP in C++OOP in C++
OOP in C++ppd1961
 
A Unified View of Modeling and Programming
A Unified View of Modeling and ProgrammingA Unified View of Modeling and Programming
A Unified View of Modeling and ProgrammingEd Seidewitz
 
C++ Programming Course
C++ Programming CourseC++ Programming Course
C++ Programming CourseDennis Chang
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#sudipv
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSkills Matter
 
Peyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_futurePeyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_futureTakayuki Muranushi
 
Cling the llvm based interpreter
Cling the llvm based interpreterCling the llvm based interpreter
Cling the llvm based interpreterRoberto Nogueira
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questionsadarshynl
 
Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++KurdGul
 
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...corehard_by
 

Was ist angesagt? (20)

Standards-Based Executable UML: Today's Reality and Tomorrow's Promise
Standards-Based Executable UML: Today's Reality and Tomorrow's PromiseStandards-Based Executable UML: Today's Reality and Tomorrow's Promise
Standards-Based Executable UML: Today's Reality and Tomorrow's Promise
 
Model-Driven Engineering: a bottom-up approach based on meta-programming (ELA...
Model-Driven Engineering: a bottom-up approach based on meta-programming (ELA...Model-Driven Engineering: a bottom-up approach based on meta-programming (ELA...
Model-Driven Engineering: a bottom-up approach based on meta-programming (ELA...
 
An Introduction To C++Templates
An Introduction To C++TemplatesAn Introduction To C++Templates
An Introduction To C++Templates
 
OOP in C++
OOP in C++OOP in C++
OOP in C++
 
Deep C
Deep CDeep C
Deep C
 
Acceleo Code Generation
Acceleo Code GenerationAcceleo Code Generation
Acceleo Code Generation
 
C programming
C programmingC programming
C programming
 
Baiscs of OpenGL
Baiscs of OpenGLBaiscs of OpenGL
Baiscs of OpenGL
 
A Unified View of Modeling and Programming
A Unified View of Modeling and ProgrammingA Unified View of Modeling and Programming
A Unified View of Modeling and Programming
 
C++ Programming Course
C++ Programming CourseC++ Programming Course
C++ Programming Course
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelism
 
Peyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_futurePeyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_future
 
Eugenia
EugeniaEugenia
Eugenia
 
Cling the llvm based interpreter
Cling the llvm based interpreterCling the llvm based interpreter
Cling the llvm based interpreter
 
C#
C#C#
C#
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
 
Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++
 
pyton Exam1 soln
 pyton Exam1 soln pyton Exam1 soln
pyton Exam1 soln
 
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...
 

Andere mochten auch

Les Web Services en 60 diapos chrono !
Les Web Services en 60 diapos chrono !Les Web Services en 60 diapos chrono !
Les Web Services en 60 diapos chrono !Olivier Le Goaër
 
Android executable modeling: beyond android programming
Android executable modeling: beyond android programmingAndroid executable modeling: beyond android programming
Android executable modeling: beyond android programmingOlivier Le Goaër
 
Introduction à l'approche ADM de l'OMG
Introduction à l'approche ADM de l'OMGIntroduction à l'approche ADM de l'OMG
Introduction à l'approche ADM de l'OMGOlivier Le Goaër
 
Syntaxe concrète des DSL en IDM [avec Xtext]
Syntaxe concrète des DSL en IDM [avec Xtext]Syntaxe concrète des DSL en IDM [avec Xtext]
Syntaxe concrète des DSL en IDM [avec Xtext]Olivier Le Goaër
 
Adaptation d'exécution de modèles : vers des iDSML adaptables
Adaptation d'exécution de modèles : vers des iDSML adaptablesAdaptation d'exécution de modèles : vers des iDSML adaptables
Adaptation d'exécution de modèles : vers des iDSML adaptablesOlivier Le Goaër
 
Principe de fonctionnement du cryptage RSA
Principe de fonctionnement du cryptage RSAPrincipe de fonctionnement du cryptage RSA
Principe de fonctionnement du cryptage RSAKristen Le Liboux
 
Notions de base de JavaScript
Notions de base de JavaScriptNotions de base de JavaScript
Notions de base de JavaScriptKristen Le Liboux
 
Formation JavaScript full-stack (JS, jQuery, Node.js...)
Formation JavaScript full-stack (JS, jQuery, Node.js...)Formation JavaScript full-stack (JS, jQuery, Node.js...)
Formation JavaScript full-stack (JS, jQuery, Node.js...)guicara
 
Yet Another Three QVT Languages
Yet Another Three QVT LanguagesYet Another Three QVT Languages
Yet Another Three QVT LanguagesEdward Willink
 
Developpement mobile vs open source
Developpement mobile vs open sourceDeveloppement mobile vs open source
Developpement mobile vs open sourceKorteby Farouk
 
Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0Pascal Roques
 
OCCIware Contribution to the EU consultation on Cloud Computing Research Inno...
OCCIware Contribution to the EU consultation on Cloud Computing Research Inno...OCCIware Contribution to the EU consultation on Cloud Computing Research Inno...
OCCIware Contribution to the EU consultation on Cloud Computing Research Inno...OCCIware
 
mis
mismis
misISIG
 
Design Thinking Assignment
Design Thinking AssignmentDesign Thinking Assignment
Design Thinking AssignmentSalma ES-Salmani
 
Vbisigk
VbisigkVbisigk
VbisigkISIG
 

Andere mochten auch (20)

Les Web Services en 60 diapos chrono !
Les Web Services en 60 diapos chrono !Les Web Services en 60 diapos chrono !
Les Web Services en 60 diapos chrono !
 
Android executable modeling: beyond android programming
Android executable modeling: beyond android programmingAndroid executable modeling: beyond android programming
Android executable modeling: beyond android programming
 
Introduction à l'approche ADM de l'OMG
Introduction à l'approche ADM de l'OMGIntroduction à l'approche ADM de l'OMG
Introduction à l'approche ADM de l'OMG
 
Syntaxe concrète des DSL en IDM [avec Xtext]
Syntaxe concrète des DSL en IDM [avec Xtext]Syntaxe concrète des DSL en IDM [avec Xtext]
Syntaxe concrète des DSL en IDM [avec Xtext]
 
Formation VBA Excel
Formation VBA ExcelFormation VBA Excel
Formation VBA Excel
 
Cours JavaScript
Cours JavaScriptCours JavaScript
Cours JavaScript
 
Adaptation d'exécution de modèles : vers des iDSML adaptables
Adaptation d'exécution de modèles : vers des iDSML adaptablesAdaptation d'exécution de modèles : vers des iDSML adaptables
Adaptation d'exécution de modèles : vers des iDSML adaptables
 
Programmation sous Android
Programmation sous AndroidProgrammation sous Android
Programmation sous Android
 
Principe de fonctionnement du cryptage RSA
Principe de fonctionnement du cryptage RSAPrincipe de fonctionnement du cryptage RSA
Principe de fonctionnement du cryptage RSA
 
Notions de base de JavaScript
Notions de base de JavaScriptNotions de base de JavaScript
Notions de base de JavaScript
 
Formation JavaScript full-stack (JS, jQuery, Node.js...)
Formation JavaScript full-stack (JS, jQuery, Node.js...)Formation JavaScript full-stack (JS, jQuery, Node.js...)
Formation JavaScript full-stack (JS, jQuery, Node.js...)
 
Yet Another Three QVT Languages
Yet Another Three QVT LanguagesYet Another Three QVT Languages
Yet Another Three QVT Languages
 
Cvl
CvlCvl
Cvl
 
Developpement mobile vs open source
Developpement mobile vs open sourceDeveloppement mobile vs open source
Developpement mobile vs open source
 
Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0
 
OCCIware Contribution to the EU consultation on Cloud Computing Research Inno...
OCCIware Contribution to the EU consultation on Cloud Computing Research Inno...OCCIware Contribution to the EU consultation on Cloud Computing Research Inno...
OCCIware Contribution to the EU consultation on Cloud Computing Research Inno...
 
mis
mismis
mis
 
Design Thinking Assignment
Design Thinking AssignmentDesign Thinking Assignment
Design Thinking Assignment
 
Vbisigk
VbisigkVbisigk
Vbisigk
 
Mix
MixMix
Mix
 

Ähnlich wie Executable modeling & dynamic adaptation

Model Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UMLModel Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UMLelliando dias
 
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...Marc Pantel
 
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Benoit Combemale
 
Scala for Machine Learning
Scala for Machine LearningScala for Machine Learning
Scala for Machine LearningPatrick Nicolas
 
Factorization Machines and Applications in Recommender Systems
Factorization Machines and Applications in Recommender SystemsFactorization Machines and Applications in Recommender Systems
Factorization Machines and Applications in Recommender SystemsEvgeniy Marinov
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!melbats
 
MOSKitt Transformations And Traceability
MOSKitt Transformations And TraceabilityMOSKitt Transformations And Traceability
MOSKitt Transformations And TraceabilityJavier Muñoz
 
Executable UML – UML2
Executable UML – UML2Executable UML – UML2
Executable UML – UML2elliando dias
 
Eventual Consistency - JUG DA
Eventual Consistency - JUG DAEventual Consistency - JUG DA
Eventual Consistency - JUG DASusanne Braun
 
Attach Me, Detach Me, Assemble Me like you Work
Attach Me, Detach Me, Assemble Me like you WorkAttach Me, Detach Me, Assemble Me like you Work
Attach Me, Detach Me, Assemble Me like you WorkJean Vanderdonckt
 
Graphical Model Transformation Framework
Graphical Model Transformation FrameworkGraphical Model Transformation Framework
Graphical Model Transformation FrameworkKaniska Mandal
 
xUMLFinalPresentation.ppt
xUMLFinalPresentation.pptxUMLFinalPresentation.ppt
xUMLFinalPresentation.pptssuser2ef938
 
SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!melbats
 
Model-driven Development of Model Transformations
Model-driven Development of Model TransformationsModel-driven Development of Model Transformations
Model-driven Development of Model TransformationsPieter Van Gorp
 
Software development effort reduction with Co-op
Software development effort reduction with Co-opSoftware development effort reduction with Co-op
Software development effort reduction with Co-oplbergmans
 
An Approach To Verilog-VHDL Interoperability For Synchronous Designs
An Approach To Verilog-VHDL Interoperability For Synchronous DesignsAn Approach To Verilog-VHDL Interoperability For Synchronous Designs
An Approach To Verilog-VHDL Interoperability For Synchronous DesignsDawn Cook
 
Resg ph d_seminar2010_germansibay
Resg ph d_seminar2010_germansibayResg ph d_seminar2010_germansibay
Resg ph d_seminar2010_germansibayRESGWorkshop
 
Extending Rotor with Structural Reflection to support Reflective Languages
Extending Rotor with Structural Reflection to support Reflective LanguagesExtending Rotor with Structural Reflection to support Reflective Languages
Extending Rotor with Structural Reflection to support Reflective Languagesfranciscoortin
 

Ähnlich wie Executable modeling & dynamic adaptation (20)

Model Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UMLModel Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UML
 
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...
Concurrency-aware eXecutable Domain-Specific Modeling Languages as Models of ...
 
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
 
Scala for Machine Learning
Scala for Machine LearningScala for Machine Learning
Scala for Machine Learning
 
Factorization Machines and Applications in Recommender Systems
Factorization Machines and Applications in Recommender SystemsFactorization Machines and Applications in Recommender Systems
Factorization Machines and Applications in Recommender Systems
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!
 
MOSKitt Transformations And Traceability
MOSKitt Transformations And TraceabilityMOSKitt Transformations And Traceability
MOSKitt Transformations And Traceability
 
Executable UML – UML2
Executable UML – UML2Executable UML – UML2
Executable UML – UML2
 
Eventual Consistency - JUG DA
Eventual Consistency - JUG DAEventual Consistency - JUG DA
Eventual Consistency - JUG DA
 
Attach Me, Detach Me, Assemble Me like you Work
Attach Me, Detach Me, Assemble Me like you WorkAttach Me, Detach Me, Assemble Me like you Work
Attach Me, Detach Me, Assemble Me like you Work
 
Graphical Model Transformation Framework
Graphical Model Transformation FrameworkGraphical Model Transformation Framework
Graphical Model Transformation Framework
 
xUMLFinalPresentation.ppt
xUMLFinalPresentation.pptxUMLFinalPresentation.ppt
xUMLFinalPresentation.ppt
 
SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!
 
Model-driven Development of Model Transformations
Model-driven Development of Model TransformationsModel-driven Development of Model Transformations
Model-driven Development of Model Transformations
 
Software development effort reduction with Co-op
Software development effort reduction with Co-opSoftware development effort reduction with Co-op
Software development effort reduction with Co-op
 
An Approach To Verilog-VHDL Interoperability For Synchronous Designs
An Approach To Verilog-VHDL Interoperability For Synchronous DesignsAn Approach To Verilog-VHDL Interoperability For Synchronous Designs
An Approach To Verilog-VHDL Interoperability For Synchronous Designs
 
Resg ph d_seminar2010_germansibay
Resg ph d_seminar2010_germansibayResg ph d_seminar2010_germansibay
Resg ph d_seminar2010_germansibay
 
Extending Rotor with Structural Reflection to support Reflective Languages
Extending Rotor with Structural Reflection to support Reflective LanguagesExtending Rotor with Structural Reflection to support Reflective Languages
Extending Rotor with Structural Reflection to support Reflective Languages
 
UML Basics
UML BasicsUML Basics
UML Basics
 
MDA with Executable UML
MDA with Executable UMLMDA with Executable UML
MDA with Executable UML
 

Mehr von Olivier Le Goaër

Ecological Impact of Native vs. Cross-Platform Mobile Apps: a Preliminary Study
 Ecological Impact of Native vs. Cross-Platform Mobile Apps: a Preliminary Study Ecological Impact of Native vs. Cross-Platform Mobile Apps: a Preliminary Study
Ecological Impact of Native vs. Cross-Platform Mobile Apps: a Preliminary StudyOlivier Le Goaër
 
PowDroid: Energy Profiling of Android Applications (ASE 2021 [Workshop] SUSTA...
PowDroid: Energy Profiling of Android Applications (ASE 2021 [Workshop] SUSTA...PowDroid: Energy Profiling of Android Applications (ASE 2021 [Workshop] SUSTA...
PowDroid: Energy Profiling of Android Applications (ASE 2021 [Workshop] SUSTA...Olivier Le Goaër
 
Enforcing Green Code With Android Lint
Enforcing Green Code With Android LintEnforcing Green Code With Android Lint
Enforcing Green Code With Android LintOlivier Le Goaër
 
GREEN PAUWARE - For a power-thrifty mobile app marketplace
GREEN PAUWARE - For a power-thrifty mobile app marketplaceGREEN PAUWARE - For a power-thrifty mobile app marketplace
GREEN PAUWARE - For a power-thrifty mobile app marketplaceOlivier Le Goaër
 

Mehr von Olivier Le Goaër (6)

The road to green code
The road to green codeThe road to green code
The road to green code
 
Ecological Impact of Native vs. Cross-Platform Mobile Apps: a Preliminary Study
 Ecological Impact of Native vs. Cross-Platform Mobile Apps: a Preliminary Study Ecological Impact of Native vs. Cross-Platform Mobile Apps: a Preliminary Study
Ecological Impact of Native vs. Cross-Platform Mobile Apps: a Preliminary Study
 
PowDroid: Energy Profiling of Android Applications (ASE 2021 [Workshop] SUSTA...
PowDroid: Energy Profiling of Android Applications (ASE 2021 [Workshop] SUSTA...PowDroid: Energy Profiling of Android Applications (ASE 2021 [Workshop] SUSTA...
PowDroid: Energy Profiling of Android Applications (ASE 2021 [Workshop] SUSTA...
 
Enforcing Green Code With Android Lint
Enforcing Green Code With Android LintEnforcing Green Code With Android Lint
Enforcing Green Code With Android Lint
 
GREEN PAUWARE - For a power-thrifty mobile app marketplace
GREEN PAUWARE - For a power-thrifty mobile app marketplaceGREEN PAUWARE - For a power-thrifty mobile app marketplace
GREEN PAUWARE - For a power-thrifty mobile app marketplace
 
Introduction au langage SQL
Introduction au langage SQLIntroduction au langage SQL
Introduction au langage SQL
 

Kürzlich hochgeladen

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 

Kürzlich hochgeladen (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

Executable modeling & dynamic adaptation

  • 1. Olivier Le Goaër olivier.legoaer@univ-pau.fr Séminaire LIRMM Montpellier, 30/09/2016 Executable modelingExecutable modeling && dynamic adaptationdynamic adaptation
  • 2. 2/31 A short bioA short bio  Positions ● Ph.D in 2009 – AeLoS team, LINA ● Associate Professor since 2010 – MOVIES team, LIUPPA  Research topics ● Software Evolution/Adaptation ● Software Architecture ● Model-Driven Engineering  Hobbies ● Mobile technologies ● Web technologies
  • 3. 3/31 Domain-specific languages (DSL)Domain-specific languages (DSL)  General Purpose Languages ● Not targeted to a particular kind of problem, but to any kinds of software problem  Domain-Specific Languages ● Targeted to a particular kind of problem – with dedicated notations (textual or graphical), support (editor, checkers, etc.) ● Promises: more « efficient » languages for resolving a set of specific problems in a domain ● Each concern described in its own language – For software developpers (modeling, programming, querying, building, documenting, ...), for software architects (ADL), for statisticians (R), for biologists, for sociologists, ...
  • 4. 4/31 Shapes for a DSLShapes for a DSL  Internal ● Hosted by a GPL  External ● Stand-alone  Implicit ● API-like C# & Linq SQL Querydsl SQL Java API QCustomer customer; customer = new QCustomer("c"); SQLQuery<?> query = new SQLQuery<Void>(connection); List<String> lastNames = query.select(customer.lastName) .from(customer) .where(customer.firstName.eq("Bob")) .fetch(); System.out.print(lastNames); SELECT lastName FROM customer WHERE firstName = 'Bob'; var queryBobCustomers = from cust in customer where cust.firstName == "Bob" select cust.lastName; foreach (var n in queryBobCustomers) { Console.WriteLine(n); }
  • 5. 5/31 Shapes for a DSLShapes for a DSL  Internal ● Hosted by a GPL  External ● Stand-alone  Implicit ● API-like C# & Linq SQL Querydsl SQL Java API QCustomer customer; customer = new QCustomer("c"); SQLQuery<?> query = new SQLQuery<Void>(connection); List<String> lastNames = query.select(customer.lastName) .from(customer) .where(customer.firstName.eq("Bob")) .fetch(); System.out.print(lastNames); SELECT lastName FROM customer WHERE firstName = 'Bob'; var queryBobCustomers = from cust in customer where cust.firstName == "Bob" select cust.lastName; foreach (var n in queryBobCustomers) { Console.WriteLine(n); }
  • 6. 6/31 Models are taking a new roleModels are taking a new role « marauders map » – Harry Potter Model playing a static role (design-time) Model playing a dynamic role (run-time) ● Tells us about the structure of the castle (every classroom, every hallway, and every corner) ● Tells us about moving persons (shows foot prints)
  • 7. 7/31 Crossing the demarcation lineCrossing the demarcation line Model of a system (conforms to a metamodel) S Running system IN TER PR ETATIO N Running system = model under execution Design-time Run-time C O M PILATIO N </xml> sub{ } MDA ® MM exec(M)exec(M)
  • 8. 8/31 Executable modeling (xModeling)Executable modeling (xModeling)  Compilation ● Translational semantics – Code generation in a target language  Direct execution (~VM/interpreter) ● Operational semantics – Using an « action » language – Using a M2M transformation (rare in practice)  Breathing life into models ● Simulation, V&V, rapid prototyping... ● Ultimately, skip the implementation stage !
  • 9. 9/31 Controversies and debatesControversies and debates  Executable models "can be run, tested, debugged, and measured for performance"  UML / fUML as prominent examples ● Is a class diagram executable? Alone ? ● Is a paquage diagram executable? ● Is a sequence diagram executable?  Raises the question of an executable nature ● Behavior of a software system captured by a model M ● Ability to define a current execution state within M ● Ability to compute the next state (aka « step ») within M
  • 10. 10/31 xModeling built with MDExModeling built with MDE  Meta-models are just a specific OO data structures to represent abstract syntax trees ● Operational semantics = computation steps and runtime data ● A VM/interpreter is a program working with such AST and that implements a given operational semantics  Executable metamodeling ● xMOF (eXecutable MOF) ● Kermeta ● Ecore + body of operation(s) written Java/EMF ● …
  • 11. 11/31 xModeling's componentsxModeling's components Abstract Syntax Metamodel + Well-formedness rules Concrete Syntax Graphical or textual Semantics How it behaves at runtime ?
  • 12. 12/31 Modeling with StatechartsModeling with Statecharts --The instance of the finite state machine is unique (root) context StateMachine inv singleStateMachine: StateMachine.allInstances()->size() = 1 and self.container.oclIsUndefined() --All the states are included in composites except the finite state machine herself context State inv containerForAllStates: not self.oclIsTypeOf(StateMachine) implies not self.container.oclIsUndefined()
  • 13. 13/31 Train Cruise Control ModelTrain Cruise Control Model
  • 14. 14/31 xModeling with StatechartsxModeling with Statecharts runToCompletion() isActive:boolean 0..1 lastKnownActiveState -- When an history state exists and references a state, the latter must belongs to the composite context CompositeState inv historyInComposite: if self.historyState.oclIsUndefined() then true else if self.historyState.referencedState.oclIsUndefined() then true else self.states->includes(self.historyState.lastKnownActiveState) endif endif
  • 15. 15/31 xModeling with StatechartsxModeling with Statecharts runToCompletion() isActive:boolean 0..1 lastKnownActiveState -- When an history state exists and references a state, the latter must belongs to the composite context CompositeState inv R3: if self.historyState.oclIsUndefined() then true else if self.historyState.referencedState.oclIsUndefined() then true else self.states->includes(self.historyState.lastKnownActiveState) endif endif //operationnal semantics of UML2 aspect class StateMachine { operation runToCompletion(e : Event) is do // suivre la transition trouvée en activant l'état // cible et en modifiant en conséquence la hiérarchie d'états actifs end } //operationnal semantics of UML2 aspect class StateMachine { operation runToCompletion(e : Event) is do // suivre la transition trouvée en activant l'état // cible et en modifiant en conséquence la hiérarchie d'états actifs end }
  • 16. 16/31 Running system = exec(Model)Running system = exec(Model)
  • 17. 17/31 Model@run.timeModel@run.time  Overloaded term ● Deals originally with software adaptation issues at runtime  Advantage ● Provides a reasoning support on a running system  Drawback ● Holding a causal link: M has to remain the strict reflect of S MM SS adaptation ? représentation modification Adaptation loop
  • 18. 18/31 Model@run.time + xModelingModel@run.time + xModeling  Treats the specific case where the considered running system is a model under execution  Idea : collapsing the adaptation loop ● Solves the causal link issue... ● ...but the merge may leads to a burdened model M'' M S = exec(M')S = exec(M') adaptation ? représentation modification S = exec(M'') adaptation ? modification collapse
  • 19. 19/31 Non-supervised adaptation (self-*)Non-supervised adaptation (self-*)  Detect a situation requiring adaptation ● Known versus unknown context (e.g. a new signal) – Green runtime event is sometimes ignored (designer's choice at design-time) – White runtime event is actually unknown at design-time  Perform adaptation actions ● CRUD operators on any runtime data  Metamodel specialization unlocks adaptation ● Model (sub)typing : adding new metaclasses and new constraints – Adding new operations accordingly : for (a) detect and (b) perform ● Choosing the right level of specialization is tactful – Domain adaptations are rare but apply on any model instance of the metamodel – Business adaptations are frequent but only apply on some models
  • 20. 20/31 Subtyped Cruise Control ModelSubtyped Cruise Control Model com pleteness tagged value + Consistency
  • 21. 21/31 Dynamic adaptation of the modelDynamic adaptation of the model
  • 22. 22/31 Adaptable xModelingAdaptable xModeling RunToCompletion()* -- Each state must be associated to a transition for each identified event context State def: knownEvents : Set(String) = Set{...}; context State inv Completeness: self.knownEvents -> forAll( e | self.existsTransitionFor(e)) -- A transition tagged with {p, v} leads to a state also tagged with with {p, v} context StateMachine inv Consistency: ... ...
  • 23. 23/31 Adaptable xModelingAdaptable xModeling RunToCompletion()* -- Each state must be associated to a transition for each identified event context State def: knownEvents : Set(String) = Set{...}; context State inv Completeness: self.knownEvents -> forAll( e | self.existsTransitionFor(e)) -- A transition tagged with {p, v} leads to a state tagged with with {p, v} context StateMachine inv Consistency: ... ... //adaptation operational semantics aspect class StateMachine { operation runToCompletion(e : Event) is do if not e.isKnown() then //introduces the new state and transitions thereof end //same as usual (nominal behavior) end } //adaptation operational semantics aspect class StateMachine { operation runToCompletion(e : Event) is do if not e.isKnown() then //introduces the new state and transitions thereof end //same as usual (nominal behavior) end } aspect class Event { operation isKnown() : Boolean is do //checks if an event is unknown or not end } aspect class Event { operation isKnown() : Boolean is do //checks if an event is unknown or not end }isKnown()*
  • 24. 24/31 From craft to engineering with MDEFrom craft to engineering with MDE Modeling xModeling Adaptable xModeling Metamodel (static) + [exec. translational semantics] Metamodel (static + dynamic) + exec. operational semantics Metamodel (static + dynamic + adaptative) + adapt. operational semantics
  • 25. 25/31 Adaptation extends executionAdaptation extends execution  Execution semantics ● Deals with the nominal behavior (known context) ● Operation(s) only apply on the dynamic part (the static part is on read-only mode)  Adaptation semantics ● Is-a-kind-of execution semantics ● Deals with extra-ordinary situation (unknown context) ● Operation(s) may apply on all parts (static, dynamic, adaptation)  The two kinds of semantics are mixed
  • 26. 26/31 Implementation ChoicesImplementation Choices  Classic programming ● Adaptation is tangled into execution  OO programming ● Adaptation overrides execution (and calls « super »)  Contract-based programming ● Adaptation occurs when a precondition of execution is violated  Aspect-oriented programming ● Adaptation is woven into execution  xModeling ! ● Adaptation is modeled with a DSL and calls back to execution
  • 27. 27/31 xModeling built without MDExModeling built without MDE  PauWare engine (www.pauware.com) ● Execution engine (VM) for statechart models ● Implements the complete UML2 execution semantics specification ● API written in Java (hence ported effortlessly to Android) JavaJava PauWare APIPauWare API Code/xml that describes the statechart model to be loaded Engine that executes the model loaded (« run-to-completion ») Free implementation of the actions (called by reflection from the engine) Consumes an event for each execution step
  • 28. 28/31 Android + PauWareAndroid + PauWare SERVICE BROADCAST RECEIVER Android OS ANDROID CONNECTOR e1/foo e1 public void foo() { //do something } public void bar() { //do other thing } A statechart model runs-to-completion starts invokes PauWare Execution Engine Java xmi scxml
  • 29. 29/31 Supervised adaptationSupervised adaptation  Ability to load a new model on-the-fly ● A model is just a runtime data taken as input of the engine ● Actions' implementation have to stay unchanged SERVICE BROADCAST RECEIVER Android OS ANDROID CONNECTOR events runs-to-completion starts invokes PauWare Execution Engine Model Server Google Cloud Messaging Push Notification Fresh data retrieval Adapter e1/foo public void foo() { //do something } public void bar() { //do other thing }
  • 30. 30/31 World Wide Modeling (wwm)World Wide Modeling (wwm)  MDE-specific URI ● model://host[:port]/M3/M2/M1 – model://localhost/Ecore/UML2/train – model://localhost/Ecore/OCL/  Commands ● model://host/M3?list ● model://host/M3/M2?info ● model://host/M3/M2/M1#fragment  Getting started (requires ) ● $> npm install wwm ● JavaScript API for client-side and server-side programming
  • 31. 31/31 Thank you for your attentionThank you for your attention ?