# Generic ILP versus specialized 0-1 ILP: an update

**ABSTRACT** Optimized solvers for the Boolean Satisfiability (SAT) problem have many applications in areas such as hardware and software verification, FPGA routing, planning, etc. Further uses are complicated by the need to express "counting constraints" in conjunctive normal form (CNF). Expressing such constraints by pure CNF leads to more complex SAT instances. Alternatively, those constraints can be handled by Integer Linear Programming (ILP), but generic ILP solvers may ignore the Boolean nature of 0-1 variables. Therefore specialized 0-1 ILP solvers extend SAT solvers to handle these so-called "pseudo-Boolean" constraints. This work provides an update on the on-going competition between generic ILP techniques and specialized 0-1 ILP techniques. To make a fair comparison, we generalize recent ideas for fast SAT-solving to more general 0-1 ILP problems that may include counting constraints and optimization. Another aspect of our comparison is evaluation on 0-1 ILP benchmarks that originate in Electronic Design Automation (EDA), but that cannot be directly solved by a SAT solver. Specifically, we solve instances of the Max-SAT and Max-ONEs optimization problems which seek to maximize the number of satisfied clauses and the "true" values over all satisfying assignments, respectively. Those problems have straightforward applications to SAT-based routing and are additionally important due to reductions from Max-Cut, Max-Clique, and Min Vertex Cover. Our experimental results show that specialized 0-1 techniques tend to outperform generic ILP techniques on Boolean optimization problems as well as on general EDA SAT problems.

**0**Bookmarks

**·**

**121**Views

- [Show abstract] [Hide abstract]

**ABSTRACT:**The predominance of multicore processors has increased the inter-est in developing parallel Boolean Satisfiability (SAT) solvers. As a result, more parallel SAT solvers are emerging. Even though parallel approaches are known to boost performance, parallel approaches developed for Boolean optimization are scarce. This paper proposes parallel search algorithms for Boolean optimiza-tion and introduces a new parallel solver for Boolean optimization problem in-stances. Using two threads, an unsatisfiability-based algorithm is used to search on the lower bound value of the objective function, while at the same time a linear search is performed on the upper bound value of the objective function. Searching in both directions and exchanging learned clauses between these two orthogonal approaches makes the search more efficient. This idea is further extended for a larger number of threads by dividing the search space considering different local upper values of the objective function. The parallel search on different local up-per values leads to constant updates on the lower and upper bound values, which result in reducing the search space. Moreover, different search strategies are per-formed on the upper bound value, increasing the diversification of the search. - SourceAvailable from: Fadi A. Aloul
##### Conference Paper: On Solving Optimization Problems Using Boolean Satisfiability

International Conference on Modeling, Simulation, and Applied Optimization; 01/2005 - SourceAvailable from: Fadi A. Aloul
##### Conference Paper: PN code acquisition using Boolean satisfiability techniques

[Show abstract] [Hide abstract]

**ABSTRACT:**In mobile radio communication systems using spread spectrum technology, an accurate estimate of the signal propagation delay is needed in order to recover the transmitted data. This process is usually done using a pseudo noise (PN) code acquisition algorithm to search for the correct propagation delay within a window of possible delays. In this paper, we propose a new approach to solving the PN code acquisition problem using advanced Boolean Satisfiability (SAT) techniques. SAT solvers use intelligent search algorithms that can traverse the search space and efficiently prune parts that contain no solutions. These solvers have recently been used to solve many challenging problems in Engineering and Computer Science. In this paper, we show how to formulate the PN code acquisition problem as a SAT instance and evaluate the use of advanced SAT techniques in solving the problem. Our approach is verified by simulation and presented results indicate that the proposed system achieves a detection probability for the correct delay of almost 100% for all practical cases.Proceedings of the 2009 IEEE conference on Wireless Communications & Networking Conference; 04/2009

Page 1

CSE-TR-

Generic ILP versus Specialized 0-1 ILP: An Update

Fadi A. Aloul, Arathi Ramani, Igor L. Markov, Karem A. Sakallah

461-02

?????????????????????????????????????????

?????????????????????????????????????????????????????????

??????????????????????????????

???

??????????????????????????

August 19, 2002

Page 2

Generic ILP versus Specialized 0-1 ILP: An Update

Fadi A. Aloul, Arathi Ramani, Igor L. Markov, Karem A. Sakallah

Advanced Computer Architecture Laboratory

Department of Electrical Engineering and Computer Science

University of Michigan

Ann Arbor, Michigan 48109-2122

August 19, 2002

Page 3

Abstract

Optimized solvers for the Boolean Satisfiability (SAT) problem have many applications in areas such as hardware

and software verification, FPGA routing, planning, etc. Further uses are complicated by the need to express

“counting constraints” in conjunctive normal form (CNF). Expressing such constraints by pure CNF leads to more

complex SAT instances. Alternatively, those constraints can be handled by Integer Linear Programming (ILP), but

generic ILP solvers may ignore the Boolean nature of 0-1 variables. Therefore specialized 0-1 ILP solvers extend

SAT solvers to handle these so-called “pseudo-Boolean” constraints.

This work provides an update on the on-going competition between generic ILP techniques and specialized 0-1

ILP techniques. To make a fair comparison, we generalize recent ideas for fast SAT-solving to more general 0-1 ILP

problems that may include counting constraints and optimization. Another aspect of our comparison is evaluation

on 0-1 ILP benchmarks that originate in Electronic Design Automation (EDA), but that cannot be directly solved

by a SAT solver. Specifically, we solve instances of the Max-SAT and Max-ONEs optimization problems which seek

to maximize the number of satisfied clauses and the “true” values over all satisfying assignments, respectively.

Those problems have straightforward applications to SAT-based routing and are additionally important due to

reductions from Max-Cut, Max-Clique, and Min Vertex Cover. Our experimental results show that specialized 0-1

techniques tend to outperform generic ILP techniques on Boolean optimization problems as well as on general EDA

SAT problems.

Page 4

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update2

1INTRODUCTION

Recent algorithmic advances in backtrack Boolean Satisfiability (SAT), along with highly-efficient solver implemen-

tations, have enabled the successful deployment of SAT technology in a wide range of application domains, and par-

ticularly in electronic design automation (EDA). Modern SAT solvers [17, 18, 26] have either displaced or have

become essential companions to binary decision diagram (BDD) packages as the Boolean reasoning engines in such

applications as formal hardware verification [21], routing of field-programmable gate arrays [19], and automatic

test-pattern generation [14]. Their ability to readily solve SAT instances with tens of thousands of variables and

millions of conjunctive normal form (CNF) clauses in a matter of seconds or minutes—an impressive feat that

would have been impossible to even contemplate just a few years ago—has also encouraged their adaptation to

solve some Boolean optimization problems that were traditionally handled as instances of Integer Linear Program-

ming (ILP) [3, 16, 23]. These so-called 0-1 ILP problems call for the minimization or maximization of a linear

subject to a set of m linear constraints1

c x

objective function

where , , and

. These constraints are commonly referred to as pseudo-Boolean (PB) inequalities (to distinguish them

from those that admit unrestricted integer variables) and represent a natural generalization of the CNF constraints

typically handled by SAT solvers. For example, the CNF clause is equivalent to the PB con-

straint . PB constraints are more expressive, however; a single PB constraint may in some

cases correspond to an exponential number of CNF clauses.

Common examples of 0-1 ILPs include Min-COVER [9], Max-SAT and Max-ONEs [6]. In Min-COVER, we have

a collection of subsets of a given set and seek to find a cover of the set using the fewest number of subsets. Logic

minimization of Boolean functions as well as state minimization of finite-state machines are two important

instances of this problem. In the Max-SAT problem, the goal is to find a variable assignment that maximizes the

number of satisfied CNF clauses in an unsatisfiable SAT instance. Finally, in Max-ONEs we seek a satisfying vari-

able assignment that maximizes the number of variables set to 1. Max-SAT has direct application in routing and

routability estimation [24], and both Max-SAT and Max-ONEs are important due to reductions from Max-Cut,

Max-Clique, and Min Vertex Cover.

Adapting a SAT solver for optimization purposes poses two questions: 1) what should be done with the objective

function? and 2) how should the PB constraints be handled? An obvious answer to the first question is to use some

form of branch-and-bound around the SAT engine, and to prune the search space with best estimates of the objec-

tive function value. Alternatively, the objective function can be treated as an auxiliary PB constraint with an

adjustable right-hand-side, or goal. Starting with an easy-to-satisfy goal, a sequence of SAT instances, each with a

successively tighter goal, is then constructed and solved. The process continues until an unsatisfiable instance is

1Greater-than-or-equal and equality constraints are easily accommodated by the equivalences and

.

T

≤

Axb

,

n

∈

b c

?

mn

∈×

A

??

≥⇔ −≤ −

Axb Axb

()()

=⇔≤∧≥

AxbAxb Axb

{}

0,1

n

∈

x

()

12

k

xxx

∨∨∨

?

12

1

k

xxx

+++≥

?

Page 5

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update3

encountered, indicating that we have converged on the optimal value of the objective function, namely the goal

reached in the last satisfiable instance.

There are also two choices for dealing with the PB constraints: each PB constraint can be converted into a set of

equivalent CNF clauses, or the SAT engine is modified to handle PB constraints directly. Conversion to CNF has

the advantage of using the SAT solver as a black box, but, as mentioned above, suffers from a potential exponential

explosion in problem size. This is particularly true of “counting” constraints that impose upper or a lower bounds

on the number of certain objects, e.g. capacity constraints in routing applications. The increase in size can be

reduced from exponential to linear by introducing auxiliary variables that, effectively, decompose a PB constraint

into a “structure” of smaller constraints.

Given these various choices, the main question we address in this paper is whether and in what circumstances

can the currently-best generic ILP techniques compete with specialized SAT-powered 0-1 ILP techniques. Since

both generic ILP solvers and specialized 0-1 ILP solvers have consistently improved since Barth's work [3] on the

subject, we must ensure up-to-date comparisons. For example, ILOG [11] advertises great ILP performance

improvements in CPLEX 7.* over 6.*. On the other hand, the Chaff SAT solver [18], viewed as a narrowly-special-

ized 0-1 ILP solver, outperforms earlier competitors by an order of magnitude on many benchmarks. Therefore, in

order to convincingly compare the state-of-the-art in generic ILP to that in specialized 0-1 ILP, we need to ensure

that the latest techniques are used. In particular, we generalize algorithms used in Chaff to solve 0-1 ILP problems

that may include counting constraints and optimization. Our new specialized 0-1 ILP solver, PBS, handles CNF

constraints and PB inequalities. Unlike previously proposed stochastic local search solvers [22], this solver is com-

plete and is based on a backtrack search algorithm. We believe that our proposed algorithms to handle PB con-

straints can be added to any backtrack SAT solver.

The remainder of the paper is organized in five sections. In Section 2 we briefly review the latest enhancements

in backtrack CNF-SAT solvers. Section 3 introduces PB constraints and describes how they might be incorporated

in a SAT solving scenario. The new PBS solver is described in Section 4, and its performance against best-of-class

ILP, specialized 0-1 ILP, and CNF-SAT solvers is analyzed in Section 5. We conclude, in Section 6, with a few gen-

eral observations and suggestions for further work.

2 ANATOMY OF A MODERN CNF-SAT SOLVER

The power of modern CNF-SAT solvers can be attributed to a few key algorithmic advances and implementation

optimizations to the basic Davis-Logemann-Loveland [7] backtrack procedure which we summarize below.

2.1 Conflict Diagnosis and Clause Recording

A major advance in backtrack CNF-SAT solvers was the introduction of conflict diagnosis [17] and its tight integra-

tion with Boolean constraint propagation (BCP), non-chronological backtracking, and clause recording. Conflict

Page 6

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update4

diagnosis refers to analysis of the implication chains, initiated by elective variables assignments, that cause one or

more clauses to become unsatisfied. Such an analysis can identify a small subset of variables whose current assign-

ments can be blamed for the conflict. In addition, these assignments can be turned into a conflict-induced clause

that, when added to the clause database, prevents the future occurrence of the same conflict, and can be viewed as

a form of on-demand learning. Finally, recognizing that the current conflict is caused by variable assignments from

earlier levels in the decision tree enables non-chronological backtracking, potentially pruning large portions of the

search space.

Conflict diagnosis is implemented in most modern backtrack SAT solvers and its effectiveness in pruning the

search space has been amply demonstrated empirically. A number of variations have also been studied, including

alternative ways of generating conflict clauses and schemes that learn several clauses at each conflict [17, 18].

Recent experimental evidence [27], however, has shown that creating a single conflict clause—based on the unique

implication point closest to the conflict—outperforms other schemes on hard instances.

Notwithstanding its effectiveness in pruning the search space, conflict-based learning runs the risk of exponen-

tially increasing the size of the clause database. This is typically avoided by either 1) recording only those conflict-

induced clauses with k or fewer literals, or 2) deleting conflict-induced clauses after k or more of their literals

become unassigned. This clause addition/deletion threshold k is typically between 100 and 200, indicating that

fairly large clauses are created and kept.

2.2 Random Restarts and Backtracking

Besides conflict-based learning, recent studies have shown that using random restarts can be very effective in solv-

ing hard SAT instances [2, 18]. A SAT solver may often get stuck in a “bad” region of the search space because of

the sequence of decision assignments it had made. The restart process helps to extricate the solver from such

regions by periodically resetting all decision and implication assignments and randomly selecting a new sequence of

decisions, thus insuring that different subtrees are explored each time. Additionally, all conflict-learned clauses in

the various probes of the search space are kept and help boost the effectiveness of subsequent restarts.

Recently, Lynce et al. [15] proposed and empirically evaluated combining random restarts with random back-

tracking. In this scheme, the diagnosis engine periodically backtracks non-chronologically to a decision level involv-

ing any literal in the conflict-induced clause. The completeness of the search is preserved by monotonically

increasing the clause addition/deletion threshold between random backtracks.

2.3 Improved BCP

On the implementation side, it was observed that a significant fraction of a SAT solver’s run time is spent in the

BCP procedure [18]. In a conventional implementation of BCP, an assignment to a variable triggers a traversal of

all clauses that contain literals of that variable to check whether they have become unit or are in conflict. In other

Page 7

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update5

words, an implication step requires time bounded by the number of literals of the assigned variable. This overhead

can be significantly reduced by adopting a form of “lazy” evaluation that avoids unnecessary traversals of the

clause database. Specifically, rather than keep track of all literals in each clause, the enhanced procedure picks and

updates only two unassigned literals per clause (the “watched” literals), and yields a very efficient mechanism for

detecting unit clauses [18, 28]. In a SAT instance consisting of n k-literal clauses, this enhancement reduces BCP

overhead from kn to 2n, which is substantial for typical instances with .

2.4 Decision Strategy

