GLUCOSE 2.1 Aggressive but Reactive Clause Database Management, - - PowerPoint PPT Presentation

glucose 2 1 aggressive but reactive clause database
SMART_READER_LITE
LIVE PREVIEW

GLUCOSE 2.1 Aggressive but Reactive Clause Database Management, - - PowerPoint PPT Presentation

LBD Managing Learnt Clauses Restarts Conclusion GLUCOSE 2.1 Aggressive but Reactive Clause Database Management, Dynamic Restarts Gilles Audemard Laurent Simon POS 16 june 2012 GLUCOSE 2.1 POS 16 june 2012 1 / 25 LBD


slide-1
SLIDE 1

LBD Managing Learnt Clauses Restarts Conclusion

GLUCOSE 2.1

Aggressive – but Reactive – Clause Database Management, Dynamic Restarts Gilles Audemard – Laurent Simon

POS – 16 june 2012

GLUCOSE 2.1

POS – 16 june 2012 1 / 25

slide-2
SLIDE 2

LBD Managing Learnt Clauses Restarts Conclusion

A short history of GLUCOSE

2009 – Version 1.0

◮ Built on top of MINISAT 2.0 ◮ Learnt clause measure usefulness: LBD ◮ Agressive cleaning strategy ◮ Dynamic restarts

GLUCOSE 2.1

POS – 16 june 2012 2 / 25

slide-3
SLIDE 3

LBD Managing Learnt Clauses Restarts Conclusion

A short history of GLUCOSE

2009 – Version 1.0

◮ Built on top of MINISAT 2.0 ◮ Learnt clause measure usefulness: LBD ◮ Agressive cleaning strategy ◮ Dynamic restarts

2011 – Version 2.0

◮ Built on top of MINISAT 2.2 (≈ 30% faster) ◮ Focus on cleaning strategy

More agressive cleaning strategy Dynamic Protect promising clauses

◮ Reducing learnt clauses

GLUCOSE 2.1

POS – 16 june 2012 2 / 25

slide-4
SLIDE 4

LBD Managing Learnt Clauses Restarts Conclusion

A short history of GLUCOSE

2009 – Version 1.0

◮ Built on top of MINISAT 2.0 ◮ Learnt clause measure usefulness: LBD ◮ Agressive cleaning strategy ◮ Dynamic restarts

2011 – Version 2.0

◮ Built on top of MINISAT 2.2 (≈ 30% faster) ◮ Focus on cleaning strategy

More agressive cleaning strategy Dynamic Protect promising clauses

◮ Reducing learnt clauses

2012 – Version 2.1

◮ Focus on restarts

GLUCOSE 2.1

POS – 16 june 2012 2 / 25

slide-5
SLIDE 5

LBD Managing Learnt Clauses Restarts Conclusion

Litteral Block Distance

GLUCOSE 2.1

POS – 16 june 2012 3 / 25

slide-6
SLIDE 6

LBD Managing Learnt Clauses Restarts Conclusion

An observation

Before CDCL solvers: solvers implement ideas (lookahead, Mom’s heuristics...) explaining performances was simple With CDCL: lookback solvers (VSIDS heuristics, learning,...) explaining performances is hard

We need strong empirical studies in order to understand and improve performances

GLUCOSE 2.1

POS – 16 june 2012 4 / 25

slide-7
SLIDE 7

LBD Managing Learnt Clauses Restarts Conclusion

Some plots . . .

een-pico-prop05-50 – UNSAT – 13,000 vars and 65,000 clauses

For each conflict, we store the decision level where it occurs We also compute the linear regression on these points Gives an idea of the global behavior of the computation

GLUCOSE 2.1

POS – 16 june 2012 5 / 25

slide-8
SLIDE 8

LBD Managing Learnt Clauses Restarts Conclusion

Some plots . . .

grieu-vmpc-s05-25 – SAT – 625 vars and 76,000 clauses

For each conflict, we store the decision level where it occurs We also compute the linear regression on these points Gives an idea of the global behavior of the computation

GLUCOSE 2.1

POS – 16 june 2012 5 / 25

slide-9
SLIDE 9

LBD Managing Learnt Clauses Restarts Conclusion

Some plots . . .

mizh-sha0-35-3 – SAT – 20,000 vars and 120,000 clauses

For each conflict, we store the decision level where it occurs We also compute the linear regression on these points Gives an idea of the global behavior of the computation

