Extensions and Generalizations of Minimal Unsatisfiability Anton - - PowerPoint PPT Presentation

extensions and generalizations of minimal unsatisfiability
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

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 Dresden, Germany

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 1

slide-2
SLIDE 2

Abstract

Motivated by practical applications, the concepts related to minimal unsatisfiability and minimal unsatisfiable subformulas (MUSes) have recently been extended beyond propositional formulas in CNF, and, also, generalized to the case of satisfiable formulas. In this talk I will discuss the algorithms and the optimization techniques for the computation of MUSes in some of these extended and generalized domains.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 2

slide-3
SLIDE 3

Introduction: Minimal Unsatisfiable Subformulas (MUSes)

F = {C1, . . . , C6} ∈ UNSAT C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 3

slide-4
SLIDE 4

Introduction: Minimal Unsatisfiable Subformulas (MUSes)

F = {C1, . . . , C6} ∈ UNSAT C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) Which part of F is responsible for its inconsistency ?

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 3

slide-5
SLIDE 5

Introduction: Minimal Unsatisfiable Subformulas (MUSes)

F = {C1, . . . , C6} ∈ UNSAT C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) Which part of F is responsible for its inconsistency ?

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 3

slide-6
SLIDE 6

Introduction: Minimal Unsatisfiable Subformulas (MUSes)

F = {C1, . . . , C6} ∈ UNSAT C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) Which part of F is responsible for its inconsistency ? The set {C1, C2, C3} ∈ UNSAT, and is minimal w.r.t. to UNSAT.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 3

slide-7
SLIDE 7

Introduction: Minimal Unsatisfiable Subformulas (MUSes)

F = {C1, . . . , C6} ∈ UNSAT C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) Which part of F is responsible for its inconsistency ? The set {C1, C2, C3} ∈ UNSAT, and is minimal w.r.t. to UNSAT. Def: F′ ⊆ F is minimally unsatisfiable subformula (MUS) of F if F′ ∈ UNSAT, and ∀C ∈ F′, F′ \ {C} ∈ SAT.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 3

slide-8
SLIDE 8

Introduction: Minimal Unsatisfiable Subformulas (MUSes)

F = {C1, . . . , C6} ∈ UNSAT C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) Which part of F is responsible for its inconsistency ? The set {C1, C2, C3} ∈ UNSAT, and is minimal w.r.t. to UNSAT. Def: F′ ⊆ F is minimally unsatisfiable subformula (MUS) of F if F′ ∈ UNSAT, and ∀C ∈ F′, F′ \ {C} ∈ SAT. {C1, C2, C3} is an MUS of F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 3

slide-9
SLIDE 9

Introduction: Minimal Unsatisfiable Subformulas (MUSes)

F = {C1, . . . , C6} ∈ UNSAT C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) Which part of F is responsible for its inconsistency ? The set {C1, C2, C3} ∈ UNSAT, and is minimal w.r.t. to UNSAT. Def: F′ ⊆ F is minimally unsatisfiable subformula (MUS) of F if F′ ∈ UNSAT, and ∀C ∈ F′, F′ \ {C} ∈ SAT. {C1, C2, C3} is an MUS of F. And so is {C1, C2, C5, C6}.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 3

slide-10
SLIDE 10

Introduction: Extensions and Generalizations

◮ Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10] — analysis in

terms of subsets of clauses.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 4

slide-11
SLIDE 11

Introduction: Extensions and Generalizations

◮ Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10] — analysis in

terms of subsets of clauses.

◮ Variable MUSes [Chen&Ding, TAMC’06] — analysis in terms of variables of the

formula.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 4

slide-12
SLIDE 12

Introduction: Extensions and Generalizations

◮ Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10] — analysis in

terms of subsets of clauses.

◮ Variable MUSes [Chen&Ding, TAMC’06] — analysis in terms of variables of the

formula.

◮ Non-clausal and Circuit MUSes — extensions to non-clausal

propositional formulas [Kleine B¨

uning and Zhao, AIJ’07] and Boolean circuits [Belov and Marques-Silva, SAT’11].

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 4

slide-13
SLIDE 13

Introduction: Extensions and Generalizations

◮ Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10] — analysis in

terms of subsets of clauses.

◮ Variable MUSes [Chen&Ding, TAMC’06] — analysis in terms of variables of the

formula.

◮ Non-clausal and Circuit MUSes — extensions to non-clausal

propositional formulas [Kleine B¨

uning and Zhao, AIJ’07] and Boolean circuits [Belov and Marques-Silva, SAT’11].

◮ Minimal Equivalent Subformulas (MESes) [Kleine B¨

uning and Zhao, AMAI’05; Liberatore, AIJ’05] — generalization to satisfiable formulas.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 4

slide-14
SLIDE 14

Introduction: Extensions and Generalizations

◮ Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10] — analysis in

terms of subsets of clauses.

◮ Variable MUSes [Chen&Ding, TAMC’06] — analysis in terms of variables of the

formula.

◮ Non-clausal and Circuit MUSes — extensions to non-clausal

propositional formulas [Kleine B¨

uning and Zhao, AIJ’07] and Boolean circuits [Belov and Marques-Silva, SAT’11].

◮ Minimal Equivalent Subformulas (MESes) [Kleine B¨

uning and Zhao, AMAI’05; Liberatore, AIJ’05] — generalization to satisfiable formulas.

◮ MUSes for LTL formulas [Schuppan, FSE’10].

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 4

slide-15
SLIDE 15

Introduction: Extensions and Generalizations

◮ Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10] — analysis in

terms of subsets of clauses.

◮ Variable MUSes [Chen&Ding, TAMC’06] — analysis in terms of variables of the

formula.

◮ Non-clausal and Circuit MUSes — extensions to non-clausal

propositional formulas [Kleine B¨

uning and Zhao, AIJ’07] and Boolean circuits [Belov and Marques-Silva, SAT’11].

◮ Minimal Equivalent Subformulas (MESes) [Kleine B¨

uning and Zhao, AMAI’05; Liberatore, AIJ’05] — generalization to satisfiable formulas.

◮ MUSes for LTL formulas [Schuppan, FSE’10]. ◮ Minimal unsatisfiability and falsity for QBF formulas [Kleine B¨

uning and Zhao, SAT’06].

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 4

slide-16
SLIDE 16

Introduction: Extensions and Generalizations

◮ Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10] — analysis in

terms of subsets of clauses.

◮ Variable MUSes [Chen&Ding, TAMC’06] — analysis in terms of variables of the

formula.

◮ Non-clausal and Circuit MUSes — extensions to non-clausal

propositional formulas [Kleine B¨

uning and Zhao, AIJ’07] and Boolean circuits [Belov and Marques-Silva, SAT’11].

◮ Minimal Equivalent Subformulas (MESes) [Kleine B¨

uning and Zhao, AMAI’05; Liberatore, AIJ’05] — generalization to satisfiable formulas.

◮ MUSes for LTL formulas [Schuppan, FSE’10]. ◮ Minimal unsatisfiability and falsity for QBF formulas [Kleine B¨

uning and Zhao, SAT’06].

Related areas

◮ Minimal Unsatisfiable sets of Constraints (MUCs) — in CSP. ◮ Irreducible Infeasible Subsets (IISes) in linear programs Note: many

MUS extraction algorithms can be traced back here.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 4

slide-17
SLIDE 17

Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10]

F = G1 ∪ G2 ∪ G3 ∈ UNSAT — partitioned into groups (sets) of clauses G1 = {C1, C2}, G2 = {C3, C4}, G3 = {C5, C6}. C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 5

slide-18
SLIDE 18

Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10]

F = G1 ∪ G2 ∪ G3 ∈ UNSAT — partitioned into groups (sets) of clauses G1 = {C1, C2}, G2 = {C3, C4}, G3 = {C5, C6}. C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) {G1, G2} is a subset-minimal set of groups sufficient to refute F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 5

slide-19
SLIDE 19

Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10]

F = G1 ∪ G2 ∪ G3 ∈ UNSAT — partitioned into groups (sets) of clauses G1 = {C1, C2}, G2 = {C3, C4}, G3 = {C5, C6}. C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) {G1, G2} is a subset-minimal set of groups sufficient to refute F. {G1, G2} is a group-MUS of (the partitioned) F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 5

slide-20
SLIDE 20

Group-oriented MUSes [Liffiton&Sakallah, JAR’08; Nadel, FMCAD’10]

F = G1 ∪ G2 ∪ G3 ∈ UNSAT — partitioned into groups (sets) of clauses G1 = {C1, C2}, G2 = {C3, C4}, G3 = {C5, C6}. C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) {G1, G2} is a subset-minimal set of groups sufficient to refute F. {G1, G2} is a group-MUS of (the partitioned) F. {G1, G3} is also a group-MUS of (the partitioned) F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 5

slide-21
SLIDE 21

Group-oriented MUSes

Def: Given a group-CNF formula F = G0 ∪ G1 ∪ · · · ∪ Gn ∈ UNSAT, a group oriented MUS (GMUS) of F is a set {Gi1, . . . , Gik} such that F′ = G0 ∪

1≤j≤k Gij ∈ UNSAT, and for every 1 ≤ j ≤ k, F′ \ Gij ∈ SAT.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 6

slide-22
SLIDE 22

Group-oriented MUSes

Def: Given a group-CNF formula F = G0 ∪ G1 ∪ · · · ∪ Gn ∈ UNSAT, a group oriented MUS (GMUS) of F is a set {Gi1, . . . , Gik} such that F′ = G0 ∪

1≤j≤k Gij ∈ UNSAT, and for every 1 ≤ j ≤ k, F′ \ Gij ∈ 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

slide-23
SLIDE 23

Group-oriented MUSes

Def: Given a group-CNF formula F = G0 ∪ G1 ∪ · · · ∪ Gn ∈ UNSAT, a group oriented MUS (GMUS) of F is a set {Gi1, . . . , Gik} such that F′ = G0 ∪

1≤j≤k Gij ∈ UNSAT, and for every 1 ≤ j ≤ k, F′ \ Gij ∈ SAT.

Example: a group = CNF representation of a gate in a circuit.

◮ Note the special role of G0 — the “background” clauses. Example: in

PBA a group = CNF representation of a latch, G0 is the rest of the circuit.

◮ G0 ∈ 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

slide-24
SLIDE 24

Group-oriented MUSes

Def: Given a group-CNF formula F = G0 ∪ G1 ∪ · · · ∪ Gn ∈ UNSAT, a group oriented MUS (GMUS) of F is a set {Gi1, . . . , Gik} such that F′ = G0 ∪

1≤j≤k Gij ∈ UNSAT, and for every 1 ≤ j ≤ k, F′ \ Gij ∈ SAT.

Example: a group = CNF representation of a gate in a circuit.

◮ Note the special role of G0 — the “background” clauses. Example: in

PBA a group = CNF representation of a latch, G0 is the rest of the circuit.

◮ G0 ∈ 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

slide-25
SLIDE 25

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

slide-26
SLIDE 26

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

slide-27
SLIDE 27

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

slide-28
SLIDE 28

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

slide-29
SLIDE 29

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

slide-30
SLIDE 30

Computing Group-oriented MUSes: optimizations

Group-set refinement:

◮ When F \ G ∈ UNSAT, get an unsatisfiable core U from the SAT

solver.

◮ Remove any group Gi for which U ∩ Gi = ∅.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 8

slide-31
SLIDE 31

Computing Group-oriented MUSes: optimizations

Group-set refinement:

◮ When F \ G ∈ UNSAT, get an unsatisfiable core U from the SAT

solver.

◮ Remove any group Gi for which U ∩ Gi = ∅. ◮ 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

slide-32
SLIDE 32

Computing Group-oriented MUSes: optimizations

Group-set refinement:

◮ When F \ G ∈ UNSAT, get an unsatisfiable core U from the SAT

solver.

