pseudo-boolean solving by incremental translation to satragerdl/fmcad11/slides/... · 2011. 10....

58
Pseudo-Boolean Solving by Incremental Translation to SAT Pete Manolios Vasilis Papavasileiou Northeastern University {pete,vpap}@ccs.neu.edu October 31, 2011

Upload: others

Post on 25-Mar-2021

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Pseudo-Boolean Solving by IncrementalTranslation to SAT

Pete Manolios Vasilis Papavasileiou

Northeastern University{pete,vpap}@ccs.neu.edu

October 31, 2011

Page 2: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Motivation: Industrial Design Problems

How to connect, integrate,assemble thousands ofcomponents in an aerospacedesign, subject to globalrequirements?

1Photo by Luis Argerich, CC-by-2.0

Page 3: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Motivation: Industrial Design Problems

How to connect, integrate,assemble thousands ofcomponents in an aerospacedesign, subject to globalrequirements?

1Photo by Luis Argerich, CC-by-2.0

Page 4: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Solution: Synthesizing Architectures1

The core of the problem ispseudo-Boolean constraints!

1CAV 2011

Page 5: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Solution: Synthesizing Architectures1

The core of the problem ispseudo-Boolean constraints!

1CAV 2011

Page 6: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Pseudo-Boolean (PB) Constraints

Pseudo-Boolean ConstraintConstraint of the form c1x1 + c2x2 + · · ·+ cnxn � r

I � is one of<,≤,=,>, or≥

I variables xi ∈ {0, 1}I integer coefficients ciI generalization of clausesI can be encoded as CNF 1

Pseudo-Boolean ProblemConjunction of PB constraints

1Een and Sorensson, JSAT, 2006 (MiniSat+)

Page 7: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Pseudo-Boolean (PB) Constraints

Pseudo-Boolean ConstraintConstraint of the form c1x1 + c2x2 + · · ·+ cnxn � r

I � is one of<,≤,=,>, or≥I variables xi ∈ {0, 1}

I integer coefficients ciI generalization of clausesI can be encoded as CNF 1

Pseudo-Boolean ProblemConjunction of PB constraints

1Een and Sorensson, JSAT, 2006 (MiniSat+)

Page 8: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Pseudo-Boolean (PB) Constraints

Pseudo-Boolean ConstraintConstraint of the form c1x1 + c2x2 + · · ·+ cnxn � r

I � is one of<,≤,=,>, or≥I variables xi ∈ {0, 1}I integer coefficients ci

I generalization of clausesI can be encoded as CNF 1

Pseudo-Boolean ProblemConjunction of PB constraints

1Een and Sorensson, JSAT, 2006 (MiniSat+)

Page 9: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Pseudo-Boolean (PB) Constraints

Pseudo-Boolean ConstraintConstraint of the form c1x1 + c2x2 + · · ·+ cnxn � r

I � is one of<,≤,=,>, or≥I variables xi ∈ {0, 1}I integer coefficients ciI generalization of clauses

I can be encoded as CNF 1

Pseudo-Boolean ProblemConjunction of PB constraints

1Een and Sorensson, JSAT, 2006 (MiniSat+)

Page 10: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Pseudo-Boolean (PB) Constraints

Pseudo-Boolean ConstraintConstraint of the form c1x1 + c2x2 + · · ·+ cnxn � r

I � is one of<,≤,=,>, or≥I variables xi ∈ {0, 1}I integer coefficients ciI generalization of clausesI can be encoded as CNF 1

Pseudo-Boolean ProblemConjunction of PB constraints

1Een and Sorensson, JSAT, 2006 (MiniSat+)

Page 11: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Pseudo-Boolean (PB) Constraints

Pseudo-Boolean ConstraintConstraint of the form c1x1 + c2x2 + · · ·+ cnxn � r

I � is one of<,≤,=,>, or≥I variables xi ∈ {0, 1}I integer coefficients ciI generalization of clausesI can be encoded as CNF 1

Pseudo-Boolean ProblemConjunction of PB constraints

1Een and Sorensson, JSAT, 2006 (MiniSat+)

Page 12: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Two Families of Solvers

..SAT and ILP solvers and techniques can be applied!

Goal: improve SAT-based PB solving!

I Impressive performance improvementsI Flexibility, well-engineered interfacesI Open source, easy to experiment withI Works well for almost propositional instances

Page 13: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Two Families of Solvers

..SAT and ILP solvers and techniques can be applied!

Goal: improve SAT-based PB solving!

I Impressive performance improvementsI Flexibility, well-engineered interfacesI Open source, easy to experiment withI Works well for almost propositional instances

Page 14: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Incremental Translation to SAT

We do not have to encode all the constraints

Satisfiable FormulasJust enough constraints to find satisfying assignment

