SlideShare a Scribd company logo
1
Budapest University of Technology and Economics
Department of Measurement and Information Systems
Towards Evaluating Size Reduction Techniques
for Software Model Checking
Gyula Sallai1, Ákos Hajdu1,2, Tamás Tóth1, Zoltán Micskei1
1Department of Measurement and Information Systems,
Budapest University of Technology and Economics
2MTA-BME Lendület Cyber-Physical Systems Research Group,
Budapest, Hungary
VPT 2017, Uppsala, Sweden, 29.04.2017.
2
Introduction
3
Software model checking
 Proving correctness formally
o Problem: state space explosion
Formal model (CFA) Formalized property
Ok Counterexample
Model checker
We focus on
assertionsSource code
4
Motivation
 Integrated, configurable workflow
o From source code to verification results
o Enhanced by size reduction techniques
• Compiler techniques
• Slicing
o Supported by a verification framework
• Based on abstraction and CEGAR
• Highly configurable
 Evaluation
o Impact of size reduction on verification
 ×
5
Workflow
6
Workflow – Overview
Parsing Size reduction Verification
C code Control
Flow
Graph
Control
Flow
Automata
Refinement
7
Size reduction techniques
 Compiler optimizations
o Constant folding and propagation
o Dead branch elimination
o Function inlining
int x = 5 * 2;
int y = x + 2;
int x = 10;
int y = 12;
int add(int x, int y) { return x + y; }
x = add(y, z); x = y + z;
x = false;
if (x) {
...
}
x = false;
8
Size reduction techniques
 Program slicing
o Slice: subprogram that produces the same output and
assigns the same values to a set of variables
0: int i = 0;
1: int x = 0;
2: while (i < 11) {
3: x = x + i;
4: i = i + 1;
}
5: assert(i != 0);
0: int i = 0;
1: int x = 0;
2: while (i < 11) {
3: x = x + i;
4: i = i + 1;
}
5: assert(i != 0);
Criterion: value of i at statement 5
9
Size reduction techniques
 Backward slicing
o Retain all instructions crucial to criterion
• Data flow and control dependencies
o Accurate slices
 Thin slicing
o Retain data flow dependency only
• Replace control dependencies with abstract predicates
o Spurious counterexample  refinement of slice
 Value slicing
o Middle ground between backward and thin
• Retain variables determining control criterions
10
Size reduction techniques
int u = 0;
int t = 0;
int x = 0;
while (t < 1000) {
int s = nondet();
int y;
if (s == 1) {
y = x * 2;
} else {
y = x - 1;
}
assert(y != 0);
x = x + y;
t = t + 1;
u = u + t;
}
printf("u=%d", u);
int u = 0;
int t = 0;
int x = 0;
while (t < 1000) {
int s = nondet();
int y;
if (s == 1) {
y = x * 2;
} else {
y = x - 1;
}
assert(y != 0);
x = x + y;
t = t + 1;
u = u + t;
}
printf("u=%d", u);
int u = 0;
int t = 0;
int x = 0;
while (φ1) {
int s = nondet();
int y;
if (φ2) {
y = x * 2;
} else {
y = x - 1;
}
assert(y != 0);
x = x + y;
t = t + 1;
u = u + t;
}
printf("u=%d", u);
int u = 0;
int t = 0;
int x = 0;
while (φ1) {
int s = nondet();
int y;
if (s == 1) {
y = x * 2;
} else {
y = x - 1;
}
assert(y != 0);
x = x + y;
t = t + 1;
u = u + t;
}
printf("u=%d", u);
Original Backward Thin Value
11
Verification
 CEGAR
o Counterexample-Guided Abstraction Refinement
o Configurable framework
Abstractor Refiner
Model, property
Initial precision Abstract
counterexample
Refined precision
Ok Counterexample
Domain
Exploration strategy
Refinement strategy
12
Evaluation
13
Objects
 Models: SV-COMP examples
o Locks: locking mechanisms
• 100-150 LOC, many smaller slices
o ECA: event-driven systems
• 500-600 LOC, one slice
o SSH-simplified: server-client systems
• 500-600 LOC, one slice
 Requirement: reachability of assertion violation
14
Environment
 Algorithms
