Decide: x4←0, decision level δ(x4)=1, Noted as x4=0@1.
Decide: x1=0@2.
Propagate: x3=1@2, α(x3)=ω2
Propagate: x2=1@2, α(x2)=ω3
Implication Graph[1]
I=(VI,EI)
VI is all assigned variables, and one special node κ
κ: If unit propagation yields an unsatisfied clause ωj, then a special vertex κ is used to represent the unsatisfied clause.
EI: if ω=α(xi), then there is a directed edge from each variable in ω, other than xi, to xi.
Algorithm
Algorithm CDCL(φ, ν):
if (UnitPropagation(φ, ν) = CONFLICT):
return UNSAT
dl ← 0 # Decision level
while (¬AllVariablesAssigned(φ, ν)):
(x, v) = PickBranchingVariable(φ, ν) # Decide stage
dl ← dl + 1 # Increment decision level
# due to new decision
ν ← ν ∪ {(x, v)}
if (UnitPropagation(φ, ν) = CONFLICT): # Deduce stage
β ← ConflictAnalysis(φ, ν) # Diagnose stage
if (β < 0)
return UNSAT
else
Backtrack(φ, ν, β)
dl ← β # Decrement due to backtracking
return SAT
UnitPropagation consists of the iterated application of the unit clause rule. If an unsatisfied clause is identified, then a conflict indication is returned.
PickBranchingVariable consists of selecting a variable to assign and the respective value.
ConflictAnalysis consists of analyzing the most recent conflict and learning a new clause from the conflict.
Backtrack backtracks to the decision level computed by ConflictAnalysis.
Learning clauses from conflicts
Notations
d: decision level
xi: decision variable
ν(xi)=v: decision assignment
ωj: unsatisfied clause, α(κ)=ωj
⊙: resolution operator:
for two clauses ωj and ωk, for which there is a unique variable x such that one clause has a literal x and the other has literal ¬x, ωj⊙ωk contains all the literals of ωj and ωk with the exception of x and ¬x.
ξ(ω,l,d)=l∈ω∧δ(l)=d∧α(l)=NIL: if a clause ω has an implied literal l assigned at the current decision level d
ωLd,i: the intermediate clause obtained after i resolution operations
repeat until a fixed point occurs: ωL5,6={x1,x31,x21}
the learned clause is ωL5=(x1∨x31∨x21)
Unit Implication Points [1]
A vertex u dominates another vertex x in a directed graph if every path from x to another vertex κ contains u[2]. In the implication graph, a UIP u dominates the decision vertex x with respect to the conflict vertex κ.
σ(ω,d)=∣{l∈ω∣δ(l)=d}∣: the number of literals in ω assigned at decision level d
Apart from conflict analysis, these solvers include lazy data structures, search restarts, conflict-driven branching heuristics and clause deletion strategies.
Nelson-Oppen Theory Combination
SMT with multiple theories
f(f(x)−f(y))=af(0)>a+2x=y
belongs to Linear Real Arithmetics(LRA) and Uninterpreted Functions(UF)
purify literals, each literal should belong to a single theory
f(f(x)−f(y))=a
f(e1)=a,e1=f(x)−f(y)
f(e1)=a,e1=e2−e3,e2=f(x),e3=f(y)
f(0)>a+2
f(e4)=e5,e4=0,e5>a+2
x=y
UF
LRA
f(e1)=a
e1=e2−e3
f(x)=e2
e4=0
f(y)=e3
e5>a+2
f(e4)=e5
x=y
Exchange entailed interface equalities, equalities over shared constants e1,e2,e3,e4,e5,a
x=y,f(x)=f(y)⇒e2=e3
e2=e3,e1=e2−e3,e4=0⇒e1=e4
e1=e4,f(e1)=f(e4)⇒a=e5
UF
LRA
f(e1)=a
e1=e2−e3
f(x)=e2
e4=0
f(y)=e3
e5>a+2
f(e4)=e5
e2=e3
x=y
a=e5
e1=e4
Nelson-Oppen (non-deterministic, non-incremental)
Notations:
Ti: first-order theory of signature Σi, set of function and predicate symbols in Ti other than =
T=T1∪T2
C: a finite set fo free constants, i.e. not in Σ1∪Σ2
Li finite set of ground (i.e. variable-free) (Σi∪C)-literals
Input:L1∪L2
Output: SAT or UNSAT
Guess an arrangementA, i.e., a set of equalities and disequalities over C such that:
∀c,d∈C(c=d∈A∨c=d∈A)
If Li∪A is Ti-UNSAT for i∈{1,2}, return UNSAT
return SAT
The algorithm is terminating, sound and complete under certain conditions(Σ1∩Σ2=∅∧T1,T2are stably infinite)
when the method returns sat for some arrangement, the input is SAT.
References
[1] J. P. Marques-Silva and K. A. Sakallah. GRASP: A new search algorithm for satisfiability. In International Conference on Computer-Aided Design, pages 220–227, November 1996.
[2] R. E. Tarjan. Finding dominators in directed graphs. SIAM Journal on Computing, 1974.