GLUCOSE 2.1

POS – 16 june 2012 5 / 25

slide-10
SLIDE 10

LBD Managing Learnt Clauses Restarts Conclusion

Remarks

Of course, we do not expect to feet curves We try to make observations of the behavior of a CDCL solver

AND...

GLUCOSE 2.1

POS – 16 june 2012 6 / 25

slide-11
SLIDE 11

LBD Managing Learnt Clauses Restarts Conclusion

Decreasing appear in a lot of problems

Series #Benchs % Decr. een 8 62% goldb 11 100% grieu 7 71% hoons 5 100% ibm-2002 7 71% ibm-2004 13 92% manol-pipe 55 91% miz 13 0% schup 5 80% simon 10 90% vange 3 66% velev 54 92% all 199 83%

GLUCOSE 2.1

POS – 16 june 2012 7 / 25

slide-12
SLIDE 12

LBD Managing Learnt Clauses Restarts Conclusion

The goal

grieu-vmpc-s05-25 – SAT – 625 vars and 76,000 clauses

GLUCOSE 2.1

POS – 16 june 2012 8 / 25

slide-13
SLIDE 13

LBD Managing Learnt Clauses Restarts Conclusion

The goal

grieu-vmpc-s05-25 – SAT – 625 vars and 76,000 clauses

GLUCOSE 2.1

POS – 16 june 2012 8 / 25

slide-14
SLIDE 14

LBD Managing Learnt Clauses Restarts Conclusion

Intuitions

A lot of dependencies between variables During search those variables will probably be propagated together inside blocks of propagations One needs to collapse independent blocks of propagated literals in order to reduce the decision level

The LBD score of a nogood is the number of different blocks of propagated literals

GLUCOSE 2.1

POS – 16 june 2012 9 / 25

slide-15
SLIDE 15

LBD Managing Learnt Clauses Restarts Conclusion

Intuitions

A lot of dependencies between variables During search those variables will probably be propagated together inside blocks of propagations One needs to collapse independent blocks of propagated literals in order to reduce the decision level

The LBD score of a nogood is the number of different blocks of propagated literals

LBD=2

◮ Only one literal from the last decision level (the assertive one) ◮ This literal will be glued to the other block ◮ binary clauses have LBD equal to 2

VSIDS + progress saving: this should occurs a lot!!!

Good clauses are GLUE clauses

GLUCOSE 2.1

POS – 16 june 2012 9 / 25

slide-16
SLIDE 16

LBD Managing Learnt Clauses Restarts Conclusion

Managing Learnt Clauses

GLUCOSE 2.1

POS – 16 june 2012 10 / 25

slide-17
SLIDE 17

LBD Managing Learnt Clauses Restarts Conclusion

Previous works

Before GLUCOSE , managing learnt clauses was not considered as an important component of CDCL solvers Previous measures were not so accurate Clause database size followed a geometric progression Dependent of the size of the input formula: No cleaning are performed for huge formulas

Use the LBD measure

GLUCOSE 2.1

POS – 16 june 2012 11 / 25

slide-18
SLIDE 18

LBD Managing Learnt Clauses Restarts Conclusion

Agressive strategies

Small LBD are good ones In case of equality, prefer clauses with recent activity (VSIDS like) No matter the size of the initial formula Remove half of learnt clauses every :

◮ GLUCOSE 1.0 (2009): 20000 + 500 × x conflicts ◮ GLUCOSE 2.X (2011):

4000 + 300 × x conflicts

GLUCOSE 2.1

POS – 16 june 2012 12 / 25

slide-19
SLIDE 19

LBD Managing Learnt Clauses Restarts Conclusion

A first step towards a dynamic management

Performances of GLUCOSE heavily depends on the quality of LBD A very good indicator on many instances However, it may not be discriminating enough A special case:

◮ Half of clauses have a LBD less than 3 (we are going to remove potentially

good clauses)

◮ Too much good clauses

We need to keep more of them We postpone the next cleaning by a constant of 1000

GLUCOSE 2.1

POS – 16 june 2012 13 / 25

slide-20
SLIDE 20

LBD Managing Learnt Clauses Restarts Conclusion

A first step towards a dynamic management

Performances of GLUCOSE heavily depends on the quality of LBD A very good indicator on many instances However, it may not be discriminating enough A special case:

