SlideShare ist ein Scribd-Unternehmen logo
1 von 21
AAnnddrrooiidd EExxeeccuuttaabbllee MMooddeelliinngg:: 
BBeeyyoonndd AAnnddrrooiidd PPrrooggrraammmmiinngg 
Olivier Le Goaër 
olivier.legoaer@univ-pau.fr 
MobiApps # Session 1: Smart Systems 
Barcelona, 2014
AAggeennddaa 
 Context of Work 
 Moving Executable Models to Android 
 A software architecture powered by PauWare 
API 
 Conclusion & perspectives 
Olivier Le Goaer @ MobiApps 2014
CCoonntteexxtt ooff WWoorrkk
WWee eenntteerreedd tthhee mmooddeelliinngg eerraa 
 The power of software modeling 
 Mental effort that differs from that required for programming 
 A higher level of abstraction provides a better reasoning support 
 supposed to be more concise, more intelligible, more agile… 
 Model-driven engineering field (MDE) 
 Promotes the « model everywhere » vision 
 Models are considered first-class citizen during the software life-cycle 
 UML was just the tip of the iceberg; DSL are now at the forefront 
Olivier Le Goaer @ MobiApps 2014
SSttaattiicc vveerrssuuss ddyynnaammiicc mmooddeellss 
 Classical MDE use static model 
 A model = a blueprint for a software viewpoint that one can refer 
to do stuff 
 Testing, code generation, requirements elicitation, proofs, … 
 A recent MDE trend is about dynamic model 
 Extension that aims to breathe life into models 
 A dynamic model = an animated/actioned blueprint that plays a 
leading role 
 Simulation and validation, rapid prototyping, ... 
 There is no code generation; The model is sufficient in itself. 
Olivier Le Goaer @ MobiApps 2014
EExxeeccuuttaabbllee mmooddeellss 
 An execution engine is required 
 An interpreter manages each execution step of the model under 
execution 
 Specific to each kind of models (petri nets, statecharts, workflows, 
activity diagrams…) 
 Statechart is a prominent example of 
executable model 
 Describes the behavior of something in terms of states and 
transitions 
 Is a general-purpose modeling language 
 User navigation, Control flow... and generally speaking any object's life-cycle 
Olivier Le Goaer @ MobiApps 2014
EExxeeccuuttaabbllee ssttaatteecchhaarrttss ffoorr rreeaall...... 
From “Statecharts: A visual formalism for complex systems” by David HAREL 
Olivier Le Goaer @ MobiApps 2014
MMoovviinngg EExxeeccuuttaabbllee MMooddeellss ttoo 
AAnnddrrooiidd
IIlllluussttrraattiioonn wwiitthh aa ttooyy mmoobbAApppp 
 Create a tiny mobApp « Energy Assistant » 
 An avatar gives (not too serious) advices to the end-user based 
on both the battery level and the usage of his device 
 Statechart formalism to the rescue 
 This kind of mobApp can be easily modeled with a statechart 
 States will reflect the battery level 
 Events will be mapped to Android system events 
 Actions will be short notifications to the end-user (can be much more complex of 
course) 
 Accessible even to non-specialists of Android platform 
 Requires a basic knowledge of how any mobile device operates 
 This allows us to imagine that a customer can entirely model its needs in that way 
Olivier Le Goaer @ MobiApps 2014
SSttaatteecchhaarrtt mmooddeelliinngg gguuiiddeelliinnee 
 The control flow rises up to the model level 
 Much more easy to understand and to maintain that when buried 
in code 
 Hence be careful that no control flow resides into the action code 
A 
B 
[isOk] e1 / foo() 
Olivier Le Goaer @ MobiApps 2014 
public void foo() { 
//do something 
if (!isOk) { 
//do something else 
} 
} 
Interferes 
with the 
model !
EEnneerrggyy AAssssiissttaanntt''ss bbeehhaavviioorr 
Olivier Le Goaer @ MobiApps 2014 
 4 states 
 Including a composite 
 2 pseudos-states 
 2 initials 
 0 final 
 7 transitions 
 No guards 
 7 Android-related 
events 
 1 kind of action : 
« alert »
AAnnddrrooiidd mmooddeelliinngg?? RReeaallllyy?? 
 Classical code = 
programming effort 
 "I am writing the code of my 
Android app. My focus is at 
the program-level." 
 Complex, 
unmaintainable code 
 Nested if, switch 
statements, ... 
 Flag variables and 
« global » variables to 
record what happened 
previously... 
Olivier Le Goaer @ MobiApps 2014 
 Model-oriented code 
= modeling effort 
 "I am writing the code that 
describes a statechart 
model of my Android app. 
My focus is at the model-level." 
 Clear separation of 
concerns 
 Statechart description 
 Actions' implementation 
 Let an engine executes 
directly the model
A software AArrcchhiitteeccttuurree ppoowweerreedd bbyy 
PPaauuWWaarree AAPPII
PPaauuWWaarree EExxeeccuuttiioonn EEnnggiinnee 
 PauWare engine (www.pauware.com) 
 Lightweight execution engine for statechart models 
 Implements the complete UML2 execution semantics specification 
 API written in Java (hence ported effortlessly to Android) 
Engine that executes the model 
loaded (« run-to-completion ») 
Olivier Le Goaer @ MobiApps 2014 
JJaavvaa 
PPaauuWWaarree AAPPII 
Code/xml that describes the 
statechart model to be loaded 
Consumes an 
event for each 
execution step 
Free implementation of 
the actions 
(called by reflection from the engine)
AArrcchhiitteeccttuurree oovveerrvviieeww 
Java or xmi or scxml 
Olivier Le Goaer @ MobiApps 2014 
SERVICE 
BROADCAST 
RECEIVER 
AAnnddrrooiidd OOSS 
ANDROID 
CONNECTOR 
e1/foo 
e1 
public void foo() { 
//do something 
} 
public void bar() { 
//do other thing 
} 
A statechart model 
runs-to-completion 
PauWare 
Execution 
Engine 
starts invokes
AAnn eexxaammppllee 
Olivier Le Goaer @ MobiApps 2014 
Active state 
Triggered 
transition
EEnneerrggyy AAssssiissttaanntt''ss AArrcchhiitteeccttuurree 
Olivier Le Goaer @ MobiApps 2014 
SERVICE 
BROADCAST 
RECEIVER 
AAnnddrrooiidd OOSS 
ANDROID 
CONNECTOR 
PauWare 
Execution 
Engine 
ACTION_POWER_CONNECTED 
void alert(String msg) { 
Notification noti 
= new Notification.Builder 
... 
} 
runs-to-completion 
starts invokes
SSccrreeeennsshhoottss 
Assistant available 
from the Launcher 
Olivier Le Goaer @ MobiApps 2014 
Assistant notification 
POWER_CONNECTED
CCoonncclluussiioonn 
 Executable models 
 There is no code generation, the model is directly executed on a 
target platform through an engine (.i.e. an interpreter) 
 Android modeling rather than android 
programming 
 Shift the efforts on modeling activities (for those who are not 
allergic to modeling ;-) 
 Limited knowledge of the underlying platform is enough 
 Stateshart formalism and beyond 
 Widespread and well suited for aspects of apps (partly or entirely) 
 A lot of further modeling languages can be useful... 
Olivier Le Goaer @ MobiApps 2014
PPeerrssppeeccttiivvee:: uuppddaattee mmaaddee eeaassyy 
 Ability to load a new model on-the-fly 
 A model is just a (meta)data taken as input of the engine 
 Actions' implementation have to stay unchanged 
 Challenge: the execution continuum between old and new model 
Fresh (meta)data retrieval 
Olivier Le Goaer @ MobiApps 2014 
SERVICE 
BROADCAST 
RECEIVER 
AAnnddrrooiidd OOSS 
ANDROID 
CONNECTOR 
runs-to-completion 
PauWare 
Execution 
Engine 
ACTION_POWER_CONNECTED 
void alert(String msg) { 
Notification noti 
= new Notification.Builder 
... 
} 
starts invokes 
Model 
Server 
Google 
Cloud 
Messaging Push Notification
QQuueessttiioonnss??

Weitere ähnliche Inhalte

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
 
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
 
Embedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEmbedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEdward Willink
 
Environnement de développement de bases de données
Environnement de développement de bases de donnéesEnvironnement de développement de bases de données
Environnement de développement de bases de donnéesISIG
 
Developpement mobile vs open source
Developpement mobile vs open sourceDeveloppement mobile vs open source
Developpement mobile vs open sourceKorteby Farouk
 
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
 
Frame latency evaluation: when simulation and analysis alone are not enough
Frame latency evaluation: when simulation and analysis alone are not enoughFrame latency evaluation: when simulation and analysis alone are not enough
Frame latency evaluation: when simulation and analysis alone are not enoughRealTime-at-Work (RTaW)
 
01072013 e governance
01072013 e governance01072013 e governance
01072013 e governancebharati k
 
Design Thinking Assignment
Design Thinking AssignmentDesign Thinking Assignment
Design Thinking AssignmentSalma ES-Salmani
 
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...OCCIware
 
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...Edward Willink
 

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 !
 
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...)
 
Embedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEmbedded OCL Integration and Debugging
Embedded OCL Integration and Debugging
 
Environnement de développement de bases de données
Environnement de développement de bases de donnéesEnvironnement de développement de bases de données
Environnement de développement de bases de données
 
The OCLforUML Profile
The OCLforUML ProfileThe OCLforUML Profile
The OCLforUML Profile
 
Developpement mobile vs open source
Developpement mobile vs open sourceDeveloppement mobile vs open source
Developpement mobile vs open source
 
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...
 
Frame latency evaluation: when simulation and analysis alone are not enough
Frame latency evaluation: when simulation and analysis alone are not enoughFrame latency evaluation: when simulation and analysis alone are not enough
Frame latency evaluation: when simulation and analysis alone are not enough
 
What fUML can bring to MBSE?
What fUML can bring to MBSE?What fUML can bring to MBSE?
What fUML can bring to MBSE?
 
01072013 e governance
01072013 e governance01072013 e governance
01072013 e governance
 
OCL 2.5 plans
OCL 2.5 plansOCL 2.5 plans
OCL 2.5 plans
 
Design Thinking Assignment
Design Thinking AssignmentDesign Thinking Assignment
Design Thinking Assignment
 
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
 
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
 

Ähnlich wie Moving Executable Models to Android

Meetic Mobile Strategy - Microsoft TechDays Paris 2015
Meetic Mobile Strategy - Microsoft TechDays Paris 2015Meetic Mobile Strategy - Microsoft TechDays Paris 2015
Meetic Mobile Strategy - Microsoft TechDays Paris 2015Jean-Loup Yu
 
Stratégie mobile de Meetic sur Windows
Stratégie mobile de Meetic sur WindowsStratégie mobile de Meetic sur Windows
Stratégie mobile de Meetic sur WindowsMicrosoft
 
My perspective on MVP and architecture discussions
My perspective on MVP and architecture discussionsMy perspective on MVP and architecture discussions
My perspective on MVP and architecture discussionsPaul Blundell
 
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...Codemotion
 
RuCORD: Rule-based Composite Operation Recovering and Detection to Support Co...
RuCORD: Rule-based Composite Operation Recovering and Detection to Support Co...RuCORD: Rule-based Composite Operation Recovering and Detection to Support Co...
RuCORD: Rule-based Composite Operation Recovering and Detection to Support Co...Amanuel Alemayehu
 
Meetic Mobile Strategy - Microsoft TechDays Paris 2015
Meetic Mobile Strategy - Microsoft TechDays Paris 2015Meetic Mobile Strategy - Microsoft TechDays Paris 2015
Meetic Mobile Strategy - Microsoft TechDays Paris 2015Thomas Salandre
 
ANDROID presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabalPrabal Tyagi
 
Caliburn.micro
Caliburn.microCaliburn.micro
Caliburn.microbwullems
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: AndroidJitendra Kumar
 
Mobile application Project report B.Tech Final year
Mobile application Project report B.Tech Final yearMobile application Project report B.Tech Final year
Mobile application Project report B.Tech Final yearChin2uuu
 
Mobile Application Project report
Mobile Application Project reportMobile Application Project report
Mobile Application Project reportChin2uuu
 
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...RapidValue
 
KnowiXML: A Knowledge-Based System Generating Multiple Abstract User Interfac...
KnowiXML: A Knowledge-Based System Generating Multiple Abstract User Interfac...KnowiXML: A Knowledge-Based System Generating Multiple Abstract User Interfac...
KnowiXML: A Knowledge-Based System Generating Multiple Abstract User Interfac...Jean Vanderdonckt
 
Nonintrusive semantic html5
Nonintrusive semantic html5Nonintrusive semantic html5
Nonintrusive semantic html5Muhamad Arief
 
Mvi an architecture for reactive programming
Mvi an architecture for reactive programmingMvi an architecture for reactive programming
Mvi an architecture for reactive programmingluca mezzalira
 
probe-into-the-key-components-and-tools-of-devops-lifecycle
probe-into-the-key-components-and-tools-of-devops-lifecycleprobe-into-the-key-components-and-tools-of-devops-lifecycle
probe-into-the-key-components-and-tools-of-devops-lifecycleCuneiform Consulting Pvt Ltd.
 
What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !Cédric Brun
 
Agbaje7survey of softwar process
Agbaje7survey of softwar processAgbaje7survey of softwar process
Agbaje7survey of softwar processDr. Michael Agbaje
 
The Journey of Test Automation
The Journey of Test AutomationThe Journey of Test Automation
The Journey of Test Automationopkey
 
Software Engineering
Software Engineering Software Engineering
Software Engineering JayaKamal
 

Ähnlich wie Moving Executable Models to Android (20)

Meetic Mobile Strategy - Microsoft TechDays Paris 2015
Meetic Mobile Strategy - Microsoft TechDays Paris 2015Meetic Mobile Strategy - Microsoft TechDays Paris 2015
Meetic Mobile Strategy - Microsoft TechDays Paris 2015
 
Stratégie mobile de Meetic sur Windows
Stratégie mobile de Meetic sur WindowsStratégie mobile de Meetic sur Windows
Stratégie mobile de Meetic sur Windows
 
My perspective on MVP and architecture discussions
My perspective on MVP and architecture discussionsMy perspective on MVP and architecture discussions
My perspective on MVP and architecture discussions
 
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...
Next generation of frontend architectures - Luca Mezzalira - Codemotion Milan...
 
RuCORD: Rule-based Composite Operation Recovering and Detection to Support Co...
RuCORD: Rule-based Composite Operation Recovering and Detection to Support Co...RuCORD: Rule-based Composite Operation Recovering and Detection to Support Co...
RuCORD: Rule-based Composite Operation Recovering and Detection to Support Co...
 
Meetic Mobile Strategy - Microsoft TechDays Paris 2015
Meetic Mobile Strategy - Microsoft TechDays Paris 2015Meetic Mobile Strategy - Microsoft TechDays Paris 2015
Meetic Mobile Strategy - Microsoft TechDays Paris 2015
 
ANDROID presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabal
 
Caliburn.micro
Caliburn.microCaliburn.micro
Caliburn.micro
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
 
Mobile application Project report B.Tech Final year
Mobile application Project report B.Tech Final yearMobile application Project report B.Tech Final year
Mobile application Project report B.Tech Final year
 
Mobile Application Project report
Mobile Application Project reportMobile Application Project report
Mobile Application Project report
 
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
 
KnowiXML: A Knowledge-Based System Generating Multiple Abstract User Interfac...
KnowiXML: A Knowledge-Based System Generating Multiple Abstract User Interfac...KnowiXML: A Knowledge-Based System Generating Multiple Abstract User Interfac...
KnowiXML: A Knowledge-Based System Generating Multiple Abstract User Interfac...
 
Nonintrusive semantic html5
Nonintrusive semantic html5Nonintrusive semantic html5
Nonintrusive semantic html5
 
Mvi an architecture for reactive programming
Mvi an architecture for reactive programmingMvi an architecture for reactive programming
Mvi an architecture for reactive programming
 
