1 / 66

Boosting Minimal Unsatisfiable Core Extraction

Boosting Minimal Unsatisfiable Core Extraction. FMCAD’10 Conference Lugano , Switzerland October 23, 2010 . Alexander Nadel Intel, Israel. Agenda. Introduction and motivation New algorithms Generic scheme Resolution-based algorithm Selector-variable-based algorithm Related work

viveka
Download Presentation

Boosting Minimal Unsatisfiable Core Extraction

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. Boosting Minimal Unsatisfiable Core Extraction FMCAD’10 ConferenceLugano, Switzerland October 23, 2010 Alexander Nadel Intel, Israel

  2. Agenda • Introduction and motivation • New algorithms • Generic scheme • Resolution-based algorithm • Selector-variable-based algorithm • Related work • Experimental results • Conclusion

  3. Unsatisfiable Core Extraction • An unsatisfiable core (UC) is an unsatisfiable subset of an unsatisfiable set of constraints • An unsatisfiable core is minimal if removal of any constraint makes it satisfiable (localminima) • This work concentrates on minimal unsatisfiable core extraction for propositional logic

  4. Example Application 1: Proof-based Abstraction Refinement for Model Checking (McMillan et al., TACAS’03; Gupta et al., ICCAD’03) • The UNSAT core is used for refinement • The UNSAT core is required in terms of latches/gates Turn latches/ gates into free inputs Inputs: model M, property P Output: does P hold under M? Abstract model A  { } Model Check A A  A  latches/gates in the UNSAT core of BMC(M,P,k) Valid No Bug Cex C at depth k Spurious? BMC(M,P,k) Bug Yes No

  5. Example Application 2: Assumption Minimization for Compositional Formal Equivalence Checking (FEC)(Cohen et al., DVCon’10) • FEC verifies the equivalence between the design (RTL) and its implementation (schematics). • The whole design is too large to be verified at once. • FEC is done on small sub-blocks, restricted with assumptions. • Assumptionsrequired for the proof of equivalence of sub-blocks must be proved relative to the driving logic. • MUC extraction in terms of assumptionsis vitalfor feasibility. Inputs Outputs Assumption Assertion

  6. Traditional UC Extraction for Practical Needs: the Input The user is interested in a MUC in terms of these constraints The remainder (the rest of the formula) An interesting constraint

  7. Traditional UC Extraction: Example Input 1 Proof-based abstraction refinement The rest of the unrolled circuit An unrolled latch/gate

  8. Traditional UC Extraction: Example Input 1 Assumption minimization for FEC Equivalence between sub-block RTL and implementation An assumption

  9. Traditional UC Extraction:Stage 1: Translate to Clauses The remainder (the rest of the formula) An interesting constraint Each small square is a propositional clause, e.g. (a + b’)

  10. Traditional UC Extraction:Stage 2: Extract a Clause-Level UC The remainder (the rest of the formula) An interesting constraint Colored squares belong to the clause-level UC

  11. Traditional UC Extraction:Stage 3: Map the Clause-Level UC Back to the Interesting Constraints The remainder (the rest of the formula) An interesting constraint The UC contains three interesting constraints!

  12. Traditionally, a Clause-Level UC Extractor is the Workhorse • A CNF formula is a conjunction of clauses, e.g., (a)  (b)  (b + c)  (b’ + c)  (a’ + c’) • Clause-level UC extraction: given a CNF formula, extract an unsatisfiable subset of its clauses

  13. A Mismatch between Mainstream Research and the Needs of Real-World Applications • Real-world applications require reducing the number of interesting constraints in the core rather than clauses • Latches/gates for abstraction refinement • Assumptions for compositional FEC • The vast majority of existing algorithms for UC extraction are clause-level • 19/21 papers on UC extraction only consider clause-level UC extraction

  14. Small/Minimal Clause-Level UC  Small/Minimal High-Level UC A small clause-level UC, but the high-level UC is the largest possible: A large clause-level UC, but the high-level UC is empty:

  15. Contribution of this Work • This work introduces two highly scalable algorithms for extracting a single high-level minimalUC • These algorithms convincingly outperform the current state-of-the-art algorithms • The proposed algorithms outperform the state-of-the-art algorithms on large test-cases for clause-level MUC extraction • The algorithms can be used for only reducing the core when resources are limited

  16. Agenda • Introduction and motivation • New algorithms • Generic scheme • Resolution-based algorithm • Selector-variable-based algorithm • Related work • Experimental results • Conclusion

  17. High-Level UC Extraction • Given: • A set of interesting constraints  = {R1, R2 , …, Rm }, and • The remainder  • The set    is a high-level UC if    is unsatisfiable • Minimality is defined as usual (w.r.t set inclusion)

  18. A Bird's Eye View of the Algorithms • Both algorithms are composed of: • The approximation stage • Find a non-minimal high-level UC    • The main loop • For each interesting constraint R  , check if it belongs to the MUC. Remove superfluous constraints from  • In the end  is returned as the MUC • Both algorithms take advantage of incremental SAT solving

  19. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) Create an incremental SAT instance from the initial constraints  = {R1, …, Rm } and the remainder .

  20. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) MUC  {} MUC   will contain the MUC at the end of algorithm’s execution

  21. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) MUC  {} Cands ApproxMUC (S, , ) This function returns a non-minimal high-level UC. Cands  contains all the MUC candidates (that is, interesting constraints) whose status is not yet determined.

  22. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) MUC  {} Cands ApproxMUC (S, , ) RemoveForever (S,  \ Cands) This operation removes all the clauses dependent on  \ Candsfrom the SAT instance forever

  23. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) MUC  {} Cands ApproxMUC (S, , ) RemoveForever (S,  \ Cands) The approximation stage

  24. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) MUC  {} Cands ApproxMUC (S, , ) RemoveForever (S,  \ Cands) Candsis empty? Yes Return MUC The condition of the main loop of the algorithm. For each remaining MUC candidate, the loop will check if it belongs to the MUC.

  25. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) MUC  {} Cands ApproxMUC (S, , ) RemoveForever (S,  \ Cands) Candsis empty? Yes Return MUC No Pick Rk Cands ; Cands Cands\ {Rk} Pick the removal candidate for the current iteration

  26. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) MUC  {} Cands ApproxMUC (S, , ) RemoveForever (S,  \ Cands) Candsis empty? Yes Return MUC No Pick Rk Cands ; Cands Cands\ {Rk} ConditionallyRemove(S, Rk) This operation conditionally removes all the initial and conflict clauses dependent on Rkfrom the SAT instance in a way that guarantees that a potential return operation is easy

  27. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) MUC  {} Cands ApproxMUC (S, , ) RemoveForever (S,  \ Cands) Candsis empty? Yes Return MUC No Pick Rk Cands ; Cands Cands\ {Rk} ConditionallyRemove(S, Rk) Solve(S) Solve the current instance using a SAT solver

  28. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) MUC  {} Cands ApproxMUC (S, , ) RemoveForever (S,  \ Cands) Candsis empty? Yes Return MUC No Pick Rk Cands ; Cands Cands\ {Rk} ConditionallyRemove(S, Rk) Rkbelongs to the MUC. Return all the initial and conflict clauses dependent on Rk to the SAT instance. SAT Solve(S) ReturnToInstance(S, Rk} MUC  MUC  {Rk}

  29. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) Rkdoes not belong to the MUC. Remove all the initial and conflict clauses dependent on Rk and possibly other irrelevant interesting constraints from the SAT instance forever. MUC  {} Cands ApproxMUC (S, , ) RemoveForever (S,  \ Cands) Candsis empty? Yes Return MUC No Pick Rk Cands ; Cands Cands\ {Rk} ConditionallyRemove(S, Rk) SAT Solve(S) UNSAT RemoveForever(S, Other Irrelevant ICs) RemoveForever (S, Rk) ReturnToInstance(S, Rk} MUC  MUC  {Rk}

  30. The Skeleton of the New Algorithms S  CreateSATInst( = {R1, …, Rm }  ) MUC  {} Cands ApproxMUC (S, , ) RemoveForever (S,  \ Cands) Candsis empty? Yes Return MUC No Pick Rk Cands ; Cands Cands\ {Rk} ConditionallyRemove(S, Rk) SAT Solve(S) UNSAT RemoveForever(S, Other Irrelevant ICs) RemoveForever (S, Rk) ReturnToInstance(S, Rk} MUC  MUC  {Rk}

  31. 5 Operations for Implementing the Generic Scheme • Create a SAT instance • Approximate a MUC • Operations with interesting constraints: • Eternal removal • Conditional removal • Return

  32. Agenda • Introduction and motivation • New algorithms • Generic scheme • Resolution-based algorithm • Selector-variable-based algorithm • Related work • Experimental results • Conclusion

  33. Resolution Refutation • A modern SAT solver is able to generate a resolution refutation of a given formula • Generates little overhead on solver’s run-time • The cone of a clause or a set of clauses in a given resolution refutation is the set of all the reachable clauses

  34. A Resolution Refutation Example C8 =  Cone({C1, C2}) C7 = a’ C6 = c C5 = a’ + c’ C3 = a C4 = c C1 = b + c C2 = b’ + c Legend: Input clauses Derived clauses

  35. Implementing the Resolution-based Algorithm • We need to implement the following operations: • Create a SAT instance • Approximate a MUC • Operations with interesting constraints: • Eternal removal • Conditional removal • Return • The idea is to use cone manipulations

  36. Implementing the Resolution-based Algorithm • Create a SAT instance • Approximate a MUC • Operations with interesting constraints: • Eternal removal • Conditional removal • Return

  37. Creating a SAT Instance for the Resolution-based Algorithm • Use the standard Tseitin encoding • The constraints are translated to mutually disjoint sets of clauses

  38. Implementing the Resolution-based Algorithm • Create a SAT instance • Approximate a MUC • Operations with interesting constraints: • Eternal removal • Conditional removal • Return

  39. Approximating a MUC for the Resolution-based Algorithm • Invoke the SAT solver with a resolution refutation generator • An interesting constraint belongs to the set of MUC candidates iff its cone contains  • The cone of an interesting constraint is the cone of the associated clauses

  40. Implementing the Resolution-based Algorithm • Create a SAT instance • Approximate a MUC • Operations with interesting constraints: • Eternal removal • Conditional removal • Return

  41. Operations with Interesting Constraints for the Resolution-based Algorithm • Eternal removal • Remove the cone of the interesting constraint • Conditional removal • Make the cone of the interesting constraint invisible for BCP and clause-based heuristics • Remove the clauses from the watch lists • Let clause-based heuristic to skip the clauses • Return • Undo the conditional removal

  42. Agenda • Introduction and motivation • New algorithms • Generic scheme • Resolution-based algorithm • Selector-variable-based algorithm • Related work • Experimental results • Conclusion

  43. Selector Variable-based High-Level Minimal UC Extraction • The underlying idea: • For each Ri allocate a new selector variablesi • Add the literal si’ to Ri’s clauses • Use the selector literals to turn (cones of) interesting constraints on and off • Any clause in the cone of Riwill include si’ cone manipulations are possible without the need to store the resolution derivation!

  44. Selector Variable-based High-Level Minimal UC Extraction • We use the feature of SAT solving under assumptions • N. Een et al., SAT’03 • The solver receives a set of assumptions{s1, …, sm} along with the CNF formula F • It returns SAT iff F in conjunction with all the assumptions is satisfiable • If the answer is UNSAT, the solver can return the set of assumptionsrequired for the refutation • N. Een et al., FMCAD’10: presented today • A very cheap algorithm

  45. Implementing the Selector Variable-based Algorithm • Create a SAT instance • Approximate a MUC • Operations with interesting constraints: • Eternal removal • Conditional removal • Return

  46. Implementing the Selector Variable-based Algorithm • Create a SAT instance • Approximate a MUC • Operations with interesting constraints: • Eternal removal • Conditional removal • Return

  47. SAT Instance Creation for the Selector Variable-based Method • Each Ri  = {R1, R2 , …, Rm } is translated as follows: • Generate a set of clauses Clss(Ri) using Tseitin encoding • Introduce a fresh selector variable si • Add the literal si’ to each clause of Clss(Ri) • The remainder is translated to clauses using Tseitin encoding

  48. Implementing the Selector Variable-based Algorithm • Create a SAT instance • Approximate a MUC • Operations with interesting constraints: • Eternal removal • Conditional removal • Return

  49. The Approximation Stage of the Selector-Variable-based Method • Invoke the SAT solver under the assumptions {s1, …, sm} • Keep (as MUC candidates) all the interesting constraints whose corresponding assumptionsare required for the proof

  50. Implementing the Selector-Variable-based Algorithm • Create a SAT instance • Approximate a MUC • Operations with interesting constraints: • Eternal removal • Conditional removal • Return

More Related