◮ Half of clauses have a LBD less than 3 (we are going to remove potentially

good clauses)

◮ Too much good clauses

We need to keep more of them We postpone the next cleaning by a constant of 1000

When performing cleaning??

GLUCOSE 2.1

POS – 16 june 2012 13 / 25

slide-21
SLIDE 21

LBD Managing Learnt Clauses Restarts Conclusion

Behavior

20000 40000 60000 80000 100000 120000 200000 400000 600000 800000 1e+06 1.2e+06 1.4e+06 1.6e+06 Clause Database size Number of Conflicts All good All bad Bad, then good Good, then Bad Bad, then change every 100,000 GLUCOSE 2.1

POS – 16 june 2012 14 / 25

slide-22
SLIDE 22

LBD Managing Learnt Clauses Restarts Conclusion

Protect promising clauses

Reminder: LBD is computed when the clause is learnt We computed it again it when a clause is used during BCP We change it, if it becomes smaller Such clauses seem interesting They are protected for one round

GLUCOSE 2.1

POS – 16 june 2012 15 / 25

slide-23
SLIDE 23

LBD Managing Learnt Clauses Restarts Conclusion

Restarts

GLUCOSE 2.1

POS – 16 june 2012 16 / 25

slide-24
SLIDE 24

LBD Managing Learnt Clauses Restarts Conclusion

Introduction

Initially, restarts were introduced to prevent trashing Now, restarts must be seen as dynamic rearrangements of variables dependencies Restarts are more and more frequent

GLUCOSE uses a dynamic restart strategy

GLUCOSE 2.1

POS – 16 june 2012 17 / 25

slide-25
SLIDE 25

LBD Managing Learnt Clauses Restarts Conclusion

Targetting UNSAT

GLUCOSE aims to produce glue clauses

If recent learnt clauses are bad (big LBD) a restart is performed We use

◮ bounded queue (of size X) called queueLBD ◮ the sum of all LBD clauses sumLBD

GLUCOSE 2.1

POS – 16 june 2012 18 / 25

slide-26
SLIDE 26

LBD Managing Learnt Clauses Restarts Conclusion

Targetting UNSAT

GLUCOSE aims to produce glue clauses

If recent learnt clauses are bad (big LBD) a restart is performed We use

◮ bounded queue (of size X) called queueLBD ◮ the sum of all LBD clauses sumLBD

// In case of conflict compute learnt clause c; sumLBD+=c.lbd(); queueLBD.push(c.lbd()); if(queueLBD.isFull() && queueLBD.avg()*K>sumLBD/nbConflicts) { queueLBD.clear(); restart(); }

GLUCOSE 2.1

POS – 16 june 2012 18 / 25

slide-27
SLIDE 27

LBD Managing Learnt Clauses Restarts Conclusion

Targetting UNSAT

GLUCOSE aims to produce glue clauses

If recent learnt clauses are bad (big LBD) a restart is performed We use

◮ bounded queue (of size X) called queueLBD ◮ the sum of all LBD clauses sumLBD

// In case of conflict compute learnt clause c; sumLBD+=c.lbd(); queueLBD.push(c.lbd()); if(queueLBD.isFull() && queueLBD.avg()*K>sumLBD/nbConflicts) { queueLBD.clear(); restart(); }

Perform at least X conflicts before restarting

GLUCOSE 2.1

POS – 16 june 2012 18 / 25

slide-28
SLIDE 28

LBD Managing Learnt Clauses Restarts Conclusion

Targetting UNSAT

GLUCOSE aims to produce glue clauses

If recent learnt clauses are bad (big LBD) a restart is performed We use

◮ bounded queue (of size X) called queueLBD ◮ the sum of all LBD clauses sumLBD

// In case of conflict compute learnt clause c; sumLBD+=c.lbd(); queueLBD.push(c.lbd()); if(queueLBD.isFull() && queueLBD.avg()*K>sumLBD/nbConflicts) { queueLBD.clear(); restart(); }

Perform at least X conflicts before restarting Average over last X LBD become too big wrt total average

GLUCOSE 2.1

POS – 16 june 2012 18 / 25

slide-29
SLIDE 29

LBD Managing Learnt Clauses Restarts Conclusion

Targetting UNSAT

GLUCOSE aims to produce glue clauses

If recent learnt clauses are bad (big LBD) a restart is performed We use

◮ bounded queue (of size X) called queueLBD ◮ the sum of all LBD clauses sumLBD

