uyuv - university of southampton

33
Abstract The problems of Boolean satisfiability (SAT) and automatic test pattern gen- eration (ATPG) are strongly related - both in terms of application areas (pre- manufacturing design validation and post-manufacturing testing), as well as in terms of techniques used in their practical solutions (searching large combina- torial spaces through efficient pruning). However, historically these domains have evolved somewhat independently with limited interaction. While ATPG has been primarily driven by reasoning based on circuit structure, SAT has fo- cussed on reasoning using conjunctive normal form (CNF) representations of Boolean formulas. In this chapter, we introduce these problems, describe key techniques used to solve them in practice, and highlight the common themes and differences between them. The problems of Boolean satisfiability (SAT) and automatic test pattern generation (ATPG) have been investigated intensively for many decades. Bool- ean satisfiability serves as an important reference problem in complexity theory of Computer Science. It has been shown that many difficult decision problems from various application domains can be reduced to the Boolean satisfiabil- ity problem. Algorithms for solving this problem have been an active field of research and steady progress has been achieved over many years. The problem of ATPG for combinational circuits is closely related to Bool- ean satisfiability. ATPG deals with the problem of efficiently generating test stimuli for testing chips after fabrication. As with SAT, ATPG hasalso been well studied.

Upload: others

Post on 18-Dec-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: uyUv - University of Southampton

������������ ��

����� ����� ��������� ��!"�$#&%�'(��)�* �,+"#-%./#�#&!�01��� �20�34'5��'5#-� ��%�#&.6!�01* �798;:=<?>�@BAC>9DFE(AHGI8KJ@L89MN@LOQP�ECRSUTWV�XY:[Z@V]\C@CO^@H_�M`@H:YXba

Abstract The problemsof Booleansatisfiability (SAT) and automatictestpattern gen-eration (ATPG) arestrongly related- both in termsof applicationareas(pre-manufacturingdesignvalidationandpost-manufacturingtesting),aswell asintermsof techniquesusedin their practicalsolutions(searchinglargecombina-torial spacesthroughefficient pruning). However, historically thesedomainshave evolved somewhat independentlywith limited interaction. While ATPGhasbeenprimarily driven by reasoningbasedon circuit structure,SAT hasfo-cussedon reasoningusing conjunctivenormal form (CNF) representationsofBooleanformulas. In this chapter, we introducetheseproblems,describekeytechniquesusedto solve themin practice,andhighlight thecommonthemesanddifferencesbetweenthem.

c�dfe^c gih�jlk`monqp�rsj�gtmohThe problemsof Booleansatisfiability (SAT) and automatictest pattern

generation(ATPG)havebeeninvestigatedintensively for many decades.Bool-eansatisfiabilityservesasanimportantreferenceproblemin complexity theoryof ComputerScience.It hasbeenshown thatmany difficult decisionproblemsfrom variousapplicationdomainscan be reducedto the Booleansatisfiabil-ity problem.Algorithmsfor solvingthis problemhave beenanactive field ofresearchandsteadyprogresshasbeenachievedover many years.

Theproblemof ATPGfor combinationalcircuitsis closelyrelatedto Bool-eansatisfiability. ATPG dealswith the problemof efficiently generatingteststimuli for testingchipsafter fabrication. As with SAT, ATPG hasalsobeenwell studied.

uwvwx

Page 2: uyUv - University of Southampton

uyUv z�{}|5~W���B���������w~������]�-���B�]~��B~��C���L~W{B�SAT and ATPG algorithmshave received even strongerinterestmore re-

cently, sincethey have beenusedsuccessfullyasBooleanenginesfor equiv-alencechecking(seeChapter13) andlogic synthesis(seeChapter2). In thischapter, we ignorethe physicalaspectsof testinganddo not considertestingof sequentialcircuits. Our interestis exclusively in the combinatorialsearchproblemsin SAT andATPG.

Traditionally, theresearchdomainsof SAT andATPGdevelopedquiteinde-pendentlyof eachother. With abroadspectrumof applicationsasbackground,the researchin SAT typically focusedon generalconceptsuseful in diversefields. Due to the morespecializedproblemformulation, researchin ATPGfocusedon techniquesthat arefine-tunedto dealingwith digital circuits. Ingeneral,however, therearea lot of commonalitiesbetweenthe notionsandmethodsdevelopedin the two researchdomains. This chapterdescribesthebasicconceptsof SAT andcombinationalATPG.Wherepossible,it attemptsto bridgethegapbetweentheterminologycommonlyusedin thetwo areas.

c�dfe�d ����j �1h�n ��j��l� ��k`mN���F� �� mNk1��p �F��j�gtmNh9�

Algorithms for automatictestpatterngenerationin combinationalcircuitsare traditionally basedon a gatenetlist descriptionof the circuit under test(CUT). SAT algorithmstypically representthecircuit by aconjunctivenormalform (CNF) formula. This distinction is not very sharp,however. SAT andATPG areclosely relatedproblemsand therealso exist variousATPG toolsbasedonaCNFrepresentationof thecircuit. Notethatagatenetlistdescriptioncanalwaysbetranslatedinto a CNF formula,asdescribedin thenext section,but not vice versa. In the following, we presentthe problemformulationsfor Booleansatisfiabilityandcombinationalstuck-atfault testingbasedon theconventionalCNF- andgatenetlistrepresentations,respectively.

¡B¢�£�¢�£�¡ ¤ ¥�¦"§�¨s¦`¤ª©ª«U¬�­®¦`¥�¯�°²±l³²´µ¥�¯�° ±�¦"¶· ±�©ª« · ´�«¸±�¹ «¸³º«¸©¼»

Instancesof SAT aremostoftenrepresentedasCNF formulas.A CNF for-mula is a conjunction(product)of clauses, wherea clauseis a disjunction(sum)of literals, anda literal is eitheravariableor its complement.For exam-ple ½�¾�¿ÁÀ�ÂBÃ"Ä�ÀCÅÇÆU¿�Ä�À;ÂKÃ"ÀÈUÆ , denotesaCNF formulawith two clausesandthreevariables.

TheBooleansatisfiabilityproblemfor a CNF formula is formulatedasfol-lows: GivenaCNFformula, ½ , representingaBooleanfunction, É�¿�À�ÂÇÊUËÌËUË?Ê�ÀÍ�Æ ,thesatisfiability problemconsistsof identifyingasetof assignmentsto thefor-mula variables,ÎÏÀ;Âо2ÑÒÂÇÊUËUËÌË?ÊWÀtÍ�¾2ÑUÍLÓ , suchthat all clausesaresatisfied,i.e., É�¿�Ñ Â ÊUËUËÌË?ÊWÑ Í Æ�¾ÕÔ , or proving thatno suchassignmentexists.

Page 3: uyUv - University of Southampton

�Ï����ÖU×wØ����Ù}| uywyCombinationalcircuits caneasilybe representedusingCNF formulas. A

CNF formulais associatedwith eachgate,andcapturestheconsistentassign-mentsbetweenthegateinputsandoutput.TheCNF formulafor thecircuit istheconjunctionof theCNF formulasfor thegatesin thecircuit; assignmentsto thecircuit nodesareconsistentif andonly if theassignmentsareconsistentfor theinputsandoutputof eachgatein thecircuit.

Thederivationof theCNFformulafor agateÀÚ¾ É�¿�ÛÜÂÝÊÌËUËUË^Ê�Û]ÞWÆ is straight-forward. First, a new Booleanfunction ßUà�¾ À�á"É�¿�ÛÜÂÝÊÌËUËUËâÊWÛ]ÞWÆ is defined.Observe that ßUà only assumesvalue1 provided À and É�¿ÁÛºÂÝÊÌËUËÌË?ÊWÛ]ÞWÆ assumethesamevalue.Next, ßUà is representedasaproduct-of-sumsform, ½5à . Hence,theCNF formula ½ à assumesvalue1 if andonly if thevalueof À is equaltothe value of É�¿�ÛºÂUÊÌËUËÌËãÊ�Û]ÞWÆ . As an exampleconsidera 2-input AND gate,À²¾ ä�åHæ . The resulting formula becomesßUàC¿�À(ÊWäLÊWæÇÆ�¾ À�á`É�¿ÁäCÊ�æÇÆs¾À�å�¿ äçà æ�ÆBà ÀèåÝäFåÇæ}¾�¿ ÀéÃNäiÆ5å�¿ À�Ã"æÇÆêåë¿ÁÀ�à äºÃ æÇÆ�¾ ½5à .¡B¢�£�¢�£�¢ ìs±�©ª­�¦"­�©ª³º« · ©í±�¦"¶ · ©ª¨"¤ªî�ïݱè©ð´�± ¨�³K©

