a signment

42
hrinking SAT’10 Conference Edinburgh, Scotland, UK July 11, 2010 A signment tack Alexander Nadel, Intel, Israel Vadim Ryvchin, Intel&Technion, Israel

Upload: istas

Post on 23-Feb-2016

31 views

Category:

Documents


0 download

DESCRIPTION

A signment. tack. SAT’10 Conference Edinburgh, Scotland, UK July 11, 2010 . hrinking. Alexander Nadel, Intel, Israel Vadim Ryvchin, Intel&Technion , Israel. Agenda. Introduction Algorithm Description Heuristics Experimental Results Conclusions. What is Shrinking?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A    signment

hrinking

SAT’10 ConferenceEdinburgh, Scotland, UK

July 11, 2010

A signment tack

Alexander Nadel, Intel, Israel

Vadim Ryvchin, Intel&Technion, Israel

Page 2: A    signment

AgendaIntroductionAlgorithm DescriptionHeuristicsExperimental ResultsConclusions

Page 3: A    signment

What is Shrinking?Shrinking is an algorithm that

boosts modern DPLL-based SAT solvers on difficult industrial benchmarks

by

dynamically filtering out irrelevant assignments

Page 4: A    signment

The HistoryShrinking was

◦introduced in the Jerusat solver (Nadel’02).

◦enhanced in the Chaff’04 solver (Mahajan&Fu&Malik’04) .

Jerusat and Chaff’04 are the SAT’04 competition winners in industrial categories.

Page 5: A    signment

Goals of this WorkEmpirically demonstrate that

shrinking is critical for solving difficult industrial families in modern solvers.

Provide a thorough description of the shrinking algorithm.

We also discuss shrinking heuristics and introduce some new ones.

Page 6: A    signment

Explanation: a SAT Solver Run Snapshot after a Conflict

Assignedvariables

First assigned variable

Parent resolution: a resolution proof for the

validity of the flip

(Each rectangle is a clause)

Variable to be flipped

Page 7: A    signment

Explanation: a SAT Solver Run Snapshot after a Conflict

Parent resolution: a resolution proof for the

validity of the flip

(Each rectangle is a clause)

Yellow variables are the asserting clause variables

Page 8: A    signment

Explanation: a SAT Solver Run Snapshot after a Conflict

•The assignments to all the blue variables were irrelevant:• Unnecessary for generating

the parent resolution.

•The blue variables might had been used for resolution proof that was subsequently pruned.

Page 9: A    signment

Explanation: a SAT Solver Run Snapshot after a Conflict

• Irrelevant assignments are bad:• They slow down BCP.• They violate the locality

principle: proof should be dependent on as few assignments as possible.

• Shrinking: remove irrelevant assignments before flipping.

Page 10: A    signment

Example: Standard Backtracking and Flipping w/o Shrinking

Page 11: A    signment

Example: Standard Backtracking and Flipping w/o Shrinking

Non-chronological backtracking will remove this assignment (if it defines a new decision level).

Page 12: A    signment

Example: Standard Backtracking and Flipping w/o Shrinking

Backtrack!

Non-chronological backtracking removed an assignment.

Page 13: A    signment

Example: Standard Backtracking and Flipping w/o Shrinking

Flip

Page 14: A    signment

Example: Shrinking in Action

Shrink on this area. Shrinking will remove all the irrelevant assignments here.

Page 15: A    signment

Example: Shrinking in Action

Shrink and backtrack!

Shrinking removed many irrelevant assignments.

Page 16: A    signment

Example: Shrinking in Action

Flip

Page 17: A    signment

The Shrinking AlgorithmAfter a conflict:

1. Record a conflict clause as usual!2. If the shrinking condition holds,

shrink as follows:1. Backtrack to the shrinking backtrack

level.2. Assign the unassigned literals of the

conflict clause to false. Propagate each assignment with BCP.

The order of variable assignments is defined by the sorting scheme.

Page 18: A    signment

