SlideShare a Scribd company logo
Generating Predicate Callback Summaries
for the Android Framework
Danilo Dominguez Perez and Wei Le
{danilo0,weile}@iastate.edu
May 22, 2017
Departament of Computer Science
Iowa State University
1
Outline
1 Motivation
2 Contributions: Predicate Callback Summaries
3 Lithium Framework
Identify Callback Nodes
Compute Predicate Nodes
Compute Update Nodes
Generate Summary Graphs
4 Using Predicate Callback Summaries
5 Experimental Results
6 Conclusions
2
Outline
1 Motivation
2 Contributions: Predicate Callback Summaries
3 Lithium Framework
Identify Callback Nodes
Compute Predicate Nodes
Compute Update Nodes
Generate Summary Graphs
4 Using Predicate Callback Summaries
5 Experimental Results
6 Conclusions
3
Motivation
• Callback methods used extensively across Android API
• API calls can execute different sequences of callbacks
depending on the context
• Can be confusing for developers
• Tools need order of callback methods for interprocedural
analysis or test input generation
4
Motivation
5
Control Flow Analysis for Android: Related Work
• Lifecycle of Components
• FlowDroid [PLDI 2014] and IccTA [ICSE 2015]
• No-sleep Bug Detection Tool [MobiSys 2012]
• GUI Models
• MobiGUITAR (Black-box) [IEEE Software 2014]
• GATOR (Grey-box) [ICSE 2015]
• Fixed point permutation of callback methods
• Liang et al. [SPSM 2013]
• API Method Summaries
• EdgeMiner [NDSS 2015]
6
Outline
1 Motivation
2 Contributions: Predicate Callback Summaries
3 Lithium Framework
Identify Callback Nodes
Compute Predicate Nodes
Compute Update Nodes
Generate Summary Graphs
4 Using Predicate Callback Summaries
5 Experimental Results
6 Conclusions
7
Contributions: Predicate Callback Summaries
• Designed a summary representation for library methods,
called Predicate Callback Summaries (PCSs)
• all potential orders of callback methods called from an API
method
• conditions that determine the execution of such callback
methods
• Designed algorithm and tool to automatically generate
such summaries
• Provided an evaluation on algorithms and tool
8
Examples of Predicate Callback Summaries
Entry
g.thread == false
onCreate onStartCommand
startService Summary
onStartCommand
g.started = true
Exit
Entry
onUnbind
unbindService Summary
Exit
g.started != true
onDestroy
g.started = false
T F
T
F
1
2
5
6
7
1
2
3
4
5
6
• PCSs have three
types of nodes:
• Callback nodes
• Predicate nodes
• Update nodes
• Edges preserve the
original control flow in
API methods
9
Outline
1 Motivation
2 Contributions: Predicate Callback Summaries
3 Lithium Framework
Identify Callback Nodes
Compute Predicate Nodes
Compute Update Nodes
Generate Summary Graphs
4 Using Predicate Callback Summaries
5 Experimental Results
6 Conclusions
10
Lithium Framework
11
Outline
1 Motivation
2 Contributions: Predicate Callback Summaries
3 Lithium Framework
Identify Callback Nodes
Compute Predicate Nodes
Compute Update Nodes
Generate Summary Graphs
4 Using Predicate Callback Summaries
5 Experimental Results
6 Conclusions
12
1. Identify Callback Nodes
Scan the framework code to identify callback call sites using
pre-computed signatures of potential callback methods
api m2 m3
callback node
13
1. Identify Callback Nodes
Using backward traversal on the call graph we generate a call chain from the
API method to the callback call site {api → m2 → m3 → callback}
api m2 m3
callback node
14
Outline
1 Motivation
2 Contributions: Predicate Callback Summaries
3 Lithium Framework
Identify Callback Nodes
Compute Predicate Nodes
Compute Update Nodes
Generate Summary Graphs
4 Using Predicate Callback Summaries
5 Experimental Results
6 Conclusions
15
2. Compute Predicate Nodes
We identify all the conditional branch statements the decide whether the call-
back is executed or not
api m2 m3
16
Summarizing Predicate Nodes
In the example, the variable creatingLoader is solved to: (calling object,
LoaderManager, mCreatingLoader)
Simple Version of LoaderManager class
class LoaderManager {
Loader<D> initLoader(int id, Bundle args,
LoaderManager.LoaderCallbacks<D> c) {
LoaderManager r0 = this;
boolean creatingLoader = r0.mCreatingLoader
if ( creatingLoader == true ) {
throw new IllegalStateException("...");
}
LoaderInfo info = mLoaders.get(id);
if (info == null) {
creatingLoader = true;
c.onCreateLoader();
}
}
}
17
Outline
1 Motivation
2 Contributions: Predicate Callback Summaries
3 Lithium Framework
Identify Callback Nodes
Compute Predicate Nodes
Compute Update Nodes
Generate Summary Graphs
4 Using Predicate Callback Summaries
5 Experimental Results
6 Conclusions
18
3. Compute Update Nodes
• To identify update nodes we find all the statements that modify variables
that can be used in predicate nodes
• The left operand of the statement on green is solved to (calling object,
LoaderManager, mCreatingLoader)
Simple Version of LoaderManager class
class LoaderManager {
Loader<D> initLoader(int id, Bundle args,
LoaderManager.LoaderCallbacks<D> c) {
LoaderManager r0 = this;
boolean creatingLoader = r0.mCreatingLoader
if (creatingLoader == true) {
throw new IllegalStateException("...");
}
LoaderInfo info = mLoaders.get(id);
if (info == null) {
creatingLoader = true ;
c.onCreateLoader();
}
}
}
19
Outline
1 Motivation
2 Contributions: Predicate Callback Summaries
3 Lithium Framework
Identify Callback Nodes
Compute Predicate Nodes
Compute Update Nodes
Generate Summary Graphs
4 Using Predicate Callback Summaries
5 Experimental Results
6 Conclusions
20
4. Generate Summary Graph
• After we marked predicate, update and callback nodes
identified on the ICFG for each API method found
• We traverse the ICFG for API methods to obtain the
summary graph
21
4. Generate Summary Graph
api m2 m3Summary Graph
22
4. Generate Summary Graph
api m2 m3Summary Graph
23
4. Generate Summary Graph
api m2 m3Summary Graph
24
4. Generate Summary Graph
api m2 m3Summary Graph
15
25
4. Generate Summary Graph
api m2 m3Summary Graph
15
26
Outline
1 Motivation
2 Contributions: Predicate Callback Summaries
3 Lithium Framework
Identify Callback Nodes
Compute Predicate Nodes
Compute Update Nodes
Generate Summary Graphs
4 Using Predicate Callback Summaries
5 Experimental Results
6 Conclusions
27
Using Predicate Callback Summaries
• Built ICFGs for all entry points (top level functions) for a
given app
• Traversed the ICFG of each entry point and connect call
sites of API methods to their respective PCS
• Then analyzed the PCSs to connect callback nodes to
entry nodes of the ICFG of callback methods
• Generated graphs we called inter-callback ICFGs
28
Using Predicate Callback Summaries
ConnectBot Bug
class MyActivity
extends Activity {
void onStop() {
super.onStop();
this.unbindService(connection);
}
}
class MyService
extends Service {
boolean onUnbind(Intent i) {
...
}
void onDestroy() {
if (wifilock != null &&
wifilock.isHeld())
wifilock.release();
}
}
Entry
unbindService
(connection)
onStop
Exit
super.onStop()
Entry
onUnbind
Exit
return true
Entry
onDestroy
Exit
if (wifilock ...)
2
1
3
4
1
2
3
4
wifilock.release()
3
2
1
returns to onStop
from
unbindService
Entry
unbindService Summary
Exit
g.started != true
g.started = false
T
F
1
3
4
6
29
Outline
1 Motivation
2 Contributions: Predicate Callback Summaries
3 Lithium Framework
Identify Callback Nodes
Compute Predicate Nodes
Compute Update Nodes
Generate Summary Graphs
4 Using Predicate Callback Summaries
5 Experimental Results
6 Conclusions
30
Implementation and Experimental Setup
• Computed PCSs for 500 frequently invoked Android APIs
found in 930 apps from Google Play Market and F-droid
• Lithium uses Soot to build ICFGs of Android API methods
• Spark for pointer analysis and call graph construction
• Used 2 heuristics to reduce false positives:
• constraint the size of call chains
• constraint the number of possible callers when generating
call chains
31
Experimental Results: PCSs Are Compact
The results show that while the size of ICFG can reach up
to 208 k, the maximum size of the PCSs is 20772 nodes
– reduction of 99% on average
32
Experimental Results: Accuracy of PCSs
• Generate ground truth for 310 API methods with size of
ICFGs ≤ 1000
• precision of the tool is 97%
• recall of 85%
• For the rest we verify a sample of 300 callback nodes
reported
• The precision of the sample was 61%
• Most of the imprecisions were introduced by the call graph
generated for each API method.
33
Experimental Results: Efficiency of Computing PCSs
Time in Ascending Order
0 100 200 300 400 500
050010002000
Method
Time(s)
Time vs Size of Summary
0 5000 10000 15000 20000
050010002000
Size of Summary Graph
Time(s)
34
Experimental Results: Client Analysis
• Built Inter-callback ICFGs for 14 apps
• Average time of 0.3 seconds per app
• Found infeasible paths in 2 apps using predicate and
update nodes using Bodik’s infeasible path detection [FSE
1997]
• Callback sequences from inter-callback ICFGs are present
in 96 out of 97 dynamic traces
35
Outline
1 Motivation
2 Contributions: Predicate Callback Summaries
3 Lithium Framework
Identify Callback Nodes
Compute Predicate Nodes
Compute Update Nodes
Generate Summary Graphs
4 Using Predicate Callback Summaries
5 Experimental Results
6 Conclusions
36
Conclusions
• Specification for summarizing control flow of callbacks from
library methods
• Computed PCSs with high accuracy for large libraries
• PCSs are compact with 99% reduction over ICFGs
• PCSs allow a precise and fast client analysis on apps
• Future work includes integration of Inter-callback ICFGs
with GUI models
37
Questions?
Questions?
38
Compactness of PCSs
Size of ICFGs versus Size of PCSs
ICFG PCS Callbacks P-Node U-Node
min 2 0 0 0 0
avg 58604 330 55 154 120
max 208683 20772 5820 14794 3807
Experimental Results: Usefulness of PCSs
Construct Apps’ inter-callback ICFGs Using PCSs
App Callbacks API Calls
inter-callback ICFGs
Longest Path Time (s)
min ave max
com.blippex.app 21 4 1 1 2 2 0.2
net.sourceforge.andsys 22 12 1 6 15 9 0.1
com.darknessmap 25 11 1 2 5 4 0.1
de.onyxbits.remotekeyboard 41 29 1 2 4 5 0.2
com.example.android.contactslist 44 11 1 8 23 5 0.2
info.staticfree.SuperGenPass 50 20 2 4 7 5 0.0
com.markuspage.android.atimetracker 65 56 2 4 7 5 0.2
aarddict.android 66 28 1 3 10 13 0.3
de.ub0r.android.websms 73 89 0 3 8 6 0.3
com.google.zxing.client.android 83 14 1 5 34 84 0.2
a2dp.Vol 173 121 1 4 15 15 0.6
org.connectbot 176 108 1 6 27 43 1.1
org.openintents.filemanager 180 38 1 6 23 44 0.6
com.evancharlton.mileage 241 80 1 2 6 5 0.4
Experimental Results: Usefulness of PCSs
Compare Dynamic Traces and Static Paths
App
Traces Paths
covered-c total covered-p infeasible in traces not in traces
com.blippex 94% 12 12 0 77.8% 22.2%
net.sourceforge.andsys 81% 6 6 0 47% 53%
com.darknessmap 64% 6 6 0 63% 37%
com.example.android.contactslist 80% 6 6 12.5% 67.5% 20%
de.onyxbits.remotekeyboard 66% 6 6 0 56.2% 43.8%
info.staticfree.SuperGenPass 64% 6 6 20.8% 58.4% 20.8%
com.markuspage.android.atimetracker 47% 6 6 0 41% 59%
aarddict.android 65% 6 6 0 3% 97%
de.ub0r.android.websms 43% 6 6 0 21.5 78.5%
com.google.zxing.client.android 57% 6 0 0 0.3% 99.7%
org.openintents.filemanager 35% 10 10 0 4.2% 95.8%%
org.connectbot 41% 6 6 0 2% 98%
a2dp.Vol 47% 10 9 0 0.4% 99.6%
com.evancharlton.mileage 40% 6 6 0 33.8% 66.2%
Ad