©ª­ · ©ª«¸¦`ìTechniquesof testgenerationmostoftenrely onagatenetlistdescriptionof

the circuit. A gatenetlist canbe modeledasa Booleannetwork. A Booleannetworkis agraph,with vertices(referredalsotoasnodes,variablesor signals)representinggatesanddirectededgesrepresentingconnectionsbetweengates.Eachvertex hasafunctionassociatedwith it whichcorrespondsto thefunctionof thegateit represents.

In the following, we alwaysassumethateachfunction in theBooleannet-work is very simplesuchthat it canbe implementedby oneof the primitivegatetypesAND, OR,NOT, NAND or NOR. Eachof thesegatescanhave anarbitrarynumberof inputs. Extendingthe ATPG techniquesof this chapterto XOR, XNOR or othermorecomplex functionsis possiblebut will not befurtherconsidered.

The goal of testingis to detectphysicaldefectson a chip inflicted by thefabricationprocessor thoseoccurringlater during the operationof the chip.Physicaldefectsaredescribedat the gatelevel by certainfault models. Thesinglestuck-at fault is a widely acceptedmodel. It assumesthata single linein the combinationalcircuit fails to changeits logic valueandis “stuck” at aconstantvalueof 0 or 1.

Techniquesof testgenerationcanberoughlydividedinto randomanddeter-ministicmethods.In randommethods,a setof randominput stimuli is gener-atedfor thecircuit undertest(CUT). A fault simulatorcanbeusedto measurethequalityof therandomstimuli with respectto detectingagivensetof faults.For a survey of fault simulationtechniquesandthe useof randomtestinginthecontext of designfor testability, see,e.g. [1]. In deterministicATPG,the

Page 4: uyUv - University of Southampton

uyUñ z�{}|5~W���B���������w~������]�-���B�]~��B~��C���L~W{B�ò�óôöõ

÷�ø ùúüû ýöþöÿ�� � û � �

�����

�� �� �����������������

Circuit undertest(CUT).

startingpoint of all operationsis a list of faults that mustbe detectedby theteststo bedetermined.Thefaultsin thefault list aretargetedoneaftertheotherandfor every fault a testis derivedby theATPGalgorithm.In thischapter, weexclusively considerdeterministicATPG.For reasonsof simplicity the word“deterministic”is oftenomitted.

The problemof testgenerationfor singlestuck-atfaults in combinationalcircuitsis illustratedin Figure12.1.Foragivengatenetlist � thereisafault list� ¾�Î �(ÂUÊ!��ÅÌÊUËUËÌË?Ê!�#"ÌÓ containingall faultsfor whichatesthasto begenerated.Thesefaultsarecalledtarget faults. Let � have $ primary input signalsand% primaryoutputsignalsandlet y ¾�¿�&ÒÂ�¾ ÑÒÂUÊ!&¸Å}¾ Ñ¸ÅUÊÌËUËUËâÊ!&(' ¾ Ñ(' Æ betheresponseof the fault-freecircuit andz ¾�¿�&ÒÂf¾ Ñ*) Ê!&¸Å}¾ Ñ+)Å ÊUËUËÌË?Ê!&('N¾ Ñ*)' Æ betheresponseof the faulty circuit to someinput stimulusx ¾/¿ÁÀ� ¾9ÛºÂÇÊWÀLÅ ¾Û Å ÊÌËUËÌË?ÊWÀ Í ¾/Û Í Æ with Ñ-,?Ê�Ñ )Þ Ê�Û "/. Î 0ÊÌÔ¸Ó . The input stimulusx is calledatest for a fault � if andonly if the circuit responsez in the presenceof � isdifferentfrom the responsey of the fault-freecircuit. Theremay not exist atestfor every fault in acircuit. Untestablefaultsarealsocalledredundant. Thetaskof a deterministicATPGalgorithmis to calculatea testx for a givenfault� if a testexists, or to prove its untestabilityotherwise.An input stimulusxthatdetectsa fault � is alsocalleda testvectoror testpatternfor fault � .

c�dfe�1 r"mN� �sgih���j�gtmNh��1�$n � j���k1��gih�gt��j�gr��j��l�

After introducingthe basicproblemformulationsfor SAT andATPG wenow considerthe algorithmsfor solving theseproblems.ThebasicSAT pro-cedurewill be describedin Section12.4. This sectiongivesan introductionto the generalcombinationalATPG procedure.It will becomeapparenthowATPGandSAT aregenerallyrelated.

¡B¢�£�2]£�¡ ³µ¥�ìs«Ò¤ ±�³4365"±l¹ ­�© ·A combinationalcircuit with $ primary inputs and % primary outputsis

specifiedat the gatelevel by an % -ary function É87:9 Í<; 9 ' , where 9 isthechosendomainof logic values.For fault-freecircuits it is commonto usethelogic alphabet9�Å}¾�Î=0ÊUÔ¸Ó . Often,for specificproblemsotherlogic alpha-

Page 5: uyUv - University of Southampton

�Ï����ÖU×wØ����Ù}| uyUu

AND 0 1 X D >0 0 0 0 0 01 0 1 X D >X 0 X X X XD 0 D X D 0> 0 > X 0 >

OR 0 1 X D >0 0 1 X D >1 1 1 1 1 1X X 1 X X XD D 1 X D 1> > 1 X 1 >

? @0 11 0X XD >> A

B C�D�EF�:�G�����H�AND-, OR-,NOT-operationin the5-valuedlogic alphabetIKJ .

betsarerequired.In orderto describethe faulty behavior of a circuit, Roth’sD-calculus[37] hasbecomewidely accepted.In Roth’s notationa signal isassignedthe logic value L if it assumes1 in the fault-freeand0 in the faultycircuit. In the oppositecase,if the signal is 0 in the fault-freeand1 in thefaulty circuit, it is denotedby M . For logic valuesbeingequalin thefault-freeandfaulty cases,namely0 or 1, thesignalvalueis denoted0 or 1, respectively.With thesenotationswe obtainthelogic alphabet94N�¾6Î 0ÊÌÔwÊGM�Ê MºÓ . For testgenerationit is of advantageto introducea fifth logic value,X, describingthecasewhereno uniquelogic valuehasbeenassigned.This valueis usuallyre-ferredto asthe don’t care or unknownvalue. Including X into 94N resultsinthefive-valuedlogic alphabet9POº¾6Î 0ÊUÔÒÊGQ�ÊGMFÊ M Ó . A 5-valuedalgebraover9 O canbe obtainedby straightforwardextensionsof the usualoperationsofconjunction,disjunction,andnegationfor 9�Å ; thetruth tablesfor theseexten-sionsareshown in Table12.1.Althoughsomeapplicationsespeciallyin delaytestingrequiremoresophisticatedlogic alphabets[2, 14] Roth’s D-alphabet,to thisdate,formsthebasisfor many modernATPGalgorithms.

¡B¢�£�2]£�¢ ±�©/3 ì ±�³µì"¥�¯�«¸©/5"° ·SR ±�¦ ¥Ú¬�­�¯é¬s«¸­UTIt is thegreatmerit of Roth’s D-calculusthat it allows usto completelyde-

scribethe faulty behavior of thecircuit on its structuralgate-level descriptionpaving theway for efficient heuristics.In this section,we describea conven-tionalprocedureof testgenerationbasedontheD-alphabetoperatingonagatenetlistrepresentationof thecircuit.

For illustrationof thegeneralATPGprocedureconsiderthecircuit of Fig-ure12.2.Considerthesinglestuck-at-1(s-a-1)fault at signalV . Obviously, aninput vectorcanonly be a test for this fault if it exhibits a faulty logic valueor fault signalat the fault line V . This processis called fault excitation, faultsetupor fault injection. In ourexample,signal V hasto becontrolled from theprimaryinputsin sucha way thatit assumesa logic 0 in thefault-freecase.Ifsignal V is 0 in thefault-freecaseand1 in thefaulty case,thenit assumesthelogic value M in Roth’snotation.

Page 6: uyUv - University of Southampton

uy�W z�{}|5~W���B���������w~������]�-���B�]~��B~��C���L~W{B�

XZYX�[X�\X�]X�^X�_Xa`X�bX�cX�Y dX�YeYX�Y [X�Y \

f Y

f [

geh ijh k

l monap

qFr�s

t rZs

uwv�x yjz{�| } ~�y � v�x yjz�{�| } ~�y

� � �

� �

�� ���a�

�� �!�������G���F���Fault injection.

Theproblemof identifying asetof valueassignmentsat theprimaryinputssuchthatafaulty logic valueis producedatthefault line is calledthecontrolla-bility problemin ATPG.Further, it mustbeensuredthata faulty signalat faultline É canpropagateto at leastoneprimary outputof thecircuit. Identifyinga setof valueassignmentsat theprimaryinputssuchthata signalchangeat Éfrom 0 to 1 or from 1 to 0 canpropagateto at leastoneprimaryoutputis calledtheobservabilityproblemfor É . Testgenerationfor stuck-atfaultsrequiresthesimultaneoussolutionof thecontrollability andtheobservability problemfora givenfault line É .

After fault injectionall commontestgeneratorsperformlogic implications,i.e., they makevalueassignmentsthat canbe derived from fault injection. Inourexample,weassumethattheimplicationprocedureproducesthenew valueassignments�è¾�0 , ��¾�0 , VwÂ�¾ M and VÏÅç¾ M asshown in Figure12.2. Thisis the startingpoint for all subsequentsteps. Among the signalassignmentsgeneratedduring the ATPG process,therearetwo setsof signalsthat areofparticularinterest,calledtheD-frontier andtheJ-frontier.

The D-frontier � consistsof all fault signals,i.e., signalsbeingassignedeitherD or M , which are input signalsof logic gateswhoseoutputsignal isunspecified.The D-frontier indicateshow far the faulty signalshave propa-gatedfrom thefault locationtowardstheprimaryoutputs.In Figure12.2faultinjectionhasproducedtheD-frontier ��¾�Î�VwÂÇÊZV¸Å�Ó .

TheJ-frontier � consistsof all outputsignalsof gatesbeingassignedavalueof 0 or 1, wherethis logic valuecannotbeimplied from thelogic valuesat thegateinputs.Morecommonly, thesignalsof theJ-frontierarecalledunjustifiedlines. They representsignalsin thecircuit, wherevalueassignmentshave pro-ducedfixed logic valuesat the outputsof internalgateswhich, however, are

Page 7: uyUv - University of Southampton

�Ï����ÖU×wØ����Ù}| uy-�not completelyjustifiedby thevalueassignmentsat thegateinputs. In Figure12.2two unjustifiedlines �9¾9Î �âÊ���Ó have beencreated.For a valid test,theyhave to bejustifiedin subsequentstepsof testgeneration.

Using thesenotationsthe task of a test generatorcan be reformulatedasfollows: find a set of binary value assignmentsat the primary inputs of thecircuit, suchthat

theD-frontier reachestheprimaryoutputs,i.e.,at leastoneprimaryout-putassumesa faulty value(solve theobservability problem),

theJ-frontier reachestheprimary inputs,i.e., thereexist no unjustifiedlinesin theinterior of thecircuit (solve thecontrollabilityproblem).

Note that the controllability problemis essentiallya SAT problem,andissolved by identifying a set of assignmentsfor the inputsof the circuit suchthatall signalsof theJ-frontieraresatisfied. Therefore,notsurprisingly, manyalgorithmicconceptsfor combinationaltestgenerationarecloselyrelatedtothoseof SAT solvingmethodsandSAT solverscanbeusedto solve theATPGproblemin partsor entirely.

To accomplishthe above two tasksmostalgorithmsfor deterministictestgenerationproceedstepby step,assigningappropriatelogic valuesat well-selectedsignalsin the circuit suchthat the D-frontier is moved towardstheprimaryoutputsandtheJ-frontieris movedtowardstheprimaryinputs.

Along the processof testgenerationwe distinguish two typesof valueas-signments.First, we considernecessaryassignments. Necessaryassignmentsareuniquelydeterminedby the currentsituationof valueassignmentsin thecircuit andany testvectorthat canbe generatedstartingfrom thecurrentsit-uationmustcontainthis valueassignment.In Figure12.2 fault injection hasproducedthenecessaryvalueassignments�5¾�0 , �о�0 , VÒÂf¾ M , V¸Å�¾ M . Be-sidesnecessaryassignmentsevery testgeneratormakesoptionalassignments.Optionalassignmentsareassignmentsthatcanbe madein orderto reachthegoalof generatinga testvector. Theexistenceof optionalassignmentsresultsfrom thefact thatthereusuallyexistsmorethanjustonetestvectorfor agivenfault. By makingoptionalassignmentswe continueto restrictthe numberofpossibletestvectorsuntil we finally endup with exactly one. The choiceofoptionalvalueassignmentsis subjectto heuristics.

Testgenerationcanbe understoodasa sequenceof makingoptional andnecessaryassignments.Figure12.3 shows a generalprocedurethat outlinesthe stepsfor combinationaltestgenerationtypical of many populartools. Inthefollowing, we discusstheseconceptsbriefly - they will betreatedin moredetailin latersections.

A) Fault injection(fault set-up)

Page 8: uyUv - University of Southampton

uy-� z�{}|5~W���B���������w~������]�-���B�]~��B~��C���L~W{B�

  ¡¢�£ ¤�¥ ¦¨§ ©�ª�¤ ¥ «�¦

¢�¦�¥ ¬¢w©®­¯©¦¯­¯¥ ¤ ¥ °¯¡w¤ ¥ «�¦

±�²³�´o²

µ ©w­¥ ¶-·�£ ¥ ª�¡w¤ ¥ «�¦¯­

¥ ¦wª�«�¦w­¯¥ ­�¤ ©¦wª µ�¸

¹oº ·w¡w¤ » ¸

­¯©£ ©�ª�¤�«�·¯¤ ¥ «�¦w¡£¨¼w¡£ ¢w©-¡w­�­w¥ ½�¦�¶®©¦¯¤¾ ¡w­¯©�¿�«�¦®»w©¢�À ¥ ­�¤ ¥ ª�­­¯©£ ©�ª�¤¡£ ¤ ©À ¦w¡w¤ ¥ ¼w©Á¼w¡£ ¢w©-¡w­�­w¥ ½�¦¯º¶®©¦¯¤ ¾ ¡w­�©�¿®«�¦�¿�©�ª¯¥ ­w¥ «�¦�¤ À ©�©

¦¯«

µ ©w­¦¯«

¡ ¾ «�À ¤ ©�¿ À ©�¿¢�¦w¿�¡¦¯¤ ¤ ©w­�¤w¼¯©�ª�¤ «�À �� �������Â�G���FÃ��

Generalprocedureof testgeneration.

As explainedabove, the fault signalat the fault location immediatelyre-sults from the fault value(stuck-at-1or stuck-at-0)and the definition of theunderlyinglogic alphabet.In Figure12.2this is illustratedfor 5-valuedlogic.

B) UniquesensitizationAfter fault set-upa topologicalanalysisexaminesthe pathsalong which

thefault signalcanpropagate.Certaintopologicalconceptsareusedto derivevalueassignmentsthat arenecessaryfor the propagationof the fault signal.This is calleduniquesensitization andis discussedin Section12.5.1.4.

C) ImplicationsFor the previously madevalueassignments,implicationsareperformedin

orderto restrictthesearchspace.At thispoint, toolsmaydiffer in theirabilityto performdifferenttypesof implications. Implication techniqueswill be thesubjectof Section12.5.1.

D) CheckingBeforetaking furtherstepsit hasto be examinedwhetherthecurrentsitu-

ation still allows for the generationof a testvector. This is generallynot aneasytask.However, therearetwo conditionsthatmustbefulfilled atany pointduringthetestgenerationprocessandthesecaneasilybechecked:

Page 9: uyUv - University of Southampton

�Ï����ÖU×wØ����Ù}| uy-Älogic consistency

existenceof anX-path

First,thelogic valueassignmentsmustbeconsistent,i.e. theremustbenologiccontradictionsbetweensignal valuesin the circuit. This is usually verifiedduring the implication process.Second,therehasto exist at leastonepathin thecircuit alongwhich the fault signalcanpropagateto at leastoneof theprimaryoutputs.This conditionis fulfilled if thereis a pathfrom at leastonesignalof theD-frontiertooneof theprimaryoutputsalongwhichall signalsareunspecified,i.e., they have thelogic valueX. We saythatthecurrentsituationpassestheX-path-check. Generally, wespeakof aconflict if eithertheX-path-checkhasfailed or logic inconsistencieshaveoccurred.

