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

More Related Content

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
 
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
 
Embedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEmbedded OCL Integration and Debugging
Embedded OCL Integration and Debugging
Edward 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
 
The OCLforUML Profile
The OCLforUML ProfileThe OCLforUML Profile
The OCLforUML Profile
Edward Willink
 
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 enough
RealTime-at-Work (RTaW)
 
What fUML can bring to MBSE?
What fUML can bring to MBSE?What fUML can bring to MBSE?
What fUML can bring to MBSE?
RealTime-at-Work (RTaW)
 
01072013 e governance
01072013 e governance01072013 e governance
01072013 e governance
bharati k
 
OCL 2.5 plans
OCL 2.5 plansOCL 2.5 plans
OCL 2.5 plans
Edward Willink
 
Design Thinking Assignment
Design Thinking AssignmentDesign Thinking Assignment
Design Thinking Assignment
Salma 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
 

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 !
 
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...
 

Similar to Android executable modeling: beyond android programming

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
Jean-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 Windows
Microsoft
 
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
Paul 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 2015
Thomas Salandre
 
ANDROID presentation prabal
ANDROID presentation prabalANDROID presentation prabal
ANDROID presentation prabal
Prabal Tyagi
 
Caliburn.micro
Caliburn.microCaliburn.micro
Caliburn.micro
bwullems
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
Jitendra 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 year
Chin2uuu
 
Mobile Application Project report
Mobile Application Project reportMobile Application Project report
Mobile Application Project report
Chin2uuu
 
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 html5
Muhamad Arief
 
Mvi an architecture for reactive programming
Mvi an architecture for reactive programmingMvi an architecture for reactive programming
Mvi an architecture for reactive programming
luca 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-lifecycle
Cuneiform 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 process
Dr. Michael Agbaje
 
The Journey of Test Automation
The Journey of Test AutomationThe Journey of Test Automation
The Journey of Test Automation
opkey
 
Software Engineering
Software Engineering Software Engineering
Software Engineering
JayaKamal
 

Similar to Android executable modeling: beyond android programming (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
 

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

Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 

Recently uploaded (20)

Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 

Android executable modeling: beyond android programming

  • 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

Editor's Notes

  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