• Aucun résultat trouvé

The resource lambda calculus is short-sighted in its relational model

N/A
N/A
Protected

Academic year: 2022

Partager "The resource lambda calculus is short-sighted in its relational model"

Copied!
20
0
0

Texte intégral

(1)

The resource lambda calculus is short-sighted in its relational model

Flavien BREUVART

PPS, Paris Denis Diderot

26-28 June 2013

(2)

Introduction

The resource calculus (∂Λ)

A resource sensitive extension of the pureλ-calculus with linear subterms thatcannot suffer any duplication nor erasingalong the reduction.

The relational model M

M is a reflexive object of MRel, which is theco-Kleisli category of the well known model of linear logicRel.

They have good properties:

• Mis a sensible modelof∂Λ (M⇑⇔[[M]] =∅).

• Misfully abstractfor the pureλ-calculus ([Man09]).

• Both∂Λ andMare well-behaved w.r.t. Taylor expansion.

Question of [Buc&Al 11]

IsM fully abstractfor∂Λ?

My answer [TLCA13]

NO

Flavien BREUVART PPS The resource lambda calculus is short-sighted in its relational model 2 / 1

(3)

Introduction

The resource calculus (∂Λ)

A resource sensitive extension of the pureλ-calculus with linear subterms thatcannot suffer any duplication nor erasingalong the reduction.

The relational model M

M is a reflexive object of MRel, which is theco-Kleisli category of the well known model of linear logicRel.

They have good properties:

• M is a sensible modelof∂Λ (M⇑⇔[[M]] =∅).

• M isfully abstractfor the pureλ-calculus ([Man09]).

• Both∂Λ andM are well-behaved w.r.t. Taylor expansion.

Question of [Buc&Al 11]

IsM fully abstractfor∂Λ?

My answer [TLCA13]

NO

(4)

Definition of ∂Λ

Grammar

(terms) Λ M,N::= x | λx.M | M P

(bags) Λb P,Q ::= [M!] | [M] | [] | P·Q (sums) Λs L,M∈ Mf(Λ)

[N!] is a usualλ-calculus argument, used as many time as wanted.

[N] is a linear argument, used exactly once.

[] the absence of arguments.

P·Q is the union of bags, i.e. parallel composition of arguments.

Λs possible outcomes of a computation are finite sums of terms.

Reduction (by examples)

(λx.x [x]) [u!]→u[u] (λx.x [x]) [u]→0 (λx.x [x]) [u,v]→(u[v])+(v [u]) (λx.x [x!]) [u]→u []

(λx.x [x!]) [u,v,w]→(u [v,w])+(v [u,w])+(w [u,v])

Flavien BREUVART PPS The resource lambda calculus is short-sighted in its relational model 3 / 1

(5)

Observational semantic of ∂Λ

Reduction Strategy

outer-reduction: Reduction under anynon bangedcontext.

outer-normal forms: terms with no possible outer-reductions:

λx1...xk.y P1· · ·Pp

where

Pi = [N1, ...,Nn,M1!, ...,Mm!] withN1, ...,Nn in outer-normal form.

may-outer-convergence: converges to a sum containing a normal form:

M⇓ iff M→ΣiNi such that ∃Ni∈ONF

Example

(λx.(x [M!]))+Nis amonfform but notλx.(x [(λy.y)x]).

Operational order (v

o

)

M voN iff ∀C(|.|), C(|M|)⇓ ⇒ C(|N|)⇓

(6)

Definition of the CCC MRel

A categorical model of linear logic: Rel

Objects: Sets Morphisms: Relations Exponential: !A=Mf(A)

Remark: this is the free exponential.

The co-kleisli category: MRel

Objects: Sets Morphisms: relations fromMf(A) andB Identities: 1A ={([α], α)|α∈A}

Composition: f;g :={(Σβ∈baβ, α)|(b, α)∈g,(aβ, β)∈f} Cartesian product: ˘

