longernilysfalselongerconsxxsniltruelongerconsxxsconsyyslongerxsysthentheresultingTRSR2isnotoutermostterminatinglongerzeroszerosoR2longercons0zeroszerosoR2longerco ID: 108589
Download Pdf The PPT/PDF document "andevenmoreimportant,wecanadditionallydi..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
andevenmoreimportant,wecanadditionallydisproveoutermosttermination.Therefore|asfarastheauthorknows|wepresenttherstautomaticmethodfordisprovingoutermosttermination.Thepaperisstructuredasfollows.InSect.2werecapitulatetherequiredno-tionsoftermrewriting.TheninSect.3ourtransformationispresented.Sound-nessandcompletenessofthetransformationareproveninSect.4andSect.5,respectively.AnimprovedversionofthetransformationispresentedinSect.6.Finally,adiscussiononrelatedworkandexperimentaldataisgiveninSect.7.2PreliminariesWereferto[2]forthebasicsoftermrewriting.WealwaysassumeacountableinnitesetofvariablesV.WewriteT(;V)forthesetoftermsoversomesignature.Foreachf2wewritear(f)forthearityoff.ATRSRoverisasetofrules`!rwhere`;r2T(;V),`=2V,andV(`)V(r).Here,V(t)isthesetofvariablesoccurringinatermt.WerestrictourselvestoniteTRSsandoftenomitthesignatureifitisclearfromthecontext.ForaTRSthedenedsymbolsaretherootsymbolsoftheleft-handsidesoftherules.Theremainingsymbolsofareconstructors.Apositionp2Pos(t)iseithertheemptyposition"orp=iqwheret=f(t1;:::;tn),1in,andq2Pos(ti).Positionpisstrictlyabovepositionq(orqisstrictlybelowp)ipisaproperprexofq.AcontextisatermCwithaholeatsomepositionp2Pos(C).WewriteC[t]pasthetermwheretheholeofCisreplacedbyt.AtermtcanbereducedwithRtosatpositionp,writtent!R;psit=C[`]pands=C[r]pforsomerule`!r2Randsubstitution.Thereductionisanoutermostreduction,writtento!R;psithereisnoqstrictlyabovepsuchthatt!R;qs.Itisaninnermostreduction,writtenti!R;psithereisnoqstrictlybelowpsuchthatt!R;qs.TherewriterelationofRisdenedast!Rsit!R;psforsomepositionp.Theouter-andinnermostrewriterelationso!Randi!Raredenedaccordinglyviao!R;pandi!R;p.Atermtisinnormalformw.r.t.Rithereisnossuchthatt!Rs.ATRSis(outermost/innermost)terminatingi!R(o!R/i!R)iswell-founded.Example1.ConsiderthefollowingTRSR1whichgeneratesalistofzeros.Here,thesecondruleisusedtostopthereductionifaconsappearsattheoutside.zeros!cons(0;zeros)(1)cons(x;xs)!terminate(2)Itisneitherterminatingnorinnermostterminatingduetotheinnitereductionzerosi!R1cons(0;zeros)i!R1cons(0;cons(0;zeros))i!R1::::However,R1isoutermostterminatingascons(0;zeros)mustbeoutermostre-ducedtoterminatebecauseofrule(2).Butifweaddthefollowingrulestocomparethelengthsoftwolists2 longer(nil;ys)!falselonger(cons(x;xs);nil)!truelonger(cons(x;xs);cons(y;ys))!longer(xs;ys)thentheresultingTRSR2isnotoutermostterminating.longer(zeros;zeros)o!R2longer(cons(0;zeros);zeros)o!R2longer(cons(0;zeros);cons(0;zeros))o!R2longer(zeros;zeros)o!R2:::3ThetransformationTostudytheoutermostterminationbehaviorofaTRSwetakeatransforma-tionalapproach.TheideaistotransformagivenTRSintoanotherTRSsuchthatoutermostterminationoftheoriginalTRScanbeconcludedfromtermina-tionofthetransformedTRS.Transformationalapproachestoproveterminationarequitecommonforextensionsofplainrewriting,e.g.,therearevarioustrans-formationsforconditionalTRSsandcontext-sensitiveTRSs[14].Anoverviewoverthesetransformationsisgivenin[15]and[5].Thegeneralstructureofourtransformationissimilartothestructureofthecompletetransformationforcontext-sensitiveTRSs[5].(Thisstructureisalsousedin[18].)First,eachtermoftheoriginalsignatureismappedtoacorrespondingtermoveranenrichedsignaturewhichcontainsadditionalsymbols(alsocalledmarkers).Thesymboltopwillbeusedtomarkthetopoftheoriginaltermandthesymbolreduceandgo upareusedtoindicatethepositionofthereduction.Thenonesimulatesareductionto!R;psoftheoriginalTRSinthreephases.First,inthetermtop(reduce(t))thereduce-markerismovedtopositionp.Second,thereductiontosissimulatedbyapplyingthecorrespondingrewriterulethatisusedinthereductionto!R;ps.Moreover,thereduce-markerischangedintoago up-marker.Third,thego up-markerismovedbackfrompositionptothetopofthetermyieldingtop(go up(s)),andnallygo upisconvertedintothereduce-markertobeabletoperformanupcomingreduction.Tosimulateoutermostrewritingwiththisscheme,themostdicultpartistherstphase.Here,therulesofthetransformedsystemsmustensurethatreducecanbemovedtoallvalidpositionsw.r.t.outermostrewritingtoensurethateveryoriginalreductioncanbesimulated.Moreover,itisalsodesirablethatreducecannotbemovedtoanyoftheremainingpositionsinordertoobtainaprecisesimulation.Indetail,onehastoinvestigatethesetofpositionsofatermt=f(t1;:::;tn)whichareallowedw.r.t.outermostrewriting,andmovethereduce-markerinthetermreduce(t)accordingly.(Thetop-markerisnotimportantforthispart.)3 Therearetwopossibilities.Eithertitselfisaredex.Thenitisnotallowedtoreduceanyoft'ssubtermsandtherefore,thereduce-markershouldnotbemoved.Orotherwise,tisnotaredex.Inthatcaseitmustbepossibleinthetransformedsystemtorewritereduce(t)toC[reduce(ti)]whereCissomecontextwhichalsohastostoref;t1;:::;ti1;ti+1;:::;tn.Applyingthisidealeadstothefollowingtransformationwhichwillbedis-cussedindetaildirectlyafterwards.Denition2(TransformationofoutermostTRSs).LetRbeaTRSover.Wedenetheextendedsignatureas0=]ftop;reduce;go up;resultg]fcheckf;redexf;inf;ijf2;1iar(f)g.Moreover,wedenethetrans-formedsystemR0over0toconsistofthefollowingrulesreduce(f(x1;:::;xn))!checkf(redexf(x1;:::;xn))(3)checkf(redexf(x1;:::;xn))!inf;i(x1;:::;reduce(xi);:::;xn)(4)redexf(`1;:::;`n)!result(r)(5)checkf(result(x))!go up(x)(6)inf;i(x1;:::;go up(xi);:::;xn)!go up(f(x1;:::;xn))(7)top(go up(x))!top(reduce(x))(8)where(3)and(6)areforallf2,(4)and(7)areforallf2,1iar(f),and(5)isforallf(`1;:::;`n)!r2R.Rulesf(3);(5);(6)gandf(7);(8)gcanbeusedtoperformthenecessaryre-ductionsinthesecondandthirdphaseofthetransformationscheme.Toil-lustratethis,considerR1ofEx.1.Onecansimulatetheoutermostreductionzeroso!R1cons(0;zeros)byapplyingtherules(3);(5);(6);(8).top(reduce(zeros))i!R01top(checkzeros(redexzeros))(9)i!R01top(checkzeros(result(cons(0;zeros))))i!R01top(go up(cons(0;zeros)))i!R01top(reduce(cons(0;zeros)))Therstphaseneedssomemoreexplanation.Onemightthinkofaproblemthatalsonon-outermostreductionscanbesimulatedinthetransformedTRSsinceeverytermreduce(f(t1;:::;tn))canberewrittentoC[reduce(ti)]withrules(3)and(4).However,thisproblemdoesnotarisesinceinnermostrewritingisconsideredforthetransformedTRS:wheneverf(t1;:::;tn)isaredexw.r.t.Rthenanapplicationofrule(4)onthetermcheckf(redexf(t1;:::;tn))isprohib-itedbyrule(5)asthelatterruleimposesaredexatadeeperposition.Thiscanalsobeseenwhencontinuingintheexample.Afterthereductiontop(reduce(cons(0;zeros)))i!R01top(checkcons(redexcons(0;zeros)))itisnotallowedtoapplyrule(4),butonehastorewritetheinnersubterm.top(checkcons(redexcons(0;zeros)))i!R01top(checkcons(result(terminate))Afterwardsitisonlypossibletorewritetoanormalform.Thefollowingmain4 theoremstatesthatourtransformationindeedcharacterizesoutermosttermina-tionoftheoriginalTRS,i.e.,thetransformationisbothsoundandcomplete.Theorem3.RisoutermostterminatingiR0isinnermostterminating.TheavailabletechniquesforinnermostterminationanalysisincombinationwithThm.3cannowsuccessfullyhandletheTRSsofEx.1.Moreprecisely,outermostterminationofR1andoutermostnon-terminationofR2areprovenfullyautomatically.Beforewediscusstheempiricalresultsindetail,weprovebothdirectionsofThm.3separatelyintheupcomingtwosections.4SimulationofoutermostreductionsToprovesoundnessofthetransformationwewillshowthateveryoutermostre-ductionoftheoriginalTRScanbesimulatedbyaseriesofinnermostreductionsinthetransformedTRS(Lemma5).Tothisend,werstmakethefollowingobservationthateachtermoftheoriginalsignaturecannotbereducedwiththetransformedTRS.Thisobservationwillbeusefultoarguethatinthesimulationweonlyperforminnermostreductions.Lemma4.Ift2T(;V)thentisanormalformw.r.t.R0.Proof.Obvious,sinceeveryf2isaconstructorofR0.utLemma5.Ift2T(;V)andto!Rsthenreduce(t)i!+R0go up(s).Proof.Sincetisreducibleitisnotavariable,solett=f(t1;:::;tn).Weperforminductiononthepositionoftheredexinto!R;ps.Ifp="thent=`!r=sforsomerule`=f(`1;:::;`n)!r2Rwhereti=`iforalli.Thus,wecanbuildthefollowinginnermostreduction:reduce(f(t1;:::;tn))i!R0checkf(redexf(t1;:::;tn))i!R0checkf(result(r))=checkf(result(t))i!R0go up(t)NotethatallthesereductionsareindeedinnermostreductionsduetoLemma4.Ifp=iqthentio!Rsiands=f(t1;:::;si;:::;tn).Fromtheinductionhypothesisweconcludereduce(ti)i!+R0go up(si).Thus,itispossibletobuildthedesiredreductionasfollows:reduce(f(t1;:::;tn))i!R0checkf(redexf(t1;:::;tn))i!R0inf;i(t1;:::;reduce(ti);:::;tn)i!+R0inf;i(t1;:::;go up(si);:::;tn)i!R0go up(f(t1;:::;si;:::;tn))=go up(s)Here,thesecondreductionisindeedaninnermoststep.ThereasonisthatbyLemma4weonlyhavetoguaranteethatthetermredexf(t1;:::;tn)isnotaredexofR0.However,ifthistermwerearedexofR0,thenbythedenitionofR0thetermf(t1;:::;tn)=twouldbearedexofR.Butthisisincontradiction5 tothefactthattisreducedbelowtherootusingoutermostrewriting.utWiththehelpofLemma5itisnoweasytoproveonedirectionofThm.3.Corollary6.IfR0isinnermostterminatingthenRisoutermostterminating.Proof.IfRwerenotoutermostterminatingthentherewouldbeaninnitereductiont1o!Rt2o!Rt3o!R:::whereallti2T(;V).Lemma5andLemma4directlyyieldthefollowinginniteinnermostreductionofR0.top(reduce(t1))i!+R0top(go up(t2))i!R0top(reduce(t2))i!+R0:::ut5ExtractingoutermostreductionsInthissectionweprovecompletenessofourtransformation.Tothisend,weshowthatoutermostterminationoftheoriginalTRSimpliesinnermostterminationofthetransformedTRS.ThisisachievedbyextractinganinniteoutermostreductionofRfromeveryinniteinnermostreductionofR0.Herewehavetodealwithanewproblemwhichdidnotariseintheprevioussection:forinnermostterminationwehavetoconsideralltermsoftheextendedsignature,i.e.,weevenhavetoconsidertermswhichcontainmultipleoccurrencesoftop-andreduce-markersandwehavetoconsiderallpossiblereductions.Tosolvethisproblemweshowtwomainlemmas(7and10).IntherstlemmaweprovethatwheneverthetransformedTRSisnotinnermostterminatingthentherealsoisareductionofaspecialformwhichissimilartotheonethatwehaveconstructedinthesoundness-proof.Theninthesecondlemmaweshowhowonecanextractanoutermostreductionfromthisspecialreduction.Combiningbothlemmasthendirectlyyieldscompletenessofourtransformation.Lemma7.IfR0isnotinnermostterminatingthenthereisaninniteinner-mostreductionofthefollowingformwherealltiareinnormalformw.r.t.R0.1top(go up(t1))i!R0;"top(reduce(t1))i!R0;"top(go up(t2))i!R0;":::(?)ToprovethislemmawemakeuseofDependencyPairs[1],apowerfultech-niquetoanalyzeinnermostterminationofTRSs.Essentially,insteadofanalyzingtherewriterelationi!R0directly,oneconsiderstwoTRSsPandR0incombi-nationandinvestigatessocalledinnermost-(P;R0)-chainswhicharereductionsofthefollowingform.s1i!P;"t1i!R0;"s2i!P;"t2i!R0;"s3i!P;"t3i!R0;":::Themainresultof[1]statesthatR0isinnermostterminatingitherearenoinniteinnermost-(DP(R0);R0)-chains.2Here,DP(R0)isthefollowingTRSconsistingofallDependencyPairsofR0. 1Therelationi!R0;"islikei!R0exceptthatitisnotallowedtorewriteattheroot.2FormoredetailsandfurtherextensionsofDependencyPairswereferto[1,7,11,13].6 top](go up(x))!top](reduce(x))(10)top](go up(x))!reduce](x)(11)reduce](f(x1;:::;xn))!check]f(redexf(x1;:::;xn))(12)reduce](f(x1;:::;xn))!redex]f(x1;:::;xn)(13)check]f(redexf(x1;:::;xn))!in]f;i(x1;:::;reduce(xi);:::;xn)(14)check]f(redexf(x1;:::;xn))!reduce](xi)(15)Wecannowprovethateveryinnermostnon-terminatingTRSR0entailsaninnitereductionoftheformin(?).Proof.IfR0isnotinnermostterminatingthenthereisaninniteinnermost(DP(R0);R0)-chain.Toinvestigatetheformofpossibleinnitechainswecom-paretheroot-symbolsoftheDependencyPairsandobtainthefollowingDepen-dencyGraph[1].(10)33 // (11)// (12)// OO (14)(13)(15)oo Thisgraphcontainstwostronglyconnectedcomponentsf(10)gandf(12);(15)g.Therefore,everyinniteinnermostchainwillendineitheraninniteinnermost(f(10)g;R0)-or(f(12);(15)g;R0)-chain.Wenowshowthattherearenochainsofthelatterkind.Thereasonisthatforthefollowingpolynomialorder,both(12)and(15)arestrictlydecreasingandtheonlyusablerules2(5)areweaklydecreasing.[reduce]](x)=[check]f](x)=1+x[f](x1;:::;xn)=1+x1++xnforallf2[redexf](x1;:::;xn)=x1++xn[result](x)=0Thus,theremustbeaninniteinnermost(f(10)g;R0)-chain.Butthisdirectlycorrespondstotheinnitereduction(?):onejusthastoreplacetop]bytop.utWiththehelpofLemma7itisnowpossibletoextracttheinniteinnermostreduction(?)fromeverynon-innermostterminatingtransformedTRS.RecallthattheaimistoextractaninniteoutermostreductionoftheoriginalTRSfrom(?).Thenaturalideaistojusttakethetermst1;t2;t3;:::andthentoshowthattheseleadtoanoutermostreductionofR.Butherewehavetofaceonemoreproblem:in(?)thetermst1;t2;t3;:::aretermsovertheextendedsignature0,butweneedtoextracttermsovertheoriginalsignature.Tothisendweusethefollowingmappingwhichalwaysyieldstermsovertheoriginalsignature.Denition8.ThemappingO:T(0;V)!T(;V)isdenedfollows:7 O(f(t1;:::;tn))=f(O(t1);:::;O(tn))forallf2O(t)=xt,otherwiseForeachsubstitutionthesubstitutionO()isdenedasxO()=O(x).Beforewestateandprovethesecondmainlemma,weneedsomepropertiesofOaboutmatching.Lemma9.If`2T(;V)thenO(`)=`O()forallsubstitutions.IfO(t)=`forsomesubstitutionthent=`forsomesubstitution.Proof.Straightforwardstructuralinductionon`.FirstnotethatOisinjective.Hence,theinversemappingO1isproperlydenedwhichcanagainbeliftedtoamappingfromsubstitutionstosub-stitutionswhereO1()isdenedasxO1()=O1(x).Weshowthatt=`O1()byinductionon`,i.e.,wechoose=O1().If`isavariablexthenO(t)=xandthus,t=O1(O(t))=O1(x)=xO1()=`O1().Otherwise,`=f(`1;:::;`n).Thus,O(t)=`=f(`1;:::;`n)impliesthatt=f(t1;:::;tn),f2,andO(t)=f(O(t1);:::;O(tn)).Hence,O(ti)=`iforalliandbyinductionweobtainti=`iO1().Butthisdirectlyyieldst=f(`1O1();:::;`nO1())=f(`1;:::;`n)O1()=`O1().utWewillnowprovethesecondmainlemmatoachievecompletenessofourtransformation,namelythataninnermostreductionreduce(ti)i!R0go up(ti+1)in(?)correspondstoanoutermostreductionoftheoriginalsystem.Lemma10.Lets;t2T(0;V)wheretisinnormalformw.r.t.R0.Wheneverreduce(t)i!R0go up(s)thenO(t)o!RO(s)andsisinnormalformw.r.t.R0.Proof.Weperforminductiononthelengthofthereduction.Ifreduce(t)reducestogo up(s)therststepmustbedonewith(3)sincetisinnormalform.Hence,t=f(t1;:::;tn)forsomef2andnormalformst1;:::;tnandmoreover,thereductionmuststartwithreduce(t)i!R0checkf(redexf(t1;:::;tn)).Fromthenewtermcheckf(redexf(t1;:::;tn))thereareonlytwopossiblewaystocontinuethereductiontogo up(s),eitherusing(5)orusing(4).Intheformercaseweobtainthereductioncheckf(redexf(t1;:::;tn))i!R0checkf(result(s0)).Hence,theremustbesomef(`1;:::;`n)!r2Rsuchthatti=`iands0=r.Asisanormalizedsubstitutionandasr2T(;V)isaconstructortermw.r.t.R0,weknowthats0isinnormalform.Moreover,asadditionallyeach`i2T(;V)wecanapplyLemma9andobtainO(t)=O(f(`1;:::;`n))=f(`1;:::;`n)O()o!RrO()=O(r)=O(s0):Fromcheckf(result(s0))i!R0go up(s)andthefactthattheonlypossiblereduc-tionofcheckf(result(s0))isviarule(6)togo up(s0)weconcludethats0=s.Hence,byourpreviousresultswehaveprovenO(t)o!RO(s0)=O(s)andthats=s0isinnormalform.Thisnishestherstcase.Inthesecondcasethereductionofcheckf(redexf(t1;:::;tn))isperformed8 byrule(4)whichyieldsthenewterminf;i(t1;:::;reduce(ti);:::;tn).Notethatthereisonlyonewaytoreachthetermgo up(s)fromthisnewterm:onemustrstreducereduce(ti)tosometermgo up(si).SincethisreductionisshorterthanthewholereductionwecanapplytheinductionhypothesistoobtainO(ti)o!RO(si)andconcludethatsiisinnormalform.Moreover,thereisonlyonewaytocontinuethereductiontowardsgo up(s):onehastoreduceinf;i(t1;:::;go up(si);:::;tn)togo up(f(t1;:::;si;:::;tn))withrule(7).However,sincethislasttermisinnormalform|f2isaconstructorofR0|weknowthatsmustbethenormalformf(t1;:::;si;:::;tn).Hence,O(t)=f(O(t1);:::;O(ti);:::;O(tn))!Rf(O(t1);:::;O(si);:::;O(tn))=O(f(t1;:::;si;:::;tn))=O(s)Itonlyremainstoprovethattheabovereductionisindeedanoutermost-reduction.SinceweknowthatO(ti)o!RO(si)weonlyhavetoprovethatO(t)isnotaredexofR.So,supposeO(t)isaredex.Hence,thereissomerule`!r2RsuchthatO(t)=`.ByLemma9weknowthatthent=f(t1;:::;tn)=`andthus,ti=`iforalli.Hence,thetermredexf(t1;:::;tn)isnotinnormalformw.r.t.R0.However,thisisacontradictiontothefactthatcheckf(redexf(t1;:::;tn))wasinnermostreducedattop-level.utWiththehelpofLemmas7and10completenessofourtransformationiseasilyestablished.Corollary11.IfRisoutermostterminatingthenR0isinnermostterminating.Proof.AssumethatR0isnotinnermostterminating.ThenbyLemma7thereistheinniteinnermostreductiontop(go up(t1))i!R0;"top(reduce(t1))i!R0;"top(go up(t2))i!R0;":::whichbyLemma10directlyleadstotheinniteoutermostreductionO(t1)o!RO(t2)o!R::::ut6ImprovedTransformationInthissectionwepresentanimprovedvariantofourtransformation.Theideaisthatthecheckforanoutermost-redexissuper uousiftheoutermostsymbolisaconstructor.Moreover,wheneveraconstantisreduced,thenthereductioncanonlybeatthetop-level.Hence,inthatcasetherealsoisnoneedforthecheck.TheseideasleadtoanimprovedtransformationwhichproducesasmallerTRSthanthetransformationofDef.2.Moreover,eachoutermoststepoftheoriginalTRScanbesimulatedbylessinnermoststepsofthetransformedTRS.Denition12(ImprovedtransformationofoutermostTRSs).LetRbeaTRSover.WedenetheimprovedtransformedsystemR00over0toconsistofrulesf(3)(8)gwiththefollowingadditionalrules.9 reduce(f(x1;:::;xn))!inf;i(x1;:::;reduce(xi);:::;xn)(16)reduce(f)!go up(r)(17)However,indierencetoDef:2,(3)and(6)areonlyfordenedsymbolsfwithar(f)0,(4)isonlyfordenedsymbolsf,and(5)isonlyforrulesf(`1;:::;`n)!r2Rwithar(f)0.Thenewrule(16)isforallconstructorsfand1iar(f),andthenewrule(17)isforalldenedconstants,i.e.,forallrulesf!r2Rwherear(f)=0.Toillustratethatanoutermostreductioncanbesimulatedbylessinnermostreductionsusingtheimprovedtransformation,recallthesimulationofzeroso!Rcons(0;zeros)ofEx.1.ThetransformationofDef.2needsfourstepstoreducetop(reduce(zeros))totop(reduce(cons(0;zeros))),cf.(9),whereastheimprovedtransformationonlyneedstwosteps.AsforthetransformationofDef.2,weobtainsound-andcompleteness.Theorem13.RisoutermosttermatingiR00isinnermostterminating.ThistheoremisproveninthesamewayasThm.3.7RelatedWorkandExperimentsTerminationofprogramminglanguageswithoutermoststrategyhasalsobeenstudiedin[10,16].However,incontrasttoourworktheiremphasisisonprogramswhichalsocontainnon-terminatingfunctions,andwherethegoalistoproveterminationofasetofstartingterms.Relatingourapproachtothedirecttechniqueof[12]toproveoutermostterminationofTRSs,weseethebenetofourapproachthatitcanalsobeusedtodisproveoutermosttermination.Sincethesuccessofourapproachheavilydependsonthetechniquestoanalyzeinnermosttermination,thebestwaytoinvestigatetherelativeprovingpowerisbyanextensiveempiricalcomparison.Unfortunately,afullyautomaticimplementationof[12]iscurrentlynotavailable.However,aby-hand-calculationonasmallsetofexampleshasshownthatinpracticeourtechniqueisofincomparablepowerto[12],i.e.,thereareexampleswhereonlyoneofbothtechniquesissuccessful.Themostsimilarworktooursisthetransformationof[18]toproveout-ermosttermination.Althoughthegeneralstructureofbothtransformationsissimilar,thereareimportantdierences.Theadvantageof[18]isthattheirtrans-formationdoesnotrelyoninnermostrewriting.Therefore,moretechniquesareapplicableontheresultingTRSs.However,therearealsosomedrawbacksof[18]incomparisontoourtransformation.First,itisunknownwhetherthetransfor-mationof[18]iscomplete.Moreover,wedonothavethelimitationtoquasi-left-linearTRSsasin[18].Andnally,ourtransformationiseasiertoimplementandcannotleadtoexponentiallylargerresultingTRSs.Empirically,ourtrans-formationisincomparable3to[18]. 3Althoughthedetailedexperimentsindicatethatourtransformationisstrictlymorepowerful,inpracticethisisnotthecaseifonetriesthetransformationof[18]withseveraldierentproversasbackend:thenbothtransformationsareincomparable.10 Forourexperimentsweconsideredonlythose434TRSsfromthetermina-tionproblemdatabase4(TPDB4.0)wherefullterminationcouldnotalreadybeprovenbytheterminationproverAProVE[9].Weconsideredthreetransforma-tionstoanalyzeoutermostterminationwhereafterwardswealwaysusedAProVEasbackend.ForeachTRSandtransformationweusedatimeoutofoneminute.ThemachinewasanIntelCore2Duowith2.4GhzrunningunderMacOSX.Thedetailsofourexperimentscanbeviewedathttp://cl-informatik.uibk.ac.at/~thiemann/outermost.Thefollowingtablegivesasummary.Transformation R0 R00 [18]5 #ofTRSswhereoutermostterminationwasdisproven 39 40 0#ofTRSswhereoutermostterminationwasproven 7 7 6Werstconsiderdisprovingoutermosttermination.Notethatonly162TRSsofthe434TRSaredetectedtobenon-terminating.Herewecanseethesuccessofourtransformationasitisapplicableon40TRSswhereasweknowofnoothermethodthatcandisproveoutermostterminationautomatically.Fortheremaining122TRSstherearetwomajorreasonswhyoutermostterminationcannotbedisproven:rst,someoftheseTRSsareoutermostterminating.Andsecond,ourtransformationdestroysloopingreductions,i.e.,althoughtheoriginalTRSmightcontainaloopingoutermostreduction,thisdoesnotnecessarilycorrespondtoaloopinginnermostreductioninthetransformedTRS.Tosolvethisproblem,asfutureworkweplantodevelopadirectmethodfordisprovingoutermostterminationsimilartotheonein[19].Withtheseexperimentsonecanalsoillustratethebenetoftheimprovedtransformation.ThereisoneTRSwhereonlytransformationR00isabletodis-proveoutermosttermination.Here,thefailureofR0isjustduetothelengthofthesimulation.TheloopingreductionofR00issomestepsshorterthanthecorrespondingreductioninR0.Thatthiscanbecrucialisduetothefactthatthecomplexityofsearchingforloopingreductionsisexponentialinthelengthofthereduction.Unfortunatelythenumbersforprovingoutermostterminationdonotlookthatgood.However,thisismainlyduetothefactthattherearehardlyanyexamplesintheTPDBwhicharedesignedforoutermostrewriting:thereareonlysix.Toconclude,wehavedevelopedasuccessfultransformationforprovingandespeciallyfordisprovingoutermostterminationofTRSs.Acknowledgments.WethankIsabelleGnaedigforherhelpfulfeedbackonquestionsabout[12]. 4Availableathttp://www.lri.fr/~marche/tpdb/.5Tobecomparablewealwaysaddedafreshconstanttothesignaturewhenusing[18].Thereasonisthatotherwise[18]onlyprovesoutermost-groundtermination.11 References1.T.ArtsandJ.Giesl.Terminationoftermrewritingusingdependencypairs.The-oreticalComputerScience,236:133{178,2000.2.F.BaaderandT.Nipkow.TermRewritingandAllThat.CambridgeUniversityPress,1998.3.A.Geser,D.Hofbauer,J.Waldmann,andH.Zantema.Ontreeautomatathatcertifyterminationofleft-lineartermrewritingsystems.InformationandCompu-tation,205(4):512{534,2007.4.J.GieslandT.Arts.VericationofErlangprocessesbydependencypairs.Appl.AlgebrainEngineering,CommunicationandComputing,12(1,2):39{72,2001.5.J.GieslandA.Middeldorp.Transformationtechniquesforcontext-sensitiverewritesystems.JournalofFunctionalProgramming,14(4):379{427,2004.6.J.Giesl,R.Thiemann,S.Swiderski,andP.Schneider-Kamp.Provingterminationbyboundedincrease.InProc.CADE'07,LNAI4603,pp.443{459,2007.7.J.Giesl,R.Thiemann,andP.Schneider-Kamp.Thedependencypairframework:Combiningtechniquesforautomatedterminationproofs.InProc.LPAR'04,LNAI3452,pp.301{331,2005.8.J.Giesl,R.Thiemann,andP.Schneider-Kamp.Provinganddisprovingtermina-tionofhigher-orderfunctions.InProc.FroCoS'05,LNAI3717,2005.216{231.9.J.Giesl,P.Schneider-Kamp,andR.Thiemann.AProVE1.2:Automatictermina-tionproofsintheDPframework.Proc.IJCAR'06,LNAI4130,pp.281{286,2006.10.J.Giesl,S.Swiderski,P.Schneider-Kamp,andR.Thiemann.Automatedtermina-tionanalysisforHaskell:Fromtermrewritingtoprogramminglanguages.InProc.RTA'06,LNCS4098,pp.297{312,2006.11.J.Giesl,R.Thiemann,P.Schneider-Kamp,andS.Falke.Mechanizingandim-provingdependencypairs.JournalofAutomatedReasoning,37(3):155{203,2006.12.I.GnaedigandH.Kirchner.Terminationofrewritingunderstrategies.ACMTransactionsonComputationalLogic,2008.Toappear.Availableathttp://tocl.acm.org/accepted/315gnaedig.ps.13.N.HirokawaandA.Middeldorp.TyroleanTerminationTool:Techniquesandfea-tures.InformationandComputation,205(4):474{511,2007.14.S.Lucas.Context-sensitivecomputationsinfunctionalandfunctionallogicpro-grams.JournalofFunctionalandLogicProgramming,1:1{61,1998.15.E.Ohlebusch.Terminationoflogicprograms:Transformationalmethodsrevisited.Appl.AlgebrainEng.,CommunicationandComputing,12(1-2):73{116,2001.16.S.E.PanitzandM.Schmidt-Schauss.TEA:Automaticallyprovingterminationofprogramsinanon-stricthigher-orderfunctionallanguage.InProc.SAS'97,LNCS1302,pp.345{360,1997.17.R.PlasmeijerandM.vanEekelen.FunctionalProgrammingandParallelGraphRewriting.AddisonWesley,1993.18.M.RaelsieperandH.Zantema.Atransformationalapproachtoproveoutermostterminationautomatically.IninformalProc.WRS'08,pp.76{89,2008.Avail-ableastechnicalreportRISC-Linz08-09athttp://www.risc.uni-linz.ac.at/publications/download/risc_3452/wrs2008.pdf.19.R.Thiemann,J.Giesl,andP.Schneider-Kamp.Decidinginnermostloops.InProc.RTA'08,LNCS5117,pp.366{380,2008.20.H.Zantema.Terminationoftermrewritingbysemanticlabelling.FundamentaInformaticae,24:89{105,1995.12