More Related Content

What's hot (20)

Peterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionPeterson Critical Section Problem Solution
Peterson Critical Section Problem Solution
Bipul Chandra Kar
 
Vhdl lab manual
Vhdl lab manualVhdl lab manual
Vhdl lab manual
Mukul Mohal
 
Programs of VHDL
Programs of VHDLPrograms of VHDL
Programs of VHDL
Rkrishna Mishra
 
Verilog 語法教學
Verilog 語法教學 Verilog 語法教學
Verilog 語法教學
艾鍗科技
 
Mutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's AlgorithmMutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's Algorithm
Souvik Roy
 
ECET 340 Effective Communication/tutorialrank.com
 ECET 340 Effective Communication/tutorialrank.com ECET 340 Effective Communication/tutorialrank.com
ECET 340 Effective Communication/tutorialrank.com
jonhson203
 
An Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl pprAn Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl ppr
Prabhavathi P
 
verilog
verilogverilog
verilog
Shrikant Vaishnav
 
HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3
Linaro
 
Verilog overview
Verilog overviewVerilog overview
Verilog overview
posdege
 
Digital system design practical file
Digital system design practical fileDigital system design practical file
Digital system design practical file
Archita Misra
 
ECAD lab manual
ECAD lab manualECAD lab manual
ECAD lab manual
Dr. Swaminathan Kathirvel
 
