SlideShare ist ein Scribd-Unternehmen logo
1 von 34
How We Get There: 
A Context-Guided Search 
Strategy in Concolic Testing 
Hyunmin Seo and Sunghun Kim 
The Hong Kong University of Science and Technology 
Nov. 19 2014 
FSE, Hong Kong
Concolic Testing 
2 
푝푐1 
푝푐2 
푝푐3 
푝푐4 
휋1 
푰ퟏ 
b9 
푃퐶 = 푝푐1⋀푝푐2⋀푝푐3⋀푝푐4⋀… 
푃퐶′ = 푝푐1⋀푝푐2⋀¬푝푐3 
푰ퟑ 
휋2 휋1 휋3 
b1 
b2 
b3 
b4 
푰ퟐ 
⟹ 
Execution Tree 
푰ퟐ 
b1 
b2 
b9 
b10 
휋2 휋1
Path Explosion Challenge 
• Exponentially many execution paths 
3 
4 conditional nodes 16 (24) execution paths
Path Explosion Challenge 
• grep – text search utility 
• 19K LOC 
• Statically - 4K branches in CFG 
• Dynamically - 8K branches in 
an execution path 
4 
*CFG of re_match_2_internal in grep
Search Strategy 
• Given a limited testing budget, select high-priority 
branches first to improve coverage fast 
5 
• Run 푷 with a concrete input 푰 
• Execution path 흅 = 풃ퟏ풃ퟐ풃ퟑ … 
• Select a branch 풃풊 
• Generate 푰′ for 흅′ = 풃ퟏ풃ퟐ풃ퟑ…풃 풊 
• By symbolic execution and constraint solving 
Repeat
Existing Search Strategies 
6 
DFS BFS Random
Coverage-Optimized Strategies 
7 
• CFG – How far is any 
uncovered branch from this? 
• CarFast – How many can be 
covered by this? 
• Generational – How many 
are actually covered by this?
Context-Guided Search 
Considers context of a branch 
and selects a branch 
in the new context 
8
Intuition behind CGS 
Explore diverse state of P 
by avoiding exploring the same state 
- “same” in the limited context 
9
CGS Example 
10 
b7 b8 
b7 b7 b7 b7 
휋1 휋2 휋3 휋4 
b5 b6
CGS Example 
b6 b6 b6 b5 
11 
b5 b6 
b7 b8 
b7 b7 b7 b7 
휋1 휋2 휋3 휋4 
SELECT SKIP SKIP SELECT
Context 
•k-Context of branch b 
• A sequence of k preceding branches 
of b in an execution path 
• Example 
• 3-Context of b6 : (b6, b4, b1) 
12 
b2 
b4 
b6 
π1 
b1 
b3 
b5
Optimal k 
• 1-Context 
• Select each branch only once 
• ∞-Context 
• Select all branches 
• Optimal k for the best coverage depends on 
• Testing budget 
• Characteristic of the subjects 
13
Incremental Search 
14 
BFS traversal 
1-context 2-context 3-context
Dominators 
if every path from the entry node 
to node n must go through node d 
15 
Node d dominates node n, 
Dom(b11) {b9, b7, b5, b3} 
2-Context of b11 along 흅ퟏ= (b11, b9) 
2-Context of b11 along 흅ퟐ= (b11, b9) 
2-Context of b11 along 흅ퟏ= (b11, b1) 
2-Context of b11 along 흅ퟐ= (b11, b2) 
b1 b2 
b3 
b5 
b7 
b9 
b11 
b4 
b6 
b8 
b10 
b12 
π1 π2
Research Questions 
• RQ1 – Given the same testing budget, how many 
branches can be covered? 
• RQ2 – Given a target coverage goal, how many 
iterations are required to achieve the goal? 
• RQ3 – What is the effect of dominators and 
incremental k? 
• RQ4 – How different are the covered branch sets by 
different strategies? 
16
Evaluation Subjects 
17 
Subject Testing Tool Language LOC 
grep CREST C 19K 
replace CREST C 0.5K 
expat CREST C 18K 
cdaudio CREST C 2K 
floppy CREST C 1.5K 
kbfiltr CREST C 1K 
tp300 CarFastTool Java 0.3K 
tp600 CarFastTool Java 0.6K 
tp1k CarFastTool Java 1.5K 
tp2k CarFastTool Java 2.4K 
tp5k CarFastTool Java 5.8K 
tp10k CarFastTool Java 28K
18 
RQ1-Coverage – C Subjects
19 
RQ1-Coverage – C Subjects
RQ1-Coverage - Java Subjects 
20 
350 
300 
250 
200 
150 
100 
tp600 
0 500 1000 1500 
Number of branches covered 
Iterations 
CGS 
CarFast
RQ2 – Reaching the Target 
(C Subjects) 
21
RQ2 – Reaching the Target 
(Java Subjects) 
22
RQ3 - Effect of Dominators 
23
RQ3 - Effect of Incremental 
Search 
24
RQ4 - Comparison of 
Covered Branch Sets 
CovCGS - A set of branches covered by CGS 
CovOthers - A set of branches covered by other strategies 
CovOthers ≤ |CovCGS| 
Cov CovCGS Others 
25 
CovCGS 
CovOthers
RQ4 - Comparison of 
Covered Branch Sets 
26 
CovCGS 
CovOthers 
replace, cdaudio, floppy, kbfiltr 
Tp300, tp600, tp1k, tp2k 
CovOthers ⊆ |CovCGS| 
grep 
CovOthers 
− 
CovCGS 
|CovCGS| 
= 0.1 ~ 3% 
Cov CovCGS CFG 
61 1606 383
Threats to Validity 
• Precision in Symbolic Execution 
• Non-linear expression, Floating-Point operations, Symbolic 
pointer dereferencing 
• Input vector 
• Size of input, Optional arguments 
• External Validity 
• Test subjects and strategies might not be representative 
27
Summary 
• Path explosion challenge in Concolic testing 
• Search strategies prioritizes branches according to some criteria 
• CGS 
• Selects branches in the new context 
• Use dominators to exclude irrelevant branches 
• BFS search + incrementally increase of the size of context 
• Evaluation on six C and six Java subjects 
• Achieved the highest coverage on all twelve subjects 
• Reached the target much faster on most subjects 
28
Backup Slides 
29
Coverage 
for 
C Subjects 
30
Coverage for Java Subjects 
31 
Mann-Whitney U test P-value < 0.01
Related Work 
• Pruning Redundant Path 
• RWset [Cristian ‘08] 
• Interpolation [Jaffar ’13] 
• Function Summary 
• Compositional [Godefroid ‘07, ‘10] 
• Demand-driven compositional [Anand ‘08] 
• Others 
• Fitness-guided approach [Xie ’09], Sub-path guided [Li ‘13] 
• Hybrid [Majumdar ‘07] 
32
Branch Selection in CGS 
33
Search Strategies in KLEE 
34

Weitere ähnliche Inhalte

Was ist angesagt?

Improving Fault Localization for Simulink Models using Search-Based Testing a...
Improving Fault Localization for Simulink Models using Search-Based Testing a...Improving Fault Localization for Simulink Models using Search-Based Testing a...
Improving Fault Localization for Simulink Models using Search-Based Testing a...
Lionel Briand
 
A Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution TechniquesA Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution Techniques
Sung Kim
 
The Road Not Taken: Estimating Path Execution Frequency Statically
The Road Not Taken: Estimating Path Execution Frequency StaticallyThe Road Not Taken: Estimating Path Execution Frequency Statically
The Road Not Taken: Estimating Path Execution Frequency Statically
Ray Buse
 
Extracting Domain Models from Natural-Language Requirements: Approach and Ind...
Extracting Domain Models from Natural-Language Requirements: Approach and Ind...Extracting Domain Models from Natural-Language Requirements: Approach and Ind...
Extracting Domain Models from Natural-Language Requirements: Approach and Ind...
Lionel Briand
 
Approximation-Refinement Testing of Compute-Intensive Cyber-Physical Models: ...
Approximation-Refinement Testing of Compute-Intensive Cyber-Physical Models: ...Approximation-Refinement Testing of Compute-Intensive Cyber-Physical Models: ...
Approximation-Refinement Testing of Compute-Intensive Cyber-Physical Models: ...
Lionel Briand
 
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...
Lionel Briand
 
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Feng Zhang
 
Automated Change Impact Analysis between SysML Models of Requirements and Design
Automated Change Impact Analysis between SysML Models of Requirements and DesignAutomated Change Impact Analysis between SysML Models of Requirements and Design
Automated Change Impact Analysis between SysML Models of Requirements and Design
Lionel Briand
 
Automock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code GenerationAutomock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code Generation
Sabrina Souto
 

Was ist angesagt? (20)

Transfer defect learning
Transfer defect learningTransfer defect learning
Transfer defect learning
 
Mobilesoft 2017 Keynote
Mobilesoft 2017 KeynoteMobilesoft 2017 Keynote
Mobilesoft 2017 Keynote
 
Software Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled DatasetsSoftware Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled Datasets
 
Improving Fault Localization for Simulink Models using Search-Based Testing a...
Improving Fault Localization for Simulink Models using Search-Based Testing a...Improving Fault Localization for Simulink Models using Search-Based Testing a...
Improving Fault Localization for Simulink Models using Search-Based Testing a...
 
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
Partitioning Composite Code Changes to Facilitate Code Review (MSR2015)
 
A Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution TechniquesA Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution Techniques
 
The Road Not Taken: Estimating Path Execution Frequency Statically
The Road Not Taken: Estimating Path Execution Frequency StaticallyThe Road Not Taken: Estimating Path Execution Frequency Statically
The Road Not Taken: Estimating Path Execution Frequency Statically
 
Dissertation Defense
Dissertation DefenseDissertation Defense
Dissertation Defense
 
Extracting Domain Models from Natural-Language Requirements: Approach and Ind...
Extracting Domain Models from Natural-Language Requirements: Approach and Ind...Extracting Domain Models from Natural-Language Requirements: Approach and Ind...
Extracting Domain Models from Natural-Language Requirements: Approach and Ind...
 
Approximation-Refinement Testing of Compute-Intensive Cyber-Physical Models: ...
Approximation-Refinement Testing of Compute-Intensive Cyber-Physical Models: ...Approximation-Refinement Testing of Compute-Intensive Cyber-Physical Models: ...
Approximation-Refinement Testing of Compute-Intensive Cyber-Physical Models: ...
 
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...
 
Triantafyllia Voulibasi
Triantafyllia VoulibasiTriantafyllia Voulibasi
Triantafyllia Voulibasi
 
Applications of Machine Learning and Metaheuristic Search to Security Testing
Applications of Machine Learning and Metaheuristic Search to Security TestingApplications of Machine Learning and Metaheuristic Search to Security Testing
Applications of Machine Learning and Metaheuristic Search to Security Testing
 
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
Cross-project Defect Prediction Using A Connectivity-based Unsupervised Class...
 
Survey on Software Defect Prediction
Survey on Software Defect PredictionSurvey on Software Defect Prediction
Survey on Software Defect Prediction
 
Automated Change Impact Analysis between SysML Models of Requirements and Design
Automated Change Impact Analysis between SysML Models of Requirements and DesignAutomated Change Impact Analysis between SysML Models of Requirements and Design
Automated Change Impact Analysis between SysML Models of Requirements and Design
 
Fut Lsi
Fut LsiFut Lsi
Fut Lsi
 
Formal verification
Formal verificationFormal verification
Formal verification
 
Automock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code GenerationAutomock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code Generation
 
Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...Scalable Software Testing and Verification of Non-Functional Properties throu...
Scalable Software Testing and Verification of Non-Functional Properties throu...
 

Andere mochten auch

Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Sung Kim
 
Source code comprehension on evolving software
Source code comprehension on evolving softwareSource code comprehension on evolving software
Source code comprehension on evolving software
Sung Kim
 

Andere mochten auch (10)

Visualizing Symbolic Execution with Bokeh
Visualizing Symbolic Execution with BokehVisualizing Symbolic Execution with Bokeh
Visualizing Symbolic Execution with Bokeh
 
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
 
How Do Software Engineers Understand Code Changes? FSE 2012
How Do Software Engineers Understand Code Changes? FSE 2012How Do Software Engineers Understand Code Changes? FSE 2012
How Do Software Engineers Understand Code Changes? FSE 2012
 
The Anatomy of Developer Social Networks
The Anatomy of Developer Social NetworksThe Anatomy of Developer Social Networks
The Anatomy of Developer Social Networks
 
Source code comprehension on evolving software
Source code comprehension on evolving softwareSource code comprehension on evolving software
Source code comprehension on evolving software
 
Automatic patch generation learned from human written patches
Automatic patch generation learned from human written patchesAutomatic patch generation learned from human written patches
Automatic patch generation learned from human written patches
 
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
 
A Survey on Automatic Test Generation and Crash Reproduction
A Survey on Automatic Test Generation and Crash ReproductionA Survey on Automatic Test Generation and Crash Reproduction
A Survey on Automatic Test Generation and Crash Reproduction
 