Numerous decision (or branching) heuristics have been proposed over the years, with no single heuristic emerging

as a clear winner in most cases. One that has been found to be particularly effective in a variety of problems is the

Variable State Independent Decaying Sum (VSIDS) heuristic introduced in [18]. The heuristic maintains two

counters for every variable that are incremented if a positive (resp. negative) literal of that variable is identified in

a new conflict-induced clause. The variable with the highest counter is selected for the next decision. Counters are

also periodically divided by a constant to emphasize variables identified in recent conflicts.

3 PROCESSING OF PB CONSTRAINTS

A PB constraint is in normal form if it is expressed as:

(1)

where and denotes either or . We will say that is a true literal if it evaluates to 1 under the

current assignment to its associated variable. An arbitrary PB constraint can be converted to normal form by not-

ing that . For example, is first transformed to the “≤” inequality

which, upon substituting and re-arranging terms, yields .

The two choices for handling PB constraints in a SAT solver are 1) to convert them, in a pre-processing step, to

equivalent CNF constraints, and 2) to process them directly within the SAT solver.

3.1 PB-to-CNF Conversion

The PB constraint in (1) corresponds to a threshold Boolean function [12]. Such functions are unate (monotone) in

each of their variables and have unique minimal CNF representations. Minimality here refers to the smallest CNF

formula, among all functionally-equivalent CNF formulas, namely the formula that has the fewest number of

clauses provided there is no other such formula with the same number of clauses but with fewer literals. This mini-

mal formula can be derived by recursive application of Boole’s expansion theorem [5, p. 36]. Let

denote the function of the PB constraint in (1). Expanding around we get:

(2)

2

k ?

1 1

a x

2 2

a x

n n

a xb

+++≤

???

?

,

i a b

+

∈ ?

i x ?

i x

i x

i x ?

1

ii

xx

=−

123

321

xxx

−+−≥ −

123

321

xxx

−+≤

22

1

xx

=−

123

323

xxx

++≤

()

12

,,,

n

x xx

ϕ

?

i x

( )()

ii

ixix

xx

ϕϕϕ

=∨∨

Page 8

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update6

where and are, respectively, the positive and negative cofactors of with respect to

ϕ

. Noting further

that is either negative or positive unate in

ϕ

allows (2) to be simplified to:

(3)

Repeated application of (3), distributing ∨ over ∧, and making obvious simplifications yields the desired CNF for-

mula. For example, conversion of proceeds as follows:

As mentioned earlier, however, the minimal CNF representation of a PB constraint may have an exponential

number of clauses. Specifically, a counting constraint that chooses at most k out of n objects yields

-literal clauses [25]. For example, choosing at most 15 out of 30 objects yields 150 million 16-literal clauses,

and clearly demonstrates the infeasibility of this type of transformation.

The associativity of addition suggests an alternative transformation that yields a CNF formula whose size is lin-

ear in . This transformation can be obtained by introducing auxiliary “partial sum” variables that decompose the

n

monolithic PB constraint into a set of smaller constraints. Letting , , we can re-

write (1) as follows:

(4)

i x

ϕ

i x

ϕ

i x

i x

(

(

)(

)(

)

)

if

if

ii

ii

xixii

xixii

x

x

x

x

?

x

x

ϕ

ϕ

ϕ

ϕ

ϕ

∨

∨

=

=

=

?

123

323

xxx

++≤

(

(

)

)

≤

()

)

()

]

( )

1

x

x

x

(

)(

)(

x

)()(

)