E) OptionalvalueassignmentsIf no conflict hasoccurredandno testvectorhasbeenobtainedyet,heuris-

tic methodsareemployedto suggestoptionalvalueassignments.Importantly,only oneandnot severaloptionalvalueassignmentsaremadeat a time. (Anexceptionis the testgeneratorof [17] whereundercertainconditionsseveralassignmentscanbemadeat once.)After eachoptionalvalueassignment,im-plicationshave to beperformedagain. Heuristicsto selectoptionalvalueas-signmentswill bediscussedin Section12.5.4.1.

F) Decisiontree(backtracking)In mostpracticalalgorithms,the searchconsistsof makingdecisionsthat

areaddedto a decisiontree. Optionalvalueassignmentsconstitutedecisions.Eachdecisionis associatedwith a nodein thedecisiontree.Importantly, nec-essaryassignmentsarenot decisionsandthey arethereforenot representedinthedecisiontree.If aconflictoccursduringtestgeneration,previousdecisionsandthenecessaryassignmentsassociatedwith themhave to bereversed,andaswill be explainedin Section12.4.1systematicbacktrackingis performed.The decisiontreeguaranteesthat the searchis complete. In Section12.5.2.2wewill presentanenhancementto thebasicbacktrackingscheme.

Finally, it shouldbenotedthatthenotionsdescribedin this sectionarealsousefulwith thoseATPG approachesthat mapthe stuck-attestingproblemtoa Booleansatisfiabilityproblemandusea CNF representationof the circuit,e.g.[27], [43]. CNF-basedATPGmethodscanexploit many basicconceptsofthe netlist-basedapproaches,andvice versa. As pointedout before,control-lability is a SAT problemby natureandobservability canbe mappedto SATusingthe notion of Booleandifference[27]. Constraintslike uniquesensiti-zationconditionscanbe expressedin termsof clausesthat areaddedto theCNF. In thisway, structuralcircuit informationsuchasgivenby theD-frontier

Page 10: uyUv - University of Southampton

uy-Šz�{}|5~W���B���������w~������]�-���B�]~��B~��C���L~W{B�becomesavailableto theunderlyingSAT algorithm.Conversely, conceptsde-velopedin thecontext of SAT solvingcanbeusedto solve controllability andobservability in ATPG.

c�dfe�Æ ����j �1�è��mNk1gijÈÇ�� �PÉÜ� j��ËÊ`mohÕmN�ÍÌThearetwo mainclassesof algorithmsfor solving instancesof SAT: com-

pletealgorithmsand incompletealgorithms. Completealgorithmscanproveunsatisfiability, given enoughresourcesof memoryandtime. Incompleteal-gorithmscannotprove unsatisfiability.

Completealgorithmsentailthefollowing approaches:

Algorithmsbasedonbacktracksearch,wherethesearchspaceis implic-itly enumerated(seeSection12.4.1).

Algorithmsbasedondifferentformsof deduction,thatallow deriving allnecessaryconsequences(i.e., all necessaryassignmentsor establishingunsatisfiability) for a givenCNF formula(seeSection12.4.2.1).

Algorithmsbasedonfunctionrepresentation.Examplesincludethevar-iousfamiliesof decisiondiagrams(seeChapter11).

Most incompletealgorithmsutilize local search,andconsequentlyarebasedonapplyingsomeform of variableassignmentflipping [41]. Wewill not focusonthisclassof algorithmsasthey find limited usein synthesisandverification.

In thenext few sectionsthefirst two classesof SAT algorithmsaredescribedin moredetail.

¡B¢�£�Î]£�¡ ¹ ± ¤ î"©ª¯�± ¤ î · ­è±�¯�¤/5We have alreadyintroducedbacktrackingasthebasicsearchingschemein

ATPG.Also in thedomainof SAT, backtracksearchis mostwidely usedandis known astheDavis-Logemann-Loveland procedure [11]. Beforedescribingbacktracksearchfor Booleansatisfiability, it is importantto distinguish be-tweentheoriginal Davis-Putnamprocedure[12], that is basedon theconsen-sus/resolutionoperationandnotonbacktracksearch,andthemorewell-knownDavis-Logemann-Lovelandprocedure(DLL) thatimplementsa form of back-tracksearch[11]. Thesimplestform of backtracksearchis illustratedin Fig-ure12.4.A partialassignmentÏ to theprobleminstancevariablesis extendedat eachstep. Eachtime an unsatisfiedclauseis identified,the searchproce-durebacktracksandattemptsa differentassignment.Theprocessis repeateduntil eithera solutionis found, i.e., all clausesbecomesatisfied,or no morevariablescanbe toggled,in which casethe probleminstanceis deemedun-satisfiable.Despitethis procedure’s simplicity a few drawbacksareapparent.Considertwo clausesÐ�Âf¾�¿ÁÀ�ÂwêÄ�ÀCÅCêÀÑ"!Ò�ÅÌÆ andÐ�Å�¾�¿ÁÀ�Â�êÄ�ÀCÅêÄ�ÀÑ"!Ò�Å¸Æ ,

Page 11: uyUv - University of Southampton

�Ï����ÖU×wØ����Ù}| uyUxBacktrackSearch( Ó )

if ( Ó unsatisfiesoneor moreclauses)return falseif ( Ó satisfiesall clauses)return trueelse selecttargetvariable à andvalue ÔÓÖÕ×ÓÙØ�Ú�Û à=Ü Ô�Ý�Þif ( not BacktrackSearch( Ó ))ÓßÕàÛ�ÓÙáâÚ�Û à=Ü Ô!ÝÞGÝ-ØHÚ�Û à=Ü�ãÔ!ÝÞ

if ( not BacktrackSearch( Ó ))ÓÖÕ×Ó×áäÚ�Û à=Ü�ãÔÁÝÞreturn false

return true

�� �!�����å����� æ(�Naivebacktracksearch.

and the assignmentÏ�¾ðο�À�ÂÇÊ!0wÆ ÊÏ¿�ÀLÅWÊÌÔUÆ�Ó . Clearly, by inspectiononecanconcludethatassignmentÏ cannotbeextendedto anassignmentthatsatisfiesthetwo clauses(i.e. a satisfyingassignment).Assumingthatin thebacktracksearchprocedureunassignedvariablesarepickedin lexicographicalorder, thenit cantakeup to ç " decisions(on variablesÀ È ÊUËÌËUË?Ê�À "�ÒHÅ ) to concludethat theassignmentÏ cannotbeextendedto asatisfyingassignment.

All backtracksearchSAT algorithmsaddresstheabove problemby imple-mentingthesocalledunit-clauseruleunitclauserule [12]: if apartialvariableassignmentcausesa clauseto be unit (i.e. with a singleunassignedliteral),thentheremainingunassignedliteral mustbeassignedvalue1. For example,assumeclauseÐ ¾�¿�À;ÂWÃ�Ä�ÀCÅÌÃ�ÀtÈUÆ , andtheassignmentÏ1¾�Î ¿�À;Â�¾80wÆÇʸ¿�ÀÈ�¾0wÆ�Ó . Underthisassignment,Ð is unit, andso ÀCÅ mustbeassignedvalue0 for Ðto besatisfied.Theiteratedapplicationof theunit-clauserule is oftenreferredtoasBooleanconstraint propagation(BCP)andcorrespondsto theimplicationprocessin ATPGaswill beexplainedin moredetailin Section12.5.1.1.

Anotherlessutilized simplificationtechniqueis thepure literal rule (PLR)[12]. If for a given variable À all of its literals areeitherall positive or allnegative, then the variablecan be assignedthe value that satisfiesall of itsclauses.

Thefirst backtracksearchalgorithmfor Booleansatisfiability, thebacktracksearchversionof theDavis-Logemann-Lovelandprocedure[11], implementsbacktracksearchaugmentedwith Booleanconstraintpropagationandthepureliteral rule. The original Davis-Putnamprocedure,despitebeing basedontheiteratedapplicationof theconsensusoperation,alsoincorporatesBCPandPLR.

Thestandardbacktracksearchalgorithmis shown in Figure12.5.Thebasicphilosophyis thesameaswith theATPGprocedureof Figure12.3. FunctiondoBCP() implementsBCPandhasthetaskof performingimplicationsaftereachdecision. FunctionundoBCP() erasesall assignmentsimplied duetothemostrecentapplicationof BCP.

Page 12: uyUv - University of Southampton

uwñwv z�{}|5~W���B���������w~������]�-���B�]~��B~��C���L~W{B�BacktrackSearch( Ó )

if ( Ó unsatisfiesoneor moreclauses)return falseApplyPLR(Ó )if ( Ó satisfiesall clauses)return trueelse

selecttargetvariableà andvalue ÔÓÖÕ×ÓÙØ�Ú�Û à=Ü Ô�Ý�Þif ( doBCP( Ó ) èÕ CONFLICT and BacktrackSearch( Ó ))

return trueundoBCP( Ó )ÓÖÕ×ÓUáâÚ�Û à=Ü Ô!ÝÞ�ØHÚ�Û à=Ü�ãÔ�Ý�Þif ( doBCP( Ó ) èÕ CONFLICT and BacktrackSearch( Ó ))

return trueundoBCP( Ó ) /* Undoimplied assignments*/ÓÖÕ×ÓUáâÚ�Û à=Ü�ãÔ!ÝÞ /* Undodecisionassignment*/return false

�� ��������G�����StandardDavis-Logemann-Lovelandprocedure(backtracksearch).

¡B¢�£�Î]£�¢ ¶�­�¯�«Ì¬s«¸¦`ì ±�³º³2¦"­¼¤ ­ ·f· ±�¯Ð»¤ ¥�¦ · ­ëê�¨s­è¦`¤ ­ ·

We now considera completelydifferentapproachfor checkingthesatisfia-bility of a CNF-formulaor thetestabilityof a stuck-atfault. While backtrack-ing, asdescribedin Section12.4.1,systematicallymakesdecisionsin ordertogenerateasatisfyingvector, theapproachesconsiderednow generatenecessaryconditionsandprove satisfiabilityby theabsenceof a conflict.

ìîíðïFñÑï�í�ïwì òÙóHô#õPöø÷UùSú�õPûThe resolutionmethodis a classicalmethodfor CNF-basedSAT solving

that deducesall logical consequencesfrom a given formula in the form ofadditionalclausesthatareaddedto theCNF. Resolutionis a fundamentalde-ductionmechanism.In theBooleandomaintheprincipleof resolutionis givenby

¿�À�Ãü&�ÆU¿ &�ÃþýwÆ�¾6¿�À�Ãÿ&iÆU¿ &ºÃÿýwÆU¿�ÀéÃÿýwÆThe term À�Ã8ý is calledthe resolventof ÀÚÃË& and &�Ã8ý andwe denote

À�Ãþý�¾�������¿�ÀéÃþ&LÊ &�ÃÿýtÊ!&iÆ .This law is alsoknown astheconsensusrule. Thisnameis oftenusedin the

field of logic synthesiswherethedisjunctive form of thelaw,

À &ºÃ & ýé¾ À &ºÃ & ýçÃNÀ ýis morecommon.Resolutionor consensuscanbe usedto checksatisfiabilityof aCNF-formulausingtheprocedureknown asiteratedresolutionor iteratedconsensusshown in Figure12.6.

Page 13: uyUv - University of Southampton

�Ï����ÖU×wØ����Ù}| uwñyIteratedResolution( � )

for (eachvariable à�� � )Let � bethesetof clauseshaving à asa literalLet bethesetof clauseshaving � à asa literalfor (everypair of clausesÛ� Ü Ý , with � Ü � ) ��#Õ������ZÛ� �� Ü � Ü�� Ý

