200 likes | 278 Views
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.
E N D
Searching for AutarkiestoTrim 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. A partial assignment satisfying all clauses containing one of the assigned variables. (a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e) (a)(¬a b)(¬a ¬b)(¬b c)(de)(¬d ¬e) c: TRUE d: TRUE e: FALSE In this talk: “Autarky” = the satisfied clauses.
Autarkies and Infeasibility • Autarkies are disjoint from any clauses involved with the infeasibility of an instance. • (Resolution proofs, minimal unsatisfiable subsets, etc.) (a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e) (a)(¬a b)(¬a ¬b)(¬b c)(de)(¬d ¬e) Minimal Unsatisfiable Subset (MUS); Leaves of any resolution refutation. Autarky [O. Kullmann. Investigations on autark assignments. Discrete Applied Mathematics, 107(1-3):99–137, 2000.]
Outline • Introduction • Previous work • Encoding MaxAutarky to SAT Optimization • Comparison to previous work • Autarkies in industrial instances • Trimming autarkies • Conclusion
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
(¬a b) (b) (a) Т (¬b) (¬a ¬b) Previous Work: Finding Autarkies • Kullmann’s method for MaxAutarky Given a formula F: • If F is SAT, return the satisfying assignment. • Form a resolution refutation, T, of F. • Remove variables in T from F. • Goto 1. 1. : UNSAT (a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e) {a,b} c=TRUE d=TRUE e=FALSE 2. 3. 1. SAT (c)(d e)(¬d ¬e) [O. Kullmann. On the use of autarkies for satisfiability decision. (SAT-2001), pages 231–253.]
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.
An Encoding to SAT • Replace literals with literal substitutes: • Add clause-selector variables: • Link literal substitutes to variable-selectors: • Link clause-selectors with variable-selectors: (a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e) (a1)(a0b1)(a0b0)(b0c1)(d1e1)(d0e0) (¬y1a1)(¬y2a0 b1)(¬y3a0 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+) . . . (a+ y1)(a+ y2)(a+ y3) . . . (e+ y5)(e+ y6)
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)
Removing Pure Literals • Pure literals: Variables appearing in one polarity (pos./neg.) throughout a formula. • Pure literal = [partial] autark assignment • First steps for MaxAutarky: • Scan for and remove clauses w/ pure literals • Repeat until no pure literals remain (a)(¬a b)(¬a ¬b)(¬b c)(d e)(¬d ¬e)
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
Comparison: Experimental 1000 600 sec. timeout Benz 100 Miter Dimacs nPipe 10 BMC:Barrel BMC:Longmult 1 BMC:Queueinvar Sifter (seconds) 0.1 0.01 0.001 0.0001 0.0001 0.001 0.01 0.1 1 10 100 1000 Scraper (seconds) 600 sec. timeout
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)
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)
Trimming Autarkies for SMUS 1000 600 sec. timeout 100 10 Autarkies trimmed (seconds) 1 0.1 0.01 0.01 0.1 1 10 100 1000 Without trimming autarkies (seconds)
Trimming Autarkies for CAMUS (phase 1) 1000 600 sec. timeout 100 10 Autarkies trimmed (seconds) 1 0.1 0.01 0.01 0.1 1 10 100 1000 Without trimming autarkies (seconds)
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
Thank you Mark Liffiton liffiton@eecs.umich.edu www.eecs.umich.edu/~liffiton/
CAMUS • Compute All Minimal Unsatisfiable Subsets • Finds all MCSes of a constraint system • Computes minimal hitting sets of the MCSes Constraints CAMUS Compute MinimalHitting Sets Find MCSes MCSes All MUSes