• No results found

CiteSeerX — Satisfiability Modulo Theories

N/A
N/A
Protected

Academic year: 2022

Share "CiteSeerX — Satisfiability Modulo Theories"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

CesareTinelli

DepartmentofComputerS ien e,UniversityofIowa,USA

tinelli s.uiowa.edu

Abstra t. Wepresentageneral framework, DPLL(T),for integrating

de isionpro eduresintothe DPLLmethod.Whileitsmainmotivation

isprodu ingfastsolversforthesatis abilityofgroundformulasin rst-

ordertheorieswithde idableground onsequen es,theframeworkisalso

usefulinthe propositional ase. SATproblems an oftenbe onverted

into satis ability problems modulo a theory T for whi h faster SAT

methodsthanDPLLareknown.Weshowhowone anuseDPLL(T)to

takeadvantageofthisfa tanda hievebetterperforman e.

1 Introdu tion

Weareinterestedintheproblemofbuildingde isionpro eduresforthesatis a-

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 hinthis eldusually on entratesonpro eduresforthesatis a-

bilityof onjun tionsofgroundliteralsonly,withthejusti ationthatintheory

this is enoughto de idethe satis ability ofarbitrary Boolean ombinations of

groundliterals. Infa t,it suÆ esto onvert thearbitrarygroundformula into

disjun tivenormalform,andthen he kthesatis abilityof ea hdisjun t until

asatis ableoneisfound.This viewisunsatisfa toryin pra ti eforallbut the

simplestinputformulasbe auseoftheexponentialexplosiontypi allyprodu ed

by the onversion in disjun tive normal form. The orresponding method for

propositionalsatis ability(SAT)haslongbeenknowntobeimpra ti al.Other

methodsforSAThavebeendevelopedthathavebetterperforman einpra ti e.

OneofthebestSATmethods,whi hwewillrefertoastheDPLLmethod,is

basedonapro edureforgroundsatis abilitybyDavis,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 honpropositionalsatis abilityanduseittoprodu eeÆ ientde ision

pro eduresforgroundsatis abilityin 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

(2)

de ned de larativelyasasequent al ulus, alledDPLL(T),parametrizedbya

ba kgroundtheory T equippedwithade isionpro edureforthesatis abilityin

T of sets ofgroundliterals. Themain onje turebehindthe al ulusisthat it

anserveasabasisforbuildingeÆ ientsatis abilitysolversforagiventheory

T.TheeÆ ien y should omefromtheliftingtoDPLL(T)ofanumberofvery

e e 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 astassatis abilityproblemsmoduloa(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., asatis able set of senten es.The set  is (un)satis ablein T if

there is a(no) model ofT that satis es. Wesay that entails 'in T, and

writej=

T

',ifeverymodelofT thatsatis essatis es'aswell.

2 The DPLL(T) Cal ulus

The DPLL method [3,2℄ an be used to de ide the satis ability 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-

sitionalsatis abilitywith groundsatis abilityin a rst-order theory T. Given

a pro edure for de iding thesatis abilityin T of sets of ground-literals for

somesignature,DPLL(T)de idesthesatis abilityinT of nitesetsofground

- 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 kedforsatis abilityin T.If that

ispossible,then

0

issatis ableinT;otherwise,itisnot.Informally,theset,

satis able 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

tobesatis ableinT.Infa t,when ` ;isderivablefrom; ` 

0 ,

everymodel of T in whi h allthe literals of  are true is also amodel of the

whole .

(3)

(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℄).Thee e tiveness ofDPLL(T)in pra ti e anonlybe on rmed

empiri ally.Whilethisisourlongtermgoal,wehavestartedwithalessambi-

tious,although nolessinteresting,task:showingthat oursatis abilitymodulo

theoriesapproa h an bee e tiveeveninthepropositional ase.

Ourmotivationis that for ertain lassesof propositionalformulasthe sat-

is abilityproblem 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 satis a-

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 forsatis ability, 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 satis able and) is

in ludedin oneof thosespe ial lassesmention earlierand(iii) S is satis able

i S 0

[T is.Then ompileT onthe yintoaspe ializedde isionpro edurefor

thesatis abilityinT ofsetsofliterals,anduseanimplementationofDPLL(T),

0

(4)

3.1 ExperimentalResults

Wehavebuiltaprototypesystemtostudythee e 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

forthesatis abilityinT 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 e e 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 satis ability 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

(5)

DPLL(T) engine, o er 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 satis ability 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 hniquesforPropositionalSatis a-

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 ).

References

Related documents

On admission (May 2012), during only topiramate treatment, results of patient arterial blood gas analysis revealed metabolic acidosis (negative base excess of – 9.2 mmol/L

Inspection risers at least 6 inches in diameter (large enough to easily remove and replace the effluent filter) shall extend to surface grade, centered over the inlet and outlet

containers or trucks and manage efficiently will get the business. The operations that can consistently fill a retailer’s needs will get the business. In today’s retailing world it is

4.56 The committee recommends that any individual wishing to provide financial advice be required to be a member of a professional body that is operating under

In healthy people Sargent 2012 assessed the counselling intervention delivered in primary health care by nurses to change risk factors of cardiovascular disease and Lin 2010

How Does the Low Successful Bidder Get Low and Make Money?; sixteen stories and case studies; over 70 ways low bidders got low for offices-warehouses-retail stores-clothing

(2007), Bea (1992), Dichtl (1994), Dyer and Singh (1998), Boutellier and Zagler (2000), Scheuing (1998) and Hendrick (1998) Yes (realized): cost reduction/postponem ent

Caterers that would like to have their firm added to the approved list should contact Georgia Perimeter College Auxiliary Services at 404 299-4412, or they may print a copy of the