Introduction to SAT
Alexander Nadel
Technion, Data and Decision Sciences & Intel, Israel
Indian SAT+SMT School, 2024
August 18, 2024
Pune, Maharashtra, India
1
8/6/2024
PEG PDS DDI
Introduction
SAT: determine if a Boolean formula in Conjunctive Normal Form (CNF) is satisfiable
The original NP-Complete problem
SAT has exponential complexity unless P = NP
P = NP (SAT): frequently called the most important outstanding question in CS
2
8/6/2024
F = (a ∨ b) ∧ (¬a ∨ ¬b ∨ c)
clause #1
clause #2
Literals
PEG PDS DDI
Introduction
SAT is an unresolved mystery!
Yet, SAT solvers are scalable widely used tools
Main goals for today:
3
8/6/2024
PEG PDS DDI
SAT Applications
4
8/6/2024
PEG PDS DDI
SAT Application Examples
5
8/6/2024
Optimization with
SAT@
PEG PDS DDI
SAT Resources
SAT Association: http://satassociation.org/
SAT Conferences: http://www.satisfiability.org/
SAT Competitions: http://www.satcompetition.org/
SATLive: http://www.satlive.org/
6
8/6/2024
PEG PDS DDI
Why am I Interested in SAT?
2002: stumbled upon SAT and completed my Master thesis about it (Hebrew University)
2003: joined Intel
2009: PhD about SAT (Tel-Aviv University)
2023: joined the Technion’s Data and Decision Sciences faculty as a part-time research fellow
Most SW is closed-sourced, but lately I was able to participate in some open-source projects:
7
8/6/2024
PEG PDS DDI
Agenda
How does a conflict-driven SAT solver work?
Applying SAT by example
Advanced core SAT algorithms
8
8/6/2024
PEG PDS DDI
Not in Today’s Agenda
SAT Solving
SAT-based paradigms and solvers
…
9
8/6/2024
PEG PDS DDI
SAT Fundamentals: Backtrack Search
The baseline algorithm in modern SAT solvers is backtrack search
Called DPLL or DLL
Davis, Martin; Logemann, George; Loveland, Donald: "A Machine Program for Theorem Proving". Communications of the ACM. 5 (7): 394–397. (1961).
Davis, Martin; Putnam, Hilary: A computing procedure for quantification theory. Journal of the ACM 7 (1960)
10
8/6/2024
PEG PDS DDI
From Enumeration to DPLL
11
8/6/2024
Boolean Constraint Propagation (BCP): after a decision, apply the unit clause rule till fixed-point
0
1
0
Carry out backtrack search.
Stop when a model is found
0
The unassigned literal c1 must be implied
F = (a ∨ b) ∧ (¬a ∨ ¬b ∨ c)
clause #1
clause #2
Literals
a
b
b
c
c
c
c
0
1
0
0
0
0
0
0
1
1
1
1
1
1
a
b
b
c
c
c
0
1
0
0
0
0
0
1
1
1
1
1
a
b
c
Stop when a clause turns UNSAT
c2
c1
c3
c2
c1
c3
Falsified literal:
Satisfied literal:
Unassigned literal:
A unit clause -- one unassigned, rest falsified:
1
a
b
c
0
0
The unit clause rule: the unassigned literal in a unit clause must be 1
Implied in parent clause #1:
PEG PDS DDI
The Mystery of SAT Solver Scalability
DPLL: backtrack search with BCP until a model is found (SAT) or completion (UNSAT)
DPLL could handle formulas with <2,000 clauses
Modern SAT solvers cope with industrial instances of 100,000,000’s clauses
The introduction of Conflict-Driven-Clause-Learning (CDCL) or, simply, �Conflict-driven Solving was the birth of modern highly-scalable SAT solving
Learn from conflicts to drive & prune backtrack search
12
8/6/2024
a
b
b
c
c
c
c
0
1
0
0
0
0
0
0
1
1
1
1
1
1
PEG PDS DDI
CDCL: the Intuitive Principles
Learning and pruning
Locality
Well-engineered data structures
Beyond CDCL
13
8/6/2024
PEG PDS DDI
Basic CDCL Algorithm
Preprocess() // Simplify the formula
While (true)
14
8/6/2024
PEG PDS DDI
Conflict-driven SAT Solving: Seminal Work
15
8/6/2024
1996: GRASP by Joao P. Marques-Silva and Karem A. Sakallah
João P. Marques Silva, Karem A. Sakallah: GRASP - a new search algorithm for satisfiability. ICCAD 1996: 220-227��2001: Chaff by Matthew W. Moskewicz, Conor F. Madigan, Ying Zhao, Lintao Zhang and Sharad Malik
Matthew W. Moskewicz, Conor F. Madigan, Ying Zhao, Lintao Zhang, Sharad Malik: Chaff: Engineering an Efficient SAT Solver. DAC 2001: 530-535
PEG PDS DDI
Chaff’s Conflict Analysis
16
8/6/2024
h@5(C5)
b@2
c@3
d@4
e@5
f@5(C6)
g@5(C3)
a@1
Decision Level 4
C1= ¬a ∨ f ∨ g
C2= ¬a ∨ f ∨ ¬g
C3= ¬c ∨ ¬f ∨ g
C4= ¬b ∨ ¬f ∨ ¬g
C5= ¬e ∨ h
Decision Level 1
Decision Level 2
Decision Level 3
Decision Level 5
Decision variable/literal
C6= ¬e ∨ ¬h ∨ f
Implied literal
Conflict analysis starts
PEG PDS DDI
Implication Graphs and Conflict Analysis
Every vertex corresponds to an assigned literal
A decision literal has 0 incoming edges
A literal implied in clause C has |C|-1 incoming edges from every other literal in C
We only need the strongly connected component of the conflict
17
8/6/2024
h@5(C5)
C1= ¬a ∨ f ∨ g
C2= ¬a ∨ f ∨ ¬g
C3= ¬c ∨ ¬f ∨ g
C4= ¬b ∨ ¬f ∨ ¬g
C5= ¬e ∨ h
a@1
b@2
c@3
d@4
e@5
g@5
¬ g@5
f@5
c@3
b@2
C3
C3
C4
C6
C4
Implication graph
f@5(C6)
C6= ¬e ∨ ¬h ∨ f
h@5
C5
C6
g@5(C3)
e@5
PEG PDS DDI
Implication Graphs and Conflict Analysis
Conflict cut
Conflict clause
18
8/6/2024
h@5(C5)
C1= ¬a ∨ f ∨ g
C2= ¬a ∨ f ∨ ¬g
C3= ¬c ∨ ¬f ∨ g
C4= ¬b ∨ ¬f ∨ ¬g
C5= ¬e ∨ h
a@1
b@2
c@3
d@4
e@5
g@5
¬ g@5
f@5
c@3
b@2
C3
C3
C4
C6
C4
Implication graph
f@5(C6)
C6= ¬e ∨ ¬h ∨ f
h@5
C5
C6
g@5(C3)
e@5
¬f ∨ ¬c ∨ ¬b
¬h ∨ ¬e ∨ ¬c ∨ ¬b
¬e ∨ ¬c ∨ ¬b
PEG PDS DDI
Implication Graphs and Conflict Analysis
A UIP cut has exactly one literal l of the last level on the reason side of its edges
UIP’s are ordered starting from the conflict
19
8/6/2024
h@5(C5)
C1= ¬a ∨ f ∨ g
C2= ¬a ∨ f ∨ ¬g
C3= ¬c ∨ ¬f ∨ g
C4= ¬b ∨ ¬f ∨ ¬g
C5= ¬e ∨ h
a@1
b@2
c@3
d@4
e@5
f@5(C6)
C6= ¬e ∨ ¬h ∨ f
g@5(C3)
g@5
¬ g@5
f@5
c@3
b@2
C3
C3
C4
C6
C4
h@5
C5
e@5
¬f ∨ ¬c ∨ ¬b: 1UIP
¬h ∨ ¬e ∨ ¬c ∨ ¬b
¬e ∨ ¬c ∨ ¬b: 2UIP
C6
Implication graph
PEG PDS DDI
Chaff’s Conflict Analysis
20
8/17/2024
h@5(C5)
f@1(C8)
c@3
¬f@3(C7)
C1= ¬a ∨ f ∨ g
C2= ¬a ∨ f ∨ ¬g
C3= ¬c ∨ ¬f ∨ g
C4= ¬b ∨ ¬f ∨ ¬g
C5= ¬e ∨ h
a@1
b@2
c@3
d@4
e@5
g@5
¬ g@5
f@5
e@5
c@3
b@2
1UIP
C7 = ¬f ∨ ¬c ∨ ¬b
a@1
b@2
C3
C3
C4
C6
C4
g@3
¬ g@3
a@1
¬ f@3
C1
C1
C2
C2
1UIP
C8 = f ∨ ¬a
a@1
c@3
b@2
NCB to 3
NCB to 1
Implication graph
f@5(C6)
g@3(C1)
C6= ¬e ∨ ¬h ∨ f
h@5
C5
C6
g@5(C3)
¬c@2
¬b@3
¬e@4
d@5
g@6
h@7
C7
C7
Conflict analysis completed
PEG PDS DDI
GRASP’s Conflict Analysis
b@2
a@1
g@3
a@1
b@2
c@3
d@4
e@5
f@5(C5)
g@5
¬g@5
f@5
e@5
c@3
1UIP
C6 = ¬f ∨ ¬c ∨ ¬b
C3
C3
C4
C5
C4
2UIP 🡪 1UIP
C7 = ¬e ∨ f
¬f@3(C6)
a@1
b@2
c@3
d@4
f@1(C8)
a@1
¬f@3
C1
C1
C2
C2
1UIP
c@3
b@2
2UIP🡪1UIP
C1= ¬a ∨ f ∨ g
C2= ¬a ∨ f ∨ ¬g
C3= ¬c ∨ ¬f ∨ g
C4= ¬b ∨ ¬f ∨ ¬g
C5= ¬e ∨ f
b@2
C9 = ¬c ∨ ¬b ∨ ¬f
C8 = f ∨ ¬a
CB to 4
¬g@3
Backtrack to conflict level 3
CB to 2
In GRASP, f is a special kind of a “flipped” decision variable at level 5, but GRASP learns as if ¬f were implied at level 3
g@5(C3)
g@3(C1)
¬g@1(C4)
¬c@1(C3)
d@3
¬e@4
Conflict analysis completed
PEG PDS DDI
Up-to-date Conflict Analysis Algorithm �Covers GRASP & Chaff & Modern Solvers
22
8/6/2024
PEG PDS DDI
Boolean Constraint Propagation (BCP) Essentials
BCP is carried out after every decision and flip and consumes 80-90% run-time
What?
How?
23
8/6/2024
c2
c1
c3
c2
c1
c3
c2
c1
c3
Falsified literal:
Satisfied literal:
Unassigned literal:
PEG PDS DDI
Efficient Data Structure for BCP
Hantao Zhang: SATO: An Efficient Propositional Prover. CADE 1997: 272-275
Sörensson, N., Eén, N.: MiniSAT 2.1 and MiniSAT++ 1.0 - SAT race Editions. SAT, Competitive Event Booklet (2008) (caching one literal)� Geoffrey Chu, Aaron Harwood, Peter J. Stuckey: Cache Conscious Data Structures for Boolean Satisfiability Solvers. J. Satisf. Boolean Model. Comput. 6(1-3): 99-120 (2009) (caching one literal & inlining binary clauses)
8/6/2024
c4
c5
c7
c2
c1
c3
c6
Falsified literal:
Satisfied literal:
Unassigned literal:
Unknown literal:
Non-falsified literal:
Non-satisfied literal:
c4
c5
c7
c3
c2
c6
c1
PEG PDS DDI
BCP assuming NCB
For every satisfied literal l in the literal stack Π (literals to be propagated)
Clause visit: assume WLOG c2 ≡ ¬l
25
8/6/2024
c4
c2 ≡ ¬l
c3
c1
c4
c2 ≡ ¬l
c3
c1
Falsified literal:
Satisfied literal:
Unassigned literal:
Unknown literal:
c4 ≡ k
c2 ≡ ¬l
c3
c1
Non-falsified literal:
c4 ≡ ¬l
c2≡ k
c3
c1
c4
c2 ≡ ¬l
c3
c1
c4
c2 ≡ ¬l
c3
c1
c4
c2 ≡ ¬l
c3
c1
Non-satisfied literal:
PEG PDS DDI
Agenda
How does a conflict-driven SAT solver work?
Applying SAT by example
Advanced core SAT algorithms
26
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
27
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
MiniSat-based:
Armin Biere’s& derived:
Others:
2006
RSAT
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Glucose
Lingeling
Lingeling
abcdSAT
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
2022
2023
KissatMAB-HyWalk
Zheng
He�Chen
Zhou
Li
SBVA-CaDiCaL
Haberlandt
Green
PEG PDS DDI
Chaff
Covered:
To cover:
28
8/6/2024
PEG PDS DDI
Variable State Independent Decaying Sum (VSIDS)
Each literal l has a counter S(l), initialized to 0
For every new clause C=[c1, c2, …, cn], S(ci) is incremented for every ci∈C
Including initial and conflict clauses
The (unassigned) variable and polarity with the highest counter is chosen
Ties are broken randomly
Periodically (once in 256 conflicts), all the counters are halved.
PEG PDS DDI
VSIDS Example
Literal | Score |
a | 0 |
¬a | 0 |
b | 0 |
¬b | 0 |
c | 0 |
¬c | 0 |
d | 0 |
¬d | 0 |
e | 0 |
¬e | 0 |
… | … |
Heuristic-related data
Search tree
Conflicts till now: 0
PEG PDS DDI
VSIDS Example
Literal | Score |
a | 4 |
¬a | 5 |
b | 3 |
¬b | 3 |
c | 2 |
¬c | 3 |
d | 2 |
¬d | 4 |
e | 2 |
¬e | 6 |
… | … |
Heuristic-related data
Search tree
Conflicts till now: 0
Count literal appearances in the initial formula
PEG PDS DDI
VSIDS Example
Literal | Score |
a | 4 |
¬a | 5 |
b | 3 |
¬b | 3 |
c | 2 |
¬c | 3 |
d | 2 |
¬d | 4 |
e | 2 |
¬e | 6 |
… | … |
Heuristic-related data
Search tree
Conflicts till now: 0
Pick a literal with maximal score
¬e🡪{h,i}
PEG PDS DDI
VSIDS Example
Literal | Score |
a | 4 |
¬a | 5 |
b | 3 |
¬b | 3 |
c | 2 |
¬c | 3 |
d | 2 |
¬d | 4 |
e | 2 |
¬e | 6 |
… | … |
Heuristic-related data
Search tree
Conflicts till now: 0
¬e🡪{h,i}
¬a🡪{d}
Pick an unassigned literal with maximal score
PEG PDS DDI
VSIDS Example
Literal | Score |
a | 4 |
¬a | 5 |
b | 3 |
¬b | 3 |
c | 2 |
¬c | 3 |
d | 2 |
¬d | 4 |
e | 2 |
¬e | 6 |
… | … |
Heuristic-related data
Search tree
Conflicts till now: 0
¬e🡪{h,i}
Conflict
¬a🡪{d}
PEG PDS DDI
VSIDS Example
Literal | Score |
a | 4🡪5 |
¬a | 5 |
b | 3 |
¬b | 3🡪4 |
c | 2🡪3 |
¬c | 3 |
d | 2 |
¬d | 4 |
e | 2 |
¬e | 6 |
… | … |
Heuristic-related data
Search tree
Conflicts till now: 1
¬h ∨ a ∨ c ∨ ¬b ∨ k
Increment scores for conflict clause literals
¬e🡪{h,i}
¬a🡪{d}
PEG PDS DDI
VSIDS Example
Literal | Score |
a | 10 |
¬a | 12 |
b | 18 |
¬b | 6 |
c | 12 |
¬c | 6 |
d | 2 |
¬d | 6 |
e | 16 |
¬e | 6 |
… | … |
Heuristic-related data
Search tree
Conflicts till now: 256
Assume the threshold of 256 is reached
¬e🡪{h,i}
¬a🡪{d}
PEG PDS DDI
VSIDS Example
Literal | Score |
a | 10🡪5 |
¬a | 12🡪6 |
b | 18🡪9 |
¬b | 6🡪3 |
c | 12🡪6 |
¬c | 6🡪3 |
d | 2🡪1 |
¬d | 6🡪3 |
e | 16🡪8 |
¬e | 6🡪3 |
… | … |
Heuristic-related data
Search tree
Conflicts till now: 256
Halve the scores
¬e🡪{h,i}
¬a🡪{d}
PEG PDS DDI
VSIDS vs. Static Heuristics
Pre-Chaff static heuristics
VSIDS was a breakthrough
PEG PDS DDI
Conflict Clause Deletion
Maintaining too many clauses slows down the solver
D. Gelperin: Deletion-directed search in resolution-based proof procedures, in Proc. of the 3rd Int. Joint Conf. on Artificial Intelligence (1973), pp. 47–50.
Chaff’s strategy:
39
8/6/2024
PEG PDS DDI
Restarts
C. P. Gomes, B. Selman and H. A. Kautz: Boosting combinatorial search through randomization, in Proc. of AAAI (1998), pp. 431–437
Refocus the search by starting from important variables
Chaff: restart every 700 conflicts
40
8/6/2024
PEG PDS DDI
Chaff
Preprocess()
While (true)
41
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
42
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
2006
RSAT
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Glucose
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Armin Biere’s& derived:
Others:
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
Zheng
He�Chen
Zhou
Li
abcdSAT
PEG PDS DDI
BerkMin & Forklift by Goldberg & Novikov
Forklift: industrial closed-source solver (Cadence)
We discuss Forklift’s direct ancestor BerkMin (won Handmade, SAT category at SC’02)
Goldberg, Novikov: BerkMin: A fast and robust SAT-solver, DATE, 2002.
Clause deletion is based on “age” and size. The strategy, simplified:
Restarts every 550 conflicts
Innovation in decision heuristics
43
8/6/2024
PEG PDS DDI
Extended Score Boost Example
44
8/6/2024
h@5(C5)
C1= ¬a ∨ f ∨ g
C2= ¬a ∨ f ∨ ¬g
C3= ¬c ∨ ¬f ∨ g
C4= ¬b ∨ ¬f ∨ ¬g
C5= ¬e ∨ h
a@1
b@2
c@3
d@4
e@5
g@5
¬ g@5
f@5
c@3
b@2
C3
C3
C4
C6
C4
Implication graph
f@5(C6)
C6= ¬e ∨ ¬h ∨ f
h@5
C5
C6
g@5(C3)
e@5
¬e ∨ ¬c ∨ ¬b
PEG PDS DDI
BerkMin & Forklift by Goldberg & Novikov
Forklift: industrial closed-source solver (Cadence)
We discuss Forklift’s direct ancestor BerkMin (won Handmade, SAT category at SC’02)
Goldberg, Novikov: BerkMin: A fast and robust SAT-solver, DATE, 2002.
Clause deletion is based on “age” and size. The strategy, simplified:
Restarts every 550 conflicts
Innovation in decision heuristics
45
8/6/2024
PEG PDS DDI
Clause-based Heuristics
Berkmin
HaifaSAT (3d in three Industrial categories at SC’05)
Roman Gershman, Ofer Strichman: HaifaSat: A New Robust SAT Solver. Haifa Verification Conference 2005: 76-89
CBH -- Eureka SAT solver (2nd at SR’06)
Nachum Dershowitz, Ziyad Hanna, Alexander Nadel: A Clause-Based Heuristic for SAT Solvers. SAT 2005: 46-60
Added value w.r.t variable-based heuristics: picks interrelated variables
Didn’t make it to mainstream modern solvers, though CBH is occasionally very useful in my experience
46
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
47
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
RSAT
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Glucose
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
abcdSAT
Zheng
He�Chen
Zhou
Li
PEG PDS DDI
MiniSat & SatELite: Seminal Works
Niklas Eén, Niklas Sörensson: An Extensible SAT-solver. SAT 2003: 502-518
Niklas Eén, Armin Biere: Effective Preprocessing in SAT Through Variable and Clause Elimination. SAT 2005: 61-75
�
48
8/6/2024
PEG PDS DDI
Minisat’s Decision Heuristic
Separate variable and polarity heuristics
EVSIDS
Both features (further updated) made it to today’s state-of-the-art solvers
49
8/6/2024
PEG PDS DDI
Restart & Clause Deletion in Minisat
Restarts
Clause deletion
50
8/6/2024
PEG PDS DDI
MiniSat & SatELite: Seminal Works
Niklas Eén, Niklas Sörensson: An Extensible SAT-solver. SAT 2003: 502-518
Niklas Eén, Armin Biere: Effective Preprocessing in SAT Through Variable and Clause Elimination. SAT 2005: 61-75
�
51
8/6/2024
Next: after some preliminary material
After presenting SatELite
PEG PDS DDI
Resolution and Variable Elimination
52
8/6/2024
C ∨ l
D ∨ ¬l
Resolution (Davis & Putnam’60)
C ∨ D
a ∨ b ∨ l
c ∨ b ∨ ¬l
a ∨ b ∨ c
l is the pivot
Variable Elimination by Resolution (Davis & Putnam’60)
C1 ∨ l
D1 ∨ ¬l
C2 ∨ l
D2 ∨ ¬l
…
Cn ∨ l
Dm ∨ ¬l
C1 ∨ D1
C1 ∨ D2
…
C1 ∨ Dm
…
C2 ∨ D1
C2 ∨ D2
…
C2 ∨ Dm
…
Cn ∨ D1
Cn ∨ D2
…
Cn ∨ Dm
a ∨ b ∨ l
d ∨ l
c ∨ b ∨ ¬l
¬c ∨ ¬ b ∨ ¬l
a ∨ b ∨ c
c ∨ b ∨ d
¬c ∨ ¬ b ∨ d
Equisatisfiable
PEG PDS DDI
Subsumption and Self-Subsuming Resolution
53
8/6/2024
Subsumption
C
C ∨ D
C
C ∨ D
a ∨ b
a ∨ b ∨ c
a ∨ b
a ∨ b ∨ c
C ∨ D ∨ l
C ∨ ¬l
Self-subsuming Resolution
C ∨ D ∨ l
C ∨ ¬l
a ∨ b ∨ l
b ∨ ¬l
a ∨ b
b ∨ ¬l
PEG PDS DDI
SatELite Preprocessor
Run the following till fixed-point
Crucial on many difficult instances ever since 2005!
54
8/6/2024
a ∨ b ∨ l
d ∨ l
c ∨ b ∨ ¬l
¬c ∨ ¬ b ∨ ¬l
a ∨ b ∨ c
c ∨ b ∨ d
¬c ∨ ¬ b ∨ d
a ∨ b
a ∨ b ∨ c
a ∨ b
a ∨ b ∨ c
a ∨ b ∨ l
b ∨ ¬l
a ∨ b
b ∨ ¬l
PEG PDS DDI
SatELite with Gate Identification
Idea: reduce the number of generated resolvents when eliminating a variable
How (on an AND-gate example; applicable to other gates too):
55
8/6/2024
a
b
g
g ∨ ¬a ∨ ¬b
¬g ∨ a
¬g ∨ b
G+
G-
PEG PDS DDI
SatELite with Gate Identification: Cont.
Resolving between R+ and R- is unnecessary: the resolvents are obsolete
It can be yielded solely by resolutions between G and R:
56
8/6/2024
P ∨ a
a
b
g
g ∨ ¬a ∨ ¬b
¬g ∨ a
¬g ∨ b
G+
G-
P ∨ g ∈ R+
N ∨ ¬g ∈ R-
P ∨ N
P ∨ g
N ∨ ¬g
¬g ∨ a
g ∨ ¬a ∨ ¬b
¬g ∨ b
R+
R-
G-
G+
N ∨ ¬a ∨ ¬b
P ∨ b
P ∨ N ∨ ¬b
P ∨ N
PEG PDS DDI
(Learned Clause) Minimization
The idea:
Local minimization
Beame, P., Kautz, H., Sabharwal, A.: Towards understanding and harnessing the potential of clause learning. J. Artif. Intell. Res. (JAIR) 22 (2004)
Recursive minimization
Niklas Sörensson, Armin Biere: Minimizing Learned Clauses. SAT 2009: 237-243
57
8/6/2024
PEG PDS DDI
Local Minimization�
58
8/6/2024
C1= ¬a ∨ b
C2= ¬b ∨ c
C3= ¬b ∨ ¬c ∨ ¬d ∨ e
C4= ¬b ∨ ¬c ∨ ¬d ∨ ¬e
a@1
b@1
1UIP
C5 = ¬b ∨ ¬c ∨ ¬d
c@1
d@2
e@2
¬ e@2
a@1
b@1
c@1
d@2
C6 = ¬b ∨ ¬d
e@2
PEG PDS DDI
Local Minimization Shortcoming�
d@2
e@2
C1= ¬a ∨ b
C2= ¬a ∨ ¬b ∨ c
C3= ¬a ∨ ¬c ∨ ¬d ∨ e
C4= ¬a ∨ ¬c ∨ ¬d ∨ ¬e
a@1
b@1
1UIP
C5 = ¬a ∨ ¬c ∨ ¬d
c@1
d@2
e@2
¬ e@2
a@1
b@1
c@1
C6 = ¬a ∨ ¬b ∨ ¬d
A new literal 🡪 local minimization fails
However, a further resolution step with C1 would have yielded C7 = ¬a ∨ ¬d, which subsumes C5
PEG PDS DDI
Recursive Minimization�
60
8/6/2024
C1= ¬a ∨ b
C2= ¬a ∨ ¬b ∨ c
C3= ¬a ∨ ¬c ∨ ¬d ∨ e
C4= ¬a ∨ ¬c ∨ ¬d ∨ ¬e
a@1
b@1
1UIP
C5 = ¬a ∨ ¬c ∨ ¬d
c@1
d@2
e@2
¬ e@2
a@1
b@1
c@1
d@2
C6 = ¬a ∨ ¬b ∨ ¬d
C7 = ¬a ∨ ¬d
e@2
PEG PDS DDI
MiniSat in Non-Incremental Mode
Preprocess() // Variable elimination with gate identification & subsumption & self-subsuming resolution
While (true)
61
8/6/2024
PEG PDS DDI
Agenda
How does a conflict-driven SAT solver work?
Applying SAT by example
Advanced core SAT algorithms
62
8/6/2024
PEG PDS DDI
Hardware Circuit Example
63
8/6/2024
definitions:
I(C0) := FALSE;
I(C1) := FALSE;
X(C0) := C0 ⊕ en;
X(C1) := C1 ⊕ (C0 ∧ en);
constraints:
en 🡪 ¬X(en)
2-Bit Counter, counting when en=1
Cycle | en | C1 | C0 |
0 | 1 | 0 | 0 |
1 | 0 | 0 | 1 |
2 | 1 | 0 | 1 |
3 | 0 | 1 | 0 |
4 | 1 | 1 | 0 |
5 | 0 | 1 | 1 |
PEG PDS DDI
Hardware Model Checking
Model Checking: given a circuit and a property, does the property always hold?
64
8/6/2024
definitions:
I(C0) := FALSE;
I(C1) := FALSE;
X(C0) := C0 ⊕ en;
X(C1) := C1 ⊕ (C0 ∧ en);
constraints:
en 🡪 ¬X(en)
proof obligations:
¬(C0 ∧ C1)
2-Bit Counter, counting when en=1
Cycle | en | C1 | C0 |
0 | 1 | 0 | 0 |
1 | 0 | 0 | 1 |
2 | 1 | 0 | 1 |
3 | 0 | 1 | 0 |
4 | 1 | 1 | 0 |
5 | 0 | 1 | 1 |
PEG PDS DDI
Hardware Model Checking
Model Checking: given a circuit and a property, does the property always hold?
65
8/6/2024
definitions:
I(C0) := FALSE;
I(C1) := FALSE;
X(C0) := C0 ⊕ en;
X(C1) := C1 ⊕ (C0 ∧ en);
constraints:
en 🡪 ¬X(en)
proof obligations:
¬(C0 ∧ C1)
2-Bit Counter, counting when en=1
Cycle | en | C1 | C0 |
0 | 1 | 0 | 0 |
1 | 0 | 0 | 1 |
2 | 1 | 0 | 1 |
3 | 0 | 1 | 0 |
4 | 1 | 1 | 0 |
5 | 0 | 1 | 1 |
PEG PDS DDI
Bounded Model Checking (BMC)
BMC: given a circuit ϕ and a property P, verify P until a user-given bound n
66
8/6/2024
PEG PDS DDI
BMC Example
a
b
c
h
g
The property: h🡪b
PEG PDS DDI
BMC Example: Cycle 0
a
b
h
g
c0
A user-given initial value
a
b
c
h
g
The property: h🡪b
PEG PDS DDI
BMC Example: Cycle 0
a
b
h
g
c0
h ∨ ¬g ∨ ¬c0
¬h ∨ g
¬h ∨ c0
g ∨ ¬a ∨ ¬b
¬g ∨ a
¬g ∨ b
¬b
h
The negation of the property h🡪b:
a
b
c
h
g
UNSAT: the property holds!
The property: h🡪b
PEG PDS DDI
BMC Example: Cycle 1
a
b
h
g
c0
a
b
c
h
g
bx
hx
cx
ax
gx
The property: h🡪b
PEG PDS DDI
BMC Example: Cycle 1
a
b
h
g
c0
h ∨ ¬g ∨ ¬c0
¬h ∨ g
¬h ∨ c0
g ∨ ¬a ∨ ¬b
¬g ∨ a
¬g ∨ b
¬bx
hx
The negation of the property hx🡪bx:
a
b
c
h
g
bx
hx
cx
cx ∨ ¬h
¬cx ∨ h
ax
gx
gx ∨ ¬ax ∨ ¬bx
¬gx ∨ ax
¬gx ∨ bx
hx ∨ ¬gx ∨ ¬cx
¬hx ∨ gx
¬hx ∨ cx
UNSAT!
The property: h🡪b
PEG PDS DDI
Re-Using Relevant Information from Previous Cycles
G0 and G1: hold globally
T0 and T1: hold temporary
72
The property: h🡪b
a
b
h
g
c0
bx
hx
cx
h ∨ ¬g ∨ ¬ci
¬h ∨ g
¬h ∨ ci
g ∨ ¬a ∨ ¬b
¬g ∨ a
¬g ∨ b
¬b
h
¬bx
hx
cx ∨ ¬h
¬cx ∨ h
gx ∨ ¬ax ∨ ¬bx
¬gx ∨ ax
¬gx ∨ bx
hx ∨ ¬gx ∨ ¬cx
¬hx ∨ gx
¬hx ∨ cx
G0
G1
T0
T1
PEG PDS DDI
Pervasive Clause Learning (GRASP)
Cycle 0: create a SAT instance G0 ∧ T0 and solve it
Cycle 1: create a SAT instance G0 ∧ G0* ∧ G1 ∧ S1 and solve it
73
h ∨ ¬g ∨¬ci
¬h ∨ g
¬h ∨ ci
g ∨ ¬a ∨ ¬b
¬g ∨ a
¬g ∨ b
¬b
h
¬bx
hx
cx ∨ ¬h
¬cx ∨ h
gx ∨ ¬ax ∨ ¬bx
¬gx ∨ ax
¬gx ∨ bx
hx ∨ ¬gx ∨ ¬cx
¬hx ∨ gx
¬hx ∨ cx
G0
G1
a ∨ ¬h
g
G0*
T0
T1
PEG PDS DDI
Incremental SAT Solving under Assumptions (Minisat)
Cycle 0: create a SAT instance and solve it under the temporary assumptions T0
Cycle 1: add the clauses C1 to the same SAT instance and solve under the assumptions T1
74
h ∨ ¬g ∨¬ci
¬h ∨ g
¬h ∨ ci
g ∨ ¬a ∨ ¬b
¬g ∨ a
¬g ∨ b
¬b
h
¬bx
hx
cx ∨ ¬h
¬cx ∨ h
gx ∨ ¬ax ∨ ¬bx
¬gx ∨ ax
¬gx ∨ bx
hx ∨ ¬gx ∨ ¬cx
¬hx ∨ gx
¬hx ∨ cx
a ∨ ¬h
Assumptions
Assumptions
T0
T1
PEG PDS DDI
Incremental SAT Solving under Assumptions
Basic API:
Output:
Allows the user to add groups of clauses temporarily (for invocation #i)
75
PEG PDS DDI
Incremental SAT Solving under Assumptions
A breakthrough
Incremental solving under assumptions is widely used, including:
My personal industrial experience: can’t recall any non-incremental SAT application
Minisat: SatELite preprocessing is incompatible with incremental solving
Alexander Nadel, Vadim Ryvchin, Ofer Strichman: Preprocessing in Incremental SAT. SAT 2012: 256-269
Katalin Fazekas, Armin Biere, Christoph Scholl: Incremental Inprocessing in SAT Solving. SAT 2019: 136-154
76
8/6/2024
PEG PDS DDI
Unsatisfiable Core in Terms of Assumptions
Extended API:
Algorithm outline
77
8/6/2024
PEG PDS DDI
78
8/6/2024
seen: marks variables connected to the flipped assumption
p: the flipped assumption
out_conflict: the returned set of assumptions in the core
Go over the trail backwards
A decision variable: must be an assumption, since the flip must have occurred at an assumption level
An implied variable: mark all the variables in its parent
PEG PDS DDI
Proof-based Abstraction Refinement Example
The unsatisfiable core in terms of the latches is required
No Bug
Valid
Model Check A
BMC(M,P,k)
Cex C at unrolling depth k
Bug
No
A 🡨 A ∪ latches in the UNSAT core of BMC(M,P,k)
Inputs: model M, property P �Output: does P hold under M?
Abstract model A 🡨 { }
Spurious?
Yes
Cut latches into free inputs
Kenneth L. McMillan, Nina Amla: Automatic Abstraction without Counterexamples. TACAS 2003: 2-17
Aarti Gupta, Malay K. Ganai, Zijiang Yang, Pranav Ashar: Iterative Abstraction using SAT-based BMC with Proof Analysis. ICCAD 2003: 416-423
PEG PDS DDI
SAT-based Local Search: �Finding a Solution Near an Assignment
Find a solution near an assignment M={v1=σ1, v2=σ2, …, vn=σn}
Polarity-based
80
8/6/2024
�Sabih Agbaria, Dan Carmi, Orly Cohen, Dmitry Korchemny, Michael Lifshits, Alexander Nadel:�SAT-based semiformal verification of hardware. FMCAD 2010: 25-32
PEG PDS DDI
Original Application: Bug Hunting
New Initial �states
New Initial �states
New Initial �states
initial
states
deep bugs
Max BMC
Bound
Needed to generate diverse solutions on the boundary!
PEG PDS DDI
Original Application: DiverseKSet for Bug Hunting
DiversekSet in SAT: generate a user-given number of diverse solutions
Diverse solutions, given an empty CNF
Given a CNF formula:
82
8/6/2024
PEG PDS DDI
Optimization in SAT
OptSAT(F, ψ): given a propositional formula F in CNF and a Pseudo-Boolean objective function ψ, return a model to F which minimizes ψ
83
8/6/2024
Example: F = (a + b) (a + ¬c) (¬a + c)
H has 3 models:
a | b | c | ψ |
0 | 0 | 0 | 2.3 |
0 | 0 | 1 | 3.5 |
0 | 1 | 0 | 8 |
0 | 1 | 1 | 100.1 |
1 | 0 | 0 | 96.3 |
1 | 0 | 1 | 75 |
1 | 1 | 0 | 1.35 |
1 | 1 | 1 | 20.4 |
PEG PDS DDI
Optimization in SAT
OptSAT(F, ψ): given a propositional formula F in CNF and a Pseudo-Boolean objective function ψ, return a model to F which minimizes ψ
84
8/6/2024
Example: F = (a + b) (a + ¬c) (¬a + c)
H has 3 models:
a | b | c | ψ |
0 | 0 | 0 | 2.3 |
0 | 0 | 1 | 3.5 |
0 | 1 | 0 | 8 |
0 | 1 | 1 | 100.1 |
1 | 0 | 0 | 96.3 |
1 | 0 | 1 | 75 |
1 | 1 | 0 | 1.35 |
1 | 1 | 1 | 20.4 |
Best model
PEG PDS DDI
Solving OptSAT(F, ψ) Instances in Real-life
Is ψ is a linear PB function: ψ = wn-1*tn-1 + … + w1*t1 + … + w0*t0?
85
8/6/2024
Yes
No
PEG PDS DDI
MaxSAT: Optimizing a Linear PB Function in SAT
86
8/6/2024
Hard Clauses H
Optimization Target T = {tn-1, tn-2 , … , t0}
Input:
Unweighted MaxSAT: All the weights are 1
Output: A model M to H which minimizes the weight of the satisfied target bits ψ = wn-1*tn-1 + … + w1*t1 + … + w0*t0
PEG PDS DDI
MaxSAT: Optimizing a Linear PB Function in SAT
87
8/6/2024
Hard Clauses H
Optimization Target T = {tn-1, tn-2 , … , t0}
Input:
Example: H = (a + b) (a + ¬c) (¬a + c); T={a,b}
H has 3 models:
Unweighted MaxSAT: All the weights are 1
Output: A model M to H which minimizes the weight of the satisfied target bits ψ = wn-1*tn-1 + … + w1*t1 + … + w0*t0
PEG PDS DDI
MaxSAT: Optimizing a Linear PB Function in SAT
88
8/6/2024
Hard Clauses H
Optimization Target T = {tn-1, tn-2 , … , t0}
Input:
Example: H = (a + b) (a + ¬c) (¬a + c); T={a,b}
H has 3 models:
For unweighted MaxSAT, M1 and M2 are optimal, since:
M1(ψ) = M2(ψ) = 1, while M3(ψ) = 2
Output: A model M to H which minimizes the weight of the satisfied target bits ψ = wn-1*tn-1 + … + w1*t1 + … + w0*t0
Unweighted MaxSAT: All the weights are 1
PEG PDS DDI
Exact vs. Anytime MaxSAT
Anytime algorithm: expected to find better and better solutions, the longer it keeps running
MaxSAT research can be roughly classified into two categories
89
8/6/2024
Handy for industrial usage
Modern solvers normally do:
Local search preprocessing
SAT-based algorithm
Next we review the core SAT-based algorithm
PEG PDS DDI
Linear Search SAT-UNSAT (LSU)�
LSU is applied in leading anytime MaxSAT solvers
90
8/6/2024
Daniel Le Berre and Anne Parrain: The sat4j library, release 2.2. JSAT, 7(2-3):59–64, 2010.
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
91
8/6/2024
The optimal model
All the models
100
90
83
60
54
52
49
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept���
92
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
93
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
94
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
95
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
96
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
97
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
98
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
99
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
100
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
101
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
102
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
103
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
104
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
105
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Linear Search SAT-UNSAT (LSU) Concept��
106
8/6/2024
90
83
60
54
52
49
100
PEG PDS DDI
Cardinality and Pseudo-Boolean (PB) Constraints
In LSU: how to block the models with an upper bound on the weight?
Unweighted MaxSAT:
Weighted MaxSAT:
Next: the totalizer encoding for unweighted MaxSAT
107
8/6/2024
PEG PDS DDI
Encoding Cardinality Constraints: The Totalizer
Totalizer: unary encoding-based addition tree to represent (t1 + . . . + tn)
Complexity: O(n2) clauses and O(n ∗ log(n)) variables
Given an upper-bound b on the sum value: O(n ∗ b) clauses
Markus Büttner, Jussi Rintanen: Satisfiability Planning with Constraints on the Number of Actions. ICAPS 2005: 292-299
Useful feature (shared with many other encodings): arc consistency
Tightening the upper bound is easy and efficient 🡪 handy for LSU & anytime MaxSAT
108
8/6/2024
Olivier Bailleux and Yacine Boufkhad: Efficient CNF encoding of boolean cardinality constraints. CP 2003: 108–122.
PEG PDS DDI
The Totalizer: o = a + b + c + d + e + f + g + h
109
8/6/2024
a
b
c
d
e
f
g
h
i={i1i0}=a+b
j={j1j0}=c+d
k={k1k0}=e+f
l={l1l0}=g+h
m={m3m2m1m0}=i+j
n={n3n2n1n0}=k+l
o={o7o6o5o4o3o2o1o0}=m+n
PEG PDS DDI
The Totalizer Example
110
8/6/2024
a
b
c
d
e
f
g
h
i={i1i0}=a+b
j={j1j0}=c+d
k={k1k0}=e+f
l={l1l0}=g+h
m={m3m2m1m0}=i+j
n={n3n2n1n0}=k+l
o={o7o6o5o4o3o2o1o0}=m+n
a=1
b=0
c=1
d=1
e=0
f=0
g=0
h=1
i={01}=a+b
j={11}=c+d
k={00}=e+f
l={01}=g+h
m={0111}=i+j
n={0001}=g+h
o={00001111}=m+n
PEG PDS DDI
The Totalizer Clauses
111
8/6/2024
N1: bits 1-indexed
N2: bits 1-indexed
N3=N1 + N2: bits 1-indexed
N3 = N1 + N2
for (p = 0; p <= |N1|; ++p)
for (q = 0; q <= |N2|; ++q)
Add clause ¬N1[p] ∨ ¬N2[q] ∨ N3[p+q] (N1[p]=1 and N2[q]=1 🡺 N3[p+q]=1)
Add clause N1[p+1] ∨ N2[q+1] ∨ ¬N3[p+q+1] (N1[p+1]=0 and N2[q+1]=0 🡺 N3[p+q+1]=0)
N1[0]=N2[0]=N3[0]=1;
N1[|N1+1|]= N2[|N2+1|]= N3[|N3+1|]= 1
p=2
q=3
p+q=5
(sum of the inputs is ≥ 5)
p+1=2
q+1=3
p+q+1=5
(sum of the
inputs < 5)
Complexity: for n inputs, O(n2) clauses and O(n ∗ log(n)) variables
PEG PDS DDI
Totalizer with Upper Bound�o = a + b + c + d + e + f + g + h ≤ 3
112
8/6/2024
a
b
c
d
e
f
g
h
i={i1i0}=a+b
j={j1j0}=c+d
k={k1k0}=e+f
l={l1l0}=g+h
m={m3m2m1m0}=i+j
n={n3n2n1n0}=k+l
o={o7o6o5o4o3o2o1o0}=m+n
PEG PDS DDI
Totalizer with Upper Bound:�o = a + b + c + d + e + f + g + h ≤ b=3
113
8/6/2024
a
b
c
d
e
f
g
h
i={i1i0}=a+b
j={j1j0}=c+d
k={k1k0}=e+f
l={l1l0}=g+h
m={0m2m1m0}=i+j
n={0n2n1n0}=k+l
o={0o2o1o0}=m+n
Complexity: for n inputs, O(n ∗ b) clauses and O(n ∗ log(n)) variables
PEG PDS DDI
Totalizer: Tightening the Upper Bound�o = a + b + c + d + e + f + g + h ≤ b=3
114
8/6/2024
a
b
c
d
e
f
g
h
i={i1i0}=a+b
j={j1j0}=c+d
k={k1k0}=e+f
l={l1l0}=g+h
m={0m2m1m0}=i+j
n={0n2n1n0}=k+l
o={0o2o1o0}=m+n
PEG PDS DDI
Totalizer: Tightening the Upper Bound�o = a + b + c + d + e + f + g + h ≤ b=3 🡪 b=1
115
8/8/2024
a
b
c
d
e
f
g
h
i={i1i0}=a+b
j={j1j0}=c+d
k={k1k0}=e+f
l={l1l0}=g+h
m={0m2m1m0}=i+j
n={0n2n1n0}=k+l
o={0o2o1o0}=m+n
Assert the unit clauses {¬o2} and {¬o1}; no need to create a new totalizer!
0
0
PEG PDS DDI
LSU’s Main Problem
The convergence is often too slow
116
8/6/2024
PEG PDS DDI
SAT-based Local Search to the Rescue
TORC (Target-Optimal-Rest-Conservative) polarity selection
Alexander Nadel: Anytime Weighted MaxSAT with Improved Polarity Selection and Bit-Vector Optimization. FMCAD 2019: 193-202
Polosat: a dedicated SAT-based local search algorithm, invoked instead of SAT (next)
Alexander Nadel: On Optimizing a Generic Function in SAT. FMCAD 2020: 205-213
117
8/6/2024
PEG PDS DDI
Polosat for MaxSAT
Polosat: further simulate local search with CDCL SAT
118
8/6/2024
Hard Clauses H
Optimization Target T = {tn-1, tn-2 , … , t0}
Output: A model M to H which minimizes the weight of the satisfied target bits ψ = wn-1*tn-1 + … + w1*t1 + … + w0*t0
PEG PDS DDI
Polosat Cont.
Default in state-of-the-art anytime MaxSAT solvers
Can be applied to optimize any PB function
Enabler for solving industrial optimization problems at Intel
Recently shown to boost Pseudo-Boolean (PB) Optimization
Markus Iser , Jeremias Berg, Matti Järvisalo:�Oracle-Based Local Search for Pseudo-Boolean Optimization. ECAI 2023: 1124-1131
PEG PDS DDI
Agenda
How does a conflict-driven SAT solver work?
Applying SAT by example
Advanced core SAT algorithms
120
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
121
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Glucose
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
RSAT
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
abcdSAT
Zheng
He�Chen
Zhou
Li
PEG PDS DDI
RSAT’s Phase Saving
Polarity selection: always choose the latest polarity – aka phase saving
Knot Pipatsrisawat, Adnan Darwiche:�A Lightweight Component Caching Scheme for Satisfiability Solvers. SAT 2007: 294-299
122
8/6/2024
a@1
h@5(C5)
f@1(C8)
c@3
¬f@3(C7)
C1= ¬a ∨ f ∨ g
C2= ¬a ∨ f ∨ ¬g
C3= ¬c ∨ ¬f ∨ g
C4= ¬b ∨ ¬f ∨ ¬g
C5= ¬e ∨ h
a@1
b@2
c@3
d@4
e@5
a@1
b@2
C8 = f ∨ ¬a
f@5(C6)
g@3(C1)
C6= ¬e ∨ ¬h ∨ f
g@5(C3)
C7 = ¬f ∨ ¬c ∨ ¬b
c or ¬c?
c@2
PEG PDS DDI
RSAT’s Phase Saving
Polarity selection: always choose the latest polarity – aka phase saving
Knot Pipatsrisawat, Adnan Darwiche:�A Lightweight Component Caching Scheme for Satisfiability Solvers. SAT 2007: 294-299
123
8/6/2024
a@1
h@5(C5)
f@1(C8)
¬c@3
¬f@3(C7)
C1= ¬a ∨ f ∨ g
C2= ¬a ∨ f ∨ ¬g
C3= c ∨ ¬f ∨ g
C4= ¬b ∨ ¬f ∨ ¬g
C5= ¬e ∨ h
a@1
b@2
¬c@3
d@4
e@5
a@1
b@2
C8 = f ∨ ¬a
f@5(C6)
g@3(C1)
C6= ¬e ∨ ¬h ∨ f
g@5(C3)
C7 = ¬f ∨ c ∨ ¬b
c or ¬c?
¬c@2
PEG PDS DDI
Phase Saving
Locality principle: refocus on the currently explored subspace
State-of-the-art polarity selection heuristic till 2020!
124
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
125
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
RSAT
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Glucose
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
Zheng
He�Chen
Zhou
Li
abcdSAT
PEG PDS DDI
CryptoMiniSat
Mate Soos, Karsten Nohl, Claude Castelluccia: Extending SAT Solvers to Cryptographic Problems. SAT 2009: 244-257
Motivation: XOR’s are notoriously difficult
CryptoMiniSat is still under active development!
126
8/6/2024
a ∨ b ∨ ¬q
a ∨ ¬b ∨ q
¬a ∨ b ∨ q
¬a ∨ ¬b ∨ ¬q
� a ∨ ¬q
b ∨ ¬q
¬a ∨ ¬b ∨ q
PEG PDS DDI
CryptoMiniSat (as of 2010): Techniques
XOR clauses
Polarity selection:
Heuristics tuned separately for cryptographic vs. industrial instances
3 techniques presented next (after some preliminary material)
127
8/6/2024
PEG PDS DDI
Conflict Analysis as Resolution
128
8/6/2024
c@2
C4
a@1
b@2
c@2
d@2
e@2
C1=¬b∨c
C2=¬a∨¬c∨d
C3= ¬d∨e
C4=¬a∨¬d∨¬e
C1= ¬b ∨ c
C2= ¬a ∨ ¬c ∨ d
C3= ¬d ∨ e
C4= ¬a ∨ ¬d ∨ ¬e
¬ e@2
d@2
a@1
C4
e@2
C3
C2
b@2
C1
Parent Clause
PEG PDS DDI
Conflict Analysis as Resolution
129
8/6/2024
c@2
C4
a@1
b@2
c@2
d@2
e@2
¬a∨¬d
C1=¬b∨c
C3= ¬d∨e
C4=¬a∨¬d∨¬e
C1= ¬b ∨ c
C2= ¬a ∨ ¬c ∨ d
C3= ¬d ∨ e
C4= ¬a ∨ ¬d ∨ ¬e
¬ e@2
d@2
a@1
C4
e@2
C3
C2
b@2
C1
C2=¬a∨¬c∨d
PEG PDS DDI
Conflict Analysis as Resolution
130
8/6/2024
c@2
C4
a@1
b@2
c@2
d@2
e@2
¬a∨¬c
¬a∨¬d
C1=¬b∨c
C3= ¬d∨e
C4=¬a∨¬d∨¬e
C1= ¬b ∨ c
C2= ¬a ∨ ¬c ∨ d
C3= ¬d ∨ e
C4= ¬a ∨ ¬d ∨ ¬e
¬ e@2
d@2
a@1
C4
e@2
C3
C2
b@2
C1
C2=¬a∨¬c∨d
PEG PDS DDI
Conflict Analysis as Resolution
131
8/11/2024
c@2
C4
a@1
b@2
c@2
d@2
e@2
¬a∨¬b
¬a∨¬c
¬a∨¬d
C1=¬b∨c
C3= ¬d∨e
C4=¬a∨¬d∨¬e
C1= ¬b ∨ c
C2= ¬a ∨ ¬c ∨ d
C3= ¬d ∨ e
C4= ¬a ∨ ¬d ∨ ¬e
¬ e@2
d@2
a@1
C4
e@2
C3
C2
b@2
C1
C2=¬a∨¬c∨d
PEG PDS DDI
Conflict Analysis as Resolution
132
8/11/2024
c@2
C4
a@1
b@2
c@2
d@2
e@2
¬a∨¬b
¬a∨¬c
¬a∨¬d
C1=¬b∨c
C3= ¬d∨e
C4=¬a∨¬d∨¬e
C1= ¬b ∨ c
C2= ¬a ∨ ¬c ∨ d
C3= ¬d ∨ e
C4= ¬a ∨ ¬d ∨ ¬e
¬ e@2
d@2
a@1
C4
e@2
C3
C2
b@2
C1
C2=¬a∨¬c∨d
C0= ¬b ∨ f
f@2
C0=¬b∨f
PEG PDS DDI
Conflict Analysis as Resolution
133
8/11/2024
c@2
C4
a@1
b@2
c@2
d@2
e@2
¬a∨¬b
¬a∨¬c
¬a∨¬d
C1=¬b∨c
C3= ¬d∨e
C4=¬a∨¬d∨¬e
C1= ¬b ∨ c
C2= ¬a ∨ ¬c ∨ d
C3= ¬d ∨ e
C4= ¬a ∨ ¬d ∨ ¬e
¬ e@2
d@2
a@1
C4
e@2
C3
C2
b@2
C1
C2=¬a∨¬c∨d
C0= ¬b ∨ f
f@2
¬a∨¬b
C0=¬b∨f
PEG PDS DDI
On-the-fly Subsumption
The idea: if an intermediate resolvent R subsumes clause C 🡪 replace C by R
Youssef Hamadi, Saïd Jabbour, Lakhdar Sais: Learning for Dynamic Subsumption. Int. J. Artif. Intell. Tools 19(4): 511-529 (2010)
HyoJung Han, Fabio Somenzi: On-the-Fly Clause Improvement. SAT 2009: 209-222
Applied by CryptoMinisat, Kissat, CaDiCaL, IntelSAT
134
8/6/2024
PEG PDS DDI
On-the-fly Subsumption Example
135
8/6/2024
c@2
C4
a@1
b@2
c@2
d@2
e@2
¬a∨¬b
¬a∨¬c
¬a∨¬d
C1=¬b∨c
C3= ¬d∨e
C4=¬a∨¬d∨¬e
C1= ¬b ∨ c
C2= ¬a ∨ ¬c ∨ d
C3= ¬d ∨ e
C4= ¬a ∨ ¬d ∨ ¬e
¬ e@2
d@2
a@1
C4
e@2
C3
C2
b@2
C1
C2=¬a∨¬c∨d
Subsumes C4!
Subsumes C2!
C4′= ¬a ∨ ¬d
C2′= ¬a ∨ ¬c
No subsumption
PEG PDS DDI
Failed Literal Probing: the Basics
Chu Min Li, Anbulagan: Heuristics Based on Unit Propagation for Satisfiability Problems. IJCAI (1) 1997: 366-371
Daniel Le Berre: Exploiting the real power of unit propagation lookahead. Electron. Notes Discret. Math. 9: 59-80 (2001)�
An inprocessing technique orthogonal to the backtrack search
Carried out at the beginning or after a restart
For every variable v
136
8/11/2024
PEG PDS DDI
Hyper-Binary Resolution
Fahiem Bacchus: Enhancing Davis Putnam with Extended Binary Clause Reasoning. AAAI/IAAI 2002: 613-619
Fahiem Bacchus, Jonathan Winter: Effective Preprocessing with Hyper-Resolution and Equality Reduction. SAT 2003: 341-355
Inês Lynce, João P. Marques Silva: Probing-Based Preprocessing Techniques for Propositional Satisfiability. ICTAI 2003
�Hyper-binary resolution
Used during preprocessing (CryptoMinisat, Kissat)
137
8/6/2024
l1 ∨ l2 ∨ l3∨ … ∨ ln
¬l1 ∨ l
¬l2 ∨ l
…
¬ln-1 ∨ l
ln ∨ l
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
138
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
RSAT
Glucose
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
Zheng
He�Chen
Zhou
Li
abcdSAT
PEG PDS DDI
Glucose
Gilles Audemard, Laurent Simon: On the Glucose SAT Solver. Int. J. Artif. Intell. Tools 27(1): 1840001:1-1840001:25 (2018)
A well-known and widely used solver
Introduced the Literal Block Distance (LBD) measure for clause quality
LBD-based clause deletion and restart strategies
Changes in VSIDS implementation
Binary resolution during conflict analysis
139
8/6/2024
PEG PDS DDI
Glucose’s Literal Block Distance (LBD)
What makes a conflict clause a good one?
LBD: the number of decision levels in the clause
Recall: Locality
LBD is:
140
8/6/2024
PEG PDS DDI
Glucose: LBD-based Clause Deletion
Delete half of the clauses based on LBD score
Exceptions
141
8/6/2024
PEG PDS DDI
Glucose: LBD-based Restart Strategy
Intuition: restart, when the latest clauses are bad (their LBD is too high)
When to restart:
Too aggressive:
Postpone restart when the number of assigned literals grows suddenly
142
8/6/2024
PEG PDS DDI
VSIDS in Glucose
VSIDS increments activity by an exponentially increasing (g=1/f)#conflict
Since Glucose 2.3
More dynamic at the beginning of the search, stabilizes later
143
8/6/2024
PEG PDS DDI
Binary Resolution during Conflict Analysis
The idea: given a learnt clause C, remove unnecessary literals from C by resolution with satisfied (non-parent!) binary clauses
144
8/6/2024
Gilles Audemard, Jean-Marie Lagniez, Bertrand Mazure, Lakhdar Sais: RCL: Reduce learnt clauses. https://baldur.iti.kit.edu/sat-race-2010/descriptions/solver_10.pdf, 2010
PEG PDS DDI
Binary Resolution Example
145
8/6/2024
C1= ¬a ∨ b
C2= ¬a ∨ ¬b ∨ c
C3= ¬b ∨ ¬c ∨ ¬d ∨ e
C4= ¬b ∨ ¬c ∨ ¬d ∨ ¬e
a@1
b@1
1UIP
C6 = ¬b ∨ ¬c ∨ ¬d
c@1
d@2
e@2
¬ e@2
a@1
b@1
c@1
d@2
C5= b ∨ ¬c
C7 = ¬c ∨ ¬d
PEG PDS DDI
Binary Resolution Heuristic
Applied for newly learnt clauses for which both the following conditions hold:
Standard since Glucose
146
8/6/2024
PEG PDS DDI
Glucose in Non-Incremental Mode
Preprocess() // Variable elimination & subsumption & self-subsuming resolution
While (true)
147
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
148
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
RSAT
Glucose
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
Zheng
He�Chen
Zhou
Li
abcdSAT
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
149
8/11/2024
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat (SatELiteGTI)
CryptoMiniSat
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
COMiniSatPS
Oh
MiniSat-based:
Others:
RSAT
Glucose
Glucose
abcdSAT
abcdSAT
PEG PDS DDI
COMiniSatPS
Chanseok Oh: Between SAT and UNSAT: The Fundamental Difference in CDCL SAT. SAT 2015: 307-323��UNSAT Instance
SAT Instance
COMiniSatPS: combining SAT & UNSAT stages in every (long enough) solver invocation
Clause deletion: 3-tiered scheme
150
8/6/2024
PEG PDS DDI
COMiniSatPS: Combining SAT & UNSAT Stages
UNSAT stage warm-up: 10,000 initial conflicts
C = 100
While (no solution)
151
8/6/2024
| SAT Stage | UNSAT Stage |
Restarts | No-restart | Glucose |
VSIDS Score Increment | (g=1/0.999)#conflict | (g=1/0.95)#conflict |
PEG PDS DDI
COMiniSatPS: 3-Tiered Clause Management & Deletion
Core: kept forever
Tier2: bad clauses are relegated to Local
Local: bad clauses are deleted
152
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
153
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Lingeling
Lingeling
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
RSAT
Glucose
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
Zheng
He�Chen
Zhou
Li
abcdSAT
Maple�COMSPS
PEG PDS DDI
Learning Rate Based (LRB) Decision Heuristic
Jia Hui Liang, Vijay Ganesh , Pascal Poupart, Krzysztof Czarnecki:�Learning Rate Based Branching Heuristic for SAT Solvers. SAT 2016: 123-140
�Similarly to VSIDS, choose and pick variables, based on activity
Boost variables, which made impact during their latest assignment term
154
8/6/2024
PEG PDS DDI
Learning Rate Based (LRB)
155
8/6/2024
v
Just before unassigning v
C[v]: #conflicts in which v’s score was updated during the latest assignment term
Visited during conflict analysis or belongs to the parents of literals in the new conflict clause
age[v]: the number of conflicts during the latest assignment term
LR[v]: age[v] / C[v]
PEG PDS DDI
LRB Details
When a variable is unassigned, adjust its activity, based on LR[v]
The update algorithm uses Exponential Recency Weighted Average (ERWA)
Sutton, R. S., and Barto, A. G.: Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998.
Summary: LRB considers the “local context” of the latest assignment term, more so in the beginning of the search
156
8/6/2024
PEG PDS DDI
MapleCOMSPS: Combining SAT & UNSAT Stages
157
8/6/2024
| SAT Stage | UNSAT Stage |
Restarts | Luby | Glucose |
Decision Heuristic | LRB | Glucose’s EVSIDS (0.8🡪0.95) |
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
158
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
RSAT
Glucose
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
Zheng
He�Chen
Zhou
Li
abcdSAT
PEG PDS DDI
MapleLCMDist
DISTANCE decision heuristic for the initial stage (first 50,000 conflicts)
Fan Xiao, Chu-Min Li, Mao Luo, Felip Manyà, Zhipeng Lü, Yu Li: A branching heuristic for SAT solvers based on complete implication graphs. Sci. China Inf. Sci. 62(7): 72103:1-72103:13 (2019)
Vivification aka distillation aka learnt-clause-minimization
159
8/6/2024
PEG PDS DDI
DISTANCE Decision Heuristic
Observation: at the beginning, variable scores are inaccurate, because they are based on very few conflicts
DISTANCE Heuristic:
160
8/6/2024
PEG PDS DDI
DISTANCE: Longest Distance to Conflict
161
8/6/2024
PEG PDS DDI
DISTANCE: Details
distAct[v] is the DISTANCE activity, initialized to 0 for every v
longDist[v]: the longest distance to the conflict for the current conflict
When v contributes to a conflict, distAct[v] is incremented by inc×1/longDist[v]
162
8/6/2024
PEG PDS DDI
Vivification: an Inprocessing Algorithms
At decision level 0 (inprocessing), go over the clauses and simplify them as follows:
Let C = c1 ∨ c2 ∨ … ∨ cn be a clause
For i in [1,2,…n]
163
8/6/2024
PEG PDS DDI
Controlling Vivification in MapleLCMDist
164
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
165
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
RSAT
Glucose
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
Zheng
He�Chen
Zhou
Li
abcdSAT
PEG PDS DDI
Up-to-date Conflict Analysis Algorithm �Covers GRASP & Chaff & Modern Solvers
166
8/6/2024
PEG PDS DDI
Conflict Analysis Evolvement
Maple_LCM_Dist_ChronoBT: the return of Chronological Backtracking (CB)
Alexander Nadel, Vadim Ryvchin: Chronological Backtracking. SAT 2018: 111-121
167
8/6/2024
1996
GRASP
2001
Chaff
2018
Maple_LCM_Dist_ChronoBT
Chaff’s algorithm is the state-of-the-art
PEG PDS DDI
Integrating CB and BCP
Example of a necessary adjustment
Useful invariants are still violated even with the adjustments:
Intel® SAT Solver (IntelSAT): a new formally proven BCP alg. with a possible solution
Alexander Nadel: Introducing Intel® SAT Solver. SAT 2022.
As of 2022: expecting new formal frameworks and empirical insights!
168
8/6/2024
@30
c2
@20
c1
@30
@1
@20
@1
@1
@20
@1
@30
Falsified literal:
Unassigned literal:
@10
@20
@10
Satisfied literal:
@1
@30
@1
@30
@1
@20
@1
@20
SAT’2024: Robin Coutelier, Mathias Fleury and Laura Kovács Lazy Reimplication in Chronological Backtracking (abstract)
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
169
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
RSAT
Glucose
Maple�LCMDist�ChronoBTDLv3
abcdSAT
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Zheng
He�Chen
Zhou
Li
Haberlandt
Green
PEG PDS DDI
MapleLCMDistChronoBTDLv3�
Duplicate Learnts: screen learnt clauses and add duplicates as permanent clauses
Stepan Kochemazov, Oleg Zaikin, Alexander A. Semenov, Victor Kondratiev: Speeding Up CDCL Inference with Duplicate Learnt Clauses. ECAI 2020: 339-346
170
8/6/2024
PEG PDS DDI
Duplicate Learnts (DL)
Uses clause hash table
Hashes learnts with LBD(C) ≤ lbd_limit=12
Repeated once or twice 🡪 Tier2; Repeated 3-times 🡪 Core forever
Hash size limit = 500,000. When the limit is reached:
DL works well with vivification
171
8/6/2024
PEG PDS DDI
MapleLCMDistChronoBTDLv3
Preprocess() // Variable elimination & subsumption & self-subsuming resolution
While (true)
172
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
RSAT
Glucose
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
Zheng
He�Chen
Zhou
Li
abcdSAT
PEG PDS DDI
Kissat vs. Maple-based Solvers
Variable decision heuristic: VMTF for the UNSAT stage
Advanced inprocessing
Armin Biere, Matti Järvisalo, Benjamin Kiesl: Preprocessing in SAT Solving. Handbook of Satisfiability 2021: 391-435
Low-level optimizations, not present in Maple
New polarity selection algorithm: local search & target phases
174
8/6/2024
PEG PDS DDI
Local Search For SAT (example adapted from [Tompkins 2010])
175
8/6/2024
Randomly initialize all variables
While (formula not satisfied)
Select a variable and “flip” it
a | b | c | d | e |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
[Tompkins 2010] Dave A. D. Tompkins. Dynamic Local Search for SAT: Design, Insights and Analysis. PhD Thesis, University of British Columbia, October 2010.
PEG PDS DDI
Local Search For SAT (example adapted from [Tompkins 2010])
176
8/6/2024
Randomly initialize all variables
While (formula not satisfied)
Select a variable and “flip” it
a | b | c | d | e |
1 | 0 | 0 | 1 | 1 |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
PEG PDS DDI
Local Search For SAT (example adapted from [Tompkins 2010])
177
8/6/2024
Randomly initialize all variables
While (formula not satisfied)
Select a variable and “flip” it
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
a | b | c | d | e |
1 | 0 | 0 | 1 | 1 |
1 | 0 | 0 | 0 | 1 |
PEG PDS DDI
Local Search For SAT (example adapted from [Tompkins 2010])
178
8/6/2024
Randomly initialize all variables
While (formula not satisfied)
Select a variable and “flip” it
a | b | c | d | e |
1 | 0 | 0 | 1 | 1 |
1 | 0 | 0 | 0 | 1 |
1 | 1 | 0 | 0 | 1 |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
PEG PDS DDI
Local Search For SAT (example adapted from [Tompkins 2010])
179
8/6/2024
Randomly initialize all variables
While (formula not satisfied)
Select a variable and “flip” it
a | b | c | d | e |
1 | 0 | 0 | 1 | 1 |
1 | 0 | 0 | 0 | 1 |
1 | 1 | 0 | 0 | 1 |
0 | 1 | 0 | 0 | 1 |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
PEG PDS DDI
Local Search For SAT (example adapted from [Tompkins 2010])
180
8/6/2024
Randomly initialize all variables
While (formula not satisfied)
Select a variable and “flip” it
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
(¬a + b + ¬e) (¬a + ¬b + d) (¬d + ¬e) (¬a + b + c + ¬d) |
a | b | c | d | e |
1 | 0 | 0 | 1 | 1 |
1 | 0 | 0 | 0 | 1 |
Selecting a variable:
make = # of clauses that become satisfied if x is flipped
break = # of clauses that become unsatisfied if x is flipped
GSAT
score = make – break
B. Selman, H. Levesque, D. Mitchell: A new method for solving hard satisfiability problems. In Proceedings of the Tenth National Conference on Artificial Intelligence (AAAI'92), pages 440–446.
PEG PDS DDI
Escaping Local Minima (figure from [Tompkins 2010])
181
8/6/2024
Local minimum: no variable with a positive score
Escaping local minima
GSAT: restarting
WalkSAT: applying random steps (and restarting)
Bart Selman, Henry Kautz, Bram Cohen: Noise strategies for local search. Proceedings AAAI-94, Seattle, WA, USA 1994.
More about local search:
Henry A. Kautz, Ashish Sabharwal, Bart Selman:�Incomplete Algorithms. Handbook of Satisfiability 2021: 213-232
�
PEG PDS DDI
Kissat’s Target Phases�
Reminder: phase saving (since RSAT, 2006) for polarity selection
Target phases
Armin Biere, Mathias Fleury: Chasing Target Phases, POS’20
182
8/6/2024
PEG PDS DDI
Integrating Local Search (LS) into CDCL
Shaowei Cai, Xindi Zhang: Deep Cooperation of CDCL and Local Search for SAT. SAT 2021: 64-81
Explore promising branches by local search
Phase selection with local search assignments
LS-driven variable activity (score) boost
Outperforms CDCL & LS portfolio
Best paper award at SAT’21
lstech_maple solver: 2nd in SC’21, SAT category
183
8/6/2024
�
PEG PDS DDI
Combining Local Search into CDCL SAT: Journal Paper
Shaowei Cai, Xindi Zhang, Mathias Fleury, Armin Biere: Better Decision Heuristics in CDCL through Local Search and Target Phases, Journal of Artificial Intelligence Research 74 (2022) 1515-1563
184
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
185
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
RSAT
Glucose
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
Zheng
He�Chen
Zhou
Li
abcdSAT
PEG PDS DDI
KissatMAB
The change is in the decision heuristic
Every restart, the solver chooses between:
Using Multi-Armed Bandit (MAB) framework
Reward function: “we choose a reward function that estimates the ability of a heuristic to reach conflicts quickly and efficiently.”
The reward function to maximize: log2(decisions) / dVars
As many decisions as possible over the same variables 🡪 locality principle!
186
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
187
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
RSAT
Glucose
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
Zheng
He�Chen
Zhou
Li
abcdSAT
PEG PDS DDI
KissatMAB-HyWalk�
The change is in the local search component
“Combines BandSAT, FPS, and some other local search algorithms with different random walking or say local optimal escaping strategies”
188
8/6/2024
PEG PDS DDI
SAT Competition & Race Winners (CNF & Appl. & Seq. & Non-incr. & All-inst.)
189
2002
zChaff
2003
Forklift
2004
zChaff
2005
SatELiteGTI
Armin Biere’s& derived:
2006
2007
MiniSat
MiniSat
2008
Precosat
2009
2010
CryptoMiniSat
2011
Glucose
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
Lingeling
Lingeling
Maple�COMSPS
Maple�LCMDist
Maple�LCMDist�ChronoBT
Maple�LCMDist�ChronoBTDLv3
Kissat
KissatMAB
Moskewicz
Madigan
Zhao
Zhang
Malik
Goldberg
Novikov
Moskewicz
Madigan
Zhao
Zhang
Malik
Eén
Sörensson
Eén
Sörensson
Pipatsrisawat
Darwiche
Eén
Sörensson
Biere
Soos
Audemard
Simon
Audemard
Simon
Biere
Biere
Chen
Liang
Oh
Ganesh
Czarnecki
Poupart
Xiao
Luo
Li
Manya
Lu
Nadel
Ryvchin
Kochemazov
Zaikin
Kondratiev
Semenov
Biere
Fazekas
Fleury
Heisinger
Cherif
Habet
Terrioux
MiniSat-based:
Others:
RSAT
Glucose
2022
2023
KissatMAB-HyWalk
SBVA-CaDiCaL
Haberlandt
Green
Zheng
He�Chen
Zhou
Li
abcdSAT
PEG PDS DDI
CaDiCaL and SBVA-CaDiCaL�
CaDiCaL
Katalin Fazekas, Armin Biere, Christoph Scholl: Incremental Inprocessing in SAT Solving. SAT 2019: 136-154
Alexander Nadel, Vadim Ryvchin, Ofer Strichman: Preprocessing in Incremental SAT. SAT 2012: 256-269
SBVA-CaDiCaL
190
8/6/2024
PEG PDS DDI
Incremental Solvers after Minisat
Glucose
A dedicated feature: ignores assumption literals in LBD calculations
CryptoMinisat
�Maple-based SC winners since MapleCOMSPS (SC’16) aren’t incremental, but MergeSAT is: Norbert Manthey: The MergeSat Solver. SAT 2021
SC incremental tracks:
Kissat isn’t incremental, but CaDiCal is
191
8/6/2024
PEG PDS DDI
Incremental Solvers after Minisat: IntelSAT
IntelSAT Alexander Nadel: Introducing Intel(R) SAT Solver. SAT 2022: 8:1-8:23
192
8/6/2024
PEG PDS DDI
Is Progress on SC Benchmarks Relevant to Incremental SAT?
Incremental SAT: no progress since 2013 [KIS, SAT’21]
My experience at Intel till 2021: no progress on industrial optimization problems
CaDiCaL 2.0 CAV’24 paper: progress on a variety of benchmarks, but no results on [KIS, SAT’21] bench’s
My intuitive take (without rigorous empirical evidence) -- it depends on the application:
193
8/6/2024
[CNR, TACAS’21] Aviad Cohen, Alexander Nadel, Vadim Ryvchin: Local Search with a SAT Oracle for Combinatorial Optimization. TACAS (2) 2021: 87-104
[KIS, SAT’21] Stepan Kochemazov, Alexey Ignatiev, João Marques-Silva: Assessing Progress in SAT Solvers Through the Lens of Incremental SAT. SAT 2021: 280-298
PEG PDS DDI
Conclusion
SAT is an unresolved mystery!
Yet, SAT solvers are scalable widely used tools
Main goals for today:
194
8/17/2024
PEG PDS DDI