Implicit Prime Cover Computation: An Overview - CiteSeerX

3 downloads 0 Views 213KB Size Report
A set of products is a prime cover of a Boolean function f if it is made of prime implicants of f, and if the sum of its products covers f. Finding a prime cover, ...
Implicit Prime Cover Computation: An Overview Olivier Couderty

Jean Christophe Madrey

yDEC, Paris Research Laboratory

85 Avenue Victor Hugo 92500 Rueil Malmaison, FRANCE

Henri Fraissez

Herve Touatiy

zBull Corporate Research Center

Rue Jean Jaures 78340 Les Clayes-sous-bois, FRANCE

Abstract A set of products is a prime cover of a Boolean function f if it is made of prime implicants of f , and if the sum of its products covers f . Finding a prime cover, an irredundant prime cover, or a minimal prime cover of a function f is a problem that arises in several elds of computer science, for instance in logic synthesis, automated reasoning, realiability analysis, and some optimization problems. This paper shows how the three prime cover computation problems mentioned above can be eciently solved using implicit manipulations of sets of products.

1 Introduction Computing a prime cover, an irredundant prime cover, or a minimal prime cover of a Boolean function has several applications in computer science. In logic synthesis, an irredundant prime cover, or better, a minimal prime cover, provides the user with an ecient 2-level logic implementation of a single or multi output Boolean function [2, 24, 14]. In reliability analysis, prime covers are a way for either exhaustively, or concisely, representing the causes of failure of a system [13, 9]. In automated reasoning, a prime cover can be either a set of minimal demonstrations, or the normalization of a formula into conjunctive normal form for further computations [12, 15, 16, 23, 18]. The problem of computing (irredundant, minimal) prime covers of Boolean functions was rst addressed by Quine in the 1950's [21]. Since that date, e orts have been done to elaborate ecient prime cover computation procedures [22, 17, 2, 24, 25, 14, 3]. For some problems, for instance for computing all the prime implicants, or for computing a minimal prime cover, the bottleneck of the procedures proposed in the past is the huge numbers of products one has to manipulate for some functions. This paper presents prime cover computation algorithms using a graph based implicit representation of sets of products that makes their complexities related to the sizes of the graphs and not anymore to the numbers of products to manipulate. The paper is divided into 6 parts. Section 2 describes the problems that will be addressed here and presents the concepts that will be used to solve them. Section 3 presents the implicit prime cover computation algorithm and Section 4 presents the implicit irredundant prime cover computation algorithm. Section 5 presents an original minimal prime cover computation procedure, whose cyclic core computation is based on set covering problem transpositions. Section 6 gives experimental results obtained with the di erent algorithms presented in the paper and discusses them.

2 De nition and Notations 2.1 Boolean Functions, Products, and Prime Covers We consider Boolean functions from the set f0; 1gn into the set f0; 1; g. We note f 1 and f  the sets f ?1 (1) and f ?1 (1) [ f ?1 () respectively. An element x of f0; 1gn such that f 1 (x) = 1 is called a minterm 1

of f . We note (fxk ; fxk ) the Shannon expansion of f with respect to xk [1]. We assume the reader familiar with binary decision diagrams (BDDs) [4, 5], which are a canonical graphical representation of Boolean functions. A product is a conjunction of literals, i.e., a propositional variable xk or its negation xk . We note Pn the set of 3n products that can be built from the set of variables fx1; : : :; xng. The subset relation \" is a partial order on the set Pn. Elements of sets of products P and Q will be noted p; p0 and q; q0. A set of products P is maximal if and only if (i ) there do not exist two products p and q of P such that p  q. A product p is an implicant of a Boolean function f i p  f 1 . A product p is a prime implicant of f i it is a maximal element w.r.t. \" of the set of implicants of f .SA set of products P is a prime cover of the function f i it is made of prime implicants of f and f 1  ( p2P p)  f 1 . This cover is irredundant i there does not exist any proper subset of P that is a prime cover of f , and it is a minimal prime cover of f if there does not exist a prime cover of f that is made of strictly less products than P . Any subset P of Pn can be partitioned in the following canonical way:

P = P1k [ (fxk g  Pxk ) [ (fxk g  Pxk ); where P1k , Pxk , and Pxk are sets of products in which the variable xk does not occur. For example, for P = fx1x4; x2; x2x4; x2x3g, we have P12 = fx1x4 g, Px2 = fx3g, and Px2 = f1; x4g.

2.2 Implicit Representation of Sets of products A rst graph based implicit representation of sets of products, called metaproduct, has been introduced in [6]. Its eciency has been demonstrated by computing huge sets of prime implicants of Boolean functions. A much more compact representation, called IPS for Implicit Prime Set, has then been used for representing subsets of prime implicants [7]. However IPSs can only represent subsets of prime implicants, so they cannot be used when non prime sets of products need to be manipulated. More recently, S. Minato presented a generalization of IPSs, called Zero-suppressed BDDs [19]. This representation, that we will call CS for combinatorial set in the sequel, mixes the compactness of IPSs and the genericity of metaproducts. The CS representation is a graph based canonical representation of sets made of combinations of a nite number of objects. Union, intersection, and set di erence can be performed on this representation with a cost related to the size of the CSs, but not to the number of elements of the sets denoted by the CSs. All the algorithms presented here compute prime covers P by a divide and conquer strategy that consists of computing the sets P1k , Pxk , and Pxk . Since the CS of the sets P1k , Pxk , and Pxk resulting from the canonical decomposition of the set of products P with respect to the variable xk , can be obtained from the CS of P in constant or linear time, it is very easy to implement with CSs the algorithms manipulating sets of products that use such a divide and conquer strategy.

3 Prime Cover Computation In this section we show that the implicit prime implicant computation algorithm presented in [6] can be slightly transformed to obtain a prime cover computation algorithm manipulating sets of products in a implicit way. This transformation is based on the following theorems.

Lemma 1 Consider a Boolean function f and the variable xk . Any prime implicant of fxk (respectively of fxk ) that is an implicant of fxk (respectively of fxk ) is a prime implicant of fxk ^ fxk , and thus a prime

implicant of f .

Lemma 2 Consider a Boolean function f and a set of products P . The subset of products of P that are implicants of f can be computed using the call KeepImplicants (P; f; 1) of the following algorithm. The proof of this algorithm can be found in [8].

2

function KeepImplicants (P : SetOfProducts ; f : BooleanFunction ; k : int): SetOfProducts ; if f = 0 return ; if f = 1 or f =  return P ; if P =  return ; let P = KeepImplicants (P1k ; fxk ; k + 1); Q = KeepImplicants (P1k ; fxk ; k + 1); R0 = KeepImplicants (Pxk ; fxk ; k + 1); R1 = KeepImplicants (Pxk ; fxk ; k + 1); in return (P \ Q) [ (fxk g  R0) [ (fxk g  R1);

Figure 1. The Algorithm KeepImplicants .

Theorem 1 The call PrimeCover (f; 1) of the algorithm PrimeCover produces a prime cover of the Boolean function f .

function PrimeCover (f : BooleanFunction ; k : int): SetOfProducts ; if f = 0 return ; if f = 1 or f =  return f1g; let P 0 = PrimeCover (fxk ; k + 1)

P 1 = PrimeCover (fxk ; k + 1) Q0 = KeepImplicants (P 0; fxk ) Q1 = KeepImplicants (P 1; fxk ) in return Q0 [ Q1 [ (fxkg  (P 0 n Q0)) [ (fxk g  (P 1 n Q1)); Figure 2. The Algorithm PrimeCover . Proof. The proof is made using induction on k. The terminal cases are obvious: the constant function 0 has no prime implicant and the functions 1 and  have the unique prime implicant 1. The sets of products Q0 and Q1 are sets of prime implicants of f that do not contain the variable xk . The set fxk g (P 0 n Q0) (respectively fxk g  (P 1 n Q1)) is a set of prime implicants of f that contains the literal xk (respectively xk ), and that cover the set fxk n fxk (respectively fxk n fxk ). Lemma 1 guarantees that the set Q0 is made of prime implicants of fxk ^ fxk , and so of f , and the prime implicants of this set are sucient to cover all the elements of fxk that have not yet been covered using the prime implicants of the set P 0 n Q0. Since the same is true about Q1 with respect to fxk , the resulting set of prime implicants is a cover of the function f . 2 The number of recursions necessary to compute PrimeCover (f; 1) is equal to the number of vertices of the BDD of f , thus the cost of the algorithm PrimeCover is in O(jf j). However to this cost must be added the cost of applying, at each recursion, the function KeepImplicants , which explains (see Section 6) that in somes cases, the time needed to compute a prime cover of a function using the function PrimeCover is greater than the time needed to compute all its prime implicants using the algorithm described in [6].

4 Irredundant Prime Cover Computation This section presents the irredundant prime cover computation algorithm IrrCover . The cost of this algorithm is higher than the cost of the prime cover computation procedure presented in the previous section, but the prime cover it generates is of better quality, since it is irredundant. This algorithm is based on the recursive computation scheme proposed by E. Morreale in [20] that makes use of a divide and conquer strategy based on Shannon decomposition to compute the 3 subsets composing the canonical decomposition of the computed irredundant prime cover with respect to the variable xk .

Theorem 2 Consider an incompletely speci ed Boolean function f from f0; 1gn into f0; 1; g. The call IrrCover (f 1 ; f 1 ; 1) of the following algorithm produces an irredundant prime cover of the Boolean function f .

3

function IrrCover (f 1; f 1 : BooleanFunction ; k : int) : SetOfProducts ; if f 1 = 0 return ; if f 1 = 1 return f1g; let g0 = fx1k ^ :fx1k

P 0 = IrrCover (g0; fx1k ; k + 1) S c0 = p2P 0 p g1 = fx1k ^ :fx1k P 1 = IrrCover (g1; fx1k ; k + 1) S c1 = p2P 1 p h1 = (fx1k ^ :c0) _ (fx1k ^ :c1) h1 = fx1k ^ fx1k P = IrrCover (h1 ; h1; k + 1) in return P [ (fxk g  P 0) [ (fxk g  P 1); Figure 3. The algorithm IrrCover . Proof. The proof is made using induction on the number of variables of f . The function f 1 represents the set of elements of f0; 1gn that have to be covered, and the function f 1 represents the set of elements that can be used to build the largest possible cubes. If the function f 1 is equal to 0, there are no elements to be covered so the irredundant prime cover is empty. If the function f 1 is not 0 and f 1 is the function 1, then the irredundant prime cover made of the product 1 is sucient to cover f 1 . 1

fx

k

1*

1

fx* k

xk

1*

fx

k

1* xk

g1

1

fx

g0

1

h

c1

1*

c0

h Figure 4. Recursive computation of an irredundant prime cover. Every prime implicant of the irredundant prime cover P 0 contains at least one element of fx1k that is not in fx1k . Lemma 1 states that none of these prime implicants can be a prime implicant of f , so the literal xk must be added to each of these prime implicants in order to produce prime implicants of the function f . The same reasoning can be done for the prime implicants of the set P 1. The elements of f0; 1gn?1 that still have to be covered are in the set h1. This set if the union of the set (fx1k ^ :c0), that contains all the elements of fx1k that are not covered by any prime implicant of the set P 0, and of the set (fx1k ^ :c1), that contains all the elements of fx1k that are not covered by any prime implicant of the set P 1. The set h1 is included in the set h1, which is the subset of f0; 1gn?1 that can be used to build the largest possible cubes that cover the elements of h1. The products of the set P compose an irredundant prime cover of the function de ned by h1 and h1 , and this set is the last part of the canonical set decomposition of the computed irredundant prime cover. 2 4

The algorithm IrrCover has a cost in O(2jf j ) because at each recursion it can be necessary to create vertices. However experiences show that this algorithm is quite robust since it has been able to produce irredundant prime covers for all the functions of the MCNC benchmark [28].

5 Minimal Prime Cover Computation The minimal prime cover computation problem, also known as the 2-level logic minimization problem, has been devoted a lot of e orts since its de nition by Quine in 1952 [21]. It consists of nding a minimal cardinality subset of the set of prime implicants of a Boolean function f that is sucient to cover f . This section presents the concepts used in a new BDD and CS based minimization procedure.

5.1 Reduction of Set Covering Problems A set covering problem is a triple hX; Y; R i, where X and Y are two sets, and R be a relation de ned on X  Y . We say that y covers x when xRy. The set covering problem hX; Y; R i consists of nding a minimal cardinality subset of Y that cover all the elements of X . We say that two set covering problems are equivalent if a minimal solution of one problem can be built with a minimal solution of the other problem. We present rst present the reduction rules for iteratively reducing a set covering problem to its cyclic core [17], and then introduce an alternative to this reduction processes that takes full advantage of the CS based sets of products manipulations.

5.1.1 Dominance Relations A quasi order  on a set Z is a re exive and transitive relation de ned on Z  Z . The relation  is de ned by (z  z 0) , ((z  z 0 ) ^ (z 0  z )). It is an equivalence relation on Z , so  is a partial order on Z= . Let hX; Y; R i be a set covering problem. The dominance relations X and Y are de ned as follows on X and Y respectively:

x X x0 , (8y 2 Y (x0Ry) ) (xRy)) y Y y0 , (8x 2 X (xRy) ) (xRy0 )) When an element y0 dominates y but the converse it not true, we will say that y0 strictly dominates y. and it will be noted y  y0 . Dominance relations, that are quasi orders, can be used to reduce the size of a sets X and Y [17]. An element x0 of X dominates x i covering x0 is sucient to cover x, so x can be removed from X without modifying the set of minimal solutions. This is a bit di erent with elements of Y . The element y0 of Y dominates y i y0 covers at least all the elements of X covered by y. However, it is not true that removing y from Y does not modify the set of minimal solutions, even if y0 covers at least on element of X not covered by y, i.e., if y0 strictly dominates y. Some minimal solutions using y can be lost, but it still exists a minimal solution that uses y0 . For instance, if y and y0 cover the same elements of X , i.e. y Y y0 , then y and y0 can be chosen equivalently to build a minimal solution, provided that y and y0 are not strictly dominated by another element of Y . These elimination processes can be formalized by the following theorem. Theorem 3 The set covering problem hX; Y; R i is equivalent to the following ones: hmax (X= X ); Y; R i X hX; max (Y= Y ); R i  Y

In this formulation, the relation R is modi ed in the usual way on the quotient sets.

Note that these problems are equivalent to hmaxX (X= X ); maxY (Y= Y ); R i, which is the smallest one, and so can be said to be the \simplest" problem amongst these 4 equivalent set covering problems. 5

5.1.2 Essentiality

The third reduction rule is based on the essentiality concept. An element y of Y is essential i it is the only one that covers an element x of X . Essential elements belong necessarily to any minimal solution. So problems hX; Y; R i and hX n fx 2 X j 9y 2 E xRyg; Y n E; R i, where E is the set of essential elements of Y , are equivalent.

5.1.3 Cyclic Core The cyclic core of hX; Y; R i is the xpoint obtained after the 3 reduction processes presented above

(dominance relations on X and Y , and essentiality) have been iteratively applied. In the case when this cyclic core is empty, the minimization is done, and the minimal prime cover is composed of the essential prime implicants that have been successively discovered. In the other case, the minimization can be terminated using a branch-and-bound algorithm [2, 17, 25].

5.2 Transposing Functions In the Quine-McCluskey procedure and its optimizations [2, 17, 22, 25, 27], the classes of the partitions X= X and of Y= Y are manipulated through projections X and Y that map each class onto one of its elements. This section shows that, instead of using such projections, one can use an isomorphism that maps the classes that must be manipulated on objects whose manipulation is less costly. De nition 1 Let  be a quasi order on Z . The function  de ned on Z is a transposing function of  i z  z 0 is equivalent to  (z )   (z 0). In this case, (Z= ; ) and ( (Z ); ) are isomorphic through   . (Z= ; ) ?! max (Z= ) % ?1

(Z; ) &

x ? y 

x ? y 

( (Z ); ) ?! max  (Z ) Using the concept of transposing function, one can reformulate the set covering problem hX; Y; R i. Theorem 4 Let X and Y be two transposing functions of X and Y respectively. Then hX; Y; R i is equivalent to:

hmax  (X ); max  (Y ); R0 i  X  Y where R0 is de ned by X (x)R0 Y (y) , xRy. The relation R0 is well de ned thanks to the de nition of transposing functions.

5.3 The Minimization Procedure The idea of this minimization procedure consists of transposing the 2-level logic minimization problem hf; P; 2i into a set covering problem hQ; P; i that involves products and the subset relation. Two transposing functions Q and P of the associated dominance relations Q and P are de ned so that the reduction process described Section 5.2 transposes into a set covering problem that still involves products and the subset relation. This minimization procedure takes full advantage of the BDD and CS representations. This is done through the use of the functions Q and P compatible with Q and P respectively. These functions map the sets Q and P de ning the set covering problem onto sets of products. This means that the set covering problem matrix involes only products, and thus it can be eciently represented with CSs. This procedure allows us to compute cyclic cores of Boolean functions without computing the dominance relations, whose huge BDDs are the bottleneck of the previously available implicit cyclic core computation procedures [27]. The rst step in the procedure consists of computing the CS of the set of prime implicants P of the function f to be minimized using the algorithm presented in [6]. Then the set covering problem hf; P; 2i is transposed into a set covering problem hQ; P; i, where Q and P are sets of products represented by 6

CSs. The section then presents the functions Q and P compatible with Q and P respectively. It also shows how the essential products of P are easily computed using max Q (Q). Finally the section gives the complete cyclic core computation algorithm and emphasizes the key points that make it much more ecient that any other one.

5.4 Transposing the Minterms on Pn The rst transformation consists of nding a set covering problem hX; Y; R i equivalent to hf; P; 2i, where X and Y are sets of products and R = . Let Q be the set of the products that represent all minterms of f . Then hf; P; 2i is equivalent to hQ; P; i, where Q = fq 2 Pn j 9x 2 f fxg = qg

5.5 The Transposing Function Q After the transformation described above, we have to solve a set covering problem hQ; P; i, where Q and P are sets of products. The dominance relation Q is: q Q q0 , (8p 2 P (q0  p) ) (q  p)) Theorem 5 The following function Q de ned from Q into Pn is a transposing function of Q. T Q (q) = fp2P jqpg p Proof. By de nition, we have: q Q q0 , (8p 2 P (q0  p) ) (q  p)) , fp 2 P j q0  pg  fp 2 P j q  pg ) (Tfp2P jqpg p)  (Tfp2P jq0 pg p) ) Q (q)  Q (q0 ) Conversely, assume that Q (q)  Q (q0 ). Since it is always true that q  Q (q), we deduce that q  Q (q0 ). By de nition of Q , this means that all products of P that contain q0 also contain q, i.e., q Q p0. 2

5.6 Essential Products The following result shows that the essential elements of P can be directly obtained from max Q (Q). Theorem 6 Let hQ; P; i be a covering matrix, where Q is a set of products, and P a maximal set of products. Then the set of essential products is P \ max Q (Q). Proof. Since P is maximal, P \ Q (Q) is equal to P \ max Q (Q). The product p is essential i it is the only one of P that contains a product q of Q. This implies that Q (q) = p. Conversely, assume that there exists a product q of Q such that Q (q) = Tp with p 2 P . Then if it exists p0 such that p0 6= p and p0 2 fp 2 P j q  pg, we have p = Q (q) = ( fp2P jqpg p)  p0, which is impossible because P is maximal. 2

5.7 The Transposing Function P Once the set of products Q0 = max Q (Q) has been for the set covering problem hQ; P; i, we obtain the new equivalent set covering problem hQ0 ; P; R0 i, with q0 R0 p i q0 = Q (q) and q  p, as said in Section 5.2. It is easy to check that q  p is equivalent to Q (q)  p. This implies that the relation R0 is the subset relation, and so the new set covering problem is hQ0; P; i, that has exactly the same form as the rst one. The dominance relation on P is de ned by: p P p0 , (8q 2 Q (q  p) ) (q  p0)): Let us de ne the function C : 2f0;1gn ! Pn as follows: C (E ) = min fp 2 Pn j p  E g:  In other words, C (E ) is the smallest product that contains the set E . The product C (E ) is unique, because if we assume that there exist two di erent minimal products p and p0 that contain E , then p \ p0 is a smaller product that still contains E . We nally de ne the following transposing function P . 7

Theorem 7 The following function P de ned from P into Pn is a transposing function of P .

P (p) = C (Sfq2Qjqpg q) Proof. Let p and p0 be two products of P . By de nition, we have: p P p0 , (8q 2 Q (q  p) ) (q  p0 )) , fq 2 Q j q  pg  fq 2 Q j q  p0g ) (Sfq2Qjqpg q)  (Sfq2Qjqp0 g q) ) P (p)  P (p0 ) because the function C is increasing. Conversely, assume that P (p)  P (p0 ). Since P (p)  p is always true, we deduce P (p)  p0. Also we have by de nition q  P (p) for all q of Q that are contained by p. Finally, this means that all q of Q contained by p are also contained by p0 , i.e., p  p0. 2