Unsatisfiable FormulasWemay hit an unsatisfiable core quickly

Page 15: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Incremental Translation to SAT

We do not have to encode all the constraints

Satisfiable FormulasJust enough constraints to find satisfying assignment

Unsatisfiable FormulasWemay hit an unsatisfiable core quickly

Page 16: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Incremental Translation to SAT

We do not have to encode all the constraints

Satisfiable FormulasJust enough constraints to find satisfying assignment

Unsatisfiable FormulasWemay hit an unsatisfiable core quickly

Page 17: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Algorithm

procedure pb-sat(P)C← {c ∈ P : c is a PB-clause}P← {p ∈ P : p is not a PB-clause}while true do

A,U← sat(C)if A = UNSAT then return UNSATP← simplify(P,U)if A satisfies P then return AP′ ← {p ∈ P : p falsified by A}if P′ = ∅ then P′ ← select(P)for all p ∈ P′ do C← C ∧ translate(p)P← P \ P′

.

Page 18: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Algorithm

procedure pb-sat(P)C← {c ∈ P : c is a PB-clause}P← {p ∈ P : p is not a PB-clause}while true do

A,U← sat(C)if A = UNSAT then return UNSATP← simplify(P,U)if A satisfies P then return AP′ ← {p ∈ P : p falsified by A}if P′ = ∅ then P′ ← select(P)for all p ∈ P′ do C← C ∧ translate(p)P← P \ P′

.

Page 19: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Algorithm

procedure pb-sat(P)C← {c ∈ P : c is a PB-clause}P← {p ∈ P : p is not a PB-clause}while true do

A,U← sat(C)if A = UNSAT then return UNSATP← simplify(P,U)if A satisfies P then return AP′ ← {p ∈ P : p falsified by A}if P′ = ∅ then P′ ← select(P)for all p ∈ P′ do C← C ∧ translate(p)P← P \ P′

.

Page 20: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Algorithm

procedure pb-sat(P)C← {c ∈ P : c is a PB-clause}P← {p ∈ P : p is not a PB-clause}while true do

A,U← sat(C)if A = UNSAT then return UNSATP← simplify(P,U)if A satisfies P then return AP′ ← {p ∈ P : p falsified by A}if P′ = ∅ then P′ ← select(P)for all p ∈ P′ do C← C ∧ translate(p)P← P \ P′

..

returns a partial assignment(A) and a set of units (U)

Page 21: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Algorithm

procedure pb-sat(P)C← {c ∈ P : c is a PB-clause}P← {p ∈ P : p is not a PB-clause}while true do

A,U← sat(C)if A = UNSAT then return UNSATP← simplify(P,U)if A satisfies P then return AP′ ← {p ∈ P : p falsified by A}if P′ = ∅ then P′ ← select(P)for all p ∈ P′ do C← C ∧ translate(p)P← P \ P′

.

Page 22: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Algorithm

procedure pb-sat(P)C← {c ∈ P : c is a PB-clause}P← {p ∈ P : p is not a PB-clause}while true do

A,U← sat(C)if A = UNSAT then return UNSATP← simplify(P,U)if A satisfies P then return AP′ ← {p ∈ P : p falsified by A}if P′ = ∅ then P′ ← select(P)for all p ∈ P′ do C← C ∧ translate(p)P← P \ P′

.

Page 23: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Algorithm

procedure pb-sat(P)C← {c ∈ P : c is a PB-clause}P← {p ∈ P : p is not a PB-clause}while true do

A,U← sat(C)if A = UNSAT then return UNSATP← simplify(P,U)if A satisfies P then return AP′ ← {p ∈ P : p falsified by A}if P′ = ∅ then P′ ← select(P)for all p ∈ P′ do C← C ∧ translate(p)P← P \ P′

.

Page 24: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Algorithm

procedure pb-sat(P)C← {c ∈ P : c is a PB-clause}P← {p ∈ P : p is not a PB-clause}while true do

A,U← sat(C)if A = UNSAT then return UNSATP← simplify(P,U)if A satisfies P then return AP′ ← {p ∈ P : p falsified by A}if P′ = ∅ then P′ ← select(P)for all p ∈ P′ do C← C ∧ translate(p)P← P \ P′

.

Page 25: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Algorithm

procedure pb-sat(P)C← {c ∈ P : c is a PB-clause}P← {p ∈ P : p is not a PB-clause}while true do

A,U← sat(C)if A = UNSAT then return UNSATP← simplify(P,U)if A satisfies P then return AP′ ← {p ∈ P : p falsified by A}if P′ = ∅ then P′ ← select(P)for all p ∈ P′ do C← C ∧ translate(p)P← P \ P′

.

Page 26: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Algorithm

procedure pb-sat(P)C← {c ∈ P : c is a PB-clause}P← {p ∈ P : p is not a PB-clause}while true do

A,U← sat(C)if A = UNSAT then return UNSATP← simplify(P,U)if A satisfies P then return AP′ ← {p ∈ P : p falsified by A}if P′ = ∅ then P′ ← select(P)for all p ∈ P′ do C← C ∧ translate(p)P← P \ P′

.

Page 27: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Simplification

2x1 + 2x2 + x3 + x4 ≥ 4 ¬x1 x2

2x2 + x3 + x4 ≥ 4 ¬x1 x2x3 + x4 ≥ 2 ¬x1 x2

¬x1 x2 x3 x4

Page 28: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Simplification

2x1 + 2x2 + x3 + x4 ≥ 4 ¬x1 x2

2x2 + x3 + x4 ≥ 4 ¬x1 x2x3 + x4 ≥ 2 ¬x1 x2

¬x1 x2 x3 x4

Page 29: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Simplification

2x1 + 2x2 + x3 + x4 ≥ 4 ¬x1 x22x2 + x3 + x4 ≥ 4 ¬x1 x2

x3 + x4 ≥ 2 ¬x1 x2¬x1 x2 x3 x4

Page 30: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Simplification

2x1 + 2x2 + x3 + x4 ≥ 4 ¬x1 x22x2 + x3 + x4 ≥ 4 ¬x1 x2

x3 + x4 ≥ 2 ¬x1 x2¬x1 x2 x3 x4

Page 31: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Simplification

2x1 + 2x2 + x3 + x4 ≥ 4 ¬x1 x22x2 + x3 + x4 ≥ 4 ¬x1 x2

x3 + x4 ≥ 2 ¬x1 x2

¬x1 x2 x3 x4

Page 32: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Simplification

2x1 + 2x2 + x3 + x4 ≥ 4 ¬x1 x22x2 + x3 + x4 ≥ 4 ¬x1 x2

x3 + x4 ≥ 2 ¬x1 x2

¬x1 x2 x3 x4

Page 33: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Simplification

2x1 + 2x2 + x3 + x4 ≥ 4 ¬x1 x22x2 + x3 + x4 ≥ 4 ¬x1 x2

x3 + x4 ≥ 2 ¬x1 x2¬x1 x2 x3 x4

Page 34: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Algorithm

procedure pb-sat(P)C← {c ∈ P : c is a PB-clause}P← {p ∈ P : p is not a PB-clause}while true do

A,U← sat(C)if A = UNSAT then return UNSATP← simplify(P,U)if A satisfies P then return AP′ ← {p ∈ P : p falsified by A}if P′ = ∅ then P′ ← select(P)for all p ∈ P′ do C← C ∧ translate(p)P← P \ P′

Page 35: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

A |= C

{ x, ¬y, ¬z, w, . . .} |= C