// In case of conflict compute learnt clause c; sumLBD+=c.lbd(); queueLBD.push(c.lbd()); if(queueLBD.isFull() && queueLBD.avg()*K>sumLBD/nbConflicts) { queueLBD.clear(); restart(); } GLUCOSE 1.0 and 2.0:

X=100 and K=0.7

GLUEMINISAT and GLUCOSE 2.1 : X=50 and K=0.8

GLUCOSE 2.1

POS – 16 june 2012 18 / 25

slide-30
SLIDE 30

LBD Managing Learnt Clauses Restarts Conclusion

Impact of different K and X

75 80 85 90 95 50 100 150 200 250 300 350 400 450 500 nb solved K SAT (0.7) SAT (0.8)

SAT 2011 Application benchmarks (limit 900 seconds)

GLUCOSE 2.1

POS – 16 june 2012 19 / 25

slide-31
SLIDE 31

LBD Managing Learnt Clauses Restarts Conclusion

Impact of different K and X

75 80 85 90 95 50 100 150 200 250 300 350 400 450 500 nb solved K SAT (0.7) SAT (0.8) UNSAT (0.7) UNSAT (0.8)

SAT 2011 Application benchmarks (limit 900 seconds)

GLUCOSE 2.1

POS – 16 june 2012 19 / 25

slide-32
SLIDE 32

LBD Managing Learnt Clauses Restarts Conclusion

Targeting SAT too (NEW in GLUCOSE 2.1)

Frequent restarts seems not very good in case of SAT instances Some lessons of SAT 2011 competition – Second Phase, SAT instances

◮ CONTRASAT: 1st with 99 instances ◮ GLUCOSE : 10th with 94 instances ◮ 6 of first ten solvers come from minisat hack (luby restarts) ◮ 18 instances separate 1st and 10th in UNSAT

GLUCOSE 2.1

POS – 16 june 2012 20 / 25

slide-33
SLIDE 33

LBD Managing Learnt Clauses Restarts Conclusion

Targeting SAT too (NEW in GLUCOSE 2.1)

Frequent restarts seems not very good in case of SAT instances Some lessons of SAT 2011 competition – Second Phase, SAT instances

◮ CONTRASAT: 1st with 99 instances ◮ GLUCOSE : 10th with 94 instances ◮ 6 of first ten solvers come from minisat hack (luby restarts) ◮ 18 instances separate 1st and 10th in UNSAT

Agressive clauses deletion: some clauses may be bad for UNSAT but good for SAT Agressive restarts: some global assignments can be dropped!!

Delay restarts if total of assignments suddenly increase

GLUCOSE 2.1

POS – 16 june 2012 20 / 25

slide-34
SLIDE 34

LBD Managing Learnt Clauses Restarts Conclusion

Example

Now, suppose dots represent trail stack assignment size

grieu-vmpc-s05-25 – SAT – 625 vars and 76,000 clauses

GLUCOSE 2.1

POS – 16 june 2012 21 / 25

slide-35
SLIDE 35

LBD Managing Learnt Clauses Restarts Conclusion

Example

Now, suppose dots represent trail stack assignment size

grieu-vmpc-s05-25 – SAT – 625 vars and 76,000 clauses

GLUCOSE is unlucky, a restart is performed!

GLUCOSE 2.1

POS – 16 june 2012 21 / 25

slide-36
SLIDE 36

LBD Managing Learnt Clauses Restarts Conclusion

Targeting SAT too (NEW in GLUCOSE 2.1)

We use

◮ trail the assignment stack ◮ Bounded queue of the last Y trail size when reaching a conflict

(queueTrail)

GLUCOSE 2.1

POS – 16 june 2012 22 / 25

slide-37
SLIDE 37

LBD Managing Learnt Clauses Restarts Conclusion

Targeting SAT too (NEW in GLUCOSE 2.1)

We use

◮ trail the assignment stack ◮ Bounded queue of the last Y trail size when reaching a conflict

(queueTrail)

// In case of conflict queueTrail.push(trail.size()); if(queueLBD.isFull() && queueTrail.isFull() && ➥trail.size()>T*queueTrail.avg()) { queueLBD.clear(); } compute learnt clause c ...

GLUCOSE 2.1

POS – 16 june 2012 22 / 25

slide-38
SLIDE 38

LBD Managing Learnt Clauses Restarts Conclusion