5.8 The Final Algorithm The advantage of the transposing functions Q and P is that their range are Pn, and so max Q (Q) and max P (P ) are sets of products that can be eciency represented with CSs. Ecient algorithms that directly compute these sets without building the BDDs of the dominance relations can be found in [10]. Finally, the new algorithm consists of implicitly computing the cyclic core of f by applying transformation 0 once, hf; P ; 2i !0 hffxg j x 2 f g; P ; i where the CS P of all the prime implicants of the function f to be minimized is computed using the algorithm presented in [6], and then by iteratively applying the following ordered transformations: hQ; P ; i !1 hmax  (Q); P ; i  Q

hQ; P ; i !2 hQ ^ :E ; P ^ :E ; i with E = P ^ Q hQ; P ; i !3 hQ; max  (P ); i  P

Transformation 0 consists of transposing the 2-level logic minimization problem into an equivalent set covering problem hQ; P ; i, where Q and P are sets of products. Transformation 1 uses the transposing function Q to reduce the size of the problem. Transformation 2 consists of computing the CS E of the set of essential products of P , as shown in Section 5.6, since at this step Q is the CS of max Q (Q). Transformation 3 uses the transposing function P to produce the new set covering problem hQ; max P (P ); R0 i, with qR0 p0 i p0 = P (p) and q  p, as said in Section 5.2. One can check that q  P (p) is equivalent to q  p, so the relation R0 is the subset relation, as said by transformation 3. The key points of this algorithm are: the use of BDDs and CSs, that make its complexity independent of the number of minterms and prime implicants of f ; the use of transformation 0 that transposes the initial set covering problem into a new one using sets of products and the subset relation; the use of two transposing functions of the two associated dominance relations, whose ranges are set of products, allowing ecient manipulations of the sets of the new set covering problem using CSs. This procedure allows us to compute cyclic cores of Boolean functions without computing the dominance relations, whose huge BDDs are the bottleneck of the previously available implicit cyclic core computation procedures [27]. In the case when the cyclic core of the Boolean function f to be covered is empty, a minimal prime cover of f can be immediately built by choosing, for each of the essential elements that have been discovered during the xpoint computation, a prime implicant of f , with a minimal number of literals, that contains it. The resulting prime cover thus has a minimal number of prime implicants and of literals. In the case when the cyclic core of the Boolean function f to be covered is not empty, the minterms of f that still have to be covered are all the ones that are not covered by any of the prime implicants of f that have been chosen to cover the essential elements, and the set of prime implicants that can be used to cover them are any subset of the set of prime implicants of f that are sucient to contain all the products P of the cyclic core. A call to the algorithm IrrCover produces an irredundant prime cover of these minterms that is added to the already selected prime implicants to compose a locally minimal prime cover of f . Research is under way to develop a branch and bound minimization algorithm based on Bdds and CSs. 8

6 Experimental Results Table 1 and Table 2 present the experimental results that have been obtained using the di erent prime cover computation algorithms presented in this paper. Column \#Vars" of Table 1 gives, for each of the treated examples, the number of variables of the function to be covered, and column \j f j" the size of the BDD that represents this function. For each prime cover computation with method M , \#M" gives the number of elements of the prime cover, \jMj" gives the size of the CS that represents this cover, and \TM" the CPU time in seconds to compute it on an DEC3000 machine. Method AP computes all the prime implicants using the algorithm presented in [6], method PC computes a prime cover using algorithm PrimeCover , method IPC computes an irredundant prime cover, and MC a minimal prime cover using the algorithm presented in Section 5. A \" in the column \#MPC" indicates that the cyclic core of the Boolean function under treatment was empty so that it was not necessary to use the irredundant prime cover algorithm to terminate the generation of the minimal prime cover.

f

alupla cont bc0 bench1 ex1010 ex5 signet x7dn xparc ibm prom1 prom2 mish pdc ti jbp

#Vars j f j #AP j AP j TAP #PC j PC j TPC 18 5044 25678 14983 9:1s 16013 9508 19:0s 58 1970 17060286 3818 1:0s 13209292 3217 3:1s 37 968 6597 7388 4:3s 238 625 0:6s 18 1438 5972 7804 3:6s 443 1251 0:9s 20 2761 25889 28831 15:7s 978 2392 2:0s 71 1817 2532 7984 2:1s 165 785 0:4s 47 14681 78735 37535 64:5s 13067 10672 144:5s 81 3124 566698632 39960 11:7s 123604088 4613 6:0s 114 7883 15039 18798 6:8s 4457 4413 3:9s 65 2080 1047948792 5345 1:5s 819466504 3305 3:5s 49 8359 9326 24358 11:7s 558 4071 3:5s 30 4342 2635 9208 3:4s 319 2016 1:6s 137 2937 1:12437 e +15 2435 1:0s 1:12437 e +15 2476 6:5s 56 2878 23231 11695 5:6s 2688 2796 2:9s 119 9188 836287 9230 3:8s 284985 5975 5:8s 93 11224 2496809 44638 15:2s 581823 14714 21:2s Table 1. Exhaustive Prime Implicant and Prime Cover Computation Results.

