Handling Pseudo-Boolean constraints in a CDCL solver a practical - - PowerPoint PPT Presentation

handling pseudo boolean constraints in a cdcl solver a
SMART_READER_LITE
LIVE PREVIEW

Handling Pseudo-Boolean constraints in a CDCL solver a practical - - PowerPoint PPT Presentation

Handling Pseudo-Boolean constraints in a CDCL solver a practical survey Daniel Le Berre CNRS, Universit e dArtois, FRANCE { leberre } @cril.univ-artois.fr Dagstuhl seminar 15171 - April 20, 2015 1/44 Motivation CDCL proof system is


slide-1
SLIDE 1

Handling Pseudo-Boolean constraints in a CDCL solver a practical survey

Daniel Le Berre

CNRS, Universit´ e d’Artois, FRANCE {leberre}@cril.univ-artois.fr

Dagstuhl seminar 15171 - April 20, 2015

1/44

slide-2
SLIDE 2

Motivation

◮ CDCL proof system is resolution [PD11, AFT11] ◮ Resolution in CDCL is used during conflict analysis ◮ Can we change the conflict analysis procedure to use another

proof system ?

◮ Let’s try “cutting planes” to generate linear pseudo boolean

constraints

2/44

slide-3
SLIDE 3

Outline of the talk

Definitions and properties Handling Pseudo-Boolean constraints instead of clauses Conflict Driven “generalized resolution” reasoning PB Solvers on PHP formulas

3/44

slide-4
SLIDE 4

Outline

Definitions and properties Handling Pseudo-Boolean constraints instead of clauses Conflict Driven “generalized resolution” reasoning PB Solvers on PHP formulas

4/44

slide-5
SLIDE 5

Linear Pseudo-Boolean constraints (LPB)

n

  • i=1

aixi ⊗ k

◮ boolean variables xi are integers taking their value in {0, 1}

(xi ≥ 0 and xi ≤ 1)

◮ xi = 1 − xi ◮ coefficients ai and degree/threshold k are integer-valued

constants

◮ ⊗ ∈ {<, ≤, =, ≥, >}

with (< k ↔≤ k − 1 and = k ↔≤ k ∧ ≥ k) Pseudo-Boolean decision problem : satisfying a set of LPB is NP-complete    (a1) 5x1 + 3x2 + 2x3 + 2x4 + x5 ≥ 8 (a2) 5x1 + 3x2 + 2x3 + 2x4 + x5 ≥ 5 (b) x1 + x3 + x4 ≥ 2

5/44

slide-6
SLIDE 6

LPB = Concise boolean function representation

◮ clauses are specific LPB : n

  • i=1

li ≡

n

  • i=1

li ≥ 1 ≡

n

  • i=1

li ≤ n − 1 x1 ∨ x2 ∨ x3 translates into x1 + x2 + x3 ≥ 1

  • r x1 + x2 + x3 ≤ 2

◮ cardinality constraints at least/at most 2 out of {x1, x2, x3}

translate into x1 + x2 + x3 ≥ 2 x1 + x2 + x3 ≤ 2

◮ Knapsack constraint : wi.xi ≤ W ◮ Subset sum constraint : ai.xi = k

slide-7
SLIDE 7

Linear Pseudo Boolean constraints normalization

Representation used when designing a solver

◮ remember that x = 1 − x ◮ usual form : ≥ inequality and positive constants

−3x1 + 4x2 − 7x3 + x4 ≤ −5 ≡ 3x1 − 4x2 + 7x3 − x4 ≥ 5 ≡ 3x1 + −4(1 − x2) + 7x3 + −(1 − x4) ≥ 5 ≡ 3x1 + 4x2 + 7x3 + x4 ≥ 10

◮ note that

x1 + x2 + x3 + x4 + x5 ≤ 1 is represented x1 + x2 + x3 + x4 + x5 ≥ 4

7/44

slide-8
SLIDE 8

Open question #1 : is that normalization the best option ?

◮ At-Least normalization allows a generalization of clause ◮ At-Least representation used in theory (e.g proof complexity) ◮ At-Most constraints often used in practice : knapsack

constraints, optimization

◮ n i=1 li ≤ 1 normalized to n i=1 li ≥ n − 1