Tensor board
Tensor boardTensor board
Tensor board
 
Time series classification
Time series classificationTime series classification
Time series classification
 

Ähnlich wie How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2014)

Stephan berg track f
Stephan berg   track fStephan berg   track f
Stephan berg track f
Alona Gradman
 
Optimization of Resource Provisioning Cost in Cloud Computing
Optimization of Resource Provisioning Cost in Cloud ComputingOptimization of Resource Provisioning Cost in Cloud Computing
Optimization of Resource Provisioning Cost in Cloud Computing
Aswin Kalarickal
 

Ähnlich wie How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2014) (20)

Benchmarking Elastic Cloud Big Data Services under SLA Constraints
Benchmarking Elastic Cloud Big Data Services under SLA ConstraintsBenchmarking Elastic Cloud Big Data Services under SLA Constraints
Benchmarking Elastic Cloud Big Data Services under SLA Constraints
 
Stephan berg track f
Stephan berg   track fStephan berg   track f
Stephan berg track f
 
Deep Learning Initiative @ NECSTLab
Deep Learning Initiative @ NECSTLabDeep Learning Initiative @ NECSTLab
Deep Learning Initiative @ NECSTLab
 
Demystifying Garbage Collection in Java
Demystifying Garbage Collection in JavaDemystifying Garbage Collection in Java
Demystifying Garbage Collection in Java
 
150807 Fast R-CNN
150807 Fast R-CNN150807 Fast R-CNN
150807 Fast R-CNN
 
Preso-v0.1
Preso-v0.1Preso-v0.1
Preso-v0.1
 
Callgraph analysis
Callgraph analysisCallgraph analysis
Callgraph analysis
 
NTCIR15WWW3overview
NTCIR15WWW3overviewNTCIR15WWW3overview
NTCIR15WWW3overview
 
Training CNNs with Selective Allocation of Channels (ICML 2019)
Training CNNs with Selective Allocation of Channels (ICML 2019)Training CNNs with Selective Allocation of Channels (ICML 2019)
Training CNNs with Selective Allocation of Channels (ICML 2019)
 
