SlideShare une entreprise Scribd logo
1  sur  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??

Contenu connexe

En vedette

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
 

En vedette (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...
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Dernier (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

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

Notes de l'éditeur

  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