Tip used when translating cardinality constraints into CNF

Make sure that the threshold k is never greater than n

2 by

switching between ≤ and ≥ representations.

8/44

slide-9
SLIDE 9

Basic operations on Linear inequalities

addition:

  • i ai.xi ≥ k
  • i a′

i.xi ≥ k′

  • i(ai + a′

i).xi ≥ k + k′

linear combination:

  • i ai.xi ≥ k
  • i a′

i.xi ≥ k′

  • i(α.ai + α′.a′

i).xi ≥ α.k + α′.k′

with α > 0 and α′ > 0 division:

  • i ai.xi ≥ k

α > 0

  • i

ai.xi α

≥ k

α

9/44

slide-10
SLIDE 10

TCS division

TCS division:

  • i α.ai.xi ≥ k

α > 0

  • i ai.xi ≥ ⌈ k

α⌉

tcs division: 2x2 + 2x3 + 2x4 ≥ 3 x2 + x3 + x4 ≥ ⌈3/2⌉ x2 + x3 + x4 ≥ 2

10/44

slide-11
SLIDE 11

ILP division (Chv´ atal-Gomory cut)

◮ When the variables xi and degree k are integer ◮ Removes some non integral part of the cut

ILP division:

  • i ai.xi ≥ k

α > 0

  • i⌈ ai

α ⌉.xi ≥ ⌈ k α⌉

5x3 + 3x4 ≥ 5 ⌈5/5⌉x3 + ⌈3/5⌉x4 ≥ ⌈5/5⌉ x3 + x4 ≥ 1 One can always reduce a LPB constraint to a clause !

11/44

slide-12
SLIDE 12

Clashing linear combination

Also called Gaussian or Fourier–Motzkin elimination

◮ Apply linear combination between LPB constraints with at

least one opposite literal.

◮ Generalization of resolution [Hoo88]

clashing combination:

  • i ai.xi + α′ m

j=1 yj ≥ k

  • i a′

i.xi + α m j=1 yj ≥ k′

  • i(α.ai + α′.a′

i).xi ≥ α.k + α′.k′ − α.α′.m

with α > 0 and α′ > 0 x1 + x2 + 3x3 + x4 ≥ 3 2x1 + 2x2 + x4 ≥ 3 2x1 + 2x2 + 6x3 + 2x4 + 2x1 + 2x2 + x4 ≥ 2 × 3 + 3 2x1 + 2x2 + 6x3 + 2x4 + 2 − 2x1 + 2 − 2x2 + x4 ≥ 9 6x3 + 3x4 ≥ 5

Note that 2x + 2x = 2, not 0 ! Note that the coefficients are growing !

12/44

slide-13
SLIDE 13

Some remarks about clashing combination

◮ Clashing combination looks like resolution ?

x1 + x3 + x4 ≥ 1 x1 + x2 + x5 ≥ 1 x2 + x3 + x4 + x5 ≥ 1

◮ What about common literals ?

x1 + x2 + x3 + x4 ≥ 1 x1 + x2 + x4 ≥ 1 2x2 + x3 + 2x4 ≥ 1

◮ With more than one variable ?

x1 + x2 + x3 + x4 ≥ 1 x1 + x2 + x4 ≥ 1 x3 + 2x4 ≥ 0 clashing combination on clauses is equivalent to resolution !

13/44

slide-14
SLIDE 14

Saturation

coefficients can be trimmed to the value of the degree saturation:

  • i ai.xi +

j bj.yj ≥ k

bj > k

  • i ai.xi +

j k.yj ≥ k

6x3 + 3x4 ≥ 5 5x3 + 3x4 ≥ 5 2x2 + x3 + 2x4 ≥ 1 x2 + x3 + x4 ≥ 1 [iterated application of ILP division rule with k+1

k

≤ α <

k k−1]

14/44

slide-15
SLIDE 15

Weakening

We can reduce the degree of the constraint by “satisfying” any of its literals weakening:

  • i=j ai.xi + aj.xj ≥ k
  • i=j ai.xi ≥ k − aj

5x1 + 3x2 + 2x3 + 2x4 + x5 ≥ 8 3x2 + 2x3 + 2x4 + x5 ≥ 3 Useful for reducing the value of the degree ! [Apply linear combination rule with xj ≥ 0]

