SlideShare a Scribd company logo
A Verified Decision Procedure for
Pseudo-Boolean Formulas
Tobias Philipp Anna Tigunova
International Center for Computational Logic
Technische Universit¨at Dresden, Germany
The SAT approach:
easily verifiable and efficient
E´en, S¨orensson: Translating pseudo-Boolean constraints into SAT. In: JSAT, 2006.
PB F SAT solver
SAT I solution
UNSAT P drat-trim
verified encoding
verified decision procedure for PB formulas
1
Outline
1. Normalized pseudo-Boolean formulas
2. Sequential Weighted Counter encoding
3. Mechanical verification
4. Experimental evaluation
2
Pseudo-Boolean constraints
n
∑
i=1
wi · xi ¡ k ¡ ∈ {=, ≤, <, >, ≥}
Normal form
¡ =≤
1 ≤ k < n,
1 ≤ wi ≤ k for all i ∈ {1, . . . , n}
no variable occurs more than once.
3
Encodings
F encodes G
1. F |= G
2. for every model I of G there is model I of F st
I (x) = I(x) for all x ∈ vars(G).
Sequential Weighted Counter (SWC)
H¨olldobler et. al: A Compact Encoding of Pseudo-Boolean
Constraints into SAT. In: KI, 2012.
less clauses in 99% in the PB benchmarks 2010 and 2011
unit propagation detects inconsistencies
unit propagation maintains generalized arc consistency
easily verifiable
4
The Sequential Weighted Counter
x1 x2 . . . xn
. . .
...
...
...
s1,1
s1,2
s1,k+1
s2,1
s2,2
s2,k+1
sn−1,1
sn−1,2
sn−1,k+1
5
The Sequential Weighted Counter
x1 x2 . . . xn
. . .
...
...
...
s1,1
s1,2
s1,k+1
s2,1
s2,2
s2,k+1
sn−1,1
sn−1,2
sn−1,k+1
(¬si−1,j ∨ si,j) for all 2 ≤ i < n and 1 ≤ j ≤ k
5
The Sequential Weighted Counter
x1 x2 . . . xn
. . .
...
...
...
s1,1
s1,2
s1,k+1
s2,1
s2,2
s2,k+1
sn−1,1
sn−1,2
sn−1,k+1
(¬xi ∨ si,j) for all 1 ≤ i < n, and 1 ≤ j ≤ wi
5
The Sequential Weighted Counter
x1 x2 . . . xn
. . .
...
...
...
s1,1
s1,2
s1,k+1
s2,1
s2,2
s2,k+1
sn−1,1
sn−1,2
sn−1,k+1
(¬si−1,j ∨ ¬xi ∨ si,j+wi
) for all 2 ≤ i < n, 1 ≤ j < k − wi + 1
5
The Sequential Weighted Counter
x1 x2 . . . xn
. . .
...
...
...
s1,1
s1,2
s1,k+1
s2,1
s2,2
s2,k+1
sn−1,1
sn−1,2
sn−1,k+1
(¬si−1,k+1−wi
∨ ¬xi) for all 2 ≤ i ≤ n
5
Mechanical Verification
Coq as a language for formalization, specification and proofs
Theorem MainTheorem:
∀ wf : nat → nat, ∀ n k : nat,
normalized n k wf → correctly encodes (pbc wf n k) (SWC n k wf).
Extraction to Haskell
SWC and the sequential counter: 3800 lines of Coq code
6
Evaluation: Setting
Benchmark
all small integer, linear instances from the PB competition 2016,
total: 777
Hardware
cluster with Intel E5-2670 CPUs and 2.5 GB RAM
Limits 6h wall clock time
verified normalization, lingeling, drat-trim
pbsolver more encodings, MiniSAT
sat4j SAT-based with special PB reasoning procedures
7
Evaluation: Results
350
400
450
500
550
600
0 5000 10000 15000 20000
numberofsolvedinstances
timeout in seconds
pbsolver
sat4j
verified
8
Conclusion
efficient and easily-verifiable decision procedure for PB formulas
using certifying SAT approach
Future work
mechanical verification of normalization
adaption to maximum satisfiability, planning
9
A Verified Decision Procedure for
Pseudo-Boolean Formulas
Tobias Philipp Anna Tigunova
International Center for Computational Logic
Technische Universit¨at Dresden, Germany
Thank you for your attention.
10
The Sequential Weighted Counter: Example
Consider the PB-constraint 3x1 + 2x2 + 4x3 ≤ 5, where wf is a
function giving the corresponding weights. Then
SWC(3, 5, wf) = F1 ∧ F2 ∧ F3 ∧ F4, where
F1 = (¬s1,1 ∨ s2,1) ∧ (¬s1,2 ∨ s2,2) ∧ (¬s1,3 ∨ s2,3)∧
(¬s1,4 ∨ s2,4) ∧ (¬s1,5 ∨ s2,5)
F2 = (¬x1 ∨ s1,1) ∧ (¬x1 ∨ s1,2) ∧ (¬x1 ∨ s1,3)∧
(¬x2 ∨ s2,1) ∧ (¬x2 ∨ s2,2)
F3 = (¬s1,1 ∨ ¬x2 ∨ s2,3) ∧ (¬s1,2 ∨ ¬x2 ∨ s2,4)∧
(¬s1,3 ∨ ¬x2 ∨ s2,5)
F4 = (¬s1,4 ∨ ¬x2) ∧ (¬s2,2 ∨ ¬x3)
11