if ( ��#�� ) return falseadd �� to �

deletefrom � all clausesin andin �return true

�� �!�������G�������Theiteratedresolutionprocedure.

Theprocedurebasicallyappliesresolutionoperationsbetweenpairsof clauseswith thegoalof eliminatingonevariableat eachstepof thealgorithm. If theemptyclauseis derived,thentheprobleminstanceis unsatisfiable.Otherwise,theemptysetof clausesis derived, andthe probleminstanceis declaredsat-isfiable. At eachstepof the iteratedresolutionprocedure,onecanutilize theiteratedunit clauserule (i.e. BCP) and the pure literal rule. The resultingalgorithmis theoriginalDavis-Putnamprocedure[12].

Note an importantdifferencewith the backtracksearchalgorithm in Sec-tion 12.4.1.If the formula is satisfiabletheresolutionmethodwill not imme-diatelyyield a satisfyingvector. Satisfiabilityis provedby theabsenceof theemptyclause.This principlehasalreadybeenemployedto checkthevalidityof Booleanformulasever sincethe early daysof Booleanalgebra(seealso[7]). Later, in the1950s,it wasdiscoveredby QuineandMcCluskey that themethodof iteratedconsensuscanbeusedwhenminimizing two-level circuits.If iteratedconsensusis runto completionandall subsumedtermsareremovedwe obtain the prime implicants(if they areproductterms)or prime clauses(if they aresumterms)of a Booleanfunction. They play animportantrole inalmostall exacttwo-level minimizationprocedures.

Whensolving the Booleansatisfiabilityproblem,exhaustive deductionasgivenby theabove procedureis only of limited useasit mayleadto thegen-erationof an exponentialnumberof clauses.Therefore,resolutionis usuallyonly appliedtogeneratealimited amountof additionalclauses.Thesecanhelpto prunethesearchspacein abacktracksearchbasedon adecisiontree.

ìîíðïFñÑï�í�ï�í �×û! #" õäò ô ó$�×ò�%'&A differentapproachfor deduction,applicableespeciallyin multi-level cir-

cuit representations,hasbeensuggestedin [25, 26] andis known asrecursivelearningor AND/ORreasoning. With ATPGasbackground,it wasoriginallydevelopedto run directly on a gatenetlist descriptionbut is also applicableto CNF-basedSAT solving. Thebasicphilosophyis similar to thatof resolu-tion methods.Insteadof exploring all “options” to fulfill acertainrequirement

Page 14: uyUv - University of Southampton

uwñwñ z�{}|5~W���B���������w~������]�-���B�]~��B~��C���L~W{B�(*) +�,.- /1032

465 7 8.5 9.:�;=<?> @6A B C.A D.E�F=GIH

J6K L M.K N.O�P?Q�RSUT V W.T X.Y�Z?[]\

^ _

` ^ a6b.ced f g a�h.i j kl

^ m �� ���������!�en��

Problemsolvingwith AND/OR trees.

asin backtracking,all “necessities”areenumerated.This leadsto a generalsearchingschemesometimescategorizedasAND/OR searchin theAI litera-ture [36]. Unlike thedecisiontreeof Section12.4.1theAND/OR searchtreehastwo typesof nodes,AND-nodesandOR-nodes.

ConsiderFigure12.7. The initial problemto besolvedcorrespondsto theroot nodein theAND/OR tree.Severalstrategiesarepossible.If onestrategyis successfulthe problemis solved. Therefore,the root nodeis an OR-node.In our example,problem Ï canbe solved by strategy Ï�Ô or Ï4ç . In strategyÏ�Ô threesub-problems9¼ÊG� and L arise. All needto be solved, thereforeÏ�Ô correspondsto an Ïpo L -node. Actually, it turns out that L leadsto aconflict. Hence,strategy ÏéÔ is not successfulandwe considerÏ4ç . This leadsto problemsq and � wheretwo strategiesexist for problem � . This processcontinuesuntil the given problemscan no longer be decomposedinto sub-problems.A closeranalysisrevealsthat no matterwhat strategy we choose,problem� needsto besolved. This yieldstheimplications Ïsr � and t�urtÏ . Anotherimplicationthatis perhapslessevidentis tv tw r tÏ .

In [26] anAND/OR searchingschemewasformulatedto derive all neces-saryconditionsfor the satisfiabilityof a Booleanfunction in a Booleannet-work. In contrastto backtracksearch(basedonadecisiontree)thatcansome-timesfinish quickly whena sufficient solutionexists,AND/OR reasoningcansometimesterminateearly whenno solutionexists. The original motivationwasthereforeto prove theuntestabilityof stuck-atfaultsin combinationalcir-cuits.

Otherapplicationsresult from the fact that for an arbitrarynode & in theBooleannetwork,AND/OR reasoningcanderive producttermsof the formÀ  åwÀ Å åCËÌËUË�À Í with $yx2Ô suchthat ¿ÁÀ  åwÀ Å åCËÌËUË�À Í ¾�ÔUÆ#r ¿�&�¾�ÔUÆ or¿�À�Â�åwÀCŵåËUËUË^ÀÍ�¾$ÔUÆ#r ¿a&�¾ 0ÒÆ . Theseproducttermshave beenreferred

Page 15: uyUv - University of Southampton

�Ï����ÖU×wØ����Ù}| uwñwuto in [26] as1-implicantsand0-implicants, respectively. In thespecialcaseof$ ¾6Ô , thetechniqueis calledrecursivelearningandcanbeusedto derive allimplicationsin aBooleannetwork(seealsoSection12.5.1.1).Besidespruningthesearchspace,implicationsandimplicantsin multi-level circuitscanbeveryusefulin multi-level logic synthesis[26]. Thisis basedonthesamephilosophyasfor two-level minimizationwheredeductionmethodsto derive implicantssuchasiteratedconsensushave playedanimportantrole for a long time.

c�dfe�z ��� �1k`r<Ç �`r"rs� �F� k1��j�gtmohj�� r<Ç�h�g|{opq���

¡B¢�£*}�£�¡ ¶�­�¶s¨o¤ «¸¦`ì ¤�¥�¦ · ©ª¯�±�«¸¦"© ·Thissectionprovidesadditionaldetailon techniquesto identify simplelog-

ical relationshipsand constraintsthat permit us to simplify the problemin-stances.

ìîíðï�~ðï¯ì ïwì � õÙõPöøó��Ùû�%âõPûßô ùSò��ÙúGûUù��Sò×õ�������� ù ú�õäû��Ùû� ú���� öøú�%��HùSú�õPûßô

As alreadypointedout in previous sections,SAT and ATPG algorithmsmakeextensive useof techniquesthat evaluatethe given setof valueassign-mentsto thevariables(signals)of theCNF-formulaor theBooleannetworkinorderto derive furtherassignmentsthatareuniquelydeterminedby thecurrentsituation. In the context of testgeneration,this processis usuallyreferredtoasperformingimplications. In the terminologyof SAT solving methodsit iscalledBooleanconstraint propagation (BCP).

It is helpful to usethefollowing classificationof implication techniquesinBooleannetworks.

In aBooleannetwork,avalueassignmentatanarbitraryinputor outputsig-nal of a logic gate� follows by simpleimplication if it is uniquelydeterminedby previous logic valueassignmentsat otherinput or outputsignalsof � andby thefunctionof � (AND, OR,NOT, NAND, NOR).A simpleimplicationisa local evaluationof a given gate. Additionally, it is commonto distinguishbetweenforward andbackward implication, dependingon whetherthe newvalueassignmentis impliedat theoutputsor theinputsof theconsideredgate.Figure12.8a) andb) show examplesof simpleforwardandbackwardimpli-cations.Simpleimplicationshave anequivalentcounterpartin thedomainofevaluatingCNF-formulas. Simple implicationsin a Booleannetworkcorre-spondto theapplicationof theunit-clauserule asdescribedin Section12.4.1if thecircuit is modeledby aCNF-formula.

A logic valueassignmentis saidto beobtainedby direct implication, if it isdeterminedby a sequenceof simpleimplications. While simpleimplicationsarerestrictedto locally evaluatingsinglegates,direct implicationscanmake

Page 16: uyUv - University of Southampton

uwñ=W z�{}|5~W���B���������w~������]�-���B�]~��B~��C���L~W{B�

�e�����1�����U���*� �U�e�.�I� ����� � �1�.� � ���

�����1� � �.�]�*� �U�1�.��� ����� � �1�.� � ���

   ¡¢¢

£¢ ¢¢

 ¡ £   

¡

£¡¡

££

¡ £ ¡£

£¡

¢ ¢ ¢¢

¤e¥I¦�§1¨�©�ªU§�«U¬ ­�®�¯ §�¬ ­�®�¯ ¬ °1¤.± ¬ ©�² ¦³¥�¤1¨ ± §.ª?«6¬ ­�®�¯ §�¬ ­�®�¯ ¬ °1¤.± ¬ ©�²

´´µµ

¶¶

´ µ´µ ¶

´µ· ¸�¹�º

»½¼�¾¿

À Á

Â

ÃeÄ�Ã�ųÆ.Ç�È�É Ã�Ê*Ë�Æ.Ì�Í Ì³Î*Í ÏUÃ1Ð.ÑIÍ Ç�È³É Í Ð1Æ.Ñ Í Ê�Ì

�� �����������!�6Ò!�Typesof implicationsin a combinationalcircuit.

valueassignmentsacrossseveralgatesalongthepathsin a circuit; seeFigure12.8c) andd). Direct implicationsin a Booleannetworkcorrespondto BCPbasedon theunit-literal rule for aCNF-formula.Notealsothatthepure-literalrule of Section12.4.1hasa counterpartin ATPG. Applying the pure-literalrule correspondsto makingassignmentsto socalledheadobjectives[16] thatcanbeidentifiedin Booleannetworksby backtracingtechniquessuchasthosedescribedin Section12.5.4.1.

If a value assignmentat a given signal is uniquely determinedby previ-ousvalueassignmentsin the circuit andcannotbe implied directly, thenit issaidto bedeterminedby indirect implication. Figure12.8e) shows anexam-ple of an indirect implication. Indirect implicationscanonly be identifiedbymoresophisticateddeductionschemessuchas the onesalreadydescribedinSections12.4.2.1and12.4.2.2,aswell asadditionaloneswe describenext.SOCRATES[39] wasthefirst testgeneratorto identify someindirectimplica-tions.

ìîíðï�~ðï¯ì ï�í ÓÔ�Ùò×ú��Õ�4ö:óÖ�Sò×õ��âúGû#�Thegoalof identifyinglogicalconstraintsin ATPGhasmotivatedresearchers

to studyvariableprobingtechniques[39, 40], alsoknown asasstaticanddy-namiclearning. Theobjective of variableprobingis to identify relationshipsamongvariables.Consideragainthecircuit in Figure12.8e.If theassignmentɪ¾80 is “probed”,andall direct(forwardandbackward)implicationsareper-formed,thenthe implied assignment×�¾ 0 is identified. As a result,we can

Page 17: uyUv - University of Southampton

�Ï����ÖU×wØ����Ù}| uwñ+�ProbeVariables( � Ü�ØUÙ Ô Ù³Ø )

( � Ü�Ú ) = simple rules(� )if (is satisfied(� )) return ( Ú , true)if (is unsatisfied(� )) return ( � , false)if ( Ø6Ù Ô Ù�Ø�Û� )

for (every àÜ� � )Û Ú Ü*Ý*Þ�ß]Þeà�Ý Ý Õ ProbeVariables ( �$á Ú á Û à Ý Ü�Ø6Ù Ô Ù�Ø á  )if ( Ý*Þ�ß]Þeà�Ý Õ true) return ( ÚÑÜ�Ý*Þ�ß]Þeà�Ý )Û Ú Ü*Ý*Þ�ß]Þeà�Ý Ý Õ ProbeVariables ( �$á Ú á Ûe� à Ý ÜeØUÙ Ô Ù³Ø á  )if ( Ý*Þ�ß]Þeà�Ý Õ true) return ( ÚÑÜ�Ý*Þ�ß]Þeà�Ý )Ú Õ Ú Ø Û Ú ãâ Ú Ýif ( � �ÔÚ ) return ( � , false)

return ( Ú , false)

�� ���������G����ä��Variableprobing(Stalmarck’s method).

saythat ɪ¾80 ; ×è¾80 . Moreover, wecanalsoconcludeby applyingthelawof contrapositionthat ×�¾/Ô ; É�¾/Ô . Observe that thelatter implication isnotreadilyobtainedby asequenceof simpleimplicationsbut requiresanaddi-tional concept,in this case,thelaw of contraposition.Suchimplicationshavebeenreferredto asindirect in Section12.5.1.1andwerecalledglobal in [39].Indirectimplicationscanbeidentifiedduringa preprocessingphase(i.e. staticlearning)or during the searchphase(i.e. dynamiclearning). Note that it isnotobviouswhatsignalsshouldbeprobedin orderto identify additionalvalueassignments.Therefore,in staticanddynamiclearningprobingis performedfor all unassignedsignalsof thecircuit.

In SAT anexampleof usingvariableprobingisStalmarck’smethod(SM) [42,21]. SM is a completeproof procedurefor Booleansatisfiability. The coretechniqueof this proof procedurecan be interpretedas the recursive appli-cationof variableassignmentprobing. While staticanddynamiclearningof[39,40] applyprobingonly to all singlevariablesof thecircuit SM extendstheprobingprocessrecursively to all pairs,all triplesandsoforth.