15/44

slide-16
SLIDE 16

Reduction to cardinality

Extract a cardinality constraint from a LPB constraint reduce to card: n

i=1 ai.xi ≥ k

a1 ≥ a2 ≥ ...an n

i=1 xi ≥ k′

with k′−1

i=1 ai < k ≤ k′ i=1 ai

5x1 + 3x2 + 2x3 + 2x4 + x5 ≥ 8 x1 + x2 + x3 + x4 + x5 ≥ 2

16/44

slide-17
SLIDE 17

The various Cutting Planes

◮ Linear combination + ILP division = Chv´

atal-Gomory ILP cutting planes

◮ Addition + TCS division = Proof complexity cutting planes ◮ Linear clashing combination + saturation = Hooker’s

generalized resolution cutting planes Integrating Cutting Planes in a CDCL solver : replace Resolution during Conflict Analysis by Hooker’s Cutting Planes

17/44

slide-18
SLIDE 18

Outline

Definitions and properties Handling Pseudo-Boolean constraints instead of clauses Conflict Driven “generalized resolution” reasoning PB Solvers on PHP formulas

18/44

slide-19
SLIDE 19

Requirements for constraints in a CDCL solver

◮ Detect falsified state ◮ Detect propagation of literals ◮ Provide a “reason” during conflict analysis

19/44

slide-20
SLIDE 20

Some remarks about clauses

l1 ∨ l2 ∨ ... ∨ ln

◮ Falsified when all its literals are falsified

l1 ∨ l2 ∨ ... ∨ ln

◮ Propagates when all but one literals are falsified

l1 ∨ l2 ∨ ... ∨ ln

◮ Propagates one literal ◮ Appears at most once as a reason for an assignment

Chaff : 2 watched literals per clause

20/44

slide-21
SLIDE 21

Some remarks about cardinality constraints

l1 + l2 + ... + ln ≥ k

◮ Falsified when at least n − k + 1 literals are falsified

l1 + l2 + l3 + l4 + l5 + l6 ≥ 4 Note unassigned literals !

◮ Propagates when exactly n − k literals are falsified

l1 + l2 + l3 + l4 + l5 + l6 ≥ 4

◮ Propagates k literals ◮ Appears at most once as a reason for at most k consecutive

assignments. Extended k + 1 watched literals per cardinality

21/44

slide-22
SLIDE 22

Some remarks about LBP constraints

a1.l1 + a2.l2 + ... + an.ln ≥ k A =

  • i

ai Slack s : A − k −

lifalsified ai ◮ Falsified when s < 0 (depends on falsified literals)

5l1 + 3l2 + 2l3 + l4 + l5 + l6 ≥ 6

◮ Propagates remaining literals when s = 0 (*)

5l1 + 3l2 + 2l3 + l4 + l5 + l6 ≥ 6

◮ Propagates literals xi for which s < ai ◮ (*) May appear several times as a reason for non consecutive

assignments Extended watched literals based on coefficients !

slide-23
SLIDE 23

Watched Literals for LPB constraints

Described in Galena [CK03] and PBChaff [Par04], may have already existed in PBS or Satzoo.

◮ General case :

Let M = max(ai) NbWatch = minimal number of literals xi such that ai ≥ k + M.

◮ Cardinality constraints :

M = 1 NbWatch = k + 1

◮ Clauses :

M = 1 k = 1 NbWatch = 2

23/44

slide-24
SLIDE 24

Watched literals : consequences

◮ In LPB constraints, the number of WL is varying during the

search.

◮ In cardinality constraints, the greater the degree, the greater

the number of WL.

◮ Clauses are the best case ! ◮ Big difference for LPB constraint learning

Can we do better using a ≤ representation ?

24/44

slide-25
SLIDE 25

Forced truth values : Implicative and Assertive constraints

◮ unit clause : a clause that propagates one truth value to be

satisfiable

◮ implicative constraint : a constraint which propagates at least

  • ne truth value to be satisfiable.

◮ a LPB constraint C is implicative iff ∃aixi ∈ C such that

  • j=i aj < k or aj − k < ai.
slide-26
SLIDE 26

Forced truth values : Implicative and Assertive constraints

