Sym Chaff A StructureAware Satisfiability Solver Ashish Sabharwal
Sym. Chaff: A Structure-Aware Satisfiability Solver Ashish Sabharwal University of Washington, Seattle AAAI, July 2005
SAT: The Satisfiability Problem p Input: Boolean formula F in CNF n F = (x 1 OR x 2) AND (x 1 OR x 3 OR x 4) AND … p Output: “satisfying assignment” or “unsat” p NP-complete, hence difficult but useful! Problem instance e. g. planning, verification, design, … AAAI, July 2005 CNF Encoder domain dependent F SAT Solver general purpose sat unsat 2
SAT: The Satisfiability Problem p Numerous real-world applications n p hardware verification, testing, planning, scheduling, design automation, … Dozens of academic/industrial SAT solvers n e. g. Grasp [Marques. Silva-Sakallah-96], Relsat [Bayardo. Schrag-97], SATO [Zhang-97], z. Chaff [Moskewicz-etal-01], Berkmin [Goldberg-Novikov-02], March-eq [Huelevan. Maaren] Most don’t exploit problem structure well! AAAI, July 2005 3
Planning Example: Logistics City. A City. B Each city has several boxes Each box has a destination city Several trucks at a base station City. C City. D Domain knowledge: All trucks are equal! Task: use trucks to move boxes to their resp. destinations AAAI, July 2005 4
SAT and Symmetry p p Natural symmetry in many domains, e. g. n planning: all trucks at a base station, all nails in assembly n circuit design: all wires connecting two switch boxes n multi-processor scheduling: all processors n cache coherency protocols: all caches “If k trucks need to be sent from City. A to City. B, w. l. o. g. send the first k. ” Easy for humans, hard for SAT solvers! p Proposed techniques have several drawbacks AAAI, July 2005 5
Our Solution: Sym. Chaff Problem instance CNF Encoder SYM module F symm. info SAT Solver unsat SYM module p Captures a wide class of natural symmetries by incorporating variable semantics p Exploits high level problem structure rather than “flat” CNF formulation AAAI, July 2005 sat 6
Previous Approaches – 1/4 p Symmetry Breaking Predicates n e. g. Shatter Problem instance [Crawford-etal-96] [Aloul-Markov-Sakallah-03] CNF Encoder F F’ SAT Solver sat unsat SBP generator n SBPs can be prohibitively many, too large, difficult to compute (graph isomorphism) AAAI, July 2005 7
Previous Approaches – 2/4 p pseudo. Boolean tools: counting constraints n e. g. PBS [Aloul-Ramani-Markov-Sakallah-02], [Dixon-Ginsberg-Parkes-04], Problem instance pb. CNF Encoder Galena pb. CNF pb. Chaff [Chai-Kuehlmann-03] pb. SAT Solver sat unsat n some domains provably hard (e. g. clique color) n implicit counting representation not always suitable AAAI, July 2005 8
Previous Approaches – 3/4 p Handle symmetries dynamically in search n e. g. s. Eq. Satz [Li-Jurkowiak-Purdom-02], [Dixon-Ginsberg-Luks-Parkes-04] Problem instance n CNF Encoder F another solver SYM-SAT Solver sat unsat expensive group-theoretic computations AAAI, July 2005 9
Previous Approaches – 4/4 p Domain specific solutions n Testing [Marques. Silva-Sakallah-97], [Shtrichman-04], planning model checking [Rintanen-03, Fox-Long-99] n Domain specific n Cannot exploit advances in SAT solvers n [Fox-Long-99] AAAI, July 2005 Very similar to our technique; yields non-optimal parallel plans 10
Our Contribution p New framework for symmetry in SAT n n n p SAT solver Sym. Chaff that extends z. Chaff n p Low overhead, top-down approach Seamless integration with current SAT solvers Foundation in many-sorted First Order logic 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 AAAI, July 2005 11
Key Ideas p Symmetry Representation p Multi-way Branching p Symmetric Learning AAAI, July 2005 12
Planning Example: Logistics City. A City. B Task: use n trucks to move boxes to their resp. destinations Problem variables: mv_tr 3_c. D_time 1 load_box. A 1_tr 1_time 1 … AAAI, July 2005 City. C City. D Possible solution: begin by sending some trucks to city. A 13
Idea #1: Multi-way Branching Typical SAT solver: - effectively explore 2 n branches for mv_tr? _c. A mv_tr 1_c. A 1 Sym. Chaff: - all n trucks are symmetric - w. l. o. g. branch n+1 ways on ALL mv_tr? _ c. A variables simultaneously n+1 0 … mv_tr 2_c. A 1 AAAI, July 2005 0 The j-th branch sets first j of mv_tr? _c. A to true, the rest to false 0 j n 14
Idea #1: Multi-way Branching p p Idea is extended to “multi-class symmetry” n e. g. let box. A 1, box. A 2 be symmetric as well n variable load_box. A 1_tr 1 symmetric to variable load_box. A? _tr? Issues: n How is symmetry information provided? n How is it maintained as we branch? AAAI, July 2005 15
Idea #2: Symmetry Representation p p Input to Sym. Chaff includes: n Symmetry classes for objects e. g. tr 1, …, trn belong to class TR n Semantics for variables e. g. mv_tr 1_c. A is indexed by class TR Symmetry sets of objects; dynamic n initially: {tr 1, …, trn} is a symmetry set n branch and send tr 1, tr 2 to city. A: split/refine set into {tr 1, tr 2}, {tr 3, …, trn} n backtrack: re-unite these two sets AAAI, July 2005 16
Idea #3: Symmetric Learning send j trucks to city. A … Fail: too few trucks left for other cities! Sym. Chaff learns that these branches need not be explored A “sym-conflict clause” is learnt NOTE: this replaces the tried. Groups approach of [Fox-Long-99]; doesn’t suffer from non-optimality of parallel plans AAAI, July 2005 17
Experimental Results p Compared Sym. Chaff with n z. Chaff (winner of SAT’ 04 competition; industrial category) n March-eq-100 (winner of SAT’ 04 competition; hand-made category) n z. Chaff + Shatter (using SBP) n Galena and pb. Chaff (pseudo. Boolean solvers) (on some domains; see paper) p Problem domains n Theory: pigeonhole, clique coloring n Planning: gripper, logistics (2) n Circuit design: channel routing AAAI, July 2005 18
Best Computing Problem SAT solvers may SBPs be don’t may do really be very not expensive! hard! well! help! Representative Runtime AAAI, July 2005 Samples * denotes > 6 hours 19
And all this from… Original STRIPS specification: New STRIPS specification: (objects tr 1 tr 2 tr 3 box. A 1 box. A 2 box. B 1 box. B 2. . . ) (actions. . . ) (init. . . ). . . (objects tr 1 tr 2 tr 3 – sym. Trucks box. A 1 box. A 2 – sym. Box. A box. B 1 – sym. Box. B. . . ) (actions. . . ) (init. . . ). . . AAAI, July 2005 20
Conclusion p New framework that efficiently incorporates symmetry into SAT solvers n Domain independent n Low overhead n Exploits high level problem description p Can this framework help local search? p Can we extend it to handle new symmetries that arise during the search? E. g. Air. Lock domain [Fox-Long-02] AAAI, July 2005 21
AAAI, July 2005 22
Ongoing and Future Work p p Use symmetry framework elsewhere n local search techniques like Walksat n improved variable selection heuristic Handle new symmetries as they arise n p p e. g. Air. Lock domain of [Fox-Long-02] Easy extensions n implement in pseudo. Boolean solver n create PDDL-to-SYM converter for planning Improvements to Sym. Chaff n other symmetric learning schemes n dynamic selection in multi-way branches AAAI, July 2005 23
- Slides: 23