muser2 an efficient mus extractor
play

MUSer2: An Efficient MUS Extractor SYSTEM DESCRIPTION Anton Belov - PowerPoint PPT Presentation

MUSer2: An Efficient MUS Extractor SYSTEM DESCRIPTION Anton Belov and Joao Marques-Silva Complex and Adaptive Systems Laboratory University College Dublin, Ireland PoS 2012 June 16, 2012 Trento, Italy A. Belov and J. Marques-Silva MUSer2


  1. MUSer2: An Efficient MUS Extractor SYSTEM DESCRIPTION Anton Belov and Joao Marques-Silva Complex and Adaptive Systems Laboratory University College Dublin, Ireland PoS 2012 June 16, 2012 Trento, Italy A. Belov and J. Marques-Silva MUSer2 PoS 2012 1 / 17

  2. Introduction Minimal Unsatisfiability ◮ F is minimally unsatisfiable ( F ∈ MU), if F ∈ UNSAT and for any C ∈ F , F \ { C } ∈ SAT. A. Belov and J. Marques-Silva MUSer2 PoS 2012 2 / 17

  3. Introduction Minimal Unsatisfiability ◮ F is minimally unsatisfiable ( F ∈ MU), if F ∈ UNSAT and for any C ∈ F , F \ { C } ∈ SAT. ◮ F ′ is minimally unsatisfiable subformula (MUS) of F ( F ′ ∈ MUS( F )) if F ′ ⊆ F and F ′ ∈ MU. A. Belov and J. Marques-Silva MUSer2 PoS 2012 2 / 17

  4. Introduction Minimal Unsatisfiability ◮ F is minimally unsatisfiable ( F ∈ MU), if F ∈ UNSAT and for any C ∈ F , F \ { C } ∈ SAT. ◮ F ′ is minimally unsatisfiable subformula (MUS) of F ( F ′ ∈ MUS( F )) if F ′ ⊆ F and F ′ ∈ MU. Example C 1 = x ∨ y C 3 = x ∨ ¬ y C 5 = y ∨ z C 2 = ¬ x ∨ y C 4 = ¬ x ∨ ¬ y C 6 = y ∨ ¬ z ◮ { C 1 , C 2 , C 3 , C 4 } ∈ MU. A. Belov and J. Marques-Silva MUSer2 PoS 2012 2 / 17

  5. Introduction Minimal Unsatisfiability ◮ F is minimally unsatisfiable ( F ∈ MU), if F ∈ UNSAT and for any C ∈ F , F \ { C } ∈ SAT. ◮ F ′ is minimally unsatisfiable subformula (MUS) of F ( F ′ ∈ MUS( F )) if F ′ ⊆ F and F ′ ∈ MU. Example C 1 = x ∨ y C 3 = x ∨ ¬ y C 5 = y ∨ z C 2 = ¬ x ∨ y C 4 = ¬ x ∨ ¬ y C 6 = y ∨ ¬ z ◮ { C 1 , C 2 , C 3 , C 4 } ∈ MU. ◮ F = { C 1 , . . . , C 6 } ∈ UNSAT, but / ∈ MU. A. Belov and J. Marques-Silva MUSer2 PoS 2012 2 / 17

  6. Introduction Minimal Unsatisfiability ◮ F is minimally unsatisfiable ( F ∈ MU), if F ∈ UNSAT and for any C ∈ F , F \ { C } ∈ SAT. ◮ F ′ is minimally unsatisfiable subformula (MUS) of F ( F ′ ∈ MUS( F )) if F ′ ⊆ F and F ′ ∈ MU. Example C 1 = x ∨ y C 3 = x ∨ ¬ y C 5 = y ∨ z C 2 = ¬ x ∨ y C 4 = ¬ x ∨ ¬ y C 6 = y ∨ ¬ z ◮ { C 1 , C 2 , C 3 , C 4 } ∈ MU. ◮ { C 1 , C 2 , C 3 , C 4 } ∈ MUS( F ). A. Belov and J. Marques-Silva MUSer2 PoS 2012 2 / 17

  7. Introduction Minimal Unsatisfiability ◮ F is minimally unsatisfiable ( F ∈ MU), if F ∈ UNSAT and for any C ∈ F , F \ { C } ∈ SAT. ◮ F ′ is minimally unsatisfiable subformula (MUS) of F ( F ′ ∈ MUS( F )) if F ′ ⊆ F and F ′ ∈ MU. Example C 1 = x ∨ y C 3 = x ∨ ¬ y C 5 = y ∨ z C 2 = ¬ x ∨ y C 4 = ¬ x ∨ ¬ y C 6 = y ∨ ¬ z ◮ { C 1 , C 2 , C 3 , C 4 } ∈ MU. ◮ { C 3 , C 4 , C 5 , C 6 } ∈ MUS( F ). A. Belov and J. Marques-Silva MUSer2 PoS 2012 2 / 17

  8. Introduction Minimal Unsatisfiability ◮ F is minimally unsatisfiable ( F ∈ MU), if F ∈ UNSAT and for any C ∈ F , F \ { C } ∈ SAT. ◮ F ′ is minimally unsatisfiable subformula (MUS) of F ( F ′ ∈ MUS( F )) if F ′ ⊆ F and F ′ ∈ MU. Applications of MUSes ◮ Early 2000’s: type debugging in programming languages; circuit error diagnosis; error localization in automotive product configuration data. ◮ More recently: model checking (proof-based abstraction refinement); formal equivalence checking; logic synthesis. A. Belov and J. Marques-Silva MUSer2 PoS 2012 2 / 17

  9. Computation of MUSes ◮ Based on detection of necessary (or, transition ) clauses ◮ C ∈ F is necessary for F if F ∈ UNSAT and F \ { C } ∈ SAT. ◮ The set of all necessary clauses of F is precisely � MUS( F ). ◮ F ∈ MU if and only if every C ∈ F is necessary for F . ◮ If C is necessary for F , C is necessary for any UNSAT subset of F . ◮ Iterative calls to SAT solver. Main approaches: ◮ Deletion-based: necessary clauses are detected on transition from UNSAT to SAT. Unnecessary clauses are removed from the formula. Maintain over-approximation of an MUS. ◮ Insertion-based: necessary clauses are detected on transition from SAT to UNSAT. Maintain under-approximation of an MUS. ◮ Dichotomic: binary search. ◮ SAT solving is the main bottleneck of the computation, hence reduction in the number of SAT solver calls, and making SAT solver calls easier is the key to efficiency. A. Belov and J. Marques-Silva MUSer2 PoS 2012 3 / 17

  10. MUSer2 features ◮ Algorithms: ◮ Hybrid algorithm (default): deletion-based, but builds MUSes bottom-up . ◮ Insertion-based ( -ins ) ◮ Dichotomic ( -dich ) ◮ Optimizations: ◮ Clause-set refinement (default) and trimming ( [-trim|-tfp|-tpcrt] ) ◮ Recursive model rotation (default) ◮ (Adaptive) redundancy removal ( [-rr|-rra] ) ◮ Control/heuristics for clause ordering ( -order ) ◮ Testing of computed MUSes ( -test ) ◮ SAT solvers are used in a black-box manner; can use various SAT solvers ( -minisat|-picosat ) ◮ Software eng.: C++11 , designed for extensibility/experimentation. ◮ Licensing: source – GPLv3; binaries (incl. extra/experimental features) – free for academic use. A. Belov and J. Marques-Silva MUSer2 PoS 2012 4 / 17

  11. Hybrid MUS Extraction [Marques-Silva&Lynce’11] w/o optimizations Input : Unsatisfiable CNF Formula F Output : M ∈ MUS( F ) F ′ ← F // Working CNF formula M ← ∅ // MUS under-approximation while F ′ � = ∅ do M ⊆ F , and ∀ C ∈ M is nec. for M ∪ F ′ // Inv: C ← PickClause ( F ′ ) st = SAT ( M ∪ ( F ′ \ { C } )) // Redundancy removal if st = true then // If SAT, C is necessary for M ∪ F ′ M ← M ∪ { C } RMR ( F ′ ∪ M , M , τ ) // Recursive model rotation else F ′ ← F ′ \ { C } // Clause-set refinement return M // M ∈ MUS( F ) ◮ MUSer2 options: default; [-ins|-dich] to change. A. Belov and J. Marques-Silva MUSer2 PoS 2012 5 / 17

  12. Optimizations: clause-set refinement/trimming ◮ Fact: Every unsatisfiable formula contains at least one MUS. ◮ Hence, if U is an unsatisfiable core of F , all clauses outside of U can be removed from F . ◮ Relies on the capability of SAT solvers to return unsatisfiable core. ◮ Effect: remove multiple unnecessary clauses at once. ◮ Applied to the working formula inside the main loop (e.g. M ∪ F ′ in the Hybrid algorithm) — clause-set refinement . Default in MUSer2 . ◮ Applied to the input formula prior to MUS extraction — clause-set trimming . ◮ Until fix point: MUSer2 option -tfp ◮ A fixed number of times: MUSer2 option -trim N ◮ Until size change is bounded: MUSer2 option -tpcrt P A. Belov and J. Marques-Silva MUSer2 PoS 2012 6 / 17

  13. Hybrid MUS Extraction [Marques-Silva&Lynce’11] : clause-set refinement Input : Unsatisfiable CNF Formula F Output : M ∈ MUS( F ) F ′ ← F // Working CNF formula M ← ∅ // MUS under-approximation while F ′ � = ∅ do M ⊆ F , and ∀ C ∈ M is nec. for M ∪ F ′ // Inv: C ← PickClause ( F ′ ) st = SAT ( M ∪ ( F ′ \ { C } )) // Redundancy removal if st = true then // If SAT, C is necessary for M ∪ F ′ M ← M ∪ { C } RMR ( F ′ ∪ M , M , τ ) // Recursive model rotation else F ′ ← F ′ \ { C } // Clause-set refinement return M // M ∈ MUS( F ) A. Belov and J. Marques-Silva MUSer2 PoS 2012 7 / 17

  14. Hybrid MUS Extraction [Marques-Silva&Lynce’11] : clause-set refinement Input : Unsatisfiable CNF Formula F Output : M ∈ MUS( F ) F ′ ← F // Working CNF formula M ← ∅ // MUS under-approximation while F ′ � = ∅ do M ⊆ F , and ∀ C ∈ M is nec. for M ∪ F ′ // Inv: C ← PickClause ( F ′ ) (st , U ) = SAT ( M ∪ ( F ′ \ { C } )) // Redundancy removal if st = true then // If SAT, C is necessary for M ∪ F ′ M ← M ∪ { C } RMR ( F ′ ∪ M , M , τ ) // Recursive model rotation else F ′ ← U \ M // Clause-set refinement return M // M ∈ MUS( F ) ◮ MUSer2 options: default; -norf to disable. A. Belov and J. Marques-Silva MUSer2 PoS 2012 7 / 17

  15. Impact of clause-set refinement ◮ 295 benchmarks from track of SAT Competition 2011. ◮ Time limit 1800 sec, memory limit 4 GB. ◮ HYB, no optimizations (#sol=132) vs refinement only (#sol=221) ◮ Left: number of SAT solver calls. Right: CPU time (sec). ◮ Color: MUS size (% of input size). A. Belov and J. Marques-Silva MUSer2 PoS 2012 8 / 17

  16. Optimizations: recursive model rotation (RMR) ◮ Fact: C is necessary for F iff F ∈ UNSAT and ∃ τ such that Unsat ( F , τ ) = { C } . τ is a witness (of necessity) for C . ◮ During (hybrid) MUS extraction: when M ∪ ( F ′ \ { C } ) ∈ SAT , the assignment τ found by the SAT solver is a witness for C . ◮ Witnesses are also available in other algorithms for MUS extraction. ◮ Model rotation [Marques-Silva&Lynce’11] : given a witness τ for C , try to modify it into a witness τ ′ for another clause C ′ : take x ∈ Var ( C ), let τ ′ = τ | ¬ x , if Unsat ( F , τ ′ ) = { C ′ } , then C ′ is necessary; continue with C ′ and τ ′ . ◮ Recursive model rotation [Belov&Marques-Silva’11] : for each necessary clause explore all possible flips (recursively). ◮ Effect: detect multiple necessary clauses in a single SAT solver call. ◮ Default in MUSer2 . A. Belov and J. Marques-Silva MUSer2 PoS 2012 9 / 17

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend