A Progressive Approach for Satisfiability Modulo Theories Hossein
A Progressive Approach for Satisfiability Modulo Theories Hossein M. Sheini Karem A. Sakallah Electrical Engineering and Computer Science University of Michigan, Ann Arbor, Michigan, USA Constraints and Verification 2006 Isaac Newton Institute for Mathematical Sciences ARIO / Sheini & Sakallah
Outline n n Problem formulation; applications Algorithmic components q q q n n Boolean solver Unit 2 -variable-per-inequality integer solver General-purpose ILP solver Solution strategies Related approaches Experimental evaluation Conclusions and future work 10/31/2021 ARIO / Sheini & Sakallah 2
Satisfiability Modulo Theories Conjunctive Normal Form (SMT-CNF) n Variables: q q n Atoms: q q q n n n Boolean: Integer: Boolean variable Integer UTVPI Integer constraint Literal: atom or negation of atom Clause: disjunction of literals Formula: conjunction of clauses 10/31/2021 ARIO / Sheini & Sakallah 3
SMT-CNF Given a SMT-CNF formula n n Find an assignment to all Boolean (and integer) variables such that OR prove that no such solution exists 10/31/2021 ARIO / Sheini & Sakallah 4
Satisfiability Modulo Theories n SMT is the problem of deciding (SMT) n the satisfiability of a quantifier-free formula in one or more first-order theories. Theories of interest are logics of: q Equality (E) Integer Unit-Two-Variable-Per-Inequality (UTVPI) (U) q Integer Linear Arithmetic (C) q 10/31/2021 ARIO / Sheini & Sakallah 5
Satisfiability Modulo Theories (SMT) n SMT formula 10/31/2021 ARIO / Sheini & Sakallah 6
Example SMT-CNF Instance 10/31/2021 ARIO / Sheini & Sakallah 7
Applications of SMT n Verification (SW, HW) q q n Model checking of timed automata Microprocessor verification Program verification Buffer over-run vulnerabilities Scheduling q q Temporal reasoning Job-shop scheduling 10/31/2021 ARIO / Sheini & Sakallah 8
Solution. Invoke Algorithm: Version 1 Solvers Sequentially n n Enumerate Boolean solutions Check consistency of implied integer constraints MIB-CNF Instance UNSAT Boolean Solver SAT UNSAT ILP Solver 10/31/2021 ARIO / Sheini & Sakallah SAT 9
Problem Decomposition: Indicator Variables 10/31/2021 ARIO / Sheini & Sakallah 10
Boolean Satisfiability n n DPLL-style search to find a solution to a Boolean CNF formula or to prove no such solution exists Major algorithmic advances in last decade q q q n Conflict analysis Clause recording (learning) Non-chronological backtracking Efficient BCP using watched literals Random restarts Adaptive decision heuristics (VSIDS, etc. ) Mini. SAT [N. Eén, N. Sörensson, “An Extensible SAT-solver” SAT’ 03] 10/31/2021 ARIO / Sheini & Sakallah 11
UTVPI Integer Constraint Solver Jaffar et al’s polynomial-time incremental algorithm n n Maintain a transitively-closed and tightened set of UTVPI constraints Generate and add all implied UTVPI constraints every time a new constraint is added 10/31/2021 ARIO / Sheini & Sakallah 12
UTVPI Algorithm Example 10/31/2021 ARIO / Sheini & Sakallah 13
Algorithm Version 1 Boolean Solver Formula 10/31/2021 Decision Tree ARIO / Sheini & Sakallah Implication Graph 14
Algorithm Version 1 UTVPI Solver Boolean Solution Formula and return to Boolean solver Add conflict clause 10/31/2021 ARIO / Sheini & Sakallah 15
Pros/Cons of Version 1 Algorithm n Pros q n Loose integration of Boolean and UTVPI/ILP solvers Cons q q Late detection of conflicts Inability to analyze UTVPI/ILP conflicts Possibility of enumerating several solutions that are inconsistent for the same reason Extra work if unsatisfiability is due to “logical constraints” 10/31/2021 ARIO / Sheini & Sakallah 16
Solution Algorithm: Version 2 n n Integrate UTVPI solver into the Boolean solver Check consistency of relevant integer constraints off-line with a generic ILP solver 10/31/2021 ARIO / Sheini & Sakallah 17
Algorithm Version 2 10/31/2021 ARIO / Sheini & Sakallah 18
Algorithm Version 2 10/31/2021 ARIO / Sheini & Sakallah 19
Solution Algorithm: Version 3 Conservatively abstract formula Replace equality with one-way implication Positive unate in all B variables 10/31/2021 ARIO / Sheini & Sakallah 20
Algorithm Version 3 10/31/2021 ARIO / Sheini & Sakallah 21
Final Version of Combined Algorithm n n Always: Enforce only one-way implication from indicator variable to its UTVPI constraint Sometimes: Enforce equality between indicator variable and its UTVPI constraint when computationally cheap 10/31/2021 ARIO / Sheini & Sakallah 22
Final Version on Example Formula 10/31/2021 ARIO / Sheini & Sakallah 23
Handling non-UTVPI Constraints Solution So far: UTVPI constraints sharing both variables with non. UTVPI constraints to Integer Programming Solver 10/31/2021 ARIO / Sheini & Sakallah UNSAT 24
Offline Learning: Cutting Planes NEW 10/31/2021 ARIO / Sheini & Sakallah 25
Learning on Example Formula 10/31/2021 ARIO / Sheini & Sakallah 26
Progressive Solving Scheme n Gradual Concretization of the Formula = Gradual Activation of Theory Solvers 10/31/2021 ARIO / Sheini & Sakallah 27
Implementation n n ARIO Satisfiability Modulo Theories (SMT) Solver written in C++ More info at: http: //www. eecs. umich. edu/~ario 10/31/2021 ARIO / Sheini & Sakallah 28
Strategy for Linking Theories Comparison to Other Methods n 1 io io rs e V equality X Ar T P conditional X L ML -C d -an h ch n ra M g i B B Lazy - DP X X al n i F io r A 3 X n o rsi e V io r A X X k ec M X ) T ( LL SA h t a io Ar on i s er 2 V X ID L UC X B & x/B le p Sim Tight Eager Strategy for Solving Theories 10/31/2021 ARIO / Sheini & Sakallah 29
Experimental Evaluation n n Wisconsin Safety Analysis (Wi. SA) Fischer's mutual exclusion protocol Math. SAT CIRC – Safety Checking of RTL Circuits 10/31/2021 ARIO / Sheini & Sakallah 30
Wisconsin Safety Analysis (Wi. SA) number of conflicts benchmark Number of iterations in Cutting with Cutting Planes no Cutting Planes total in UTVPI s-20 -20 1111 1057 6 10 84 s-20 -30 3172 3009 12 8 2066 s-20 -40 30611 30418 3 1 time-out s-30 -30 1500 1436 2 1 447 s-30 -40 7631 7281 29 11 273 xs-20 -20 877 811 11 17 160 xs-20 -30 396 388 3 1 318 xs-20 -40 748710 746239 3 1 time-out xs-30 -40 3739 3596 18 16 255 10/31/2021 ARIO / Sheini & Sakallah 31
Wisconsin Safety Analysis (Wi. SA) ARIO time UCLID time ICS time UTVPI non-UTVPI total s-20 -20 8. 78 0. 25 0. 17 0. 01 0. 26 s-20 -30 9. 50 0. 37 0. 32 0. 01 0. 61 s-20 -40 4. 50 286. 84 2. 77 0. 01 5. 05 s-30 -30 20. 89 1. 64 0. 28 0. 01 0. 45 s-30 -40 19. 21 7. 41 1. 21 0. 01 2. 06 xs-20 -20 26. 03 17. 77 0. 35 0. 02 0. 57 xs-20 -30 21. 42 1482. 80 0. 1 0. 01 0. 23 xs-20 -40 14. 18 >3600 173. 9 0. 01 276. 43 xs-30 -40 33. 22 >3600 1. 88 0. 06 3. 01 benchmark 10/31/2021 ARIO / Sheini & Sakallah 32
Fischer's Mutual Exclusion Protocol (Encoded for Math. SAT) 10/31/2021 ARIO / Sheini & Sakallah 33
Math. SAT CIRC Suite n Generated for Math. SAT, verifying properties for some simple circuits. *Copied from Math. SAT TACAS 2005 paper comparing accumulated time of CIRC benchmarks for Math. SAT, CVC and ICS 10/31/2021 ARIO / Sheini & Sakallah 34
RTCL - Safety Properties for RTL Circuits 10/31/2021 ARIO / Sheini & Sakallah 35
Conclusions and Future Work n n Judicious integration/”use” of solvers Boolean reasoning (constraint propagation, conflict analysis, nonchronological backtracking, etc. ) is key to scalability Incrementality is essential for performance Further benchmarking, tuning, competition? 10/31/2021 ARIO / Sheini & Sakallah 36
- Slides: 36