On Deciding MUS Membership with QBF s Janota 1 Joao Marques-Silva 1 , - - PowerPoint PPT Presentation

on deciding mus membership with qbf
SMART_READER_LITE
LIVE PREVIEW

On Deciding MUS Membership with QBF s Janota 1 Joao Marques-Silva 1 , - - PowerPoint PPT Presentation

On Deciding MUS Membership with QBF s Janota 1 Joao Marques-Silva 1 , 2 Mikol a 1 INESC-ID/IST, Lisbon, Portugal 2 CASL/CSI, University College Dublin, Ireland (INESC-ID & UCD) cmMUS 1 / 18 CNF and Unsatisfiability y , { x y ,


slide-1
SLIDE 1

On Deciding MUS Membership with QBF

Mikol´ aˇ s Janota1 Joao Marques-Silva1,2

1 INESC-ID/IST, Lisbon, Portugal 2 CASL/CSI, University College Dublin, Ireland (INESC-ID & UCD) cmMUS 1 / 18

slide-2
SLIDE 2

CNF and Unsatisfiability

{ x ∨ y, ¬x, ¬y, z }

(INESC-ID & UCD) cmMUS 2 / 18

slide-3
SLIDE 3

CNF and Unsatisfiability

{ x ∨ y, ¬x, ¬y, z }

(INESC-ID & UCD) cmMUS 2 / 18

slide-4
SLIDE 4

CNF and Unsatisfiability

{ x ∨ y, ¬x, ¬y, z }

MUS

An UNSAT set of clauses that becomes SAT by removing any clause is called minimally unsatisfiable set (MUS)

(INESC-ID & UCD) cmMUS 2 / 18

slide-5
SLIDE 5

CNF and Unsatisfiability

{ x ∨ y, ¬x, ¬y, z }

MUS

An UNSAT set of clauses that becomes SAT by removing any clause is called minimally unsatisfiable set (MUS)

MUS-Membership

IN: a clause ω and a CNF φ Q: Is there an MUS ψ ⊆ φ such that ω ∈ ψ?

(INESC-ID & UCD) cmMUS 2 / 18

slide-6
SLIDE 6

Motivation

Restoring Consistency

Removing a clause that is not part of any MUS, will certainly not restore consistency.

(INESC-ID & UCD) cmMUS 3 / 18

slide-7
SLIDE 7

Motivation

Restoring Consistency

Removing a clause that is not part of any MUS, will certainly not restore consistency.

Product Configuration

When configuring a product, some sets of its features result in an inconsistent configuration. Clearly, it is useful for the user(s) to know if a feature is relevant for the inconsistency.

(INESC-ID & UCD) cmMUS 3 / 18

slide-8
SLIDE 8

How Hard Is It?

y2, y1, x2, x1, y2 → ¬z, y1 → ¬z, x2 → z, x1 → z, { ω }

(INESC-ID & UCD) cmMUS 4 / 18

slide-9
SLIDE 9

How Hard Is It?

y2, y1, x2, x1, y2 → ¬z, y1 → ¬z, x2 → z, x1 → z, { ω }

(INESC-ID & UCD) cmMUS 4 / 18

slide-10
SLIDE 10

How Hard Is It?

y2, y1, x2, x1, y2 → ¬z, y1 → ¬z, x2 → z, x1 → z, { ω }

(INESC-ID & UCD) cmMUS 4 / 18

slide-11
SLIDE 11

How Hard Is It?

y2, y1, x2, x1, y2 → ¬z, y1 → ¬z, x2 → z, x1 → z, { ω }

(INESC-ID & UCD) cmMUS 4 / 18

slide-12
SLIDE 12

How Hard Is It?

y2, y1, x2, x1, y2 → ¬z, y1 → ¬z, x2 → z, x1 → z, { ω }

(INESC-ID & UCD) cmMUS 4 / 18

slide-13
SLIDE 13

How Hard Is It?

y2, y1, x2, x1, y2 → ¬z, y1 → ¬z, x2 → z, x1 → z, { ω } MUS-Membership is ΣP

2 -complete [Kul07]

(INESC-ID & UCD) cmMUS 4 / 18

slide-14
SLIDE 14

Approaches to the Problem

MUS-membership MSS-membership Circ-Infer, O(n) [JGMS10] QBF2,∃, O(n) [JMS11] QBF3,∃, O(n) QBF2,∃, O(n2)

(INESC-ID & UCD) cmMUS 5 / 18

slide-15
SLIDE 15

Quantifying over Subsets

Relaxation

φ∗ = {c ∨ rc | c ∈ φ}

(INESC-ID & UCD) cmMUS 6 / 18

slide-16
SLIDE 16

Quantifying over Subsets

Relaxation

φ∗ = {c ∨ rc | c ∈ φ}

Relaxing Clauses Example

φ = {x ∨ y, ¬x, ¬y} φ∗ = {r1 ∨ x ∨ y, r2 ∨ ¬x, r3 ∨ ¬y}

(INESC-ID & UCD) cmMUS 6 / 18

slide-17
SLIDE 17

Quantifying over Subsets

Relaxation

φ∗ = {c ∨ rc | c ∈ φ}

Relaxing Clauses Example

φ = {x ∨ y, ¬x, ¬y} φ∗ = {r1 ∨ x ∨ y, r2 ∨ ¬x, r3 ∨ ¬y} r1 = 0 r1 ∨ x ∨ y r2 = 0 r2 ∨ ¬x r3 = 1 r3 ∨ ¬y

(INESC-ID & UCD) cmMUS 6 / 18

slide-18
SLIDE 18

Quantifying over Subsets

Relaxation

φ∗ = {c ∨ rc | c ∈ φ}

Relaxing Clauses Example

φ = {x ∨ y, ¬x, ¬y} φ∗ = {r1 ∨ x ∨ y, r2 ∨ ¬x, r3 ∨ ¬y} r1 = 0 r1 ∨ x ∨ y r2 = 0 r2 ∨ ¬x r3 = 1 r3 ∨ ¬y

(INESC-ID & UCD) cmMUS 6 / 18

slide-19
SLIDE 19

Modeling Elements

Membership

∃R. ¬rω

(INESC-ID & UCD) cmMUS 7 / 18

slide-20
SLIDE 20

Modeling Elements

Membership

∃R. ¬rω

Unsat

∃R.∀X. ¬φ∗(R, X)

(INESC-ID & UCD) cmMUS 7 / 18

slide-21
SLIDE 21

Modeling Elements

Membership

∃R. ¬rω

Unsat

∃R.∀X. ¬φ∗(R, X)

Subset

R = {r1, . . . , rn}, R′ = {r′

1, . . . , r′ n}

R < R′ ≡

  • ri∈R

ri ⇒ r′

i ∧

  • ri∈R

¬ri ∧ r′

i

(INESC-ID & UCD) cmMUS 7 / 18

slide-22
SLIDE 22

Na¨ ıve Approaches

Schema

exists ψ ⊆ φ s.t. ω ∈ ψ and ψ is unsatisfiable and forall ψ′ ψ is satisfiable

(INESC-ID & UCD) cmMUS 8 / 18

slide-23
SLIDE 23

Na¨ ıve Approaches

Schema

exists ψ ⊆ φ s.t. ω ∈ ψ and ψ is unsatisfiable and forall ψ′ ψ is satisfiable

3-level quantification

∃R. ¬rω ∧ (∀X.¬φ∗(R, X)) ∧ (∀R′.(R < R′) ⇒ ∃X ′.φ∗(R′, X ′))

(INESC-ID & UCD) cmMUS 8 / 18

slide-24
SLIDE 24

Na¨ ıve Approaches

Schema

exists ψ ⊆ φ s.t. ω ∈ ψ and ψ is unsatisfiable and forall ψ′ ψ is satisfiable

3-level quantification

∃R. ¬rω ∧ (∀X.¬φ∗(R, X)) ∧ (∀R′.(R < R′) ⇒ ∃X ′.φ∗(R′, X ′))

2-level quantification, O(n2)

∃R. ¬rω∧(∀X.¬φ∗(R, X))∧

  • rωi ∈R (¬rωi ⇒ ∃X ωi.φ∗[rωi/1](R, X ωi))

(INESC-ID & UCD) cmMUS 8 / 18

slide-25
SLIDE 25

Na¨ ıve Approaches

Schema

exists ψ ⊆ φ s.t. ω ∈ ψ and ψ is unsatisfiable and forall ψ′ ψ is satisfiable

3-level quantification

∃R. ¬rω ∧ (∀X.¬φ∗(R, X)) ∧ (∀R′.(R < R′) ⇒ ∃X ′.φ∗(R′, X ′))

2-level quantification, O(n2)

∃R. ¬rω∧(∀X.¬φ∗(R, X))∧

  • rωi ∈R (¬rωi ⇒ ∃X ωi.φ∗[rωi/1](R, X ωi))

2-level quantification, O(n2), prefix form

∃RX ω1 . . . ∃X ωn∀X. ¬rω ∧ ¬φ∗(R, X) ∧

  • rωi ∈R (¬rωi ⇒ φ∗[rωi/1](R, X ωi))

(INESC-ID & UCD) cmMUS 8 / 18

slide-26
SLIDE 26

Approaches to the Problem

MUS-membership MSS-membership Circ-Infer, O(n) [JGMS10] QBF2,∃, O(n) [JMS11] QBF3,∃, O(n) QBF2,∃, O(n2)

(INESC-ID & UCD) cmMUS 9 / 18

slide-27
SLIDE 27

From MUS-Membership to MSS-Membership

MSS

A set of clauses ψ ⊆ φ is a Maximally Satisfiable Subset (MSS) iff ψ is satisfiable and any set ψ′ ⊆ φ such that ψ ψ′ is unsatisfiable.

(INESC-ID & UCD) cmMUS 10 / 18

slide-28
SLIDE 28

From MUS-Membership to MSS-Membership

MSS

A set of clauses ψ ⊆ φ is a Maximally Satisfiable Subset (MSS) iff ψ is satisfiable and any set ψ′ ⊆ φ such that ψ ψ′ is unsatisfiable.

MSS-membership

IN: A CNF formula φ and a clause ω ∈ φ. Q: Is there an MSS ψ of φ such that ω / ∈ ψ?

(INESC-ID & UCD) cmMUS 10 / 18

slide-29
SLIDE 29

MUS-Membership ↔ MSS-membership

A clause ω belongs to some MUS iff there is some MSS that does not contain ω.

(INESC-ID & UCD) cmMUS 11 / 18

slide-30
SLIDE 30

MUS-Membership ↔ MSS-membership

A clause ω belongs to some MUS iff there is some MSS that does not contain ω.

MSS-membership to QBF

∃R∃X∀R′∀X ′. rω ∧ φ∗(R, X) ∧ (R′ < R ⇒ ¬φ∗(R′, X ′))

(INESC-ID & UCD) cmMUS 11 / 18

slide-31
SLIDE 31

Minimal Models

A model of a formula is V-minimal iff flipping any subset of 1-values of variables from V to 0, yields a non-model.

(INESC-ID & UCD) cmMUS 12 / 18

slide-32
SLIDE 32

Minimal Models

A model of a formula is V-minimal iff flipping any subset of 1-values of variables from V to 0, yields a non-model. x ∨ (y ∧ z) [0,0,0] [0,1,0] [0,0,1] [1,0,0] [1,1,0] [1,0,1] [0,1,1] [1,1,1]

(INESC-ID & UCD) cmMUS 12 / 18

slide-33
SLIDE 33

Minimal Models

A model of a formula is V-minimal iff flipping any subset of 1-values of variables from V to 0, yields a non-model. x ∨ (y ∧ z) [0,0,0] [0,1,0] [0,0,1] [1,0,0] [1,1,0] [1,0,1] [0,1,1] [1,1,1]

(INESC-ID & UCD) cmMUS 12 / 18

slide-34
SLIDE 34

Minimal Models

A model of a formula is V-minimal iff flipping any subset of 1-values of variables from V to 0, yields a non-model. x ∨ (y ∧ z) [0,0,0] [0,1,0] [0,0,1] [1,0,0] [1,1,0] [1,0,1] [0,1,1] [1,1,1] [1,0,0] [0,1,1]

(INESC-ID & UCD) cmMUS 12 / 18

slide-35
SLIDE 35

Entailment in Circumscription

CircInfer

IN: τ and ψ be propositional formulas Q: Does ψ hold in all minimal models of τ. τ | =min ψ

(INESC-ID & UCD) cmMUS 13 / 18

slide-36
SLIDE 36

Entailment in Circumscription

CircInfer

IN: τ and ψ be propositional formulas Q: Does ψ hold in all minimal models of τ. τ | =min ψ

CircInfer, complexity

Deciding τ | =min ψ is in ΠP

2 -complete [EG93]

(INESC-ID & UCD) cmMUS 13 / 18

slide-37
SLIDE 37

MSSes and Minimal Models

φ = {x, ¬x, z} r1 . . . x r2 . . . ¬x r3 . . . z

(INESC-ID & UCD) cmMUS 14 / 18

slide-38
SLIDE 38

MSSes and Minimal Models

φ = {x, ¬x, z} r1 . . . x r2 . . . ¬x r3 . . . z {x, ¬x, z}, [0,0,0] {x, z}, [0,1,0] {¬x, z}, [1,0,0] {x, ¬x}, [0,0,1] {x}, [0,1,1] {¬x}, [1,0,1] {z}, [1,1,0] {}, [1,1,1]

(INESC-ID & UCD) cmMUS 14 / 18

slide-39
SLIDE 39

MSSes and Minimal Models

φ = {x, ¬x, z} r1 . . . x r2 . . . ¬x r3 . . . z {x, ¬x, z}, [0,0,0] {x, z}, [0,1,0] {¬x, z}, [1,0,0] {x, ¬x}, [0,0,1] {x}, [0,1,1] {¬x}, [1,0,1] {z}, [1,1,0] {}, [1,1,1]

(INESC-ID & UCD) cmMUS 14 / 18

slide-40
SLIDE 40

MSSes and Minimal Models

φ = {x, ¬x, z} r1 . . . x r2 . . . ¬x r3 . . . z {x, ¬x, z}, [0,0,0] {x, z}, [0,1,0] {¬x, z}, [1,0,0] {x, ¬x}, [0,0,1] {x}, [0,1,1] {¬x}, [1,0,1] {z}, [1,1,0] {}, [1,1,1] {¬x, z}, [1,0,0] {x, z}, [0,1,0]

(INESC-ID & UCD) cmMUS 14 / 18

slide-41
SLIDE 41

From MSS-Membership to CircInfer

MSSes ↔ Min. Models

MSSes correspond to R-minimal models of φ∗(R, X).

(INESC-ID & UCD) cmMUS 15 / 18

slide-42
SLIDE 42

From MSS-Membership to CircInfer

MSSes ↔ Min. Models

MSSes correspond to R-minimal models of φ∗(R, X).

MUS-Membership ↔ MSS-Membership ↔ CircInfer

A clause ω belongs to some MUS of φ iff there exists a R-minimal model M of φ∗ such that M | = rω, equivalently: φ∗ circ

R

¬rω

(INESC-ID & UCD) cmMUS 15 / 18

slide-43
SLIDE 43

cmMUS look4MUS MSS enum.

  • 2lev. lin.

Nemesis (223) 223 223 31 29 DC (84) 46 13 49 36 dining phil. (22) 17 17 4 8 dimacs (87) 87 82 51 51 ezfact (41) 20 11 11 10 total (457) 393 346 146 134

  • 2lev. qv.
  • 3lev. lin. (QuBE)
  • 3lev. lin. (sSolve)

Nemesis (223) 9 13 DC (84) 4 dining phil. (22) 2 1 dimacs (87) 18 25 4 ezfact (41) total (457) 29 43 4

(INESC-ID & UCD) cmMUS 16 / 18

slide-44
SLIDE 44

Results

200 400 600 800 1000 1200 2 4 6 8 10 12 14 16 18 CPU time instances dining philosophers cmMUS look4MUS MSS enum.

  • 2lev. qv.

2lev lin.

  • 3lev. lin.

(INESC-ID & UCD) cmMUS 17 / 18

slide-45
SLIDE 45

Summary

MUS-membership MSS-membership Circ-Infer, O(n) [JGMS10] QBF2,∃, O(n) [JMS11] QBF3,∃, O(n) QBF2,∃, O(n2)

(INESC-ID & UCD) cmMUS 18 / 18

slide-46
SLIDE 46

Thomas Eiter and Georg Gottlob. Propositional circumscription and extended closed-world reasoning are ΠP

2 -complete.

  • Theor. Comput. Sci., 114(2):231–245, 1993.

Mikol´ aˇ s Janota, Radu Grigore, and Joao Marques-Silva. Counterexample guided abstraction refinement algorithm for propositional circumscription. In JELIA ‘10, 2010. Mikol´ aˇ s Janota and Joao Marques-Silva. Abstraction-based algorithm for 2QBF. In SAT, 2011. Oliver Kullmann. Constraint satisfaction problems in clausal form: Autarkies and minimal unsatisfiability. ECCC, 14(055), 2007.

(INESC-ID & UCD) cmMUS 18 / 18