◮ Remove any group Gi for which U ∩ Gi = ∅. ◮ 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

slide-33
SLIDE 33

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

slide-34
SLIDE 34

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

slide-35
SLIDE 35

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

slide-36
SLIDE 36

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

slide-37
SLIDE 37

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

slide-38
SLIDE 38

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

slide-39
SLIDE 39

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 G0 is really large, the next step will get into G0, and

rotation will get “lost” inside it. No satisfactory solution yet.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 9

slide-40
SLIDE 40

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 G0 is really large, the next step will get into G0, 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

slide-41
SLIDE 41

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

slide-42
SLIDE 42

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

slide-43
SLIDE 43

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 uC, and

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 10

slide-44
SLIDE 44

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 uC, and

for each literal l ∈ C create a clause (¬uC ∨ ¬l), i.e. uC → ¬l.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 10

slide-45
SLIDE 45

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 uC, and

for each literal l ∈ C create a clause (¬uC ∨ ¬l), i.e. uC → ¬l.

◮ Create a clause

C∈G uc.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 10

slide-46
SLIDE 46

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 uC, and

for each literal l ∈ C create a clause (¬uC ∨ ¬l), i.e. uC → ¬l.

◮ Create a clause

C∈G uc.

◮ Same problem with tainted cores as in MUS.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 10

slide-47
SLIDE 47

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 uC, and

for each literal l ∈ C create a clause (¬uC ∨ ¬l), i.e. uC → ¬l.

◮ Create a clause

C∈G uc.

◮ 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

slide-48
SLIDE 48

Variable MUSes [Zhen-Yu Chen and De-Cheng Ding, TAMC’06]

F = {C1, . . . , C6}, Var(F) = {p, q, r} C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) 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

slide-49
SLIDE 49

Variable MUSes [Zhen-Yu Chen and De-Cheng Ding, TAMC’06]

F = {C1, . . . , C6}, Var(F) = {p, q, r} C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) 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

slide-50
SLIDE 50

Variable MUSes [Zhen-Yu Chen and De-Cheng Ding, TAMC’06]

F = {C1, . . . , C6}, Var(F) = {p, q, r} C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r) 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

slide-51
SLIDE 51

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

slide-52
SLIDE 52

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 . C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 12

slide-53
SLIDE 53

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 . C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r)

◮ The subformula induced by {p, q} is F|{p,q} = {C1, C2, C3, C4}.

◮ variable r is “removed” from F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 12

slide-54
SLIDE 54

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 . C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r)

◮ The subformula induced by {p, q} is F|{p,q} = {C1, C2, C3, C4}.

◮ variable r is “removed” from F.

◮ The subformula induced by {p}, F|{p} = {C1}.

◮ variables q, r are “removed” from F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 12

slide-55
SLIDE 55

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

slide-56
SLIDE 56

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. C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 13

slide-57
SLIDE 57

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. C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r)

◮ F|{p,q} = {C1, C2, C3, C4} ∈ UNSAT.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 13

slide-58
SLIDE 58

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. C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r)

◮ F|{p} = {C1} ∈ SAT.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 13

slide-59
SLIDE 59

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. C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬q ∨ ¬r)

◮ F|{q} = {C2} ∈ SAT.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 13

slide-60
SLIDE 60

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. C1 = (p) C3 = (¬p ∨ ¬q) C5 = (¬p ∨ r) C2 = (q) C4 = (p ∨ q) C6 = (¬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

slide-61
SLIDE 61

Computing Variable MUSes

Basic algorithm is similar to deletion-based MUS extraction algorithm: based on detection of necessary variables. Notation: for v ∈ Var(F), Fv = {C | C ∈ F and v ∈ Var(C)}.

Definition

v ∈ Var(F) is necessary for F if F ∈ UNSAT and F \ Fv ∈ SAT.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 14

slide-62
SLIDE 62

Computing Variable MUSes

Basic algorithm is similar to deletion-based MUS extraction algorithm: based on detection of necessary variables. Notation: for v ∈ Var(F), Fv = {C | C ∈ F and v ∈ Var(C)}.

Definition

v ∈ Var(F) is necessary for F if F ∈ UNSAT and F \ Fv ∈ 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 \ Fv) = 1, and

τ(Fv) = 0.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 14

slide-63
SLIDE 63

Computing Variable MUSes: optimizations [Belov et al, SAT’12]

Model rotation — needs to be modified:

◮ When F \ Fv ∈ SAT, the model falsifies some clauses with v.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 15

slide-64
SLIDE 64

Computing Variable MUSes: optimizations [Belov et al, SAT’12]

Model rotation — needs to be modified:

◮ When F \ Fv ∈ 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

slide-65
SLIDE 65

Computing Variable MUSes: optimizations [Belov et al, SAT’12]

Model rotation — needs to be modified:

◮ When F \ Fv ∈ 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

slide-66
SLIDE 66

Computing Variable MUSes: optimizations [Belov et al, SAT’12]

Model rotation — needs to be modified:

◮ When F \ Fv ∈ 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

slide-67
SLIDE 67

Computing Variable MUSes: optimizations [Belov et al, SAT’12]

Model rotation — needs to be modified:

◮ When F \ Fv ∈ 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

slide-68
SLIDE 68

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

slide-69
SLIDE 69

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(¬Fv).

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 16

slide-70
SLIDE 70

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(¬Fv). All optimizations are very effective in this setting.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 16

slide-71
SLIDE 71

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(¬Fv). 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

slide-72
SLIDE 72

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(¬Fv). 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

slide-73
SLIDE 73

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

slide-74
SLIDE 74

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

slide-75
SLIDE 75

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

slide-76
SLIDE 76

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

slide-77
SLIDE 77

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. C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 17

slide-78
SLIDE 78

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. C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t) C1 is irredundant in F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 17

slide-79
SLIDE 79

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. C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t) C1 is irredundant in F. C2 is redundant in F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 17

slide-80
SLIDE 80

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. C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

slide-81
SLIDE 81

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. C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

slide-82
SLIDE 82

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”

C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

slide-83
SLIDE 83

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: C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

slide-84
SLIDE 84

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:

◮ C2 is redundant in F (subsumed by C1)

C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

slide-85
SLIDE 85

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:

◮ C2 is redundant in F (subsumed by C1) : F′ = F \ {C2}

C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

slide-86
SLIDE 86

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:

◮ C2 is redundant in F (subsumed by C1) : F′ = F \ {C2} ◮ C6 is redundant in F′ (resolve C3 and C5)

C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

slide-87
SLIDE 87

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:

◮ C2 is redundant in F (subsumed by C1) : F′ = F \ {C2} ◮ C6 is redundant in F′ (resolve C3 and C5) : F′′ = F′ \ {C6}

C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

slide-88
SLIDE 88

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:

◮ C2 is redundant in F (subsumed by C1) : F′ = F \ {C2} ◮ C6 is redundant in F′ (resolve C3 and C5) : F′′ = F′ \ {C6} ◮ the rest of clauses are irredundant in F′′

C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (y ∨ t) F′′ ⊂ F is irredundant and logically equivalent to F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 18

slide-89
SLIDE 89

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:

◮ C2 is redundant in F (subsumed by C1) : F′ = F \ {C2} ◮ C6 is redundant in F′ (resolve C3 and C5) : F′′ = F′ \ {C6} ◮ the rest of clauses are irredundant in F′′

C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (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

slide-90
SLIDE 90

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:

◮ C2 is redundant in F (subsumed by C1) : F′ = F \ {C2} ◮ C6 is redundant in F′ (resolve C3 and C5) : F′′ = F′ \ {C6} ◮ the rest of clauses are irredundant in F′′

C1 = (x) C3 = (y ∨ z) C5 = (¬z ∨ t) C2 = (x ∨ t) C4 = (¬y ∨ ¬z) C6 = (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

slide-91
SLIDE 91

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

slide-92
SLIDE 92

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

slide-93
SLIDE 93

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

slide-94
SLIDE 94

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

slide-95
SLIDE 95

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

slide-96
SLIDE 96

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

slide-97
SLIDE 97

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

slide-98
SLIDE 98

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

slide-99
SLIDE 99

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

slide-100
SLIDE 100

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

slide-101
SLIDE 101

Computing MESes

How to check if C is redundant in F, i.e. F \ {C} C ?

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 21

slide-102
SLIDE 102

Computing MESes

How to check if C is redundant in F, i.e. F \ {C} C ?

◮ In general, α β iff α ∧ ¬β ∈ UNSAT

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 21

slide-103
SLIDE 103

Computing MESes

How to check if C is redundant in F, i.e. F \ {C} C ?

◮ In general, α β iff α ∧ ¬β ∈ UNSAT ◮ Use SAT solver to check satisfiability of F \ {C} ∪ CNF(¬C)

◮ UNSAT — C is redundant in F. SAT — C is irredundant in F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 21

slide-104
SLIDE 104

Computing MESes

How to check if C is redundant in F, i.e. F \ {C} C ?

◮ In general, α β iff α ∧ ¬β ∈ UNSAT ◮ Use SAT solver to check satisfiability of F \ {C} ∪ CNF(¬C)

◮ UNSAT — C is redundant in F. SAT — C is irredundant in F.

Deletion-based MES Computation

Input → Output: CNF Formula F → an MES M of F M ← F // Inv: M is a superset of some MES of F foreach C ∈ M do if not SAT(M \ {C} ∪ CNF(¬C)) then // is C redundant ? // yes - delete it M ← M \ {C} // no - keep it return M // Every C ∈ M is irredundant in M

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 21

slide-105
SLIDE 105

Computing MESes [Belov et al, CP’12]

But, insertion-based (and dichotomic) MUS extraction algorithms needs to be ported carefully.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 22

slide-106
SLIDE 106

Computing MESes [Belov et al, CP’12]

But, insertion-based (and dichotomic) MUS extraction algorithms needs to be ported carefully. As per insertion-based MUS extraction algorithm:

◮ F – the input formula, ◮ M ⊂ F – the set of irredundant clauses computed so far

(under-approximation of an MES of F)

◮ S – the set of untested clauses

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 22

slide-107
SLIDE 107

Computing MESes [Belov et al, CP’12]

But, insertion-based (and dichotomic) MUS extraction algorithms needs to be ported carefully. As per insertion-based MUS extraction algorithm:

◮ F – the input formula, ◮ M ⊂ F – the set of irredundant clauses computed so far

(under-approximation of an MES of F)

◮ S – the set of untested clauses ◮ When computing MUS of F ∈ UNSAT, a clause C ∈ F is added to

M when M ∪ S ∈ SAT but M ∪ S ∪ {C} ∈ UNSAT.

◮ transition from SAT to UNSAT.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 22

slide-108
SLIDE 108

Computing MESes [Belov et al, CP’12]

But, insertion-based (and dichotomic) MUS extraction algorithms needs to be ported carefully. As per insertion-based MUS extraction algorithm:

◮ F – the input formula, ◮ M ⊂ F – the set of irredundant clauses computed so far

(under-approximation of an MES of F)

◮ S – the set of untested clauses ◮ When computing MUS of F ∈ UNSAT, a clause C ∈ F is added to

M when M ∪ S ∈ SAT but M ∪ S ∪ {C} ∈ UNSAT.

◮ transition from SAT to UNSAT.

◮ When computing MESes we want to add a clause C to M when

M ∪ S ≡ F but M ∪ S ∪ {C} ≡ F.

◮ transition from ≡ F to ≡ F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 22

slide-109
SLIDE 109

Computing MESes [Belov et al, CP’12]

But, insertion-based (and dichotomic) MUS extraction algorithms needs to be ported carefully. As per insertion-based MUS extraction algorithm:

◮ F – the input formula, ◮ M ⊂ F – the set of irredundant clauses computed so far

(under-approximation of an MES of F)

◮ S – the set of untested clauses ◮ When computing MUS of F ∈ UNSAT, a clause C ∈ F is added to

M when M ∪ S ∈ SAT but M ∪ S ∪ {C} ∈ UNSAT.

◮ transition from SAT to UNSAT.

◮ When computing MESes we want to add a clause C to M when

M ∪ S ≡ F but M ∪ S ∪ {C} ≡ F.

◮ transition from ≡ F to ≡ F.

◮ SAT check needs to be modified: e.g. the algorithm loops while

SAT(M ∪ S ∪ CNF(¬F) Note: in fact, do not need to negate the whole F.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 22

slide-110
SLIDE 110

Computing MESes: optimizations

Model rotation:

◮ Fact: C is irredundant in F iff for τ, Unsat(F, τ) = {C}. Note: the

same property as in MUSes.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 23

slide-111
SLIDE 111

Computing MESes: optimizations

Model rotation:

◮ Fact: C is irredundant in F iff for τ, Unsat(F, τ) = {C}. Note: the

same property as in MUSes.

◮ Almost the same as with MUSes: may need to rotate through

satisfied clauses.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 23

slide-112
SLIDE 112

Computing MESes: optimizations

Model rotation:

◮ Fact: C is irredundant in F iff for τ, Unsat(F, τ) = {C}. Note: the

same property as in MUSes.

◮ Almost the same as with MUSes: may need to rotate through

satisfied clauses.

◮ Works well on medium-to-low redundancy instances

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 23

slide-113
SLIDE 113

Computing MESes: optimizations

Model rotation:

◮ Fact: C is irredundant in F iff for τ, Unsat(F, τ) = {C}. Note: the

same property as in MUSes.

◮ Almost the same as with MUSes: may need to rotate through

satisfied clauses.

◮ Works well on medium-to-low redundancy instances ◮ But: does not help for highly-redundant instances

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 23

slide-114
SLIDE 114

Computing MESes: optimizations

Model rotation:

◮ Fact: C is irredundant in F iff for τ, Unsat(F, τ) = {C}. Note: the

same property as in MUSes.

◮ Almost the same as with MUSes: may need to rotate through

satisfied clauses.

◮ Works well on medium-to-low redundancy instances ◮ But: does not help for highly-redundant instances

Clause-set refinement cannot be applied soundly to MES extraction ! Example: check C2 in F = {C1 = (p), C2 = (p ∨ q), C3 = (r)}.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 23

slide-115
SLIDE 115

Computing MESes: reduction to group-MUS

Observation

◮ F′ ⊆ F is an MES of F iff:

◮ F′ ∪ CNF(¬F) ∈ UNSAT, i.e. F′ F, and so F′ ≡ F, and ◮ ∀C ∈ F′, (F′ \ {C}) ∪ CNF(¬F) ∈ SAT, i.e. F′ \ {C} ≡ F

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 24

slide-116
SLIDE 116

Computing MESes: reduction to group-MUS

Observation

◮ F′ ⊆ F is an MES of F iff:

◮ F′ ∪ CNF(¬F) ∈ UNSAT, i.e. F′ F, and so F′ ≡ F, and ◮ ∀C ∈ F′, (F′ \ {C}) ∪ CNF(¬F) ∈ SAT, i.e. F′ \ {C} ≡ F

◮ So, to compute an MES, we can:

◮ start with F ∪ CNF(¬F) ∈ UNSAT, and ◮ find F′ ⊆ F such that F′ ∪ CNF(¬F) ∈ UNSAT, and ∀C ∈ F′,

(F′ \ {C}) ∪ CNF(¬F) ∈ SAT

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 24

slide-117
SLIDE 117

Computing MESes: reduction to group-MUS

Observation

◮ F′ ⊆ F is an MES of F iff:

◮ F′ ∪ CNF(¬F) ∈ UNSAT, i.e. F′ F, and so F′ ≡ F, and ◮ ∀C ∈ F′, (F′ \ {C}) ∪ CNF(¬F) ∈ SAT, i.e. F′ \ {C} ≡ F

◮ So, to compute an MES, we can:

◮ start with F ∪ CNF(¬F) ∈ UNSAT, and ◮ find F′ ⊆ F such that F′ ∪ CNF(¬F) ∈ UNSAT, and ∀C ∈ F′,

(F′ \ {C}) ∪ CNF(¬F) ∈ SAT

◮ This is an instance of group-MUS computation problem !

◮ take “group 0” to be CNF(¬F), and ◮ make a singleton group for each C ∈ F

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 24

slide-118
SLIDE 118

Computing MESes: reduction to group-MUS

So what ?

◮ Efficient group-MUS algorithms and tools are available.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 25

slide-119
SLIDE 119

Computing MESes: reduction to group-MUS

So what ?

◮ Efficient group-MUS algorithms and tools are available. ◮ Clause-set refinement is sound and effective again.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 25

slide-120
SLIDE 120

Computing MESes: reduction to group-MUS

So what ?

◮ Efficient group-MUS algorithms and tools are available. ◮ Clause-set refinement is sound and effective again. ◮ Turns out that reduction can be done incrementally: family of

algorithms (that includes the deletion-based algorithm).

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 25

slide-121
SLIDE 121

MUSer2 — MUS, group-MUS, VMUS, MES extractor

Algorithms:

◮ Hybrid algorithm ◮ Insertion-based ◮ Dichotomic ◮ A number of additional specialized algorithms for MES extraction.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 26

slide-122
SLIDE 122

MUSer2 — MUS, group-MUS, VMUS, MES extractor

Algorithms:

◮ Hybrid algorithm ◮ Insertion-based ◮ Dichotomic ◮ A number of additional specialized algorithms for MES extraction.

Optimizations:

◮ Clause-set refinement and trimming ◮ Recursive model rotation ◮ (Adaptive) redundancy removal

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 26

slide-123
SLIDE 123

MUSer2 — MUS, group-MUS, VMUS, MES extractor

Algorithms:

◮ Hybrid algorithm ◮ Insertion-based ◮ Dichotomic ◮ A number of additional specialized algorithms for MES extraction.

Optimizations:

◮ Clause-set refinement and trimming ◮ Recursive model rotation ◮ (Adaptive) redundancy removal

Control/heuristics for clause/group/variable ordering

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 26

slide-124
SLIDE 124

MUSer2 — MUS, group-MUS, VMUS, MES extractor

Algorithms:

◮ Hybrid algorithm ◮ Insertion-based ◮ Dichotomic ◮ A number of additional specialized algorithms for MES extraction.

Optimizations:

◮ Clause-set refinement and trimming ◮ Recursive model rotation ◮ (Adaptive) redundancy removal

Control/heuristics for clause/group/variable ordering Testing of computed MUSes (etc)

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 26

slide-125
SLIDE 125

MUSer2 — MUS, group-MUS, VMUS, MES extractor

Algorithms:

◮ Hybrid algorithm ◮ Insertion-based ◮ Dichotomic ◮ A number of additional specialized algorithms for MES extraction.

Optimizations:

◮ Clause-set refinement and trimming ◮ Recursive model rotation ◮ (Adaptive) redundancy removal

Control/heuristics for clause/group/variable ordering Testing of computed MUSes (etc) SAT solvers are used in a black-box manner; can use various SAT solvers.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 26

slide-126
SLIDE 126

Current and Future Work

Heuristics

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 27

slide-127
SLIDE 127

Current and Future Work

Heuristics Scalability

◮ New algorithms, new optimization techniques.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 27

slide-128
SLIDE 128

Current and Future Work

Heuristics Scalability

◮ New algorithms, new optimization techniques.

Applications

◮ New applications typically pose new types of problems.

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 27

slide-129
SLIDE 129

Current and Future Work

Heuristics Scalability

◮ New algorithms, new optimization techniques.

Applications

◮ New applications typically pose new types of problems.

Thank you for your attention !

  • A. Belov

MU and MUSes: Extensions and Generalizations EPCL Training Camp, 2012 # 27