• Aucun résultat trouvé

PSN implies SN

N/A
N/A
Protected

Academic year: 2021

Partager "PSN implies SN"

Copied!
7
0
0

Texte intégral

(1)

HAL Id: hal-00384961

https://hal.archives-ouvertes.fr/hal-00384961

Submitted on 17 May 2009

HAL is a multi-disciplinary open access

archive for the deposit and dissemination of

sci-entific research documents, whether they are

pub-lished or not. The documents may come from

teaching and research institutions in France or

abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est

destinée au dépôt et à la diffusion de documents

scientifiques de niveau recherche, publiés ou non,

émanant des établissements d’enseignement et de

recherche français ou étrangers, des laboratoires

publics ou privés.

PSN implies SN

Emmanuel Polonovski

To cite this version:

(2)

EmmanuelPolonovski PPS,CNRS-UniversiteParis 7 Emmanuel.Polonovskipps.jussieu .fr

Abstra t. In the framework of expli itsubsitutions thereis two terminationproperties: preservationof strongnormalization(PSN),andstrongnormalization(SN).Sin etherearenoteasilyproved,onlyoneof themisusuallyestablished(andsometimesnone).Weproposeherea onne tionbetweenthemwhi hhelps togetSNwhenonealreadyhasPSN.Forthispurpose,weformalizeageneralproofte hniqueofSNwhi h onsistsinexpandingsubstitutionsinto \pure"-termsandto inheritSNof thewhole al ulusby SNof the\pure" al ulusandbyPSN.Weapplyitsu essfullytoalargesetof al uliwithexpli itsubstitutions, allowingustoestablishSN,or,atleast,totra eba kthefailureofSNtothatofPSN.

1 Introdu tion