Targeting SAT too (NEW in GLUCOSE 2.1)

We use

◮ trail the assignment stack ◮ Bounded queue of the last Y trail size when reaching a conflict

(queueTrail)

// In case of conflict queueTrail.push(trail.size()); if(queueLBD.isFull() && queueTrail.isFull() && ➥trail.size()>T*queueTrail.avg()) { queueLBD.clear(); } compute learnt clause c ...

The total number of assignments suddenly increase

GLUCOSE 2.1

POS – 16 june 2012 22 / 25

slide-39
SLIDE 39

LBD Managing Learnt Clauses Restarts Conclusion

Targeting SAT too (NEW in GLUCOSE 2.1)

We use

◮ trail the assignment stack ◮ Bounded queue of the last Y trail size when reaching a conflict

(queueTrail)

// In case of conflict queueTrail.push(trail.size()); if(queueLBD.isFull() && queueTrail.isFull() && ➥trail.size()>T*queueTrail.avg()) { queueLBD.clear(); } compute learnt clause c ...

The total number of assignments suddenly increase Postpone restart

GLUCOSE 2.1

POS – 16 june 2012 22 / 25

slide-40
SLIDE 40

LBD Managing Learnt Clauses Restarts Conclusion

Targeting SAT too (NEW in GLUCOSE 2.1)

We use

◮ trail the assignment stack ◮ Bounded queue of the last Y trail size when reaching a conflict

(queueTrail)

// In case of conflict queueTrail.push(trail.size()); if(queueLBD.isFull() && queueTrail.isFull() && ➥trail.size()>T*queueTrail.avg()) { queueLBD.clear(); } compute learnt clause c ...

The total number of assignments suddenly increase Postpone restart Y=5000 and T=1.4 appears to be good

GLUCOSE 2.1

POS – 16 june 2012 22 / 25

slide-41
SLIDE 41

LBD Managing Learnt Clauses Restarts Conclusion

Conclusion

GLUCOSE 2.1

POS – 16 june 2012 23 / 25

slide-42
SLIDE 42

LBD Managing Learnt Clauses Restarts Conclusion

Evolution of GLUCOSE

1 10 100 1000 1 10 100 1000 SAT UNSAT

GLUCOSE 2.1 vs GLUCOSE 2.0 SAT 2011 application benchmarks (limit 900 seconds)

GLUCOSE 2.1

POS – 16 june 2012 24 / 25

slide-43
SLIDE 43

LBD Managing Learnt Clauses Restarts Conclusion

Evolution of GLUCOSE

1 10 100 1000 1 10 100 1000 SAT UNSAT

GLUCOSE 2.1 vs GLUCOSE 1.0 SAT 2011 application benchmarks (limit 900 seconds)

GLUCOSE 2.1

POS – 16 june 2012 24 / 25

slide-44
SLIDE 44

LBD Managing Learnt Clauses Restarts Conclusion

Evolution of GLUCOSE

200 400 600 800 1000 150 200 250 300 350 glucose 1 glucose 2 glucose 2.1

SAT 2009 + SAT 2011 application benchmarks (536, non redundant)

GLUCOSE 2.1

POS – 16 june 2012 24 / 25

slide-45
SLIDE 45

LBD Managing Learnt Clauses Restarts Conclusion

Evolution of GLUCOSE

Version SAT UNSAT TOTAL 1.0 113 157 270 2.0 136 192 328 2.1 148 204 352

SAT 2009 + SAT 2011 application benchmarks (536, non redundant)

GLUCOSE 2.1

POS – 16 june 2012 24 / 25

slide-46
SLIDE 46

LBD Managing Learnt Clauses Restarts Conclusion

Conclusion

The future of GLUCOSE . . . It is a secret :-) Current work with Daniel and Laurent

GLUCOSE 2.1

POS – 16 june 2012 25 / 25

slide-47
SLIDE 47

LBD Managing Learnt Clauses Restarts Conclusion

Conclusion

The future of GLUCOSE . . . It is a secret :-) Current work with Daniel and Laurent A possible controversy

◮ Are CDCL solvers still complete?

Very frequent restarts Many deleted clauses (more than 93% for GLUCOSE (total for SAT 2011 Application benchmarks))

◮ Are CDCL solvers closer to DPLL62 or local search??

GLUCOSE 2.1

POS – 16 june 2012 25 / 25