Top Banner
SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005
23

SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

SymChaff:A Structure-Aware Satisfiability Solver

Ashish Sabharwal

University of Washington, Seattle

AAAI, July 2005

Page 2: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 2

SAT: The Satisfiability Problem Input: Boolean formula F in CNF

F = (x1 OR x2) AND (x1 OR x3 OR x4) AND …

Output: “satisfying assignment” or “unsat”

NP-complete, hence difficult but useful!

Probleminstance

e.g. planning,verification,design, …

CNFEncoder

F

domaindependent

sat

unsatSAT

Solver

generalpurpose

Page 3: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 3

SAT: The Satisfiability Problem Numerous real-world applications

hardware verification, testing, planning, scheduling, design automation, …

Dozens of academic/industrial SAT solvers e.g. Grasp [MarquesSilva-Sakallah-96], Relsat [Bayardo-

Schrag-97], SATO [Zhang-97], zChaff [Moskewicz-etal-01], Berkmin [Goldberg-Novikov-02], March-eq [Huele-

vanMaaren]

Most don’t exploit problem structure well!

Page 4: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 4

Planning Example: Logistics

Each city has several boxesEach box has a destination citySeveral trucks at a base station

CityA

CityBCityD

CityC

Task: use trucks to move boxes to their resp. destinations

Domain knowledge:All trucks are equal!

Page 5: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 5

SAT and Symmetry Natural symmetry in many domains, e.g.

planning: all trucks at a base station, all nails in assembly

circuit design: all wires connecting two switch boxes

multi-processor scheduling: all processors

cache coherency protocols: all caches

“If k trucks need to be sent from CityA to CityB, w.l.o.g. send the first k.”

Proposed techniques have several drawbacks

Easy for humans, hard for SAT solvers!

Page 6: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 6

Our Solution: SymChaff

Captures a wide class of natural symmetries by incorporating variable semantics

Exploits high level problem structurerather than “flat” CNF formulation

F sat

unsat

Probleminstance CNF

EncoderSAT

Solver

SYMmodule

SYMmodulesymm.

info

Page 7: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 7

Previous Approaches – 1/4 Symmetry Breaking Predicates [Crawford-etal-96]

e.g. Shatter [Aloul-Markov-Sakallah-03]

Probleminstance CNF

Encoder

F sat

unsatSAT

Solver

SBPgenerator

SBP

SBPs can be prohibitively many, too large, difficult to compute (graph isomorphism)

F’

Page 8: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 8

Previous Approaches – 2/4 pseudoBoolean tools: counting constraints

e.g. PBS [Aloul-Ramani-Markov-Sakallah-02], pbChaff [Dixon-Ginsberg-Parkes-04], Galena [Chai-Kuehlmann-03]

Probleminstance pbCNF

Encoder

pbCNF sat

unsatpbSATSolver

some domains provably hard (e.g. clique color)

implicit counting representation not always suitable

Page 9: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 9

Previous Approaches – 3/4 Handle symmetries dynamically in search

e.g. sEqSatz [Li-Jurkowiak-Purdom-02], another solver [Dixon-Ginsberg-Luks-Parkes-04]

Probleminstance CNF

Encoder

F sat

unsatSYM-SATSolver

expensive group-theoretic computations

Page 10: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 10

Previous Approaches – 4/4 Domain specific solutions

Testing [MarquesSilva-Sakallah-97], model checking [Shtrichman-04], planning [Rintanen-03, Fox-Long-99]

Domain specific

Cannot exploit advances in SAT solvers

[Fox-Long-99] Very similar to our technique; yields non-optimal parallel plans

Page 11: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 11

Our Contribution New framework for symmetry in SAT

Low overhead, top-down approach Seamless integration with current SAT solvers Foundation in many-sorted First Order logic

SAT solver SymChaff that extends zChaff Outperforms previous approaches on several

domains from theory, planning, and design

Philosophical: a tiny bit of non-CNF input can dramatically speed up SAT solvers

Page 12: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 12

Key Ideas

Symmetry Representation

Multi-way Branching

Symmetric Learning

Page 13: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 13

Planning Example: Logistics

Task: use n trucks to move boxes to their resp. destinations

Problem variables: mv_tr3_cD_time1 load_boxA1_tr1_time1 …

Possible solution:begin by sendingsome trucks to cityA

CityA

CityBCityD

CityC

Page 14: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 14

Idea #1: Multi-way Branching

Typical SAT solver:- effectively explore 2n branches for mv_tr?_cA

mv_tr1_cA

01

mv_tr2_cA

1 0

SymChaff:- all n trucks are symmetric- w.l.o.g. branch n+1 ways on ALL mv_tr?_ cA variables simultaneously

The j-th branch sets firstj of mv_tr?_cA to true,the rest to false

0 j n

n+1

Page 15: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 15

Idea #1: Multi-way Branching Idea is extended to “multi-class symmetry”

e.g. let boxA1, boxA2 be symmetric as well

variable load_boxA1_tr1 symmetric tovariable load_boxA?_tr?

Issues: How is symmetry information provided?

How is it maintained as we branch?

Page 16: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 16

Idea #2: Symmetry Representation

Input to SymChaff includes: Symmetry classes for objects

e.g. tr1, …, trn belong to class TR

Semantics for variablese.g. mv_tr1_cA is indexed by class TR

Symmetry sets of objects; dynamic initially: {tr1, …, trn} is a symmetry set

branch and send tr1, tr2 to cityA:split/refine set into {tr1, tr2}, {tr3, …, trn}

backtrack: re-unite these two sets

Page 17: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 17

Idea #3: Symmetric Learning

A “sym-conflict clause” is learnt

NOTE: this replaces the triedGroups approach of [Fox-Long-99]; doesn’t suffer from non-optimality of parallel plans

send j trucks to cityA

Fail: too few trucks left for other cities!

SymChaff learns thatthese branches neednot be explored

Fail

Page 18: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 18

Experimental Results Compared SymChaff with

zChaff(winner of SAT’04 competition; industrial category)

March-eq-100(winner of SAT’04 competition; hand-made category)

zChaff + Shatter (using SBP)

Galena and pbChaff (pseudoBoolean solvers) (on some domains; see paper)

Problem domains Theory: pigeonhole, clique coloring

Planning: gripper, logistics (2)

Circuit design: channel routing

Page 19: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 19

Problem Parameters SymChaff

zChaff

marc

h-e

q

Shatt

er

(SB

P

genera

tion)

zChaff

aft

er

Shatt

er

051- 050 0.2 * * 13.7 0.5101- 100 1.2 * * 467 6.512- 07- 08 0.03 * * 5.1 493030- 18- 21 0.6 * * 20802 *

pigeonhole

clq- color

gripper04t14 0.8 2820 * 3.2 98306t22 3.4 * * 23 *08t6 2.03 4.3 375 31 4.211t6 51 12827 * 325 1796807t5 1.8 1.9 80 244 3.111t5 16 18 1808 6070 34

gripper

log- rotate

log- pairs

chnl- routing020x030 0.1 * * 4.6 0.1

050x100 1.8 * * 811 1.8chnl- routing

Representative Runtime Samples

* denotes > 6 hours

Best SAT solvers don’tdo very well!

Computing SBPsmay be expensive!

Computing SBPsmay not help!

Problem may bereally hard!

Page 20: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 20

And all this from…Original STRIPS

specification:

(objects

tr1 tr2 tr3

boxA1 boxA2

boxB1 boxB2

...)

(actions

...)

(init

...)

...

New STRIPS specification:

(objects

tr1 tr2 tr3 – symTrucks

boxA1 boxA2 – symBoxA

boxB1 boxB1 – symBoxB

...)

(actions

...)

(init

...)

...

Page 21: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 21

Conclusion

New framework that efficiently incorporates symmetry into SAT solvers Domain independent

Low overhead

Exploits high level problem description

Can this framework help local search?

Can we extend it to handle new symmetries that arise during the search? E.g. AirLock domain [Fox-Long-02]

Page 22: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 22

Page 23: SymChaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005.

AAAI, July 2005 23

Ongoing and Future Work Use symmetry framework elsewhere

local search techniques like Walksat improved variable selection heuristic

Handle new symmetries as they arise e.g. AirLock domain of [Fox-Long-02]

Easy extensions implement in pseudoBoolean solver create PDDL-to-SYM converter for planning

Improvements to SymChaff other symmetric learning schemes dynamic selection in multi-way branches