A recursiveversionof thevariableprobingalgorithm(adaptedfrom [21]) isillustratedin Figure12.9.At eachdepthof therecursiveprocedure,a set � ofconclusions(e.g.,unit clausesdenotingnecessaryassignments)is maintained.ForeveryvariableÀ thetwopossibleassignmentsareevaluatedand,dependingon the outcome,the probleminstancecanbe deemedsatisfied,or currentlyunsatisfiable.

It is plain to concludethat variableprobingwith arbitrarydepthidentifiesall necessaryassignments.Moreover, if theprobleminstanceis unsatisfiable,variableprobingis ableto concludeso.

ìîíðï�~ðï¯ì ï�å ò×óHô#õäö:÷UùSú�õäûæ�Ùû� ç�Ùû� #" õäò ò×ó$� ô õPûUúGû#�Resolutionand AND/OR reasoningsolve satisfiability by deducinglogi-

cal consequencesratherthanenumeratingthevariablespace.Theexamplein

Page 18: uyUv - University of Southampton

uwñ+� z�{}|5~W���B���������w~������]�-���B�]~��B~��C���L~W{B�è�é3ê

ëeì í î�ì ï�ð�ñ ê�òó ô ë.ì õ ö ñ�÷.ñùø�úüû ýeþ ÿ � � þ ��������� ýeþ � � �� ��������

����������� �"!�# $�%�&�'�(�)+*�,�-/.10�2 �� �!�������G������3 �

AND/OR reasoningtreefor 46587 .Figure12.8ecanbeusedto comparethetwo techniques.Supposewe wanttoperformtheimplicationsfor ×Ú¾ÕÔ . First,weconsiderresolutionbeingappliedto thecharacteristicCNF-formulaof thecircuit asgivenby

ý ¾ ¿�äºÃNæ5à tÉ�Æ�Â�å�¿ täºÃ"É�Æ?Å}å�¿ t æ5ÃNÉ�Æ^È}å�¿�ÉFà t�CÆ�Nfåi¿19Kà t� Æ O åw¿ t9�à tÉFà �CÆ;:}å¿�äºÃ t�ÌÆ=<�åi¿ t æKà t�UÆ;>�åw¿ täºÃNæ5ÃÖ�ÌÆ;?}å�¿*��à ��à t×CÆ ÂA@ åw¿ t��à ×CÆ Â? å�¿ t��Ã�×CÆ ÂãÅ

For betterreadabilityof this examplethe clauseshave beennumberedasin-dicatedby the index at eachclause. Performingthe implicationsfor ×N¾ Ômeansthat we would like to identify all clausesof type ¿ ×ÚàÀLÆ where À issomesignalof thecircuit. Applying resolutionto all pairsof clausesresultsinthefollowing resolvents:

1-4: B�CEDGFHDJIK�L�M�N 1-8: B�C+DJIO D I? L�M�P 1-9: B�FHD O D I? L�M J2-6: B1ICEDQIR D K�L M�S 2-7: B"IO D ? L M�T 3-6: B IFHDUIR D KVL M�W3-9: B1ICED O D ? L�M�X 4-10: B O D ? D I4 LZY1[ 5-10: B R D O D I4 LZY;M6-12: B1IR D I? DG4 LZY1Y 7-10: B�C+D K D I4 LZY1N 8-10: B IFHD K D I4 LZY1P9-10: B1ICEDGFHD\4 L Y J

Clausesthatarecoveredby otherclausescanbeeliminated.Next, thepairwisecomparisonshave to be performedfor the new clausestoo. This procedurehasto be continueduntil no morenew clausesaregenerated.For reasonsofbrevity weomit thesestepsbut notethattheclauses17 and20 yield theclause¿�É�à t×�Æ?Å]: . This correspondsto the implication ¿*×�¾-ÔUÆpr ¿ÁÉ�¾-ÔÌÆ which isindirect.

We now examinehow thesameimplicationcanbe identifiedby AND/ORreasoning.Figure12.10shows theAND/OR reasoningtreefor theassignment× ¾6Ô . Therearetwo possiblestrategiesto reachthis assignmentcalledjusti-ficationsin [25]. We canjustify ×�¾-Ô by ��¾6Ô or � ¾-Ô (or both). For eachjustificationwe performdirect implicationsasdescribedin Section12.5.1.1.Note that in either casewe immediatelyobtain É�¾�Ô . Hence, É ¾ Ô is a

Page 19: uyUv - University of Southampton

�Ï����ÖU×wØ����Ù}| uwñ+Änecessaryassignmentandtheimplication ¿½×Ú¾9ÔÌÆ�r ¿�ɼ¾9ÔUÆ is obtained.Foradetaileddescriptionof recursive learningandAND/OR reasoningsee[26].

TheexampleillustratessomedifferencesbetweenresolutionandAND/ORreasoning.Resolutionproducesall primeclausesfor a givenCNF-formula.IftheCNF-formularepresentsa multi-level Booleannetworkwe obtainall im-plicationsandimplicantsbetweenall nodesin the network. Thereis usuallya tremendousnumberof suchrelationshipssothatonly a subsetof all clausescanbegeneratedin practice.It is usuallyhardto developheuristicssuchthatonly thoseclausesaregeneratedwhicharerelevantfor theproblembeingcon-sidered.In theaboveexample,whereweareonly interestedin theimplicationsfor ×¼¾9Ô it wouldbesufficient to only generateclauses17,20 and26.

AND/OR-reasoningsolvesa morespecificproblemthanresolution.It gen-eratesall implicantsfor a particulartarget line in a multi-level circuit, suchas× in theabove example,i.e., it only generatesall clausesof theform ¿*×�Ã1ËÌËUË Æor ¿ ×FàËUËÌË Æ . Therefore,it canbemoreefficient thanresolutionif our interestis in implicantsfor a specifictarget line or in implicationsfor a specificsetofvalueassignmentsin amulti-level circuit.

In general,however, both,resolutionandAND/OR-reasoningarefairly ex-pensive methods.They shouldonly beusedin SAT or ATPGwhenotherlessexpensive methodsfail.

ìîíðï�~ðï¯ì ï¨ñ ù4õ��4õäöÂõÕ�Uú�%'�×ö �×û��Ùö_^ßô ú�ô8`åõPò ÷UûUúbaä÷Uóô ó�ûàô úGùSúdc �HùSú�õPû

In ATPG, the requirementof fault observability can result in additionalsearchconstraintscalled uniquesensitization. This is basedon a topologi-calanalysisconductedonarepresentationof thecircuit � asadirectedacyclicgraph(DAG).

Notethatafault signalcanonly propagatethroughaspecificgateif theotherinputsof thatgatearesetto specificvalues(1 for AND-gates,0 for OR-gates).Thisis calledsensitization of agate.A topologicalanalysisof thecircuit graphcanoften identify setsof gatesthroughwhich the fault signalmustpropagatein orderto reachanoutput[16], [24].

As anexample,considerthecircuit in Figure12.2.For a target fault at sig-nal æ it is obvious that the fault signalmustpropagatethroughgatese , É and× . In the DAG representationof the circuit thesenodesarecalleddomina-tors. For thecircuit in Figure12.2uniquesensitizationresultsin thenecessaryassignmentsÀ�Â�È�¾9Ô , äF¾ 0 and ��¾ 0 .

Page 20: uyUv - University of Southampton

uwñ+Å z�{}|5~W���B���������w~������]�-���B�]~��B~��C���L~W{B�¡B¢�£*}�£�¢ · ­�±�¯ ¤ë5 3Ú¯�¨s¦"«¸¦`ì ¹ª» ¤�¥�¦"´�³º«Ò¤ ©

±�¦"±�³(» · « ·Thereexist avarietyof dedicatedtechniquesfor pruningthesearchspacein

backtracksearchalgorithms.Most of thesetechniquescomeinto play when-everconflictingconditionsareidentifiedandareequallyapplicablein SAT andATPGtools.

To explain thesetechniques,it is useful to note the following additionaldefinitionsrelating to the backtracksearchprocess(seeSection12.4.1). Adecisionlevel is associatedwith eachvariableselectionandassignment.Thefirst variableselectioncorrespondsto decisionlevel 1. For eachnew decision,thedecisionlevel is incrementedby 1. Theapplicationof theunit clauseruleyields variableswhosevalueis implied. The unit clauseÐ5à that implies theassignmentof a variable À to value fB¿�ÀLÆ is referredto as the antecedentofÀ , g}¿�ÀLÆ . The decisionlevel of eachimplied variable À , h¿�ÀCÆ , is given by thehighestdecisionlevel of thevariablesthatdirectlymakeÐ aunit clause(beforeÀ is assigned).The notation À1¾ifB¿ÁÀCÆ=j/h¿�ÀLÆ/7kg}¿�ÀLÆ is usedto denotethatvariableÀ is assignedvalue fB¿�ÀCÆ with decisionlevel h¿�ÀCÆ andantecedentgf¿ÁÀCÆ .When a variable Û is a decisionvariable,and so with no antecedent,thengf¿�ÛºÆ�¾mlonAp .

For example,to computethedecisionlevel of avariableÀ , implieddueto aunit clauseÐ à , thefollowing formulacanbeapplied:

h ¿ÁÀCÆ�¾ % äiÀ�Î�h¿�&iÆ�7H¿�& . ÐKàwÆrq�¿�&ts¾ ÀCÆ�ÓObserve that theunit clauseÐKà becomessatisfiedassoonas À is assigneditsimplied value fB¿�ÀLÆ . Moreover, observe thatdecisionlevels,althoughstrictlynot necessaryfor implementingthe techniquesdescribedbelow, significantlysimplify theprocessof explainingthosetechniques.

ìîíðï�~ðï�í�ïwì % ö �P÷àôðóüòÙó'%âõPòÕ UúGû#�At thecoreof mosttechniquesfor pruningthesearchspaceis clauserecord-

ing, which hasbecomeoneof the mostoften utilized techniquesin state-of-the-artSAT solvers[33,5, 47,35]. Nevertheless,it is importantto observethatclauserecording(also known as nogoodrecording) hasbeena widely usedtechniquein differentareasof Artificial Intelligence[38]. Clauserecordingentails techniquesfor addingnew clausesto the CNF formula that explainidentified conflicting conditionsor help prevent future potential conflictingconditions.For SAT, a formal explanationof onepossibleapproachto clauserecordingduringbacktracksearchis describedin [33]. In this, asin otherap-proaches,thebasicideasupportingclauserecordingis to identify a sufficientsetof causesfor a givenconflictingconditionto takeplaceduringsearch.

Page 21: uyUv - University of Southampton

�Ï����ÖU×wØ����Ù}| uwñwx

uUuuUuuUuvUvvUvvUv

wUwwUwwUwxUxxUxxUx yUyyUyyUyzUzzUzzUz{U{U{{U{U{{U{U{|U||U||U|

}U}U}}U}U}}U}U}~U~~U~~U~�U�U��U�U��U�U��U��U��U�������

d = 1

e = 1

b = 1

c = 0

conflict

f = 0a = 0

�� �!�������������G�Exampleof clauserecording.

Considerthefollowing exampleCNF formula:

½�¾�¿�äºÃ"æÇÆKåi¿�Ä�æ�Ã�9�Ã�e�Æêå�¿�Ä�æ5ÃÖ�UÆêåë¿ÁÄEe Ã"Ä �}Ã"É�ÆBåÌåUåMoreover assumethesequenceof decisionassignments9�¾ 0 and É�¾ 0 .

In this case,theorderof decisionsis 9è¾ 0 first (hence,9è¾ 0Jj$Ô/7�lonAp ),and É�¾ 0 next (hence, É�¾ 0�j çü76l�n�p ). Let us further assumea fewotherdecisionassignments,to beusedin thenext section,andfinally assumethedecisionassignmentäF¾�06j��ß7�lonAp . Theobtainedimplicationsequenceresultingin a conflict is shown in Figure12.11.

By inspectionit is straightforwardto concludethat ¿19}¾80wÆ�q ¿ÁÉÚ¾80ÒÆ�qF¿�ä�¾0wÆ�r ¿�½ ¾ 0wÆ . Sincethe objective is to have ½ ¾2Ô , thenoneimmediatelyconcludesthat ½ r ¿�9fÃqɪàä�Æ . Hence ¿19}àɪàäiÆ denotesa new clausethat can be addedto the CNF formula (i.e. it canbe recorded). Moreover,¿19�àɼàäiÆ canbe viewedasan explanationof this conflict, andsoenablesavoiding thesameconflict to occuragainduringthesearch.

