![Page 1: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/1.jpg)
1
Satisfiability Checking of Non-clausal Formulas using General Matings
Satisfiability Checking of Non-clausal Formulas using General Matings
Himanshu JainHimanshu Jain
Constantinos BartzisConstantinos Bartzis
Edmund ClarkeEdmund Clarke
Carnegie MellonCarnegie Mellon UniversityUniversity
![Page 2: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/2.jpg)
2
The first problem to be proven NP-The first problem to be proven NP-completecomplete
Applications in verificationApplications in verification– equivalence checkingequivalence checking– bounded model checkingbounded model checking– predicate abstractionpredicate abstraction– theorem provingtheorem proving– test generationtest generation
Applications in AIApplications in AI– planningplanning
Boolean SatisfiabilityBoolean Satisfiability
![Page 3: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/3.jpg)
3
Current state of SAT solvingCurrent state of SAT solving
State-of-the-art State-of-the-art completecomplete SAT solvers SAT solvers
Davis-Putnam-Logemann-Loveland (DPLL) Davis-Putnam-Logemann-Loveland (DPLL) algorithmalgorithm
Require the input formula to be in clausal form Require the input formula to be in clausal form (CNF)(CNF)– MiniSat, BerkMin, Siege, zChaff, Limmat, GRASP, MiniSat, BerkMin, Siege, zChaff, Limmat, GRASP,
SATOSATO
Conversion to CNF by adding new variablesConversion to CNF by adding new variables– Linear size but Linear size but exponential state-spaceexponential state-space– In practice does not seem to hurtIn practice does not seem to hurt
![Page 4: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/4.jpg)
4
Non-Clausal (non-cnf) SAT solvingNon-Clausal (non-cnf) SAT solving
DPLL on circuit representation of formula DPLL on circuit representation of formula – Ganai et al. (DAC 2002)Ganai et al. (DAC 2002)– Lu et al. (Lu et al. (CSATCSAT, DAC 2003), DAC 2003)– Thiffault et al. (Thiffault et al. (NoClauseNoClause, SAT 2004), SAT 2004)
This work: This work: Non-clausalNon-clausal SAT-solver based on SAT-solver based on
DPLL
General MatingsGeneral Matings
![Page 5: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/5.jpg)
5
OutlineOutline
IntroductionIntroduction
General Matings General Matings
Search space pruningSearch space pruning
LearningLearning
Non-chronological backtrackingNon-chronological backtracking
Experimental resultsExperimental results
![Page 6: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/6.jpg)
6
General Matings exampleGeneral Matings example
Formula F: (((p q) r q) (p (r s) q))
q
r
q
p
Vertical path form (vpgraph) of F
F is satisfiable iff there exists a vertical path without opposite literals
p q
r sVertical path
Each vertical path corresponds to a term in the DNF form of F
![Page 7: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/7.jpg)
7
Basic searchBasic search
a
b
-a
c
-a
-c
a
b
-c
partialassignment
Satisfiable!
vpgraph
Partial solution
![Page 8: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/8.jpg)
8
Basic IdeaBasic Idea
Given negation normal formula (NNF) FGiven negation normal formula (NNF) F
Obtain Obtain vpgraphvpgraph of F (O(k of F (O(k22), k= |F|) ), k= |F|)
Find vertical path without opposite literalsFind vertical path without opposite literals
Due to P. Andrews , W. Bibel [1981] Due to P. Andrews , W. Bibel [1981] – Focus on higher order theorem provingFocus on higher order theorem proving– Quantifier instantiation is the main problemQuantifier instantiation is the main problem
![Page 9: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/9.jpg)
9
Main problem:Main problem:
exponentially many vertical exponentially many vertical paths in the vpgraph of Fpaths in the vpgraph of F
Sample vpgraph
![Page 10: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/10.jpg)
10
Our contributionsOur contributions
Preventing enumeration of vertical pathsPreventing enumeration of vertical paths
Search space pruningSearch space pruning
LearningLearning
Non-chronological backtracking Non-chronological backtracking
![Page 11: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/11.jpg)
11
OutlineOutline
IntroductionIntroduction
General MatingsGeneral Matings
Search space pruningSearch space pruning
LearningLearning
Non-chronological backtrackingNon-chronological backtracking
Experimental resultsExperimental results
![Page 12: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/12.jpg)
12
Search space pruning on vpgraphSearch space pruning on vpgraph
a
a
b
b a b
a
b
a
a b
b
Avoids enumeration of exponentially many paths
![Page 13: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/13.jpg)
13
Conflict when pruning vpgraphConflict when pruning vpgraph
a
a
a
b
b
b
b
a
a
a
Local conflict
![Page 14: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/14.jpg)
14
Local learningLocal learning
b
b
a
a
a Locally learned clause:
(a b)
![Page 15: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/15.jpg)
15
Non-chronological backtrackingNon-chronological backtracking
a b x
Backtrack
a
b
x
![Page 16: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/16.jpg)
16
Non-chronological backtrackingNon-chronological backtracking
a b x
a
b
x
![Page 17: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/17.jpg)
17
Limitations of local learningLimitations of local learning
Learned clause is useful at a particular Learned clause is useful at a particular nodenode
Can learn same clause multiple timesCan learn same clause multiple times
Need an equivalent of learning in CNF SAT solvers
![Page 18: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/18.jpg)
18
Dual of vpgraph: hpgraphDual of vpgraph: hpgraph
Formula F: (((p q) r q) (p (r s) q))
hpgraph of F
Each horizontal path corresponds to a clause in the CNF representation of F
p q
r
q q
p
r s
horizontal path
p q
r
q q
p
r s
vpgraph of F
![Page 19: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/19.jpg)
19
Conflicts and implications in hpgraphConflicts and implications in hpgraph
r
q q
r s
pp q Conflict clause: r p
Global conflict
p q p
r
q q
r s
Unit clause:p q r s
Implied literal : r
![Page 20: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/20.jpg)
20
Conflicts and implications in hpgraphConflicts and implications in hpgraph Detecting conflict and implications Detecting conflict and implications
– Can be done in linear timeCan be done in linear time
Why use hpgraphWhy use hpgraph– GloballyGlobally learned clauses learned clauses– Obtain implications efficientlyObtain implications efficiently
![Page 21: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/21.jpg)
21
Putting vpgraph and hpgraph togetherPutting vpgraph and hpgraph together
Formula F: (((p q) r q) (p (r s) q))
p
r
p q
q q
r s
hpgraph of F
Aim to find a vertical path in vpgraph without opposite literals
p q
r
q q
p
r s
vpgraph of F
{p, r}
Global Conflict
Unit clauses(implications)Local conflict ?
![Page 22: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/22.jpg)
22
OutlineOutline
IntroductionIntroduction
General MatingsGeneral Matings
Search space pruningSearch space pruning
LearningLearning
Non-chronological backtrackingNon-chronological backtracking
Experimental resultsExperimental results
![Page 23: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/23.jpg)
23
Experimental resultsExperimental results
SatMate MiniSat BerkMin Siege zChaff
Time Solved Time Solved Time Solved Time Solved Time Solved
QG6 256 23266 235 49386 179 46625 184 46525 184 47321 180
QG6* 256 23266 235 37562 211 15975 239 30254 225 45557 186
Mboard 19 4316 12 4331 12 4947 11 4505 12 5029 11
Pigeon 19 5110 11 6114 9 5459 10 6174 9 5483 11
Benchmark
Prob-lems
Timeout of 10 minutes per problem per solver
Classification theorems for quasigroups
[Sorge et al. SAT 2005]
![Page 24: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/24.jpg)
24
Performance on individual benchmarksPerformance on individual benchmarks
2111713165958cache12
8834242315863113237q2.14
TO16412320TO721064850TOicl45
TO2629TOTO1406922683200icl39
TO1508167314412006220699181brn13
TO1238108513081558823500174dnd02
TimeTimeTimeTimeGlobal confsLocal confsTime
zChaffSiegeBerkMinMiniSatSatMate
Problem
![Page 25: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/25.jpg)
25
ConclusionConclusion
SAT solver based on SAT solver based on General MatingsGeneral Matings
Graphical representations: vpgraph, Graphical representations: vpgraph, hpgraph hpgraph
Preventing enumeration of vertical pathsPreventing enumeration of vertical paths
Experiments show promise of this Experiments show promise of this techniquetechnique
![Page 26: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/26.jpg)
26
Questions?Questions?
![Page 27: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/27.jpg)
27
Conversion to CNFConversion to CNF
Results in more complex formula. Either:Results in more complex formula. Either:– Same variables but Same variables but exponential sizeexponential size– Linear size but Linear size but exponential state-spaceexponential state-space
• Doesn’t seem to hurt in practiceDoesn’t seem to hurt in practice
Original formula:Original formula:(a (a b) b) ( (c c d) d) (e (e f)f)
CNF using expansion:CNF using expansion:(a (a c c e) e) (a (a c c f) f) (a (a d d e) e) (a (a d d f) f) (b (b c c e) e) (b (b c c f) f) (b (b d d e) e) (b (b d d f) f)
CNF using new variables:CNF using new variables:(x(x11 x x22 x x33) ) (x(x11 a a b) b) ( (xx11 a) a) ( (xx11 b) b) (x(x22 a a d) d) ( (xx22 c) c) ( (xx22 d) d) (x(x33 f f e) e) ( (xx33 f ) f ) ( (xx33 e) e)
![Page 28: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/28.jpg)
28
Using hpgraph for conflict detectionUsing hpgraph for conflict detection
p
r
p q
q q
r s
Partial truth assignment: {r=true, p=true}
r
q q
r s
pp q
Conflict clause: r p
Global conflict
![Page 29: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/29.jpg)
29
Using hpgraph to produce implicationsUsing hpgraph to produce implications
p
r
p q
q q
r s
Partial truth assignment: {p=false, q=false, s=true}
p q p
r
q q
r s
Unit clause:p q r s
![Page 30: 1 Satisfiability Checking of Non-clausal Formulas using General Matings Himanshu Jain Constantinos Bartzis Edmund Clarke Carnegie Mellon University](https://reader037.vdocuments.site/reader037/viewer/2022103022/56649d4e5503460f94a2e917/html5/thumbnails/30.jpg)
30
Obtaining vpgraphObtaining vpgraph
Constructed directly from a NNF formulaConstructed directly from a NNF formula
Time/Space required: O(kTime/Space required: O(k22) ) – k is the size of given formulak is the size of given formula– Recently improved to O(k)Recently improved to O(k)
Directed acyclic graphDirected acyclic graph