◮ unit clause : a clause that propagates one truth value to be

satisfiable

◮ implicative constraint : a constraint which propagates at least

  • ne truth value to be satisfiable.

◮ a LPB constraint C is implicative iff ∃aixi ∈ C such that

  • j=i aj < k or aj − k < ai.

Example

4x1 + 3x2 + x3 + x4 ≥ 8 propagates x1 and x2

◮ 3 + 1 + 1 < 8 so x1 must be satisfied, same thing on

3x2 + x3 + x4 ≥ 4.

slide-27
SLIDE 27

Forced truth values : Implicative and Assertive constraints

◮ unit clause : a clause that propagates one truth value to be

satisfiable

◮ implicative constraint : a constraint which propagates at least

  • ne truth value to be satisfiable.

◮ a LPB constraint C is implicative iff ∃aixi ∈ C such that

  • j=i aj < k or aj − k < ai.

Example

4x1 + 3x2 + x3 + x4 ≥ 8 propagates x1 and x2

◮ 3 + 1 + 1 < 8 so x1 must be satisfied, same thing on

3x2 + x3 + x4 ≥ 4.

◮ One can note that aj − k = 1 so any literal xi with a coef

greater than 1 must be propagated.

slide-28
SLIDE 28

Forced truth values : Implicative and Assertive constraints

◮ unit clause : a clause that propagates one truth value to be

satisfiable

◮ implicative constraint : a constraint which propagates at least

  • ne truth value to be satisfiable.

◮ a LPB constraint C is implicative iff ∃aixi ∈ C such that

  • j=i aj < k or aj − k < ai.

Example

4x1 + 3x2 + x3 + x4 ≥ 8 propagates x1 and x2

◮ 3 + 1 + 1 < 8 so x1 must be satisfied, same thing on

3x2 + x3 + x4 ≥ 4.

◮ One can note that aj − k = 1 so any literal xi with a coef

greater than 1 must be propagated.

◮ Rewrite into x1 ∧ x2 ∧ (x3 + x4 ≥ 1) ?

slide-29
SLIDE 29

Outline

Definitions and properties Handling Pseudo-Boolean constraints instead of clauses Conflict Driven “generalized resolution” reasoning PB Solvers on PHP formulas

26/44

slide-30
SLIDE 30

Problems with the integration of Generalized Resolution

◮ Derived LPB constraint must be redondant (logical

consequence) no problem here

◮ Derived LPB constraint must be falsified at current decision

level free for resolution, requires special care for GR

◮ Derived LPB constraint must be assertive at backtrack level

syntactical test for clauses, not for PB constraints

27/44

slide-31
SLIDE 31

Computing the backtrack level

◮ Just a max for clauses ◮ More complicated for LPBC : an LPB constraint may be

assertive at different backtrack levels.

◮ Decision literals are no longer “UIP” ! ◮ Need to backtrack to the first one

Example

Given the decisions x1, x2, x3 and the falsified LBP 3x1 + 2x2 + x3 + x4 ≥ 5. Where should I backtrack ?

28/44

slide-32
SLIDE 32

Computing the backtrack level

◮ Just a max for clauses ◮ More complicated for LPBC : an LPB constraint may be

assertive at different backtrack levels.

◮ Decision literals are no longer “UIP” ! ◮ Need to backtrack to the first one

Example

Given the decisions x1, x2, x3 and the falsified LBP 3x1 + 2x2 + x3 + x4 ≥ 5. Where should I backtrack ? backtrack to x1, x2 to propagate x3 and x4 ?

28/44

slide-33
SLIDE 33

Computing the backtrack level

◮ Just a max for clauses ◮ More complicated for LPBC : an LPB constraint may be

assertive at different backtrack levels.

◮ Decision literals are no longer “UIP” ! ◮ Need to backtrack to the first one

Example

Given the decisions x1, x2, x3 and the falsified LBP 3x1 + 2x2 + x3 + x4 ≥ 5. Where should I backtrack ? backtrack to x1, x2 to propagate x3 and x4 ?

  • r to decision level 0 to propagate x1 ?

28/44

slide-34
SLIDE 34

Computing an assertive clause

◮ Let C be a falsified constraint ◮ S = lit(C)>dl ◮ D = lit(C)=dl

