Under consideration for publication in Theory and

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

UnderconsiderationforpublicationinTheoryandPracticeofLogicProgramming1EnhancedSharingAnalysisTechniques:AComprehensiveEvaluationROBERTOBAGNARADepartmentofMathematics,UniversityofParma,Italy(e-mail:bagnara@cs.unipr.it)ENEAZAFFANELLADepartmentofMathematics,UniversityofParma,Italy(e-mail:zaffanella@cs.unipr.it)PATRICIAM.HILLySchoolofComputing,UniversityofLeeds,Leeds,U.K.(e-mail:hill@comp.leeds.ac.uk)AbstractSharing,anabstractdomaindevelopedbyD.JacobsandA.Langenfortheanalysisoflogicprograms,derivesusefulaliasinginformation.Itiswell-knownthatacommonlyusedcoreoftechniques,suchastheintegrationofSharingwithfreenessandlinearityinformation,cansigni cantlyimprovetheprecisionoftheanalysis.However,anumberofotherproposalsforre neddomaincombinationshavebeencirculatingforyears.Onefeaturethatiscommontotheseproposalsisthattheydonotseemtohaveundergoneathoroughexperimentalevaluationevenwithrespecttotheexpectedprecisiongains.Inthispaperweexperimentallyevaluate:helpingSharingwiththede nitelygroundvariablesfoundusingPos,thedomainofpositiveBooleanformulas;theincorporationofexplicitstructuralinformation;afullimplementationofthereducedproductofSharingandPos;theissueofreorderingthebindingsinthecomputationoftheabstractmgu;anoriginalproposalfortheadditionofanewmoderecordingthesetofvariablesthataredeemedtobegroundorfree;are nedwayofusinglinearitytoimprovetheanalysis;therecoveryofhiddeninformationinthecombinationofSharingwithfreenessinformation.Finally,wediscusstheissueofwhethertrackingcompoundnessallowsthecomputationofmoresharinginformation.1IntroductionIntheexecutionofalogicprogram,twovariablesarealiasedorshareatsomepro-grampointiftheyareboundtotermsthathaveacommonvariable.Conversely,twovariablesareindependentiftheyareboundtotermsthathavenovariablesincommon.Thatis,ifitisnotpossiblefortwovariablestosharethentheyareTheworkofthe rstandsecondauthorshasbeenpartlysupportedbyMURSTproject\Cer-ti cazioneautomaticadiprogrammimedianteinterpretazioneastratta.yThisworkwaspartlysupportedbyEPSRCundergrantGR/M05645.2R.Bagnara,E.Za anellaandP.M.Hillde nitelyindependentandviceversa.Inlogicprogramming,aknowledgeofthepos-siblealiasing(or,equivalently,de niteindependence)betweenvariableshassomeimportantapplications.InformationaboutvariablealiasingisessentialfortheecientexploitationofAND-parallelism(Chang,DespainandDeGroot1985,HermenegildoandGreene1990,JacobsandLangen1992,MuthukumarandHermenegildo1992).Informally,twoatomsinagoalareexecutedinparallelif,byamixtureofcompile-timeandrun-timechecks,itcanbeguaranteedthattheydonotshareanyvariable.Thisimpliestheabsenceofbindingconictsatrun-time:itwillneverhappenthattheprocessesassociatedtothetwoatomstrytobindthesamevariable.Anothersigni cantapplicationisoccurs-checkreduction(Crnogorac,KellyandSndergaard1996,Sndergaard1986).Itiswell-knownthatmanyimplementedlogicprogramminglanguages(e.g.,almostallPrologsystems)omittheoccurs-checkfromtheuni cationprocedure.Occurs-checkreductionamountstoidentifyingtheuni cationswheresuchanomissionissafe,and,forthispurpose,informationonthepossiblealiasingofprogramvariablesiscrucial.Aliasinginformationcanalsobeusedindirectlyinthecomputationofotherinterestingprogramproperties.Forinstance,theprecisionwithwhichfreenessin-formationcanbecomputeddepends,inacriticalway,ontheprecisionwithwhichaliasingcanbetracked(Bruynooghe,CodishandMulkers1994a,Codish,Dams,FileandBruynooghe1993,File1994,KingandSoper1994,Langen1990,Muthuku-marandHermenegildo1991).Inadditiontothesewell-knownapplications,arecentlineofresearchhasshownthataliasinginformationcanbeexploitedinInductiveLogicProgramming(ILP).Inparticular,in(Blockeel,Demoen,Janssens,VandencasteeleandLaer2000),theauthorsconsiderseveraloptimizationsproposedforspeedingupthere nementofinductivelyde nedpredicatesinILPsystems.Theapplicabilityoftheseopti-mizations,previouslyde nedintermsofsyntacticconditionsontheconsideredpredicate,canberecastastestsonvariablealiasing.Therefore,byusingtheresultsoftheanalysistoguidetheoptimizationphase,correctnessresultsaresimplyin-heritedand,thankstothegaininprecision,therearemoreopportunitiestoapplytheproposedoptimizations.Beforecontinuing,abriefnoteonterminology:avariableiscompoundifitisboundtoanon-variableterm,itisgroundifitisboundtoatermcontainingnovariables,itisfreeifitisnotcompound,itislinearifitisboundtoatermthatdoesnotcontainmultipleoccurrencesofavariable.Sharing,adomainduetoD.JacobsandA.Langen(JacobsandLangen1989,JacobsandLangen1992,Langen1990),isbasedontheconceptofset-sharing.AnelementoftheSharingdomain,whichisasetofsharing-groups(i.e.,asetofsetsofvariables),representsinformationongroundness,groundnessdependencies,possiblealiasing,andmorecomplexsharing-dependenciesamongthevariablesthatareinvolvedintheexecutionofalogicprogram(Bagnara,HillandZa anella1997).EventhoughSharingis,inasense,remarkablyprecise,itiswell-knownthatmoreprecisionisattainablebycombiningitwithotherdomains.AsarguedinformallybyH.Sndergaard(Sndergaard1986),linearityinformationcanbesuitablyexploitedEnhancedSharingAnalysisTechniques:AComprehensiveEv

1 / 42
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功