extensions and generalizations of minimal unsatisfiability
play

Extensions and Generalizations of Minimal Unsatisfiability Anton - PowerPoint PPT Presentation

Extensions and Generalizations of Minimal Unsatisfiability Anton Belov Complex and Adaptive Systems Laboratory School of Computer Science and Informatics University College Dublin, Ireland EPCL Basic Training Camp December 10-21, 2012


  1. Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10] F = G 1 ∪ G 2 ∪ G 3 ∈ UNSAT — partitioned into groups (sets) of clauses G 1 = { C 1 , C 2 } , G 2 = { C 3 , C 4 } , G 3 = { C 5 , C 6 } . C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) C 2 = ( q ) {G 1 , G 2 } is a subset-minimal set of groups sufficient to refute F . {G 1 , G 2 } is a group-MUS of (the partitioned) F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 5

  2. Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10] F = G 1 ∪ G 2 ∪ G 3 ∈ UNSAT — partitioned into groups (sets) of clauses G 1 = { C 1 , C 2 } , G 2 = { C 3 , C 4 } , G 3 = { C 5 , C 6 } . C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) C 2 = ( q ) {G 1 , G 2 } is a subset-minimal set of groups sufficient to refute F . {G 1 , G 2 } is a group-MUS of (the partitioned) F . {G 1 , G 3 } is also a group-MUS of (the partitioned) F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 5

  3. Group-oriented MUSes Def: Given a group-CNF formula F = G 0 ∪ G 1 ∪ · · · ∪ G n ∈ UNSAT, a group oriented MUS (GMUS) of F is a set {G i 1 , . . . , G i k } such that F ′ = G 0 ∪ � 1 ≤ j ≤ k G i j ∈ UNSAT, and for every 1 ≤ j ≤ k , F ′ \ G i j ∈ SAT. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 6

  4. Group-oriented MUSes Def: Given a group-CNF formula F = G 0 ∪ G 1 ∪ · · · ∪ G n ∈ UNSAT, a group oriented MUS (GMUS) of F is a set {G i 1 , . . . , G i k } such that F ′ = G 0 ∪ � 1 ≤ j ≤ k G i j ∈ UNSAT, and for every 1 ≤ j ≤ k , F ′ \ G i j ∈ SAT. Example: a group = CNF representation of a gate in a circuit. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 6

  5. Group-oriented MUSes Def: Given a group-CNF formula F = G 0 ∪ G 1 ∪ · · · ∪ G n ∈ UNSAT, a group oriented MUS (GMUS) of F is a set {G i 1 , . . . , G i k } such that F ′ = G 0 ∪ � 1 ≤ j ≤ k G i j ∈ UNSAT, and for every 1 ≤ j ≤ k , F ′ \ G i j ∈ SAT. Example: a group = CNF representation of a gate in a circuit. ◮ Note the special role of G 0 — the “background” clauses. Example: in PBA a group = CNF representation of a latch, G 0 is the rest of the circuit. ◮ G 0 ∈ UNSAT ⇐ ⇒ the GMUS is ∅ . ◮ MUS computation is a special case of group-MUS computation. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 6

  6. Group-oriented MUSes Def: Given a group-CNF formula F = G 0 ∪ G 1 ∪ · · · ∪ G n ∈ UNSAT, a group oriented MUS (GMUS) of F is a set {G i 1 , . . . , G i k } such that F ′ = G 0 ∪ � 1 ≤ j ≤ k G i j ∈ UNSAT, and for every 1 ≤ j ≤ k , F ′ \ G i j ∈ SAT. Example: a group = CNF representation of a gate in a circuit. ◮ Note the special role of G 0 — the “background” clauses. Example: in PBA a group = CNF representation of a latch, G 0 is the rest of the circuit. ◮ G 0 ∈ UNSAT ⇐ ⇒ the GMUS is ∅ . ◮ MUS computation is a special case of group-MUS computation. Perhaps the most useful (from practical standpoint) and versatile generalization of MUSes. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 6

  7. Computing Group-oriented MUSes All current MUS extraction algorithms can be lifted to group-oriented setting: ◮ A group G is necessary for GCNF F if F ∈ UNSAT and F \ G ∈ SAT. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 7

  8. Computing Group-oriented MUSes All current MUS extraction algorithms can be lifted to group-oriented setting: ◮ A group G is necessary for GCNF F if F ∈ UNSAT and F \ G ∈ SAT. ◮ Fact: A group G is necessary for GCNF F iff ∃ τ , such that τ ( F \ G ) = 1 and τ ( G ) = 0. Note: τ need to falsify only some clauses of G . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 7

  9. Computing Group-oriented MUSes All current MUS extraction algorithms can be lifted to group-oriented setting: ◮ A group G is necessary for GCNF F if F ∈ UNSAT and F \ G ∈ SAT. ◮ Fact: A group G is necessary for GCNF F iff ∃ τ , such that τ ( F \ G ) = 1 and τ ( G ) = 0. Note: τ need to falsify only some clauses of G . ◮ Now one can do deletion-based, insertion-based, dichotomic, etc. group-MUS extraction. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 7

  10. Computing Group-oriented MUSes All current MUS extraction algorithms can be lifted to group-oriented setting: ◮ A group G is necessary for GCNF F if F ∈ UNSAT and F \ G ∈ SAT. ◮ Fact: A group G is necessary for GCNF F iff ∃ τ , such that τ ( F \ G ) = 1 and τ ( G ) = 0. Note: τ need to falsify only some clauses of G . ◮ Now one can do deletion-based, insertion-based, dichotomic, etc. group-MUS extraction. ◮ Some low-level modification to a SAT solver are possible to optimize SAT solver use [Ryvchin and Strichman, SAT’11] . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 7

  11. Computing Group-oriented MUSes: optimizations Group-set refinement: ◮ When F \ G ∈ UNSAT, get an unsatisfiable core U from the SAT solver. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 8

  12. Computing Group-oriented MUSes: optimizations Group-set refinement: ◮ When F \ G ∈ UNSAT, get an unsatisfiable core U from the SAT solver. ◮ Remove any group G i for which U ∩ G i = ∅ . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 8

  13. Computing Group-oriented MUSes: optimizations Group-set refinement: ◮ When F \ G ∈ UNSAT, get an unsatisfiable core U from the SAT solver. ◮ Remove any group G i for which U ∩ G i = ∅ . ◮ In assumption-based implementations, one can get a “group-core” right away. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 8

  14. Computing Group-oriented MUSes: optimizations Group-set refinement: ◮ When F \ G ∈ UNSAT, get an unsatisfiable core U from the SAT solver. ◮ Remove any group G i for which U ∩ G i = ∅ . ◮ In assumption-based implementations, one can get a “group-core” right away. ◮ Very effective. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 8

  15. Computing Group-oriented MUSes: optimizations Model rotation: ◮ When F \ G ∈ SAT, get a model τ — this is a witness for necessity G . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 9

  16. Computing Group-oriented MUSes: optimizations Model rotation: ◮ When F \ G ∈ SAT, get a model τ — this is a witness for necessity G . ◮ As with MUSes, try to modify τ into a witness for another group G ′ . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 9

  17. Computing Group-oriented MUSes: optimizations Model rotation: ◮ When F \ G ∈ SAT, get a model τ — this is a witness for necessity G . ◮ As with MUSes, try to modify τ into a witness for another group G ′ . ◮ Issue: τ may satisfy more than one clause. Solutions: A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 9

  18. Computing Group-oriented MUSes: optimizations Model rotation: ◮ When F \ G ∈ SAT, get a model τ — this is a witness for necessity G . ◮ As with MUSes, try to modify τ into a witness for another group G ′ . ◮ Issue: τ may satisfy more than one clause. Solutions: ◮ ignore (i.e. do not rotate) - actually, “works” quite well. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 9

  19. Computing Group-oriented MUSes: optimizations Model rotation: ◮ When F \ G ∈ SAT, get a model τ — this is a witness for necessity G . ◮ As with MUSes, try to modify τ into a witness for another group G ′ . ◮ Issue: τ may satisfy more than one clause. Solutions: ◮ ignore (i.e. do not rotate) - actually, “works” quite well. ◮ use group structure - e.g. a group is a set of unrelated equivalences. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 9

  20. Computing Group-oriented MUSes: optimizations Model rotation: ◮ When F \ G ∈ SAT, get a model τ — this is a witness for necessity G . ◮ As with MUSes, try to modify τ into a witness for another group G ′ . ◮ Issue: τ may satisfy more than one clause. Solutions: ◮ ignore (i.e. do not rotate) - actually, “works” quite well. ◮ use group structure - e.g. a group is a set of unrelated equivalences. ◮ use mini-SLS. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 9

  21. Computing Group-oriented MUSes: optimizations Model rotation: ◮ When F \ G ∈ SAT, get a model τ — this is a witness for necessity G . ◮ As with MUSes, try to modify τ into a witness for another group G ′ . ◮ Issue: τ may satisfy more than one clause. Solutions: ◮ ignore (i.e. do not rotate) - actually, “works” quite well. ◮ use group structure - e.g. a group is a set of unrelated equivalences. ◮ use mini-SLS. ◮ Problem: if G 0 is really large, the next step will get into G 0 , and rotation will get “lost” inside it. No satisfactory solution yet. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 9

  22. Computing Group-oriented MUSes: optimizations Model rotation: ◮ When F \ G ∈ SAT, get a model τ — this is a witness for necessity G . ◮ As with MUSes, try to modify τ into a witness for another group G ′ . ◮ Issue: τ may satisfy more than one clause. Solutions: ◮ ignore (i.e. do not rotate) - actually, “works” quite well. ◮ use group structure - e.g. a group is a set of unrelated equivalences. ◮ use mini-SLS. ◮ Problem: if G 0 is really large, the next step will get into G 0 , and rotation will get “lost” inside it. No satisfactory solution yet. ◮ Effectiveness varies, depending on the structure of GCNFs. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 9

  23. Computing Group-oriented MUSes: optimizations Redundancy removal: ◮ Instead of SAT checking F \ G , check ( F \ G ) ∪ CNF( ¬G )). A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 10

  24. Computing Group-oriented MUSes: optimizations Redundancy removal: ◮ Instead of SAT checking F \ G , check ( F \ G ) ∪ CNF( ¬G )). ◮ Can build CNF( ¬G ) as follows (Plaisted-Greenbaum transform): A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 10

  25. Computing Group-oriented MUSes: optimizations Redundancy removal: ◮ Instead of SAT checking F \ G , check ( F \ G ) ∪ CNF( ¬G )). ◮ Can build CNF( ¬G ) as follows (Plaisted-Greenbaum transform): ◮ For each C ∈ G create a new variable u C , and A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 10

  26. Computing Group-oriented MUSes: optimizations Redundancy removal: ◮ Instead of SAT checking F \ G , check ( F \ G ) ∪ CNF( ¬G )). ◮ Can build CNF( ¬G ) as follows (Plaisted-Greenbaum transform): ◮ For each C ∈ G create a new variable u C , and for each literal l ∈ C create a clause ( ¬ u C ∨ ¬ l ), i.e. u C → ¬ l . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 10

  27. Computing Group-oriented MUSes: optimizations Redundancy removal: ◮ Instead of SAT checking F \ G , check ( F \ G ) ∪ CNF( ¬G )). ◮ Can build CNF( ¬G ) as follows (Plaisted-Greenbaum transform): ◮ For each C ∈ G create a new variable u C , and for each literal l ∈ C create a clause ( ¬ u C ∨ ¬ l ), i.e. u C → ¬ l . ◮ Create a clause � C ∈G u c . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 10

  28. Computing Group-oriented MUSes: optimizations Redundancy removal: ◮ Instead of SAT checking F \ G , check ( F \ G ) ∪ CNF( ¬G )). ◮ Can build CNF( ¬G ) as follows (Plaisted-Greenbaum transform): ◮ For each C ∈ G create a new variable u C , and for each literal l ∈ C create a clause ( ¬ u C ∨ ¬ l ), i.e. u C → ¬ l . ◮ Create a clause � C ∈G u c . ◮ Same problem with tainted cores as in MUS. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 10

  29. Computing Group-oriented MUSes: optimizations Redundancy removal: ◮ Instead of SAT checking F \ G , check ( F \ G ) ∪ CNF( ¬G )). ◮ Can build CNF( ¬G ) as follows (Plaisted-Greenbaum transform): ◮ For each C ∈ G create a new variable u C , and for each literal l ∈ C create a clause ( ¬ u C ∨ ¬ l ), i.e. u C → ¬ l . ◮ Create a clause � C ∈G u c . ◮ Same problem with tainted cores as in MUS. ◮ Effectiveness is not clear. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 10

  30. Variable MUSes [Zhen-Yu Chen and De-Cheng Ding, TAMC’06] F = { C 1 , . . . , C 6 } , Var ( F ) = { p , q , r } C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) C 2 = ( q ) What is a subset-minimal set of variables sufficient to refute F ? A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 11

  31. Variable MUSes [Zhen-Yu Chen and De-Cheng Ding, TAMC’06] F = { C 1 , . . . , C 6 } , Var ( F ) = { p , q , r } C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) C 2 = ( q ) What is a subset-minimal set of variables sufficient to refute F ? { p , q } is such a subset of variables. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 11

  32. Variable MUSes [Zhen-Yu Chen and De-Cheng Ding, TAMC’06] F = { C 1 , . . . , C 6 } , Var ( F ) = { p , q , r } C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) C 2 = ( q ) What is a subset-minimal set of variables sufficient to refute F ? { p , q } is such a subset of variables. { p , q } is a variable-MUS of F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 11

  33. Variable MUSes Def: The subformula of CNF F induced by V ⊆ Var ( F ) is the formula F| V = { C | C ∈ F and Var ( C ) ⊆ V } . I.e. F| V includes only those clauses of F whose variables are in V . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 12

  34. Variable MUSes Def: The subformula of CNF F induced by V ⊆ Var ( F ) is the formula F| V = { C | C ∈ F and Var ( C ) ⊆ V } . I.e. F| V includes only those clauses of F whose variables are in V . C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 2 = ( q ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 12

  35. Variable MUSes Def: The subformula of CNF F induced by V ⊆ Var ( F ) is the formula F| V = { C | C ∈ F and Var ( C ) ⊆ V } . I.e. F| V includes only those clauses of F whose variables are in V . C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 2 = ( q ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) ◮ The subformula induced by { p , q } is F| { p , q } = { C 1 , C 2 , C 3 , C 4 } . ◮ variable r is “removed” from F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 12

  36. Variable MUSes Def: The subformula of CNF F induced by V ⊆ Var ( F ) is the formula F| V = { C | C ∈ F and Var ( C ) ⊆ V } . I.e. F| V includes only those clauses of F whose variables are in V . C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 2 = ( q ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) ◮ The subformula induced by { p , q } is F| { p , q } = { C 1 , C 2 , C 3 , C 4 } . ◮ variable r is “removed” from F . ◮ The subformula induced by { p } , F| { p } = { C 1 } . ◮ variables q , r are “removed” from F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 12

  37. Variable MUSes Def: The subformula of CNF F induced by V ⊆ Var ( F ) is the formula F| V = { C | C ∈ F and Var ( C ) ⊆ V } . I.e. F| V includes only those clauses of F whose variables are in V . Def: A set V ⊆ Var ( F ) is a variable-MUS (VMUS) of F if F| V ∈ UNSAT, and for any V ′ ⊂ V , F| V ′ ∈ SAT. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 13

  38. Variable MUSes Def: The subformula of CNF F induced by V ⊆ Var ( F ) is the formula F| V = { C | C ∈ F and Var ( C ) ⊆ V } . I.e. F| V includes only those clauses of F whose variables are in V . Def: A set V ⊆ Var ( F ) is a variable-MUS (VMUS) of F if F| V ∈ UNSAT, and for any V ′ ⊂ V , F| V ′ ∈ SAT. C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 2 = ( q ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 13

  39. Variable MUSes Def: The subformula of CNF F induced by V ⊆ Var ( F ) is the formula F| V = { C | C ∈ F and Var ( C ) ⊆ V } . I.e. F| V includes only those clauses of F whose variables are in V . Def: A set V ⊆ Var ( F ) is a variable-MUS (VMUS) of F if F| V ∈ UNSAT, and for any V ′ ⊂ V , F| V ′ ∈ SAT. C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 2 = ( q ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) ◮ F| { p , q } = { C 1 , C 2 , C 3 , C 4 } ∈ UNSAT. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 13

  40. Variable MUSes Def: The subformula of CNF F induced by V ⊆ Var ( F ) is the formula F| V = { C | C ∈ F and Var ( C ) ⊆ V } . I.e. F| V includes only those clauses of F whose variables are in V . Def: A set V ⊆ Var ( F ) is a variable-MUS (VMUS) of F if F| V ∈ UNSAT, and for any V ′ ⊂ V , F| V ′ ∈ SAT. C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 2 = ( q ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) ◮ F| { p } = { C 1 } ∈ SAT. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 13

  41. Variable MUSes Def: The subformula of CNF F induced by V ⊆ Var ( F ) is the formula F| V = { C | C ∈ F and Var ( C ) ⊆ V } . I.e. F| V includes only those clauses of F whose variables are in V . Def: A set V ⊆ Var ( F ) is a variable-MUS (VMUS) of F if F| V ∈ UNSAT, and for any V ′ ⊂ V , F| V ′ ∈ SAT. C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 2 = ( q ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) ◮ F| { q } = { C 2 } ∈ SAT. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 13

  42. Variable MUSes Def: The subformula of CNF F induced by V ⊆ Var ( F ) is the formula F| V = { C | C ∈ F and Var ( C ) ⊆ V } . I.e. F| V includes only those clauses of F whose variables are in V . Def: A set V ⊆ Var ( F ) is a variable-MUS (VMUS) of F if F| V ∈ UNSAT, and for any V ′ ⊂ V , F| V ′ ∈ SAT. C 1 = ( p ) C 3 = ( ¬ p ∨ ¬ q ) C 5 = ( ¬ p ∨ r ) C 2 = ( q ) C 4 = ( p ∨ q ) C 6 = ( ¬ q ∨ ¬ r ) ◮ Hence, { p , q } is a VMUS of F . Notation: { p , q } ∈ VMUS( F ). A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 13

  43. Computing Variable MUSes Basic algorithm is similar to deletion-based MUS extraction algorithm: based on detection of necessary variables. Notation: for v ∈ Var ( F ), F v = { C | C ∈ F and v ∈ Var ( C ) } . Definition v ∈ Var ( F ) is necessary for F if F ∈ UNSAT and F \ F v ∈ SAT. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 14

  44. Computing Variable MUSes Basic algorithm is similar to deletion-based MUS extraction algorithm: based on detection of necessary variables. Notation: for v ∈ Var ( F ), F v = { C | C ∈ F and v ∈ Var ( C ) } . Definition v ∈ Var ( F ) is necessary for F if F ∈ UNSAT and F \ F v ∈ SAT. Properties: 1. V ∈ VMUS( F ) if and only if every v ∈ V is necessary for F| V . 2. If v is necessary for F , then v is necessary for any unsatisfiable F ′ ⊆ F . 3. Fact: v is necessary for F iff for some τ , τ ( F \ F v ) = 1, and τ ( F v ) = 0. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 14

  45. Computing Variable MUSes: optimizations [Belov et al, SAT’12] Model rotation — needs to be modified: ◮ When F \ F v ∈ SAT, the model falsifies some clauses with v . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 15

  46. Computing Variable MUSes: optimizations [Belov et al, SAT’12] Model rotation — needs to be modified: ◮ When F \ F v ∈ SAT, the model falsifies some clauses with v . ◮ If we flip v (as in MUS extraction) the only clauses that will get falsified are those with variable v as well (in the opposite polarity). Does this give us anything ? A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 15

  47. Computing Variable MUSes: optimizations [Belov et al, SAT’12] Model rotation — needs to be modified: ◮ When F \ F v ∈ SAT, the model falsifies some clauses with v . ◮ If we flip v (as in MUS extraction) the only clauses that will get falsified are those with variable v as well (in the opposite polarity). Does this give us anything ? ◮ Fact: For any τ , any variable shared among clauses of Unsat ( F , τ ) is necessary for F . Note: In particular, when Unsat ( F , τ ) = { C } is a singleton – all variables of C are necessary. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 15

  48. Computing Variable MUSes: optimizations [Belov et al, SAT’12] Model rotation — needs to be modified: ◮ When F \ F v ∈ SAT, the model falsifies some clauses with v . ◮ If we flip v (as in MUS extraction) the only clauses that will get falsified are those with variable v as well (in the opposite polarity). Does this give us anything ? ◮ Fact: For any τ , any variable shared among clauses of Unsat ( F , τ ) is necessary for F . Note: In particular, when Unsat ( F , τ ) = { C } is a singleton – all variables of C are necessary. ◮ For the assignment returned by SAT solver, v satisfies this condition, but maybe other variables as well. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 15

  49. Computing Variable MUSes: optimizations [Belov et al, SAT’12] Model rotation — needs to be modified: ◮ When F \ F v ∈ SAT, the model falsifies some clauses with v . ◮ If we flip v (as in MUS extraction) the only clauses that will get falsified are those with variable v as well (in the opposite polarity). Does this give us anything ? ◮ Fact: For any τ , any variable shared among clauses of Unsat ( F , τ ) is necessary for F . Note: In particular, when Unsat ( F , τ ) = { C } is a singleton – all variables of C are necessary. ◮ For the assignment returned by SAT solver, v satisfies this condition, but maybe other variables as well. ◮ So, flip v , but collect variables shared falsified clauses. Continue recursively. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 15

  50. Computing Variable MUSes: optimizations Variable-set refinement: ◮ If a variable is not in the unsatisfiable core, remove it. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 16

  51. Computing Variable MUSes: optimizations Variable-set refinement: ◮ If a variable is not in the unsatisfiable core, remove it. Redundancy removal — same trick as for groups, but with CNF ( ¬F v ). A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 16

  52. Computing Variable MUSes: optimizations Variable-set refinement: ◮ If a variable is not in the unsatisfiable core, remove it. Redundancy removal — same trick as for groups, but with CNF ( ¬F v ). All optimizations are very effective in this setting. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 16

  53. Computing Variable MUSes: optimizations Variable-set refinement: ◮ If a variable is not in the unsatisfiable core, remove it. Redundancy removal — same trick as for groups, but with CNF ( ¬F v ). All optimizations are very effective in this setting. VMUSes can often be computed faster than MUSes (not always !). A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 16

  54. Computing Variable MUSes: optimizations Variable-set refinement: ◮ If a variable is not in the unsatisfiable core, remove it. Redundancy removal — same trick as for groups, but with CNF ( ¬F v ). All optimizations are very effective in this setting. VMUSes can often be computed faster than MUSes (not always !). Another idea: translate to group-MUS. ◮ Doesn’t work well, compared to the dedicated algorithm. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 16

  55. Minimal Equivalent Subformulas Let M be the set of all models of CNF formula F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 17

  56. Minimal Equivalent Subformulas Let M be the set of all models of CNF formula F . What happens to M if we remove some clause C from F ? A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 17

  57. Minimal Equivalent Subformulas Let M be the set of all models of CNF formula F . What happens to M if we remove some clause C from F ? Case 1: M grows — the clause C is irredundant in F . C “blocks” some assignments that no other clause does. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 17

  58. Minimal Equivalent Subformulas Let M be the set of all models of CNF formula F . What happens to M if we remove some clause C from F ? Case 1: M grows — the clause C is irredundant in F . C “blocks” some assignments that no other clause does. Case 2: M does not change — the clause C is redundant in F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 17

  59. Minimal Equivalent Subformulas Let M be the set of all models of CNF formula F . What happens to M if we remove some clause C from F ? Case 1: M grows — the clause C is irredundant in F . C “blocks” some assignments that no other clause does. Case 2: M does not change — the clause C is redundant in F . C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 17

  60. Minimal Equivalent Subformulas Let M be the set of all models of CNF formula F . What happens to M if we remove some clause C from F ? Case 1: M grows — the clause C is irredundant in F . C “blocks” some assignments that no other clause does. Case 2: M does not change — the clause C is redundant in F . C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) C 1 is irredundant in F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 17

  61. Minimal Equivalent Subformulas Let M be the set of all models of CNF formula F . What happens to M if we remove some clause C from F ? Case 1: M grows — the clause C is irredundant in F . C “blocks” some assignments that no other clause does. Case 2: M does not change — the clause C is redundant in F . C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) C 1 is irredundant in F . C 2 is redundant in F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 17

  62. Minimal Equivalent Subformulas [Kleine B¨ uning and Zhao, AMAI’05; Liberatore, AIJ’05] A clause C ∈ F is redundant in F if F \ { C } ≡ F . C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

  63. Minimal Equivalent Subformulas [Kleine B¨ uning and Zhao, AMAI’05; Liberatore, AIJ’05] A clause C ∈ F is redundant in F if F \ { C } ≡ F . Alternatively: C ∈ F is redundant if F \ { C } � C . C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

  64. Minimal Equivalent Subformulas [Kleine B¨ uning and Zhao, AMAI’05; Liberatore, AIJ’05] A clause C ∈ F is redundant in F if F \ { C } ≡ F . Alternatively: C ∈ F is redundant if F \ { C } � C . A CNF formula F is irredundant if it does not have redundant clauses. ◮ I.e. every clause “serves a purpose” C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

  65. Minimal Equivalent Subformulas [Kleine B¨ uning and Zhao, AMAI’05; Liberatore, AIJ’05] A clause C ∈ F is redundant in F if F \ { C } ≡ F . Alternatively: C ∈ F is redundant if F \ { C } � C . A CNF formula F is irredundant if it does not have redundant clauses. ◮ I.e. every clause “serves a purpose” Keep on removing redundant clauses, until the remainder is irredundant: C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

  66. Minimal Equivalent Subformulas [Kleine B¨ uning and Zhao, AMAI’05; Liberatore, AIJ’05] A clause C ∈ F is redundant in F if F \ { C } ≡ F . Alternatively: C ∈ F is redundant if F \ { C } � C . A CNF formula F is irredundant if it does not have redundant clauses. ◮ I.e. every clause “serves a purpose” Keep on removing redundant clauses, until the remainder is irredundant: ◮ C 2 is redundant in F (subsumed by C 1 ) C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

  67. Minimal Equivalent Subformulas [Kleine B¨ uning and Zhao, AMAI’05; Liberatore, AIJ’05] A clause C ∈ F is redundant in F if F \ { C } ≡ F . Alternatively: C ∈ F is redundant if F \ { C } � C . A CNF formula F is irredundant if it does not have redundant clauses. ◮ I.e. every clause “serves a purpose” Keep on removing redundant clauses, until the remainder is irredundant: ◮ C 2 is redundant in F (subsumed by C 1 ) : F ′ = F \ { C 2 } C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

  68. Minimal Equivalent Subformulas [Kleine B¨ uning and Zhao, AMAI’05; Liberatore, AIJ’05] A clause C ∈ F is redundant in F if F \ { C } ≡ F . Alternatively: C ∈ F is redundant if F \ { C } � C . A CNF formula F is irredundant if it does not have redundant clauses. ◮ I.e. every clause “serves a purpose” Keep on removing redundant clauses, until the remainder is irredundant: ◮ C 2 is redundant in F (subsumed by C 1 ) : F ′ = F \ { C 2 } ◮ C 6 is redundant in F ′ (resolve C 3 and C 5 ) C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

  69. Minimal Equivalent Subformulas [Kleine B¨ uning and Zhao, AMAI’05; Liberatore, AIJ’05] A clause C ∈ F is redundant in F if F \ { C } ≡ F . Alternatively: C ∈ F is redundant if F \ { C } � C . A CNF formula F is irredundant if it does not have redundant clauses. ◮ I.e. every clause “serves a purpose” Keep on removing redundant clauses, until the remainder is irredundant: ◮ C 2 is redundant in F (subsumed by C 1 ) : F ′ = F \ { C 2 } ◮ C 6 is redundant in F ′ (resolve C 3 and C 5 ) : F ′′ = F ′ \ { C 6 } C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

  70. Minimal Equivalent Subformulas [Kleine B¨ uning and Zhao, AMAI’05; Liberatore, AIJ’05] A clause C ∈ F is redundant in F if F \ { C } ≡ F . Alternatively: C ∈ F is redundant if F \ { C } � C . A CNF formula F is irredundant if it does not have redundant clauses. ◮ I.e. every clause “serves a purpose” Keep on removing redundant clauses, until the remainder is irredundant: ◮ C 2 is redundant in F (subsumed by C 1 ) : F ′ = F \ { C 2 } ◮ C 6 is redundant in F ′ (resolve C 3 and C 5 ) : F ′′ = F ′ \ { C 6 } ◮ the rest of clauses are irredundant in F ′′ C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) F ′′ ⊂ F is irredundant and logically equivalent to F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

  71. Minimal Equivalent Subformulas [Kleine B¨ uning and Zhao, AMAI’05; Liberatore, AIJ’05] A clause C ∈ F is redundant in F if F \ { C } ≡ F . Alternatively: C ∈ F is redundant if F \ { C } � C . A CNF formula F is irredundant if it does not have redundant clauses. ◮ I.e. every clause “serves a purpose” Keep on removing redundant clauses, until the remainder is irredundant: ◮ C 2 is redundant in F (subsumed by C 1 ) : F ′ = F \ { C 2 } ◮ C 6 is redundant in F ′ (resolve C 3 and C 5 ) : F ′′ = F ′ \ { C 6 } ◮ the rest of clauses are irredundant in F ′′ C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) F ′′ ⊂ F is irredundant and logically equivalent to F . F ′′ is a Minimal Equivalent Subformula (MES) of F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

  72. Minimal Equivalent Subformulas [Kleine B¨ uning and Zhao, AMAI’05; Liberatore, AIJ’05] A clause C ∈ F is redundant in F if F \ { C } ≡ F . Alternatively: C ∈ F is redundant if F \ { C } � C . A CNF formula F is irredundant if it does not have redundant clauses. ◮ I.e. every clause “serves a purpose” Keep on removing redundant clauses, until the remainder is irredundant: ◮ C 2 is redundant in F (subsumed by C 1 ) : F ′ = F \ { C 2 } ◮ C 6 is redundant in F ′ (resolve C 3 and C 5 ) : F ′′ = F ′ \ { C 6 } ◮ the rest of clauses are irredundant in F ′′ C 1 = ( x ) C 3 = ( y ∨ z ) C 5 = ( ¬ z ∨ t ) C 2 = ( x ∨ t ) C 4 = ( ¬ y ∨ ¬ z ) C 6 = ( y ∨ t ) F ′′ ⊂ F is irredundant and logically equivalent to F . F ′′ is a Minimal Equivalent Subformula (MES) of F . There is another. A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

  73. Minimal Equivalent Subformulas Def: A Minimal Equivalent Subformula (MES) of a CNF F is an irredundant subformula of F logically equivalent to F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 19

  74. Minimal Equivalent Subformulas Def: A Minimal Equivalent Subformula (MES) of a CNF F is an irredundant subformula of F logically equivalent to F . ◮ F ′ ⊆ F and F ′ ≡ F and ∀ C ∈ F ′ , F ′ \ { C } �≡ F A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 19

  75. Minimal Equivalent Subformulas Def: A Minimal Equivalent Subformula (MES) of a CNF F is an irredundant subformula of F logically equivalent to F . ◮ F ′ ⊆ F and F ′ ≡ F and ∀ C ∈ F ′ , F ′ \ { C } �≡ F Note: If F ∈ UNSAT, then an MES is a Minimal Unsatisfiable Subformula (MUS) of F . A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 19

  76. Minimal Equivalent Subformulas Def: A Minimal Equivalent Subformula (MES) of a CNF F is an irredundant subformula of F logically equivalent to F . ◮ F ′ ⊆ F and F ′ ≡ F and ∀ C ∈ F ′ , F ′ \ { C } �≡ F Note: If F ∈ UNSAT, then an MES is a Minimal Unsatisfiable Subformula (MUS) of F . Computation of MESes is about removing redundant clauses. Why would we want to do this ? A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 19

  77. Minimal Equivalent Subformulas Def: A Minimal Equivalent Subformula (MES) of a CNF F is an irredundant subformula of F logically equivalent to F . ◮ F ′ ⊆ F and F ′ ≡ F and ∀ C ∈ F ′ , F ′ \ { C } �≡ F Note: If F ∈ UNSAT, then an MES is a Minimal Unsatisfiable Subformula (MUS) of F . Computation of MESes is about removing redundant clauses. Why would we want to do this ? ◮ In some applications redundancy is undesirable: ◮ knowledge bases [P. Liberatore, AIJ 2005] ◮ conformant and contingent planning [S.T. To, et al, AAAI 2010-11] ◮ probabilistic reasoning systems [M. Niepert, et al, J. of Approx. Reasoning, 2010] A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 19

  78. Minimal Equivalent Subformulas Def: A Minimal Equivalent Subformula (MES) of a CNF F is an irredundant subformula of F logically equivalent to F . ◮ F ′ ⊆ F and F ′ ≡ F and ∀ C ∈ F ′ , F ′ \ { C } �≡ F Note: If F ∈ UNSAT, then an MES is a Minimal Unsatisfiable Subformula (MUS) of F . Computation of MESes is about removing redundant clauses. Why would we want to do this ? ◮ In some applications redundancy is undesirable: ◮ knowledge bases [P. Liberatore, AIJ 2005] ◮ conformant and contingent planning [S.T. To, et al, AAAI 2010-11] ◮ probabilistic reasoning systems [M. Niepert, et al, J. of Approx. Reasoning, 2010] ◮ Construction of concise CNF encodings A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 19

  79. Is Redundancy Common ? A sample of 300 benchmarks from various applications of SAT A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 20

  80. Is Redundancy Common ? A sample of 300 benchmarks from various applications of SAT ◮ Number of instances ( x ) with less than y % redundant clauses A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 20

  81. Is Redundancy Common ? A sample of 300 benchmarks from various applications of SAT ◮ Number of instances ( x ) with less than y % redundant clauses ◮ 2/3 of instances have 20%-50% redundant clauses A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 20

  82. Is Redundancy Common ? A sample of 300 benchmarks from various applications of SAT ◮ Number of instances ( x ) with less than y % redundant clauses ◮ 2/3 of instances have 20%-50% redundant clauses ◮ 1/3 has > 50%, in some cases > 90%, of redundant clauses ! A. Belov MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 20

Recommend


More recommend