{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x|= ¬(C ∧ y)

candidates : {x, ¬y, ¬z, w, . . .}units : U

..

Page 36: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

{ x, ¬y, ¬z, w, . . .} |= C

{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x|= ¬(C ∧ y)

candidates : {x, ¬y, ¬z, w, . . .}units : U

..

Page 37: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

{ x, ¬y, ¬z, w, . . .} |= C

{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x|= ¬(C ∧ y)

candidates : {x, ¬y, ¬z, w, . . .}units : U

..

U does not say anything about x, y, z, or w!

.

Page 38: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

{ x, ¬y, ¬z, w, . . .} |= C

{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x|= ¬(C ∧ y)

candidates : {x, ¬y, ¬z, w, . . .}units : U..

Page 39: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

{ x, ¬y, ¬z, w, . . .} |= C

{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x|= ¬(C ∧ y)

candidates : {x, ¬y, ¬z, w, . . .}units : U...

sat(C ∧ ¬x) ?

Page 40: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

{ x, ¬y, ¬z, w, . . .} |= C{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x

|= ¬(C ∧ y)

candidates : {x, ¬y, ¬z, w, . . .}units : U...

sat(C ∧ ¬x) ?

Page 41: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

{ x, ¬y, ¬z, w, . . .} |= C{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x

|= ¬(C ∧ y)

candidates : {x, ¬y, ¬z, w, . . .}units : U..

Page 42: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

{ x, ¬y, ¬z, w, . . .} |= C{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x

|= ¬(C ∧ y)

candidates : {¬y, . . .}units : U..

Page 43: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

{ x, ¬y, ¬z, w, . . .} |= C{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x

|= ¬(C ∧ y)

candidates : {¬y, . . .}units : U...

sat(C ∧ y) ?

Page 44: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

{ x, ¬y, ¬z, w, . . .} |= C{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x

|= ¬(C ∧ y)

candidates : {¬y, . . .}units : U...

sat(C ∧ y) ?

Page 45: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

{ x, ¬y, ¬z, w, . . .} |= C{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x

|= ¬(C ∧ y)

candidates : { . . .}units : U ∪ {¬y}..

Page 46: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units

{ x, ¬y, ¬z, w, . . .} |= C{ ¬x, ¬y, z, ¬w, . . .} |= C ∧ ¬x

|= ¬(C ∧ y)

candidates : { . . .}units : U ∪ {¬y}..

SAT queries cost! limit a resource (e.g., decisions)

.

Page 47: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Experiments: Industrial Instances 1

MiniSat+I Default configuration takes more than a dayI BDDs: blow-up with 96GB of RAMI Human intervention: 91 minutes (11 minutes for SAT solving)

PB-SATI 19 seconds; 9 seconds for SAT solving (PicoSAT 2)I Only BDDs for the translationI less than 2GB of RAM

1CAV 2011

Page 48: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Experiments: Industrial Instances 1

MiniSat+I Default configuration takes more than a dayI BDDs: blow-up with 96GB of RAMI Human intervention: 91 minutes (11 minutes for SAT solving)

PB-SATI 19 seconds; 9 seconds for SAT solving (PicoSAT 2)I Only BDDs for the translationI less than 2GB of RAM

1CAV 20112Thanks Armin!

Page 49: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Conclusions

We have extended the reach of SAT-basedapproaches to pseudo-Boolean solving.

Page 50: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Thank you!

Questions?

Page 51: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

PB Competition Benchmarks

486 Decision Instances

bsolo

PB-SAT PB-SATR

solved 430

402 431

A Twist: Linear Relaxationsprocedure pb-satR(P)

if the relaxation of P is infeasible thenreturn UNSAT

elsereturn pb-sat(P)

.

Page 52: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

PB Competition Benchmarks

486 Decision Instances

bsolo PB-SAT

PB-SATR

solved 430 402

431

A Twist: Linear Relaxationsprocedure pb-satR(P)

if the relaxation of P is infeasible thenreturn UNSAT

elsereturn pb-sat(P)

.

Page 53: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

PB Competition Benchmarks

486 Decision Instances

bsolo PB-SAT

PB-SATR

solved 430 402

431

A Twist: Linear Relaxationsprocedure pb-satR(P)

if the relaxation of P is infeasible thenreturn UNSAT

elsereturn pb-sat(P)

.

Page 54: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

PB Competition Benchmarks

486 Decision Instances

bsolo PB-SAT

PB-SATR

solved 430 402

431

A Twist: Linear Relaxationsprocedure pb-satR(P)

if the relaxation of P is infeasible thenreturn UNSAT

elsereturn pb-sat(P)

..

variables in [0, 1]; simplex

Page 55: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

PB Competition Benchmarks

486 Decision Instances

bsolo PB-SAT

PB-SATR

solved 430 402

431

A Twist: Linear Relaxationsprocedure pb-satR(P)

if the relaxation of P is infeasible thenreturn UNSAT

elsereturn pb-sat(P)

.

Page 56: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

PB Competition Benchmarks

486 Decision Instances

bsolo PB-SAT PB-SATR

solved 430 402 431

A Twist: Linear Relaxationsprocedure pb-satR(P)

if the relaxation of P is infeasible thenreturn UNSAT

elsereturn pb-sat(P)

.

Page 57: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Experiments: PB Competition

486 Decision Problems

CPLEX bsolo wbo SAT4J MS+2 PB-SAT VPS3

solved 416 430 397 398 399 402 465avg. time 135.8 38.0 70.3 67.8 83.1 67.7 -

939 Optimization Problems

CPLEX bsolo wbo SAT4J PB-SAT VPSsolved 676 580 579 542 540 792

avg. time 30.8 50.2 48.8 25.7 81.3 -

2with PicoSAT as the SAT solver3Virtual Portfolio Solver

Page 58: Pseudo-Boolean Solving by Incremental Translation to SATragerdl/fmcad11/slides/... · 2011. 10. 30. · solved 416 430 397 398 399 402 465 avg.time 135.8 38.0 70.3 67.8 83.1 67.7

Extracting More Units: The Algorithm

proceduremore-units(C)A,U← sat(C)if A = UNSAT then return UNSATα← {A}for all l ∈ U do C← C ∧ lfor all variables v s.t. v /∈ U ∧ ¬v /∈ U do

if ∀A1,A2 ∈ α : A1(v) = A2(v) thenl← polarity(A′, v) for some A′ ∈ αB← sat-limited(C ∧ ¬l,R)if B = UNSAT then

U← U ∪ {l}C← C ∧ l

else α← α ∪ {B}return pick(α),U