searching for autarkies to trim unsatisfiable clause sets

20
Searching for Autarkies to Trim Unsatisfiable Clause Sets Mark H. Liffiton and Karem A. Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu May 12, 2008

Upload: aristotle-thornton

Post on 03-Jan-2016

22 views

Category:

Documents


0 download

DESCRIPTION

Searching for Autarkies to Trim Unsatisfiable Clause Sets. Mark H. Liffiton and Karem A. Sakallah University of Michigan {liffiton, karem}@eecs.umich.edu May 12, 2008. Autarkies. Autarky: Self-sufficiency, Independence. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Searching for Autarkies to Trim Unsatisfiable Clause Sets

Searching for Autarkiesto

Trim Unsatisfiable Clause Sets

Mark H. Liffiton and Karem A. Sakallah

University of Michigan

{liffiton, karem}@eecs.umich.edu

May 12, 2008

Page 2: Searching for Autarkies to Trim Unsatisfiable Clause Sets

2

(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)

c: TRUEd: TRUEe: FALSE

Autarkies

Autarky: Self-sufficiency, Independence.

A partial assignment satisfying all clauses containing one of the assigned variables.

In this talk: “Autarky” = the satisfied clauses.

Page 3: Searching for Autarkies to Trim Unsatisfiable Clause Sets

3

(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)

Autarkies and Infeasibility

Autarkies are disjoint from any clauses involved with the infeasibility of an instance.

(Resolution proofs, minimal unsatisfiable subsets, etc.)

[O. Kullmann. Investigations on autark assignments. Discrete Applied Mathematics, 107(1-3):99–137, 2000.]

(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)

AutarkyMinimal Unsatisfiable Subset (MUS);

Leaves of any resolution refutation.

Page 4: Searching for Autarkies to Trim Unsatisfiable Clause Sets

4

Outline

Introduction

Previous work

Encoding MaxAutarky to SAT Optimization Comparison to previous work

Autarkies in industrial instances

Trimming autarkies

Conclusion

Page 5: Searching for Autarkies to Trim Unsatisfiable Clause Sets

5

Previous Work

Early work used autarkies within SAT algorithms (Monien and Speckenmeyer, Van Gelder)

Dealt mainly with "conditional autarkies“ Not developed for finding maximal autarkies

This work is motivated mainly by Kullmann's work on autarkies

Showed that clauses in a formula are partitioned into 1) the maximal autarky and2) clauses in any resolution proof

Developed an algorithm for MaxAutarky based on this concept

Page 6: Searching for Autarkies to Trim Unsatisfiable Clause Sets

6

1. : UNSAT

Previous Work: Finding Autarkies

[O. Kullmann. On the use of autarkies for satisfiability decision. (SAT-2001), pages 231–253.]

Kullmann’s method for MaxAutarkyGiven a formula F:

1. If F is SAT, return the satisfying assignment.

2. Form a resolution refutation, T, of F.

3. Remove variables in T from F.

4. Goto 1.

(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)

(a)

(¬a b)

(¬a ¬b)

(¬b)

(b) Т

{a,b}

(c)(d e)(¬d ¬e)(c)(d e)(¬d ¬e)

c=TRUE d=TRUE e=FALSE

2. 3. 1. SAT

Page 7: Searching for Autarkies to Trim Unsatisfiable Clause Sets

7

An Encoding to SAT

Deciding whether a formula has an autarky is NP-complete, thus it can be reduced to SAT.

A SAT encoding turns MaxAutarky into a SAT optimization problem.

Our MaxAutarky algorithm “Sifter”: Instrument CNF with extra variables that

enable/disable variables and clauses. Variables and clauses enabled in a satisfying

assignment indicate an autark assignment. Maximize enabled clauses to find maximal

autarky.

Page 8: Searching for Autarkies to Trim Unsatisfiable Clause Sets

8

An Encoding to SAT

1. Replace literals with literal substitutes:

2. Add clause-selector variables:

3. Link literal substitutes to variable-selectors:

4. Link clause-selectors with variable-selectors:

(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)

(a1)(a0 b1)(a0 b0)(b0 c1)(d1 e1)(d0 e0)(a1)(a0 b1)(a0 b0)(b0 c1)(d1 e1)(d0 e0)

(¬y1 a1)(¬y2 a0 b1)(¬y3 a0 b0) . . .(¬y1 a1)(¬y2 a0 b1)(¬y3 a0 b0) . . .

(¬y1 a1)(¬y2 a0 b1)(¬y3 a0 b0) . . .(a1 = a a+) (a0 = ¬a a+) (b1 = b b+) (b0 = ¬b b+) . . .

(¬y1 a1)(¬y2 a0 b1)(¬y3 a0 b0) . . .(a1 = a a+) (a0 = ¬a a+) (b1 = b b+) (b0 = ¬b b+) . . .

(¬y1 a1)(¬y2 a0 b1)(¬y3 a0 b0) . . .(a1 = a a+) (a0 = ¬a a+) (b1 = b b+) (b0 = ¬b b+) . . .

(a+ y1)(a+ y2)(a+ y3) . . . (e+ y5)(e+ y6)

(¬y1 a1)(¬y2 a0 b1)(¬y3 a0 b0) . . .(a1 = a a+) (a0 = ¬a a+) (b1 = b b+) (b0 = ¬b b+) . . .