i∈IAi:={(i, α)|i∈I, α∈Ai} Object of morphisms: A⇒B=Mf(A)×B All ccc-diagrams are given by the co-Kleisli construction from the exponential comonad.

Flavien BREUVART PPS The resource lambda calculus is short-sighted in its relational model 5 / 1

(7)

Definition of M

A reflexive object of MRel: M

M0=∅ Mn+1=Mf(Mn)(ω) M=[ Mn

app andabs such that M app

abs(M⇒M) are trivial.

Mf(Mn)(ω): infinite quazi-everywhere empty lists of multisets overMn. This is the smallest solution of the equationD:= (!˘

ωD) whose solutions are solutions ofD:= (!D)`D (em i.e. D:=D⇒D) but does not contain∅.

Grammar of M

(M) α, β ::= ∗ | a→α

Mf(M) a,b ::= [α1, ..., αk] With the equation: ∗:= []→∗

so that∗represent theinfinite list of empty multisets.

(8)

Interpretation of ∂λ into M

[[M]]~x ⊆(Mf(M)~x×M) [[P]]~x ⊆(Mf(M)~x× Mf(M))

Interpretation (by examples)

[[x]]yx ={([][α], α)} [[λx.x]] ={[α]→α}

[[[x!]]]x ={(a,a)} [[[x, λy.x]]]x ={([α, β],[α,[]→β]}

[[λy.y [x!]]]x ={(a,[a→α]→α} [[λy.y [x]]]x ={([β],[[β]→α]→α)}

[[M+N]]x = [[M]]x ∪[[N]]x [[[M!,N!]]] ={a·a0|a∈[[M]],a0∈[[N]]}

[[Ω]] =∅ [[Θ]] ={([Πα∈abα→β]·a)→β |(bα→α)∈[[Θ]]}

Remark: One can also see the interpretation as typing judgment into the non-idempotent type-system that isM.

Flavien BREUVART PPS The resource lambda calculus is short-sighted in its relational model 7 / 1

(9)

Full abstraction of M

for ∂λ ?

Sensibility

Mis sensible for ∂λ:

M⇓ ⇔ [[M]]6=∅

Inequational adequation

M is inequationally adequate for∂λ

[[M]]~x ⊆[[N]]~x ⇒ MvoN Those are obtained easily using Taylor expansion and its properties [TLCA13].

Failure of

Inequational completeness

MvoN ⇒ [[M]]~x ⊆[[N]]~x

Failure of completeness

M≡oN ⇒ [[M]]~x = [[N]]~x

These assertions are equivalents:

M voN⇔M+N≡oN [[M]]⊆[[N]]⇔[[M+N]] = [[N]]

(10)

Full abstraction of M

for ∂λ ?

Sensibility

Mis sensible for ∂λ:

M⇓ ⇔ [[M]]6=∅

Inequational adequation

M is inequationally adequate for∂λ

[[M]]~x ⊆[[N]]~x ⇒ MvoN Those are obtained easily using Taylor expansion and its properties [TLCA13].

Failure of

Inequational completeness

MvoN ⇒ [[M]]~x ⊆[[N]]~x

Failure of completeness

M≡oN ⇒ [[M]]~x = [[N]]~x

These assertions are equivalents:

M voN⇔M+N≡oN [[M]]⊆[[N]]⇔[[M+N]] = [[N]]

Flavien BREUVART PPS The resource lambda calculus is short-sighted in its relational model 8 / 1

(11)

A such that λx .x v

o

A and [[λx.x ]] 6⊆ [[A]]

A := Θ [G, F

!

]

G:=λuvw.w [(λx.x) [v!]] F:=λuv1v2.u[(λx.x) [v1!] [v2!]]

A can be seen as a non deterministic While

Gis the stopping condition, andFthe continuation condition: A ≡β G[A!] +F[A!] ≡β G[A!] +F[G[A!]] +F2[A!] ≡β · · ·

A as an infinite sum

A'Σn≥1Bnwith forn≥1:

Bn=λv1. . .vnw.w [(λx.x) [v1!] [v2!] · · · [vn!]]

G[A!] →o B1 For alli, F[B!i] →o Bi+1 A≡βB1+F[A] ≡β B1+B2+F2[A] ≡βkn=1Bn)+Fk[A]

(12)

A such that λx .x v

o

A and [[λx.x ]] 6⊆ [[A]]

A := Θ [G, F

!

]

G:=λuvw.w [(λx.x) [v!]] F:=λuv1v2.u[(λx.x) [v1!] [v2!]]

A can be seen as a non deterministic While

Gis the stopping condition, andFthe continuation condition:

A ≡β G[A!] +F[A!] ≡β G[A!] +F[G[A!]] +F2[A!] ≡β · · ·

A as an infinite sum

A'Σn≥1Bnwith forn≥1:

Bn=λv1. . .vnw.w [(λx.x) [v1!] [v2!] · · · [vn!]]

G[A!] →o B1 For alli, F[B!i] →o Bi+1 A≡βB1+F[A] ≡β B1+B2+F2[A] ≡βkn=1Bn)+Fk[A]

Flavien BREUVART PPS The resource lambda calculus is short-sighted in its relational model 9 / 1

(13)

A such that λx .x v

o

A and [[λx.x ]] 6⊆ [[A]]

A := Θ [G, F

!

]

G:=λuvw.w [(λx.x) [v!]] F:=λuv1v2.u[(λx.x) [v1!] [v2!]]

A can be seen as a non deterministic While

Gis the stopping condition, andFthe continuation condition:

A ≡β G[A!] +F[A!] ≡β G[A!] +F[G[A!]] +F2[A!] ≡β · · ·

A as an infinite sum

A'Σn≥1Bnwith forn≥1:

Bn=λv1. . .vnw.w [(λx.x) [v1!] [v2!] · · · [vn!]]

G[A!] →o B1 For alli, F[B!i] →o Bi+1 A≡βB1+F[A] ≡β B1+B2+F2[A] ≡βkn=1Bn)+Fk[A]

(14)

λx.x and Σ

i

B

i

A'Σn≥1Bn with forn≥1 : Bn=λv1. . .vnw.w [(λx.x) [v1!] [v2!] · · · [vn!]]

λx .x v

o

Σ

i

B

i

If (λx.x)P1· · ·Pk converges then:

Bk P1· · ·Pkλw.w [(λx.x)P1· · · Pk]

Remark: We are using a context lemma for∂λ[TLCA13]

[[λx.x ]]6 ⊆ Σ

i

B

i

[∗]→∗∈[[λx.x]], but for everyn, [∗]→∗6∈[[Bn]]:

[∗]→∗∈[[Bn]]⇔([∗][]· · ·[][],∗)∈[[w [(λx.x)[v1!] [v2!]· · ·[vn]]]]v1...vnw What isimpossible.

Flavien BREUVART PPS The resource lambda calculus is short-sighted in its relational model 10 / 1

(15)

Clues for the full abstraction

• M is fully abstract for theλ-calculus ([Manzonetto09])

Nomay non determinism

• M is fully abstract for the purely linear fragment ([Buc &Al 12])

Nofixpoint combinator

• M is fully abstract for an extension of∂λwith tests ([Buc &Al 11])

presence of contexts of infinite range

• No intuitive counter-example found

intuition is mainly based on typed system

Our result, A := Θ [G, F

!

]

We construct a counter-example as combination of anuntyped fixpoint and amay non deterministic argumentto create a term ofinfinite range whose behavior will not respect the semantics.

(16)

Clues for the full abstraction

• M is fully abstract for theλ-calculus ([Manzonetto09]) Nomay non determinism

• M is fully abstract for the purely linear fragment ([Buc &Al 12]) Nofixpoint combinator

• M is fully abstract for an extension of∂λwith tests ([Buc &Al 11]) presence of contexts of infinite range

• No intuitive counter-example found

intuition is mainly based on typed system

Our result, A := Θ [G, F

!

]

We construct a counter-example as combination of anuntyped fixpoint and amay non deterministic argumentto create a term ofinfinite range whose behavior will not respect the semantics.

Flavien BREUVART PPS The resource lambda calculus is short-sighted in its relational model 11 / 1

(17)

Clues for the full abstraction

• M is fully abstract for theλ-calculus ([Manzonetto09]) Nomay non determinism

• M is fully abstract for the purely linear fragment ([Buc &Al 12]) Nofixpoint combinator

• M is fully abstract for an extension of∂λwith tests ([Buc &Al 11]) presence of contexts of infinite range

• No intuitive counter-example found

intuition is mainly based on typed system

Our result, A := Θ [G, F

!

]

We construct a counter-example as combination of anuntyped fixpoint and amay non deterministic argumentto create a term ofinfinite range whose behavior will not respect the semantics.

(18)

The short-sightedness

Observations in ∂λ

They are performed by finite applicative contexts, thustheir range is finite.

Observations in M

They are performed by elements ofM that are infinite lists, thus their range are infinite.

Range of ∂λ

∂λcontainsterms of infinite rangethat can outrange the operational observations but not the denotational one.

Over-approximation?

Over-approximations in denota- tional semantics aretoo strong.

Must/probabilistic?

Are must and probabilistic convergences more natural? In any case the problem of finding a fully abstract model of∂λ is reopen.

Flavien BREUVART PPS The resource lambda calculus is short-sighted in its relational model 12 / 1

(19)

The short-sightedness

Observations in ∂λ

They are performed by finite applicative contexts, thustheir range is finite.

Observations in M

They are performed by elements ofM that are infinite lists, thus their range are infinite.

Range of ∂λ

∂λcontainsterms of infinite rangethat can outrange the operational observations but not the denotational one.

Over-approximation?

Over-approximations in denota- tional semantics aretoo strong.

Must/probabilistic?

Are must and probabilistic convergences more natural?

In any case the problem of finding a fully abstract model of∂λ is reopen.

(20)

Conclusion

A term of infinite range

A=Θ[G,F!]: A non deterministic while that canchooseits head variable

M

is not inequationally fully abstract for ∂λ

(λx.x)voA but [[λx.x]]6⊆[[A]]

M

is not fully abstract for ∂λ

(A+λx.x)≡oA but [[A+λx.x]]6= [[A]]

Questions?

Flavien BREUVART PPS The resource lambda calculus is short-sighted in its relational model 13 / 1

Références

Documents relatifs

In this paper we proposed a general categorical definition of model of the untyped differential λ-calculus, namely the notion of linear reflexive object living in a Cartesian

The cusp/core (CC) problem [ 31 , 37 ], designating the discrepancy between the flat density profiles of dwarf galaxies (also coined dwarfs), Irregulars, and Low Surface

Any extensional K-model D that is hyperimmune and commutes with B¨ohm trees is inequationally fully abstract for the pure

Volný, A strictly stationary β-mixing process satisfying the central limit theorem but not the weak invariance principle, Stochastic Process. Volný, A counter example to central

Toute utili- sation commerciale ou impression systématique est constitutive d’une infraction pénale.. Toute copie ou impression de ce fichier doit conte- nir la présente mention

Delia KESNER IRIF, CNRS et Universit ´e Paris kesner@irif.fr www.irif.fr/˜kesner.. The Untyped

In this paper, we present an extension of λµ-calculus called λµ ++ - calculus which has the following properties: subject reduction, strong normalization, unicity of the

Since the proofs in the implicative propositional classical logic can be coded by Parigot’s λµ-terms and the cut elimination corresponds to the λµ-reduction, the result can be seen as