More Related Content

What's hot

Crossing Abstraction Barriers When Debugging In Dynamic Languages
Crossing Abstraction Barriers When Debugging In Dynamic LanguagesCrossing Abstraction Barriers When Debugging In Dynamic Languages
Crossing Abstraction Barriers When Debugging In Dynamic Languages
Bastian Kruck
 
Madaari : Ordering For The Monkeys
Madaari : Ordering For The MonkeysMadaari : Ordering For The Monkeys
Madaari : Ordering For The Monkeys
J On The Beach
 
Stranger in These Parts. A Hired Gun in the JS Corral (JSConf US 2012)
Stranger in These Parts. A Hired Gun in the JS Corral (JSConf US 2012)Stranger in These Parts. A Hired Gun in the JS Corral (JSConf US 2012)
Stranger in These Parts. A Hired Gun in the JS Corral (JSConf US 2012)
Igalia
 
R7210204 switching theory & logic design
R7210204 switching theory & logic designR7210204 switching theory & logic design
R7210204 switching theory & logic design
Sree Murthy
 

What's hot (20)

Pushdown automata
Pushdown automataPushdown automata
Pushdown automata
 
Gate-Cs 1992
Gate-Cs 1992Gate-Cs 1992
Gate-Cs 1992
 
Low cost reversible signed comparator
Low cost reversible signed comparatorLow cost reversible signed comparator
Low cost reversible signed comparator
 
Lecture04
Lecture04Lecture04
Lecture04
 
Crossing Abstraction Barriers When Debugging In Dynamic Languages
Crossing Abstraction Barriers When Debugging In Dynamic LanguagesCrossing Abstraction Barriers When Debugging In Dynamic Languages
Crossing Abstraction Barriers When Debugging In Dynamic Languages
 
Madaari : Ordering For The Monkeys
Madaari : Ordering For The MonkeysMadaari : Ordering For The Monkeys
Madaari : Ordering For The Monkeys
 
Re-engineering Eclipse MDT/OCL for Xtext
Re-engineering Eclipse MDT/OCL for XtextRe-engineering Eclipse MDT/OCL for Xtext
Re-engineering Eclipse MDT/OCL for Xtext
 
Stranger in These Parts. A Hired Gun in the JS Corral (JSConf US 2012)
Stranger in These Parts. A Hired Gun in the JS Corral (JSConf US 2012)Stranger in These Parts. A Hired Gun in the JS Corral (JSConf US 2012)
Stranger in These Parts. A Hired Gun in the JS Corral (JSConf US 2012)
 
計算機結構 (習題:Nand2tetris硬體部分)
計算機結構  (習題:Nand2tetris硬體部分)計算機結構  (習題:Nand2tetris硬體部分)
計算機結構 (習題:Nand2tetris硬體部分)
 
Evolution of Structure of Some Binary Group-Based N-Bit Compartor, N-To-2N De...
Evolution of Structure of Some Binary Group-Based N-Bit Compartor, N-To-2N De...Evolution of Structure of Some Binary Group-Based N-Bit Compartor, N-To-2N De...
Evolution of Structure of Some Binary Group-Based N-Bit Compartor, N-To-2N De...
 
Planqc2020 codar
Planqc2020 codarPlanqc2020 codar
Planqc2020 codar
 
Android Developer Days: Increasing performance of big arrays processing on An...
Android Developer Days: Increasing performance of big arrays processing on An...Android Developer Days: Increasing performance of big arrays processing on An...
Android Developer Days: Increasing performance of big arrays processing on An...
 
PDA (pushdown automaton)
PDA (pushdown automaton)PDA (pushdown automaton)
PDA (pushdown automaton)
 
Guarding Terrains though the Lens of Parameterized Complexity
Guarding Terrains though the Lens of Parameterized ComplexityGuarding Terrains though the Lens of Parameterized Complexity
Guarding Terrains though the Lens of Parameterized Complexity
 
R7210204 switching theory & logic design
R7210204 switching theory & logic designR7210204 switching theory & logic design
R7210204 switching theory & logic design
 
Hash functions MD5 and RIPEMD 160
Hash functions MD5 and RIPEMD 160Hash functions MD5 and RIPEMD 160
Hash functions MD5 and RIPEMD 160
 
zkStudyClub: CirC and Compiling Programs to Circuits
zkStudyClub: CirC and Compiling Programs to CircuitszkStudyClub: CirC and Compiling Programs to Circuits
zkStudyClub: CirC and Compiling Programs to Circuits
 
qlp
qlpqlp
qlp
 
A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...
A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...
A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...
 
I Hourly Test IT
I Hourly Test ITI Hourly Test IT
I Hourly Test IT
 

Similar to A Verified Decision Procedure for Pseudo-Boolean Formulas

129966862758614726[1]
129966862758614726[1]129966862758614726[1]
129966862758614726[1]
威華 王
 
Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18
Aritra Sarkar
 

Similar to A Verified Decision Procedure for Pseudo-Boolean Formulas (20)

QX Simulator and quantum programming - 2020-04-28
QX Simulator and quantum programming - 2020-04-28QX Simulator and quantum programming - 2020-04-28
QX Simulator and quantum programming - 2020-04-28
 
2016 03-03 marchand
2016 03-03 marchand2016 03-03 marchand
2016 03-03 marchand
 
Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...
Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...
Parametrized Model Checking of Fault Tolerant Distributed Algorithms by Abstr...
 
zkStudyClub - ProtoStar (Binyi Chen & Benedikt Bünz, Espresso Systems)
zkStudyClub - ProtoStar (Binyi Chen & Benedikt Bünz, Espresso Systems)zkStudyClub - ProtoStar (Binyi Chen & Benedikt Bünz, Espresso Systems)
zkStudyClub - ProtoStar (Binyi Chen & Benedikt Bünz, Espresso Systems)
 
PBLib - A Library for Encoding Pseudo-Boolean Constraints into CNF
PBLib - A Library for Encoding Pseudo-Boolean Constraints into CNFPBLib - A Library for Encoding Pseudo-Boolean Constraints into CNF
PBLib - A Library for Encoding Pseudo-Boolean Constraints into CNF
 
20141204.journal club
20141204.journal club20141204.journal club
20141204.journal club
 
129966862758614726[1]
129966862758614726[1]129966862758614726[1]
129966862758614726[1]
 
3320 cyclic codes.ppt
3320 cyclic codes.ppt3320 cyclic codes.ppt
3320 cyclic codes.ppt
 
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
 
R package 'bayesImageS': a case study in Bayesian computation using Rcpp and ...
R package 'bayesImageS': a case study in Bayesian computation using Rcpp and ...R package 'bayesImageS': a case study in Bayesian computation using Rcpp and ...
R package 'bayesImageS': a case study in Bayesian computation using Rcpp and ...
 
Developing fast low-rank tensor methods for solving PDEs with uncertain coef...
Developing fast  low-rank tensor methods for solving PDEs with uncertain coef...Developing fast  low-rank tensor methods for solving PDEs with uncertain coef...
Developing fast low-rank tensor methods for solving PDEs with uncertain coef...
 
Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18Virus, Vaccines, Genes and Quantum - 2020-06-18
Virus, Vaccines, Genes and Quantum - 2020-06-18
 
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
 
lecture01_lecture01_lecture0001_ceva.pdf
lecture01_lecture01_lecture0001_ceva.pdflecture01_lecture01_lecture0001_ceva.pdf
lecture01_lecture01_lecture0001_ceva.pdf
 
Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...
 
Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...Cycle’s topological optimizations and the iterative decoding problem on gener...
Cycle’s topological optimizations and the iterative decoding problem on gener...
 
Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...
Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...
Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing
 
Julia Kreutzer - 2017 - Bandit Structured Prediction for Neural Seq2Seq Learning
Julia Kreutzer - 2017 - Bandit Structured Prediction for Neural Seq2Seq LearningJulia Kreutzer - 2017 - Bandit Structured Prediction for Neural Seq2Seq Learning
Julia Kreutzer - 2017 - Bandit Structured Prediction for Neural Seq2Seq Learning
 
High Speed Decoding of Non-Binary Irregular LDPC Codes Using GPUs (Paper)
High Speed Decoding of Non-Binary Irregular LDPC Codes Using GPUs (Paper)High Speed Decoding of Non-Binary Irregular LDPC Codes Using GPUs (Paper)
High Speed Decoding of Non-Binary Irregular LDPC Codes Using GPUs (Paper)
 

More from Tobias Philipp

More from Tobias Philipp (8)

Fuzzing and Verifying RAT Refutations with Deletion Information
Fuzzing and Verifying RAT Refutations with Deletion InformationFuzzing and Verifying RAT Refutations with Deletion Information
Fuzzing and Verifying RAT Refutations with Deletion Information
 
An Expressive Model for Instance Decomposition Based Parallel SAT Solvers
An Expressive Model for Instance Decomposition Based Parallel SAT SolversAn Expressive Model for Instance Decomposition Based Parallel SAT Solvers
An Expressive Model for Instance Decomposition Based Parallel SAT Solvers
 
Unsatisfiability Proofs for Parallel SAT Solver Portfolios with Clause Sharin...
Unsatisfiability Proofs for Parallel SAT Solver Portfolios with Clause Sharin...Unsatisfiability Proofs for Parallel SAT Solver Portfolios with Clause Sharin...
Unsatisfiability Proofs for Parallel SAT Solver Portfolios with Clause Sharin...
 
The Complexity of Contextual Abduction in Human Reasoning Tasks
The Complexity of Contextual Abduction in Human Reasoning TasksThe Complexity of Contextual Abduction in Human Reasoning Tasks
The Complexity of Contextual Abduction in Human Reasoning Tasks
 
Checking Unsatisfiability Proofs in Parallel
Checking Unsatisfiability Proofs in ParallelChecking Unsatisfiability Proofs in Parallel
Checking Unsatisfiability Proofs in Parallel
 
Anwendungen der Logik in der IT-Sicherheit
Anwendungen der Logik in der IT-SicherheitAnwendungen der Logik in der IT-Sicherheit
Anwendungen der Logik in der IT-Sicherheit
 
Formal Verification with Ada/SPARK
Formal Verification with Ada/SPARKFormal Verification with Ada/SPARK
Formal Verification with Ada/SPARK
 
Formale Verifikation von Answer Set Programming
Formale Verifikation von Answer Set ProgrammingFormale Verifikation von Answer Set Programming
Formale Verifikation von Answer Set Programming
 

Recently uploaded

Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 

A Verified Decision Procedure for Pseudo-Boolean Formulas

  • 1. A Verified Decision Procedure for Pseudo-Boolean Formulas Tobias Philipp Anna Tigunova International Center for Computational Logic Technische Universit¨at Dresden, Germany
  • 2. The SAT approach: easily verifiable and efficient E´en, S¨orensson: Translating pseudo-Boolean constraints into SAT. In: JSAT, 2006. PB F SAT solver SAT I solution UNSAT P drat-trim verified encoding verified decision procedure for PB formulas 1
  • 3. Outline 1. Normalized pseudo-Boolean formulas 2. Sequential Weighted Counter encoding 3. Mechanical verification 4. Experimental evaluation 2
  • 4. Pseudo-Boolean constraints n ∑ i=1 wi · xi ¡ k ¡ ∈ {=, ≤, <, >, ≥} Normal form ¡ =≤ 1 ≤ k < n, 1 ≤ wi ≤ k for all i ∈ {1, . . . , n} no variable occurs more than once. 3
  • 5. Encodings F encodes G 1. F |= G 2. for every model I of G there is model I of F st I (x) = I(x) for all x ∈ vars(G). Sequential Weighted Counter (SWC) H¨olldobler et. al: A Compact Encoding of Pseudo-Boolean Constraints into SAT. In: KI, 2012. less clauses in 99% in the PB benchmarks 2010 and 2011 unit propagation detects inconsistencies unit propagation maintains generalized arc consistency easily verifiable 4
  • 6. The Sequential Weighted Counter x1 x2 . . . xn . . . ... ... ... s1,1 s1,2 s1,k+1 s2,1 s2,2 s2,k+1 sn−1,1 sn−1,2 sn−1,k+1 5
  • 7. The Sequential Weighted Counter x1 x2 . . . xn . . . ... ... ... s1,1 s1,2 s1,k+1 s2,1 s2,2 s2,k+1 sn−1,1 sn−1,2 sn−1,k+1 (¬si−1,j ∨ si,j) for all 2 ≤ i < n and 1 ≤ j ≤ k 5
  • 8. The Sequential Weighted Counter x1 x2 . . . xn . . . ... ... ... s1,1 s1,2 s1,k+1 s2,1 s2,2 s2,k+1 sn−1,1 sn−1,2 sn−1,k+1 (¬xi ∨ si,j) for all 1 ≤ i < n, and 1 ≤ j ≤ wi 5
  • 9. The Sequential Weighted Counter x1 x2 . . . xn . . . ... ... ... s1,1 s1,2 s1,k+1 s2,1 s2,2 s2,k+1 sn−1,1 sn−1,2 sn−1,k+1 (¬si−1,j ∨ ¬xi ∨ si,j+wi ) for all 2 ≤ i < n, 1 ≤ j < k − wi + 1 5
  • 10. The Sequential Weighted Counter x1 x2 . . . xn . . . ... ... ... s1,1 s1,2 s1,k+1 s2,1 s2,2 s2,k+1 sn−1,1 sn−1,2 sn−1,k+1 (¬si−1,k+1−wi ∨ ¬xi) for all 2 ≤ i ≤ n 5
  • 11. Mechanical Verification Coq as a language for formalization, specification and proofs Theorem MainTheorem: ∀ wf : nat → nat, ∀ n k : nat, normalized n k wf → correctly encodes (pbc wf n k) (SWC n k wf). Extraction to Haskell SWC and the sequential counter: 3800 lines of Coq code 6
  • 12. Evaluation: Setting Benchmark all small integer, linear instances from the PB competition 2016, total: 777 Hardware cluster with Intel E5-2670 CPUs and 2.5 GB RAM Limits 6h wall clock time verified normalization, lingeling, drat-trim pbsolver more encodings, MiniSAT sat4j SAT-based with special PB reasoning procedures 7
  • 13. Evaluation: Results 350 400 450 500 550 600 0 5000 10000 15000 20000 numberofsolvedinstances timeout in seconds pbsolver sat4j verified 8
  • 14. Conclusion efficient and easily-verifiable decision procedure for PB formulas using certifying SAT approach Future work mechanical verification of normalization adaption to maximum satisfiability, planning 9
  • 15. A Verified Decision Procedure for Pseudo-Boolean Formulas Tobias Philipp Anna Tigunova International Center for Computational Logic Technische Universit¨at Dresden, Germany Thank you for your attention. 10
  • 16. The Sequential Weighted Counter: Example Consider the PB-constraint 3x1 + 2x2 + 4x3 ≤ 5, where wf is a function giving the corresponding weights. Then SWC(3, 5, wf) = F1 ∧ F2 ∧ F3 ∧ F4, where F1 = (¬s1,1 ∨ s2,1) ∧ (¬s1,2 ∨ s2,2) ∧ (¬s1,3 ∨ s2,3)∧ (¬s1,4 ∨ s2,4) ∧ (¬s1,5 ∨ s2,5) F2 = (¬x1 ∨ s1,1) ∧ (¬x1 ∨ s1,2) ∧ (¬x1 ∨ s1,3)∧ (¬x2 ∨ s2,1) ∧ (¬x2 ∨ s2,2) F3 = (¬s1,1 ∨ ¬x2 ∨ s2,3) ∧ (¬s1,2 ∨ ¬x2 ∨ s2,4)∧ (¬s1,3 ∨ ¬x2 ∨ s2,5) F4 = (¬s1,4 ∨ ¬x2) ∧ (¬s2,2 ∨ ¬x3) 11