f

#IPC j IPC j TIPC #MPC j MPC j TMPC 2144 2752 12:2s 2144 2752 76:5s 317 672 1:6s 229 603 6:0s 292 1081 3:1s 177 658 35:3s 200 946 0:8s 162 867 32:3s 496 1980 2:7s 456 1978 343:9s 89 1170 1:5s 87 1147 111:2s 121 390 8:3s 119 382 248:5s 622 725 2:9s 622 651 75:3s 307 4827 5:0s 254 3853 38:2s 173 426 0:9s 173 426 6:3s 609 6038 6:4s 472 3997 83:1s 476 3583 3:1s 446 3463 105:2s 82 296 0:9s 82 296 5:2s 272 1864 2:4s 156 1174 91:3s 377 2579 3:5s 220 2388 39:6s 129 1631 4:0s 130 1568 70:0s Table 2. Irredundant and Minimal Prime Cover Computation Results.

alupla cont bc0 bench1 ex1010 ex5 signet x7dn xparc ibm prom1 prom2 mish pdc ti jbp

These tables show that in all cases the sizes of the prime covers generated using the algorithms presented here are much smaller than the numbers of prime implicants of the Boolean functions under treatment, and that in most cases they provide users with a very concise representation of the function under treatment. In all cases the CPU times needed to compute the minimal prime covers are larger than the CPU times needed to compute the irredundant prime covers, though these irredundant prime covers are in most cases nearly as good as the minimal prime covers. 9