1 Pick the reason R for the latest assignment a in C 2 Compute S = S ∪ lit(R)>dl and D = D ∪ lit(R)=dl \ {a}

◮ Repeat 1 − 2 until |D| = 1

29/44

slide-35
SLIDE 35

Computing an assertive LPB constraint

  • 1. Let C be a falsified constraint
  • 2. Pick the reason R for the latest assignment a in C
  • 3. compute α and α′ to remove a from C.
  • 4. Weaken R if needed to ensure that the LPB constraint

generated by applying linear combination is falsified (reduction)

  • 5. Apply clashing combination : C = CC(C, R, α, α′)
  • 6. Apply saturation
  • 7. Update the slack of the generated constraint
  • 8. Repeat 2-7 until the slack is 0

Use arbitrary precision arithmetic to prevent overflow

30/44

slide-36
SLIDE 36

Computing an assertive LPB constraint

  • 1. Let C be a falsified constraint
  • 2. Pick the reason R for the latest assignment a in C
  • 3. compute α and α′ to remove a from C.
  • 4. Weaken R if needed to ensure that the LPB constraint

generated by applying linear combination is falsified (reduction)

  • 5. Apply clashing combination : C = CC(C, R, α, α′)
  • 6. Apply saturation
  • 7. Update the slack of the generated constraint
  • 8. Repeat 2-7 until the slack is 0

Use arbitrary precision arithmetic to prevent overflow Not needed if reduced to cardinality constraint

30/44

slide-37
SLIDE 37

Example

   (C1) 5x1 + 3x2 + 2x3 + 2x4 + x5 ≥ 8 (C2) 5x1 + 3x2 + 2x3 + 2x4 + x5 ≥ 5 (C3) x1 + x3 + x4 ≥ 2 x0

5, x0 1[C1], x1 4, x1 3[C3], x1 2[C1]

Poss(C1) = +2, Poss(C2) = −2

  • Red. x1 : (C ′

1)

3x2 + 2x3 + 2x4 + x5 ≥ 3 poss=+2

  • Red. x3 : (C ′′

1 )

x2 + x4 + x5 ≥ 1 poss=0 CC(C2,3 × C ′′

1 ) = 2x10 + 2x31 + x1 4 + 2x0 5 ≥ 2

Assertive at decision level 0 (x3 is propagated to 1). Would learn x1 + x4 + x5 ≥ 1 with clause learning. Assertive at decision level 0 (x4 is propagated to 1).

31/44

slide-38
SLIDE 38

A brief history of LPB constraints within SAT solvers

[Bar95] DPLL extension to LPB [opbdp] [Wal97] (and [Pre02, Pre04]) local search for LPB [MFSO97] B’n’B LPB solver (GRASP) [bsolo] [WKS01] incremental SAT with LPB (GRASP) [satire] [ARMS02, Sak03] LPB contraints with Chaff/CDCL solver [pbs, see also satzoo (minisat)] [Gin02] extended RelSAT to LPB (LPB learning) [CK03] CDCL with LPB learning [galena] [Par04] describe a generic CDCL solver based on group theory handling arbitrary boolean gates. [SS06] CDCL solver able to learn temporary LPB constraints [pueblo]

slide-39
SLIDE 39

A brief history of LPB constraints within SAT solvers

[Bar95] DPLL extension to LPB [opbdp] [Wal97] (and [Pre02, Pre04]) local search for LPB [MFSO97] B’n’B LPB solver (GRASP) [bsolo] [WKS01] incremental SAT with LPB (GRASP) [satire] [ARMS02, Sak03] LPB contraints with Chaff/CDCL solver [pbs, see also satzoo (minisat)] [Gin02] extended RelSAT to LPB (LPB learning) [CK03] CDCL with LPB learning [galena] [Par04] describe a generic CDCL solver based on group theory handling arbitrary boolean gates. [SS06] CDCL solver able to learn temporary LPB constraints [pueblo] After 2006 ?

slide-40
SLIDE 40

A brief history of LPB constraints within SAT solvers