SoCal Code Camp 2015: An introduction to Java 8
SoCal Code Camp 2015: An introduction to Java 8SoCal Code Camp 2015: An introduction to Java 8
SoCal Code Camp 2015: An introduction to Java 8
Chaitanya Ganoo
 
Behavioral modelling in VHDL
Behavioral modelling in VHDLBehavioral modelling in VHDL
Behavioral modelling in VHDL
Bhupendra Pratap Singh
 
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)
Nagarajan
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
Abhiraj Bohra
 
VHdl lab report
VHdl lab reportVHdl lab report
VHdl lab report
Jinesh Kb
 
Operating system critical section
Operating system   critical sectionOperating system   critical section
Operating system critical section
Harshana Madusanka Jayamaha
 
Mining Branch-Time Scenarios From Execution Logs
Mining Branch-Time Scenarios From Execution LogsMining Branch-Time Scenarios From Execution Logs
Mining Branch-Time Scenarios From Execution Logs
Dirk Fahland
 
Analysis of a Modified RC4
Analysis of a Modified RC4 Analysis of a Modified RC4
Analysis of a Modified RC4
Tharindu Weerasinghe
 
Peterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionPeterson Critical Section Problem Solution
Peterson Critical Section Problem Solution
Bipul Chandra Kar
 
Verilog 語法教學
Verilog 語法教學 Verilog 語法教學
Verilog 語法教學
艾鍗科技
 
Mutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's AlgorithmMutual Exclusion using Peterson's Algorithm
Mutual Exclusion using Peterson's Algorithm
Souvik Roy
 
ECET 340 Effective Communication/tutorialrank.com
 ECET 340 Effective Communication/tutorialrank.com ECET 340 Effective Communication/tutorialrank.com
ECET 340 Effective Communication/tutorialrank.com
jonhson203
 
An Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl pprAn Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl ppr
Prabhavathi P
 
HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3
Linaro
 
Verilog overview
Verilog overviewVerilog overview
Verilog overview
posdege
 
Digital system design practical file
Digital system design practical fileDigital system design practical file
Digital system design practical file
Archita Misra
 
SoCal Code Camp 2015: An introduction to Java 8
SoCal Code Camp 2015: An introduction to Java 8SoCal Code Camp 2015: An introduction to Java 8
SoCal Code Camp 2015: An introduction to Java 8
Chaitanya Ganoo
 
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)
Nagarajan
 
