Parallel MUS Extraction Anton Belov 1 , Norbert Manthey 2 , and Joao Marques-Silva 1 , 3 1 Complex and Adaptive Systems Laboratory, University College Dublin, Ireland 2 Institute of Artificial Intelligence, Technische Universit¨ at Dresden, Germany 3 IST/INESC-ID, Lisbon, Portugal SAT 2013 July 10, 2013 Helsinki, Finland A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 1
Minimal Unsatisfiable Subformulas (MUSes) C 1 C 2 C 3 C 4 C 5 C 6 ( p ) ( q ) ( ¬ p ∨ ¬ q ) ( ¬ p ∨ r ) ( p ∨ q ) ( ¬ q ∨ ¬ r ) M = { C 1 , C 2 , C 3 } is UNSAT A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 2
Minimal Unsatisfiable Subformulas (MUSes) C 1 C 2 C 3 C 4 C 5 C 6 ( p ) ( q ) ( ¬ p ∨ ¬ q ) ( ¬ p ∨ r ) ( p ∨ q ) ( ¬ q ∨ ¬ r ) M = { C 1 , C 2 , C 3 } is UNSAT, and ∀ C ∈ M , M \ { C } is SAT. A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 2
Minimal Unsatisfiable Subformulas (MUSes) C 1 C 2 C 3 C 4 C 5 C 6 ( p ) ( q ) ( ¬ p ∨ ¬ q ) ( ¬ p ∨ r ) ( p ∨ q ) ( ¬ q ∨ ¬ r ) M = { C 1 , C 2 , C 3 } is minimal unsatisfiable (MU) . A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 2
Minimal Unsatisfiable Subformulas (MUSes) C 1 C 2 C 3 C 4 C 5 C 6 ( p ) ( q ) ( ¬ p ∨ ¬ q ) ( ¬ p ∨ r ) ( p ∨ q ) ( ¬ q ∨ ¬ r ) M = { C 1 , C 2 , C 3 } is minimal unsatisfiable (MU) . F = { C 1 , . . . , C 6 } is UNSAT, but not MU. A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 2
Minimal Unsatisfiable Subformulas (MUSes) C 1 C 2 C 3 C 4 C 5 C 6 ( p ) ( q ) ( ¬ p ∨ ¬ q ) ( ¬ p ∨ r ) ( p ∨ q ) ( ¬ q ∨ ¬ r ) M = { C 1 , C 2 , C 3 } is minimal unsatisfiable (MU) . F = { C 1 , . . . , C 6 } is UNSAT, but not MU. M is a minimal unsatisfiable subformula (MUS) of F . A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 2
Minimal Unsatisfiable Subformulas (MUSes) C 1 C 2 C 3 C 4 C 5 C 6 ( p ) ( q ) ( ¬ p ∨ ¬ q ) ( ¬ p ∨ r ) ( p ∨ q ) ( ¬ q ∨ ¬ r ) M = { C 1 , C 2 , C 3 } is minimal unsatisfiable (MU) . F = { C 1 , . . . , C 6 } is UNSAT, but not MU. M is a minimal unsatisfiable subformula (MUS) of F . Applications Identification and repair of sources of inconsistency: - circuit error diagnosis; error localization in product configuration Identification of important/relevant features of systems: - automatic abstraction in model checking - environmental assumptions in formal equivalence checking Complexity Decision: D P -complete. Function: ∈ FP NP A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 2
MUS Extraction Based on detection of necessary (or, transition ) clauses: ◮ C ∈ F is necessary for F if F ∈ UNSAT and F \ { C } ∈ SAT. ◮ If C is necessary for F , then C is in every MUS of F . A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 3
MUS Extraction Based on detection of necessary (or, transition ) clauses: ◮ C ∈ F is necessary for F if F ∈ UNSAT and F \ { C } ∈ SAT. ◮ If C is necessary for F , then C is in every MUS of F . Input �→ Output : F ∈ UNSAT �→ M ∈ MUS( F ) � F w , M � ← � F , ∅� // Working formula, MUS under-approx. while M � = F w do M ⊆ F , and ∀ C ∈ M is nec. for F w // Inv: C ← PickClause ( F w ) st = SAT ( F w \ { C } ) // Test if C is nec. for F w if st = true then // If SAT, C is nec. for F w M ← M ∪ { C } RMR ( F w , M , τ ) // Model rotation: find more nec. clauses else F w ← F w \ { C } return M // M ∈ MUS( F ) ◮ Hybrid MUS extraction algorithm [Marques-Silva&Lynce’11] A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 3
MUS Extraction Based on detection of necessary (or, transition ) clauses: ◮ C ∈ F is necessary for F if F ∈ UNSAT and F \ { C } ∈ SAT. ◮ If C is necessary for F , then C is in every MUS of F . Input �→ Output : F ∈ UNSAT �→ M ∈ MUS( F ) � F w , M � ← � F , ∅� // Working formula, MUS under-approx. while M � = F w do M ⊆ F , and ∀ C ∈ M is nec. for F w // Inv: C ← PickClause ( F w ) (st , U , τ ) = SAT ( F w \ { C } ) // U - unsat. core, τ - model if st = true then // If SAT, C is nec. for F w M ← M ∪ { C } RMR ( F w , M , τ ) // Model rotation: find more nec. clauses else F w ← U // Clause-set refinement: discard non-core clauses return M // M ∈ MUS( F ) ◮ Hybrid MUS extraction algorithm [Marques-Silva&Lynce’11] A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 3
MUS Extraction: opportunities for parallelization Input �→ Output : F ∈ UNSAT �→ M ∈ MUS( F ) � F w , M � ← � F , ∅� // Working formula, MUS under-approx. while M � = F w do M ⊆ F , and ∀ C ∈ M is nec. for F w // Inv: C ← PickClause ( F w ) (st , U , τ ) = SAT ( F w \ { C } ) // U - unsat. core, τ - model if st = true then // If SAT, C is nec. for F w M ← M ∪ { C } RMR ( F w , M , τ ) // Model rotation: find more nec. clauses else F w ← U // Clause-set refinement: discard non-core clauses return M // M ∈ MUS( F ) ◮ Hybrid MUS extraction algorithm [Marques-Silva&Lynce’11] A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 4
MUS Extraction: opportunities for parallelization 1. Parallelize each SAT call Input �→ Output : F ∈ UNSAT �→ M ∈ MUS( F ) � F w , M � ← � F , ∅� // Working formula, MUS under-approx. while M � = F w do M ⊆ F , and ∀ C ∈ M is nec. for F w // Inv: C ← PickClause ( F w ) (st , U , τ ) = SAT ( F w \ { C } ) // U - unsat. core, τ - model if st = true then // If SAT, C is nec. for F w M ← M ∪ { C } RMR ( F w , M , τ ) // Model rotation: find more nec. clauses else F w ← U // Clause-set refinement: discard non-core clauses return M // M ∈ MUS( F ) ◮ Hybrid MUS extraction algorithm [Marques-Silva&Lynce’11] A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 4
MUS Extraction: opportunities for parallelization 1. Parallelize each SAT call 2. Parallelize the main loop, i.e. test multiple clauses Input �→ Output : F ∈ UNSAT �→ M ∈ MUS( F ) � F w , M � ← � F , ∅� // Working formula, MUS under-approx. while M � = F w do M ⊆ F , and ∀ C ∈ M is nec. for F w // Inv: C ← PickClause ( F w ) (st , U , τ ) = SAT ( F w \ { C } ) // U - unsat. core, τ - model if st = true then // If SAT, C is nec. for F w M ← M ∪ { C } RMR ( F w , M , τ ) // Model rotation: find more nec. clauses else F w ← U // Clause-set refinement: discard non-core clauses return M // M ∈ MUS( F ) ◮ Hybrid MUS extraction algorithm [Marques-Silva&Lynce’11] A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 4
MUS Extraction: opportunities for parallelization 1. Parallelize each SAT call 2. Parallelize the main loop, i.e. test multiple clauses 3. Parallel portfolio of MUS extractors Input �→ Output : F ∈ UNSAT �→ M ∈ MUS( F ) � F w , M � ← � F , ∅� // Working formula, MUS under-approx. while M � = F w do M ⊆ F , and ∀ C ∈ M is nec. for F w // Inv: C ← PickClause ( F w ) (st , U , τ ) = SAT ( F w \ { C } ) // U - unsat. core, τ - model if st = true then // If SAT, C is nec. for F w M ← M ∪ { C } RMR ( F w , M , τ ) // Model rotation: find more nec. clauses else F w ← U // Clause-set refinement: discard non-core clauses return M // M ∈ MUS( F ) ◮ Hybrid MUS extraction algorithm [Marques-Silva&Lynce’11] A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 4
MUS Extraction: opportunities for parallelization 1. Parallelize each SAT call 2. Parallelize the main loop, i.e. test multiple clauses ← this talk/paper 3. Parallel portfolio of MUS extractors Input �→ Output : F ∈ UNSAT �→ M ∈ MUS( F ) � F w , M � ← � F , ∅� // Working formula, MUS under-approx. while M � = F w do M ⊆ F , and ∀ C ∈ M is nec. for F w // Inv: C ← PickClause ( F w ) (st , U , τ ) = SAT ( F w \ { C } ) // U - unsat. core, τ - model if st = true then // If SAT, C is nec. for F w M ← M ∪ { C } RMR ( F w , M , τ ) // Model rotation: find more nec. clauses else F w ← U // Clause-set refinement: discard non-core clauses return M // M ∈ MUS( F ) ◮ Hybrid MUS extraction algorithm [Marques-Silva&Lynce’11] A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 4
Parallelizing the main loop � F w , M � ← � F , ∅� // Working formula, MUS under-approx. while M � = F w do { C 1 , C 2 } ← PickClauses ( F w ) (st 1 , U 1 , τ 1 ) = SAT ( F w \ { C 1 } ) || (st 2 , U 2 , τ 2 ) = SAT ( F w \ { C 2 } ) sleepUntilFinished () // Wait for both threads to finish if st 1 = true and st 2 = true then M ← M ∪ { C 1 , C 2 } RMR ( F w , M , τ 1 ) ; RMR ( F w , M , τ 2 ) else if st 1 = true and st 2 = false then M ← M ∪ { C 1 } RMR ( F w , M , τ 1 ) ; F w ← U 2 else if st 1 = false and st 2 = true then M ← M ∪ { C 2 } RMR ( F w , M , τ 2 ) ; F w ← U 1 else F w ← PickCore ( U 1 , U 2 ) // Pick one of the cores return M // M ∈ MUS( F ) A. Belov, N. Manthey, J. Marques-Silva Parallel MUS Extraction SAT 2013 # 5
Recommend
More recommend