SlideShare a Scribd company logo
All-Solution Satisfiability Modulo Theories:
applications, algorithms and benchmarks
Quoc-Sang Phan and Pasquale Malacaria
Queen Mary University of London
ARES: August 25, 2015
1 / 23
Content
Satisfiability Modulo Theories (SMT): a decision problem for
logical formulas over first-order theories
All-SMT: the problem of finding all solutions of an SMT
problem with respect to a set of Boolean variables
All-SMT solver can benefit various domains of application:
Bounded Model Checking, Automated Test Generation,
Reliability analysis, and Quantitative Information Flow. We
concentrate here on Quantitative Information Flow (QIF)
we propose algorithms to design an All-SMT solver on top of
an existing SMT solver, and implement it into a prototype
tool, called aZ3.
2 / 23
Information Flow
Secret input (H) Public input (L)
Program P
Public Output (O)
Non-interference
Public input (L)
Program P
Secret input (H)
Information leaked
Public Output (O)
√
?
3 / 23
Non-interference is unachievable
int check(int H, int L){
int O;
if (L == H)
O = ACCEPT;
else O = REJECT;
return O;
}
password check
Secret input (H) Public input (L)
Program P
Public Output (O)
Non-interference
Public input (L)
Program P
Secret input (H)
Information leaked
Public Output (O)
√
?
Leakage = Secrecy before observing - Secrecy after observing
∆E (XH) = E(XH) − E(XH|XO)
where XH is the secret, XO is the output and E is an ”entropy”
function
4 / 23
Motivations for Quantitative Information Flow
1 information leakage is unavoidable, e.g. authentication
systems must leak by design some information about
passwords
2 however, provided the leakage is small, usually that is not a
problem.
3 so measuring leakage allows for a security assessment of a
program
4 This work provides new and fast algorithms to measure
information leaks, “how much” a program leaks
5 / 23
Quantifying Information Leaks
Theorem: Channel Capacity for deterministic systems
∆E (XH) ≤ log2(|O|)
holds for Shannon entropy and R´enyi’s min-entropy
holds for all possible distributions of XH.
is the basis of state-of-the-art techniques for Quantitative
Information Flow analysis.
based on the above we have:
Definition
Quantitative Information Flow (QIF) is the problem of counting N,
the number of possible outputs of a given program P.
6 / 23
An example
base = 8;
if (H < 16 and H>=0) then
O = base + H
else
O = base
Figure: Data sanitization program
Here then O is in [8..23], so leakage ≤ log(15), possible bits
configurations in O are 0 . . . 01000 to 0 . . . 010111
7 / 23
From programs to formulas
First step in our approach is to understand how programs are
translated into formulas: using Single Static Assignment (SSA) a
program P is translated into a conjunctive formula ϕP
8 / 23
Quantifying as Counting
Adversary
tries to infer
H from L and O
H
L
O
f
O is stored as a bit vector b1b2 . . . bM.
Assume we have a first-order formula ϕP such that:
ϕP contains a set of Boolean variables VI := {p1, p2, .., pM }
pi = if and only if bi is 1, and pi = ⊥ if and only if bi = 0
Counting outputs of P ≡ Counting models of ϕP w.r.t. VI
9 / 23
QIF analysis using a All-SMT solver
Program transformation
L = 8;
if (H < 16)
O = H + L;
else
O = L;
(L1 = 8) ∧
(G0 = H0 < 16) ∧
(O1 = H0 + L1) ∧
(O2 = L1) ∧
(O3 = G0?O1 : O2)
Figure: A simple program P encoded into a first-order formula ϕP
Formula instrumentation to build the set VI :
(assert (= (= #b1 (( extract 0 0) O3)) p1))
10 / 23
QIF analysis using a All-SMT solver
We introduce two algorithms for All-SMT solving.
Both use APIs provided by an SMT solver.
Blocking clause
After finding a model
µ = l0 ∧ l1 ∧ · · · ∧ lm ∧ . . .
Add the clause:
block = ¬l0 ∨ ¬l1 ∨ · · · ∨ ¬lm
11 / 23
Blocking Clause all-SMT
12 / 23
Blocking Clause all-SMT
The blocking clauses method is straightforward and it is simple to
implement.
However, adding a large number of blocking clauses will require a
large amount of memory.
Also the large number of clauses slows down the Boolean
Constraint Propagation procedure of the underlying solver.
To address these inefficiencies we introduce an alternative method
which avoids re-discovering solutions using depth-first search
(DFS).
13 / 23
QIF analysis using a All-SMT solver
Use APIs provided by an SMT solver
Depth-first search
Two components:
A DPLL like procedure to enumerate truth assignments.
Use the SMT solver to check consistency of the truth
assignments.
14 / 23
Depth First Search all-SMT
15 / 23
Depth First Search all-SMT
The method choose literal chooses the next state to explore
from VI in a DFS manner, and even if there are 2N possible states
efficient pruning avoid exponential blow-out for programs that
“don’t leak too much”, i.e.
Depth-first search all-SMT algorithm is linear in |O|
16 / 23
QIF analysis using Model Checking
UNSAT
p1
p1 ∧ p2
p1 ∧ p2 ∧ p3
p1 ∧ p2 ∧ p3 ∧ p4
p1 ∧ p2 ∧ p3 ∧ p4 ∧ p5p1 ∧ p2 ∧ p3 ∧ p4 ∧ ¬p5
p1
p2
p3
p4
p5
assert !(p1 && p2 && p3 && p4 && p5);
17 / 23
Implementation
Tools selected:
Model Checking: CBMC (Ansi C)
Symbolic Execution: Symbolic PathFinder (Java bytecode)
Program transformation: CBMC
SMT solver: z3
Benchmarks include:
Vulnerabilities in Linux kernel
Anonymity protocols
A Tax program from the European project HATS (Java)
Assumptions: all programs have bounded loops, no recursion.
18 / 23
Evaluation
19 / 23
Evaluation
20 / 23
Conclusions
P
program transformation
ϕP
QIF All-SMT
Formal methods DPLL(T )
Two approaches:
Use formal methods to mimic DPLL(T ).
QIF analysis using Model Checking.
QIF analysis using Symbolic Execution.
Generate ϕP, then using DPLL(T ).
Generate ϕP using program transformation.
Extend an SMT solver for All-SMT.
21 / 23
THANK YOU FOR YOUR ATTENTION!
22 / 23

More Related Content

What's hot

Lecture 04 Logical Group of Instructions
Lecture 04 Logical Group of InstructionsLecture 04 Logical Group of Instructions
Lecture 04 Logical Group of Instructions
Zeeshan Ahmed
 
Boothmultiplication
BoothmultiplicationBoothmultiplication
Boothmultiplication
melisha monteiro
 
Dsp lab manual 15 11-2016
Dsp lab manual 15 11-2016Dsp lab manual 15 11-2016
Dsp lab manual 15 11-2016
Gopinath.B.L Naidu
 
Intel 8051 Programming in C
Intel 8051 Programming in CIntel 8051 Programming in C
Intel 8051 Programming in C
Sudhanshu Janwadkar
 
Optimized declarative transformation First Eclipse QVTc results
Optimized declarative transformation First Eclipse QVTc resultsOptimized declarative transformation First Eclipse QVTc results
Optimized declarative transformation First Eclipse QVTc results
Edward Willink
 
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Edward Willink
 
Clipping in 2 d
Clipping in 2 dClipping in 2 d
Clipping in 2 dAshiv Khan
 
Chapter 7 8051 programming in c
Chapter 7  8051 programming in cChapter 7  8051 programming in c
Chapter 7 8051 programming in c
Abdelrahman Elewah
 
180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-doc180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-doc
homeworkping10
 
PresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software CodePresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software Code
GreenLabAtDI
 
Introduction to Control systems in scilab
Introduction to Control systems in scilabIntroduction to Control systems in scilab
Introduction to Control systems in scilab
Scilab
 
Quantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability AnalysisQuantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability Analysis
Quoc-Sang Phan
 
Clipping in Computer Graphics
Clipping in Computer GraphicsClipping in Computer Graphics
Clipping in Computer Graphics
Laxman Puri
 
Matlab for Electrical Engineers
Matlab for Electrical EngineersMatlab for Electrical Engineers
Matlab for Electrical Engineers
Manish Joshi
 
Infix to postfix conversion
Infix to postfix conversionInfix to postfix conversion
Infix to postfix conversion
Then Murugeshwari
 
Storage classes in c language
Storage classes in c languageStorage classes in c language
Storage classes in c language
tanmaymodi4
 
Reactive cocoa 101
Reactive cocoa 101Reactive cocoa 101
Reactive cocoa 101
Hai Feng Kao
 

What's hot (20)

Lecture 04 Logical Group of Instructions
Lecture 04 Logical Group of InstructionsLecture 04 Logical Group of Instructions
Lecture 04 Logical Group of Instructions
 
Clipping
ClippingClipping
Clipping
 
Boothmultiplication
BoothmultiplicationBoothmultiplication
Boothmultiplication
 
Dsp lab manual 15 11-2016
Dsp lab manual 15 11-2016Dsp lab manual 15 11-2016
Dsp lab manual 15 11-2016
 
Intel 8051 Programming in C
Intel 8051 Programming in CIntel 8051 Programming in C
Intel 8051 Programming in C
 
Clipping
ClippingClipping
Clipping
 
Optimized declarative transformation First Eclipse QVTc results
Optimized declarative transformation First Eclipse QVTc resultsOptimized declarative transformation First Eclipse QVTc results
Optimized declarative transformation First Eclipse QVTc results
 
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
 
Clipping in 2 d
Clipping in 2 dClipping in 2 d
Clipping in 2 d
 
Chapter 7 8051 programming in c
Chapter 7  8051 programming in cChapter 7  8051 programming in c
Chapter 7 8051 programming in c
 
180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-doc180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-doc
 
PresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software CodePresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software Code
 
Introduction to Control systems in scilab
Introduction to Control systems in scilabIntroduction to Control systems in scilab
Introduction to Control systems in scilab
 
Quantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability AnalysisQuantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability Analysis
 
Clipping in Computer Graphics
Clipping in Computer GraphicsClipping in Computer Graphics
Clipping in Computer Graphics
 
Matlab for Electrical Engineers
Matlab for Electrical EngineersMatlab for Electrical Engineers
Matlab for Electrical Engineers
 
06 clipping
06 clipping06 clipping
06 clipping
 
Infix to postfix conversion
Infix to postfix conversionInfix to postfix conversion
Infix to postfix conversion
 
Storage classes in c language
Storage classes in c languageStorage classes in c language
Storage classes in c language
 
Reactive cocoa 101
Reactive cocoa 101Reactive cocoa 101
Reactive cocoa 101
 

Similar to All-Solution Satisfiability Modulo Theories: applications, algorithms and benchmarks

Ch7 OS
Ch7 OSCh7 OS
Ch7 OSC.U
 
White Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingWhite Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingAnkit Mulani
 
Robust and Tuneable Family of Gossiping Algorithms
Robust and Tuneable Family of Gossiping AlgorithmsRobust and Tuneable Family of Gossiping Algorithms
Robust and Tuneable Family of Gossiping Algorithms
Vincenzo De Florio
 
Algoritmic Information Theory
Algoritmic Information TheoryAlgoritmic Information Theory
Algoritmic Information Theory
Willy Marroquin (WillyDevNET)
 
Medical Image Segmentation Using Hidden Markov Random Field A Distributed Ap...
Medical Image Segmentation Using Hidden Markov Random Field  A Distributed Ap...Medical Image Segmentation Using Hidden Markov Random Field  A Distributed Ap...
Medical Image Segmentation Using Hidden Markov Random Field A Distributed Ap...
EL-Hachemi Guerrout
 
Chapter08.pptx
Chapter08.pptxChapter08.pptx
Chapter08.pptx
GiannisPagges
 
Time series models iv
Time series models ivTime series models iv
Time series models iv
Gurbakash Phonsa
 
Advanced atpg based on fan, testability measures and fault reduction
Advanced atpg based on fan, testability measures and fault reductionAdvanced atpg based on fan, testability measures and fault reduction
Advanced atpg based on fan, testability measures and fault reduction
VLSICS Design
 
a traffic analysis tool
a traffic analysis toola traffic analysis tool
a traffic analysis tool
ESUG
 
Static Analysis and Verification of C Programs
Static Analysis and Verification of C ProgramsStatic Analysis and Verification of C Programs
Extended Fuzzy C-Means with Random Sampling Techniques for Clustering Large Data
Extended Fuzzy C-Means with Random Sampling Techniques for Clustering Large DataExtended Fuzzy C-Means with Random Sampling Techniques for Clustering Large Data
Extended Fuzzy C-Means with Random Sampling Techniques for Clustering Large Data
AM Publications
 
Sliding door
Sliding doorSliding door
Sliding door
Mohamed Al-Attar
 
Constraint-Based Fault-Localization
Constraint-Based Fault-LocalizationConstraint-Based Fault-Localization
Constraint-Based Fault-Localization
Mohammed Bekkouche
 
Continuous Systems To Discrete Event Systems
Continuous Systems To Discrete Event SystemsContinuous Systems To Discrete Event Systems
Continuous Systems To Discrete Event Systems
ahmad bassiouny
 
Towards an SMT-based approach for Quantitative Information Flow
Towards an SMT-based approach for Quantitative Information FlowTowards an SMT-based approach for Quantitative Information Flow
Towards an SMT-based approach for Quantitative Information Flow
Quoc-Sang Phan
 
Approximation algorithms
Approximation algorithmsApproximation algorithms
Approximation algorithms
Ganesh Solanke
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdf
MemMem25
 
IE 425 Homework 10Submit on Tuesday, 12101.(20 pts) C.docx
IE 425 Homework 10Submit on Tuesday, 12101.(20 pts) C.docxIE 425 Homework 10Submit on Tuesday, 12101.(20 pts) C.docx
IE 425 Homework 10Submit on Tuesday, 12101.(20 pts) C.docx
sheronlewthwaite
 

Similar to All-Solution Satisfiability Modulo Theories: applications, algorithms and benchmarks (20)

Ch7 OS
Ch7 OSCh7 OS
Ch7 OS
 
White Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingWhite Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop Testing
 
Robust and Tuneable Family of Gossiping Algorithms
Robust and Tuneable Family of Gossiping AlgorithmsRobust and Tuneable Family of Gossiping Algorithms
Robust and Tuneable Family of Gossiping Algorithms
 
Algoritmic Information Theory
Algoritmic Information TheoryAlgoritmic Information Theory
Algoritmic Information Theory
 
Medical Image Segmentation Using Hidden Markov Random Field A Distributed Ap...
Medical Image Segmentation Using Hidden Markov Random Field  A Distributed Ap...Medical Image Segmentation Using Hidden Markov Random Field  A Distributed Ap...
Medical Image Segmentation Using Hidden Markov Random Field A Distributed Ap...
 
OS_Ch7
OS_Ch7OS_Ch7
OS_Ch7
 
OSCh7
OSCh7OSCh7
OSCh7
 
Chapter08.pptx
Chapter08.pptxChapter08.pptx
Chapter08.pptx
 
Time series models iv
Time series models ivTime series models iv
Time series models iv
 
Advanced atpg based on fan, testability measures and fault reduction
Advanced atpg based on fan, testability measures and fault reductionAdvanced atpg based on fan, testability measures and fault reduction
Advanced atpg based on fan, testability measures and fault reduction
 
a traffic analysis tool
a traffic analysis toola traffic analysis tool
a traffic analysis tool
 
Static Analysis and Verification of C Programs
Static Analysis and Verification of C ProgramsStatic Analysis and Verification of C Programs
Static Analysis and Verification of C Programs
 
Extended Fuzzy C-Means with Random Sampling Techniques for Clustering Large Data
Extended Fuzzy C-Means with Random Sampling Techniques for Clustering Large DataExtended Fuzzy C-Means with Random Sampling Techniques for Clustering Large Data
Extended Fuzzy C-Means with Random Sampling Techniques for Clustering Large Data
 
Sliding door
Sliding doorSliding door
Sliding door
 
Constraint-Based Fault-Localization
Constraint-Based Fault-LocalizationConstraint-Based Fault-Localization
Constraint-Based Fault-Localization
 
Continuous Systems To Discrete Event Systems
Continuous Systems To Discrete Event SystemsContinuous Systems To Discrete Event Systems
Continuous Systems To Discrete Event Systems
 
Towards an SMT-based approach for Quantitative Information Flow
Towards an SMT-based approach for Quantitative Information FlowTowards an SMT-based approach for Quantitative Information Flow
Towards an SMT-based approach for Quantitative Information Flow
 
Approximation algorithms
Approximation algorithmsApproximation algorithms
Approximation algorithms
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdf
 
IE 425 Homework 10Submit on Tuesday, 12101.(20 pts) C.docx
IE 425 Homework 10Submit on Tuesday, 12101.(20 pts) C.docxIE 425 Homework 10Submit on Tuesday, 12101.(20 pts) C.docx
IE 425 Homework 10Submit on Tuesday, 12101.(20 pts) C.docx
 

More from Quoc-Sang Phan

Model-counting Approaches For Nonlinear Numerical Constraints
Model-counting Approaches For Nonlinear Numerical ConstraintsModel-counting Approaches For Nonlinear Numerical Constraints
Model-counting Approaches For Nonlinear Numerical Constraints
Quoc-Sang Phan
 
Concurrent Bounded Model Checking
Concurrent Bounded Model CheckingConcurrent Bounded Model Checking
Concurrent Bounded Model CheckingQuoc-Sang Phan
 
Symbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo TheoriesSymbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo Theories
Quoc-Sang Phan
 
Quantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability AnalysisQuantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability AnalysisQuoc-Sang Phan
 
Self-composition by Symbolic Execution
Self-composition by Symbolic ExecutionSelf-composition by Symbolic Execution
Self-composition by Symbolic Execution
Quoc-Sang Phan
 
Symbolic Quantitative Information Flow
Symbolic Quantitative Information FlowSymbolic Quantitative Information Flow
Symbolic Quantitative Information Flow
Quoc-Sang Phan
 

More from Quoc-Sang Phan (6)

Model-counting Approaches For Nonlinear Numerical Constraints
Model-counting Approaches For Nonlinear Numerical ConstraintsModel-counting Approaches For Nonlinear Numerical Constraints
Model-counting Approaches For Nonlinear Numerical Constraints
 
Concurrent Bounded Model Checking
Concurrent Bounded Model CheckingConcurrent Bounded Model Checking
Concurrent Bounded Model Checking
 
Symbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo TheoriesSymbolic Execution as DPLL Modulo Theories
Symbolic Execution as DPLL Modulo Theories
 
Quantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability AnalysisQuantifying Information Leaks using Reliability Analysis
Quantifying Information Leaks using Reliability Analysis
 
Self-composition by Symbolic Execution
Self-composition by Symbolic ExecutionSelf-composition by Symbolic Execution
Self-composition by Symbolic Execution
 
Symbolic Quantitative Information Flow
Symbolic Quantitative Information FlowSymbolic Quantitative Information Flow
Symbolic Quantitative Information Flow
 

Recently uploaded

RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCINGRNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
AADYARAJPANDEY1
 
platelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptxplatelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptx
muralinath2
 
Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
Columbia Weather Systems
 
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
Health Advances
 
Richard's entangled aventures in wonderland
Richard's entangled aventures in wonderlandRichard's entangled aventures in wonderland
Richard's entangled aventures in wonderland
Richard Gill
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
ChetanK57
 
Lab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerinLab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerin
ossaicprecious19
 
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
University of Maribor
 
Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
aishnasrivastava
 
Comparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebratesComparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebrates
sachin783648
 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
moosaasad1975
 
Richard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlandsRichard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlands
Richard Gill
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
Scintica Instrumentation
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
SAMIR PANDA
 
Citrus Greening Disease and its Management
Citrus Greening Disease and its ManagementCitrus Greening Disease and its Management
Citrus Greening Disease and its Management
subedisuryaofficial
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
muralinath2
 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
Areesha Ahmad
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
Lokesh Patil
 
GBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture MediaGBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture Media
Areesha Ahmad
 
Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...
Sérgio Sacani
 

Recently uploaded (20)

RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCINGRNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
 
platelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptxplatelets- lifespan -Clot retraction-disorders.pptx
platelets- lifespan -Clot retraction-disorders.pptx
 
Orion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWSOrion Air Quality Monitoring Systems - CWS
Orion Air Quality Monitoring Systems - CWS
 
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
 
Richard's entangled aventures in wonderland
Richard's entangled aventures in wonderlandRichard's entangled aventures in wonderland
Richard's entangled aventures in wonderland
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
 
Lab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerinLab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerin
 
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
Comparing Evolved Extractive Text Summary Scores of Bidirectional Encoder Rep...
 
Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
 
Comparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebratesComparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebrates
 
What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.What is greenhouse gasses and how many gasses are there to affect the Earth.
What is greenhouse gasses and how many gasses are there to affect the Earth.
 
Richard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlandsRichard's aventures in two entangled wonderlands
Richard's aventures in two entangled wonderlands
 
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
(May 29th, 2024) Advancements in Intravital Microscopy- Insights for Preclini...
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
 
Citrus Greening Disease and its Management
Citrus Greening Disease and its ManagementCitrus Greening Disease and its Management
Citrus Greening Disease and its Management
 
Hemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptxHemoglobin metabolism_pathophysiology.pptx
Hemoglobin metabolism_pathophysiology.pptx
 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
 
GBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture MediaGBSN - Microbiology (Lab 4) Culture Media
GBSN - Microbiology (Lab 4) Culture Media
 
Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...Multi-source connectivity as the driver of solar wind variability in the heli...
Multi-source connectivity as the driver of solar wind variability in the heli...
 

All-Solution Satisfiability Modulo Theories: applications, algorithms and benchmarks

  • 1. All-Solution Satisfiability Modulo Theories: applications, algorithms and benchmarks Quoc-Sang Phan and Pasquale Malacaria Queen Mary University of London ARES: August 25, 2015 1 / 23
  • 2. Content Satisfiability Modulo Theories (SMT): a decision problem for logical formulas over first-order theories All-SMT: the problem of finding all solutions of an SMT problem with respect to a set of Boolean variables All-SMT solver can benefit various domains of application: Bounded Model Checking, Automated Test Generation, Reliability analysis, and Quantitative Information Flow. We concentrate here on Quantitative Information Flow (QIF) we propose algorithms to design an All-SMT solver on top of an existing SMT solver, and implement it into a prototype tool, called aZ3. 2 / 23
  • 3. Information Flow Secret input (H) Public input (L) Program P Public Output (O) Non-interference Public input (L) Program P Secret input (H) Information leaked Public Output (O) √ ? 3 / 23
  • 4. Non-interference is unachievable int check(int H, int L){ int O; if (L == H) O = ACCEPT; else O = REJECT; return O; } password check Secret input (H) Public input (L) Program P Public Output (O) Non-interference Public input (L) Program P Secret input (H) Information leaked Public Output (O) √ ? Leakage = Secrecy before observing - Secrecy after observing ∆E (XH) = E(XH) − E(XH|XO) where XH is the secret, XO is the output and E is an ”entropy” function 4 / 23
  • 5. Motivations for Quantitative Information Flow 1 information leakage is unavoidable, e.g. authentication systems must leak by design some information about passwords 2 however, provided the leakage is small, usually that is not a problem. 3 so measuring leakage allows for a security assessment of a program 4 This work provides new and fast algorithms to measure information leaks, “how much” a program leaks 5 / 23
  • 6. Quantifying Information Leaks Theorem: Channel Capacity for deterministic systems ∆E (XH) ≤ log2(|O|) holds for Shannon entropy and R´enyi’s min-entropy holds for all possible distributions of XH. is the basis of state-of-the-art techniques for Quantitative Information Flow analysis. based on the above we have: Definition Quantitative Information Flow (QIF) is the problem of counting N, the number of possible outputs of a given program P. 6 / 23
  • 7. An example base = 8; if (H < 16 and H>=0) then O = base + H else O = base Figure: Data sanitization program Here then O is in [8..23], so leakage ≤ log(15), possible bits configurations in O are 0 . . . 01000 to 0 . . . 010111 7 / 23
  • 8. From programs to formulas First step in our approach is to understand how programs are translated into formulas: using Single Static Assignment (SSA) a program P is translated into a conjunctive formula ϕP 8 / 23
  • 9. Quantifying as Counting Adversary tries to infer H from L and O H L O f O is stored as a bit vector b1b2 . . . bM. Assume we have a first-order formula ϕP such that: ϕP contains a set of Boolean variables VI := {p1, p2, .., pM } pi = if and only if bi is 1, and pi = ⊥ if and only if bi = 0 Counting outputs of P ≡ Counting models of ϕP w.r.t. VI 9 / 23
  • 10. QIF analysis using a All-SMT solver Program transformation L = 8; if (H < 16) O = H + L; else O = L; (L1 = 8) ∧ (G0 = H0 < 16) ∧ (O1 = H0 + L1) ∧ (O2 = L1) ∧ (O3 = G0?O1 : O2) Figure: A simple program P encoded into a first-order formula ϕP Formula instrumentation to build the set VI : (assert (= (= #b1 (( extract 0 0) O3)) p1)) 10 / 23
  • 11. QIF analysis using a All-SMT solver We introduce two algorithms for All-SMT solving. Both use APIs provided by an SMT solver. Blocking clause After finding a model µ = l0 ∧ l1 ∧ · · · ∧ lm ∧ . . . Add the clause: block = ¬l0 ∨ ¬l1 ∨ · · · ∨ ¬lm 11 / 23
  • 13. Blocking Clause all-SMT The blocking clauses method is straightforward and it is simple to implement. However, adding a large number of blocking clauses will require a large amount of memory. Also the large number of clauses slows down the Boolean Constraint Propagation procedure of the underlying solver. To address these inefficiencies we introduce an alternative method which avoids re-discovering solutions using depth-first search (DFS). 13 / 23
  • 14. QIF analysis using a All-SMT solver Use APIs provided by an SMT solver Depth-first search Two components: A DPLL like procedure to enumerate truth assignments. Use the SMT solver to check consistency of the truth assignments. 14 / 23
  • 15. Depth First Search all-SMT 15 / 23
  • 16. Depth First Search all-SMT The method choose literal chooses the next state to explore from VI in a DFS manner, and even if there are 2N possible states efficient pruning avoid exponential blow-out for programs that “don’t leak too much”, i.e. Depth-first search all-SMT algorithm is linear in |O| 16 / 23
  • 17. QIF analysis using Model Checking UNSAT p1 p1 ∧ p2 p1 ∧ p2 ∧ p3 p1 ∧ p2 ∧ p3 ∧ p4 p1 ∧ p2 ∧ p3 ∧ p4 ∧ p5p1 ∧ p2 ∧ p3 ∧ p4 ∧ ¬p5 p1 p2 p3 p4 p5 assert !(p1 && p2 && p3 && p4 && p5); 17 / 23
  • 18. Implementation Tools selected: Model Checking: CBMC (Ansi C) Symbolic Execution: Symbolic PathFinder (Java bytecode) Program transformation: CBMC SMT solver: z3 Benchmarks include: Vulnerabilities in Linux kernel Anonymity protocols A Tax program from the European project HATS (Java) Assumptions: all programs have bounded loops, no recursion. 18 / 23
  • 21. Conclusions P program transformation ϕP QIF All-SMT Formal methods DPLL(T ) Two approaches: Use formal methods to mimic DPLL(T ). QIF analysis using Model Checking. QIF analysis using Symbolic Execution. Generate ϕP, then using DPLL(T ). Generate ϕP using program transformation. Extend an SMT solver for All-SMT. 21 / 23
  • 22. THANK YOU FOR YOUR ATTENTION! 22 / 23