[()

(

(

[

[

x

](

(

(

)

)

])

)()

123

23123

13

x

x

23

132

132

∨

1312

3

2

2

x

∨

3

∨

32

∨

0

02

0

x

x

xx

xxx

≤ −

xxxx

x

x

x

ϕ =+

+

+

≤

≤

=

=

=

=

=

+≤

∨

∨

∨

∨

()

1

n

k +

()

1

k +

1

n

s→

12

s→

11

s→

2 a

∧

z

+

+

+

∧

∧

≤

2

x ?

1 a

n a

b

1 x ?

n

x ?

Figure 1: Circuit representation of (4). Single- and multi-bit signals are denoted by thin and bold lines, respectively.

ii

i i

sa x

→≡

?

ijkk

i k

≤ ≤

j

ss

→→

≡∑

()()()

112233

nn

ssssb

→→→→

++++≤

?

12

s→

13

s→

1

n

s→

Page 9

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update7

Schematically, (4) can be viewed as a multi-level prefix computation [13] “circuit” (see Figure 1) whose modules

represent AND gates, adders, and an output comparator. From this construction it should be evident that the truth

assignments that satisfy (1) are precisely those assignments that set the circuit output z to 1. Specifically,

(5)

where is the circuit consistency function

ψ

(6)

In other words, the satisfiability of the formula is equivalent to the satisfiability of the PB formula .

The final step in this transformation is the translation of each conjunct in (6) to a set of CNF clauses. This is

accomplished by expressing each multi-bit coefficient and variable in terms of a suitable number of binary encoding

variables and invoking the module function (AND, add, and compare) to relate those variables.

There are obvious simplifications in this construction that can eliminate redundant variables and clauses (e.g.,

some of the equivalences in (6) can be replaced by one-way implications). Furthermore, unlike the first transforma-

tion in (3), this construction is not unique: associativity of addition allows the terms in (4) to be grouped in other

ways that may reduce the number of CNF variables and yield fewer clauses. Finally, we should point out that this

construction is very similar to those described in [24] and [25].

3.2 PB-SAT Algorithms

Even when conversion to CNF is feasible, it might be advantageous to process PB constraints directly within a SAT

solver. The required bookkeeping is fairly inexpensive, consisting mainly of updating the value of a PB constraint’s

left-hand side (LHS) to reflect the current truth assignment. Initially set to 0, LHS is updated as follows:

? If , increment LHS by when is set to 1, and decrement it by when is unassigned from 1;

otherwise, leave LHS unchanged.

? If , increment LHS by when is set to 0, and decrement it by when is unassigned from 0;

otherwise, leave LHS unchanged.

Implications. Implications are triggered by a PB constraint for each literal whose coefficient satisfies

. Note that, unlike CNF clauses, a PB constraint can cause the simultaneous implication of several

variables. For example, after setting to 1 in the constraint , and

∧

are immediately

implied to 1 and 0, respectively. In general, implications follow the template where True

is the set of true literals and Large is the set of literals whose coefficients exceed (b − LHS).

Conflicts. Conflicts are indicated when the current variable assignment causes LHS to exceed b. In this case, we

∑?

need to choose a subset C of the true literals such that and return it as a conflicting assignment to

()

11121

,,,,,,

nnn

z ssssz

ϕψ

→→→→

= ∃∧

??

()

()

()

1

111

21

n

iiiiii

i i

?

i n

≤ ≤

∧

i n

≤ ≤

∧

zsb

ssss a x

ψ

→

→→ −→→

=↔≤∧

↔+∧↔

z

ψ

∧

ϕ

ii

x

?

x

=

i a

i x

i a

i x

ii

x

?

x

=

i a

i x

i a

i x

i x ?

i a

LHS

i ab

>−

1 x

123

323

xxx

∧

++≤

2

x

3

x

ii

ii

x

?

True

∈

x

?

Large

∈

x

?

x

?

→

i

i

xCa

∈

b

>

Page 10

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update8

the diagnosis engine. Ideally, it is desirable to find the smallest such subset, but this is an instance of the KNAP-

SACK NP-complete problem. Alternatively, a near-minimal subset can be quickly found using the classic heuristic

that packs starting from the largest coefficient towards the smallest.

4THE PSEUDO-BOOLEAN SOLVER PBS

PBS is a new SAT solver/optimizer, written in C++, that incorporates all of the modern CNF-SAT solver features

described in Section 2. In addition, it handles PB constraints in both optimization and decision (i.e., SAT) applica-

tions. It uses the “watched literal” data structure from Chaff [18] for CNF constraints, and a structure similar to

that in SATIRE [23] for PB constraints. Specifically, every PB constraint is represented internally by a record with

the following fields:

? A list of the coefficients and their respective literals . For efficiency, this list is sorted in the order of

increasing coefficient values.

? The right-hand side b.

? LHS which stores the value of the left-hand side under the current variable assignment.

In addition, PBS maintains, for each variable, a list of PB constraints in which the variable occurs positively and

another in which it occurs negatively. These lists are used to facilitate the update (according to the rules described

in Section 3.2) of the LHS of each relevant PB constraint whenever a variable is assigned or unassigned.

In optimization mode, PBS converts the objective function to a PB constraint with a sliding right-hand-side goal

(see Section 1) and proceeds to solve a sequence of SAT instances that differ only in the value of that goal. To illus-

trate, assume a maximization scenario, denote the sequence of SAT instances by I0, I1, I2, . . . and let be the

goal for the ith instance. If the instance is satisfiable, substituting its solution in the objective function constraint

should yield a new goal value . The goal for instance Ii+1 is now set to and the process is repeated.

The goal reached in the last satisfiable instance is returned by PBS as the optimal value of the objective function.

5EXPERIMENTAL RESULTS

In this section we report the results of an empirical evaluation of PBS and several other leading-edge solvers on a

set of Boolean satisfiability and Boolean optimization benchmarks.

5.1 Benchmarks

We evaluated the various algorithms on three sets of benchmarks. For SAT, we used a set of difficult global routing

instances that involve both CNF and PB counting constraints. For Boolean optimization, we chose Max-ONEs and

Max-SAT instances from a variety of CNF families.

Global Routing. A set of difficult satisfiable global routing benchmarks was introduced in [1]. Each instance in this

family entails the routing of a random set of n two-pin connections (nets) over a two-dimensional grid of cells (see

i a

i x ?

ˆi g

ˆ

g

ii

g

≥

1

i g +

Page 11

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update9

Figure 2). An r-by-c grid has m = r(c − 1) + c(r − 1) inter-cell routing channels. The maximum number of routes

that can pass through any channel is referred to as the channel capacity and denoted by C. For each net, a set of m

Boolean variables (one per channel) is used to indicate how the net is routed through the grid. In addition, for each

channel a set of C variables per net is introduced to indicate how the net is routed through the channel (i.e., the

net’s “track” assignment in the channel). Thus, the CNF formulation of these instances requires a total of

(1 + C)mn variables and consists of two sets of constraints: route definition constraints to express the possible

routes that each net can take, and capacity constraints to insure that no more than C nets are routed in each chan-

nel. These two sets are similar, respectively, to the connectivity and exclusivity constraints for SAT-based FPGA

routing [19].

A quick calculation shows that the number of CNF clauses needed to express channel capacity constraints in the

above formulation is (n2C + nC2)m. Using PB modeling, this can be reduced to just m PB inequalities (one per

channel) of the form:

where denotes the variable that associates net i with channel ch. The PB formulation also eliminates the need

for the extra track assignment variables, bringing down the total number of variables to just mn.

In the experimental results reported below, the global routing instances are modeled using CNF clauses for route

definition and PB inequalities for channel capacity. In addition, we also report on a CNF-only formulation derived

by converting the PB capacity constraints using the linear transformation described in Section 3.1.

Max-ONEs. Max-ONEs instances are easily constructed by adding a single PB constraint to

any satisfiable CNF instance, where the goal b is monotonically increased until the instance becomes unsatisfiable.

We constructed such instances for representative members from the DIMACS [8], Bejing [10], quasi-group [26], and

sat-planning [10] benchmark families.

2,2

ix

2,1

ix

3,1

ix

3,2

ix

1,2

ix

1,1

iy

1,3

iy

2,3

iy

2,1

iy

123

1

2

3

Figure 2: A 3-by-3 global routing grid with 12 inter-cell routing channels. Horizontal and vertical channels are la-

beled, respectively, with x and y net-to-channel assignment variables. For example, the highlighted 2-pin connection

from S in cell (1,1) to E in cell (3,2), is specified by

variables.

and 0 for the nine remaining channel

1,11,22,2

1

iii

xyy

===

S

E

1,2

iy

1,1

i

x

2,2

iy

Net i

12

n

chchch C

+++≤

?

i

ch

12

n

xxxb

+++≥

?

Page 12

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update10

Max-SAT. Given an unsatisfiable CNF-SAT instance with m clauses , a Max-SAT instance is con-

structed by introducing m auxiliary variables , m additional predicates , and a single objective

function PB constraint . Each added predicate introduces binary clauses and a

single -literal clause, where is the number of literals in clause . We constructed Max-SAT

instances for representative unsatisfiable DIMACS and FPGA switch-box routing [1] benchmarks.

5.2 Experimental Setup

We conducted several experiments to compare the performance of the new PBS solver against:

? The 0-1 ILP solvers OPBDP [4] and SATIRE [23]

? The generic commercial ILP solver CPLEX 7.0 [11]

? The CNF-SAT solver Chaff [18]

? The Chaff-based Max-SAT solver sub-SAT [24]

Chaff was used only in the global routing SAT comparisons, and sub-SAT was only used in the Max-SAT compari-

sons. Except for the CPLEX runs, all experiments were done on a Pentium-II 333MHz workstation running Linux

and equipped with 512 MB of RAM. The CPLEX experiments were conducted on a 440 MHz UltraSPARC work-

station with a 2MB cache running SunOS 5.8. We used the default settings for Chaff, OPBDP, and CPLEX, and

12

,,,

m

C CC

?

12

,,,m

y y y

?

ii

yC

↔

12

m

yyyb

+++≥

?

ii

yC

↔

i

C

()

1

i

C

+

i

C

i

C

Table 1: Run time results for various global routing instances.

Instance

Instance Size

CNF + PB

Time, sec.

CNF + PB

SATIRE

PBS Speedup

CNF Only CNF

NameNets |V||C| |PB| |V||C| PBS

grout-3.3-1

grout-3.3-2

grout-3.3-3

grout-3.3-4

grout-3.3-5

grout-4.3-1

grout-4.3-2

grout-4.3-3

grout-4.3-4

grout-4.3-5

grout-4.3-6

grout-4.3-7

grout-4.3-8

grout-4.3-9

grout-4.3-10

18

22

20

19

20

28

27

27

29

30

26

28

18

35

35

216

264

240

228

240

672 2004

648 1928

648 1930

696 2072

720 2144

624 1860

672 2006

432 1280

840 2502

840 2504

572

700

636

604

634

12

12 1056

12

12

12

24 2688 11844

24 2592 11408

24 2592 11410

24 2784 12272

24 2880 12704

24 2496 10980

24 2688 11846

24 1728

24 3360 14862

24 3360 14864

864 3692

4540

4116

3904

4114

1.72

0.33

0.09

1.29

0.84

3.46

1.92

5.52

16.3

2.06

27

55

2.9

58

7.4

0.41

0.96

1.1

0.2

0.35

109.7

32.13

319.47

3772

567.12

5000

5000

177.8

5000

5000

4.51

4.65

6.65

4.73

6.88

5000

5000

5000

5000

5000

5000

5000

5000

5000

5000

0.05

0.05

0.05

0.05

0.04

0.29

0.81

1.52

0.31

0.47

1.04

0.23

0.38

0.29

0.21

3.25

1.15

1.63

1.30

1.50

254

203

145

74.4

274

117

743

60

271

159

0.24

2.9

12

0.16

0.42

32

17

58

231

275

>185

>91

2.62

14.1

74

3.67

8.19

0.03

0.16

0.58

0.04

0.05

0.08

0.42

0.28

0.02

0.23

0.04

0.01

0.13

0.01

0.03

1.9

3.5

18

1.01

1.8

73

106

26

4.6

133

4.3

13.5

21

4.7

21.5

960

912

960

>1445

>2604

>906

>307

>2427

>185

>91

>1724

>86

>676

752061

>86

>676

OPBDP

CPLEXChaff

SATIRE

OPBDP

CPLEXChaff

Page 13

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update11

the DLCS decision heuristic for SATIRE. PBS was configured to use all of the features described in Section 2

except for clause deletion and random backtracking. A time-out limit of 5,000 seconds was used for each run.

5.3 Results for Global Routing Benchmarks

Table 1 lists the results of solving fifteen global routing instances. The ith routing instance on an x-by-x grid with

channel capacity y is named grout-x.y-i. For each instance the table indicates the number of nets, the instance size

(number of variables |V|, CNF clauses |C|, and PB constraints |PB|) for the hybrid CNF+PB as well as for the

pure CNF formulations, the run times of PBS, SATIRE, OPBDP, CPLEX, and Chaff, and the ratio of PBS’s run

time to that of the other solvers. The pure CNF formulation was tested only on Chaff.

Clearly, the size of instances, in terms of both variables and clauses, increases significantly for the CNF-only for-

mulation. Pure CNF formulations, thus, are likely to run out of memory for more realistic routing grid sizes, leaving

the hybrid CNF+PB formulations as the only viable alternative for this type of SAT problem. Still, it is remarkable

that, even when problem size increases four-to-five fold, Chaff manages in some cases to match PBS’s run time

within a factor of two or three.

Compared with the two other 0-1 ILP solvers, PBS comes out ahead: it solves all fifteen instances whereas SAT-

IRE solves only eleven, and OPBDP just five. This can be easily attributed to PBS’s incorporation of the latest

algorithmic and implementation features of modern CNF-SAT solvers. Compared with CPLEX, on the other hand,

PBS does quite poorly; CPLEX beats PBS on all instances, in some cases with a substantial margin.

Table 2: Results of the Max-ONEs experiment

Benchmark

Family

Satisfiable InstanceTime, sec. PBS Speedup

Name|V||C|Max-ONEs PBS SATIRE OPBDP CPLEXSATIRE OPBDP CPLEX

DIMACS

[8]

aim-50-1_6-yes1-1

aim-100-1_6-yes1-1

aim-200-2_0-yes1_1

ii8b1

jnh1

par8-1

50

100

200

336

100

350

283

729 22060

729 21844

459

1087 13772

3016 50457

80

160

400

2068

850

1149

9690

29

43

96

275

55

79

63

81

81

73

136

272 24.37

0.01

0.01

0.01

4.69

0.32

0.01

4.83

0.1

0.21

0.03

0.58

0.01

0.02

0.06

3180

2.2

0.06

49.53

5.41

5.56

0.43

6.39

315.5

0.02

7.19

5000

56.2

0.12

0.05

4494

9.8

45

0.21

17.86

5000

0.11

41

5000

8.85

85.56

1.03

5000

17.92

564.65

0.51

66.16

986.2

1

2

6

211

7194100

>500K >500K

1.89

267.4

678

6.88

12

0.38

65103

1035

179.2

2689

Bejing [10] 3blocks

QG [26]

10.3

54.1

26.5

14.3

11

13

930

98

214

qg7-09

qg6-09

bw_a

bw_b

bw_c

Satplan-sat

[10]

4675 717

114

40.5

31

>205

Page 14

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update12

5.4 Results for Max-ONEs Benchmarks

The results of the Max-ONEs experiment are listed in Table 2. For each tested instance, the table indicates the

instance size (number of variables |V|, and clauses |C|), the maximum (i.e., optimal) number of 1s in the solution,

the run times of each of the solvers, and PBS’s speedup ratio. In this set of experiments, PBS outperforms all other

solvers including CPLEX. The only exception is the jnh1 instance which both PBS and CPLEX solve in a fraction

of a second.

5.5 Results for Max-SAT Benchmarks

The results of the Max-SAT experiment are shown in Table 3. For each unsatisfiable instance the table lists the

instance name and size (number of variables |V| and clauses |C|), the size of the corresponding companion satisfi-

able instance (i.e., the satisfiable instance created by adding auxiliary variables and clauses as described earlier)

and the minimum (i.e., optimal) number of original unsatisfiable clauses (#UnSAT). The remaining columns show

the run times of the various solvers and PBS’s speedup ratio.

In order to speed up the search process for all solvers, WalkSAT [20] was executed for 10 tries as a pre-processing

step (with negligible run time), and the number of unsatisfied clauses it found was used as the initial solution for

Table 3: Results of the Max-SAT experiment

Unsatisfiable Instance

Satisfiable

Instance

|V|

#UnSAT

Time, sec.PBS Speedup

Name|V||C||C|

640

PBS SATIRE OPBDP CPLEX SubSAT SATIRE OPBDP CPLEX Sub-SAT

0.01

0.02 50008.70.02

0.35

7.88 50005000 0.86

0.02

0.5500050000.05

0.24 11.92 22.54

0.01

1.8

3.43

291.275000 461.326.2

2.94

196.255000154.3 27.2

3 30.44

50005000 5000 146.2

2

6.51

600.16 5000500070.2

2

2.69

271.16 5000193.5

2

4.36

349.7 5000624.729.4

1

0.02

0.02 50005000

1

0.01

0.2550004.520.09

2

0.01

0.4 0.010.18

0.01

20.111.971.463.91

0.03

27.04485.2791.12220.8

0.09

2319 500050005000

1.42

aim-100-1_6-no-1 100 160 260

bf0432-007

dubois30

hole7

jnh14

jnh211

jnh307

jnh308

jnh8

jnh9

pret150_25

ssa0432-003

fpga3_4

fpga4_5

fpga5_6

fpga6_7

1

1

1

1

2

2

2 >500K

>14K

>250K >250K

94

>1458

>1701

>164

>768

>1858

>1147

>250K >250K

>500K

1.0

15

13

>15.7

870 2.0

2.5

2.5

7.5

7.6

9.3

4.8

10.8

4.1

6.7

19K

1040 3668 4708 13242

90 240 330

56 204 260

100 850 950

100 800 900

100 900 1000

100 900 1000

100 850 950

100 850 950

150 400 551

435 1027 1462

2444

4090 130

60 162 222

84 266 350

22

25

50

85

67

>14K

960

652

5013

4688

5265

5310

4997

5006

1601

3391

140

290

522

854

0.04

134

52

>164

>768

>164

92

11101

80

1.0

25

40

120

69

72

143

385

452

18

39

31

9

681.0

0.30

0.01

0.00>15.7>15.7

Page 15

CSE-TR-461-02: Generic ILP versus Specialized 0-1 ILP: An Update13

the optimization runs. It turned out that WalkSAT was able to identify the optimal solution for all tested instances.

Thus, only a single run was required for each solver to prove the optimality of that solution.

Again, PBS outperformed all other solvers in most cases. The only exception this time was that sub-SAT was

significantly faster on the FPGA routing benchmarks. This should not be surprising since sub-SAT was designed,

mainly, for FPGA routing applications. We conjecture, further, that modeling channel capacity constraints using

PB inequalities rather than CNF clauses, might give PBS a performance edge even in these cases.

5.6 Summary

The above results suggest that combining PB modeling with state-of-the-art SAT algorithms gives PBS a definite

performance advantage against other solvers in both optimization and SAT applications. The only anomaly is the

unexpectedly good showing of CPLEX on the global routing SAT benchmarks. Unfortunately, lacking knowledge of

CPLEX’s algorithms it is difficult to explain why it performs so well on these benchmarks. To better understand its

behavior, we tested it on a variety of easy SAT instances from the DIMACS set [8]. The results of those tests are

reported in Table 4. In this case, PBS outperforms CPLEX with an even higher margin than that of CPLEX over

PBS in the global routing experiments. The only exception is the hole7 instance which has similar characteristics to

the grout instances. This leads us to conjecture that CPLEX incorporates algorithms that recognize and simplify

certain structured problems (such as the pigeon-hole and global routing instances) but not general structured EDA

problems (such as the bridging fault bf0432-007 and stuck-at-fault ssa7552-038 instances).

In summary, generic ILP solvers, such as CPLEX, seem to be inadequate for solving Boolean optimization prob-

lems and the majority of Boolean satisfiability problems. Similarly, previous specialized 0-1 ILP solvers, such as

SATIRE and OPBDP, perform poorly on almost all problems due to the limited SAT enhancements implemented

Table 4: PBS vs. CPLEX on DIMACS SAT Instances

InstanceSAT/UNS

Time, sec.PBS

Speedup

PBS CPLEX

aim-50-1_6-no-1

aim-50-1_6-yes1-1

bf0432-007

dubois20

hole7

ii8c1

jnh1

par8-1-c

pret60_25

ssa0432-003

ssa7552-038

U

S

U

U

U

S

S

S

U

U

S

0.01

0.01

0.38

0.02

3.73

0.01

0.03

0.01

0.03

0.02

0.01

0.24

0.36

5000

5000

0.01

1.22

27.91

0.14

5000

9.47

64.2

24

36

>13K

>250K

0.002

122

930

14

>166K

474

6420

#### View other sources

#### Hide other sources

- Available from Igor L. Markov · May 19, 2014
- Available from psu.edu