VHdl lab report
VHdl lab reportVHdl lab report
VHdl lab report
Jinesh Kb
 
Mining Branch-Time Scenarios From Execution Logs
Mining Branch-Time Scenarios From Execution LogsMining Branch-Time Scenarios From Execution Logs
Mining Branch-Time Scenarios From Execution Logs
Dirk Fahland
 

Similar to Generating Predicate Callback Summaries for the Android Framework (20)

Building source code level profiler for C++.pdf
Building source code level profiler for C++.pdfBuilding source code level profiler for C++.pdf
Building source code level profiler for C++.pdf
ssuser28de9e
 
Keeping Your Java Hot by Solving the JVM Warmup Problem
Keeping Your Java Hot by Solving the JVM Warmup ProblemKeeping Your Java Hot by Solving the JVM Warmup Problem
Keeping Your Java Hot by Solving the JVM Warmup Problem
Simon Ritter
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
IIUM
 
Software engineering module 4 notes for btech and mca
Software engineering module 4 notes for btech and mcaSoftware engineering module 4 notes for btech and mca
Software engineering module 4 notes for btech and mca
mca23mmci43
 
ql.io at NodePDX
ql.io at NodePDXql.io at NodePDX
ql.io at NodePDX
Subbu Allamaraju
 
Reducing computational complexity of Mathematical functions using FPGA
Reducing computational complexity of Mathematical functions using FPGAReducing computational complexity of Mathematical functions using FPGA
Reducing computational complexity of Mathematical functions using FPGA
nehagaur339
 
Using bluemix predictive analytics service in Node-RED
Using bluemix predictive analytics service in Node-REDUsing bluemix predictive analytics service in Node-RED
Using bluemix predictive analytics service in Node-RED
Lionel Mommeja
 
06 procedures
06 procedures06 procedures
06 procedures
Jomel Penalba
 
How to build a feedback loop in software
How to build a feedback loop in softwareHow to build a feedback loop in software
How to build a feedback loop in software
Sandeep Joshi
 
Tdd,Ioc
Tdd,IocTdd,Ioc
Tdd,Ioc
Antonio Radesca
 
Summarization Techniques for Code, Changes, and Testing
Summarization Techniques for Code, Changes, and TestingSummarization Techniques for Code, Changes, and Testing
Summarization Techniques for Code, Changes, and Testing
Sebastiano Panichella
 
02 intel v_tune_session_02
02 intel v_tune_session_0202 intel v_tune_session_02
02 intel v_tune_session_02
Vivek Singh Chandel
 
Java On CRaC
Java On CRaCJava On CRaC
Java On CRaC
Simon Ritter
 
What’s eating python performance
What’s eating python performanceWhat’s eating python performance
What’s eating python performance
Piotr Przymus
 
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
Ali Ouni
 
Express 070 536
Express 070 536Express 070 536
Express 070 536
chokkamedex
 
Code instrumentation
Code instrumentationCode instrumentation
Code instrumentation
Bryan Reinero
 
MAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsxMAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsx
BharathiLakshmiAAssi
 
matrixmultiplicationparallel.ppsx
matrixmultiplicationparallel.ppsxmatrixmultiplicationparallel.ppsx
matrixmultiplicationparallel.ppsx
Bharathi Lakshmi Pon
 
running stable diffusion on android
running stable diffusion on androidrunning stable diffusion on android
running stable diffusion on android
Koan-Sin Tan
 
Building source code level profiler for C++.pdf
Building source code level profiler for C++.pdfBuilding source code level profiler for C++.pdf
Building source code level profiler for C++.pdf
ssuser28de9e
 
Keeping Your Java Hot by Solving the JVM Warmup Problem
Keeping Your Java Hot by Solving the JVM Warmup ProblemKeeping Your Java Hot by Solving the JVM Warmup Problem
Keeping Your Java Hot by Solving the JVM Warmup Problem
Simon Ritter
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
IIUM
 
Software engineering module 4 notes for btech and mca
Software engineering module 4 notes for btech and mcaSoftware engineering module 4 notes for btech and mca
Software engineering module 4 notes for btech and mca
mca23mmci43
 
Reducing computational complexity of Mathematical functions using FPGA
Reducing computational complexity of Mathematical functions using FPGAReducing computational complexity of Mathematical functions using FPGA
Reducing computational complexity of Mathematical functions using FPGA
nehagaur339
 
Using bluemix predictive analytics service in Node-RED
Using bluemix predictive analytics service in Node-REDUsing bluemix predictive analytics service in Node-RED
Using bluemix predictive analytics service in Node-RED
Lionel Mommeja
 
How to build a feedback loop in software
How to build a feedback loop in softwareHow to build a feedback loop in software
How to build a feedback loop in software
Sandeep Joshi
 
Summarization Techniques for Code, Changes, and Testing
Summarization Techniques for Code, Changes, and TestingSummarization Techniques for Code, Changes, and Testing
Summarization Techniques for Code, Changes, and Testing
Sebastiano Panichella
 
What’s eating python performance
What’s eating python performanceWhat’s eating python performance
What’s eating python performance
Piotr Przymus
 
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
Ali Ouni
 
Code instrumentation
Code instrumentationCode instrumentation
Code instrumentation
Bryan Reinero
 
MAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsxMAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsx
BharathiLakshmiAAssi
 
running stable diffusion on android
running stable diffusion on androidrunning stable diffusion on android
running stable diffusion on android
Koan-Sin Tan
 
Ad

More from MobileSoft (20)

Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...
Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...
Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...
MobileSoft
 
Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...
MobileSoft
 
A Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile ApplicationsA Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile Applications
MobileSoft
 
Who Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for AndroidWho Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for Android
MobileSoft
 
Mobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative InvestigationMobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative Investigation
MobileSoft
 
Towards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App DevelopmentTowards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App Development
MobileSoft
 
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic RefactoringLeafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
MobileSoft
 
Same App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative StudySame App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative Study
MobileSoft
 
Performance-based Guidelines for Energy-efficient Mobile Applications
Performance-based Guidelines for Energy-efficient Mobile ApplicationsPerformance-based Guidelines for Energy-efficient Mobile Applications
Performance-based Guidelines for Energy-efficient Mobile Applications
MobileSoft
 
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
MobileSoft
 
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
MobileSoft
 
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic RefactoringLeafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
MobileSoft
 
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile AppsIFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
MobileSoft
 
Performance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile ApplicationsPerformance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile Applications
MobileSoft
 
Towards Architectural Styles for Android App Software Product Lines
Towards Architectural Styles for Android App Software Product LinesTowards Architectural Styles for Android App Software Product Lines
Towards Architectural Styles for Android App Software Product Lines
MobileSoft
 
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
MobileSoft
 
Authoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning ExperiencesAuthoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning Experiences
MobileSoft
 
ACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy ConcernsACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy Concerns
MobileSoft
 
Automatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android AppsAutomatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android Apps
MobileSoft
 
From reactive toproactive mobile security
From reactive toproactive mobile securityFrom reactive toproactive mobile security
From reactive toproactive mobile security
MobileSoft
 
Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...
Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...
Investigating Decreasing Energy Usage in Mobile Apps via Indistinguishable Co...
MobileSoft
 
Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...Predicting Android Application Security and Privacy Risk With Static Code Met...
Predicting Android Application Security and Privacy Risk With Static Code Met...
MobileSoft
 
A Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile ApplicationsA Framework for Regression Testing of Outdoor Mobile Applications
A Framework for Regression Testing of Outdoor Mobile Applications
MobileSoft
 
Who Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for AndroidWho Changed You? Obfuscator Identification for Android
Who Changed You? Obfuscator Identification for Android
MobileSoft
 
Mobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative InvestigationMobile App Development and Management: Results from a Qualitative Investigation
Mobile App Development and Management: Results from a Qualitative Investigation
MobileSoft
 
Towards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App DevelopmentTowards Mobile Twin Peaks for App Development
Towards Mobile Twin Peaks for App Development
MobileSoft
 
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic RefactoringLeafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
MobileSoft
 
Same App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative StudySame App, Different App Stores: A comparative Study
Same App, Different App Stores: A comparative Study
MobileSoft
 
Performance-based Guidelines for Energy-efficient Mobile Applications
Performance-based Guidelines for Energy-efficient Mobile ApplicationsPerformance-based Guidelines for Energy-efficient Mobile Applications
Performance-based Guidelines for Energy-efficient Mobile Applications
MobileSoft
 
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
Towards Native Code Offloading Platforms for Image Processing in Mobile Appli...
MobileSoft
 
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
Assessing the Impact of Service Workers on the Energy Efficiency of Progressi...
MobileSoft
 
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic RefactoringLeafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring
MobileSoft
 
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile AppsIFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
IFMLEdit.org: Model Driven Rapid Prototyping of Mobile Apps
MobileSoft
 
Performance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile ApplicationsPerformance-based Guidelines for Energy Efficient Mobile Applications
Performance-based Guidelines for Energy Efficient Mobile Applications
MobileSoft
 
Towards Architectural Styles for Android App Software Product Lines
Towards Architectural Styles for Android App Software Product LinesTowards Architectural Styles for Android App Software Product Lines
Towards Architectural Styles for Android App Software Product Lines
MobileSoft
 
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
CheckDroid: A Tool for Automated Detection of Bad Practices in Android Applic...
MobileSoft
 
Authoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning ExperiencesAuthoring Tool for Location-based Learning Experiences
Authoring Tool for Location-based Learning Experiences
MobileSoft
 
ACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy ConcernsACCUSE: Helping Users to minimize Android App Privacy Concerns
ACCUSE: Helping Users to minimize Android App Privacy Concerns
MobileSoft
 
Automatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android AppsAutomatically Locating Malicious Packages in Piggybacked Android Apps
Automatically Locating Malicious Packages in Piggybacked Android Apps
MobileSoft
 
From reactive toproactive mobile security
From reactive toproactive mobile securityFrom reactive toproactive mobile security
From reactive toproactive mobile security
MobileSoft
 
Ad

Recently uploaded (20)

Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdfTop Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
evrigsolution
 
Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025
Phil Eaton
 
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World ExamplesMastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
jamescantor38
 
Robotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptxRobotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptx
julia smits
 
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studiesTroubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Tier1 app
 
Why Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card ProvidersWhy Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card Providers
Tapitag
 
Buy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training techBuy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training tech
Rustici Software
 
Time Estimation: Expert Tips & Proven Project Techniques
Time Estimation: Expert Tips & Proven Project TechniquesTime Estimation: Expert Tips & Proven Project Techniques
Time Estimation: Expert Tips & Proven Project Techniques
Livetecs LLC
 
Download 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-ActivatedDownload 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-Activated
Web Designer
 