Request-Oriented Durable Write Caching for Application Performance (USENIX AT...
Request-Oriented Durable Write Caching for Application Performance (USENIX AT...Request-Oriented Durable Write Caching for Application Performance (USENIX AT...
Request-Oriented Durable Write Caching for Application Performance (USENIX AT...
 
Optimization of Resource Provisioning Cost in Cloud Computing
Optimization of Resource Provisioning Cost in Cloud ComputingOptimization of Resource Provisioning Cost in Cloud Computing
Optimization of Resource Provisioning Cost in Cloud Computing
 
Elasticsearch Sharding Strategy at Tubular Labs
Elasticsearch Sharding Strategy at Tubular LabsElasticsearch Sharding Strategy at Tubular Labs
Elasticsearch Sharding Strategy at Tubular Labs
 
Constraint Programming in Compiler Optimization: Lessons Learned
Constraint Programming in Compiler Optimization: Lessons LearnedConstraint Programming in Compiler Optimization: Lessons Learned
Constraint Programming in Compiler Optimization: Lessons Learned
 
Using Modular Topologies in Kafka Streams to scale ksqlDB’s persistent querie...
Using Modular Topologies in Kafka Streams to scale ksqlDB’s persistent querie...Using Modular Topologies in Kafka Streams to scale ksqlDB’s persistent querie...
Using Modular Topologies in Kafka Streams to scale ksqlDB’s persistent querie...
 
Two strategies for large-scale multi-label classification on the YouTube-8M d...
Two strategies for large-scale multi-label classification on the YouTube-8M d...Two strategies for large-scale multi-label classification on the YouTube-8M d...
Two strategies for large-scale multi-label classification on the YouTube-8M d...
 
Week5-Faster R-CNN.pptx
Week5-Faster R-CNN.pptxWeek5-Faster R-CNN.pptx
Week5-Faster R-CNN.pptx
 
Siddhi kadam, MTech dissertation
Siddhi kadam, MTech dissertationSiddhi kadam, MTech dissertation
Siddhi kadam, MTech dissertation
 
Faster R-CNN - PR012
Faster R-CNN - PR012Faster R-CNN - PR012
Faster R-CNN - PR012
 
Performance Analysis of Lattice QCD with APGAS Programming Model
Performance Analysis of Lattice QCD with APGAS Programming ModelPerformance Analysis of Lattice QCD with APGAS Programming Model
Performance Analysis of Lattice QCD with APGAS Programming Model
 
Scikit-Learn: Machine Learning in Python
Scikit-Learn: Machine Learning in PythonScikit-Learn: Machine Learning in Python
Scikit-Learn: Machine Learning in Python
 

Mehr von Sung Kim

DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence LearningDeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
Sung Kim
 
MSR2014 opening
MSR2014 openingMSR2014 opening
MSR2014 opening
Sung Kim
 
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
Sung Kim
 
Self-defending software: Automatically patching errors in deployed software ...
Self-defending software: Automatically patching  errors in deployed software ...Self-defending software: Automatically patching  errors in deployed software ...
Self-defending software: Automatically patching errors in deployed software ...
Sung Kim
 

Mehr von Sung Kim (9)

DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence LearningDeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
DeepAM: Migrate APIs with Multi-modal Sequence to Sequence Learning
 
MSR2014 opening
MSR2014 openingMSR2014 opening
MSR2014 opening
 
Defect, defect, defect: PROMISE 2012 Keynote
Defect, defect, defect: PROMISE 2012 Keynote Defect, defect, defect: PROMISE 2012 Keynote
Defect, defect, defect: PROMISE 2012 Keynote
 
Predicting Recurring Crash Stacks (ASE 2012)
Predicting Recurring Crash Stacks (ASE 2012)Predicting Recurring Crash Stacks (ASE 2012)
Predicting Recurring Crash Stacks (ASE 2012)
 
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
Puzzle-Based Automatic Testing: Bringing Humans Into the Loop by Solving Puzz...
 
Software Development Meets the Wisdom of Crowds
Software Development Meets the Wisdom of CrowdsSoftware Development Meets the Wisdom of Crowds
Software Development Meets the Wisdom of Crowds
 
BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)
BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)
BugTriage with Bug Tossing Graphs (ESEC/FSE 2009)
 
Self-defending software: Automatically patching errors in deployed software ...
Self-defending software: Automatically patching  errors in deployed software ...Self-defending software: Automatically patching  errors in deployed software ...
Self-defending software: Automatically patching errors in deployed software ...
 
ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)
ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)
ReCrash: Making crashes reproducible by preserving object states (ECOOP 2008)
 

Kürzlich hochgeladen

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Kürzlich hochgeladen (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 

How We Get There: A Context-Guided Search Strategy in Concolic Testing (FSE 2014)

  • 1. How We Get There: A Context-Guided Search Strategy in Concolic Testing Hyunmin Seo and Sunghun Kim The Hong Kong University of Science and Technology Nov. 19 2014 FSE, Hong Kong
  • 2. Concolic Testing 2 푝푐1 푝푐2 푝푐3 푝푐4 휋1 푰ퟏ b9 푃퐶 = 푝푐1⋀푝푐2⋀푝푐3⋀푝푐4⋀… 푃퐶′ = 푝푐1⋀푝푐2⋀¬푝푐3 푰ퟑ 휋2 휋1 휋3 b1 b2 b3 b4 푰ퟐ ⟹ Execution Tree 푰ퟐ b1 b2 b9 b10 휋2 휋1
  • 3. Path Explosion Challenge • Exponentially many execution paths 3 4 conditional nodes 16 (24) execution paths
  • 4. Path Explosion Challenge • grep – text search utility • 19K LOC • Statically - 4K branches in CFG • Dynamically - 8K branches in an execution path 4 *CFG of re_match_2_internal in grep
  • 5. Search Strategy • Given a limited testing budget, select high-priority branches first to improve coverage fast 5 • Run 푷 with a concrete input 푰 • Execution path 흅 = 풃ퟏ풃ퟐ풃ퟑ … • Select a branch 풃풊 • Generate 푰′ for 흅′ = 풃ퟏ풃ퟐ풃ퟑ…풃 풊 • By symbolic execution and constraint solving Repeat
  • 6. Existing Search Strategies 6 DFS BFS Random
  • 7. Coverage-Optimized Strategies 7 • CFG – How far is any uncovered branch from this? • CarFast – How many can be covered by this? • Generational – How many are actually covered by this?
  • 8. Context-Guided Search Considers context of a branch and selects a branch in the new context 8
  • 9. Intuition behind CGS Explore diverse state of P by avoiding exploring the same state - “same” in the limited context 9
  • 10. CGS Example 10 b7 b8 b7 b7 b7 b7 휋1 휋2 휋3 휋4 b5 b6
  • 11. CGS Example b6 b6 b6 b5 11 b5 b6 b7 b8 b7 b7 b7 b7 휋1 휋2 휋3 휋4 SELECT SKIP SKIP SELECT
  • 12. Context •k-Context of branch b • A sequence of k preceding branches of b in an execution path • Example • 3-Context of b6 : (b6, b4, b1) 12 b2 b4 b6 π1 b1 b3 b5
  • 13. Optimal k • 1-Context • Select each branch only once • ∞-Context • Select all branches • Optimal k for the best coverage depends on • Testing budget • Characteristic of the subjects 13
  • 14. Incremental Search 14 BFS traversal 1-context 2-context 3-context
  • 15. Dominators if every path from the entry node to node n must go through node d 15 Node d dominates node n, Dom(b11) {b9, b7, b5, b3} 2-Context of b11 along 흅ퟏ= (b11, b9) 2-Context of b11 along 흅ퟐ= (b11, b9) 2-Context of b11 along 흅ퟏ= (b11, b1) 2-Context of b11 along 흅ퟐ= (b11, b2) b1 b2 b3 b5 b7 b9 b11 b4 b6 b8 b10 b12 π1 π2
  • 16. Research Questions • RQ1 – Given the same testing budget, how many branches can be covered? • RQ2 – Given a target coverage goal, how many iterations are required to achieve the goal? • RQ3 – What is the effect of dominators and incremental k? • RQ4 – How different are the covered branch sets by different strategies? 16
  • 17. Evaluation Subjects 17 Subject Testing Tool Language LOC grep CREST C 19K replace CREST C 0.5K expat CREST C 18K cdaudio CREST C 2K floppy CREST C 1.5K kbfiltr CREST C 1K tp300 CarFastTool Java 0.3K tp600 CarFastTool Java 0.6K tp1k CarFastTool Java 1.5K tp2k CarFastTool Java 2.4K tp5k CarFastTool Java 5.8K tp10k CarFastTool Java 28K
  • 18. 18 RQ1-Coverage – C Subjects
  • 19. 19 RQ1-Coverage – C Subjects
  • 20. RQ1-Coverage - Java Subjects 20 350 300 250 200 150 100 tp600 0 500 1000 1500 Number of branches covered Iterations CGS CarFast
  • 21. RQ2 – Reaching the Target (C Subjects) 21
  • 22. RQ2 – Reaching the Target (Java Subjects) 22
  • 23. RQ3 - Effect of Dominators 23
  • 24. RQ3 - Effect of Incremental Search 24
  • 25. RQ4 - Comparison of Covered Branch Sets CovCGS - A set of branches covered by CGS CovOthers - A set of branches covered by other strategies CovOthers ≤ |CovCGS| Cov CovCGS Others 25 CovCGS CovOthers
  • 26. RQ4 - Comparison of Covered Branch Sets 26 CovCGS CovOthers replace, cdaudio, floppy, kbfiltr Tp300, tp600, tp1k, tp2k CovOthers ⊆ |CovCGS| grep CovOthers − CovCGS |CovCGS| = 0.1 ~ 3% Cov CovCGS CFG 61 1606 383
  • 27. Threats to Validity • Precision in Symbolic Execution • Non-linear expression, Floating-Point operations, Symbolic pointer dereferencing • Input vector • Size of input, Optional arguments • External Validity • Test subjects and strategies might not be representative 27
  • 28. Summary • Path explosion challenge in Concolic testing • Search strategies prioritizes branches according to some criteria • CGS • Selects branches in the new context • Use dominators to exclude irrelevant branches • BFS search + incrementally increase of the size of context • Evaluation on six C and six Java subjects • Achieved the highest coverage on all twelve subjects • Reached the target much faster on most subjects 28
  • 30. Coverage for C Subjects 30
  • 31. Coverage for Java Subjects 31 Mann-Whitney U test P-value < 0.01
  • 32. Related Work • Pruning Redundant Path • RWset [Cristian ‘08] • Interpolation [Jaffar ’13] • Function Summary • Compositional [Godefroid ‘07, ‘10] • Demand-driven compositional [Anand ‘08] • Others • Fitness-guided approach [Xie ’09], Sub-path guided [Li ‘13] • Hybrid [Majumdar ‘07] 32