SlideShare a Scribd company logo
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
?

More Related Content

What's hot

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
Ed 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
 
Deep C
Deep CDeep C
Deep C
Olve Maudal
 
Baiscs of OpenGL
Baiscs of OpenGLBaiscs of OpenGL
Baiscs of OpenGL
Mrinmoy Dalal
 
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
Ed Seidewitz
 
C++ Programming Course
C++ Programming CourseC++ Programming Course
C++ Programming Course
Dennis 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 parallelism
Skills 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_future
Takayuki Muranushi
 
Eugenia
EugeniaEugenia
Cling the llvm based interpreter
Cling the llvm based interpreterCling the llvm based interpreter
Cling the llvm based interpreter
Roberto Nogueira
 
C#
C#C#
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
adarshynl
 
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
 

What's hot (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...
 

Viewers also liked

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'OMG
Olivier 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
 
Formation VBA Excel
Formation VBA ExcelFormation VBA Excel
Formation VBA Excel
Olivier Le Goaër
 
Cours JavaScript
Cours JavaScriptCours JavaScript
Cours JavaScript
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 adaptables
Olivier Le Goaër
 
Programmation sous Android
Programmation sous AndroidProgrammation sous Android
Programmation sous Android
Olivier 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 RSA
Kristen Le Liboux
 
Notions de base de JavaScript
Notions de base de JavaScriptNotions de base de JavaScript
Notions de base de JavaScript
Kristen 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 Languages
Edward Willink
 
Cvl
CvlCvl
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 Assignment
Salma ES-Salmani
 
Vbisigk
VbisigkVbisigk
VbisigkISIG
 

Viewers also liked (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
 

Similar to 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 Learning
Patrick 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 Systems
Evgeniy 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 DA
Susanne 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 Work
Jean Vanderdonckt
 
Graphical Model Transformation Framework
Graphical Model Transformation FrameworkGraphical Model Transformation Framework
Graphical Model Transformation Framework
Kaniska Mandal
 
xUMLFinalPresentation.ppt
xUMLFinalPresentation.pptxUMLFinalPresentation.ppt
xUMLFinalPresentation.ppt
ssuser2ef938
 
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 Transformations
Pieter 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-op
lbergmans
 
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
Dawn 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 Languages
franciscoortin
 
UML Basics
UML BasicsUML Basics
UML Basics
Serdar Temiz
 
MDA with Executable UML
MDA with Executable UMLMDA with Executable UML
MDA with Executable UML
Chris Raistrick
 

Similar to 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
 

More from Olivier Le Goaër

The road to green code
The road to green codeThe road to green code
The road to green code
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 Study
Olivier 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 Lint
Olivier 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 marketplace
Olivier Le Goaër
 
Introduction au langage SQL
Introduction au langage SQLIntroduction au langage SQL
Introduction au langage SQL
Olivier Le Goaër
 

More from 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
 

Recently uploaded

How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 

Recently uploaded (20)

How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 

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 ?