Unit Two - Java Architecture and OOPS
Unit Two  -   Java Architecture and OOPSUnit Two  -   Java Architecture and OOPS
Unit Two - Java Architecture and OOPS
Nabin Dhakal
 
Artificial hand using embedded system.pptx
Artificial hand using embedded system.pptxArtificial hand using embedded system.pptx
Artificial hand using embedded system.pptx
bhoomigowda12345
 
Medical Device Cybersecurity Threat & Risk Scoring
Medical Device Cybersecurity Threat & Risk ScoringMedical Device Cybersecurity Threat & Risk Scoring
Medical Device Cybersecurity Threat & Risk Scoring
ICS
 
Autodesk Inventor Crack (2025) Latest
Autodesk Inventor    Crack (2025) LatestAutodesk Inventor    Crack (2025) Latest
Autodesk Inventor Crack (2025) Latest
Google
 
How to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber PluginHow to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber Plugin
eGrabber
 
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by AjathMobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Ajath Infotech Technologies LLC
 
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb ClarkDeploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Peter Caitens
 
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
OnePlan Solutions
 
Adobe Media Encoder Crack FREE Download 2025
Adobe Media Encoder  Crack FREE Download 2025Adobe Media Encoder  Crack FREE Download 2025
Adobe Media Encoder Crack FREE Download 2025
zafranwaqar90
 
Do not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your causeDo not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your cause
Fexle Services Pvt. Ltd.
 
AEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural MeetingAEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural Meeting
jennaf3
 
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdfTop Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
evrigsolution
 
Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025
Phil Eaton
 
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World ExamplesMastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
jamescantor38
 
Robotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptxRobotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptx
julia smits
 
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studiesTroubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Tier1 app
 
Why Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card ProvidersWhy Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card Providers
Tapitag
 
Buy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training techBuy vs. Build: Unlocking the right path for your training tech
Buy vs. Build: Unlocking the right path for your training tech
Rustici Software
 
Time Estimation: Expert Tips & Proven Project Techniques
Time Estimation: Expert Tips & Proven Project TechniquesTime Estimation: Expert Tips & Proven Project Techniques
Time Estimation: Expert Tips & Proven Project Techniques
Livetecs LLC
 
Download 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-ActivatedDownload 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-Activated
Web Designer
 
Unit Two - Java Architecture and OOPS
Unit Two  -   Java Architecture and OOPSUnit Two  -   Java Architecture and OOPS
Unit Two - Java Architecture and OOPS
Nabin Dhakal
 
Artificial hand using embedded system.pptx
Artificial hand using embedded system.pptxArtificial hand using embedded system.pptx
Artificial hand using embedded system.pptx
bhoomigowda12345
 
Medical Device Cybersecurity Threat & Risk Scoring
Medical Device Cybersecurity Threat & Risk ScoringMedical Device Cybersecurity Threat & Risk Scoring
Medical Device Cybersecurity Threat & Risk Scoring
ICS
 
Autodesk Inventor Crack (2025) Latest
Autodesk Inventor    Crack (2025) LatestAutodesk Inventor    Crack (2025) Latest
Autodesk Inventor Crack (2025) Latest
Google
 
How to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber PluginHow to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber Plugin
eGrabber
 
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by AjathMobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Ajath Infotech Technologies LLC
 
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb ClarkDeploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Peter Caitens
 
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
OnePlan Solutions
 
Adobe Media Encoder Crack FREE Download 2025
Adobe Media Encoder  Crack FREE Download 2025Adobe Media Encoder  Crack FREE Download 2025
Adobe Media Encoder Crack FREE Download 2025
zafranwaqar90
 
Do not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your causeDo not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your cause
Fexle Services Pvt. Ltd.
 
AEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural MeetingAEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural Meeting
jennaf3
 