The Three Elephants that Support Clever Shrinking

The shrinking condition

The sorting scheme

The shrinking backtrack level

Page 19: A    signment

Intuition behind Shrinking HeuristicsIntuition behind the shrinking condition:

◦Shrink when the search halts to be useful.Usefulness is estimated by looking at

the asserting clause:◦Short means useful

The most intuitive widely used measure: short clauses should prune the search space better

◦Few decision levels means useful Variables of the same decision level are

interrelated: if one is assigned, the others have good chances to be assigned soon

Locality principle rules

Page 20: A    signment

Intuition behind Shrinking HeuristicsIntuition behind the sorting

scheme:◦It is advantageous to locally reshuffle

the VSIDS scores from time to time.Intuition behind the shrinking

backtrack level determination◦Quite straightforward: subject for

future work

Page 21: A    signment

Shrinking in Jerusat1. Jerusat’s shrinking condition

◦The conflict clause contains no more than one variable from each decision level.◦ A decision-level-based scheme

2. Jerusat’s sorting scheme◦Same order as before shrinking.

3. Jerusat’s shrinking backtrack level◦Highest possible decision level where all

the literals of the conflict clause become unassigned.

Page 22: A    signment

Shrinking in Chaff’041. Chaff’s shrinking condition

◦ The conflict clause length exceeds x. x is initialized with 95 and is changed dynamically.

The goal is to be close to the mean length of the conflict clauses.◦ Secondary condition

2. Chaff’s sorting scheme◦ Reverses the order.

Empirically better than using the same order. Dynamic reshuffling to VSIDS scores.

3. Chaff’s shrinking backtrack level◦ Lowest possible decision level in the conflict clause

that is less than the next higher decision level by at least 2. If no such level exists, shrinking is not performed.

Page 23: A    signment

New Heuristics for ShrinkingDecision-level-based shrinking

condition◦Generalization of Jerusat’s shrinking

condition in the spirit of Glucose’s clause deletion scheme (Audemard&Simon’09)

◦The algorithm d the number of decision levels in the

asserting clause. Shrink if d > x’

x’ is similar to Chaff’s threshold on clause length, but it is applied to the number of decision levels in the clauses instead of to clause length.

Page 24: A    signment

New Heuristics for ShrinkingActivity ordering sorting scheme

◦Sort the variables of the conflict clause by VSIDS’s scores, from highest to lowest. Should work well, if no corrections to

VSIDS scores are required.

Page 25: A    signment

Experimental ResultsWe implemented shrinking in Eureka

and an enhanced version of Minisat.Time threshold was 3 hours.We used 8 benchmark families:

◦4 of Miroslav Velev’s families.◦2 families from the SAT’04 competition:

Goldberg; Maris◦2 SAT-Race’06 families.

166 instances overall

Page 26: A    signment

Experimental Results: the Algorithms1. No shrinking2. Base shrinking

◦ Eureka’s version: similar to Chaff with two minor changes

3. Base with the decision-level-based shrinking condition

4. Base with the activity ordering sorting scheme

Page 27: A    signment

vliw_un

sat_4.

0

vliw_un

sat_2.

0

fvp-un

sat.3.0 mari

s

goldb

erg TS1 TS2

fvp-sa

t.3.0

0

5

10

15

20

25

30

35

40

45

50

No Shrinking Dec. Level-based Cond.Base Activity Sorting

Eureka: Solved Instances per Family

Page 28: A    signment

vliw_un

sat_4.

0

vliw_un

sat_2.

0

fvp-un

sat.3.0 mari

s

goldb

erg TS1 TS2

fvp-sa

t.3.0

0

5

10

15

20

25

30

35

40

45

50

No Shrinking Dec. Level-based Cond.Base Activity Sorting

Eureka: “Base“ Beats “No Shrinking”!

Page 29: A    signment

Minisat: Solved Instances per Family

maris

fvp-un

sat.3.0

vliw_un