o Slicing: None / Backward / Value / Thin
o Compiler optimizations: True / False
o Domain: Predicate abstraction
o Refinement: Sequence interpolation
o Exploration strategy: BFS / DFS
 A configuration
o Slicing + optimizations + exploration strategy
o E.g.: BTD  Backward, True, DFS
15
Results
 Initial CFA size with different slicing / optimization configurations
Optimizations
do not give
large reductions
Backward
slicing may yield
large reductions
Thin and value
slicing allow
even more
reductions
16
Results
 Effect of slice refinement: initial and final CFA size
No refinement
is needed
Final CFA size increases
due to refinements
17
Results
 Verification time – locks (ms)
Easy with
any kind
of slicing
Infeasible or
hard without
slicing
BFS fails
sometimes
18
Results
 Verification time – ECA/SSH (ms)
Diverse results:
supports the need
for a configurable
framework
Verified by a single
configuration
19
Results
 Comparison of verification and optimization time
Optimization time
is negligible for
larger programs
Backward slicing is
quick, thin and value
requires more time
20
Conclusions
21
Conclusions
 Workflow for software verification
o Enhanced by size reduction techniques
o Supported by a configurable
verification framework
 Experimental evaluation
o Different configurations are more
suitable for different tasks
 Future work
o Extend supported elements of C
o Interprocedural slicing
o LLVM support
Parsing
Size reduction
Verification
0: int i = 0;
1: int x = 0;
2: while (i < 11) {
3: x = x + i;
4: i = i + 1;
}
5: assert(i != 0);
hajdua@mit.bme.hu
inf.mit.bme.hu/en/members/hajdua

More Related Content

Similar to Towards Evaluating Size Reduction Techniques for Software Model Checking

Feature Engineering
Feature Engineering Feature Engineering
Feature Engineering
odsc
 
Exploiting Hierarchy in the Abstraction-Based Verification of Statecharts Usi...
Exploiting Hierarchy in the Abstraction-Based Verification of Statecharts Usi...Exploiting Hierarchy in the Abstraction-Based Verification of Statecharts Usi...
Exploiting Hierarchy in the Abstraction-Based Verification of Statecharts Usi...
Akos Hajdu
 
Comprehensive acquisition management methodology rev6
Comprehensive acquisition  management methodology   rev6Comprehensive acquisition  management methodology   rev6
Comprehensive acquisition management methodology rev6
clifpt
 
Quality Control Chart
 Quality Control Chart Quality Control Chart
Quality Control Chart
Ashish Gupta
 
WEI_ZHENGTAI_SPC
WEI_ZHENGTAI_SPCWEI_ZHENGTAI_SPC
WEI_ZHENGTAI_SPC
ZHENGTAI WEI
 
Six Sigma Dfss Application In Data Accarucy
Six Sigma Dfss Application In Data AccarucySix Sigma Dfss Application In Data Accarucy
Six Sigma Dfss Application In Data Accarucy
xyhfun
 
Industrial plant optimization in reduced dimensional spaces
Industrial plant optimization in reduced dimensional spacesIndustrial plant optimization in reduced dimensional spaces
Industrial plant optimization in reduced dimensional spaces
Capstone
 
SPC Training by D&H Engineers
SPC Training by D&H EngineersSPC Training by D&H Engineers
SPC Training by D&H Engineers
D&H Engineers
 
Dill may-2008
Dill may-2008Dill may-2008
Dill may-2008
Obsidian Software
 
BIIntro.ppt
BIIntro.pptBIIntro.ppt
BIIntro.ppt
PerumalPitchandi
 
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Peter Tröger
 
Heuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient searchHeuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient search
Greg Makowski
 
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
Chakkrit (Kla) Tantithamthavorn
 
Application of Machine Learning in Agriculture
Application of Machine  Learning in AgricultureApplication of Machine  Learning in Agriculture
Application of Machine Learning in Agriculture
Aman Vasisht
 
report
reportreport
report
Arthur He
 
Keynote: Machine Learning for Design Automation at DAC 2018
Keynote:  Machine Learning for Design Automation at DAC 2018Keynote:  Machine Learning for Design Automation at DAC 2018
Keynote: Machine Learning for Design Automation at DAC 2018
Manish Pandey
 
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
 
Example-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud DetectionExample-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud Detection
Alejandro Correa Bahnsen, PhD
 