probe-into-the-key-components-and-tools-of-devops-lifecycle
probe-into-the-key-components-and-tools-of-devops-lifecycleprobe-into-the-key-components-and-tools-of-devops-lifecycle
probe-into-the-key-components-and-tools-of-devops-lifecycle
 
What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !What the heck is Eclipse Modeling and why should you care !
What the heck is Eclipse Modeling and why should you care !
 
Agbaje7survey of softwar process
Agbaje7survey of softwar processAgbaje7survey of softwar process
Agbaje7survey of softwar process
 
The Journey of Test Automation
The Journey of Test AutomationThe Journey of Test Automation
The Journey of Test Automation
 
Software Engineering
Software Engineering Software Engineering
Software Engineering
 

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

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Kürzlich hochgeladen (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Moving Executable Models to Android

  • 1. AAnnddrrooiidd EExxeeccuuttaabbllee MMooddeelliinngg:: BBeeyyoonndd AAnnddrrooiidd PPrrooggrraammmmiinngg Olivier Le Goaër olivier.legoaer@univ-pau.fr MobiApps # Session 1: Smart Systems Barcelona, 2014
  • 2. AAggeennddaa  Context of Work  Moving Executable Models to Android  A software architecture powered by PauWare API  Conclusion & perspectives Olivier Le Goaer @ MobiApps 2014
  • 4. WWee eenntteerreedd tthhee mmooddeelliinngg eerraa  The power of software modeling  Mental effort that differs from that required for programming  A higher level of abstraction provides a better reasoning support  supposed to be more concise, more intelligible, more agile…  Model-driven engineering field (MDE)  Promotes the « model everywhere » vision  Models are considered first-class citizen during the software life-cycle  UML was just the tip of the iceberg; DSL are now at the forefront Olivier Le Goaer @ MobiApps 2014
  • 5. SSttaattiicc vveerrssuuss ddyynnaammiicc mmooddeellss  Classical MDE use static model  A model = a blueprint for a software viewpoint that one can refer to do stuff  Testing, code generation, requirements elicitation, proofs, …  A recent MDE trend is about dynamic model  Extension that aims to breathe life into models  A dynamic model = an animated/actioned blueprint that plays a leading role  Simulation and validation, rapid prototyping, ...  There is no code generation; The model is sufficient in itself. Olivier Le Goaer @ MobiApps 2014
  • 6. EExxeeccuuttaabbllee mmooddeellss  An execution engine is required  An interpreter manages each execution step of the model under execution  Specific to each kind of models (petri nets, statecharts, workflows, activity diagrams…)  Statechart is a prominent example of executable model  Describes the behavior of something in terms of states and transitions  Is a general-purpose modeling language  User navigation, Control flow... and generally speaking any object's life-cycle Olivier Le Goaer @ MobiApps 2014
  • 7. EExxeeccuuttaabbllee ssttaatteecchhaarrttss ffoorr rreeaall...... From “Statecharts: A visual formalism for complex systems” by David HAREL Olivier Le Goaer @ MobiApps 2014
  • 9. IIlllluussttrraattiioonn wwiitthh aa ttooyy mmoobbAApppp  Create a tiny mobApp « Energy Assistant »  An avatar gives (not too serious) advices to the end-user based on both the battery level and the usage of his device  Statechart formalism to the rescue  This kind of mobApp can be easily modeled with a statechart  States will reflect the battery level  Events will be mapped to Android system events  Actions will be short notifications to the end-user (can be much more complex of course)  Accessible even to non-specialists of Android platform  Requires a basic knowledge of how any mobile device operates  This allows us to imagine that a customer can entirely model its needs in that way Olivier Le Goaer @ MobiApps 2014
  • 10. SSttaatteecchhaarrtt mmooddeelliinngg gguuiiddeelliinnee  The control flow rises up to the model level  Much more easy to understand and to maintain that when buried in code  Hence be careful that no control flow resides into the action code A B [isOk] e1 / foo() Olivier Le Goaer @ MobiApps 2014 public void foo() { //do something if (!isOk) { //do something else } } Interferes with the model !
  • 11. EEnneerrggyy AAssssiissttaanntt''ss bbeehhaavviioorr Olivier Le Goaer @ MobiApps 2014  4 states  Including a composite  2 pseudos-states  2 initials  0 final  7 transitions  No guards  7 Android-related events  1 kind of action : « alert »
  • 12. AAnnddrrooiidd mmooddeelliinngg?? RReeaallllyy??  Classical code = programming effort  "I am writing the code of my Android app. My focus is at the program-level."  Complex, unmaintainable code  Nested if, switch statements, ...  Flag variables and « global » variables to record what happened previously... Olivier Le Goaer @ MobiApps 2014  Model-oriented code = modeling effort  "I am writing the code that describes a statechart model of my Android app. My focus is at the model-level."  Clear separation of concerns  Statechart description  Actions' implementation  Let an engine executes directly the model
  • 13. A software AArrcchhiitteeccttuurree ppoowweerreedd bbyy PPaauuWWaarree AAPPII
  • 14. PPaauuWWaarree EExxeeccuuttiioonn EEnnggiinnee  PauWare engine (www.pauware.com)  Lightweight execution engine for statechart models  Implements the complete UML2 execution semantics specification  API written in Java (hence ported effortlessly to Android) Engine that executes the model loaded (« run-to-completion ») Olivier Le Goaer @ MobiApps 2014 JJaavvaa PPaauuWWaarree AAPPII Code/xml that describes the statechart model to be loaded Consumes an event for each execution step Free implementation of the actions (called by reflection from the engine)
  • 15. AArrcchhiitteeccttuurree oovveerrvviieeww Java or xmi or scxml Olivier Le Goaer @ MobiApps 2014 SERVICE BROADCAST RECEIVER AAnnddrrooiidd OOSS ANDROID CONNECTOR e1/foo e1 public void foo() { //do something } public void bar() { //do other thing } A statechart model runs-to-completion PauWare Execution Engine starts invokes
  • 16. AAnn eexxaammppllee Olivier Le Goaer @ MobiApps 2014 Active state Triggered transition
  • 17. EEnneerrggyy AAssssiissttaanntt''ss AArrcchhiitteeccttuurree Olivier Le Goaer @ MobiApps 2014 SERVICE BROADCAST RECEIVER AAnnddrrooiidd OOSS ANDROID CONNECTOR PauWare Execution Engine ACTION_POWER_CONNECTED void alert(String msg) { Notification noti = new Notification.Builder ... } runs-to-completion starts invokes
  • 18. SSccrreeeennsshhoottss Assistant available from the Launcher Olivier Le Goaer @ MobiApps 2014 Assistant notification POWER_CONNECTED
  • 19. CCoonncclluussiioonn  Executable models  There is no code generation, the model is directly executed on a target platform through an engine (.i.e. an interpreter)  Android modeling rather than android programming  Shift the efforts on modeling activities (for those who are not allergic to modeling ;-)  Limited knowledge of the underlying platform is enough  Stateshart formalism and beyond  Widespread and well suited for aspects of apps (partly or entirely)  A lot of further modeling languages can be useful... Olivier Le Goaer @ MobiApps 2014
  • 20. PPeerrssppeeccttiivvee:: uuppddaattee mmaaddee eeaassyy  Ability to load a new model on-the-fly  A model is just a (meta)data taken as input of the engine  Actions' implementation have to stay unchanged  Challenge: the execution continuum between old and new model Fresh (meta)data retrieval Olivier Le Goaer @ MobiApps 2014 SERVICE BROADCAST RECEIVER AAnnddrrooiidd OOSS ANDROID CONNECTOR runs-to-completion PauWare Execution Engine ACTION_POWER_CONNECTED void alert(String msg) { Notification noti = new Notification.Builder ... } starts invokes Model Server Google Cloud Messaging Push Notification

Hinweis der Redaktion

  1. Lifecycle : (design-time & run-time & maintenance) Some students are very skilled for programming and have difficulties with modeling. It is very surprising
  2. A basic principle is that In that case, one must add another transition wich explicit the guard and the action
  3. Notice that there is no final state. It is not mandatory These are build-in android events Nested states
  4. Described by this sentence Now imagine a very complex model: composite state, history state : power of statechart
  5. The mobApp have to be previously launched