[Bar95] DPLL extension to LPB [opbdp] [Wal97] (and [Pre02, Pre04]) local search for LPB [MFSO97] B’n’B LPB solver (GRASP) [bsolo] [WKS01] incremental SAT with LPB (GRASP) [satire] [ARMS02, Sak03] LPB contraints with Chaff/CDCL solver [pbs, see also satzoo (minisat)] [Gin02] extended RelSAT to LPB (LPB learning) [CK03] CDCL with LPB learning [galena] [Par04] describe a generic CDCL solver based on group theory handling arbitrary boolean gates. [SS06] CDCL solver able to learn temporary LPB constraints [pueblo] After 2006 ? Major work on CNF encoding of cardinality and LBP constraints (Minisat+ effect)

slide-41
SLIDE 41

LPB constraints case : what can go wrong

Boolean propagation lazy data structure for maintaining an alert value require more bookkeeping than for clauses. Assertive constraints cannot syntactically be identified. Linear combination between two conflictual constraints doesn’t necessary result in a falsified constraint ! Weakening may be needed to obtain a cutting plane. Coefficient management In some cases, the coefficients of the LPB keep growing. Consequence : learning PB constraints does slow down the solver ! Solutions :

◮ Reduce learned clauses to Cardinality constraints (Galena,

PBChaff)

◮ Learn both a clause and a PB constraint, then eventually

remove the PB constraint (Pueblo).

◮ Learn clauses (Minisat+, PBS).

33/44

slide-42
SLIDE 42

Outline

Definitions and properties Handling Pseudo-Boolean constraints instead of clauses Conflict Driven “generalized resolution” reasoning PB Solvers on PHP formulas

34/44

slide-43
SLIDE 43

Trace of the search for pigeon-hole 4/3

∗ #v a r i a b l e= 12 #c o n s t r a i n t= 7 ∗ beginMapping ∗ 1=P1H1 2=P1H2 3=P1H3 ∗ 4=P2H1 5=P2H2 6=P2H3 ∗ 7=P3H1 8=P3H2 9=P3H3 ∗ 10=P4H1 11=P4H2 12=P4H3 ∗ endMapping +1 x1 +1 x2 +1 x3 >= 1 ; +1 x4 +1 x5 +1 x6 >= 1 ; +1 x7 +1 x8 +1 x9 >= 1 ; +1 x10 +1 x11 +1 x12 >= 1 ; +1 x1 +1 x4 +1 x7 +1 x10 <= 1 ; +1 x2 +1 x5 +1 x8 +1 x11 <= 1 ; +1 x3 +1 x6 +1 x9 +1 x12 <= 1 ;

35/44

slide-44
SLIDE 44

pigeon-hole 4/3 representation

∗ #v a r i a b l e= 12 #c o n s t r a i n t= 7 ∗ beginMapping ∗ 1=P1H1 2=P1H2 3=P1H3 ∗ 4=P2H1 5=P2H2 6=P2H3 ∗ 7=P3H1 8=P3H2 9=P3H3 ∗ 10=P4H1 11=P4H2 12=P4H3 ∗ endMapping +1 x1 +1 x2 +1 x3 >= 1 ; +1 x4 +1 x5 +1 x6 >= 1 ; +1 x7 +1 x8 +1 x9 >= 1 ; +1 x10 +1 x11 +1 x12 >= 1 ; +1 ˜x1 +1 ˜x4 +1 ˜x7 +1 ˜x10 >= 3 ; +1 ˜x2 +1 ˜x5 +1 ˜x8 +1 ˜x11 >= 3 ; +1 ˜x3 +1 ˜x6 +1 ˜x9 +1 ˜x12 >= 3 ;

36/44

slide-45
SLIDE 45

Conflicts found

◮ x1@1,x12@2,x11@3, x10@3,x4@3,x7@3,x9@4, x8@4, x2@4, x5@4,

x3@4, x6@4 conflict → learn x1 + x4 + x8 + x9 + x11 + x12 ≥ 4 which backtracks to level 3 and propagates x8 and x9 !

◮ conflict

learn x10 + x11 + x12 ≥ 3 which backtracks to level 0 and propagates x10 and x11 and x12 !

◮ conflict

Decision level is 0 thus UNSAT Note that the process starts because of propagating two Boolean values, then three, etc.

37/44

slide-46
SLIDE 46

More precisely

◮ x3 + x6 + x9 + x12 ≥ 3 resolved with

x4 + x5 + x6 ≥ 1 gives x3 + x4 + x5 + x9 + x12 ≥ 3

◮ x3 + x4 + x5 + x9 + x12 ≥ 3 resolved with

x1 + x2 + x3 ≥ 1 gives x1 + x2 + x4 + x5 + x9 + x12 ≥ 3

◮ x1 + x2 + x4 + x5 + x9 + x12 ≥ 3 resolved with

x2 + x5 + x8 + x11 ≥ 3 gives x1 + x4 + x8 + x9 + x11 + x12 ≥ 4 Remember that x + x = 1 !

38/44

slide-47
SLIDE 47

What do these constraints mean ?

◮ P1H1 + P2H2 + P3H3 + P4H3 + P3H2 + P4H2 ≥ 4

P1H1 + P2H2 + P3H3 + P4H3 + P3H2 + P4H2 ≤ 2

◮ P4H1 + P4H2 + P4H3 ≥ 3

P4H1 + P4H2 + P4H3 ≤ 0

39/44

slide-48
SLIDE 48

Interesting to notice

◮ Deriving the first constraint requires resolving two cardinality

constraints to eliminate 2 literals at once → requires cardinality constraints

◮ The first derived constraint allows the solver to propagate two

truth values

◮ The n-th derived constraint allow the solver to propagate

n + 1 truth values

◮ The solver will derive exactly n − 1 constraints, n conflicts, for

a n + 1 pigeons on n holes problem.

40/44

slide-49
SLIDE 49

About lazily deriving cardinality constraints

◮ Showed in [BLLM14] that it is possible to retrieve generic

cardinality constraints from CNF

◮ Could we generate cardinality constraints needed for short

PHP unsat proof on the fly ?

41/44

slide-50
SLIDE 50

About lazily deriving cardinality constraints

◮ Showed in [BLLM14] that it is possible to retrieve generic

cardinality constraints from CNF

◮ Could we generate cardinality constraints needed for short

PHP unsat proof on the fly ?

◮ The answer is no if the cardinality constraints are detected

  • ne by one

41/44

slide-51
SLIDE 51

Issue with lazy card detection for PHP

Suppose the original cardinality generalized resolution is x + y2 + y3 ≥ 2 ≡ x ∨ y2, x ∨ y3, y2 ∨ y3 y + y2 + y3 ≥ 2 ———————— x + y ≥ 2 (1)

◮ Suppose we are able to retrieve the second cardinality from

the CNF. The resolution steps will be : x + y2 ≥ 1 x + y3 ≥ 1 y + y2 + y3 ≥ 2 —————— 2 ∗ x + y ≥ 2 (2)

◮ (1) allows to propagate both x and y. ◮ (2) only allows to propagate x ◮ the coefficient of x is growing on (2)

42/44

slide-52
SLIDE 52

Using generalized resolution for SAT benchmarks

◮ Sat4j + cardinality detection is able to solve quickly all sgen

UNSAT benchmarks (and many other counting related problems) using generalized resolution [BLLM14]

◮ It does not seem to help in solving sgen SAT benchmarks

43/44

slide-53
SLIDE 53

Using generalized resolution for SAT benchmarks

◮ Sat4j + cardinality detection is able to solve quickly all sgen

UNSAT benchmarks (and many other counting related problems) using generalized resolution [BLLM14]

◮ It does not seem to help in solving sgen SAT benchmarks ◮ derived constraints contain huge coefficients and threshold

(100’s of digits)

43/44

slide-54
SLIDE 54

Using generalized resolution for SAT benchmarks

◮ Sat4j + cardinality detection is able to solve quickly all sgen

UNSAT benchmarks (and many other counting related problems) using generalized resolution [BLLM14]

◮ It does not seem to help in solving sgen SAT benchmarks ◮ derived constraints contain huge coefficients and threshold

(100’s of digits)

◮ can we avoid it ?

43/44

slide-55
SLIDE 55

Conclusion

◮ It is possible to introduce some kind of ”cutting planes”

reasoning in CDCL solvers : Hooker’s generalized resolution.

◮ Constraint derivation is driven by conflict analysis as in CDCL ◮ Solves UNSAT PHP instances (and other counting problems)