Generating Predicate Callback Summaries for the Android Framework

  • 1. Generating Predicate Callback Summaries for the Android Framework Danilo Dominguez Perez and Wei Le {danilo0,weile}@iastate.edu May 22, 2017 Departament of Computer Science Iowa State University 1
  • 2. Outline 1 Motivation 2 Contributions: Predicate Callback Summaries 3 Lithium Framework Identify Callback Nodes Compute Predicate Nodes Compute Update Nodes Generate Summary Graphs 4 Using Predicate Callback Summaries 5 Experimental Results 6 Conclusions 2
  • 3. Outline 1 Motivation 2 Contributions: Predicate Callback Summaries 3 Lithium Framework Identify Callback Nodes Compute Predicate Nodes Compute Update Nodes Generate Summary Graphs 4 Using Predicate Callback Summaries 5 Experimental Results 6 Conclusions 3
  • 4. Motivation • Callback methods used extensively across Android API • API calls can execute different sequences of callbacks depending on the context • Can be confusing for developers • Tools need order of callback methods for interprocedural analysis or test input generation 4
  • 6. Control Flow Analysis for Android: Related Work • Lifecycle of Components • FlowDroid [PLDI 2014] and IccTA [ICSE 2015] • No-sleep Bug Detection Tool [MobiSys 2012] • GUI Models • MobiGUITAR (Black-box) [IEEE Software 2014] • GATOR (Grey-box) [ICSE 2015] • Fixed point permutation of callback methods • Liang et al. [SPSM 2013] • API Method Summaries • EdgeMiner [NDSS 2015] 6
  • 7. Outline 1 Motivation 2 Contributions: Predicate Callback Summaries 3 Lithium Framework Identify Callback Nodes Compute Predicate Nodes Compute Update Nodes Generate Summary Graphs 4 Using Predicate Callback Summaries 5 Experimental Results 6 Conclusions 7
  • 8. Contributions: Predicate Callback Summaries • Designed a summary representation for library methods, called Predicate Callback Summaries (PCSs) • all potential orders of callback methods called from an API method • conditions that determine the execution of such callback methods • Designed algorithm and tool to automatically generate such summaries • Provided an evaluation on algorithms and tool 8
  • 9. Examples of Predicate Callback Summaries Entry g.thread == false onCreate onStartCommand startService Summary onStartCommand g.started = true Exit Entry onUnbind unbindService Summary Exit g.started != true onDestroy g.started = false T F T F 1 2 5 6 7 1 2 3 4 5 6 • PCSs have three types of nodes: • Callback nodes • Predicate nodes • Update nodes • Edges preserve the original control flow in API methods 9
  • 10. Outline 1 Motivation 2 Contributions: Predicate Callback Summaries 3 Lithium Framework Identify Callback Nodes Compute Predicate Nodes Compute Update Nodes Generate Summary Graphs 4 Using Predicate Callback Summaries 5 Experimental Results 6 Conclusions 10
  • 12. Outline 1 Motivation 2 Contributions: Predicate Callback Summaries 3 Lithium Framework Identify Callback Nodes Compute Predicate Nodes Compute Update Nodes Generate Summary Graphs 4 Using Predicate Callback Summaries 5 Experimental Results 6 Conclusions 12
  • 13. 1. Identify Callback Nodes Scan the framework code to identify callback call sites using pre-computed signatures of potential callback methods api m2 m3 callback node 13
  • 14. 1. Identify Callback Nodes Using backward traversal on the call graph we generate a call chain from the API method to the callback call site {api → m2 → m3 → callback} api m2 m3 callback node 14
  • 15. Outline 1 Motivation 2 Contributions: Predicate Callback Summaries 3 Lithium Framework Identify Callback Nodes Compute Predicate Nodes Compute Update Nodes Generate Summary Graphs 4 Using Predicate Callback Summaries 5 Experimental Results 6 Conclusions 15
  • 16. 2. Compute Predicate Nodes We identify all the conditional branch statements the decide whether the call- back is executed or not api m2 m3 16
  • 17. Summarizing Predicate Nodes In the example, the variable creatingLoader is solved to: (calling object, LoaderManager, mCreatingLoader) Simple Version of LoaderManager class class LoaderManager { Loader<D> initLoader(int id, Bundle args, LoaderManager.LoaderCallbacks<D> c) { LoaderManager r0 = this; boolean creatingLoader = r0.mCreatingLoader if ( creatingLoader == true ) { throw new IllegalStateException("..."); } LoaderInfo info = mLoaders.get(id); if (info == null) { creatingLoader = true; c.onCreateLoader(); } } } 17
  • 18. Outline 1 Motivation 2 Contributions: Predicate Callback Summaries 3 Lithium Framework Identify Callback Nodes Compute Predicate Nodes Compute Update Nodes Generate Summary Graphs 4 Using Predicate Callback Summaries 5 Experimental Results 6 Conclusions 18
  • 19. 3. Compute Update Nodes • To identify update nodes we find all the statements that modify variables that can be used in predicate nodes • The left operand of the statement on green is solved to (calling object, LoaderManager, mCreatingLoader) Simple Version of LoaderManager class class LoaderManager { Loader<D> initLoader(int id, Bundle args, LoaderManager.LoaderCallbacks<D> c) { LoaderManager r0 = this; boolean creatingLoader = r0.mCreatingLoader if (creatingLoader == true) { throw new IllegalStateException("..."); } LoaderInfo info = mLoaders.get(id); if (info == null) { creatingLoader = true ; c.onCreateLoader(); } } } 19
  • 20. Outline 1 Motivation 2 Contributions: Predicate Callback Summaries 3 Lithium Framework Identify Callback Nodes Compute Predicate Nodes Compute Update Nodes Generate Summary Graphs 4 Using Predicate Callback Summaries 5 Experimental Results 6 Conclusions 20
  • 21. 4. Generate Summary Graph • After we marked predicate, update and callback nodes identified on the ICFG for each API method found • We traverse the ICFG for API methods to obtain the summary graph 21
  • 22. 4. Generate Summary Graph api m2 m3Summary Graph 22
  • 23. 4. Generate Summary Graph api m2 m3Summary Graph 23
  • 24. 4. Generate Summary Graph api m2 m3Summary Graph 24
  • 25. 4. Generate Summary Graph api m2 m3Summary Graph 15 25
  • 26. 4. Generate Summary Graph api m2 m3Summary Graph 15 26
  • 27. Outline 1 Motivation 2 Contributions: Predicate Callback Summaries 3 Lithium Framework Identify Callback Nodes Compute Predicate Nodes Compute Update Nodes Generate Summary Graphs 4 Using Predicate Callback Summaries 5 Experimental Results 6 Conclusions 27
  • 28. Using Predicate Callback Summaries • Built ICFGs for all entry points (top level functions) for a given app • Traversed the ICFG of each entry point and connect call sites of API methods to their respective PCS • Then analyzed the PCSs to connect callback nodes to entry nodes of the ICFG of callback methods • Generated graphs we called inter-callback ICFGs 28
  • 29. Using Predicate Callback Summaries ConnectBot Bug class MyActivity extends Activity { void onStop() { super.onStop(); this.unbindService(connection); } } class MyService extends Service { boolean onUnbind(Intent i) { ... } void onDestroy() { if (wifilock != null && wifilock.isHeld()) wifilock.release(); } } Entry unbindService (connection) onStop Exit super.onStop() Entry onUnbind Exit return true Entry onDestroy Exit if (wifilock ...) 2 1 3 4 1 2 3 4 wifilock.release() 3 2 1 returns to onStop from unbindService Entry unbindService Summary Exit g.started != true g.started = false T F 1 3 4 6 29
  • 30. Outline 1 Motivation 2 Contributions: Predicate Callback Summaries 3 Lithium Framework Identify Callback Nodes Compute Predicate Nodes Compute Update Nodes Generate Summary Graphs 4 Using Predicate Callback Summaries 5 Experimental Results 6 Conclusions 30
  • 31. Implementation and Experimental Setup • Computed PCSs for 500 frequently invoked Android APIs found in 930 apps from Google Play Market and F-droid • Lithium uses Soot to build ICFGs of Android API methods • Spark for pointer analysis and call graph construction • Used 2 heuristics to reduce false positives: • constraint the size of call chains • constraint the number of possible callers when generating call chains 31
  • 32. Experimental Results: PCSs Are Compact The results show that while the size of ICFG can reach up to 208 k, the maximum size of the PCSs is 20772 nodes – reduction of 99% on average 32
  • 33. Experimental Results: Accuracy of PCSs • Generate ground truth for 310 API methods with size of ICFGs ≤ 1000 • precision of the tool is 97% • recall of 85% • For the rest we verify a sample of 300 callback nodes reported • The precision of the sample was 61% • Most of the imprecisions were introduced by the call graph generated for each API method. 33
  • 34. Experimental Results: Efficiency of Computing PCSs Time in Ascending Order 0 100 200 300 400 500 050010002000 Method Time(s) Time vs Size of Summary 0 5000 10000 15000 20000 050010002000 Size of Summary Graph Time(s) 34
  • 35. Experimental Results: Client Analysis • Built Inter-callback ICFGs for 14 apps • Average time of 0.3 seconds per app • Found infeasible paths in 2 apps using predicate and update nodes using Bodik’s infeasible path detection [FSE 1997] • Callback sequences from inter-callback ICFGs are present in 96 out of 97 dynamic traces 35
  • 36. Outline 1 Motivation 2 Contributions: Predicate Callback Summaries 3 Lithium Framework Identify Callback Nodes Compute Predicate Nodes Compute Update Nodes Generate Summary Graphs 4 Using Predicate Callback Summaries 5 Experimental Results 6 Conclusions 36
  • 37. Conclusions • Specification for summarizing control flow of callbacks from library methods • Computed PCSs with high accuracy for large libraries • PCSs are compact with 99% reduction over ICFGs • PCSs allow a precise and fast client analysis on apps • Future work includes integration of Inter-callback ICFGs with GUI models 37
  • 39. Compactness of PCSs Size of ICFGs versus Size of PCSs ICFG PCS Callbacks P-Node U-Node min 2 0 0 0 0 avg 58604 330 55 154 120 max 208683 20772 5820 14794 3807
  • 40. Experimental Results: Usefulness of PCSs Construct Apps’ inter-callback ICFGs Using PCSs App Callbacks API Calls inter-callback ICFGs Longest Path Time (s) min ave max com.blippex.app 21 4 1 1 2 2 0.2 net.sourceforge.andsys 22 12 1 6 15 9 0.1 com.darknessmap 25 11 1 2 5 4 0.1 de.onyxbits.remotekeyboard 41 29 1 2 4 5 0.2 com.example.android.contactslist 44 11 1 8 23 5 0.2 info.staticfree.SuperGenPass 50 20 2 4 7 5 0.0 com.markuspage.android.atimetracker 65 56 2 4 7 5 0.2 aarddict.android 66 28 1 3 10 13 0.3 de.ub0r.android.websms 73 89 0 3 8 6 0.3 com.google.zxing.client.android 83 14 1 5 34 84 0.2 a2dp.Vol 173 121 1 4 15 15 0.6 org.connectbot 176 108 1 6 27 43 1.1 org.openintents.filemanager 180 38 1 6 23 44 0.6 com.evancharlton.mileage 241 80 1 2 6 5 0.4
  • 41. Experimental Results: Usefulness of PCSs Compare Dynamic Traces and Static Paths App Traces Paths covered-c total covered-p infeasible in traces not in traces com.blippex 94% 12 12 0 77.8% 22.2% net.sourceforge.andsys 81% 6 6 0 47% 53% com.darknessmap 64% 6 6 0 63% 37% com.example.android.contactslist 80% 6 6 12.5% 67.5% 20% de.onyxbits.remotekeyboard 66% 6 6 0 56.2% 43.8% info.staticfree.SuperGenPass 64% 6 6 20.8% 58.4% 20.8% com.markuspage.android.atimetracker 47% 6 6 0 41% 59% aarddict.android 65% 6 6 0 3% 97% de.ub0r.android.websms 43% 6 6 0 21.5 78.5% com.google.zxing.client.android 57% 6 0 0 0.3% 99.7% org.openintents.filemanager 35% 10 10 0 4.2% 95.8%% org.connectbot 41% 6 6 0 2% 98% a2dp.Vol 47% 10 9 0 0.4% 99.6% com.evancharlton.mileage 40% 6 6 0 33.8% 66.2%
  翻译: