accelerating mus extraction with recursive model rotation

69
Accelerating MUS Extraction with Recursive Model Rotation Anton Belov and Joao Marques-Silva Complex and Adaptive Systems Laboratory School of Computer Science and Informatics University College Dublin, Ireland FMCAD 2011 October 31, 2011 Austin, TX, USA A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 1 / 16

Upload: ledan

Post on 05-Jan-2017

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Accelerating MUS Extraction with Recursive Model Rotation

Accelerating MUS Extractionwith

Recursive Model Rotation

Anton Belov and Joao Marques-Silva

Complex and Adaptive Systems LaboratorySchool of Computer Science and Informatics

University College Dublin, Ireland

FMCAD 2011October 31, 2011Austin, TX, USA

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 1 / 16

Page 2: Accelerating MUS Extraction with Recursive Model Rotation

Introduction

Minimal Unsatisfiability

I F is minimally unsatisfiable (F ∈ MU), if F ∈ UNSAT and for anyC ∈ F , F \ C ∈ SAT.

I F ′ is minimally unsatisfiable subformula (MUS) of F

(F ′ ∈ MUS(F )) if F ′ ⊆ F and F ′ ∈ MU.

Example

I {C1,C2,C3,C4} ∈ MU.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 2 / 16

Page 3: Accelerating MUS Extraction with Recursive Model Rotation

Introduction

Minimal Unsatisfiability

I F is minimally unsatisfiable (F ∈ MU), if F ∈ UNSAT and for anyC ∈ F , F \ C ∈ SAT.

I F ′ is minimally unsatisfiable subformula (MUS) of F

(F ′ ∈ MUS(F )) if F ′ ⊆ F and F ′ ∈ MU.

Example

I {C1,C2,C3,C4} ∈ MU.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 2 / 16

Page 4: Accelerating MUS Extraction with Recursive Model Rotation

Introduction

Minimal Unsatisfiability

I F is minimally unsatisfiable (F ∈ MU), if F ∈ UNSAT and for anyC ∈ F , F \ C ∈ SAT.

I F ′ is minimally unsatisfiable subformula (MUS) of F

(F ′ ∈ MUS(F )) if F ′ ⊆ F and F ′ ∈ MU.

Example

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

I {C1,C2,C3,C4} ∈ MU.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 2 / 16

Page 5: Accelerating MUS Extraction with Recursive Model Rotation

Introduction

Minimal Unsatisfiability

I F is minimally unsatisfiable (F ∈ MU), if F ∈ UNSAT and for anyC ∈ F , F \ C ∈ SAT.

I F ′ is minimally unsatisfiable subformula (MUS) of F

(F ′ ∈ MUS(F )) if F ′ ⊆ F and F ′ ∈ MU.

Example

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

I {C1,C2,C3,C4} ∈ MU.

I F = {C1, . . . ,C6} ∈ UNSAT, but /∈ MU.A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 2 / 16

Page 6: Accelerating MUS Extraction with Recursive Model Rotation

Introduction

Minimal Unsatisfiability

I F is minimally unsatisfiable (F ∈ MU), if F ∈ UNSAT and for anyC ∈ F , F \ C ∈ SAT.

I F ′ is minimally unsatisfiable subformula (MUS) of F

(F ′ ∈ MUS(F )) if F ′ ⊆ F and F ′ ∈ MU.

Example

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

I {C1,C2,C3,C4} ∈ MU.

I {C1,C2,C3,C4} ∈ MUS(F ).A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 2 / 16

Page 7: Accelerating MUS Extraction with Recursive Model Rotation

Introduction

Minimal Unsatisfiability

I F is minimally unsatisfiable (F ∈ MU), if F ∈ UNSAT and for anyC ∈ F , F \ C ∈ SAT.

I F ′ is minimally unsatisfiable subformula (MUS) of F

(F ′ ∈ MUS(F )) if F ′ ⊆ F and F ′ ∈ MU.

Example

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

I {C1,C2,C3,C4} ∈ MU.

I {C3,C4,C5,C6} ∈ MUS(F ).A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 2 / 16

Page 8: Accelerating MUS Extraction with Recursive Model Rotation

Introduction

Minimal Unsatisfiability

I F is minimally unsatisfiable (F ∈ MU), if F ∈ UNSAT and for anyC ∈ F , F \ C ∈ SAT.

I F ′ is minimally unsatisfiable subformula (MUS) of F

(F ′ ∈ MUS(F )) if F ′ ⊆ F and F ′ ∈ MU.

Applications of MUSes (in formal methods)

I Abstraction refinement frameworks.

I Decision procedures.

I Design debugging.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 2 / 16

Page 9: Accelerating MUS Extraction with Recursive Model Rotation

Computation of MUSes

I Based on iterative calls to SAT solver (not the only way, but currentlythe most effective): for each C ∈ F

I if F \ {C} ∈ UNSAT, then there is an MUS of F that does not containC → remove C from F .

I if F \ {C} ∈ SAT (C is necessary for F ), then C is in all MUSes of F→ keep C .

I SAT solving is the main bottleneck of the computation, hencereduction in the number of SAT solver calls is the key to efficiency.

I On UNSAT outcomes – clause set refinement : remove C and allclauses outside the unsatisfiable core of F \ {C}. [Dershowitz et al’06]

I On SAT outcomes – model rotation : detect additional necessaryclauses without SAT solver calls. [Marques-Silva&Lynce’11]

Recursive model rotation (RMR) – very effective improvement ofmodel rotation. [this paper]

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 3 / 16

Page 10: Accelerating MUS Extraction with Recursive Model Rotation

Computation of MUSes

I Based on iterative calls to SAT solver (not the only way, but currentlythe most effective): for each C ∈ F

I if F \ {C} ∈ UNSAT, then there is an MUS of F that does not containC → remove C from F .

I if F \ {C} ∈ SAT (C is necessary for F ), then C is in all MUSes of F→ keep C .

I SAT solving is the main bottleneck of the computation, hencereduction in the number of SAT solver calls is the key to efficiency.

I On UNSAT outcomes – clause set refinement : remove C and allclauses outside the unsatisfiable core of F \ {C}. [Dershowitz et al’06]

I On SAT outcomes – model rotation : detect additional necessaryclauses without SAT solver calls. [Marques-Silva&Lynce’11]

Recursive model rotation (RMR) – very effective improvement ofmodel rotation. [this paper]

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 3 / 16

Page 11: Accelerating MUS Extraction with Recursive Model Rotation

Computation of MUSes

I Based on iterative calls to SAT solver (not the only way, but currentlythe most effective): for each C ∈ F

I if F \ {C} ∈ UNSAT, then there is an MUS of F that does not containC → remove C from F .

I if F \ {C} ∈ SAT (C is necessary for F ), then C is in all MUSes of F→ keep C .

I SAT solving is the main bottleneck of the computation, hencereduction in the number of SAT solver calls is the key to efficiency.

I On UNSAT outcomes – clause set refinement : remove C and allclauses outside the unsatisfiable core of F \ {C}. [Dershowitz et al’06]

I On SAT outcomes – model rotation : detect additional necessaryclauses without SAT solver calls. [Marques-Silva&Lynce’11]

Recursive model rotation (RMR) – very effective improvement ofmodel rotation. [this paper]

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 3 / 16

Page 12: Accelerating MUS Extraction with Recursive Model Rotation

Computation of MUSes

I Based on iterative calls to SAT solver (not the only way, but currentlythe most effective): for each C ∈ F

I if F \ {C} ∈ UNSAT, then there is an MUS of F that does not containC → remove C from F .

I if F \ {C} ∈ SAT (C is necessary for F ), then C is in all MUSes of F→ keep C .

I SAT solving is the main bottleneck of the computation, hencereduction in the number of SAT solver calls is the key to efficiency.

I On UNSAT outcomes – clause set refinement : remove C and allclauses outside the unsatisfiable core of F \ {C}. [Dershowitz et al’06]

I On SAT outcomes – model rotation : detect additional necessaryclauses without SAT solver calls. [Marques-Silva&Lynce’11]

Recursive model rotation (RMR) – very effective improvement ofmodel rotation. [this paper]

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 3 / 16

Page 13: Accelerating MUS Extraction with Recursive Model Rotation

Impact of RMR

I 500 benchmarks submitted to MUS track of SAT Competition 2011.I Time limit 1200 sec, memory limit 4 GB.

1

10

100

1000

10000

1 10 100 1000 10000

MU

Se

r2 (

with

RM

R),

# S

AT

so

lve

r ca

lls

MUSer2 w/o RMR, # SAT solver calls

0.1

1

10

100

1000

0.1 1 10 100 1000

MU

Se

r2 (

with

RM

R),

CP

U t

ime

(se

c)

MUSer2 w/o RMR, CPU time (sec)

I MUS computation without RMR (x-axis) vs with RMR (y -axis)I Left: number of SAT solver calls (on instances solved in both cases).

I Right: CPU time (sec).

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 4 / 16

Page 14: Accelerating MUS Extraction with Recursive Model Rotation

Impact of RMR

I 500 benchmarks submitted to MUS track of SAT Competition 2011.I Time limit 1200 sec, memory limit 4 GB.

1

10

100

1000

10000

1 10 100 1000 10000

MU

Se

r2 (

with

RM

R),

# S

AT

so

lve

r ca

lls

MUSer2 w/o RMR, # SAT solver calls

0.1

1

10

100

1000

0.1 1 10 100 1000

MU

Se

r2 (

with

RM

R),

CP

U t

ime

(se

c)

MUSer2 w/o RMR, CPU time (sec)

I MUS computation without RMR (x-axis) vs with RMR (y -axis)I Left: number of SAT solver calls (on instances solved in both cases).I Right: CPU time (sec).

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 4 / 16

Page 15: Accelerating MUS Extraction with Recursive Model Rotation

Computation of MUSes

Use SAT solver to identify necessary (or, transition ) clauses

I C ∈ F is necessary for F , if F ∈ UNSAT and F \ {C} ∈ SAT.

I F ∈ MU iff every clause C ∈ F is necessary for F .

I If C is necessary for F then C is necessary for every unsatisfiablesubset of F .

Deletion-based MUS ComputationInput : F — an unsatisfiable CNF formulaM ← F // Inv: M is a superset of some MUS of Fforeach C ∈ F do

if M \ {C} ∈ UNSAT then // is C necessary for M ?

// no - delete it

M ← M \ {C}// yes - keep it

return M // Every C ∈ M is necessary for M

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 5 / 16

Page 16: Accelerating MUS Extraction with Recursive Model Rotation

Computation of MUSes

Use SAT solver to identify necessary (or, transition ) clauses

I C ∈ F is necessary for F , if F ∈ UNSAT and F \ {C} ∈ SAT.

I F ∈ MU iff every clause C ∈ F is necessary for F .

I If C is necessary for F then C is necessary for every unsatisfiablesubset of F .

Deletion-based MUS ComputationInput : F — an unsatisfiable CNF formulaM ← F // Inv: M is a superset of some MUS of Fforeach C ∈ F do

if M \ {C} ∈ UNSAT then // is C necessary for M ?

// no - delete it

M ← M \ {C}// yes - keep it

return M // Every C ∈ M is necessary for M

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 5 / 16

Page 17: Accelerating MUS Extraction with Recursive Model Rotation

Computation of MUSes

Use SAT solver to identify necessary (or, transition ) clauses

I C ∈ F is necessary for F , if F ∈ UNSAT and F \ {C} ∈ SAT.

I F ∈ MU iff every clause C ∈ F is necessary for F .

I If C is necessary for F then C is necessary for every unsatisfiablesubset of F .

Deletion-based MUS ComputationInput : F — an unsatisfiable CNF formulaM ← F // Inv: M is a superset of some MUS of Fforeach C ∈ F do

if M \ {C} ∈ UNSAT then // is C necessary for M ?

// no - delete it

M ← M \ {C}// yes - keep it

return M // Every C ∈ M is necessary for M

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 5 / 16

Page 18: Accelerating MUS Extraction with Recursive Model Rotation

Computation of MUSes

Use SAT solver to identify necessary (or, transition ) clauses

I C ∈ F is necessary for F , if F ∈ UNSAT and F \ {C} ∈ SAT.

I F ∈ MU iff every clause C ∈ F is necessary for F .

I If C is necessary for F then C is necessary for every unsatisfiablesubset of F .

Deletion-based MUS ComputationInput : F — an unsatisfiable CNF formulaM ← F // Inv: M is a superset of some MUS of Fforeach C ∈ F do

if M \ {C} ∈ UNSAT then // is C necessary for M ?

// no - delete it

M ← M \ {C}// yes - keep it

return M // Every C ∈ M is necessary for MA. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 5 / 16

Page 19: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 20: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 21: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary → M = M \ {C1}

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 22: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary → M = M \ {C1}M \ {C3} ∈ SAT, hence C3 is necessary

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 23: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary → M = M \ {C1}M \ {C3} ∈ SAT, hence C3 is necessary → keep C3

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 24: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary → M = M \ {C1}M \ {C3} ∈ SAT, hence C3 is necessary → keep C3

M \ {C5} ∈ SAT, hence C5 is necessary

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 25: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary → M = M \ {C1}M \ {C3} ∈ SAT, hence C3 is necessary → keep C3

M \ {C5} ∈ SAT, hence C5 is necessary → keep C5

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 26: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary → M = M \ {C1}M \ {C3} ∈ SAT, hence C3 is necessary → keep C3

M \ {C5} ∈ SAT, hence C5 is necessary → keep C5

M \ {C2} ∈ UNSAT, hence C2 is not necessary

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 27: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary → M = M \ {C1}M \ {C3} ∈ SAT, hence C3 is necessary → keep C3

M \ {C5} ∈ SAT, hence C5 is necessary → keep C5

M \ {C2} ∈ UNSAT, hence C2 is not necessary → M = M \ {C2}

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 28: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary → M = M \ {C1}M \ {C3} ∈ SAT, hence C3 is necessary → keep C3

M \ {C5} ∈ SAT, hence C5 is necessary → keep C5

M \ {C2} ∈ UNSAT, hence C2 is not necessary → M = M \ {C2}M \ {C4} ∈ SAT, hence C4 is necessary

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 29: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary → M = M \ {C1}M \ {C3} ∈ SAT, hence C3 is necessary → keep C3

M \ {C5} ∈ SAT, hence C5 is necessary → keep C5

M \ {C2} ∈ UNSAT, hence C2 is not necessary → M = M \ {C2}M \ {C4} ∈ SAT, hence C4 is necessary → keep C4

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 30: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary → M = M \ {C1}M \ {C3} ∈ SAT, hence C3 is necessary → keep C3

M \ {C5} ∈ SAT, hence C5 is necessary → keep C5

M \ {C2} ∈ UNSAT, hence C2 is not necessary → M = M \ {C2}M \ {C4} ∈ SAT, hence C4 is necessary → keep C4

M \ {C6} ∈ SAT, hence C6 is necessary

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 31: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = F ∈ UNSAT

M \ {C1} ∈ UNSAT, hence C1 is not necessary → M = M \ {C1}M \ {C3} ∈ SAT, hence C3 is necessary → keep C3

M \ {C5} ∈ SAT, hence C5 is necessary → keep C5

M \ {C2} ∈ UNSAT, hence C2 is not necessary → M = M \ {C2}M \ {C4} ∈ SAT, hence C4 is necessary → keep C4

M \ {C6} ∈ SAT, hence C6 is necessary → keep C6

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 32: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = {C3,C4,C5,C6} is an MUS of F .

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 33: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = {C3,C4,C5,C6} is an MUS of F .

I Each clause in F \M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 34: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = {C3,C4,C5,C6} is an MUS of F .

I Each clause in F \M costs ≤ 1 SAT solver call – clause setrefinement.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 35: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = {C3,C4,C5,C6} is an MUS of F .

I Each clause in F \M costs ≤ 1 SAT solver call – clause setrefinement.

I Each clause in M costs one SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 36: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (an overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M = {C3,C4,C5,C6} is an MUS of F .

I Each clause in F \M costs ≤ 1 SAT solver call – clause setrefinement.

I Each clause in M costs ≤ 1 SAT solver call – model rotation.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 6 / 16

Page 37: Accelerating MUS Extraction with Recursive Model Rotation

Model Rotation [Marques-Silva&Lynce, SAT’11]

I Fact: C is necessary for F iff F ∈ UNSAT and ∃τ such that

Unsat(F , τ) = {C}. τ is a witness (of necessity) for C .

I During MUS extraction: when M \ {C} ∈ SAT, the assignment τfound by the SAT solver is a witness for C .

I Model rotation: given a witness τ for C , try to modify it into awitness τ ′ for another clause C ′. How ?

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 7 / 16

Page 38: Accelerating MUS Extraction with Recursive Model Rotation

Model Rotation [Marques-Silva&Lynce, SAT’11]

I Fact: C is necessary for F iff F ∈ UNSAT and ∃τ such that

Unsat(F , τ) = {C}. τ is a witness (of necessity) for C .

I During MUS extraction: when M \ {C} ∈ SAT, the assignment τfound by the SAT solver is a witness for C .

I Model rotation: given a witness τ for C , try to modify it into awitness τ ′ for another clause C ′. How ?

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 7 / 16

Page 39: Accelerating MUS Extraction with Recursive Model Rotation

Model Rotation [Marques-Silva&Lynce, SAT’11]

I Fact: C is necessary for F iff F ∈ UNSAT and ∃τ such that

Unsat(F , τ) = {C}. τ is a witness (of necessity) for C .

I During MUS extraction: when M \ {C} ∈ SAT, the assignment τfound by the SAT solver is a witness for C .

I Model rotation: given a witness τ for C , try to modify it into awitness τ ′ for another clause C ′. How ?

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 7 / 16

Page 40: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 8 / 16

Page 41: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 8 / 16

Page 42: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 8 / 16

Page 43: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 8 / 16

Page 44: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4}

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 8 / 16

Page 45: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 8 / 16

Page 46: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

Flip x in τ ′: back to τ . C3 is already known to be necessary.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 8 / 16

Page 47: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

Flip x in τ ′: back to τ . C3 is already known to be necessary.

Flip y in τ ′: τ ′′ = {x ,¬y , z}

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 8 / 16

Page 48: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

Flip x in τ ′: back to τ . C3 is already known to be necessary.

Flip y in τ ′: τ ′′ = {x ,¬y , z}, Unsat(M, τ ′′) = {C2,C6}.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 8 / 16

Page 49: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

Flip x in τ ′: back to τ . C3 is already known to be necessary.

Flip y in τ ′: τ ′′ = {x ,¬y , z}, Unsat(M, τ ′′) = {C2,C6}.Tried all variables in C4 — stop.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 8 / 16

Page 50: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

Flip x in τ ′: back to τ . C3 is already known to be necessary.

Flip y in τ ′: τ ′′ = {x ,¬y , z}, Unsat(M, τ ′′) = {C2,C6}.C4 is necessary, without SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 8 / 16

Page 51: Accelerating MUS Extraction with Recursive Model Rotation

Recursive Model Rotation (RMR) [this paper]

I Simple idea: when model rotation stops, backtrack to a necessaryclause detected earlier and flip another variable.

I Fact: let τ be a witness for C in F , that is Unsat(F , τ) = {C}.Then, the sets Unsat(F , τ |¬x) for x ∈ Var(C ) are pairwise disjoint.

I By flipping different variables we are likely to detect new necessaryclauses.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 9 / 16

Page 52: Accelerating MUS Extraction with Recursive Model Rotation

Recursive Model Rotation (RMR) [this paper]

I Simple idea: when model rotation stops, backtrack to a necessaryclause detected earlier and flip another variable.

I Fact: let τ be a witness for C in F , that is Unsat(F , τ) = {C}.Then, the sets Unsat(F , τ |¬x) for x ∈ Var(C ) are pairwise disjoint.

I By flipping different variables we are likely to detect new necessaryclauses.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 9 / 16

Page 53: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

Flip x in τ ′: back to τ . C3 is already known to be necessary.

Flip y in τ ′: τ ′′ = {x ,¬y , z}, Unsat(M, τ ′′) = {C2,C6}.Tried all variables in C4 — /////stop go back to C3 and τ .

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 10 / 16

Page 54: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 10 / 16

Page 55: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

Flip y in τ : τ ′ = {¬x ,¬y , z}

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 10 / 16

Page 56: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

Flip y in τ : τ ′ = {¬x ,¬y , z}, Unsat(M, τ ′) = {C6} → C6 is necessary.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 10 / 16

Page 57: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

Flip y in τ : τ ′ = {¬x ,¬y , z}, Unsat(M, τ ′) = {C6} → C6 is necessary.

Flip z in τ ′: τ ′′ = {¬x ,¬y ,¬z}

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 10 / 16

Page 58: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

Flip y in τ : τ ′ = {¬x ,¬y , z}, Unsat(M, τ ′) = {C6} → C6 is necessary.

Flip z in τ ′: τ ′′ = {¬x ,¬y ,¬z}, Unsat(M, τ ′′) = {C5} → C5 is necessary.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 10 / 16

Page 59: Accelerating MUS Extraction with Recursive Model Rotation

Example

F = {C1, . . . ,C6}

M (the overapproximation of some MUS of F ):

C1 = x ∨ y C3 = x ∨ ¬y C5 = y ∨ z

C2 = ¬x ∨ y C4 = ¬x ∨ ¬y C6 = y ∨ ¬z

M \ {C3} ∈ SAT, hence C3 is necessary.

SAT solver returns τ = {¬x , y , z}, Unsat(M, τ) = {C3}.Flip x in τ : τ ′ = {x , y , z}, Unsat(M, τ ′) = {C4} → C4 is necessary.

Flip y in τ : τ ′ = {¬x ,¬y , z}, Unsat(M, τ ′) = {C6} → C6 is necessary.

Flip z in τ ′: τ ′′ = {¬x ,¬y ,¬z}, Unsat(M, τ ′′) = {C5} → C5 is necessary.

C4, C5, C6 are necessary, without SAT solver call.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 10 / 16

Page 60: Accelerating MUS Extraction with Recursive Model Rotation

Recursive Model Rotation (RMR)

Input: M — an over-approximation of an MUS: C — a clause necessary for M: τ — a witness for C (i.e. Unsat(M, τ) = {C})

foreach x ∈ Var(C ) doτ ′ ← τ |¬x // flip xif Unsat(M, τ ′) = {C ′} and C ′ is not known to be necessary for Mthen

mark C ′ as necessaryRMR(M,C ′,τ ′)

I The second condition of if keeps the number of the recursive callslinear in the size of computed MUS.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 11 / 16

Page 61: Accelerating MUS Extraction with Recursive Model Rotation

Recursive Model Rotation (RMR)

Input: M — an over-approximation of an MUS: C — a clause necessary for M: τ — a witness for C (i.e. Unsat(M, τ) = {C})

foreach x ∈ Var(C ) doτ ′ ← τ |¬x // flip xif Unsat(M, τ ′) = {C ′} and C ′ is not known to be necessary for Mthen

mark C ′ as necessaryRMR(M,C ′,τ ′)

I The second condition of if keeps the number of the recursive callslinear in the size of computed MUS.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 11 / 16

Page 62: Accelerating MUS Extraction with Recursive Model Rotation

Recursive Model Rotation (RMR)

I 500 benchmarks submitted to MUS track of SAT Competition 2011.I Time limit 1200 sec, memory limit 4 GB.

0.1

1

10

100

1000

0.1 1 10 100 1000

MU

Se

r2 r

ecu

rsiv

e m

od

el ro

tatio

n,

CP

U t

ime

(se

c)

MUSer2 model rotation, CPU time (sec)

10

20

30

40

50

60

70

80

90

100

50 100 150 200 250 300 350 400 450% o

f cla

use

s in

th

e c

om

pu

ted

MU

S d

ete

cte

d b

y (

recu

srive

) m

od

el ro

tatio

n

Number of solved instances

recursive MRMR

I Left: model rotation (x-axis) vs. RMR (y -axis), CPU time (sec).

I Right: % of clauses in the computed MUS detected by RMR (red)and by (non-recursive) model rotation (blue).

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 12 / 16

Page 63: Accelerating MUS Extraction with Recursive Model Rotation

Recursive Model Rotation (RMR)

I 500 benchmarks submitted to MUS track of SAT Competition 2011.I Time limit 1200 sec, memory limit 4 GB.

0.1

1

10

100

1000

0.1 1 10 100 1000

MU

Se

r2 r

ecu

rsiv

e m

od

el ro

tatio

n,

CP

U t

ime

(se

c)

MUSer2 model rotation, CPU time (sec)

10

20

30

40

50

60

70

80

90

100

50 100 150 200 250 300 350 400 450% o

f cla

use

s in

th

e c

om

pu

ted

MU

S d

ete

cte

d b

y (

recu

srive

) m

od

el ro

tatio

n

Number of solved instances

recursive MRMR

I Left: model rotation (x-axis) vs. RMR (y -axis), CPU time (sec).I Right: % of clauses in the computed MUS detected by RMR (red)

and by (non-recursive) model rotation (blue).

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 12 / 16

Page 64: Accelerating MUS Extraction with Recursive Model Rotation

MUSer2 — MUS extractor with RMR

I 295 benchmarks used in the MUS track of SAT Competition 2011.I Time limit 1800 sec, memory limit 4 GB.

0

100

200

300

400

500

600

700

800

900

1000

1100

1200

1300

1400

1500

1600

1700

1800

100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260

CP

U tim

e (

sec)

number of solved instances (out of 295)

MoUsSaka (SAT Comp 3rd place)Haifa-MUC, no-pre (SAT Comp 1st place)

Haifa-MUC (SAT Comp 2nd place)MUSer2

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 13 / 16

Page 65: Accelerating MUS Extraction with Recursive Model Rotation

Summary

I Recursive Model Rotation (RMR) — simple but powerful techniquefor acceleration of MUS extraction.

I Clause reordering (see the paper) — gives a slight performance edge.

I MUSer2 — state-of-the-art MUS extractorI Download at http://logos.ucd.ie/wiki/doku.php?id=muser

Thank you for your attention !

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 14 / 16

Page 66: Accelerating MUS Extraction with Recursive Model Rotation

Summary

I Recursive Model Rotation (RMR) — simple but powerful techniquefor acceleration of MUS extraction.

I Clause reordering (see the paper) — gives a slight performance edge.

I MUSer2 — state-of-the-art MUS extractorI Download at http://logos.ucd.ie/wiki/doku.php?id=muser

Thank you for your attention !

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 14 / 16

Page 67: Accelerating MUS Extraction with Recursive Model Rotation

Impact of RMR

I 295 benchmarks used in the MUS track of SAT Competition 2011.I Time limit 1800 sec, memory limit 4 GB.

1

10

100

1000

10000

100000

1 10 100 1000 10000 100000

MU

Se

r2 (

with

RM

R),

# S

AT

so

lve

r ca

lls

MUSer2 w/o RMR, # SAT solver calls

0.1

1

10

100

1000

0.1 1 10 100 1000

MU

Se

r2 (

with

RM

R),

CP

U t

ime

(se

c)

MUSer2 w/o RMR, CPU time (sec)

I MUS computation without RMR (x-axis) vs with RMR (y -axis)I Left: number of SAT solver calls (instances solved in both cases).

I Right: CPU time (sec).

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 15 / 16

Page 68: Accelerating MUS Extraction with Recursive Model Rotation

Impact of RMR

I 295 benchmarks used in the MUS track of SAT Competition 2011.I Time limit 1800 sec, memory limit 4 GB.

1

10

100

1000

10000

100000

1 10 100 1000 10000 100000

MU

Se

r2 (

with

RM

R),

# S

AT

so

lve

r ca

lls

MUSer2 w/o RMR, # SAT solver calls

0.1

1

10

100

1000

0.1 1 10 100 1000

MU

Se

r2 (

with

RM

R),

CP

U t

ime

(se

c)

MUSer2 w/o RMR, CPU time (sec)

I MUS computation without RMR (x-axis) vs with RMR (y -axis)I Left: number of SAT solver calls (instances solved in both cases).I Right: CPU time (sec).

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 15 / 16

Page 69: Accelerating MUS Extraction with Recursive Model Rotation

Model Rotation [Marques-Silva&Lynce, SAT’11]

I 500 benchmarks submitted to MUS track of SAT Competition 2011.

I Time limit 1200 sec, memory limit 4 GB.

0.1

1

10

100

1000

0.1 1 10 100 1000

MU

Se

r2 m

od

el ro

tatio

n,

CP

U t

ime

(se

c)

MUSer2 no model rotation, CPU time (sec)

10

20

30

40

50

60

70

80

90

100

50 100 150 200 250 300 350 400 450

% o

f cla

use

s in

th

e c

om

pu

ted

MU

S d

ete

cte

d b

y m

od

el ro

tatio

n

Number of solved instances

I Left: no model rotation (x-axis) vs. model rotation (y -axis).

I Right: % of clauses in computed MUS detected by model rotation.

A. Belov, J. Marques-Silva (UCD, Dublin) Recursive Model Rotation FMCAD 2011 16 / 16