/
Abstract This paper introduces GRASP (Generic seaRch Algorithmfor the Abstract This paper introduces GRASP (Generic seaRch Algorithmfor the

Abstract This paper introduces GRASP (Generic seaRch Algorithmfor the - PDF document

celsa-spraggs
celsa-spraggs . @celsa-spraggs
Follow
387 views
Uploaded On 2016-06-09

Abstract This paper introduces GRASP (Generic seaRch Algorithmfor the - PPT Presentation

those in 2 9 whose operation is orthogonal to thosedescribed hereThe remainder of this paper is organized in four sections In Section 2 we introduce the basics of backtrackingsearch particul ID: 355263

those

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Abstract This paper introduces GRASP (Ge..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Abstract This paper introduces GRASP (Generic seaRch Algorithmfor the SatisÞability Problem), an integrated algorithmic frame-work for SAT that uniÞes several previously proposed search-pruning techniques and facilitates identiÞcation of additionalones. GRASP is premised on the inevitability of conßicts duringsearch and its most distinguishing feature is the augmentation ofbasic backtracking search with a powerful conßict analysis pro-cedure. Analyzing conßicts to determine their causes enablesGRASP to backtrack non-chronologically to earlier levels in thesearch tree, potentially pruning large portions of the search space.In addition, by ÒrecordingÓ the causes of conßicts, GRASP canrecognize and preempt the occurrence of similar conßicts later onin the search. Finally, straightforward bookkeeping of the causal-ity chains leading up to conßicts allows GRASP to identifyassignments that are necessary for a solution to be found. Experi-mental results obtained from a large number of benchmarks,including many from the Þeld of test pattern generation, indi-cate that application of the proposed conßict analysis techniquesto SAT algorithms can be extremely effective for a large numberof representative classes of SAT instances. 1Introduction The Boolean satisÞability problem (SAT) appears inmany contexts in the Þeld of computer-aided design of inte-grated circuits including automatic test pattern generation(ATPG), timing analysis, delay fault testing, and logic veriÞ-cation, to name just a few. Though well-researched andwidely investigated, it remains the focus of continuing inter-est because efÞcient techniques for its solution can have greatimpact. SAT belongs to the class of NP-complete problemswhose algorithmic solutions are currently believed to haveexponential worst case complexity [6]. Over the years, manyalgorithmic solutions have been proposed for SAT, the mostwell known being the different variations of the Davis-Put-nam procedure [3]. The best known version of this proce-dure is based on a backtracking search algorithm that, ateach node in the search tree, elects an assignment and prunessubsequent search by iteratively applying the unit clause andthe pure literal rules [18]. Iterated application of the unitclause rule is commonly referred to as Boolean ConstraintPropagation (BCP) or as derivation of implications in the elec-tronic CAD literature [1].Most of the recently proposed improvements to thebasic Davis-Putnam procedure [5, 10, 17, 18] can be distin-guished based on their decision making heuristics or theiruse of preprocessing or relaxation techniques. Common toall these approaches, however, is the chronological nature ofbacktracking. Nevertheless, non-chronological backtrackingtechniques have been extensively studied and applied to dif-ferent areas of ArtiÞcial Intelligence, particularly TruthMaintenance Systems (TMS), Constraint Satisfaction Prob-lems (CSP) and Automated Deduction, in some cases withvery promising experimental results. (Bibliographic refer-ences to the work in these areas can be found in [15].)Interest in the direct application of SAT algorithms toelectronic design automation (EDA) problems has been onthe rise recently [2, 10, 17]. In addition, improvements tothe traditional structural (path sensitization) algorithms forsome EDA problems, such as ATPG, include search-pruningtechniques that are also applicable to SAT algorithms in gen-eral [8, 9, 13]. The main purpose of this paper is to intro-duce a procedure for the analysis of conßicts in searchalgorithms for SAT. Even though the conßict analysis proce-dure is described in the context of SAT, it can be naturallyextended to EDA-speciÞc algorithms, thus complementingother well-known search-pruning techniques [2, 9].The proposed conßict analysis procedure has beenincorporated in GRASP ( Generic seaRch Algorithm for theSatisÞability Problem ), an integrated algorithmic frameworkfor SAT. Several features distinguish the conßict analysis pro-cedure in GRASP from others used in TMSs and CSPs.First, conßict analysis in GRASP is tightly coupled with BCPand the causes of conßicts need not necessarily correspond todecision assignments. Second, clauses can be added to theoriginal set of clauses, and the number and size of addedclauses is user-controlled. This is in explicit contrast withnogood recording techniques developed for TMSs and CSPs.Third, GRASP employs techniques to prune the search byanalyzing the implication structure generated by BCP.Exploiting the ÒanatomyÓ of conßicts in this manner has noequivalent in other areas.Some of the proposed techniques have also been appliedin several structural ATPG algorithms [8, 16], among others.The GRASP framework, however, permits a uniÞed repre-sentation of all known search-pruning methods and potenti-ates the identiÞcation of additional ones. The basic SATalgorithm in GRASP is also customizable to take advantageof application-speciÞc characteristics to achieve additionalefÞciencies [13]. Finally, the framework is organized to alloweasy adaptation of other algorithmic techniques, such as GRASPÑA New Search Algorithm for SatisÞability Jo‹o P. Marques SilvaKarem A. SakallahCadence European LaboratoriesDepartment of EECSIST/INESCUniversity of Michigan1000 Lisboa, PortugalAnn Arbor, Michigan 48109-2122 This document was created with FrameMaker 4.0.4 those in [2, 9], whose operation is orthogonal to thosedescribed here.The remainder of this paper is organized in four sec-tions. In Section 2, we introduce the basics of backtrackingsearch, particularly our implementation of BCP, and describethe overall architecture of GRASP. This is followed, in Sec-tion 3, by a detailed discussion of the procedures for conßictanalysis and how they are implemented. Extensive experi-mental results on a wide range of benchmarks, includingmany from the Þeld of ATPG, are presented and analyzed inSection 4. In particular, GRASP is shown to outperform tworecent state-of-the-art SAT algorithms [5, 17] on most, butnot all, benchmarks. The paper concludes in Section 5 withsome suggestions for further research. 2DeÞnitions 2.1 Basic DeÞnitions and Notation A conjunctive normal form (CNF) formula on n binary variables is the conjunction (AND) of m clauses each of which is the disjunction (OR) ofone or more literals, where a literal is the occurrence of avariable or its complement. A formula denotes a unique n -variable Boolean function and each of itsclauses corresponds to an implicate of f . Clearly, a function f can be represented by many equivalent CNF formulas. A for-mula is complete if it consists of the entire set of primeimplicates for the corresponding function. In general, a com-plete formula will have an exponential number of clauses.We will refer to a CNF formula as a clause database and useÒformula,Ó ÒCNF formula,Ó and Òclause databaseÓ inter-changeably. The satisÞability problem (SAT) is concernedwith Þnding an assignment to the arguments of that makes the function equal to 1 or provingthat the function is equal to the constant 0.A backtracking search algorithm for SAT is imple-mented by a search process that implicitly traverses the spaceof possible binary assignments to the problem variables.During the search, a variable whose binary value has alreadybeen determined is considered to be assigned ; otherwise it is unassigned with an implicit value of . A truthassignment for a formula is a set of assigned variables andtheir corresponding binary values. It will be convenient torepresent such assignments as sets of variable/value pairs; forexample . Alternatively,assignments can be denoted as. Sometimes it is conve-nient to indicate that a variable x is assigned without specify-ing its actual value. In such cases, we will use the notation to denote the binary value assigned to x . An assign-ment A is complete if ; otherwise it is partial. Evalu-ating a formula for a given truth assignment A yields threepossible outcomes: and we say that is satisÞed j x 1 ¼ x n ,, w 1 ¼w m ,, j fx 1 ¼ x n ,,() fx 1 ¼ x n ,,() 2 n X 01 ,{}º j Ax 1 0 ,() x 7 1 ,() x 13 0 ,(),,{} = Ax 1 0= x 7 1= x 13 0= ,,{} = n x () An = j j A 1= j and refer to A as a satisfying assignment ; in whichcase is unsatisÞed and A is referred to as an unsatisfyingassignment ; and indicating that the value of cannot be resolved by the assignment. This last case can onlyhappen when A is a partial assignment. An assignment parti-tions the clauses of into three sets: satisÞed clauses (evalu-ating to 1); unsatisÞed clauses (evaluating to 0); andunresolved clauses (evaluating to X ). The unassigned literalsof a clause are referred to as its free literals . A clause is said tobe unit if the number of its free literals is one. 2.2 Formula SatisÞability Formula satisÞability is concerned with determining if agiven formula is satisÞable and with identifying a satisfy-ing assignment for it. Starting from an empty truth assign-ment, a backtrack search algorithm traverses the space oftruth assignments implicitly and organizes the search for asatisfying assignment by maintaining a decision tree . Eachnode in the decision tree speciÞes an elective assignment toan unassigned variable; such assignments are referred to as decision assignments . A decision level is associated with eachdecision assignment to denote its depth in the decision tree;the Þrst decision assignment at the root of the tree is at deci-sion level 1. The search process iterates through the steps of:1.Extending the current assignment by making a decisionassignment to an unassigned variable. This decision process is the basic mechanism for exploring new regions of thesearch space. The search terminates successfully if allclauses become satisÞed; it terminates unsuccessfully ifsome clauses remain unsatisÞed and all possibleassignments have been exhausted.2.Extending the current assignment by following the logicalconsequences of the assignments made thus far. Theadditional assignments derived by this deduction process are referred to as implication assignments or, more simply, implications . The deduction process may also lead to theidentiÞcation of one or more unsatisÞed clauses implyingthat the current assignment is not a satisfying assignment.Such an occurrence is referred to as a conßict and theassociated unsatisfying assignments, called conßictingassignments .3.Undoing the current assignment, if it is conßicting, so thatanother assignment can be tried. This backtracking process is the basic mechanism for retreating from regions of thesearch space that do not correspond to satisfyingassignments.The decision level at which a given variable x is either elec-tively assigned or forcibly implied will be denoted by .When relevant to the context, the assignment notation intro-duced earlier may be extended to indicate the decision levelat which the assignment occurred. Thus, would beread as Ò x becomes equal to v at decision level d .ÓThe average complexity of the above search processdepends on how decisions, deductions, and backtracking are j A 0= j j A X = j j j d x () xv =@ d made. It also depends on the formula itself. The implicationsthat can derived from a given partial assignment depend onthe set of available clauses. In general, a formula consisting ofmore clauses will enable more implications to be derived andwill reduce the number of backtracks due to conßicts. Thelimiting case is the complete formula that contains all primeimplicates. For such a formula no conßicts can arise since alllogical implications for a partial assignment can be derived.This, however, may not lead to shorter execution times sincethe size of such a formula may be exponential. 2.3 Function SatisÞability Given an initial formula many search systemsattempt to augment it with additional implicates to increasethe deductive power during the search process. This is usu-ally referred to as ÒlearningÓ [12] and can be performedeither as a preprocessing step (static learning) or during thesearch (dynamic learning). Even though learning as deÞnedin [10, 12] only yields implicates of size 2 (i.e. non-localimplications), the concept can be readily extended to impli-cates of arbitrary size.Our approach can be classiÞed as a dynamic learningsearch mechanism based on diagnosing the causes of con-ßicts. It considers the occurrence of a conßict, which isunavoidable for an unsatisÞable instance unless the formulais complete, as an opportunity to Òlearn from the mistakethat led to the conßictÓ and introduces additional implicatesto the clause database only when it stumbles. Conßict diag-nosis produces three distinct pieces of information that canhelp speed up the search:1.New implicates that did not exist in the clause databaseand that can be identiÞed with the occurrence of theconßict. These clauses may be added to the clause databaseto avert future occurrence of the same conßict andrepresent a form of conßict-based equivalence (CBE).2.An indication of whether the conßict was ultimately dueto the most recent decision assignment or to an earlierdecision assignment.If that assignment was the most recent (i.e. at thecurrent decision level), the opposite assignment (if ithas not been tried) is immediately implied as ay consequence of the conßict; we refer to thisas a failure-driven assertion (FDA).b.If the conßict resulted from an earlier decisionassignment (at a lower decision level), the search canbacktrack to the corresponding level in the decisiontree since the subtree rooted at that level corresponds toassignments that will yield the same conßict. Theability to identify a backtracking level that is muchearlier than the current decision level is a form of non-chronological backtracking that we refer to as conßict-directed backtracking (CDB), and has the potential ofsigniÞcantly reducing the amount of search.These conßict diagnosis techniques are discussed further in j Section 3. 2.4 Structure of the Search Process The basic mechanism for deriving implications from agiven clause database is Boolean constraint propagation(BCP) [5, 18]. Consider a formula containing the clause and assume . For any satisfyingassignment to , requires that x be equal to 1, and we saythat implies due to . In general, given aunit clause of with free literal , consis-tency requires since this represents the only possibil-ity for the clause to be satisÞed. If , then theassignment is required; if then isrequired. Such assignments are referred to as logical implica-tions (implications, for short) and correspond to the applica-tion of the unit clause rule proposed by M. Davis and H.Putnam [3]. BCP refers to the iterated application of thisrule to a clause database until the set of unit clauses becomesempty or one or more clauses become unsatisÞed.Let the assignment of a variable x be implied due to aclause . The antecedent assignment of x ,denoted as , is deÞned as the set of assignments to vari-ables other than x with literals in . Intuitively, desig-nates those variable assignments that are directly responsiblefor implying the assignment of x due to . For example, theantecedent assignments of x , y and z due to the clause are, respectively,, , and. Note that the antecedent assign-ment of a decision variable is empty.The sequence of implications generated by BCP is cap-tured by a directed implication graph I deÞned as follows(see Figure 1):1.Each vertex in I corresponds to a variable assignment.2.The predecessors of vertex in I are theantecedent assignments corresponding to the unitclause that led to the implication of x . The directededges from the vertices in to vertex areall labeled with . Vertices that have no predecessorscorrespond to decision assignments. 3.Special conßict vertices are added to I to indicate theoccurrence of conßicts. The predecessors of a conßictvertex correspond to variable assignments that force aclause to become unsatisÞed and are viewed as theantecedent assignment . The directed edges fromthe vertices in to are all labeled with .The decision level of an implied variable x is related to thoseof its antecedent variables according to:(1) 2.5 Search Algorithm Template The general structure of the GRASP search algorithm is j w xy Ø + () = y 1= j w y 1= x 1= w l 1 ¼ l k ++ () j l j l j 1= l j x = x 1= l j x Ø = x 0= w l 1 ¼ l k ++ () = Ax () w Ax () w w xyz Ø ++ () = Ax () y 0= z 1= ,{} = Ay () x 0= z 1= ,{} = Az () x 0= y 0= ,{} = x n x () = x n x () = Ax () w Ax () x n x () = w k w A k() A k() k w d x ()max d y () y n y (),() Ax () Î{} = shown in Figure 2. We assume that an initial clause database and an initial assignment A , at decision level 0, are given.This initial assignment, which may be empty, may be viewedas an additional problem constraint and causes the search tobe restricted to a subcube of the n -dimensional Booleanspace. As the search proceeds, both and A are modiÞed.The recursive search procedure consists of four major opera-tions: Decide() , which chooses a decision assignment at eachstage of the search process. Decision procedures arecommonly based on heuristic knowledge. For the resultsgiven in Section 4, the following greedy heuristic is used: At each node in the decision tree evaluate the numberof clauses directly satisÞed by each assignment to eachvariable. Choose the variable and the assignment thatdirectly satisÞes the largest number of clauses. Other decision making procedures have been incorporatedin GRASP, as described in [15].2. Deduce() , which implements BCP and (implicitly)maintains the resulting implication graph. (See [15] forthe details of Deduce() .)3. Diagnose() , which identifies the causes of conflictsand can augment the clause database with additionalimplicates. Realization of different conßict diagnosisprocedures is the subject of Section 3.4. Erase() , which deletes the assignments at the currentdecision level.We refer to Decide() , Deduce() and Diag-nose() as the Decision , Deduction and Diagnosis engines , Figure 1: Clause database and partial implication graph w 1 x 1 Ø x 2 + () = Current Assignment: w 2 x 1 Ø x 3 x 9 ++ () = w 3 x 2 Ø x 3 Ø x 4 ++ () = w 4 x 4 Ø x 5 x 10 ++ () = w 5 x 4 Ø x 6 x 11 ++ () = w 6 x 5 Ø x 6 Ø + () = w 7 x 1 x 7 x 12 Ø ++ () = w 8 x 1 x 8 + () = w 9 x 7 Ø x 8 Ø x 13 Ø ++ () = x 9 0=@1 x 10 0=@3 x 11 0=@3 x 12 1=@2 x 13 1=@2 ,,,,{} x 1 1=@6 {} Clause DatabaseDecision Assignment: k x 1 1=@6 x 2 1=@6 x 3 1=@6 x 4 1=@6 x 5 1=@6 x 6 1=@6 x 9 0=@1 x 11 0=@3 x 10 0=@3 w 1 w 2 w 2 w 3 w 3 w 4 w 4 w 5 w 5 w 6 w 6 Implication Graph j j respectively. Different realizations of these engines lead todifferent SAT algorithms. For example, the Davis-Putnamprocedure can be emulated with the above algorithm bydeÞning a decision engine, requiring the deduction engine toimplement BCP and the pure literal rule, and organizing thediagnosis engine to implement chronological backtracking. 3Conßict Analysis Procedures When a conßict arises during BCP, the structure of theimplication sequence converging on a conßict vertex isanalyzed to determine those (unsatisfying) variable assign-ments that are directly responsible for the conßict. The con-junction of these conßicting assignments is an implicant thatrepresents a sufÞcient condition for the conßict to arise.Negation of this implicant, therefore, yields an implicate ofthe Boolean function f (whose satisÞability we seek) that // // A // // // return ! ? : } // d // // // d & ){ if d return while if d != if d return else if != d return }} if d return }}} d & ){ // // if ! d I ;; return } return } j b b b b b b b b w C k() w C k() b b k A k() Figure 2: Description of GRASP k does not exist in the clause database . This new implicate,referred to as a conßict-induced clause , provides the primarymechanism for implementing failure-driven assertions, non-chronological conßict-directed backtracking, and conßict-based equivalence (see Section 2.3). In TMS [16] and insome algorithms for CSP [11], ÒnogoodsÓ provide conditionssimilar to conßict-induced clauses. Nevertheless, the basicmechanism for creating conßict-induced clauses differs.We denote the conßicting assignment associated with aconßict vertex by and the associated conßict-induced clause by . The conßicting assignment isdetermined by a backward traversal of the implication graphstarting at . Besides the decision assignment at the currentdecision level, only those assignments that occurred at previ-ous decision levels are included in . This is justiÞedby the fact that the decision assignment at the current deci-sion level is directly responsible for all implied assignments atthat level. Thus, along with assignments from previous levels,the decision assignment at the current decision level is a suf-Þcient condition for the conßict. To facilitate the computa-tion of we partition the antecedent assignments of as well as those for variables assigned at the current deci-sion level into two sets. Let x denote either or a variablethat is assigned at the current decision level. The partition of is then given by:(2)For example, referring to the implication graph of Figure 1, and .Determination of the conßicting assignment cannow be computed using the following recursive deÞnition:(3)and starting with . The conßict-induced clause corre-sponding to is now determined according to:(4)where, for a binary variable x , and . Applica-tion of (2)-(4) to the conßict depicted in Figure 1 yields thefollowing conßicting assignment and conßict-induced clauseat decision level 6:(5) 3.1 Standard Conßict Diagnosis Engine The identiÞcation of a conßict-induced clause j k A C k() w C k() k A C k() A C k() k k Ax () L x () y n y () ,() Ax () Îd y () d x () {} = S x () y n y () ,() Ax () Îd y () d x ()= {} = L x 6 () x 11 0=@3 {} = S x 6 () x 4 1=@6 {} = A C k() A C x () x n x (),() if Ax ()Æ = L x () A C y () y n y (),()S x ()Î È È otherwise îíì = x k = A C k() w C k() x n x () x n x (),() A C k()Î å = x 0 x º x 1 x غ A C k() x 1 1= x 9 0= x 10 0= x 11 0= ,,,{} = w C k() x 1 Ø x 9 x 10 x 11 +++ () = w C k() enables the derivation of further implications that helpprune the search. Immediate implications of includeasserting the current decision variable to its opposite valueand determining a backtracking level for the search process.Such immediate implications do not require that beadded to the clause database. Augmenting the clause data-base with , however, has the potential of identifyingfuture implications that are not derivable without .In particular, adding to the clause database insuresthat the search engine will not regenerate the conßictingassignment that led to the current conßict. 3.1.1Failure-Driven Assertions. If involves thecurrent decision variable, erasing the implication sequence atthe current decision level makes a unit clause andcauses the immediate implication of the decision variable toits opposite value. We refer to such assignments as failure-driven assertions (FDAs) to emphasize that they are implica-tions of conßicts and not decision assignments. We note fur-ther that their derivation is automatically handled by ourBCP-based deduction engine and does not require specialprocessing. This is in contrast with most search-based SATalgorithms that treat a second branch at the current decisionlevel as another decision assignment. Using our runningexample (see Figure 1) as an illustration, we note that aftererasing the conßicting implication sequence at level 6, theconßict-induced clause in (5) becomes a unit clausewith as its free literal. This immediately implies theassignment and is said to be asserted. 3.1.2Conßict-Directed Backtracking. If all the literals in correspond to variables that were assigned at deci-sion levels that are lower than the current decision level, wecan immediately conclude that the search process needs tobacktrack. This situation can only take place when the con-ßict in question is produced as a direct consequence of diag-nosing a previous conßict and is illustrated in Figure 3 (a) forour working example. The implication sequence generatedafter asserting due to conßict leads to anotherconßict . The conßicting assignment and conßict-inducedclause associated with this new conßict are easily determined w C k() w C k() w C k() w C k() w C k() w C k() w C k() w C k() x 1 Ø x 1 0= x 1 Figure 3: Non-chronological backtracking 01 x 1 653decisionlevel (a) Conflicting implication sequence(b) Decision tree x 1 0=@6 x 9 0=@1 x 10 0=@3 x 12 1=@2 x 11 0=@3 x 8 1=@6 x 13 1=@2 x 7 1=@6 w 8 w 7 w 7 w 9 w 9 w 9 antecedent assign-ment of x 1 due to (5) k¢ w C k() x 1 0= k k¢ to be(6)and clearly show that the assignments that led to this secondconßict were all made prior to the current decision level.In such cases, it is easy to show that no satisfying assign-ments can be found until the search process backtracks to thehighest decision level at which assignments in weremade. Denoting this backtrack level by , it is simply calcu-lated according to:(7)When , where d is the current decision level, thesearch process backtracks chronologically to the immediatelypreceding decision level. When , however, thesearch process may backtrack non-chronologically by jump-ing back over several levels in the decision tree. It is worthnoting that all truth assignments that are made after decisionlevel will force the just-identiÞed conßict-induced clause to be unsatisÞed. A search engine that backtrackschronologically may, thus, waste a signiÞcant amount oftime exploring a useless region of the search space only todiscover after much effort that the region does not containany satisfying assignments. In contrast, the GRASP searchengine jumps directly from the current decision level back todecision level . At that point, is used to eitherderive a FDA at decision level or to calculate a new back-tracking decision level.For our example, after occurrence of the second conßictthe backtrack decision level is calculated, from (7), to be 3.Backtracking to decision level 3, the deduction engine cre-ates a conßict vertex corresponding to . Diagnosis ofthis conßict leads to a FDA of the decision variable at level 3(see Figure 3 (b)).The pseudo-code illustrating the main features of thediagnosis engine in GRASP is shown in Figure 2. Generalproofs of the soundness and completeness of GRASP can befound in [7, 14]. 3.2 Variations on the Standard Diagnosis Engine The standard conßict diagnosis, described in the previ-ous section, suffers from two drawbacks. First, conßict analy-sis introduces signiÞcant overhead which, for some instancesof SAT, can lead to large run times. Second, the size of theclause database grows with the number of backtracks; in theworst case such growth can be exponential in the number ofvariables.The Þrst drawback is inherent to the algorithmic frame-work we propose. Fortunately, the experimental results pre-sented in Section 4 clearly suggest that, for speciÞc instancesof SAT, the performance gains far outweigh the procedureÕs A C k¢() x 9 0= x 10 0= x 11 0= x 12 1= x 13 1= ,,,,{} = w C k¢() x 9 x 10 x 11 x 12 Ø x 13 Ø ++++ () = A C k¢() b b max d x () x n x () ,() A C k¢()Î{} = b d 1Ð= b d 1Ð b w C k¢() b w C k¢() b w C k¢() additional overhead.One solution to the second drawback is a simple modiÞ-cation to the conßict diagnosis engine that guarantees theworst case growth of the clause database to be polynomial inthe number of variables. The main idea is to be selective inthe choice of clauses to add to the clause database. Assumethat we are given an integer parameter k . Conßict-inducedclauses whose size (number of literals) is no greater than k aremarked green and handled as described earlier by the stan-dard diagnosis engine. Conßict-induced clauses of sizegreater than k are marked red and kept around only whilethey are unit clauses. Implementation of this scheme requiresa simple modiÞcation to procedure Erase() , which mustnow delete red clauses with more than one free literal, and tothe diagnosis engine, which must attach a color tag to eachict-induced clause. With this modiÞcation the worstcase growth becomes polynomial in the number of variablesas a function of the Þxed integer k .Further enhancements to the conßict diagnosis engineinvolve generating stronger implicates (containing fewer lit-erals) by more careful analysis of the structure of the implica-tion graph. Such implicates are associated with thedominators [15] of the conßict vertex . These dominators,referred to as unique implication points (UIPs), can be identi-Þed in linear time with a single traversal of the implicationgraph. Additional details of the above improvements to thestandard diagnosis engine can be found in [15]. 4Experimental Results In this section we present an experimental comparisonof GRASP with two state-of-the-art and publicly availableSAT programs, TEGUS [17] and POSIT [5]. TEGUS wasadapted to read CNF formulas and augmented to continuesearching when all its default options were exhausted inorder to abort fewer faults. No changes were made to POSIT.GRASP and POSIT have been implemented in C++,whereas TEGUS has been implemented in C. The programswere compiled with GCC 2.7.2 and run on a SUN SPARC5/85 machine with 64 MByte of RAM. The experimentalevaluation of the three programs is based on two differentsets of benchmarks:¥The UCSC benchmarks [4], developed at the Universityof California, Santa Cruz, that include instances of SATcommonly encountered in test pattern generation ofcombinational circuits for bridging and stuck-at faults.¥The DIMACS challenge benchmarks [4], that includeinstances of SAT from several authors and from differentapplication areas.For the experimental results given below, GRASP wasconÞgured to use the decision engine described in Section2.5, to allow the generation of clauses based on UIPs, and tolimit the size of clauses added to the clause database to 20 orfewer literals. All SAT programs were run with a CPU time k limit of 10,000 seconds (about three hours).For the tables of results the following deÞnitions apply.A benchmark suite is partitioned into classes of relatedbenchmarks. In each class, #M denotes the total number ofclass members; #S denotes the number of class members forwhich the program terminated in less than the allowed10,000 CPU seconds; and Time denotes the total CPUtime, in seconds, taken to process all members of the class.The results obtained for the UCSC benchmarks areshown in Table 1. The BF and SSA benchmark classesdenote, respectively, CNF formulas for bridging and stuck-atfaults. For these benchmarks GRASP performs signiÞcantlybetter than the other programs. Both POSIT and TEGUSabort a large number of problem instances and require muchlarger CPU times. These benchmarks are characterized byextremely sparse CNF formulas for which BCP-based con-ßict analysis works particularly well. The performance differ-ence between GRASP and TEGUS, a very efÞcient ATPGtool, clearly illustrates the power of the search-pruning tech-niques included in GRASP.An experimental study of the effect of the growth of theclause database on the amount of search and the CPU timecan be found in [15]. In general, adding larger clauses helpsreducing the number of backtracks and the CPU time. Thisholds true until the overhead introduced by the additionalclauses offsets the gains of reducing the amount of search.GRASP was also compared with the other algorithmson the DIMACS benchmarks [4], and the results areincluded in Table 1. We can conclude that for classes ofbenchmarks where GRASP performs better the other pro-grams either take a very long time to Þnd a solution or areunable to Þnd a solution in less than 10,000 seconds. We canalso observe that benchmarks on which POSIT performsbetter than GRASP can also be handled by GRASP; only theoverhead inherent to GRASP becomes apparent.Another useful experiment is to measure how well con-ßict analysis works in practice. For this purpose statisticsregarding some DIMACS benchmarks are shown in Table 2,where #B denotes the number of backtracks, #NCB denotesthe number of non-chronological backtracks, #LJ is the sizeof the largest non-chronological backtrack, #UIP indicatesthe number of unique implication points found, %G denotes the variation in size of the clause database, and Time is the CPU time in seconds. From these examples severalconclusions can be drawn. First, the number of non-chrono-logical backtracks can be a signiÞcant percentage of the totalnumber of backtracks. Second, the jumps in the decision treecan save a large amount of search work. As can be observed,in some cases the jumps taken potentially save searching mil-lions of nodes in the decision tree. Third, the growth of theclause database is not necessarily large. Fourth, UIPs dooccur in practice and for some benchmarks a reasonablenumber is found given the number of backtracks. Finally, formost of these examples conßict analysis causes GRASP to bemuch more efÞcient than POSIT and TEGUS. Nevertheless,either POSIT or TEGUS can be more efÞcient in speciÞcbenchmarks, as the examples of the last three rows of Table 2indicate. TEGUS performs particularly well on theseinstances because they are satisÞable and because TEGUSiterates several decision making procedures. 5Conclusions and Research Directions This paper introduces a procedure for conßict analysisin satisÞability algorithms and describes a conÞgurable algo-rithmic framework for solving SAT. Experimental resultsindicate that conßict analysis and its by-products, non-chro-nological backtracking and identiÞcation of equivalent con-ßicting conditions, can contribute decisively for efÞcientlysolving a large number of classes of instances of SAT. For thispurpose, the proposed SAT algorithm is compared withother state-of-the-art algorithms.The natural evolution of this research work is to applyGRASP to different EDA applications, in particular test pat-tern generation, timing analysis, delay fault testing andalence checking, among others. Despite being a fastSAT algorithm, GRASP introduces noticeable overhead thatcan become a liability for some of these applications. Conse- kTTT BF-043221 2147.61953,8522155.8 BF-1355149 149125.753993,91564946,127 BF-267053 5368.325295,410532,971 SSA-04327 71.171,59370.2 SSA-267012 1251.50120,000122,826 SSA-62883 30.2317.530.0 SSA-755280 8019.8803,4068060.0AIM-10024241.824107.9241,290AIM-200242410.82314,05913117,991BF447.2226,654220,037DUBOIS131334.4590,333777,189II-3217177.0171,23117650.1PRET8818.2442,579440,691SSA886.5620,230885.3AIM-5024240.4242.2240.4II-8141423.41411.8142.3JNH505021.3506,055500.8PAR-810100.4101.5100.1PAR-1610109,844109,9831072.1II-1610910,31110269.6910,120H7527,184432,942611,540F3030,000030,000030,000G4040,000040,000040,000PAR-32100100,0000100,0000100,000 Table 1: Results on the UCSC and DIMACS benchmarks quently, besides the algorithmic organization of GRASP, spe-cial attention must be paid to the implementation details.ne envisioned compromise is to use GRASP as the secondchoice SAT algorithm for the hard instances of SAT when-ever other simpler, but with less overhead, algorithms fail toÞnd a solution in a small amount of CPU time.Future research work will emphasize heuristic control ofthe rate of growth of the clause database. Another area forimproving GRASP is related with the deduction engine.Improvements to the BCP-based deduction engine aredescribed in [14] and consist of different forms of probingthe CNF formula for creating new clauses. This approachnaturally adapts and extends other deduction procedures,e.g. recursive learning [9] and transitive closure [2]. Acknowledgments This work was supported in part by NSF under grantMIP-9404632. References [1]M. Abramovici, M. A. Breuer and A. D. Friedman, Digital Sys-tems Testing and Testable Design , Computer Science Press,1990.[2]S. T. Chakradhar, V. D. Agrawal and S. G. Rothweiler, ÒATransitive Closure Algorithm for Test Generation,Ó IEEETransactions on Computer-Aided Design , vol. 12, no. 7, pp.1015-1028, July 1993.[3]M. Davis and H. Putnam, ÒA Computing Procedure for Benchmark#B#NCB#LJ#UIP%GGRASPTimeTEGUSTimePOSITTime aim.200.2.y2 1095013251530.382.807,991aim.200.2.y3743516151000.310.64�10,000aim.200.2.n12920125230.1369.93�10,000aim.200.2.n23920374440.1987.53�10,000bf0432-0073351241732485.186,64911.79bf1355-075402024271.254.83�10,000bf1355-6381178410.32�10,000�10,000bf2670-00116822230.40�10,00025.64dubois302337216214660.68�10,000�10,000dubois5048517526516322.80�10,000�10,000dubois100143863967150103426.22�10,000�10,000pret60_40147981784070.41652.30175.49pret60_601318316103540.35639.27173.12pret150_2542831338355884.84�10,000�10,000pret150_7538825749204473.85�10,000�10,000ssa0432-00337651310.15221.710.01ssa2670-130130453410172.07�10,00014.23ssa2670-141377971628663.42�10,00070.82ii16a111019130013.615.99�10,000ii16b2266412093964175.856.9416.38ii16b188325258841624132�10,00021.6516.73 Table 2: Statistics of running GRASP on selected benchmarks QuantiÞcation Theory,Ó Journal of the Association for Comput-ing Machinery , vol. 7, pp. 201-215, 1960.[4]DIMACS Challenge benchmarks in ftp://Dimacs.Rut-gers.EDU/pub/challenge/sat/benchmarks/cnf. UCSC bench-marks in /pub/challenge/sat/contributed/UCSC.[5]J. W. Freeman, Improvements to Propositional SatisÞabilitySearch Algorithms , Ph.D. Dissertation, Department of Com-puter and Information Science, University of Pennsylvania,May 1995.[6]M. R. Garey and D. S. Johnson, Computers and Intractability:A Guide to the Theory of NP-Completeness , W. H. Freeman andCompany, 1979.[7]M. L. Ginsberg, ÒDynamic Backtracking,Ó Journal of ArtiÞcialIntelligence Research , vol. 1, pp. 25-46, August 1993.[8]J. Giraldi and M. L. Bushnell, ÒSearch State Equivalence forRedundancy IdentiÞcation and Test Generation,Ó in Proceed-ings of the International Test Conference , pp. 184-193, 1991.[9]W. Kunz and D. K. Pradhan, ÒRecursive Learning: An Attrac-tive Alternative to the Decision Tree for Test Generation inDigital Circuits,Ó in Proceedings of the International Test Confer-ence , pp. 816-825, 1992.[10]T. Larrabee, EfÞcient Generation of Test Patterns Using BooleanSatisÞability , Ph.D. Dissertation, Department of ComputerScience, Stanford University, STAN-CS-90-1302, February1990.[11]T. Schiex and G. Verfaillie, ÒNogood Recording for Static andDynamic Constraint Satisfaction Problems,Ó in Proceedings ofthe International Conference on Tools with ArtiÞcial Intelligence ,pp. 48-55, 1993.[12]M. H. Schulz and E. Auth, ÒImproved Deterministic Test Pat-tern Generation with Applications to Redundancy IdentiÞca-tion,Ó IEEE Transactions on Computer-Aided Design, vol. 8, no.7, pp. 811-816, July 1989.[13]J. P. M. Silva and K. A. Sakallah, ÒDynamic Search-SpacePruning Techniques in Path Sensitization,Ó in Proc. IEEE/ACM Design Automation Conference (DAC) , pp. 705-711, June1994, San Diego, California.[14]J. P. M. Silva, Search Algorithms for SatisÞability Problems inCombinational Switching Circuits , Ph.D. Dissertation, Depart-ment of Electrical Engineering and Computer Science, Uni-versity of Michigan, May 1995.[15]J. P. M. Silva and K. A. Sakallah, ÒGRASPÑA New SearchAlgorithm for SatisÞability,Ó Technical Report TR-CSE-292-96, University of Michigan, April 1996.[16]R. M. Stallman and G. J. Sussman, ÒForward Reasoning andDependency-Directed Backtracking in a System for Com-puter-Aided Circuit Analysis,Ó ArtiÞcial Intelligence , vol. 9, pp.135-196, October 1977.[17]P. R. Stephan, R. K. Brayton and A. L. Sangiovanni-Vincen-telli, ÒCombinational Test Generation Using SatisÞability,ÓMemorandum no. UCB/ERL M92/112, Department of Elec-trical Engineering and Computer Sciences, University of Cali-fornia at Berkeley, October 1992.[18]R. Zabih and D. A. McAllester, ÒA Rearrangement SearchStrategy for Determining Propositional SatisÞability,Ó in Pro-ceedings of the National Conference on ArtiÞcial Intelligence , pp.155-160, 1988.