As theexampleillustrates,relevantassignmentsaresplit into assignmentsatthecurrentdecisionlevel andassignmentsat lower, i.e. earlier, decisionlevels.Assignmentsat lowerdecisionlevelsarerecorded,whereasassignmentsat thecurrentdecisionlevel areusedto tracethecausesof theconflict to thedecisionassignment.Theresultingsetof assignments(all at lower decisionlevelswiththe exceptionof the decisionvariable)are usedto specify the clauseto berecorded[33].

In generalit is not feasibleto recordthe explanationsfor all conflictingconditionsidentifiedduringthesearch.As aresult,it isoftenthecasethatlargeclauseswith a numberof literals above a certainsizeareeventuallydeletedduringthesubsequentsearch[33]. Largeclausescanbedeletedwhenever theybecomeunresolvedduringthesubsequentsearch.

Thereis no equivalent developmentto clauserecordingin the ATPG do-main. The mostrelatedconceptsareprobablythe techniquesin [17, 15] thatusethenotionof anE-frontierin netlist-basedATPGwith thegoalof capturingequivalentanddominantstatesduringthesearchprocess.Therecordedinfor-

Page 22: uyUv - University of Southampton

uwuwv z�{}|5~W���B���������w~������]�-���B�]~��B~��C���L~W{B�

�U�U��U�U��U�U��U�U��U�U��U�U� �U�U��U�U��U�U��U�U��U�U��U�U� �U��U��U��U��U��U� �U��U��U��U�

�U��U��U�U��U�U��U�U��U��U��U�

�U�U��U�U��U�U��U�U��U�U��U�U�

�U��U��U��U��U��U�

�U��U��U��U��U��U��U�U��U�U��U�U��U��U��U� ������

c = 0

g = 1 b = 1

f = 0

f = 0

c = 0

d = 1

e = 1

conflicta = 1

�� �!�������������!�Exampleof non-chronologicalbacktracking.

mationis usedto reducetheamountof searchfor thecurrentandsubsequenttargetfaults.

ìîíðï�~ðï�í�ï�í ûßõPû��?%�&Öò×õPûàõäöÂõÕ�Öú�%��Ùö��p��%6 Öù òÕ��%6 Öú�û �Thebacktracksearchprocedure,asdescribedin Section12.4.1,implements

chronological backtracking, wherebacktrackingis alwaysperformedto themostrecentdecisionassignmentwhichhasnotyet beentoggledby apreviousbacktrackstep. In general,for real-world probleminstances,chronologicalbacktrackingcanperformpoorlywhencomparedwith alternative approaches,namelynon-chronologicalbacktracking,wherethesearchalgorithmcanback-trackto decisionassignmentswhicharein factdeemedrelevantfor eachiden-tified conflict.

It is interestingto observe thattheutilization of clauserecording(describedin theprevioussection)providesthenecessaryinformationfor implementingnon-chronologicalbacktracking.Theremainderof this sectionillustratesonepossibleapproachfor implementinga non-chronologicalbacktrackingsearchstrategy. A detailedexplanationof the implementationof non-chronologicalbacktrackingis availablein [33].

In order to illustrate how non-chronologicalbacktrackingcan be imple-mentedassumeanaugmentedversionof theexamplein theprevioussection,

½ ¾ ¿�ä Ã"æÇÆêåë¿ÁÄ�æ�Ã�9�áeiÆKåi¿�Ä�æKà �UÆ�åw¿�ÄEeºÃNÄ �]ÃNÉ�Æ�åw¿�Ä�äºÃ �CÆ5å¿�ÄK�ÜÃNæÇÆ5å�¿ÁÄ ×�ÃÈVÆ5åw¿�Äå�Cã¢Æ�åw¿�äºÃ�9�ÃNÉ�ÆÇÊ

wherethe clauserecordedasa resultof the conflict analyzedin theprevioussectionis alreadyshown. Moreover, assumethedecisionassignments9�¾ 0 ,É�¾ 0 , ×1¾ 0 and �F¾ 0 . The implication sequencethat resultsfrom thisscenariois shown in Figure12.12. Note that thepreviousdecisionvariable äis now implied by the just derived conflict clause ¿�äFä9�Ã�É�Æ , andthat thenew implicationsequenceleadsto anotherconflict. Analysisof this new con-flict readilyyieldsa new clause ¿19]Ã1ÉHÆ , which indicatesthatbacktrackingisrequiredandthat thebacktrackingstepcanbenon-chronological.Thenewlyderivedclause¿19]Ã1ÉHÆ indicatesthat thedecisions×�¾ 0 and �]¾ 0 areirrel-

Page 23: uyUv - University of Southampton

�Ï����ÖU×wØ����Ù}| uwuy

¥U¥U¥¥U¥U¥¥U¥U¥¦U¦¦U¦¦U¦ §U§U§§U§U§§U§U§¨U¨U¨¨U¨U¨¨U¨U¨

©U©©U©©U©ªUªªUªªUª

«U««U««U«¬U¬¬U¬¬U¬

­U­­U­­U­®U®®U®®U® ¯U¯U¯¯U¯U¯¯U¯U¯°U°°U°°U° ±U±±U±±U±²U²²U²

²U²³U³U³³U³U³³U³U³´U´´U´´U´

µUµµUµµUµ¶U¶¶U¶¶U¶·�·�·¸�¸

c = 0

a = 0 b = 1

g = 0

h = 0

f = 0conflict

i = 1

¹»º ¼b½�¾1¿EÀÂÁÄÃÅÀGÃbÃExampleof uniqueimplicationpoint.

evant for the two mostrecentconflicts,andthatbacktrackingto oneof thesetwo decisionassignmentswould not eliminatetheseconflicts. To remove theconflicting conditionsthe backtracksearchalgorithm needsto backtracktooneof thedecisionsindicatedby Æ19ÈÇÊÉÌË . In generalthebacktrackingstepisperformedto themostrecentdecision,in thiscaseÉJÍmÎ .

In ATPGtheutilizationof non-chronologicalbacktrackingsearchstrategieswasinitially outlinedin [29, 30], anddetailedandimplementedin [31]. Inter-estingly, thework of [15, 17] did not utilize non-chronologicalbacktracking,andthework of [29, 30,31] did notconsidersearchequivalenceor dominanceconditions.ÏÑÐÒÔÓÕÒÐÒÅÖ ×ÙØÈÚÛØEÜkÝÙÞ\ßàØ �]á ÝGâHØÈãäÚ�ØåÝæ×ÙÞ çÂÞéèêÝæÞGãêëGÞGçbì/ë Øç=í�îïÚ�çbß6Ýñð6çbò/Þóîoò/ç=ÞGðoâ

Besidesthecreationof conflictclauses,theability to backtracknon-chrono-logically, and the deletionof large clauses,a few additionalsearchpruningtechniqueshavebeenproposedthatalsobuild uponclauserecording.

Relevance-basedlearning[5] consistsof extendingthelife-spanof clauses,by deletingunresolvedrecordedclausesonly aftera certainnumberof literalsbecomesunassigned.We shouldnote that relevance-basedlearningis oftenintegratedwith deletionof largeclauses,andsolargeclausesareonly deletedwhenacertainnumberof literalsbecomesunassigned.

Uniqueimplicationpointsdenotedominators[45] in thegraphof implica-tionsof decisionassignmentswith respectto identifiedconflicts.Uniqueimpli-cationpointsrepresentvariableassignmentswhich,by themselves,cantriggersequencesof implied assignmentsthatyield thesameconflicts. Considerthefollowing CNF formula,

Æ1ôrÇUõ�Ë�ö=Æ1÷Eõ_ÇUø�ÇU÷�ùÕË_ö=Æ1÷Eõ_ÇQ÷EúûË_ö]Æ�ù+ÇQúEÇUüAË_ö=Æ1÷Eü�ÇUý�Ë_ö=Æ1÷Eü�ÇUþVË_ö=Æ1÷EýrÇU÷Eþ»ÇQÉÌËand the sequenceof decisionassignmentsø8ÍÿÎ , É ÍÿÎ and ô Í�Î . Theresultingimpliedassignmentsareshown in Figure12.13.Theclauserecordingprocedureoutlinedin section12.5.2.1wouldidentify thenew clauseÆ1ô»ÇÙøVÇÙÉ Ë .However, noting that the implied assignmentü6Í � yields by itself the same

Page 24: uyUv - University of Southampton

����� ����� ������������������������ �!��"�$#�%�&�'�( ���

conflict,onecancreateinsteadtwo clauses,namely Æ1÷Eü»Ç¡ÉÌË and Æ�ô�Ç£ø�Ç£üAË .After erasingthe most recentsequenceof implied assignmentsanddecisionassignmentÆ�ô Í�Î Ë , a new unit clauseis identified Æ1÷EüÌÇ¡ÉÌË andtheresultingimpliedassignmentsinclude ürÍmÎ and ôæÍ � , thatresultfrom thetwo recordedclauses.Observe thattheoriginal procedurewouldonly imply ôæÍ � from thesolerecordedclause.

)�*�+$,�+.- /103254�68796�:<;5=>;@? 034BAC25;5=ED1:F4BGThebacktracksearchprocedurecanbeaugmentedwith differenttechniques

describedin previous sections,namely resolution,AND/OR reasoningandvariableprobing[32]. The integrationof thesetechniqueswith othersearchpruning techniquesusedin backtracksearchis technicallychallenging,be-causeeachderivednecessaryassignmentmustbeexplainedin termsof newlyaddedclauses. Interestingly, the identificationof explanationsfor the nec-essaryassignmentsidentifiedwith resolution,AND/OR reasoning(recursivelearning)andvariableprobing(Stalmarck’s method),providesanothermech-anismfor clauserecording,andconsequentlyallowsestablishingnew pruningtechniquesthatdiffer fundamentally(duetoclauserecording)from theoriginalones.

Recentwork in SAT hasinvolved formula simplification techniques[34]andsearchstrategiesbasedon randomizationwith restarts[19, 4]. Formulasimplificationestablishesconditionsfor removing variablesandinferring newclauses.Randomizationwith restartsallows thesearchprocessto consideral-ternative searchpathsaftera pre-determinednumberof backtracksis reached.

)�*�+$,�+.H IJ6LKM;@AC25=>;@? 254�:<6L=�G�03=EAJGÏÑÐÒÔÓÕÒONHÒ

ÏâÕØåÝæ×Ùß'PêîÛÝkðQPéâ8ç=ÞêÝñð6îoè

Theperformanceof testgeneratorscanbegreatlyinfluencedby theuseofbacktracing proceduresashasbeenshown in the FAN-algorithm[16]. Theirgoalis to effectivelydrivethetestgenerationprocesstowardscertainobjectives[16]. The objectivesresult from the generalstrategy to move the D-frontiertowardstheprimaryoutputsandtheJ-frontiertowardstheprimaryinputs.

