SlideShare a Scribd company logo
1 of 22
Download to read offline
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 InstructionsZeeshan Ahmed
 
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 resultsEdward 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 cAbdelrahman Elewah
 
180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-doc180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-dochomeworkping10
 
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 CodeGreenLabAtDI
 
Introduction to Control systems in scilab
Introduction to Control systems in scilabIntroduction to Control systems in scilab
Introduction to Control systems in scilabScilab
 
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
 
Clipping in Computer Graphics
Clipping in Computer GraphicsClipping in Computer Graphics
Clipping in Computer GraphicsLaxman Puri
 
Matlab for Electrical Engineers
Matlab for Electrical EngineersMatlab for Electrical Engineers
Matlab for Electrical EngineersManish Joshi
 
Storage classes in c language
Storage classes in c languageStorage classes in c language
Storage classes in c languagetanmaymodi4
 
Reactive cocoa 101
Reactive cocoa 101Reactive cocoa 101
Reactive cocoa 101Hai 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 AlgorithmsVincenzo De Florio
 
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
 
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 reductionVLSICS Design
 
a traffic analysis tool
a traffic analysis toola traffic analysis tool
a traffic analysis toolESUG
 
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 DataAM Publications
 
Constraint-Based Fault-Localization
Constraint-Based Fault-LocalizationConstraint-Based Fault-Localization
Constraint-Based Fault-LocalizationMohammed Bekkouche
 
Continuous Systems To Discrete Event Systems
Continuous Systems To Discrete Event SystemsContinuous Systems To Discrete Event Systems
Continuous Systems To Discrete Event Systemsahmad 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 FlowQuoc-Sang Phan
 
Approximation algorithms
Approximation algorithmsApproximation algorithms
Approximation algorithmsGanesh Solanke
 
Algorithm Analysis.pdf
Algorithm Analysis.pdfAlgorithm Analysis.pdf
Algorithm Analysis.pdfMemMem25
 
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.docxsheronlewthwaite
 

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...
 
OSCh7
OSCh7OSCh7
OSCh7
 
OS_Ch7
OS_Ch7OS_Ch7
OS_Ch7
 
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 ConstraintsQuoc-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 TheoriesQuoc-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 ExecutionQuoc-Sang Phan
 
Symbolic Quantitative Information Flow
Symbolic Quantitative Information FlowSymbolic Quantitative Information Flow
Symbolic Quantitative Information FlowQuoc-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

Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxyaramohamed343013
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsAArockiyaNisha
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRDelhi Call girls
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PPRINCE C P
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxSwapnil Therkar
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |aasikanpl
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsSérgio Sacani
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfSwapnil Therkar
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxpradhanghanshyam7136
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 

Recently uploaded (20)

Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docx
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based Nanomaterials
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptx
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 

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