Quality andc apability hand out 091123200010 Phpapp01
Quality andc apability hand out 091123200010 Phpapp01Quality andc apability hand out 091123200010 Phpapp01
Quality andc apability hand out 091123200010 Phpapp01
jasonhian
 
EvaluationMetrics.pptx
EvaluationMetrics.pptxEvaluationMetrics.pptx
EvaluationMetrics.pptx
shuchismitjha2
 

Similar to Towards Evaluating Size Reduction Techniques for Software Model Checking (20)

Feature Engineering
Feature Engineering Feature Engineering
Feature Engineering
 
Exploiting Hierarchy in the Abstraction-Based Verification of Statecharts Usi...
Exploiting Hierarchy in the Abstraction-Based Verification of Statecharts Usi...Exploiting Hierarchy in the Abstraction-Based Verification of Statecharts Usi...
Exploiting Hierarchy in the Abstraction-Based Verification of Statecharts Usi...
 
Comprehensive acquisition management methodology rev6
Comprehensive acquisition  management methodology   rev6Comprehensive acquisition  management methodology   rev6
Comprehensive acquisition management methodology rev6
 
Quality Control Chart
 Quality Control Chart Quality Control Chart
Quality Control Chart
 
WEI_ZHENGTAI_SPC
WEI_ZHENGTAI_SPCWEI_ZHENGTAI_SPC
WEI_ZHENGTAI_SPC
 
Six Sigma Dfss Application In Data Accarucy
Six Sigma Dfss Application In Data AccarucySix Sigma Dfss Application In Data Accarucy
Six Sigma Dfss Application In Data Accarucy
 
Industrial plant optimization in reduced dimensional spaces
Industrial plant optimization in reduced dimensional spacesIndustrial plant optimization in reduced dimensional spaces
Industrial plant optimization in reduced dimensional spaces
 
SPC Training by D&H Engineers
SPC Training by D&H EngineersSPC Training by D&H Engineers
SPC Training by D&H Engineers
 
Dill may-2008
Dill may-2008Dill may-2008
Dill may-2008
 
BIIntro.ppt
BIIntro.pptBIIntro.ppt
BIIntro.ppt
 
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
 
Heuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient searchHeuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient search
 
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
Software Analytics In Action: A Hands-on Tutorial on Mining, Analyzing, Model...
 
Application of Machine Learning in Agriculture
Application of Machine  Learning in AgricultureApplication of Machine  Learning in Agriculture
Application of Machine Learning in Agriculture
 
report
reportreport
report
 
Keynote: Machine Learning for Design Automation at DAC 2018
Keynote:  Machine Learning for Design Automation at DAC 2018Keynote:  Machine Learning for Design Automation at DAC 2018
Keynote: Machine Learning for Design Automation at DAC 2018
 
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)Heterogeneous Defect Prediction (

ESEC/FSE 2015)
Heterogeneous Defect Prediction (

ESEC/FSE 2015)
 
Example-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud DetectionExample-Dependent Cost-Sensitive Credit Card Fraud Detection
Example-Dependent Cost-Sensitive Credit Card Fraud Detection
 
Quality andc apability hand out 091123200010 Phpapp01
Quality andc apability hand out 091123200010 Phpapp01Quality andc apability hand out 091123200010 Phpapp01
Quality andc apability hand out 091123200010 Phpapp01
 
EvaluationMetrics.pptx
EvaluationMetrics.pptxEvaluationMetrics.pptx
EvaluationMetrics.pptx
 

More from Akos Hajdu

solc-verify: A Modular Verifier for Solidity Smart Contracts
solc-verify: A Modular Verifier for Solidity Smart Contractssolc-verify: A Modular Verifier for Solidity Smart Contracts
solc-verify: A Modular Verifier for Solidity Smart Contracts
Akos Hajdu
 
Software Verification with Abstraction-Based Methods
Software Verification with Abstraction-Based MethodsSoftware Verification with Abstraction-Based Methods
Software Verification with Abstraction-Based Methods
Akos Hajdu
 
A Preliminary Analysis on the Effect of Randomness in a CEGAR Framework
 A Preliminary Analysis on the Effect of Randomness in a CEGAR Framework A Preliminary Analysis on the Effect of Randomness in a CEGAR Framework
A Preliminary Analysis on the Effect of Randomness in a CEGAR Framework
Akos Hajdu
 
Theta: a Framework for Abstraction Refinement-Based Model Checking
Theta: a Framework for Abstraction Refinement-Based Model CheckingTheta: a Framework for Abstraction Refinement-Based Model Checking
Theta: a Framework for Abstraction Refinement-Based Model Checking
Akos Hajdu
 
Exploratory Analysis of the Performance of a Configurable CEGAR Framework
Exploratory Analysis of the Performance of a Configurable CEGAR FrameworkExploratory Analysis of the Performance of a Configurable CEGAR Framework
Exploratory Analysis of the Performance of a Configurable CEGAR Framework
Akos Hajdu
 
A Configurable CEGAR Framework with Interpolation-Based Refinements
A Configurable CEGAR Framework with Interpolation-Based RefinementsA Configurable CEGAR Framework with Interpolation-Based Refinements
A Configurable CEGAR Framework with Interpolation-Based Refinements
Akos Hajdu
 
Petri Net Based Trajectory Optimization
Petri Net Based Trajectory OptimizationPetri Net Based Trajectory Optimization
Petri Net Based Trajectory Optimization
Akos Hajdu
 
Extensions to the CEGAR Approach on Petri Nets
Extensions to the CEGAR Approach on Petri NetsExtensions to the CEGAR Approach on Petri Nets
Extensions to the CEGAR Approach on Petri Nets
Akos Hajdu
 
New Search Strategies for the Petri Net CEGAR Approach
New Search Strategies for the Petri Net CEGAR ApproachNew Search Strategies for the Petri Net CEGAR Approach
New Search Strategies for the Petri Net CEGAR Approach
Akos Hajdu
 

More from Akos Hajdu (9)

solc-verify: A Modular Verifier for Solidity Smart Contracts
solc-verify: A Modular Verifier for Solidity Smart Contractssolc-verify: A Modular Verifier for Solidity Smart Contracts
solc-verify: A Modular Verifier for Solidity Smart Contracts
 
Software Verification with Abstraction-Based Methods
Software Verification with Abstraction-Based MethodsSoftware Verification with Abstraction-Based Methods
Software Verification with Abstraction-Based Methods
 
A Preliminary Analysis on the Effect of Randomness in a CEGAR Framework
 A Preliminary Analysis on the Effect of Randomness in a CEGAR Framework A Preliminary Analysis on the Effect of Randomness in a CEGAR Framework
A Preliminary Analysis on the Effect of Randomness in a CEGAR Framework
 
Theta: a Framework for Abstraction Refinement-Based Model Checking
Theta: a Framework for Abstraction Refinement-Based Model CheckingTheta: a Framework for Abstraction Refinement-Based Model Checking
Theta: a Framework for Abstraction Refinement-Based Model Checking
 
Exploratory Analysis of the Performance of a Configurable CEGAR Framework
Exploratory Analysis of the Performance of a Configurable CEGAR FrameworkExploratory Analysis of the Performance of a Configurable CEGAR Framework
Exploratory Analysis of the Performance of a Configurable CEGAR Framework
 
A Configurable CEGAR Framework with Interpolation-Based Refinements
A Configurable CEGAR Framework with Interpolation-Based RefinementsA Configurable CEGAR Framework with Interpolation-Based Refinements
A Configurable CEGAR Framework with Interpolation-Based Refinements
 
Petri Net Based Trajectory Optimization
Petri Net Based Trajectory OptimizationPetri Net Based Trajectory Optimization
Petri Net Based Trajectory Optimization
 
Extensions to the CEGAR Approach on Petri Nets
Extensions to the CEGAR Approach on Petri NetsExtensions to the CEGAR Approach on Petri Nets
Extensions to the CEGAR Approach on Petri Nets
 
New Search Strategies for the Petri Net CEGAR Approach
New Search Strategies for the Petri Net CEGAR ApproachNew Search Strategies for the Petri Net CEGAR Approach
New Search Strategies for the Petri Net CEGAR Approach
 

Recently uploaded

ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
Advanced-Concepts-Team
 
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of ProteinsGBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
Areesha Ahmad
 