In [16] an objective is definedas a triple Æ1É(R S(T�Æ1ÉÌËUR SWVdÆ�É ËÂË where É is asignal in the Booleannetwork, S T Æ1ÉÌË is an integer numberexpressinghowstrongly the logic value 0 is requiredat É and S V Æ1ÉÌË is an integer numberexpressinghow stronglythelogic value1 is requiredat É . Theinitial objectivesarederivedfromthesignalsin theJ-andD-frontierandoftenexploit testabilitymeasures, seee.g. [1]. Backtrackingmeansthat theseinitial objectivesarepropagatedbackwardsin thecircuit accordingto simplerules.A few examplesareshown in Figure12.14.

Page 25: uyUv - University of Southampton

�X�'��ÖU×�YZ�'��[� �����

\

\] ^

_a`�babdcfehgXi jlkmidn�o prq(sutwvyxzsu{a| t}sa~ ~ �m�d~ vX| �l�m{����z���z�u�w�a� �l�� ���h�u�(� � �$� � ���d� � � � � �&�z�$�w�a�}�u�� ���$��� �m u¡ ¢£ ¤�¥$¦�§ ¨�©uª «¬ ­m®$¯.° ±.²m³

´µ ¶�· ¸h¹$º�» ¼m½u¾ ¿À Á�Â$Ã�Ä Å�ÆuÇ ÈÉ ÊmËuÌ�ÍmÎuÏ Ð

ÑÒCÓ ÔhÕ$Ö�× ØmÙuÚ ÛÜ ÝzÞ$ßUà ámâXã ä

å æmç$è.éuê�ëíì îmïuð.ñ�òXó ô

¹»º ¼b½�¾1¿EÀÂÁÄÃÅÀ�õ�ÃBackpropagationof objectivesin FAN.

The main goal of backtracingis the early identificationof conflicts. If afanoutpoint É is reachedwith contradictoryrequirements,i.e., S(T�Æ1ÉÌË'ö£Î andS V Æ�É Ë÷ö � , the backtracingprocessstopsandan optionalvalueassignmentis madeat É , i.e., a decisionis madeat at this fanout point and insertedinthedecisiontree.If no conflict occursbacktracingcontinuesuntil theprimaryinputsarereachedandthe numbersS(T�Æ1ÉÌË and SWV�Æ1ÉÌË indicatewhatvalueas-signmentshouldbemadeto reachtheobjectivesof thetestgenerationprocess.Importantly, aslong asbacktracingproducesfanoutpointswith contradictoryrequirementsthesearealwayschosenfirst for decisionmakingsothatconflictsaredetectedasearlyaspossibleandbacktracksareavoided.An improvementto thisschemebasedon singlepathbacktracinghasrecentlybeenproposedin[22].

Note that this is relatedto the generalstrategy of selectingthe non-unatevariablesin two-level circuit representationsasdecisionpoints in SAT solv-ing or tautologychecking. If we formulatedthe objectives of a FAN-basedtestgenerationprocedureby a Booleanfunction to be satisfied,the conflict-ing variableswould correspondto non-unatevariablesof this characteristicfunction. This explainswhy backtracingis very important. It is thebasicin-strumentto incorporatea strategy alsoknown asunaterecursiveparadigm[6]into a Booleandecisionmaking procedureoperatingon multi-level Booleannetworks.Therefore,backtraceproceduresrepresentanintegralpartof almostall modernATPGtools.

Theabovebacktracebranchingheuristicsareessentiallybasedonthecircuitstructureandtry to generateearlyconflictsby focusingonthefault justificationand propagationpaths. In contrastto this, sinceCNF basedSAT doesnothave structuralinformation, its branchingproceduresmust rely on differentheuristicsbasedon thedistributionof literalsin theclauses.

Page 26: uyUv - University of Southampton

���>ø ����� ������������������������ �!��"�$#�%�&�'�( ���ÏÑÐÒÔÓÕÒONHÒ

Ð á ×ÙÝæÞ\ßùPGç=Þ\èúPGØÈëG×ÙçbâHð6çbßoâ ç=Þäß6ÞüûWýÄâHÝñðOneof themostimportantbut leastunderstoodaspectsof SAT algorithmsis

how to choosethenext decisionvariableat eachbranchingpoint. Variousau-thors[28,23,8,13] haveexperimentedwith many differentbranchingschemeswith differentdegreesof success.Gomeset al. provide anexcellentreview ofthissubject[20].

Despitetheeffort spenton decisionschemes,it is still unknown whatprop-ertiesmakea particulardecisionschemebetterthanothers.Currentdecisionschemesaremostly basedon intuition andempiricalresults.Usually, a gooddecisionschemefor a certainclassof problemsmay not be goodfor others.Thus,it is very hardto determinewhich decisionschemeshouldbeusedfor acertainclassof problems.

Traditionaldecisionschemesgenerallyemphasizethe quality of the deci-sion,e.g.,minimizationof thetotalnumberof decisionsrequiredto solve cer-tain problems.Although the numberof decisionsis a straightforwardmetricto comparedifferentstrategies– fewer decisionsoughtto meansmarterdeci-sions– it is not theonly metric,sincenot all decisionsyield anequalnumberof BCP operations.As a result,a shortersequenceof decisionsmayactuallylead to moreBCP operationsthana longersequenceof decisions. Besides,traditionaldecisionschemesusuallyinvolve updatingsomestatisticsdynam-ically, andthusarecomputationallyexpensive. As thedeductionprocessbe-comesmoreandmoreoptimized,thetime spenton decisionmakingin a SATsolverbecomesnon-negligible. Therefore,it is importantto keepthedecision-makingoverheadtoaminimum,while maintainingthequalityof thebranchingheuristic.RecentlyChaff hasintroducedavery low overheaddecisionschemereferredto asvariablestateindependentdecisionstrategy (VSIDS) [35]. Theemphasishereis onminimizingcomputationoverheadfor decisionstatemain-tenancein changeof variablestateduringbranchingandbacktracking.

þ�ÿ���� ������� ��� ������������ ����������Algorithmsfor ATPGandSAT areespeciallysensitive to variationsin im-

plementation- particularly to the basicdatastructuresused. Netlist basedATPGtoolsareusuallybuilt on ad-hocdatastructures.They candirectly ex-ploit thephysicalandstructuralinformationrepresentedin thenetlist. On theother hand, the logic operationsneededare usually more complex than forCNF-basedtools. In contrast,in a CNF-basedframework it is moredifficultto exploit structuralcircuit information,however, highly efficient datastruc-tureshave beenproposedfor BCPandconflict analysis.In thefollowing, wedescribesomeof thesedatastructures.

Page 27: uyUv - University of Southampton

�X�'��ÖU×�YZ�'��[� �����)�*�+! �+�) A#" KJ: G�4%$ K�0ZKMI�KFG�4 G�0�/16MK ?<4ÏÑÐÒ'&ÕÒÏÒÏ

âHîÛÝæ×GâHØ£í�Ýkðï×æç)(ó×ÙØÈî6×ÙØñâHØÈÞGðÛÝñð6çbò ÞThe simplestandcurrentlymostwidely useddatastructureis to represent

the clausesin a sparsematrix. Eachclausestoresa vectorof the literals init, andsomestatisticaldata,e.g., the numberof total literals, the numberoffree literals, etc. Eachvariablemay keepa list of all its occurrences(as inGRASP[33]) or someof its occurrence(asin SATO [47] or Chaff [35]) in theclausedatabase.

*,+.-0/2143�5,6872943�:<;=*?>�@ThemoststraightforwardBCPmethodoperating

onasparsematrixclausedatabaseis to keepthreecountersfor eachclause:thetotal numberof literals,thenumberof literalsevaluatingto 1, andthenumberof literalsevaluatingto0. Thefirst counterisconstantduringtheentirelifetimeof theclause.Theothertwocountersareupdatedwhenevertherelatedvariableis set/unsetto avalue.Thestatusof aclause- conflict,satisfiedor unit - canbedeterminedby thesethreecounters(e.g.,GRASP[33] ). An efficientvariationof thismethodeliminatestheneedto storethenumberof literalsthatevaluateto 1 ( e.g.,relsat[5] ).

>�+BAC/2143D5E6.729F3D:G;�*�>H@A moreefficient way to implementtheBCPop-

erationis proposedby SATO [46]. Althoughthedatastructurein SATO is alsobasedon sparsematrices,it determinesthestatusof theclausesin a differentway. Eachclausehastwo pointers:HeadandTail to point to its first andlastunassignedliterals. Insteadof keepingtrack of all the literal occurrences-for eachvariable,the HeadList is a collectionof its occurrencesasthe firstunassignedliteral in theclauses,andtheTail List is a collectionof its occur-rencesasthelastunassignedliteral in theclauses.Startingfrom avariable,oneneedsto only visit theclausesthathave this variableastheir Head/Tail. Unitclausesandconflict clausesaredetectedby examiningtherelative positionsoftheHeadandTail pointerof theclauses.

The key advantageof this algorithm is that whenever a variablechangesstate,only the clausesin the Head/Tail list for this variablewill be visited.Whenwe move the Head/Tail literals, it is possiblethat we will encounteravalue1 literal very early if the clauseis satisfied.Whenever a searchfor thenext Head or Tail encountersa literal with value 1, the Head or Tail of theclausewill stopto beactive, thuseliminatingtheneedto updatethestatusoftheclausein thefuture.

Chaff [35] proposesanevenmoreefficient implementationof theBCPpro-cedurethanthatusedin SATO. Chaff ’sBCPis basedontheobservationthatifaclausehasmorethan1 unassignedliteral, it canbeneitheraunit clausenoraconflictclause.In Chaff, for eachclausetwo literalsarebeing“watched”.The

Page 28: uyUv - University of Southampton

����I ����� ������������������������ �!��"�$#�%�&�'�( ���

“watched”literalshave thepropertyof beingthelastto beassignedto value0if theclauseis notsatisfied.Eachvariableonly keepsalist of all its “watched”literals. In practice,the“watched”literalsof thetwo differentphases(comple-mentedanduncomplemented)arekeptin separatearrays.Wheneveravariablebecomesassigned,Chaff traversesthroughall the “watched” literals of thisvariableevaluatingto 0.

Chaff ’s BCP algorithmhasall theadvantagesof SATO’s algorithmduringthedeductionprocedure.Moreover, duringbacktracking,undoingassignmentsdoesnot requirea changein the statesof the clauses,i.e. thereis no needtochangethe “watched” literals. The reasonis that the “watched” literals havethepropertyof beingthelastto beassignedvalue0 if theclauseis notsatisfied,therefore,they will bethefirst to becomeunassignedif theclauseis freeagain.Therefore,un-assigningvariableassignmentsin backtrackingis very cheap.This is avery significantperformanceadvantage.ÏÑÐÒ'&ÕÒÏÒÐ

ç=í�î6ÚÛçbßàçÂð¤ãÙÝkðÛÝ âHð6×/ë\ßàð6ëG×ÙØñâBesidesthe sparsematrix clausedatabaserepresentation,thereare some

otherdatastructuresthat have beenproposedin the literaturefor storingtheclauses.

A versionof SATO usesa datastructurecalleda trie to storethe clausedatabase.A trie is a ternarytree. Eachinternalnodein the trie structureis avariableindex, andits threeleaf edgesarelabeledPos,Neg andDC respec-tively for positive, negative anddon’t care.A leaf nodein a trie is eitherTrueor False.Eachpathfrom root of the trie to a True leaf representsa clause.Atrie is saidto beorderedif for every internalnodeV, Parent(V)hasa smallervariableindex thanthe index of variableV. Theorderedtrie structurehasthenicepropertyof beingableto detectduplicateandtail subsumedclausesof adatabasequickly. A clauseis saidto betail subsumedby anotherclauseif itsfirst portionof theliterals(aprefix) is alsoaclausein theclausedatabase.Forexample, Æ1ôoÇ�õEÇ�ø�Ë is tail subsumedby Æ1ôoÇ�õ�Ë .

Intuitively an orderedtrie hassomesimilarity with binary decisiondia-grams,i.e. easysharingof commonparts. This hasnaturally led to the ex-plorationof otherdecisiondiagramstylesetrepresentations.Chatalic[10] andAloul [3] have bothexperimentedwith usingzero-suppressedbinary decisiondiagrams(ZBDD) to representthe clausedatabase.A ZBDD representationof theclausedatabasecandetectnot only tail subsumptionbut alsoheadsub-sumption.Both authorsreportsignificantcompressionof theclausedatabasefor certainclassesof problems.

It is unclearif theirredundancy advantagesof thetrie andZBDD datastruc-turearesufficient to justify theadditionalmaintenanceoverheadof thesedatastructurescomparedto thesparsematrix representation.

Page 29: uyUv - University of Southampton

�X�'��ÖU×�YZ�'��[� ����J

KMLK

NN L

ON LK�L

NOPL

KQSRUTUV W�QYX[Z]\!^ QY_U`badc�egf h�ikj lYm[n�oYm[p]q!r oYs�t'ldu�vgwxvDy

¹»º ¼b½�¾"¿ À=ÁbÃÔÀdzÂÃImplicationgraphfor clauseswith two andthreeliterals.

)�*�+! �+$* ?<6MKM7B2 $1K 0ZK G�036J: AC03:F6M4BG|{Z/ 6 I AC7In the context of CNF-basedATPG algorithmsimplication graphs[9, 44]

have beenproposedasspecificdatastructuresfor efficient implementationsof implication techniques.The implication graphof [44] is a directedgraph},~ ÍäÆP�R��GË wherethevertex setis partitionedinto a setof signalnodes���anda setof � -nodes�B� . Signalnodesrepresenttheencodingbits of a signal� . For simplicity, we assumea three-valuedlogic alphabet��Î�R � R���� . In thiscase,for eachclausevariable � two nodes,� and ��� areintroducedin

} ~. If

we assignin thecircuit � Í � or � Í Î thenin} ~

node � or ��� , respectively,is saidto be set. Each S -ary clausein thecharacteristicCNF of thecircuit isrepresentedby S associated� -nodesin

} ~and SB� edgesconnectingthe � -