(a+ y1)(a+ y2)(a+ y3) . . . (e+ y5)(e+ y6)

Page 9: Searching for Autarkies to Trim Unsatisfiable Clause Sets

9

An Encoding to SAT, Optimization

Objective: Maximize ∑ yi

Solved incrementally using a sliding objective Implemented with AtMost constraints

AtMost({l1,l2,…,ln},k) = ∑ assign(li) ≤ k

Employs a single incremental search,exploiting common SAT techniques.

(¬y1 a1)(¬y2 a0 b1)(¬y3 a0 b0) . . .(a1 = a a+) (a0 = ¬a a+) (b1 = b b+) (b0 = ¬b b+) . . .

(a+ y1)(a+ y2)(a+ y3) . . . (e+ y5)(e+ y6)

(¬y1 a1)(¬y2 a0 b1)(¬y3 a0 b0) . . .(a1 = a a+) (a0 = ¬a a+) (b1 = b b+) (b0 = ¬b b+) . . .

(a+ y1)(a+ y2)(a+ y3) . . . (e+ y5)(e+ y6)

Page 10: Searching for Autarkies to Trim Unsatisfiable Clause Sets

10

Removing Pure Literals

Pure literals: Variables appearing in one polarity (pos./neg.) throughout a formula.

Pure literal = [partial] autark assignment

First steps for MaxAutarky:1. Scan for and remove clauses w/ pure literals

2. Repeat until no pure literals remain

(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)(a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)

Page 11: Searching for Autarkies to Trim Unsatisfiable Clause Sets

11

Comparison: Experimental

“Scraper” (Kullmann’s MaxAutarky) vs “Sifter”

Both use same pure literal code (C++)

Scraper Perl script Calls zchaff and zverify_df (zchaff.64bit.2007.3.12)

Measured CPU time (excludes I/O time)

Sifter C++ Built on MiniSAT v.1.12b

Page 12: Searching for Autarkies to Trim Unsatisfiable Clause Sets

12

Comparison: Experimental

0.0001

0.001

0.01

0.1

1

10

100

1000

0.0001 0.001 0.01 0.1 1 10 100 1000

Scraper (seconds)

Sift

er (

seco

nds)

Benz

Miter

Dimacs

nPipe

BMC:Barrel

BMC:Longmult

BMC:Queueinvar

600 sec.timeout

600 sec.timeout

Page 13: Searching for Autarkies to Trim Unsatisfiable Clause Sets

13

Autarkies in Industrial InstancesFamily Variables Clauses |autarky|

min max min max min max

Benz 1,513 1,891 4,013 9,957 2,097 7,025

Miter 1,266 17,303 1,027 34,238 1 1,831

Dimacs 389 7,767 1,115 20,812 0 0

nPipe 861 15,469 6,695 394,739 0 0

BMC:Barrel 50 8,903 159 36,606 0 0

BMC:Longmult 437 7,807 1,206 24,351 2 2

BMC:Queueinvar 116 2,435 399 20,671 0 0

Page 14: Searching for Autarkies to Trim Unsatisfiable Clause Sets

14

Comparison: Qualitative

Both are built around standard SAT solvers, picking up advances as they are made

The encoding used in Sifter is a simple base for future work (e.g., local search)

Sifter is an anytime algorithm

Sifter can be easily modified to find approximations (modify the optimization technique)

Page 15: Searching for Autarkies to Trim Unsatisfiable Clause Sets

15

Trimming Autarkies as Preprocessing

Remove independent portions independent before analyzing infeasibility

Only possibly useful in cases where complexity of MaxAutarky is less than that of the analysis.

No: Single US, Single MUS Yes: Smallest MUS, All MUSes

Tested on “Benz” instances (manageable size, substantial autarkies)

Page 16: Searching for Autarkies to Trim Unsatisfiable Clause Sets

16

Trimming Autarkies for SMUS

0.01

0.1

1

10

100

1000

0.01 0.1 1 10 100 1000

Without trimming autarkies (seconds)

Au

tark

ies

trim

me

d (

seco

nd

s)

600 sec.timeout

Page 17: Searching for Autarkies to Trim Unsatisfiable Clause Sets

17

Trimming Autarkies for CAMUS (phase 1)

0.01

0.1

1

10

100

1000

0.01 0.1 1 10 100 1000

Without trimming autarkies (seconds)

Au

tark

ies

trim

me

d (

seco

nd

s)

600 sec.timeout

Page 18: Searching for Autarkies to Trim Unsatisfiable Clause Sets

18

Conclusion

Novel encoding of MaxAut to SAT

Experimental evaluation of Autarky algorithms

Investigating autarkies for several industrial benchmarks

Investigation of trimming autarkies for infeasibility analysis

Page 19: Searching for Autarkies to Trim Unsatisfiable Clause Sets

Thank you

Mark Liffiton

[email protected]

www.eecs.umich.edu/~liffiton/

Page 20: Searching for Autarkies to Trim Unsatisfiable Clause Sets

20

CAMUS

Compute All Minimal Unsatisfiable Subsets

1. Finds all MCSes of a constraint system

2. Computes minimal hitting sets of the MCSes

Constraints

Find MCSes MCSesCompute Minimal

Hitting Sets

All MUSes

CAMUS