Oedema_types_causes_pathophysiology.pptx
Oedema_types_causes_pathophysiology.pptxOedema_types_causes_pathophysiology.pptx
Oedema_types_causes_pathophysiology.pptx
muralinath2
 
Applied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdfApplied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdf
University of Hertfordshire
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
MaheshaNanjegowda
 
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptxThe use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
MAGOTI ERNEST
 
Thornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdfThornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdf
European Sustainable Phosphorus Platform
 
Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)
Sciences of Europe
 
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
hozt8xgk
 
aziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobelaziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobel
İsa Badur
 
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
University of Maribor
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
PRIYANKA PATEL
 
THEMATIC APPERCEPTION TEST(TAT) cognitive abilities, creativity, and critic...
THEMATIC  APPERCEPTION  TEST(TAT) cognitive abilities, creativity, and critic...THEMATIC  APPERCEPTION  TEST(TAT) cognitive abilities, creativity, and critic...
THEMATIC APPERCEPTION TEST(TAT) cognitive abilities, creativity, and critic...
Abdul Wali Khan University Mardan,kP,Pakistan
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
University of Maribor
 
8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf
by6843629
 
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
AbdullaAlAsif1
 
Shallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptxShallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptx
Gokturk Mehmet Dilci
 
Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
Leonel Morgado
 
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Leonel Morgado
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
Aditi Bajpai
 

Recently uploaded (20)

ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
 
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of ProteinsGBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
 
Oedema_types_causes_pathophysiology.pptx
Oedema_types_causes_pathophysiology.pptxOedema_types_causes_pathophysiology.pptx
Oedema_types_causes_pathophysiology.pptx
 
Applied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdfApplied Science: Thermodynamics, Laws & Methodology.pdf
Applied Science: Thermodynamics, Laws & Methodology.pdf
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
 
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptxThe use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptx
 
Thornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdfThornton ESPP slides UK WW Network 4_6_24.pdf
Thornton ESPP slides UK WW Network 4_6_24.pdf
 
Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)
 
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
快速办理(UAM毕业证书)马德里自治大学毕业证学位证一模一样
 
aziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobelaziz sancar nobel prize winner: from mardin to nobel
aziz sancar nobel prize winner: from mardin to nobel
 
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
 
THEMATIC APPERCEPTION TEST(TAT) cognitive abilities, creativity, and critic...
THEMATIC  APPERCEPTION  TEST(TAT) cognitive abilities, creativity, and critic...THEMATIC  APPERCEPTION  TEST(TAT) cognitive abilities, creativity, and critic...
THEMATIC APPERCEPTION TEST(TAT) cognitive abilities, creativity, and critic...
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
 
8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf
 
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
Unlocking the mysteries of reproduction: Exploring fecundity and gonadosomati...
 
Shallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptxShallowest Oil Discovery of Turkiye.pptx
Shallowest Oil Discovery of Turkiye.pptx
 
Immersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths ForwardImmersive Learning That Works: Research Grounding and Paths Forward
Immersive Learning That Works: Research Grounding and Paths Forward
 
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
 

Towards Evaluating Size Reduction Techniques for Software Model Checking

  • 1. 1 Budapest University of Technology and Economics Department of Measurement and Information Systems Towards Evaluating Size Reduction Techniques for Software Model Checking Gyula Sallai1, Ákos Hajdu1,2, Tamás Tóth1, Zoltán Micskei1 1Department of Measurement and Information Systems, Budapest University of Technology and Economics 2MTA-BME Lendület Cyber-Physical Systems Research Group, Budapest, Hungary VPT 2017, Uppsala, Sweden, 29.04.2017.
  • 3. 3 Software model checking  Proving correctness formally o Problem: state space explosion Formal model (CFA) Formalized property Ok Counterexample Model checker We focus on assertionsSource code
  • 4. 4 Motivation  Integrated, configurable workflow o From source code to verification results o Enhanced by size reduction techniques • Compiler techniques • Slicing o Supported by a verification framework • Based on abstraction and CEGAR • Highly configurable  Evaluation o Impact of size reduction on verification  ×
  • 6. 6 Workflow – Overview Parsing Size reduction Verification C code Control Flow Graph Control Flow Automata Refinement
  • 7. 7 Size reduction techniques  Compiler optimizations o Constant folding and propagation o Dead branch elimination o Function inlining int x = 5 * 2; int y = x + 2; int x = 10; int y = 12; int add(int x, int y) { return x + y; } x = add(y, z); x = y + z; x = false; if (x) { ... } x = false;
  • 8. 8 Size reduction techniques  Program slicing o Slice: subprogram that produces the same output and assigns the same values to a set of variables 0: int i = 0; 1: int x = 0; 2: while (i < 11) { 3: x = x + i; 4: i = i + 1; } 5: assert(i != 0); 0: int i = 0; 1: int x = 0; 2: while (i < 11) { 3: x = x + i; 4: i = i + 1; } 5: assert(i != 0); Criterion: value of i at statement 5
  • 9. 9 Size reduction techniques  Backward slicing o Retain all instructions crucial to criterion • Data flow and control dependencies o Accurate slices  Thin slicing o Retain data flow dependency only • Replace control dependencies with abstract predicates o Spurious counterexample  refinement of slice  Value slicing o Middle ground between backward and thin • Retain variables determining control criterions
  • 10. 10 Size reduction techniques int u = 0; int t = 0; int x = 0; while (t < 1000) { int s = nondet(); int y; if (s == 1) { y = x * 2; } else { y = x - 1; } assert(y != 0); x = x + y; t = t + 1; u = u + t; } printf("u=%d", u); int u = 0; int t = 0; int x = 0; while (t < 1000) { int s = nondet(); int y; if (s == 1) { y = x * 2; } else { y = x - 1; } assert(y != 0); x = x + y; t = t + 1; u = u + t; } printf("u=%d", u); int u = 0; int t = 0; int x = 0; while (φ1) { int s = nondet(); int y; if (φ2) { y = x * 2; } else { y = x - 1; } assert(y != 0); x = x + y; t = t + 1; u = u + t; } printf("u=%d", u); int u = 0; int t = 0; int x = 0; while (φ1) { int s = nondet(); int y; if (s == 1) { y = x * 2; } else { y = x - 1; } assert(y != 0); x = x + y; t = t + 1; u = u + t; } printf("u=%d", u); Original Backward Thin Value
  • 11. 11 Verification  CEGAR o Counterexample-Guided Abstraction Refinement o Configurable framework Abstractor Refiner Model, property Initial precision Abstract counterexample Refined precision Ok Counterexample Domain Exploration strategy Refinement strategy
  • 13. 13 Objects  Models: SV-COMP examples o Locks: locking mechanisms • 100-150 LOC, many smaller slices o ECA: event-driven systems • 500-600 LOC, one slice o SSH-simplified: server-client systems • 500-600 LOC, one slice  Requirement: reachability of assertion violation
  • 14. 14 Environment  Algorithms o Slicing: None / Backward / Value / Thin o Compiler optimizations: True / False o Domain: Predicate abstraction o Refinement: Sequence interpolation o Exploration strategy: BFS / DFS  A configuration o Slicing + optimizations + exploration strategy o E.g.: BTD  Backward, True, DFS
  • 15. 15 Results  Initial CFA size with different slicing / optimization configurations Optimizations do not give large reductions Backward slicing may yield large reductions Thin and value slicing allow even more reductions
  • 16. 16 Results  Effect of slice refinement: initial and final CFA size No refinement is needed Final CFA size increases due to refinements
  • 17. 17 Results  Verification time – locks (ms) Easy with any kind of slicing Infeasible or hard without slicing BFS fails sometimes
  • 18. 18 Results  Verification time – ECA/SSH (ms) Diverse results: supports the need for a configurable framework Verified by a single configuration
  • 19. 19 Results  Comparison of verification and optimization time Optimization time is negligible for larger programs Backward slicing is quick, thin and value requires more time
  • 21. 21 Conclusions  Workflow for software verification o Enhanced by size reduction techniques o Supported by a configurable verification framework  Experimental evaluation o Different configurations are more suitable for different tasks  Future work o Extend supported elements of C o Interprocedural slicing o LLVM support Parsing Size reduction Verification 0: int i = 0; 1: int x = 0; 2: while (i < 11) { 3: x = x + i; 4: i = i + 1; } 5: assert(i != 0); hajdua@mit.bme.hu inf.mit.bme.hu/en/members/hajdua