1 / 45

E fficient SAT S olving u nder A ssumptions

E fficient SAT S olving u nder A ssumptions. Alexander Nadel 1 and Vadim Ryvchin 1,2 1 – Intel, Haifa, Israel 2 – Technion, Haifa, Israel. SAT’12, Trento, Italy. Motivation: Real-Life Experience at Intel.

nansen
Download Presentation

E fficient SAT S olving u nder A ssumptions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EfficientSAT Solving under Assumptions Alexander Nadel1 and Vadim Ryvchin1,2 1 – Intel, Haifa, Israel 2 – Technion, Haifa, Israel SAT’12, Trento, Italy

  2. Motivation: Real-Life Experience at Intel • Critical non-incremental property unsolved in 48 hours by the SAT solverduring 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

  3. Basic Definitions Input: {} • –formula in CNF form • = {} – set of assumptions • – aliteral(unit clause) • Invocation decides the satisfiability of:

  4. Recall: Clause Database Simplification • Propagation of unit clauses • Elimination of satisfied clauses • Removal of falsified literals from clauses • Used in leading SAT solvers • Compliant with incremental solving

  5. Recall: SatELite Preprocessing • Variable Elimination • Subsumption • Self-subsuming resolution • Used in leading SAT solvers • Non-Compliantwith incremental solving

  6. 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

  7. Literal-based Single instance (LS) • Create instance • For each incremental call do • Run solver over • The same instance of the solver is reused

  8. Clause-based Multiple instances (CM) • For each incremental call do • Create new instance • Where the set Ai comprise the temporary clauses • Add pervasive conflict clauses to the instance • Pervasive clauses: conflict clauses generated during previous invocation that do not depend on • Solve • A new solver instance is created each time

  9. Temporary vs. Pervasive C22 C23=() C21 C17 C19 C20 C18 C16 C15 C11 C14 C13 C10 C12 C2 C4 C5 C8 C9 C1 C3 C6 C7 Temporary input clauses Legend: Input clauses Derived clauses

  10. Temporary vs. Pervasive C22 C23=() C21 C17 C19 C20 C18 C16 C15 C11 C14 C13 C10 C12 C2 C4 C5 C8 C9 C1 C3 C6 C7 Temporary input clauses Temporary conflict clauses Legend: Input clauses Derived clauses

  11. Temporary vs. Pervasive C22 C23=() C21 C17 C19 C20 C18 C16 C15 C11 C14 C13 C10 C12 C2 C4 C5 C8 C9 C1 C3 C6 C7 Temporary input clauses Temporary conflict clauses Legend: Input clauses Pervasive conflict clauses

  12. 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

  13. The problem: How to Propagate Assumptions with SatELite in Incremental SAT? • Our experience showed that propagating assumptions with SatELite is vital • SatELitecould 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

  14. Outline of Our Work • Enabling assumption propagation with SatELite for incremental SAT by making SatELiteand CM compliant • Much simpler than doing the same for LS • 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.

  15. Make SatELite Compliant with CM • SatELite over temporary clauses: • Variable elimination / Self-subsuming resolution : • new clause is marked as temporaryiffor is temporary • Subsumption: • no change

  16. Improve Learning Efficiency • The problem: • Our algorithm propagates assumptions with SatELite, but: • Conflict clause learning is still more efficient for LS, since: • All the conflict clauses are pervasive for LS • Some conflict clauses are temporary for CM • Solution: transform temporary conflict clauses to pervasive after CM’s invocation

  17. 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

  18. Transform Temporary to Pervasive – T2P α11= α10=c α7=c v d α8=¬d α9=¬c α1=a α2=b α3=¬a v c v d α4=¬b v ¬d α5=¬c v e α6=¬c v ¬e Assumptions Temporary conflict clauses Legend: Input clauses Pervasive conflict clauses

  19. Transform Temporary to Pervasive – T2P α11= α10=c α7=c v d α8=¬d α9=¬c ¬a α1=a α2=b α3=¬a v c v d α4=¬b v ¬d α5=¬c v e α6=¬c v ¬e Assumptions Temporary conflict clauses Legend: Input clauses Pervasive conflict clauses

  20. Transform Temporary to Pervasive – T2P α11= α10=c α7=¬a v c v d α8=¬d α9=¬c α2=b α3=¬a v c v d α4=¬b v ¬d α5=¬c v e α6=¬c v ¬e ¬b Assumptions Temporary conflict clauses Legend: Input clauses Pervasive conflict clauses

  21. Transform Temporary to Pervasive – T2P α11= α10=c ¬a ¬b α7=¬a v c v d α8=¬b v ¬d α9=¬c α3=¬a v c v d α4=¬b v ¬d α5=¬c v e α6=¬c v ¬e Assumptions Temporary conflict clauses Legend: Input clauses Pervasive conflict clauses

  22. 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 α9=¬c α3=¬a v c v d α4=¬b v ¬d α5=¬c v e α6=¬c v ¬e Assumptions Temporary conflict clauses Legend: Input clauses Pervasive conflict clauses

  23. Transform Temporary to Pervasive – T2P α11= α10=¬a v ¬b v c α7=¬a v c v d α8=¬b v ¬d α9=¬c α3=¬a v c v d α4=¬b v ¬d α5=¬c v e α6=¬c v ¬e Assumptions Temporary conflict clauses Legend: Input clauses Pervasive conflict clauses

  24. Transform Temporary to Pervasive – T2P α11= α10=¬a v ¬b v c α9=¬c α3=¬a v c v d α4=¬b v ¬d α5=¬c v e α6=¬c v ¬e Assumptions Temporary conflict clauses Legend: Input clauses Pervasive conflict clauses

  25. 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

  26. Step Look-Ahead F1 A1 F2 A2 … FkAk Essential conditions for applying step look-ahead: Step (window) 1: • – available at invocation 1 - equisatisfiability Step (window) i>1: similar Fk+1 Ak+1 Fk+2 Ak+2 … Fk+kAk+k Fj*k+1 Aj*k+1 Fj*k+2Aj*k+2 … Fj*k+kAj*k+k

  27. 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

  28. LSS – Window 2 F1 A1 F2 A2 F3 A3 • For j=4..6 • Solve(,) F4 A4 F5 A5 F6 A6 Fj*k+1 Aj*k+1 Fj*k+2Aj*k+2 … Fj*k+kAj*k+k

  29. Our Algorithm: CLMS F1 A1 F2 A2 … FkAk CLMS: Multiple instances Clause/Literal-based with Step look-ahead • CLMSinvokes the SAT solver for each window k times over a single SAT instance Solve(, , ): • Solve formula • Using temporal clauses • Under assumptions Fk+1 Ak+1 Fk+2 Ak+2 … Fk+kAk+k Fj*k+1 Aj*k+1 Fj*k+2Aj*k+2 … Fj*k+kAj*k+k

  30. Our Algorithm: CLMS – Window 1 F1 A1 F2 A2 F3 A3 • Create Instance • (temporary clauses) • Optionally: • Freeze • Apply SatELiteto • For j=1..3 do • Solve(,,) • Optionally: Transform temporary to pervasive • Store pervasive in • Delete Instance F4 A4 F5 A5 F6 A6 Fj*k+1 Aj*k+1 Fj*k+2Aj*k+2 … Fj*k+kAj*k+k

  31. Our Algorithm: CLMS – Window 2 F1 A1 F2 A2 F3 A3 • Create Instance • (temporary clauses) • Optionally: • Freeze • Apply SatELiteto • For j=4..6 do • Solve(,,) • Optionally: Transform temporary to pervasive • Store pervasive in • Delete Instance F4 A4 F5 A5 F6 A6 Fj*k+1 Aj*k+1 Fj*k+2Aj*k+2 … Fj*k+kAj*k+k

  32. Experimental Results • Benchmark Set: • Instances generated by incremental BMC under assumptions • 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

  33. Variables To Assumptions Ratio

  34. Unsatisfiable Instances State-of-the-art LS

  35. Unsatisfiable Instances State-of-the-art CM

  36. Unsatisfiable Instances 2nd: SatELite with temporary clauses + CLMS step 10 + T2PThr. 100

  37. Unsatisfiable Instances Winner: SatELite with temporary clauses + CLMS step 50; No T2P

  38. 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

  39. Satisfiable Instances State-of-the-art CM

  40. Satisfiable Instances SatELite with temporary clauses + CLMS step 50; No T2P

  41. Satisfiable Instances 2nd: State-of-the-art LS

  42. Satisfiable Instances Winner: SatELite with temporary clauses + CLMS step 10 + T2PThr. 100

  43. 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

  44. 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.

  45. Thank You!

More Related