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

confluence of the call by value calculus
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 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

slide-2
SLIDE 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

slide-3
SLIDE 3

The λµ∧∨ calculus

Γ, x : A ⊢ x : A ; ∆ax Γ, x : A ⊢ t : B; ∆ Γ ⊢ λx.t : A → B; ∆→i Γ ⊢ u : A → B; ∆ Γ ⊢ v : A; ∆ Γ ⊢ (u v) : B; ∆

→e

Γ ⊢ uj : Aj; ∆ Γ ⊢ u1, u2 : A1 ∧ A2; ∆∧j i Γ ⊢ t : A1 ∧ A2; ∆ Γ ⊢ (t πj) : Aj; ∆∧j e Γ ⊢ t : A;∆ Γ ⊢ ω1t : A ∨ B; ∆∨1 i Γ ⊢ t : B; ∆ Γ ⊢ ω2t : A ∨ B; ∆∨2 i Γ ⊢ t : A ∨ B; ∆ Γ, x : A ⊢ u : C; ∆ Γ, y : B ⊢ v : C; ∆ Γ ⊢ (t [x.u, y.v]) : C; ∆

∨e

Γ ⊢ t : A; ∆, a : A Γ ⊢ (a t) : ⊥; ∆, a : A Γ ⊢ t : ⊥; ∆, a : A Γ ⊢ µa.t : A; ∆

3

slide-4
SLIDE 4

The syntax

T := X |λX.T |(T E) |T , T |ωiT |µA.T |(A T ) E := T | πi | [X.T , X.T ]

The reduction rules

  • (λx.u v) ⊲β u[x := v]
  • (t1, t2 πi) ⊲π ti
  • (ωit [x1.u1, x2.u2]) ⊲D ui[xi := t]
  • ((t [x1.u1, x2.u2]) ε)⊲δ(t [x1.(u1 ε), x2.(u2 ε)])
  • (µ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

slide-5
SLIDE 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

slide-6
SLIDE 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 | ω1V | ω2V | (A T )

6

slide-7
SLIDE 7

The reduction rules

  • (λx.t V ) ⊲βv t[x := V ]
  • (t1, t2 πi) ⊲π ti
  • (ωiV

[x1.t1, x2.t2]) ⊲Dv ti[xi := V ]

  • ((t [x1.t1, x2.t2]) ε)⊲δ(t [x1.(t1 ε), x2.(t2 ε)])
  • (V (t [x1.t1, x2.t2]))⊲δ′

v(t [x1.(V t1), x2.(V t2)])

  • (µa.t ε) ⊲µ µa.t[a :=∗ ε].
  • (V

µa.t) ⊲µ′

v µa.t[a :=∗ V ].

  • ωiµa.t ⊲ωi µa.t[a :=ωi].

7

slide-8
SLIDE 8

Subformula property

Notation

  • t⊲vt′ if t is reduced to t′ by one of reduction

rules above.

  • t ⊲∗

v t′ denotes the transitive and reflexive

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

slide-9
SLIDE 9

Confluence

Theorem If t ⊲∗

v t1 and t ⊲∗ v t2, then there exists

t3 such that t1 ⊲∗

v t3 and t2 ⊲∗ v t3.

Proof The generalized parallel reductions

  • ⊲v

⊂ ≻ ⊂ ⊲∗

v

  • ≻ is strongly confluente

9

slide-10
SLIDE 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 ωit ≻ ωit′
  • If t ≻ t′ and u ≻ u′, then t, u ≻ t′, u′
  • If t ≻ t′ and ε ≻ ε′, then (t ε) ≻ (t′ ε′)

10

slide-11
SLIDE 11
  • If t ≻ λx.t′ and V ≻ V ′,

then (t V ) ≻ t′[x := V ′]

  • If t ≻ t1, t2, then (t πi) ≻ ti
  • If t ≻ ωiV and ui ≻ u′

i,

then (t [x1, u1, x2, u2]) ≻ u′

i[xi := V ]

  • If t ≻ µa.t′ and ε ≻ ε′,

then (t ε) ≻ µa.t′[a :=∗ ε′]

  • If t ≻ (u [x1, u1, x2, u2]),u ≻ u′, ui ≻ u′

i and

ε ≻ ε′, then (t ε) ≻ (u′ [x1, (u′

1 ε′), x2, (u′ 2 ε′)])

11

slide-12
SLIDE 12
  • If t ≻ (u [x1, u1, x2, u2]),u ≻ u′, ui ≻ u′

i and

V ≻ V ′, then (V t) ≻ (u′ [x1, (V ′ u′

1), x2, (V ′ u′ 2)])

  • If V

≻ V ′ and t ≻ µa.u, then (V t) ≻ µa.u[a :=∗ V ]

  • If t ≻ µa.u, then ωit ≻ µ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

slide-13
SLIDE 13

Lemmas

t ≻n t′ denotes that t is reduced to t′ by n

  • ne-steps of ≻.

Lemma

  • If t ⊲v t′, then t ≻ t′.
  • If t ⊲∗

v t′, then t ≻n t′

  • If t ≻n t′, then t ⊲∗

v t′

The key lemma If t ≻n t1 and t ≻m t2, then there exists t3 such that t1 ≻m t3 and t2 ≻n t3. Proof By induction on t.

13

slide-14
SLIDE 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