Efficient SAT Solving
Under Assumptions
Alexander Nadel1 and Vadim Ryvchin1,2
1 – Intel, Haifa, Israel
2 – Technion, Haifa, Israel
SAT’12, Trento, Italy
Motivation: Real-Life Experience at
Intel
Critical non-incremental property unsolved in 48 hours by the
SAT solver during FV of Intel’s latest design
The default flow: Minisat-like incremental SAT solving under
assumptions
• The negation of the property is the only assumption in our case
Solution: model the property as a unit clause solved in 30
minutes!
• Propagation of the single assumption by SatELite was extremely
helpful: resulted in “chain reaction”
Our paper generalizes the case-study to incremental SAT
solving under assumptions
Basic Definitions
Input: {𝐹𝑖 , 𝐴𝑖 }
𝐹𝑖 – formula in CNF form
𝐴𝑖 = {𝑙1, 𝑙2, … , 𝑙n} – set of assumptions
• 𝑙𝑗 – a literal (unit clause)
Invocation 𝑖 decides the satisfiability of:
𝑖
(⋀𝑗=1
𝐹𝑗 ) ∧ 𝐴𝑖
Recall: Clause Database Simplification
Propagation of unit clauses
2. Elimination of satisfied clauses
3. Removal of falsified literals from clauses
1.
Used in leading SAT solvers
Compliant with incremental solving
Recall: SatELite Preprocessing
Variable Elimination
2. Subsumption
3. Self-subsuming resolution
1.
Used in leading SAT solvers
Non-Compliant with incremental solving
Approaches to Incremental SAT Solving
under Assumption
Literal-based Single instance (LS):
• One incremental solver instance
• Assumptions are chosen as first decisions
Clause-based Multiple instances (CM):
• Multiple solver instances
• Assumptions are provided as temporary unit clauses
• LS is the current state-of-the-art
Literal-based Single instance (LS)
Create instance 𝐹 = ∅
For each incremental call 𝑖 do
1.
𝐹 = 𝐹 ∧ 𝐹𝑖
2.
Run solver over {𝐹, 𝐴𝑖 }
The same instance of the solver is reused
Clause-based Multiple instances (CM)
For each incremental call 𝑖 do
𝑖
Create new instance ⋀𝑗=1
𝐹𝑗 ∧ 𝐴𝑖
1.
o
Add pervasive conflict clauses (⋀𝑖−1
𝑙=1 𝑃𝑙 ) to the instance
2.
o
•
Where the set Ai comprise the temporary clauses
Pervasive clauses: conflict clauses generated during previous
invocation that do not depend on 𝐴𝑖
𝑖
Solve (⋀𝑗=1
𝐹𝑗) ∧ (⋀𝑖−1
𝑙=1 𝑃𝑙 ) ∧ 𝐴𝑖
A new solver instance is created each time
Temporary vs. Pervasive
C22
C17
Legend:
C19
C18
C11
C10
C1
C23=()
C2
Input clauses
C3
C4
C21
C5
Derived clauses
C16
C15
C14
C13
C12
C20
C6
C7
Temporary input
clauses
C8
C9
Temporary vs. Pervasive
C22
C17
Legend:
C19
C18
C11
C10
C1
C23=()
C2
Input clauses
C3
C4
C21
C5
Derived clauses
C16
C15
C14
C13
C12
C20
C6
C7
Temporary input
clauses
C8
C9
Temporary
conflict clauses
Temporary vs. Pervasive
C22
C17
Legend:
C19
C18
C11
C10
C1
C23=()
C2
Input clauses
C3
C4
C21
C5
Pervasive
conflict clauses
C16
C15
C14
C13
C12
C20
C6
C7
Temporary input
clauses
C8
C9
Temporary
conflict clauses
LS vs. CM
LS: Efficient Learning
All conflict clauses are pervasive
Heuristics take advantage of incrementality
Assumptions are not propagated by simplification
CM: Efficient Assumption Propagation
Some conflict clauses are temporary
Heuristics start from zero at every invocation
Assumptions are propagated by simplification
The problem: How to Propagate Assumptions
with SatELite in Incremental SAT?
Our experience showed that propagating assumptions with
SatELite is vital
SatELite could not be used to propagate assumptions for either
LS or CM in incremental settings:
LS:
• Incremental SatELite was not well-defined (before our other paper to
be presented next )
• It is still unknown how to propagate assumption using SatELite, even if
SatELite is applied incrementally
CM:
• It was undefined how to distinguish between temporary and pervasive
conflict clauses after applying SatELite
Outline of Our Work
1. Enabling assumption propagation with SatELite for
incremental SAT by making SatELite and CM compliant
•
Much simpler than doing the same for LS
2. Mitigate the advantages of LS over CM by:
•
Transforming temporary clauses to pervasive
•
Solving related incremental chunks using one SAT instance (if
limited look-ahead information is available)
Our algorithms outperform LS on Intel instances of
incremental SAT under assumption.
Make SatELite Compliant with CM
SatELite over temporary clauses:
• Variable elimination / Self-subsuming resolution :
o new clause 𝛼 = 𝛽1⨂𝛽2 is marked as temporary iff 𝛽1 or 𝛽2 is temporary
• Subsumption:
o no change
Improve Learning Efficiency
The problem:
• Our algorithm propagates assumptions with SatELite, but:
• Conflict clause learning is still more efficient for LS, since:
o All the conflict clauses are pervasive for LS
o Some conflict clauses are temporary for CM
Solution: transform temporary conflict clauses to
pervasive after CM’s invocation
Transform Temporary to Pervasive – T2P
For every temporary clause 𝛼: transform 𝛼 to pervasive by
adding to 𝛼 every assumption 𝛼 depends on
• By analyzing the resolution derivation
Problem: Conflict clauses might become much longer
Solution: Limit the size
• The threshold is controlled by a parameter: T2P Threshold
Transform Temporary to Pervasive – T2P
α11=⊥
α10=c
α7=c v d
α1=a
α2=b
Legend:
α8=¬d
α3=¬a v c v d
Input
clauses
α4=¬b v ¬d
Pervasive
conflict clauses
α9=¬c
α5=¬c v e
Assumptions
α6=¬c v ¬e
Temporary
conflict clauses
Transform Temporary to Pervasive – T2P
α11=⊥
α10=c
α7=c v d
α8=¬d
α9=¬c
¬a
α1=a
α2=b
Legend:
α3=¬a v c v d
Input
clauses
α4=¬b v ¬d
Pervasive
conflict clauses
α5=¬c v e
Assumptions
α6=¬c v ¬e
Temporary
conflict clauses
Transform Temporary to Pervasive – T2P
α11=⊥
α10=c
α7=¬a v c v d
α2=b
α8=¬d
α3=¬a v c v d
α4=¬b v ¬d
α9=¬c
α5=¬c v e
α6=¬c v ¬e
¬b
Legend:
Input
clauses
Pervasive
conflict clauses
Assumptions
Temporary
conflict clauses
Transform Temporary to Pervasive – T2P
α11=⊥
α10=c
¬a
¬b
α7=¬a v c v d
α8=¬b v ¬d
α3=¬a v c v d
Legend:
Input
clauses
α4=¬b v ¬d
Pervasive
conflict clauses
α9=¬c
α5=¬c v e
Assumptions
α6=¬c v ¬e
Temporary
conflict clauses
Transform Temporary to Pervasive – T2P
α11=⊥
¬a v ¬ b
α10=¬a v ¬b v c
α7=¬a v c v d
α8=¬b v ¬d
α3=¬a v c v d
Legend:
Input
clauses
α4=¬b v ¬d
Pervasive
conflict clauses
α9=¬c
α5=¬c v e
Assumptions
α6=¬c v ¬e
Temporary
conflict clauses
Transform Temporary to Pervasive – T2P
α11=¬a v ¬b
α10=¬a v ¬b v c
α7=¬a v c v d
α8=¬b v ¬d
α3=¬a v c v d
Legend:
Input
clauses
α4=¬b v ¬d
Pervasive
conflict clauses
α9=¬c
α5=¬c v e
Assumptions
α6=¬c v ¬e
Temporary
conflict clauses
Transform Temporary to Pervasive – T2P
α11=¬a v ¬b
α10=¬a v ¬b v c
α9=¬c
α3=¬a v c v d
Legend:
Input
clauses
α4=¬b v ¬d
Pervasive
conflict clauses
α5=¬c v e
Assumptions
α6=¬c v ¬e
Temporary
conflict clauses
Improve the Efficiency of Heuristics
The problem:
• Our algorithm propagates assumptions with SatELite, and
• We know how to make all the clauses pervasive, but:
• Heuristics are still incremental for LS, while our algorithm needs to
collect information from scratch for each invocation
Solution: use a single SAT solver instance for multiple
calls, if step look-ahead information is available
Step Look-Ahead
F1 A1
F2 A2
…
Fk Ak
Fk+1 Ak+1
Fk+2 Ak+2
…
Fk+k Ak+k
Fj*k+1 Aj*k+1
Fj*k+2 Aj*k+2
Essential conditions for applying
step look-ahead:
Step (window) 1:
𝐹1 − 𝐹𝑘 – available at invocation 1
𝐹1 ∧ 𝐴1 ≅ 𝐹1 ∧ 𝐴1 ∧ 𝐹𝑚≤𝑘
≅ - equisatisfiability
…
Fj*k+k Aj*k+k
Step (window) i>1: similar
LS Using Step Look-Ahead
Adjustment of LS to take advantage of step look-ahead
• Proposed recently in the context of BMC by Khasidashvili&Nadel,
HVC’11
Single instance Literal-based with Step look-ahead (LSS):
• All step (window) clauses are added at once
• Assumptions are chosen as first decisions
• Advantage over LS: has a wider view of the problem
• The same drawback as LS: no simplification over assumptions; no
preprocessing
LSS – Window 2
F1 A1
F2 A2
F3 A3
𝐹 = 𝐹 ∧ (⋀6𝑖=4 𝐹𝑖 )
2. For j=4..6
1.
1.
F4 A4
F5 A5
F6 A6
Fj*k+1 Aj*k+1
Fj*k+2 Aj*k+2
…
Fj*k+k Aj*k+k
Solve(𝐹, 𝐴𝑗 )
Our Algorithm: CLMS
F1 A1
F2 A2
…
Fk Ak
Fk+1 Ak+1
Fk+2 Ak+2
…
Fk+k Ak+k
Fj*k+1 Aj*k+1
Fj*k+2 Aj*k+2
…
Fj*k+k Aj*k+k
CLMS: Multiple instances
Clause/Literal-based with Step lookahead
CLMS invokes the SAT solver for
each window k times over a single
SAT instance
Solve(𝐹, 𝑇, 𝐴):
Solve formula 𝐹
Using temporal clauses 𝑇
Under assumptions 𝐴
Our Algorithm: CLMS – Window 1
F1 A1
F2 A2
F3 A3
Create Instance 𝐹 = ⋀3𝑖=1 𝐹𝑖
1.
𝐺 =∩3𝑖=1 𝐴𝑖
3. Optionally:
2.
F4 A4
F5 A5
F6 A6
1.
2.
1.
…
Fj*k+k Aj*k+k
Freeze (∪3𝑖=1 𝐴𝑖 ) ∖ 𝐺
Apply SatELite to 𝐹 ∧ 𝐺
For j=1..3 do
4.
Fj*k+1 Aj*k+1
Fj*k+2 Aj*k+2
(temporary clauses)
Solve(𝐹, 𝐺, 𝐴𝑗 ∖ 𝐺)
Optionally: Transform temporary to
pervasive
6. Store pervasive in 𝑃
7. Delete Instance 𝐹
5.
Our Algorithm: CLMS – Window 2
F1 A1
F2 A2
F3 A3
Create Instance 𝐹 = (⋀6𝑖=1 𝐹𝑖 ) ∧ 𝑃
1.
𝐺 =∩6𝑖=4 𝐴𝑖
3. Optionally:
2.
F4 A4
F5 A5
F6 A6
1.
2.
1.
…
Fj*k+k Aj*k+k
Freeze (∪6𝑖=4 𝐴𝑖 ) ∖ 𝐺
Apply SatELite to 𝐹 ∧ 𝐺
For j=4..6 do
4.
Fj*k+1 Aj*k+1
Fj*k+2 Aj*k+2
(temporary clauses)
Solve(𝐹, 𝐺, 𝐴𝑗 ∖ 𝐺)
Optionally: Transform temporary to
pervasive
6. Store pervasive in 𝑃
7. Delete Instance 𝐹
5.
Experimental Results
Benchmark Set:
• Instances generated by incremental BMC under assumptions
o Generated by an incremental model checker
• May be invoked multiple times with different assumptions and properties
• Essential to reduce the debug loop time for validation engineers
• 3 satisfiable families – 128 instances
• 4 unsatisfiable families – 81 instances
• Algorithm Implementation in Intel’s internal Eureka SAT Solver
• Timeout: 3600sec
Machines:
• Intel® Xeon® 4Ghz 32Gb of memory
Variables To Assumptions Ratio
Unsatisfiable Instances
State-of-the-art LS
Unsatisfiable Instances
State-of-the-art CM
Unsatisfiable Instances
2nd: SatELite with temporary clauses + CLMS step 10 + T2P Thr. 100
Unsatisfiable Instances
Winner: SatELite with temporary clauses + CLMS step 50; No T2P
Unsatisfiable Instances: Summary
CM outperforms LS, since:
• The average clause size is higher for LS by 1-2 orders of
magnitude
• Simplification removes 1-2 orders of magnitude more clauses for
CM
Unsurprisingly, both CLMS (the step) and SatELite are
helpful
T2P is not helpful, since:
• SatELite is slowed down significantly due to T2P
Satisfiable Instances
State-of-the-art CM
Satisfiable Instances
SatELite with temporary clauses + CLMS step 50; No T2P
Satisfiable Instances
2nd: State-of-the-art LS
Satisfiable Instances
Winner: SatELite with temporary clauses + CLMS step 10 + T2P Thr. 100
Satisfiable Instances: Summary
LS is second best:
• Incrementality for heuristics proves to be essential for relatively
easy satisfiable instances
The combination of our algorithms proves to be the best
• SatELite with temporary clauses
• CLMS with step 10
• T2P with threshold 100
Experimental Results: Summary
The following algorithm proves to be the best overall (2nd
on unsatisfiable and 1st on satisfiable):
• SatELite with temporary clauses
• CLMS with step 10
• T2P with threshold 100
The gap between our algorithms and LS is especially
significant on hard unsatisfiable instances.
Thank You!
© Copyright 2025 Paperzz