CesareTinelli
DepartmentofComputerS ien e,UniversityofIowa,USA
tinelli s.uiowa.edu
Abstra t. Wepresentageneral framework, DPLL(T),for integrating
de isionpro eduresintothe DPLLmethod.Whileitsmainmotivation
isprodu ingfastsolversforthesatisabilityofgroundformulasinrst-
ordertheorieswithde idableground onsequen es,theframeworkisalso
usefulinthe propositional ase. SATproblems an oftenbe onverted
into satisability problems modulo a theory T for whi h faster SAT
methodsthanDPLLareknown.Weshowhowone anuseDPLL(T)to
takeadvantageofthisfa tanda hievebetterperforman e.
1 Introdu tion
Weareinterestedintheproblemofbuildingde isionpro eduresforthesatisa-
bilityofgroundformulasina ertainlogi altheoryT ofinterest.Thesede ision
pro edures have appli ations in various areas of omputer s ien e, in luding
software/hardwareveri ation, ompileroptimization,andplanning.
Theresear hinthiseldusually on entratesonpro eduresforthesatisa-
bilityof onjun tionsofgroundliteralsonly,withthejusti ationthatintheory
this is enoughto de idethe satisability ofarbitrary Boolean ombinations of
groundliterals. Infa t,it suÆ esto onvert thearbitrarygroundformula into
disjun tivenormalform,andthen he kthesatisabilityof ea hdisjun t until
asatisableoneisfound.This viewisunsatisfa toryin pra ti eforallbut the
simplestinputformulasbe auseoftheexponentialexplosiontypi allyprodu ed
by the onversion in disjun tive normal form. The orresponding method for
propositionalsatisability(SAT)haslongbeenknowntobeimpra ti al.Other
methodsforSAThavebeendevelopedthathavebetterperforman einpra ti e.
OneofthebestSATmethods,whi hwewillrefertoastheDPLLmethod,is
basedonapro edureforgroundsatisabilitybyDavis,Putnam,Logemannand
Loveland [3,2℄. The last years have seenan explosion of resear h on the SAT
problemingeneralandtheDPLLmethodinparti ular,leadingtoDPLL-based
SAT solversofgreat speed.A naturalresear h questionis howto apitalizeon
theresear honpropositionalsatisabilityanduseittoprodu eeÆ ientde ision
pro eduresforgroundsatisabilityin atheoryT.
In [7℄ we propose a framework that allows a tight integration of de ision
pro edures into the DPLL method. This framework is similar in spirit to the
CLP(X)s heme.WhereCLP(X)providesageneralwaytointegrate onstraint
solversintoalogi programmingengine,ourframeworkprovidesageneralway
dened de larativelyasasequent al ulus, alledDPLL(T),parametrizedbya
ba kgroundtheory T equippedwithade isionpro edureforthesatisabilityin
T of sets ofgroundliterals. Themain onje turebehindthe al ulusisthat it
anserveasabasisforbuildingeÆ ientsatisabilitysolversforagiventheory
T.TheeÆ ien y should omefromtheliftingtoDPLL(T)ofanumberofvery
ee tivederivationstrategiesandheuristi sdevelopedfortheDPLL method.
To prove the usefulness of DPLL(T) one has to address both theoreti al
and pra ti alissues.Theoreti al issuesare dis ussedin [7℄. This paperinstead
presents our initial investigations on the pra ti al viability of systems based
on DPLL(T). After brie y des ribing the DPLL(T) al ulusin Se tion 2, we
dis ussin Se tion3anappli ationofthe al ulustoSATinwhi hinputprob-
lemsarere astassatisabilityproblemsmoduloa(propositional)theory.Some
experimentalresultsthenfollowin Se tion3.1.
Formal Preliminaries. We allan atomi formula, whether propositional or
rst-order, apredi ate.We denotethe empty lauseby andthe omplement
of aliteral l by l .We denote by l_C a lause D su h that l is aliteral of D
and C isthe (possiblyempty) lause obtainedby removinglfrom D.If isa
lauseset,Pred()isthesetofallpredi ateso urringinthe lausesof.Let
' be a senten e, i.e., a losed rst-order formula, a set of senten es and T
atheory, i.e., asatisable set of senten es.The set is (un)satisablein T if
there is a(no) model ofT that satises. Wesay that entails 'in T, and
writej=
T
',ifeverymodelofT thatsatisessatises'aswell.
2 The DPLL(T) Cal ulus
The DPLL method [3,2℄ an be used to de ide the satisability of nite sets
of propositional lauses. In[7℄ wedes ribeasimple al ulus,the DPLL al u-
lus, that aptures in a de larative way the essen eof the DPLL method. The
DPLL(T) al ulusisanextensionofthat al ulusobtainedbyrepla ingpropo-
sitionalsatisabilitywith groundsatisabilityin arst-order theory T. Given
a pro edure for de iding thesatisabilityin T of sets of ground-literals for
somesignature,DPLL(T)de idesthesatisabilityinT ofnitesetsofground
- lauses.
The al ulus, whosederivation rules are givenin Figure1, manipulatesse-
quents of the form ` , where is a nite multiset of -literals and a
nite multiset of - lauses. The intended purpose of the al ulus is to derive
non-deterministi allyasequentoftheform` ;fromaninitialsequent;`
0 ,
where
0
is asetofground lauses tobe he kedforsatisabilityin T.If that
ispossible,then
0
issatisableinT;otherwise,itisnot.Informally,theset,
satisable in T by onstru tion, servesto storein rementallyaset of asserted
literals,i.e.,aset ofliteralsin
0
that must(or an) bealltruein somemodel
ofT for
0
tobesatisableinT.Infa t,when ` ;isderivablefrom; `
0 ,
everymodel of T in whi h allthe literals of are true is also amodel of the
whole .
(subsume)
`;l_C
`
if j=T l (resolve)
`;l_C
`;C
if j=T l
(assert)
`;l
;l`;l if
6j=
T land
6j=
T l
(empty)
`;
`
if 6=;
(split)
`
;p ` ;:p `
if p2Pred();6j=
T
pand6j=
T :p
Fig.1.TherulesoftheDPLL(T) al ulus
See[7℄foradis ussionofthevariousrules.Herewepointoutthatthesplit
ruleistheonlydon't-knownon-deterministi ruleofthe al ulus.Givenasequent
; ` , with anundetermined predi ate p(i.e., one for whi h neither 6j=
T p
nor 6j=
T
:p holds),it letsoneguess whether to ontinue thederivation with
thesequent;p ` orwiththesequent;:p ` .
3 DPLL(T) for SAT
AlthoughDPLL(T)providesa leanandsimpleframeworkfortightlyintegrat-
ingde isionpro eduresintotheDPLLmethod,itisnotguaranteedapriorithat
asystembasedonDPLL(T)willintheend befasterthanasystembuiltusing
alternativebut looserintegration approa hesthat havebeenre entlyproposed
(see, e.g.[4℄).Theee tiveness ofDPLL(T)in pra ti e anonlybe onrmed
empiri ally.Whilethisisourlongtermgoal,wehavestartedwithalessambi-
tious,although nolessinteresting,task:showingthat oursatisabilitymodulo
theoriesapproa h an beee tiveeveninthepropositional ase.
Ourmotivationis that for ertain lassesof propositionalformulasthe sat-
isabilityproblem an bede idedby onsiderably moreeÆ ientmethods than
thegeneri DPLL.Wellknownexamplesofsu h lassesin lude2-CNFformulas,
Horn lauses,equivalen y lauses andxor formulas [1℄,in all ofwhi h satisa-
bility an be de ided in polynomial time. A number of te hniqueshave been
proposedin theliteraturetobuild intheknowledgeofoneofthese lassesinto
aDPLL-basedsystemin orderto improveitsperforman e[5,1,6℄.These te h-
niques,however,arespe i tothe lassinquestion.TheDPLL(T) al ulusby
ontrastprovidesageneralandmodularme hanismfromforbuildinginspe ial
lassesofpropositionalformulas.
Roughly, the ideais the following. Givena set S of propositional formulas
to be he ked forsatisability, usea number ofte hniques to generate from it
twosets S 0
and T su h that (i) S 0
is a lause set, (ii) T (is satisable and) is
in ludedin oneof thosespe ial lassesmention earlierand(iii) S is satisable
iS 0
[T is.Then ompileT onthe yintoaspe ializedde isionpro edurefor
thesatisabilityinT ofsetsofliterals,anduseanimplementationofDPLL(T),
0
3.1 ExperimentalResults
Wehavebuiltaprototypesystemtostudytheee tivenessoftheapproa hjust
ske hed.Theprototype onsistsofaDPLL(T)enginetowhi hone anplugin
twospe ializedmodules:onethat separatesaninputproblemSintothesetsS 0
andT des ribed earlier,and anotherthat ompilesT intoade isionpro edure
forthesatisabilityinT ofliteralsets.The urrentimplementationisequipped
with two su h modules for the lass of Horn lauses (where the rst module
a eptsproblemsinthepopularDIMACSformat).
Thesystem anberunin twomodes:abasi modethat produ esno sepa-
rationoftheinputandhen eemulates thebasi DPLL method,andaseparate
mode inwhi htheinputisseparatedasmentionedabove.Both modesusethe
sameliteralse tionstrategytoimplementthesplitrule.Also,bothofthem an
berunin onjun tionwith asimpleintelligent ba kjumping strategyorwitha
simplelemmalearning strategy. 1
Wepointoutthatour urrentversionsofthese
strategies,while spe i allythoughtfortheDPLL(T) al ulus,donotassume
anyspe i propertiesofthea tualtheoryT orofthe lassitbelongstoo.
Table1 showssomeexperimental results a hieved withour prototypeona
numberof lassi ben hmarksfromtheSAT ommunity.Asthemain olumnsof
thetableindi ate,thesystemwasruninbasi mode,in(plain)separatemode,
in separatemodewithba kjumping,andinseparatemodewithlearning.
Note that, ex ept for afew test sets in the table,the urrentprototype|
written in SML|is not ompetitivewith state of theart SATsolvers|highly
engineered systems usually written in C or C++. The purpose of our experi-
ments, however, wasnot to ompete with those solvers,but to he k whether
ourapproa hprodu essigni antin reasesinperforman ewith respe tto the
basi DPLL method, and whether the usual optimizations of the method an
be applied ee tively to DPLL(T)-based systems. In this respe t, our results
are verypromising. Inallbut twoof thetest sets, simplyseparatingtheinput
problem into its Horn and non-Hornparts boosts performan e, in a ouple of
asesbyseveralordersofmagnitude.Addingba kjumpingalwaysin reasesper-
forman eoverthebasi mode,andisrarelyslowerthantheplainseparatemode.
The resultsare more mixed in the learning ase, but weattribute that to the
somewhatprimitivehandlingoflemmasin the urrentimplementation.
4 Con lusions and Further Work
WehavepresentedDPLL(T),a al ulusforintegratingintotheDPLLmethod
de ision pro edures for ground satisability in ertain rst-order theories. We
haveargued that the al ulushas usefulappli ations also at the propositional
level,asit anbeused toin orporateinto theDPLL methodand itsimprove-
mentseÆ ientSATpro eduresfor ertain lassesofformulas.Initialexperimen-
talresults,inwhi hweplugaSATpro edureforHorn lausesintoaprototype
1
Intelligent ba kjumpingand learning refer to two typesof ommonte hniquesfor
improvingtheperforman eofDPLL-basedsystems.See[7℄foradis ussionofthem
DPLL(T) engine, oer eviden e of the viability of this approa h. We plan to
ondu t moreexperimentsinthisdire tion withamorerobustimplementation
oftheengine,inthemaking,andmoreinstan esofspe ializedSATpro edures.
testsetinst. basi separate sep+ba kjump sep+learning
timefail timefail speedup timefail speedup timefailspeedup
ais 4 1,401 2 1 0181834% 1 0172849% 1,028 1 36%
des-r1 8 70 0 8 0 759% 8 0 746% 8 0 744%
at30 100 4 0 2 0 88% 2 0 88% 3 0 73%
par8 10 3 0 1 0 99% 1 0 97% 2 0 50%
ii8 14 6,602 11 8 0 81404% 8 0 82837% 20 0 32777%
ii16 10 6,000 10 2,462 4 144% 148 0 3967% 3,875 4 55%
ii32 17 6,535 10 3,573 5 83% 744 0 779% 3,893 6 68%
ssa 8 2,886 4 1,972 3 46% 1,424 2 103% 1,845 3 56%
morph80 100 166 0 34 0 381% 29 0 479% 60 0 176%
morph81 100 1,500 2 1,214 1 24% 31 0 4757% 2,919 4 -49%
aim50 24 38 0 8 0 380% 5 0 646% 4 0 819%
aim100 24 7,268 11 6,071 8 20% 5,342 6 36% 3,153 4 131%
bf 4 2,400 4 2,400 4 0% 1,987 3 21% 684 1 251%
at100 100 376 0 397 0 -5% 366 0 3% 69 0 442%
jnh 50 285 0 97 0 193% 106 0 168% 49 0 479%
inst:no.ofproblemsintestset time:totalruntimeinse onds,with600stimeout
fail:no.ofoftimedoutproblems speedup:speedupoverbasi version
Table1.Experimentsrunadual733MHzPentiumIIIsystemwith512MBofRAM.
Referen es
1. P.Baumgartnerand F. Massa i. The Tamingof the (X)OR. InComputational
Logi { CL2000,volume1861 ofLNAI,pages508{522.Springer,2000.
2. M.Davis,G.Logemann,andD.Loveland.Ama hineprogramfortheoremproving.
Communi ationsof theACM,5(7):394{397,July1962.
3. M.DavisandH.Putnam.A omputingpro edureforquanti ationtheory.Journal
of theACM,7(3):201{215,July1960.
4. L. deMoura and H.Ruess. Lemmasondemandfor satisability solvers. InPro-
eedingsofSAT2002(Cin innati,Ohio),May2002.
5. C.M.Li. Equivalen yreasoningtosolvea lassofhardSATproblems.Information
Pro essingLetters,76(1{2):75{81, November2000.
6. J.P.Marques-Silva. Algebrai Simpli ationTe hniquesforPropositionalSatisa-
bility. InPro eedings ofCP'2000,September2000.
7. C.Tinelli.Asimpleandextensible al ulusfortheDavis-Putnampro edure. Sub-
mitted,2002. (availableathttp:// s.uiowa.edu/~tinelli/pa pers. html ).