sat_4.

0

vliw_un

sat_2.

0

goldb

erg

fvp-sa

t.3.0 TS1 TS2

0

5

10

15

20

25

30

35

40

45

50

No Shrinking Dec. Level-based Cond.Base Activity Sorting

Page 30: A    signment

Minisat: “Dec. Level-based“ Beats “No Shrinking”!

maris

fvp-un

sat.3.0

vliw_un

sat_4.

0

vliw_un

sat_2.

0

goldb

erg

fvp-sa

t.3.0 TS1 TS2

0

5

10

15

20

25

30

35

40

45

50

No Shrinking Dec. Level-based Cond.Base Activity Sorting

Page 31: A    signment

Performance Summary: Solved Instances Overall (out of 166)

Minisat EurekaNo Shrinking 117 126

Base 137 151

Decision Level-Based

140 150

Activity Ordering 133 149

Page 32: A    signment

Impact of the Decision Level-Based Shrinking Condition Empirical recommendations:

◦ Recommended as the default for Minisat Solves more instances overall and faster for

6/8 families◦ Very useful for particular families for both

solvers. Resulting intuition:

◦ The number of decision levels in the clauses appears to be a good way of measuring usefulness.

But using the clause size measure is sometimes advantageous.

Page 33: A    signment

Experimental Results: Impact of the Activity Ordering Sorting Scheme Empirical recommendations:

◦ Not recommended as the default Causes a serious deterioration of Minisat

performance on two Velev families. Yet, improves the performance for SAT Race families.

Not helpful for most of the families and overall for Eureka.

Resulting intuition◦ A local reshuffling of VSIDS scores is

usually helpful. Reminder: the base scheme reverses the

order

Page 34: A    signment

Future WorkStudy the interplay between

restarts and shrinking.

Improve the heuristics further

Page 35: A    signment

ConclusionsShrinking is a dedicated technique for

filtering out irrelevant assignments in modern DPLL-based SAT solvers

Shrinking is empirically critical◦Many families couldn’t be solved without

shrinking (within Minisat and Eureka).◦Shrinking improves the performance for

almost all the considered families for both solvers.

Page 36: A    signment

Thanks for Your

Attention!

Page 37: A    signment

Backup Slides

Page 38: A    signment

Shrinking vs. Modern TechniquesConsider the following three

techniques: ◦Frequent restarts ◦A clause-based heuristic◦RSAT’s phase saving

Is the combined effect of these techniques similar to shrinking?◦No! Empirically, shrinking is highly

beneficial in Eureka, which applies all these techniques.

Page 39: A    signment

Why isn't the Effect of Shrinking Achieved by Other TechniquesBecause of the simultaneous effect of

the following:1. The shrinking condition differs from the

restart conditions.2. Shrinking restarts the search only partially.3. Unlike clause-based heuristics, shrinking

continues selecting variables from the top-most conflict clause, even if it was satisfied.

4. Shrinking uses a dedicated sorting (re-ordering) of the variables in the top-most conflict clause.

Page 40: A    signment

Calculation of the Threshold on Conflict Clause Length in Chaff x is initialized with 95 Do the following each 800 conflicts

◦ (mean, stdev) := mean and standard deviation of last 800 learned clause lengths

◦ center := mean + 0.5 * stdev; ◦ ulimit := mean + stdev◦ if x ≥ center then

x := x − 5◦ if x < center then

x := x + 5◦ if x > ulimit then

x := ulimit◦ if x < 5 then

x := 5 return x

Page 41: A    signment

Performance SummaryMinisat Eureka

No Shr. Solved 117 126

No Shr. Time 547709 479498

Base Shr. Solved 137 151

Base Shr. Time 349096 207061

Dec. Level Shr. Solved

140 150

Dec. Level Shr. Time 322304 223239

Act. Order Shr. Solved

133 149

Act. Order Shr. Time 381340 220437

Page 42: A    signment

Another Type of Shrinking