7 Conclusion In this paper we have presented a uni ed set of algorithms dealing with implicit prime cover computation. Given the BDD of a Boolean function, the graph representation of all its prime implicants, of a prime cover, of an irredundant prime cover, and of a minimal prime cover, is computed with a complexity not related with the number of products to be manipulated. The eciency of these algorithms have been demonstrated by treating functions that are out of reach of any other known technique. Applications of these algorithms to speci c problems will be presented in a forthcoming paper.

References [1] S. B. Akers, \Binary Decision Diagrams", IEEE Trans. on Computers, Vol 27, pp. 509{516, 1978. [2] R. E. Brayton, G. D. Hachtel, C. T. McMullen, A. L. Sangiovanni-Vincentelli, Logic Minimization Algorithms for VLSI Synthesis, Kluwer Academic Publishers, 1984. [3] R. K. Brayton, P. C. McGeer, J. Sanghavi, \A New Exact and Heuristic Minimizer for Two-Level Logic Synthesis", in Proc. of Int'l Symposia on Information Sciences, Fukuoka, Japan, July 1992. [4] R. E. Bryant, \Graph-Based Algorithms for Boolean Functions Manipulation", IEEE Trans. on Computers, Vol C35, N0 8, pp. 677{692, August 1986. [5] R. E. Bryant, \Symbolic Boolean Manipulations with Ordered Binary Decision Diagrams", ACM Computing Surveys, Vol 24, N0 3, pp. 293{318, September 1992. [6] O. Coudert, J. C. Madre, \Implicit and Incremental Computation of Primes and Essential Primes of Boolean Functions", in Proc. of 29th DAC, Anaheim CA, USA, June 1992. [7] O. Coudert, J. C. Madre, \A New Graph Based Prime Computation Technique", in New Trends in Logic Synthesis, T. Sasao Editor, Kluwer Academic Publishers, 1992. [8] O. Coudert, J. C. Madre, \Towards a Symbolic Logic Minimization Algorithm", in Proc. of VLSI Design'93, Bombay, India, January 1993. [9] O. Coudert, J. C. Madre, \Fault Tree Analysis: 1020 Prime Implicants and Beyond", in Proc. of Annual Reliability and Maintainability Symposium, pp. 240{245, Atlanta GA, USA, January 1993. [10] O. Coudert, J. C. Madre, H. Fraisse, \A New Viewpoint on Two-Level Logic Minimization", in Proc. of 30th DAC, Dallas TX, USA, June 1993. [11] R. B. Cutler, S. Muroga, \Useless Prime Implicants of Incompletely Speci ed Multiple-Output Switching Functions", in Int'l Journal of Computer and Information Sciences, Vol. 9, No. 4, 1980. [12] J. Doyle, \A Truth Maintenance System", in Arti cial Intelligence, 12:231-271, 1979. [13] D. F. Hasl, \Advanced Concepts in Fault Tree Analysis", in Proc. of System Safety Symposium, Seatle, USA, Juin 1965. [14] S. J. Hong, S. Muroga, \Absolute Minimization of Completely Speci ed Switching Functions", in IEEE Trans. on Computers, Vol 40, pp. 53{65, 1991. [15] J. De Kleer. An Assumption-based TMS. Arti cial Intelligence, 28:127-162, 1986. [16] J. De Kleer, B. C. Williams, \Diagnosing Multiple Faults", in Arti cial Intelligence, Vol 32. pp. 97{ 130, 1987. [17] E. L. Jr. McCluskey, \Minimization of Boolean Functions", in Bell System Techniques, Vol 35, pp. 1417{1444, 1959. [18] J. C. Madre, O. Coudert, \A Logically Complete Reasoning Maintenance System Based on Logical Constrain Solver", in Proc. of IJCAI'91, Sydney, Australia, August 1991. [19] S. Minato, \Zero-Supressed BDDs for Set Manipulation in Combinatorial Problems", in Proc. of 30th DAC, Dallas TX, June 1993. [20] E. Morreale, \Recursive Operators for Prime Implicant and Irredundant Normal Form Determination", IEEE Trans. on Computers, 1970. [21] W. V. O. Quine, \The problem of Simplifying Truth Functions", in American Mathematics Monthly, Vol. 59, pp. 521{531, 1952. [22] W. V. O. Quine, \On Cores and Prime Implicants of Truth Functions", in American Mathematics Monthly, Vol. 66, 1959. 10

[23] R. Reiter, J. de Kleer, \Foundations for Assumption-Based Truth Maintenance Systems" in Proc. of AAAI Nat'l Conference'87, pp. 183-188, Seattle, July 1987. [24] R. L. Rudell, Multiple-Valued Logic Minimization for PLA Synthesis, UCB Report M86/65, 1986. [25] R. L. Rudell, A. L. Sangiovanni-Vincentelli, \Multiple Valued Minimization for PLA Optimization", in IEEE Trans. on CAD, Vol 6, No 5, pp. 727{750, September 1987. [26] T. Sasao, \An Application of Multiple-Valued Logic to a Design of Programmable Logic Arrays", Proc. of Int'l Symposium on Multiple-Valued Logic, 1978. [27] G. M. Swamy, P. McGeer, R. K. Brayton, \A Fully Quine-McCluskey Procedure using BDD's", Report #UCB/ERL M92/127, November 1992. Also in Proc. of Int'l Workshop on Logic Synthesis, Lake Tahoe CA, May 1993. [28] S. Yang, Logic Synthesis and Optimization Benchmarks User Guide, Microelectronics Center of North Carolina, January 1991.

11