Cal uli with expli it substitutions were introdu ed [1℄ as a bridge between - al ulus [7℄ and on rete implementations of fun tional programming languages. Those al uliintend to re ne theevaluation pro ess byproposingredu tion rules to deal withthe substitution me hanism { a meta-operation in the traditional - al ulus. It appears that, with those new rules, it was mu h harder(and sometimes impossible) to get termination properties. Thetwo mainterminationpropertiesof al uliwithexpli itsubstitutionsare:

 Preservation of strong normalization (PSN), whi h says that ifa pure term(i.e. withoutexpli itsubstitutions)isstronglynormalizing(i.e. annotbein nitelyredu ed) inthe pure al ulus(i.e.the al uluswithoutexpli itsubstitutions), then thistermis also stronglynormalizingwith respe t to the al uluswithexpli itsubstitutions.  Strong normalization (SN),whi h says that, withrespe t to atyping system, every

typed termisstronglynormalizinginthe al uluswithexpli itsubstitutions,i.e.every terms inthesubsetof typed terms annot bein nitelyredu ed.

Thesetwopropertiesarenotredundant,andFig.1showsthedi eren esbetweenthem. PSN says that the horizontally and diagonally hat hed re tangle is in luded in the diag-onally hat hed re tangle. SN says that the verti ally hat hedre tangle is in luded in the diagonallyhat hedre tangle. Even iftheyworkon adi erentset ofterms,there isa om-monpart:theverti allyand horizontally hat hedre tangle,wi hrepresent thetypedpure terms.

SN and PSN are both termination properties, although their proofs are not always learlyrelated:sometimesSNisshownindependentlyofPSN(dire tly,bysimulation,et ., see forexample[12,11℄), sometimes SN proofsuses PSN(see forexample[4℄). We present here a general proof te hnique of SN via PSN, initially suggested by H. Herbelin, whi h usesthat ommonpart oftypedpure terms.

In se tion 2, we formalize the te hnique and inse tion 3 we summarize theresults we a hieved by applying it to a set of al uli. This set has been hoosen for the variety of

(3)

expli itsubstitutions

Typedterms

Stronglynormalizingterms

Pureterms

Typedpureterms

Stronglynormalizingpureterms

Fig. 1.Normalizationpropertiesoftermswithandwithoutexpli itsubstitutions

theirde nitions: withor withoutDe Bruijn indi es, unaryormultiplesubstitutions, with orwithout ompositionof substitutions,and even a symmetri non-deterministi al ulus. Inthelastse tion,we brie ytalkaboutperspe tivesinthisframework.

2 Proof Te hnique

Theideaofthiste hniqueisthefollowing.Lettbeatyped termwithexpli itsubstitutions forwhi h we want to show termination. With thehelp of its typing judgment,we builda typedpuretermt

0

whi h anberedu edtot.Forthatpurpose,weexpandthesubstitutions of t into redexes. We all this expansion Ateb (the opposite of Beta whi h is usually the nameof therulewhi h reates expli itsubstitutions). Then,with SN of thepure al ulus and PSN, we an export the strong normalization of t

0

(in the pure al ulus) to t (in the al uluswith expli itsubstitutions).

Inpra ti e,thissket hwillonlyapplyinsome ases,and someotherswillrequiresome adjustmentto thiste hnique.Forour te hniqueto work, weneed thattheAteb expansion satis essome properties.The rst one isalways easily he ked.

Property 1 (Preservation of typability). If t is typable, withrespe t to a typingsystem T, inthe al uluswithexpli itsubstitution,thenAteb(t)is typable, withrespe tto a typing systemT

0

(possibly T 0

=T) inthe pure al ulus.

Onlysome al uli an exhibitan Ateb fun tionwhi h satis esthese ond one.

Property 2 (Initialization). Ateb(t) redu esto tin zeroor more stepsin the al ulus with expli itsubstitutions.

Ifwe an getit, then we usethedire tproofto bepresentedinse tion 2.1. Otherwise, weneedtousethesimulationprooftobepresentedinse tion2.2.Inthesequel,SN willbe theset ofstronglynormalizingpureterms andSN

x

willbethesetof stronglynormalizing termsof the al uluswithexpli itsubstitutions.

(4)

We an immediatelyestablishthe theorem. Theorem1. For all typing systems T and T

0

su h that, in the pure al ulus, all typable termswithrespe ttoT arestronglynormalizing,ifthereexistsafun tionAtebfromexpli it substitution terms to pure terms satisfying properties 1 and 2 then PSNimplies SN (with respe t to T

0 ).

Proof. For every typed term t of the al uluswith expli itsubstitution,Ateb(t)is a pure typed term (by property 1). By the strong normalization hypothesis of the typed pure al ulus,we have Ateb(t)2SN.By hypothesis of PSNweobtain thatAteb(t)is inSN

x . Byproperty2,we getAteb(t)!



t, whi hgivesusdire tly t2SN x

.

2.2 Simulation proof

We must relax some onstraints on Ateb. We will try to ndan expansion of t to t 0

su h that t

0

redu es to a term u and there exists a relation R with uRt. The hoosen relation must, in addition,enablea simulation of theredu tions of t by the redu tionof u. If itis possible, we an inferstrongnormalizationof tfrom strongnormalization ofu.

To pro eed with the simulation, we rst split the redu tionrules of the al ulus with expli itsubstitutionsinto two disjoints sets. The set R

1

ontains rules whi h are trivially terminating,andR

2

ontainstheothers.Se ondly,webuildarelationRwhi hsatis esthe followingproperties.

Property 3 (Initialisation). For every typed term t, there exists a term uRt su h that Ateb(t)redu esin0 ormore stepsto u inthe al uluswithexpli itsubstitutions.

Property 4 (Simulation 

).Forevery termt, ift! R1

t 0

then, foreveryuRt,thereexistsu 0 su h thatu!  u 0 and u 0 Rt 0 . Property 5 (Simulation

+ ). For every term t, if t! R 2 t 0

then, for every uRt,there exists u 0 su h thatu! + u 0 and u 0 Rt 0 .

We displaythose propertiesas diagrams: Initialisation t . R Ateb(t)!  u Simulation  t ! R 1 t 0 R R u !  u 0 Simulation + t ! R 2 t 0 R R u ! + u 0

Withthismaterial,we an establish thetheorem. Theorem2. For all typing systems T and T

0

su h that, in the pure al ulus, all typable termswithrespe ttoT arestronglynormalizing,ifthereexistsafun tionAtebfromexpli it substitution termsto pureterms anda relation R on expli itsubstitutions termssatisfying properties 1, 3, 4 and5 then PSNimplies SN (with respe t to T

0 ).

(5)

an be in nitlyredu ed. By property3 there existsa termu su hthat Ateb(t)! 

u, and Ateb(t)isapuretypedterm(byproperty1).Bythestrongnormalizationhypothesisofthe typed pure al ulus,we have Ateb(t)2SN.Byhypothesis of PSNwe obtainthatAteb(t) isinSN

x

andit followsthat u2SN x

.

Byproperty3,wealso haveuRt,and,withproperties 4and5,we an buildanin nite redu tionfrom u, ontradi ting thestrongnormalization of u.

3 Results

3.1 x- al ulus

The x- al ulus [6,5℄ is probably the simplest al uluswith expli it substitutions.It only makesthe subtitutionexpli it.Sin e this al ulusprovides no rules to deal with substitu-tions omposition,itpreservesstrongnormalization.Itisforthis al ulusthatthete hnique hasbeenoriginatelyusedbyHerbelin.Therefore,we an withoutsurprisesapplythedire t proofto get strongnormalization.

3.2 - al ulus

The - al ulus [16,3℄ is the De Bruijn ounterpart of x. As x, it has no omposition rules,and therefore satis es PSN. For this al ulus, we must use the simulation proof to dealwithindi esmodi ationoperators.We su eedto useitand itis,asfaraswe know, the rst proofof SN fora simplytyped versionof  (see [19℄).

3.3  ws

- al ulus The 

ws

- al ulus [13,9,10℄ introdu es an expli itweakening operator, whi h allows to pre-serve strong normalization even with ompositionrules. It has already been shown to be SN [12℄. We failto applythe te hnique, dueto theexpli it weakening operator ombined withtherigidityofthetypingenvironmentoneusuallyhasin al uliwithDeBruijnindi es.

3.4  wsn

- al ulus In[12℄ anamed version of

ws

was proposed. In urrent work,wedeveloped a newversion ofthis al ulus:

wsn

.We already have aSN proofforthis al ulus, almost similarto the originalone,and thiste hnique an beapplied,usingthedire tproof.We annot on lude to SN bythisway,sin e PSNhasnotyetbeenshown(see [19℄).

3.5 - al ulus

Thewellknown- al ulus[1℄doesnothaveeitherPSNnorSN,asshownin[17℄.However, we an su essfully apply our te hnique, using the simulation proof. It does not gives us SN, butit redu es theSN problemto that of PSN.If someone proposes a strategy whi h presevesstrong normalization,ourwork willgive immediatelyaSN proof.

(6)

n

Introdu ed in the same work [1℄, the named version of  su ers the same problem on- erningPSN.We an also applythesimulationproofto it, and on ludesimilarly.

3.7 ~x- al ulus

The - al ulus~ [8,14℄ is a symmetri version of the - al ulus [18℄. As for symmetri - al ulus [2℄, the symmetry raises diÆ ulties in normalization proofs. We an build an expli itsubstitutionsversion\ala"x:~x.In[20℄,weapplysu essfullythete hnique, bydire t proof,to show its strongnormalization.

4 Perspe tives

It seems that this te hnique an be used for many al uli with expli itsubstitutions. Its appli ation on named al uli is easy, in general, and leads to a simple dire t proof. For someothers, asfor al uliwithDeBruijnindi es,wemustusethesimulationproof,whi h tendto benotsoeasy.Furtherworkin ludesits appli ationtothe

ws

- al ulusandto the lxr- al ulus[15℄.

Referen es

1. Abadi, M., Cardelli, L., Curien, P.-L., Levy, J.-J.: Expli it Substitutions.Journal ofFun tional Pro-gramming(1991).

2. Barbanera, F.,Berardi,S.:Asymmetri lambda- al ulusfor lassi alprogramextra tion.Pro eedings ofTACS'94(1994),Springer-VerlagLNCS789,495{515.

3. Benaissa, Z.-E.-A.,Briaud,D., Les anne,P.,Rouyer-Degli,J.:,a al ulusofexpli it substitutions whi hpreservesstrongnormalisation.Journal ofFun tionalProgramming(1996).

4. Bloo, R.: Preservation of Termination for Expli it Substitutions. PhD thesis, Eindhoven University (1997).

5. Bloo,R.,Geuvers,H.:Expli itSubstitution:ontheEdgeofStrongNormalisation.Theoreti alComputer S ien e(TCS1999),211,375{395.

6. Bloo, R., Rose, K.: Preservation of strong normalization in named lambda al uli with expli it sub-stitution and garbage olle tion. InComputingS ien e inthe Netherlands, pages 62-72. Netherlands ComputerS ien eResear hFoundation,1995.

7. Chur h,A.:TheCal uliofLambdaConversion.Prin etonUniv.Press(1941).

8. Curien, P.-L.,Herbelin,H.:Theduality of omputation.Pro eedings ofICFP'00(2000), ACMPress, 233{243.

9. David,R.,Guillaume,B.: Thel- al ulus.InD. Kesner,editor,Pro eedingsof the2ndWorkshop on Expli itSubstitutions:TheoryandAppli ationstoProgramsandProofs,pages2-13,July1999. 10. David,R.,Guillaume,B.:A- al uluswithexpli itweakeningandexpli itsubstitution.Mathemati al

Stru turesinComputerS ien e,11,2001.

11. David,R.,Guillaume,B.:StrongNormalisationoftheTyped w s

- al ulus.InPro eedingsofthe17th InternationalWorshopComputerS ien eLogi (CSL2003),volume2803ofLe tureNotesinComputer S ien e,pages155-168.Springer,Vienna,2003.

12. Di Cosmo, R.,Kesner, D., Polonovski, E.:Proof netsandexpli it substitutions.InJ.Tiuryn,editor, FoundationsofSoftwareS ien eandComputationStru tures(FOSSACS2000),volume1784ofLe ture NotesinComputerS ien e,pages63-81.Springer-Verlag,Mar.2000.

(7)

429{449.

15. Kesner, D., Lengrand,S.: Broadeningthe horizon of the expli it substitution paradigmvia a logi al model.Submittedpaper(2004).

16. Les anne,P.:Fromlambda-sigmatolambda-upsilon:ajourneythrough al uliofexpli itsubstitutions. In 21st ACMSymposium on Prin iples of Programming Languages (POPL'94), 16-19 Janvier 1994, Portland,Oregon,pp60-69.

17. Mellies, P.-A.:Typed- al uliwithexpli itsubstitutionsmaynotterminate.Pro eedingsofTLCA'95 (1995),SpringerLNCS,902,328{334.

18. Parigot, M.: - al ulus: An algorithmi interpretation of lassi al naturaldedu tion. Pro eedingsof LICS'93(1993),ComputerSo ietyPress,39{46.

19. Polonovski,E.:Substitutionsexpli ites,logiqueetnormalisation.PhDthesis,UniversiteParis7,(2004). Inpreparation.

20. Polonovski, E.: Strong normalization of ~- al ulus with expli it substitutions. In Pro eedings of Foundations of Software S ien e and Computation Stru tures (FOSSACS 2004), LNCS 2987, Mar. 2004.

Figure

Fig. 1. Normalization properties of terms with and without expliit substitutions

Références

Documents relatifs

Millefeuille de courgettes et provola, sauce Puttanesca de tomates vertes et poudres d’anchois de Cetara, olives et câpres Zucchini and provola millefeuille, green tomato

Millefeuille de courgettes et provola, sauce Puttanesca de tomates vertes et poudres d’anchois de Cetara, olives et câpres Zucchini and provola millefeuille, green tomato

FSM Definition •Set of states –The states imply a notion of memory •Set of transitions between states •Set of transition labels –Simple input transition –Input/Output

Partial Symmetries [Haddad, Ilié, Ajami: FORTE'00℄. (e.g., two lients have dierent aess priorities to

steht: elementltren~ lies:

To handle the case of partial differential operators the abstract theory o f symmetric relations on a Hilbert space may be used.. The abstract theory was first

Motivated b y the reasoning leading to Theorem 5 and for later convenience we adopt the following terminology.. Suppose that sEC ~ is

Dans le bureau du chef, deux tableaux représentant l’histoire de la cuisine attirent leur regard?. ANALYSE