expressed by cardinalities (not CNF)

◮ Short UNSAT proofs for PHP start by learning constraints

propagating two literals

◮ Open problems :

◮ Better internal normal representation for PB constraints ? ◮ Should it also work for SAT benchmarks ? ◮ Is it really a good idea to stay in the [very constrained] CDCL

architecture ?

44/44

slide-56
SLIDE 56

Albert Atserias, Johannes Klaus Fichte, and Marc Thurley. Clause-learning algorithms with many restarts and bounded-width resolution.

  • J. Artif. Intell. Res. (JAIR), 40 :353–373, 2011.
  • F. Aloul, A. Ramani, I. Markov, and K. Sakallah.

Generic ILP versus Specialized 0-1 ILP : an update. In Proceedings of ICCAD’02, pages 450–457, 2002. Peter Barth. A Davis-Putnam based enumeration algorithm for linear pseudo-Boolean optimization. Technical Report MPI–I–95–2–003, Max-Plank-Institut fur Informatik, Saarbr¨ ucken, 1995. Armin Biere, Daniel Le Berre, Emmanuel Lonca, and Norbert Manthey. Detecting cardinality constraints in CNF. In Carsten Sinz and Uwe Egly, editors, Theory and Applications of Satisfiability Testing - SAT 2014 - 17th International Conference, Held as Part of the Vienna Summer of Logic, VSL 2014, Vienna, Austria, July 14-17, 2014. Proceedings, volume 8561 of Lecture Notes in Computer Science, pages 285–301. Springer, 2014. Donald Chai and Andreas Kuehlmann. A fast pseudo-boolean constraint solver. In ACM/IEEE Design Automation Conference (DAC’03), pages 830–835, Anaheim, CA, 2003. Heidi E. Dixon Matthew L. Ginsberg. Inference methods for a pseudo-boolean satisfiability solver. In Proceedings of The Eighteenth National Conference on Artificial Intelligence (AAAI-2002), pages 635–640, 2002.

  • J. N. Hooker.

Generalized resolution and cutting planes.

  • Ann. Oper. Res., 12(1-4) :217–239, 1988.

44/44

slide-57
SLIDE 57

Vasco M. Manquinho, Paulo F. Flores, Jo˜ ao P. Marques Silva, and Arlindo L. Oliveira. Prime implicant computation using satisfiability algorithms. In ICTAI, pages 232–239, 1997. Heidi E. Dixon Matthew L. Ginsberg Andrew J. Parkes. Generalizing boolean satisfiability i : Background and survey of existing work. In Journal of Artificial Intelligence Research 21, 2004. Knot Pipatsrisawat and Adnan Darwiche. On the power of clause-learning sat solvers as resolution engines.

  • Artif. Intell., 175(2) :512–525, 2011.
  • S. Prestwich.

Randomised backtracking for linear pseudo-boolean constraint problems. In Proceedings of Fourth International Workshop on Integration of AI and OR techniques in Constraint Programming for Combinatorial Optimisation Problems (CP-AI-OR’2002), pages 7–20, 2002.

  • S. Prestwich.

Incomplete dynamic backtracking for linear pseudo-boolean problems : Hybrid optimization techniques. Annals of Operations Research, 130(1-4) :57–73, August 2004. Fadi A. Aloul Arathi Ramani Igor L. Markov Karem A. Sakallah. Symmetry-breaking for pseudo-boolean formulas. In International Workshop on Symmetry on Constraint Satisfaction Problems (SymCon), pages 1–12, County Cork, Ireland, 2003. Hossein M. Sheini and Karem A. Sakallah. Pueblo : A Hybrid Pseudo-Boolean SAT Solver. Journal on Satisfiability, Boolean Modeling and Computation (JSAT), 2 :165–182, 2006.

  • J. P. Walser.

44/44

slide-58
SLIDE 58

Solving Linear Pseudo-Boolean Constraint Problems with Local Search. In Proceedings of the Fourteenth National Conference on Artificial Intelligence (AAAI-97), pages 269–274, 1997. Jesse Whittemore, Joonyoung Kim, and Karem A. Sakallah. Satire : A new incremental satisfiability engine. In DAC, pages 542–545. ACM, 2001. 44/44