nodeswith thesignalnodesfor theclausevariables.Theimplicationgraphforabinaryandternaryclauseareshown in Figure12.15.

Direct implicationscanbeperformedin} ~

by settingsignalnodesaccord-ing to thefollowing rule:

Startingfrom aninitial setof setsignalnodes,all immediatesuccessornodes��� aresetif node ��� is an � -nodeandall its immediatepredecessorsareset,orif node ��� is asignalnodeandat leastoneimmediatepredecessoris set.

This rule is appliedrepeatedlyuntil no additionalnodecanbeset. A logicinconsistency occursif thereis a signal � in thegraphsuchthatboth � and � �areset.

The simplicity of the above implication rule facilitatesan efficient encod-ing of logic alphabetsanda fastbit-parallelimplementationof theimplicationengine.In [44] a reconvergenceanalysisis proposedto identify indirectimpli-cationsandit is shown how AND/OR-reasoningcanberealizedefficiently onthisdatastructure.

Page 30: uyUv - University of Southampton

����� ����� ������������������������ �!��"�$#�%�&�'�( ���þ�ÿ���� ���������������<����� �G�������<���g�����������

���� � �� �¢¡��� �£�Thefirst completemethodto generatetestvectorsfor singlestuck-atfaults

was the famousD-algorithm proposedby Roth [37]. Goel [18] formulatedtestgenerationasbacktracksearchfor theinput variablesof thecircuit. In histestgeneratorPODEMheintroducedthegeneralATPGprocedureaswasdis-cussedin Section12.3.Importantrefinementsto thisprocedurewereproposedby FujiwaraandShimono[16]. Their ATPGtool FAN wasthefirst to incor-poratea sophisticatedbacktracingprocedureaswell asuniquesensitization.Anothersignificantstepwasmadein SOCRATES[39] whereit wasshown bySchulzet al. thattheATPGprocesscangreatlybenefitfrom theidentificationof indirectimplications.

With respectto the SAT domain,the first algorithm was the well-knownDavis-Putnamprocedure[12], which is basedon the applicationof iteratedresolution. Shortly afterwards,the first backtracksearchalgorithmwaspro-posed[11], whichiscommonlyknownastheDavis-Logemann-Loveland(DLL)procedure.Recentyearshave seensignificantsimprovementsbeingmadetothe basicDLL procedure,with the introductionof non-chronologicalback-tracking,clauserecordingandseveralotherveryeffectivesearchpruningtech-niques[33, 5]. More recently, theimplementationof efficientSAT solvershasbeensubjectto key improvements[35].

Onemayexpectthat furtherprogressin theareaof SAT andATPGis veryhardafterdecadesof research.However, innovationcould resultparticularlyfrom combinationsof searchpruningtechniquesthathave sofar beenconsid-eredindependentlyfrom eachother. As alreadypointedout in Section12.5.3,theconceptof clauserecordingthathasbeenappliedin backtracksearchandAND/OR reasoningcouldbeextendedto otherreasoningschemeslike resolu-tion or variableprobing,or even approachesusinga mix of backtracksearchandreasoningschemes.

ATPG andSAT continuouslyconquernew applicationdomains. Specificapplicationsrequirespecificheuristics. As an example,SAT-basedpropertycheckingrecentlybecameanintensive field of researchandit is a challengingtaskto adaptSAT algorithmsto traversingsequentialcircuits. Therefore,aswith SAT andcombinationalATPG today, in the nearfuture, we may seeaunificationprocessof SAT andsequentialATPG,promisingnot only aunifiedterminologybut alsosubstantiallymorepowerful tools.

�¥¤8¦�¤�§�¤.¨�©.¤.ª

[1] M. Abramovici, M. Breuer, andA. Friedman,Digital SystemsTestingandTestableDe-sign. ComputerSciencePress,New York, 1990.

Page 31: uyUv - University of Southampton

"���# ��"����Z�&��� ����«[2] S. Akers, “A logic systemfor fault test generation,” IEEE Trans. on Comp., vol. 25,

pp.620–630,June1976.

[3] F. A. Aloul andK. A. Sakallah,“SAT usingZBDDs,” in DagstuhlSeminar01051onComputerAidedDesignandTest– BDDsversusSAT, SchlossDagstuhl,Germany, Jan28-Feb2 2001.

[4] L. Baptistaand J. P. Marques-Silva, “Using randomizationand learningto solve hardreal-worldinstancesof satisfiability,” in Proc. Intl. Conf. on Principlesand PracticeofConstraint Programming, September2000.

[5] R. BayardoJr. andR. Schrag,“Using CSPlook-backtechniquesto solve real-worldSATinstances,” in Proc.Natl. Conf. on Artificial Intelligence, pp.203–208,1997.

[6] R. K. Brayton,G. D. Hachtel,C. T. McMullen,andA. L. Sangiovanni-Vincentelli,LogicMinimizationAlgorithmsfor VLSISynthesis. Kluwer AcademicPublishers,1984.

[7] F. Brown, BooleanReasoning– The Logic of BooleanEquations. Kluwer AcademicPublishers,1990.

[8] M. Buro and H. Kleine-Buning,“Report on a SAT competition,” in Technical report,Universityof Paderborn, 1992.

[9] S.Chakradhar, V. D. Agrawal, andS.Rothweiler, “A transitiveclosurealgorithmfor testgeneration,” IEEETrans.on CAD, vol. 12,pp.1015–1028,July1993.

[10] L. S. P. Chatalic,“Multi-resolution on compressedsetof clauses,” in Proc. SAT 2000,Third WorkshopontheSatisfiabilityProblem, 2000.

[11] M. Davis, G. Logemann,andD. Loveland,“A machineprogramfor theorem-proving,”CommunicationsACM, vol. 5, pp.394–397,July1962.

[12] M. Davis andH. Putnam,“A computingprocedurefor quantificationtheory,” Journal oftheAssociationfor ComputingMachinery, vol. 7, pp.201–215,1960.

[13] J.W. Freeman,“Improvementsto propositionalsatisfiabilitysearchalgorithms,” in PhDthesis,Universityof Pennsylvania, 1995.

[14] K. Fuchs,F. Fink, andM. Schulz,“Dynamite:An efficient automatictestpatterngenera-tion systemfor pathdelayfaults,” IEEETrans.onCAD, vol. 10,pp.1323–1335,October1991.

[15] T. Fujino andH. Fujiwara,“An efficient testgenerationalgorithmbasedon searchstatedominance,” in Proc. Intl. Symposiumon Fault-TolerantComp., pp.246–253,1992.

[16] H. FujiwaraandT. Shimono,“On theaccelerationof testgenerationalgorithms,” IEEETrans.onComp., 1983.

[17] J. Giraldi andM. Bushnell,“Searchstateequivalencefor redundancy identificationandtestgeneration,” in Proc. Intl. TestConference, pp.184–193,1991.

[18] P. Goel, “An implicit enumerationalgorithm to generatetestsfor combinationallogiccircuits,” IEEETrans.on Comp., vol. C-30,pp.215–222,March1981.

[19] C. P. Gomes,B. Selman,andH. Kautz,“Boostingcombinatorialsearchthroughrandom-ization,” in Proc.Natl. Conf. onArtificial Intelligence, July 1998.

[20] C. P. Gomes,B. Selman,N. Crato,andH. Kautz,“Heavy-tailed phenomenain satisfia-bility andconstraintsatisfactionproblems,” in Journalof AutomatedReasoning, 1999.

[21] J. GrooteandJ. Warners,“The propositionalformula checkerheerhugo,” in SAT 2000(I. Gent,H. vanMaaren,andT. Walsh,eds.),pp.261–281,IOSPress,2000.

[22] I. HamazaogluandJ.H. Patel,“New techniquesfor deterministictestpatterngeneration,”Journal of Electronic Testing, 1999.

Page 32: uyUv - University of Southampton

�>ø]¬ ����� ������������������������ �!��"�$#�%�&�'�( ���

[23] R. Jeroslow andJ. Wang,“Solving propositionalsatisfiabilityproblems,” in AnnalsofMathematicsandAI, pp.167–187,1990.

[24] T. Kirkland andR. Mercer, “A topologicalsearchalgorithmfor ATPG,” in Proc.DesignAutomationConference, vol. 24,pp.502–508,1987.

[25] W. Kunz andD. Pradhan,“Recursive learning:An attractive alternative to thedecisiontree for testgenerationin digital circuits,” in Proc. Intl TestConference, pp. 816–825,September1992.

[26] W. KunzandD. Stoffel, Reasoningin BooleanNetworks- LogicSynthesisandVerifica-tion UsingTestingTechniques. Boston:Kluwer AcademicPublishers,1997.

[27] T. Larrabee,“Efficientgenerationof testpatternsusingBooleandifference,” in Proc.Intl.TestConference, pp.795–801,1989.

[28] C.-M. Li andAnbulagan,“Heuristicsbasedon unit propagationfor satisfiabilityprob-lems,” in Proc.15thInternationalJoint Conferenceon Artificial Intelligence(IJCAI’97),pp.366–371,MorganKaufmannPublishers,ISBN 1-55860-480-4,1997.

[29] S. Mallela andS. Wu, “A sequentialcircuit testgenerationsystem,” in Proc. Intl. TestConf., pp.57–61,1985.

[30] R. Marlett, “An effective testgenerationsystemfor sequentialcircuits,” in Proc. DesignAutomationConf., pp.250–256,1986.

[31] J. P. Marques-Silva andK. A. Sakallah,“Dynamic search-spacepruningtechniquesinpathsensitization,” in Proc.DesignAutomationConf., pp.705–711,June1994.

[32] J. P. Marques-Silva andT. Glass,“Combinationalequivalencecheckingusingsatisfia-bility and recursive learning,” in Proc. Design,Automationand Test in Europe Conf.,pp.145–149,March1999.

[33] J. P. Marques-Silva andK. A. Sakallah,“GRASP-A searchalgorithmfor propositionalsatisfiability,” IEEE Trans.on Comp., vol. 48,pp.506–521,May 1999.

[34] J.P. Marques-Silva, “Algebraicsimplificationtechniquesfor propositionalsatisfiability,”in Proc. Intl. Conf. on Principlesand Practiceof Constraint Programming, September2000.

[35] M. Moskewicz, C. Madigan,Y. Zhao,L. Zhang,andS.Malik, “EngineeringanefficientSAT solver,” in Proc.DesignAutomationConf., 2001.

[36] E. Rich,Artificial Intelligence. McGraw-Hill, 1983.

[37] J. P. Roth, “Diagnosisof automatafailures:A calculusanda method,” IBM Journal ofResearch andDevelopment, vol. 10,pp.278–291,July1966.

[38] S. J. RussellandP. Norvig, Artificial Intelligence:A ModernApproach. Prentice-Hall,1995.

[39] M. Schulz,E. Trischler, andT. Sarfert,“SOCRATES: A highly efficient automatictestpatterngenerationsystem,” in Proc. Intl. TestConference, pp.1016–1026,1987.

[40] M. SchulzandE. Auth, “Improveddeterministictestpatterngenerationwith applicationsto redundancy identification,” IEEETrans.on CAD, vol. 8, pp.811–816,July1989.

[41] B. SelmanandH. Kautz,“Domain-independentextensionsto GSAT: Solvinglargestruc-turedsatisfiabilityproblems,” in Proc.Intl. Joint Conf. onArtificial Intelligence, pp.290–295,1993.

[42] G.Stalmarck,“A systemfor determiningpropositionallogic theoremsby applyingvaluesandrulesto triplets thataregeneratedfrom a formula,” 1989. SwedishPatent467076,US Patent5 276897,EuropeanPatent0 403454.

Page 33: uyUv - University of Southampton

"���# ��"����Z�&��� �>ø2­[43] P. Stephan,R. Brayton,andA. Sangiovanni-Vincentelli,“Combinationaltestgeneration

usingsatisfiability,” IEEETrans.on CAD, 1996.

[44] P. Tafertshofer, A. Ganz,and K. Antreich, “Igraine - an implication graphbaseden-gine for fast implication, justification,andpropagation,” IEEE Trans.on CAD, vol. 19,pp.907–927,August2000.

[45] R. E. Tarjan,“Depth-firstsearchandlineargraphalgorithms,” SIAMJournalonComput-ing, 1972.

[46] H. ZhangandM. Stickel,“ImplementingDavis-Putnam’s method,” in Technical Report,TheUniversityof Iowa, 1994.

[47] H. Zhang,“SATO: An efficient propositionalprover,” in Proc. Intl. Conf. on AutomatedDeduction, pp.272–275,July 1997.