confluence of the call by value calculus
play

Confluence of the Call-By-Value -calculus Karim NOUR and Khelifa - PDF document

Confluence of the Call-By-Value -calculus Karim NOUR and Khelifa SABER LAMA - Equipe de logique Universit e de Chamb ery 73376 Le Bourget du Lac e-mail: { knour, ksabe } @univ-savoie.fr 1 Plan 1. The -calculus


  1. Confluence of the Call-By-Value λµ ∧∨ -calculus Karim NOUR and Khelifa SABER LAMA - Equipe de logique Universit´ e de Chamb´ ery 73376 Le Bourget du Lac e-mail: { knour, ksabe } @univ-savoie.fr 1

  2. Plan 1. The λµ ∧∨ -calculus • The typed system, syntax and reduction rules. • The main properties. 2. The call-by-value calculus • Subformula property • The new reduction rules • Confluence and the parallel reduction 3. Futur work. 2

  3. The λµ ∧∨ calculus Γ , x : A ⊢ x : A ; ∆ ax Γ , x : A ⊢ t : B ; ∆ Γ ⊢ u : A → B ; ∆ Γ ⊢ v : A ; ∆ Γ ⊢ λx.t : A → B ; ∆ → i → e Γ ⊢ ( u v ) : B ; ∆ Γ ⊢ u j : A j ; ∆ Γ ⊢ t : A 1 ∧ A 2 ; ∆ Γ ⊢ � u 1 , u 2 � : A 1 ∧ A 2 ; ∆ ∧ j Γ ⊢ ( t π j ) : A j ; ∆ ∧ j e i Γ ⊢ t : A ; ∆ Γ ⊢ t : B ; ∆ Γ ⊢ ω 1 t : A ∨ B ; ∆ ∨ 1 Γ ⊢ ω 2 t : A ∨ B ; ∆ ∨ 2 i i Γ ⊢ t : A ∨ B ; ∆ Γ , x : A ⊢ u : C ; ∆ Γ , y : B ⊢ v : C ; ∆ ∨ e Γ ⊢ ( t [ x.u, y.v ]) : C ; ∆ Γ ⊢ t : A ; ∆ , a : A Γ ⊢ t : ⊥ ; ∆ , a : A Γ ⊢ ( a t ) : ⊥ ; ∆ , a : A Γ ⊢ µa.t : A ; ∆ 3

  4. The syntax T := X | λ X . T | ( T E ) |�T , T � | ω i T | ( A T ) | µ A . T E := T | π i | [ X . T , X . T ] The reduction rules • ( λx.u v ) ⊲ β u [ x := v ] • ( � t 1 , t 2 � π i ) ⊲ π t i • ( ω i t [ x 1 .u 1 , x 2 .u 2 ]) ⊲ D u i [ x i := t ] • (( t [ x 1 .u 1 , x 2 .u 2 ]) ε ) ⊲ δ ( t [ x 1 . ( u 1 ε ) , x 2 . ( u 2 ε )]) • ( µa.t ε ) ⊲ µ µa.t [ a := ∗ ε ] where t [ a := ∗ ε ] is obtained from t by replacing induc- tively each subterm in the form ( a v ) by ( a ( v ε )) . 4

  5. The main properties • Subject reduction • Subformula property Ph. De Groote • Confluence Ph. De Groote Y. Andou K. Nour and K. Saber • Strong normalization Ph. De Groote R. David and K. Nour K. Nour and K. Saber R. Matthes 5

  6. The Call-By-Value We need the following properties: • Subformula property Each closed normalizable term (in the or- dinary calculus) can be normalized in the Call-By-value calculus to its really normal form. • Confluence • Strong normalization What are the values? V := X | λ X . T | �T , T � | ω 1 V | ω 2 V | ( A T ) 6

  7. The reduction rules • ( λx.t V ) ⊲ β v t [ x := V ] • ( � t 1 , t 2 � π i ) ⊲ π t i • ( ω i V [ x 1 .t 1 , x 2 .t 2 ]) ⊲ D v t i [ x i := V ] • (( t [ x 1 .t 1 , x 2 .t 2 ]) ε ) ⊲ δ ( t [ x 1 . ( t 1 ε ) , x 2 . ( t 2 ε )]) • ( V ( t [ x 1 .t 1 , x 2 .t 2 ])) ⊲ δ ′ v ( t [ x 1 . ( V t 1 ) , x 2 . ( V t 2 )]) • ( µa.t ε ) ⊲ µ µa.t [ a := ∗ ε ]. • ( V µa.t ) ⊲ µ ′ v µa.t [ a := ∗ V ]. • ω i µa.t ⊲ ω i µa.t [ a := ω i ]. 7

  8. Subformula property Notation • t⊲ v t ′ if t is reduced to t ′ by one of reduction rules above. v t ′ denotes the transitive and reflexive • t ⊲ ∗ closure of ⊲ v . Proposition If t is a closed term and t ⊲ ∗ τ where τ is a normal form, then t ⊲ ∗ v τ . Proof This gives the new rules: ⊲ δ ′ v and ⊲ ω i . 8

  9. Confluence Theorem If t ⊲ ∗ v t 1 and t ⊲ ∗ v t 2 , then there exists t 3 such that t 1 ⊲ ∗ v t 3 and t 2 ⊲ ∗ v t 3 . Proof The generalized parallel reductions ⊲ ∗ • ⊲ v ⊂ ≻ ⊂ v • ≻ is strongly confluente 9

  10. Generalized parallel reduction • x ≻ x • If t ≻ t ′ , then λx.t ≻ λx.t ′ • If t ≻ t ′ , then µa.t ≻ µa.t ′ • If t ≻ t ′ , then ( a t ) ≻ ( a t ′ ) • If t ≻ t ′ , then ω i t ≻ ω i t ′ • If t ≻ t ′ and u ≻ u ′ , then � t, u � ≻ � t ′ , u ′ � • If t ≻ t ′ and ε ≻ ε ′ , then ( t ε ) ≻ ( t ′ ε ′ ) 10

  11. • If t ≻ λx.t ′ and V ≻ V ′ , then ( t V ) ≻ t ′ [ x := V ′ ] • If t ≻ � t 1 , t 2 � , then ( t π i ) ≻ t i • If t ≻ ω i V and u i ≻ u ′ i , then ( t [ x 1 , u 1 , x 2 , u 2 ]) ≻ u ′ i [ x i := V ] • If t ≻ µa.t ′ and ε ≻ ε ′ , then ( t ε ) ≻ µa.t ′ [ a := ∗ ε ′ ] • If t ≻ ( u [ x 1 , u 1 , x 2 , u 2 ]), u ≻ u ′ , u i ≻ u ′ i and ε ≻ ε ′ , then ( t ε ) ≻ ( u ′ [ x 1 , ( u ′ 1 ε ′ ) , x 2 , ( u ′ 2 ε ′ )]) 11

  12. • If t ≻ ( u [ x 1 , u 1 , x 2 , u 2 ]), u ≻ u ′ , u i ≻ u ′ i and V ≻ V ′ , then ( V t ) ≻ ( u ′ [ x 1 , ( V ′ u ′ 1 ) , x 2 , ( V ′ u ′ 2 )]) ≻ V ′ and t ≻ µa.u , then ( V • If V t ) ≻ µa.u [ a := ∗ V ] • If t ≻ µa.u , then ω i t ≻ µa.u [ a := ω i ] • If t ≻ µa.u [ a := ∗ [ x.p, y.q ]], u ≻ u ′ , p ≻ p ′ , q ≻ q ′ , and ε ≻ ε ′ , then ( t ε ) ≻ µa.u ′ [ a := ∗ [ x. ( p ′ ε ′ ) , y. ( q ′ ε ′ )]] • If t ≻ µa.u [ a := ∗ [ x.p, y.q ]], u ≻ u ′ , p ≻ p ′ , q ≻ q ′ , and V ≻ V ′ , then ( V t ) ≻ µa.u ′ [ a := ∗ [ x. ( V ′ p ′ ) , y. ( V ′ q ′ )]] 12

  13. Lemmas t ≻ n t ′ denotes that t is reduced to t ′ by n one-steps of ≻ . Lemma • If t ⊲ v t ′ , then t ≻ t ′ . v t ′ , then t ≻ n t ′ • If t ⊲ ∗ • If t ≻ n t ′ , then t ⊲ ∗ v t ′ The key lemma If t ≻ n t 1 and t ≻ m t 2 , then there exists t 3 such that t 1 ≻ m t 3 and t 2 ≻ n t 3 . Proof By induction on t . 13

  14. What about the strong normalization ? Is very difficult in the presence of the µ ′ -rule. • W. Py and R. David: µµ ′ v • K. Nakazawa: µµ ′ v . • R. David and K. Nour: µµ ′ 14

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend