Based Scalable Formal Verification Solutions:
Contents
1
1.1
1.2
1.3
1.3.1
1.4
1.5
1.6
1.6.1
1.6.2
1.6.3
1.7
2
2.1
2.1.1
2.1.2
2.1.3
2.2
2.3
2.4
LIST OF FIGURES............................................................................................ XIX
LIST OF TABLES..........................................................................................XXVII
DESIGN VERIFICATION CHALLENGES ..................................................1
INTRODUCTION............................................................................................1
FORMAL VERIFICATION...............................................................................2
SIMULATION-BASED VERIFICATION.............................................................1
Model Checking.................................................................................3
OVERVIEW...................................................................................................5
VERIFICATION TASKS..................................................................................6
VERIFICATION CHALLENGES........................................................................8
Design Features..................................................................................8
Verification Techniques.....................................................................9
Verification Methodology................................................................11
ORGANIZATION OF BOOK...........................................................................13
BACKGROUND..............................................................................................17
MODEL CHECKING ....................................................................................17
Correctness Properties......................................................................18
Explicit Model Checking .................................................................19
Symbolic Model Checking...............................................................19
NOTATIONS ...............................................................................................20
BINARY DECISION DIAGRAMS ...................................................................22
BOOLEAN SATISFIABILITY PROBLEM.........................................................23
xii
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.5
2.5.1
2.5.2
2.6
2.7
2.8
3
3.1
3.2
3.2.1
3.2.2
3.2.3
3.3
3.3.1
3.3.2
3.3.3
3.4
3.5
3.6
3.7
3.8
4
4.1
4.2
4.2.1
4.3
4.3.1
4.3.2
4.4
4.4.1
4.4.2
4.4.3
4.4.4
4.5
Contents
Decision Engine ...............................................................................25
Deduction Engine.............................................................................26
Diagnosis Engine .............................................................................28
Proof of Unsatisfiability...................................................................29
Further Improvements ......................................................................30
SAT-BASED BOUNDED MODEL CHECKING (BMC) ...................................32
BMC formulation: Safety and Liveness Properties..........................33
Clocked LTL Specifications ............................................................36
SAT-BASED UNBOUNDED MODEL CHECKING...........................................37
SMT-BASED BMC.....................................................................................39
NOTES .......................................................................................................40
PART I: BASIC INFRASTRUCTURE..............................................................41
EFFICIENT BOOLEAN REPRESENTATION...........................................43
INTRODUCTION..........................................................................................43
BRIEF SURVEY OF BOOLEAN REPRESENTATIONS.......................................45
Extended Boolean Decision Diagrams (XBDDs) ............................45
Boolean Expression Diagrams (BEDs) ............................................45
AND/INVERTER Graph (AIG) ......................................................46
FUNCTIONAL HASHING (REDUCED AIG)...................................................49
Three-Input Case..............................................................................50
Four-Input Case ...............................................................................52
Example ...........................................................................................54
EXPERIMENTS............................................................................................57
SIMPLIFICATION USING EXTERNAL CONSTRAINTS.....................................60
COMPARING FUNCTIONAL HASHING WITH BDD/SAT SWEEPING..............61
SUMMARY .................................................................................................62
NOTES .......................................................................................................62
HYBRID DPLL-STYLE SAT SOLVER.......................................................63
INTRODUCTION..........................................................................................63
BCP ON CIRCUIT .......................................................................................65
Comparing CNF- and Circuit-based BCP Algorithms.....................67
HYBRID SAT SOLVER................................................................................68
Proof of Unsatisfiability...................................................................69
Comparison with Chaff....................................................................69
APPLYING CIRCUIT-BASED HEURISTICS.................................................... 71
Justification Frontier Heuristics .......................................................71
Implication Order.............................................................................72
Gate Fanout Count ...........................................................................73
Learning XOR/MUX Gates .............................................................74
VERIFICATION APPLICATIONS OF HYBRID SAT SOLVER ...........................75
Contents xiii
4.6
4.7
5
5.1
5.2
5.2.1
5.2.2
5.2.3
5.3
5.4
5.4.1
5.4.2
5.4.3
5.4.4
5.4.5
5.4.6
5.4.7
5.4.8
5.4.9
5.5
5.5.1
5.5.2
5.5.3
5.6
5.6.1
5.6.2
5.6.3
5.6.4
5.6.5
5.7
5.8
6
6.1
6.2
6.3
6.3.1
6.4
6.4.1
6.4.2 i
SUMMARY .................................................................................................75
NOTES .......................................................................................................76
PART II: FALSIFICATION .................................................................................77
SAT-BASED BOUNDED MODEL CHECKING.........................................79
INTRODUCTION..........................................................................................79
DYNAMIC CIRCUIT SIMPLIFICATION..........................................................81
Notation............................................................................................82
Procedure Unroll ..............................................................................83
Comparing Implicit with Explicit Unrolling....................................84
SAT-BASED INCREMENTAL LEARNING AND SIMPLIFICATION ...................86
BDD-BASED LEARNING ............................................................................90
Basic Idea.........................................................................................90
Procedure: BDD_learning_engine ...................................................91
Seed Selection..................................................................................92
Creation of BDDs.............................................................................93
Generation of Learned Clauses ........................................................94
Integrating BDD Learning with a Hybrid SAT Solver ....................95
Adding Clauses Dynamically to a SAT Solver ................................95
Heuristics for Adding Learned Clauses ...........................................96
Application of BDD-based Learning ...............................................97
CUSTOMIZED PROPERTY TRANSLATION ....................................................98
Comparative Study of Various Techniques....................................105
Effect of Customized Translation and Incremental Learning ........108
Effect of BDD-based Learning on BMC........................................109
Static BDD Learning......................................................................109
Dynamic BDD Learning ................................................................110
SUMMARY ...............................................................................................112
NOTES .....................................................................................................112
DISTRIBUTED SAT-BASED BMC............................................................113
INTRODUCTION........................................................................................113
DISTRIBUTED SAT-BASED BMC PROCEDURE.........................................114
TOPOLOGY-COGNIZANT DISTRIBUTED-BCP............................................116
Causal-effect Order ........................................................................117
DISTRIBUTED-SAT..................................................................................118
Tasks of the Master ........................................................................119
Tasks of a Client C ........................................................................120
Customized Translation for F(p)....................................................100
Customized Translation of G(q).....................................................102
Customized Translation of F(p∧G(q)) ...........................................103
EXPERIMENTS..........................................................................................104
xiv
6.5
6.6
6.6.1
6.6.2
6.6.3
6.6.4
6.7
6.8
6.9
6.10
7
7.1
7.2
7.3
7.4
7.4.1
7.4.2
7.4.3
7.4.4
7.4.5
7.5
7.6
7.6.1
7.6.2
7.7
7.8
7.9
8
8.1
8.1.1
8.1.2
8.1.3
8.1.4
8.2
8.3
8.4
8.5
8.6
8.7
8.7.1
8.7.2
Contents
SAT-BASED DISTRIBUTED-BMC.............................................................120
OPTIMIZATIONS .......................................................................................121
Memory Optimizations in Distributed-SAT...................................121
Tight Estimation of Communication Overhead .............................121
Performance Optimization in SAT-based Distributed-BMC .........124
Performance Optimizations in Distributed-SAT............................123
EXPERIMENTS..........................................................................................124
RELATED WORK......................................................................................128
SUMMARY ...............................................................................................129
NOTES.................................................................................................129
EFFICIENT MEMORY MODELING IN BMC........................................131
INTRODUCTION........................................................................................131
BASIC IDEA..............................................................................................132
MEMORY SEMANTICS..............................................................................134
EMM APPROACH ....................................................................................135
Efficient Representation of Memory Modeling Constraints ..........136
Comparison with ITE Representation.............................................139
Non-uniform Initialization of Memory ..........................................140
EMM for Multiple Memories, Read, and Write Ports....................141
Arbitrary Initial Memory State.......................................................143
EXPERIMENTS ON A SINGLE READ/WRITE PORT MEMORY......................144
EXPERIMENTS ON MULTI-PORT MEMORIES.............................................149
Case Study on Quick Sort ..............................................................150
Case Study on Industry Design (Low Pass Filter) .........................151
RELATED WORK......................................................................................151
SUMMARY ...............................................................................................152
NOTES .....................................................................................................153
BMC FOR MULTI-CLOCK SYSTEMS ....................................................155
INTRODUCTION........................................................................................155
Nested Clock Specifications ..........................................................155
Verification Model for Multi-clock Systems .................................156
Simplification of Verification Model.............................................156
Clock Specification on Latches......................................................157
EFFICIENT MODELING OF MULTI-CLOCK SYSTEMS.................................158
REDUCING UNROLLING IN BMC..............................................................160
REDUCING LOOP-CHECKS IN BMC .........................................................161
DYNAMIC SIMPLIFICATION IN BMC........................................................162
CUSTOMIZATION OF CLOCKED SPECIFICATIONS IN BMC........................163
EXPERIMENTS..........................................................................................166
VGA/LCD Controller ....................................................................167
Tri-mode Ethernet MAC Controller...............................................168
Contents xv
8.8
8.9
8.10
9
9.1
9.2
9.3
9.4
9.5
9.5.1
9.5.2
9.6
9.7
10
10.1
10.2
10.3
10.3.1
10.3.2
10.3.3
10.4
10.5
10.5.1
10.6
10.6.1
10.6.2
10.6.3
10.6.4
10.7
10.7.1
10.7.2
10.8
10.9
10.10
10.11
11
RELATED WORK......................................................................................169
SUMMARY ...............................................................................................170
NOTES.................................................................................................171
PART III: PROOF METHODS..........................................................................173
PROOF BY INDUCTION ............................................................................175
INTRODUCTION........................................................................................175
BMC PROCEDURE FOR PROOF BY INDUCTION.........................................176
INDUCTIVE INVARIANTS: REACHABILITY CONSTRAINTS .........................177
PROOF OF INDUCTION WITH EMM...........................................................179
EXPERIMENTS..........................................................................................180
Use of Reachability Invaraints .......................................................180
Case Study: Use of Induction proof with EMM.............................181
SUMMARY ...............................................................................................182
NOTES .....................................................................................................183
UNBOUNDED MODEL CHECKING....................................................185
INTRODUCTION....................................................................................185
MOTIVATION.......................................................................................187
CIRCUIT COFACTORING APPROACH ....................................................188
Basic Idea .......................................................................................188
The Procedure ................................................................................189
Comparing circuit cofactoring with cube-wise enumeration .........190
COFACTOR REPRESENTATION .............................................................191
ENUMERATION USING HYBRID SAT....................................................192
Heuristics to Enlarge the Satisfying State Set ................................193
SAT-BASED UMC...............................................................................197
SAT-based Existential Quantification using Circuit Cofactor .......198
EXPERIMENTS FOR SAFETY PROPERTIES .............................................203
Industry Benchmarks .....................................................................203
Public Verification Benchmarks ....................................................206
EXPERIMENTS FOR LIVENESS PROPERTIES ..........................................207
RELATED WORK..................................................................................209
SUMMARY...........................................................................................211
NOTES.................................................................................................212
PART IV: ABSTRACTION/REFINEMENT ....................................................213
PROOF-BASED ITERATIVE ABSTRACTION...................................215
SAT-based UMC for F(p) ..............................................................198
SAT-based UMC for G(q) .............................................................199
SAT-based UMC for F(p∧G(q)) ....................................................202
xvi
11.1
11.2
11.3
11.4
11.4.1
11.4.2
11.5
11.6
11.6.1
11.7
11.7.1
11.7.2
11.7.3
11.8
11.9
11.10
11.10.1
11.10.2
11.11
11.11.1
11.11.2
11.12
11.13
11.14
11.15
12
12.1
12.2
12.3
12.4
12.5
12.6
12.7
13
13.1
13.2
13.3
13.4
13.4.1
Contents
INTRODUCTION....................................................................................215
PROOF-BASED ABSTRACTION (PBA): OVERVIEW...............................218
LATCH-BASED ABSTRACTION.............................................................219
PRUNING IN LATCH INTERFACE ABSTRACTION ...................................222
Environmental Constraints.............................................................223
Latch Interface Propagation Constraints ........................................224
ABSTRACT MODELS ............................................................................225
IMPROVING ABSTRACTION USING LAZY CONSTRAINTS ......................226
Making Eager Constraints Lazy.....................................................227
ITERATIVE ABSTRACTION FRAMEWORK .............................................228
Inner Loop of the Framework ........................................................228
Handling Counterexamples............................................................229
Lazy Constraints in Iterative Framework.......................................230
APPLICATION OF PROOF-BASED ITERATIVE ABSTRACTION .................231
EMM WITH PROOF-BASED ABSTRACTION ..........................................232
EXPERIMENTAL RESULTS OF LATCH-BASED ABSTRACTION................233
Results for Iterative Abstraction................................................233
Results for Verification of Abstract Models..............................235
EXPERIMENTAL RESULTS USING LAZY CONSTRAINTS ........................236
Results for Use of Lazy Constraints ..........................................236
Proofs on Final Abstract Models ...............................................239
CASE STUDY: EMM WITH PBIA .........................................................240
RELATED WORK..................................................................................242
SUMMARY...........................................................................................243
NOTES.................................................................................................243
PART V: VERIFICATION PROCEDURE.......................................................245
SAT-BASED VERIFICATION FRAMEWORK...................................247
INTRODUCTION....................................................................................247
VERIFICATION MODEL AND PROPERTIES.............................................248
VERIFICATION ENGINES ......................................................................250
VERIFICATION ENGINE ANALYSIS.......................................................254
VERIFICATION STRATEGIES: CASE STUDIES........................................256
SUMMARY...........................................................................................261
NOTES.................................................................................................261
SYNTHESIS FOR VERIFICATION......................................................263
INTRODUCTION....................................................................................263
CURRENT METHODOLOGY ..................................................................265
SYNTHESIS FOR VERIFICATION PARADIGM .........................................267
HIGH-LEVEL VERIFICATION MODELS..................................................269
High-level Synthesis (HLS) ...........................................................269
Contents xvii
13.4.2
13.4.3
13.5
13.6
13.7
13.7.1
13.7.2
13.7.3
13.8
13.8.1
13.8.2
13.8.3
13.8.4
13.9
13.9.1
13.9.2
13.10
13.10.1
13.10.2
13.10.3
13.10.4
13.11
13.12
Extended Finite State Machine (EFSM) Model .............................269
Flow Graphs...................................................................................271
“BMC-FRIENDLY” MODELING ISSUES ................................................272
SYNTHESIZING “BMC-FRIENDLY” MODELS........................................273
EFSM LEARNING................................................................................274
Extraction: Control State Reachability (CSR)................................274
On-the-Fly Simplification ..............................................................275
Unreachablility of Control States...................................................277
EFSM TRANSFORMATIONS .................................................................277
Property-based EFSM Reduction...................................................278
Balancing Re-convergence.............................................................278
Balancing Re-convergence without Loops.....................................280
Balancing Re-convergence with Loops..........................................282
HIGH-LEVEL BMC ON EFSM..............................................................285
Expression Simplifier.....................................................................286
Incremental Learning in High-level BMC .....................................287
EXPERIMENTS .....................................................................................287
Controlled Case Study ...............................................................287
Experiments on Industry Software bc-1.06 ...............................289
Experiments on Industry Embedded System Software..............292
Experiments on System-level Model.........................................293
SUMMARY AND FUTURE WORK ...........................................................294
NOTES.................................................................................................295
REFERENCES .....................................................................................................297
GLOSSARY..........................................................................................................309
INDEX...................................................................................................................317
ABOUT THE AUTHORS....................................................................................325
看了半天 不知道讲啥 悲剧呀