Hrinking hrinking A signment tack tack. Agenda Introduction Algorithm Description Heuristics...

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

    19-Dec-2015
  • Category

    Documents

  • view

    218
  • download

    0

Transcript of Hrinking hrinking A signment tack tack. Agenda Introduction Algorithm Description Heuristics...

hrinking

SAT’10 Conference

Edinburgh, Scotland, UK

July 11, 2010

A signment tack

Alexander Nadel, Intel, Israel

Vadim Ryvchin, Intel&Technion, Israel

AgendaIntroductionAlgorithm DescriptionHeuristicsExperimental ResultsConclusions

What is Shrinking?

Shrinking is an algorithm that

boosts modern DPLL-based SAT solvers on difficult industrial benchmarks

by

dynamically filtering out irrelevant assignments

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.

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.

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

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

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.

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.

Example: Standard Backtracking and Flipping w/o Shrinking

Example: Standard Backtracking and Flipping w/o Shrinking

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

Example: Standard Backtracking and Flipping w/o Shrinking

Backtrack!

Non-chronological backtracking removed an assignment.

Example: Standard Backtracking and Flipping w/o Shrinking

Flip

Example: Shrinking in Action

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

Example: Shrinking in Action

Shrink and backtrack!

Shrinking removed many irrelevant assignments.

Example: Shrinking in Action

Flip

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.

The Three Elephants that Support Clever Shrinking

The shrinking condition

The sorting scheme

The shrinking backtrack level

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

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

Shrinking in Jerusat

1. 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.

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.

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.

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.

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

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

vliw

_uns

at_4

.0

vliw

_uns

at_2

.0

fvp-

unsa

t.3.0

mar

is

gold

berg

TS1

TS2

fvp-

sat.3

.00

5

10

15

20

25

30

35

40

45

50

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

Eureka: Solved Instances per Family

vliw

_uns

at_4

.0

vliw

_uns

at_2

.0

fvp-

unsa

t.3.0

mar

is

gold

berg

TS1

TS2

fvp-

sat.3

.00

5

10

15

20

25

30

35

40

45

50

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

Eureka: “Base“ Beats “No Shrinking”!

Minisat: Solved Instances per Family

mar

is

fvp-

unsa

t.3.0

vliw

_uns

at_4

.0

vliw

_uns

at_2

.0

gold

berg

fvp-

sat.3

.0TS

1TS

20

5

10

15

20

25

30

35

40

45

50

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

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

mar

is

fvp-

unsa

t.3.0

vliw

_uns

at_4

.0

vliw

_uns

at_2

.0

gold

berg

fvp-

sat.3

.0TS

1TS

20

5

10

15

20

25

30

35

40

45

50

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

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

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.

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

Future WorkStudy the interplay between

restarts and shrinking.

Improve the heuristics further

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.

Thanks for Your

Attention!

Backup Slides

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.

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.

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

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

Another Type of Shrinking