+ All Categories
Home > Education > The probability of non-confluent systems

The probability of non-confluent systems

Date post: 18-Dec-2014
Category:
Upload: alejandro-diaz-caro
View: 56 times
Download: 0 times
Share this document with a friend
Description:
We show how to provide a structure of probability space to the set of execution traces on a non-confluent abstract rewrite system, by defining a variant of a Lebesgue measure on the space of traces. Then, we show how to use this probability space to transform a non-deterministic calculus into a probabilistic one. We use as example λ+, a recently introduced calculus defined with techniques from deduction modulo.
44
The probability of non-confluent systems Alejandro Díaz-Caro Université Paris Ouest INRIA – Paris–Rocquencourt Gilles Dowek INRIA – Paris–Rocquencourt 9th International Workshop Developments in Computational Models Buenos Aires, August 26, 2013
Transcript
Page 1: The probability of non-confluent systems

The probabilityof non-confluent systems

Alejandro Díaz-CaroUniversité Paris Ouest

INRIA – Paris–Rocquencourt

Gilles DowekINRIA – Paris–Rocquencourt

9th International WorkshopDevelopments in Computational Models

Buenos Aires, August 26, 2013

Page 2: The probability of non-confluent systems

MotivationNon-deterministic vs. Probabilistic λ-calculus

Non-determinism Probabilities

r + snon-deterministic superposition(run r or s, non-deterministically)

p.r + q.sprobabilistic superposition(run r with probability por s with probability q)

(r + s)t may run rt or stHence (r + s)t→ rt + st

π(r + s)yy %%r s

(p.r + q.s)t→ p.rt + q.stp.q.r→ pq.r

p.(r + s)→ p.r + p.sp.r + q.r→ (p + q).r

I Non-deterministic projectorI Second order propositional logicI Quantitative characterisation in LLI Etc.

I Vectorial characterisationI Quantum encoding

(relaxing the scalars)

I Logical side: much harder

Goal: To move from ND to Prob. without loosing the connections with logic

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 1/16

Page 3: The probability of non-confluent systems

MotivationNon-deterministic vs. Probabilistic λ-calculus

Non-determinism Probabilities

r + snon-deterministic superposition(run r or s, non-deterministically)

p.r + q.sprobabilistic superposition(run r with probability por s with probability q)

(r + s)t may run rt or stHence (r + s)t→ rt + st

π(r + s)yy %%r s

(p.r + q.s)t→ p.rt + q.stp.q.r→ pq.r

p.(r + s)→ p.r + p.sp.r + q.r→ (p + q).r

I Non-deterministic projectorI Second order propositional logicI Quantitative characterisation in LLI Etc.

I Vectorial characterisationI Quantum encoding

(relaxing the scalars)

I Logical side: much harder

Goal: To move from ND to Prob. without loosing the connections with logic

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 1/16

Page 4: The probability of non-confluent systems

MotivationNon-deterministic vs. Probabilistic λ-calculus

Non-determinism Probabilities

r + snon-deterministic superposition(run r or s, non-deterministically)

p.r + q.sprobabilistic superposition(run r with probability por s with probability q)

(r + s)t may run rt or stHence (r + s)t→ rt + st

π(r + s)yy %%r s

(p.r + q.s)t→ p.rt + q.stp.q.r→ pq.r

p.(r + s)→ p.r + p.sp.r + q.r→ (p + q).r

I Non-deterministic projectorI Second order propositional logicI Quantitative characterisation in LLI Etc.

I Vectorial characterisationI Quantum encoding

(relaxing the scalars)

I Logical side: much harder

Goal: To move from ND to Prob. without loosing the connections with logic

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 1/16

Page 5: The probability of non-confluent systems

MotivationNon-deterministic vs. Probabilistic λ-calculus

Non-determinism Probabilities

r + snon-deterministic superposition(run r or s, non-deterministically)

p.r + q.sprobabilistic superposition(run r with probability por s with probability q)

(r + s)t may run rt or stHence (r + s)t→ rt + st

π(r + s)yy %%r s

(p.r + q.s)t→ p.rt + q.stp.q.r→ pq.r

p.(r + s)→ p.r + p.sp.r + q.r→ (p + q).r

I Non-deterministic projectorI Second order propositional logicI Quantitative characterisation in LLI Etc.

I Vectorial characterisationI Quantum encoding

(relaxing the scalars)

I Logical side: much harder

Goal: To move from ND to Prob. without loosing the connections with logic

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 1/16

Page 6: The probability of non-confluent systems

MotivationNon-deterministic vs. Probabilistic λ-calculus

Non-determinism Probabilities

r + snon-deterministic superposition(run r or s, non-deterministically)

p.r + q.sprobabilistic superposition(run r with probability por s with probability q)

(r + s)t may run rt or stHence (r + s)t→ rt + st

π(r + s)yy %%r s

(p.r + q.s)t→ p.rt + q.stp.q.r→ pq.r

p.(r + s)→ p.r + p.sp.r + q.r→ (p + q).r

I Non-deterministic projectorI Second order propositional logicI Quantitative characterisation in LLI Etc.

I Vectorial characterisationI Quantum encoding

(relaxing the scalars)

I Logical side: much harder

Goal: To move from ND to Prob. without loosing the connections with logic

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 1/16

Page 7: The probability of non-confluent systems

MotivationNon-deterministic vs. Probabilistic λ-calculus

Non-determinism Probabilities

r + snon-deterministic superposition(run r or s, non-deterministically)

p.r + q.sprobabilistic superposition(run r with probability por s with probability q)

(r + s)t may run rt or stHence (r + s)t→ rt + st

π(r + s)yy %%r s

(p.r + q.s)t→ p.rt + q.stp.q.r→ pq.r

p.(r + s)→ p.r + p.sp.r + q.r→ (p + q).r

I Non-deterministic projectorI Second order propositional logicI Quantitative characterisation in LLI Etc.

I Vectorial characterisationI Quantum encoding

(relaxing the scalars)

I Logical side: much harder

Goal: To move from ND to Prob. without loosing the connections with logic

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 1/16

Page 8: The probability of non-confluent systems

MotivationNon-deterministic vs. Probabilistic λ-calculus

Non-determinism Probabilities

r + snon-deterministic superposition(run r or s, non-deterministically)

p.r + q.sprobabilistic superposition(run r with probability por s with probability q)

(r + s)t may run rt or stHence (r + s)t→ rt + st

π(r + s)yy %%r s

(p.r + q.s)t→ p.rt + q.stp.q.r→ pq.r

p.(r + s)→ p.r + p.sp.r + q.r→ (p + q).r

I Non-deterministic projectorI Second order propositional logicI Quantitative characterisation in LLI Etc.

I Vectorial characterisationI Quantum encoding

(relaxing the scalars)

I Logical side: much harder

Goal: To move from ND to Prob. without loosing the connections with logicAlejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 1/16

Page 9: The probability of non-confluent systems

OutlineGoal: To move from Non-determinism to Probilities

I General technique

I Application to a particular case

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 2/16

Page 10: The probability of non-confluent systems

OutlineGoal: To move from Non-determinism to Probilities

I General technique

I Application to a particular case

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 2/16

Page 11: The probability of non-confluent systems

IntuitionFrom non-determinism to probabilities

π(r + π(s + t) + t)

π(s + t)

''r s t

7→

π(r + π(s + t) + t)

13

13

13

π(s + t)12

12

''r s t

∼ 13.r +

16.s +

12.t

An easier way. . .

π(r + r + s + t + t + t)

r tt16

r zz16

s16

t 16

t$$16

t**16

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 3/16

Page 12: The probability of non-confluent systems

IntuitionFrom non-determinism to probabilities

π(r + π(s + t) + t)

π(s + t)

''r s t

7→

π(r + π(s + t) + t)

13

13

13

π(s + t)12

12

''r s t

∼ 13.r +

16.s +

12.t

An easier way. . .

π(r + r + s + t + t + t)

r tt16

r zz16

s16

t 16

t$$16

t**16

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 3/16

Page 13: The probability of non-confluent systems

IntuitionFrom non-determinism to probabilities

π(r + π(s + t) + t)

π(s + t)

''r s t

7→

π(r + π(s + t) + t)

13

13

13

π(s + t)12

12

''r s t

∼ 13.r +

16.s +

12.t

An easier way. . .

π(r + r + s + t + t + t)

r tt16

r zz16

s16

t 16

t$$16

t**16

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 3/16

Page 14: The probability of non-confluent systems

IntuitionGeneralising the problem to abstract rewrite systems

Idea: to define a variant of a Lebesgue measure for sets of realnumbers, on the space of traces

1st Define an intuitive measure on single rewrites

d

b

12 7712 // e

e.g. If a

13 <<

13 //13

""

cthen p(a→ c) = 1

3 + 13 and

p(a→ b;b→ d) = 13 ×

12 = 1

6

c

2nd Generalise it to arbitrary sets of rewrites taking the minimal cover withsets of single rewrites

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 4/16

Page 15: The probability of non-confluent systems

IntuitionGeneralising the problem to abstract rewrite systems

Idea: to define a variant of a Lebesgue measure for sets of realnumbers, on the space of traces

1st Define an intuitive measure on single rewrites

d

b

12 7712 // e

e.g. If a

13 <<

13 //13

""

cthen p(a→ c) = 1

3 + 13 and

p(a→ b;b→ d) = 13 ×

12 = 1

6

c

2nd Generalise it to arbitrary sets of rewrites taking the minimal cover withsets of single rewrites

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 4/16

Page 16: The probability of non-confluent systems

IntuitionGeneralising the problem to abstract rewrite systems

Idea: to define a variant of a Lebesgue measure for sets of realnumbers, on the space of traces

1st Define an intuitive measure on single rewrites

d

b

12 7712 // e

e.g. If a

13 <<

13 //13

""

cthen p(a→ c) = 1

3 + 13 and

p(a→ b;b→ d) = 13 ×

12 = 1

6

c

2nd Generalise it to arbitrary sets of rewrites taking the minimal cover withsets of single rewrites

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 4/16

Page 17: The probability of non-confluent systems

IntuitionGeneralising the problem to abstract rewrite systems

Idea: to define a variant of a Lebesgue measure for sets of realnumbers, on the space of traces

1st Define an intuitive measure on single rewrites

d

b

12 7712 // e

e.g. If a

13 <<

13 //13

""

cthen p(a→ c) = 1

3 + 13 and

p(a→ b;b→ d) = 13 ×

12 = 1

6

c

2nd Generalise it to arbitrary sets of rewrites taking the minimal cover withsets of single rewrites

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 4/16

Page 18: The probability of non-confluent systems

FormalisationStrategies

Λ: set of objects →: Λ× Λ→ N a→ b notation for → (a,b) 6= 0.

Definition (Degree)

ρ(a) =∑

b

→ (a,b)e.g.

b

a

77

//

''b

c

ρ(a) = 3

Definition (Strategy)f (a) = b implies a→ b Ω = set of all the strategies

e.g. Rewrite system

a

b c

d e

Ω = f , g , h, i, with

f (a) = b g(a) = bf (c) = d g(c) = e

h(a) = c i(a) = ch(c) = d i(c) = e

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 5/16

Page 19: The probability of non-confluent systems

FormalisationStrategies

Λ: set of objects →: Λ× Λ→ N a→ b notation for → (a,b) 6= 0.

Definition (Degree)

ρ(a) =∑

b

→ (a,b)e.g.

b

a

77

//

''b

c

ρ(a) = 3

Definition (Strategy)f (a) = b implies a→ b Ω = set of all the strategies

e.g. Rewrite system

a

b c

d e

Ω = f , g , h, i, with

f (a) = b g(a) = bf (c) = d g(c) = e

h(a) = c i(a) = ch(c) = d i(c) = e

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 5/16

Page 20: The probability of non-confluent systems

FormalisationStrategies

Λ: set of objects →: Λ× Λ→ N a→ b notation for → (a,b) 6= 0.

Definition (Degree)

ρ(a) =∑

b

→ (a,b)e.g.

b

a

77

//

''b

c

ρ(a) = 3

Definition (Strategy)f (a) = b implies a→ b Ω = set of all the strategies

e.g. Rewrite system

a

b c

d e

Ω = f , g , h, i, with

f (a) = b g(a) = bf (c) = d g(c) = e

h(a) = c i(a) = ch(c) = d i(c) = e

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 5/16

Page 21: The probability of non-confluent systems

FormalisationStrategies

Λ: set of objects →: Λ× Λ→ N a→ b notation for → (a,b) 6= 0.

Definition (Degree)

ρ(a) =∑

b

→ (a,b)e.g.

b

a

77

//

''b

c

ρ(a) = 3

Definition (Strategy)f (a) = b implies a→ b Ω = set of all the strategies

e.g. Rewrite system

a

b c

d e

Ω = f , g , h, i, with

f (a) = b g(a) = bf (c) = d g(c) = e

h(a) = c i(a) = ch(c) = d i(c) = e

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 5/16

Page 22: The probability of non-confluent systems

FormalisationBoxes

Definition (Box)B ⊆ Ω of the form

B = f | f (a1) = b1, . . . , f (an) = bn

e.g. Rewrite system:

a

b c

d e

f1 =

a

b c

d

; f2 =

a

b c

e

=

Boxa

b

f1; f2 = f | f (a) = b

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 6/16

Page 23: The probability of non-confluent systems

FormalisationBoxes

Definition (Box)B ⊆ Ω of the form

B = f | f (a1) = b1, . . . , f (an) = bn

e.g. Rewrite system:

a

b c

d e

f1 =

a

b c

d

; f2 =

a

b c

e

=

Boxa

b

f1; f2 = f | f (a) = b

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 6/16

Page 24: The probability of non-confluent systems

FormalisationMeasure on boxes

Definition (Measure on boxes)If B = f | f (a1) = b1, . . . , f (an) = bn then

p(B) =n∏

i=1

→ (ai ,bi )

ρ(ai )

→ (ai , bi )

ways to arrive to bi from aiρ(ai )

nb. of rewrites from ai

e.g.

B =

f1 =

a

b c

d

; f2 =

a

b c

e

=

Boxa

b

f | f(a)=b

p(B) =→ (a,b)

ρ(a)=

12

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 7/16

Page 25: The probability of non-confluent systems

FormalisationMeasure on boxes

Definition (Measure on boxes)If B = f | f (a1) = b1, . . . , f (an) = bn then

p(B) =n∏

i=1

→ (ai ,bi )

ρ(ai )

→ (ai , bi )

ways to arrive to bi from aiρ(ai )

nb. of rewrites from ai

e.g.

B =

f1 =

a

b c

d

; f2 =

a

b c

e

=

Boxa

b

f | f(a)=b

p(B) =→ (a,b)

ρ(a)=

12

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 7/16

Page 26: The probability of non-confluent systems

IntuitionGeneralising the problem to abstract rewrite systems

Idea: to define a variant of a Lebesgue measure for sets of realnumbers, on the space of traces

1st Define an intuitive measure on boxesd

b

12 7712 // e

e.g. If a

13 <<

13 //13

""

cthen p(a→ c) = 1

3 + 13 and

p(a→ b;b→ d) = 13 ×

12 = 1

6

c

2nd Generalise it to arbitrary sets of rewrites taking the minimal cover withboxes

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 8/16

Page 27: The probability of non-confluent systems

IntuitionGeneralising the problem to abstract rewrite systems

Idea: to define a variant of a Lebesgue measure for sets of realnumbers, on the space of traces

1st Define an intuitive measure on boxesd

b

12 7712 // e

e.g. If a

13 <<

13 //13

""

cthen p(a→ c) = 1

3 + 13 and

p(a→ b;b→ d) = 13 ×

12 = 1

6

c

2nd Generalise it to arbitrary sets of rewrites taking the minimal cover withboxes

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 8/16

Page 28: The probability of non-confluent systems

FormalisationProbability function

Definition (Probability function)Let S ∈ P(Ω), S 6= ∅

P(∅) = 0

P(S) = inf

∑B∈C

p(B) | C is a countable family of boxes s.t. S ⊆⋃B∈C

B

e.g.

S =

f1 =

a

b c

d

; f2 =

a

c

e

= f1︸︷︷︸

B1

∪ f2︸︷︷︸B2

P(S) = p(B1) + p(B2) =12× 1

2+

12× 1

2=

12

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 9/16

Page 29: The probability of non-confluent systems

FormalisationProbability function

Definition (Probability function)Let S ∈ P(Ω), S 6= ∅

P(∅) = 0

P(S) = inf

∑B∈C

p(B) | C is a countable family of boxes s.t. S ⊆⋃B∈C

B

e.g.

S =

f1 =

a

b c

d

; f2 =

a

c

e

= f1︸︷︷︸

B1

∪ f2︸︷︷︸B2

P(S) = p(B1) + p(B2) =12× 1

2+

12× 1

2=

12

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 9/16

Page 30: The probability of non-confluent systems

FormalisationLebesgue measure and probability space

Definition (Lebesgue measurable)A is Lebesgue measurable if ∀S ∈ P(Ω)

P(S) = P(S ∩ A) + P(S ∩ A∼)

A = A ⊆ Ω | A is Lebesgue measurable

Theorem(Ω,A, P) is a probability space

I Ω is the set of all possible strategiesI A is the set of eventsI P is the probability function

Proof.We show that it satisfies the Kolmogorov axioms.

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 10/16

Page 31: The probability of non-confluent systems

FormalisationLebesgue measure and probability space

Definition (Lebesgue measurable)A is Lebesgue measurable if ∀S ∈ P(Ω)

P(S) = P(S ∩ A) + P(S ∩ A∼)

A = A ⊆ Ω | A is Lebesgue measurable

Theorem(Ω,A, P) is a probability space

I Ω is the set of all possible strategiesI A is the set of eventsI P is the probability function

Proof.We show that it satisfies the Kolmogorov axioms.

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 10/16

Page 32: The probability of non-confluent systems

OutlineGoal: To move from Non-determinism to Probilities

I General technique

I Application to a particular case

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 11/16

Page 33: The probability of non-confluent systems

From non-determinism to probabilitiesThe calculus λ+

A,B,C ::= X | A⇒ B | A ∧ B | ∀X .Ar, s, t ::= xA | λxA.r | rs | r + s | πA(r) | ΛX .r | rA

Beta + extra rewrite rules. E.g. (r + s)t→ rt + st

r : A πA(r + s)→ r

Non-determinism:

If r : A s : A πA(r + s)xx &&r s

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 12/16

Page 34: The probability of non-confluent systems

From non-determinism to probabilitiesThe calculus λ+

A,B,C ::= X | A⇒ B | A ∧ B | ∀X .Ar, s, t ::= xA | λxA.r | rs | r + s | πA(r) | ΛX .r | rA

Beta + extra rewrite rules. E.g. (r + s)t→ rt + st

r : A πA(r + s)→ r

Non-determinism:

If r : A s : A πA(r + s)xx &&r s

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 12/16

Page 35: The probability of non-confluent systems

From non-determinism to probabilitiesThe calculus λ+

A,B,C ::= X | A⇒ B | A ∧ B | ∀X .Ar, s, t ::= xA | λxA.r | rs | r + s | πA(r) | ΛX .r | rA

Beta + extra rewrite rules. E.g. (r + s)t→ rt + st

r : A πA(r + s)→ r

Non-determinism:

If r : A s : A πA(r + s)xx &&r s

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 12/16

Page 36: The probability of non-confluent systems

From non-determinism to probabilitiesThe calculus λp

+

Definition (ARS λ↓+)

I Closed normal terms of λ+ are objects of λ↓+I If r1, . . . , rn are objects, then r1 + · · ·+ rn too

The rewrite rules have multiplicities: e.g. πA(r + r)→ r with multiplicity 2

Theorem(Ω,A, P): probability space over λ↓+Bri = f | f (πA(

∑nj=1 mj .rj)) = ri: a box

P(Bri ) = mi∑nj=1 mj

Definition (Probabilistic calculus λp+)

Replace rule “If r : A, then πA(r + s)→ r” byπA(

∑ni=1 mi .ri + s)→ ri with probability mi∑n

i=1 mj

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 13/16

Page 37: The probability of non-confluent systems

From non-determinism to probabilitiesThe calculus λp

+

Definition (ARS λ↓+)

I Closed normal terms of λ+ are objects of λ↓+I If r1, . . . , rn are objects, then r1 + · · ·+ rn too

The rewrite rules have multiplicities: e.g. πA(r + r)→ r with multiplicity 2

Theorem(Ω,A, P): probability space over λ↓+Bri = f | f (πA(

∑nj=1 mj .rj)) = ri: a box

P(Bri ) = mi∑nj=1 mj

Definition (Probabilistic calculus λp+)

Replace rule “If r : A, then πA(r + s)→ r” byπA(

∑ni=1 mi .ri + s)→ ri with probability mi∑n

i=1 mj

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 13/16

Page 38: The probability of non-confluent systems

From non-determinism to probabilitiesThe calculus λp

+

Definition (ARS λ↓+)

I Closed normal terms of λ+ are objects of λ↓+I If r1, . . . , rn are objects, then r1 + · · ·+ rn too

The rewrite rules have multiplicities: e.g. πA(r + r)→ r with multiplicity 2

Theorem(Ω,A, P): probability space over λ↓+Bri = f | f (πA(

∑nj=1 mj .rj)) = ri: a box

P(Bri ) = mi∑nj=1 mj

Definition (Probabilistic calculus λp+)

Replace rule “If r : A, then πA(r + s)→ r” byπA(

∑ni=1 mi .ri + s)→ ri with probability mi∑n

i=1 mj

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 13/16

Page 39: The probability of non-confluent systems

From non-determinism to probabilitiesλp+ ← AlgAlgebraic calculi (Probabilistic version)

r, s, t ::= xA | λxA.r | rs | ΛX .r | rA |n∑

i=1

pi .ri with

n > 0,pi ∈ Q(0, 1] and∑n

i=1 pi = 1

Definition (From Alg to λp+)

Jn∑

i=1

ni

di.riK = πA(

n∑i=1

mi .JriK) where

ri : Ani , di ∈ N∗

mi = ni (n∏

k=1k 6=i

dk)for i = 1, . . . , n

Theorem (Alg to λp+)

If r→∗∑n

i=1 pi .ti in Alg and JtiK→∗ si ,then JrK→∗ si with probability pi in λp

+.

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 14/16

Page 40: The probability of non-confluent systems

From non-determinism to probabilitiesλp+ ← AlgAlgebraic calculi (Probabilistic version)

r, s, t ::= xA | λxA.r | rs | ΛX .r | rA |n∑

i=1

pi .ri with

n > 0,pi ∈ Q(0, 1] and∑n

i=1 pi = 1

Definition (From Alg to λp+)

Jn∑

i=1

ni

di.riK = πA(

n∑i=1

mi .JriK) where

ri : Ani , di ∈ N∗

mi = ni (n∏

k=1k 6=i

dk)for i = 1, . . . , n

Theorem (Alg to λp+)

If r→∗∑n

i=1 pi .ti in Alg and JtiK→∗ si ,then JrK→∗ si with probability pi in λp

+.

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 14/16

Page 41: The probability of non-confluent systems

From non-determinism to probabilitiesλp+ ← AlgAlgebraic calculi (Probabilistic version)

r, s, t ::= xA | λxA.r | rs | ΛX .r | rA |n∑

i=1

pi .ri with

n > 0,pi ∈ Q(0, 1] and∑n

i=1 pi = 1

Definition (From Alg to λp+)

Jn∑

i=1

ni

di.riK = πA(

n∑i=1

mi .JriK) where

ri : Ani , di ∈ N∗

mi = ni (n∏

k=1k 6=i

dk)for i = 1, . . . , n

Theorem (Alg to λp+)

If r→∗∑n

i=1 pi .ti in Alg and JtiK→∗ si ,then JrK→∗ si with probability pi in λp

+.

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 14/16

Page 42: The probability of non-confluent systems

From non-determinism to probabilitiesλp+ → AlgAlgebraic calculi (Probabilistic version)

r, s, t ::= xA | λxA.r | rs | ΛX .r | rA |n∑

i=1

pi .ri with

n > 0,pi ∈ Q(0, 1] and∑n

i=1 pi = 1

Definition (From λp+ to Alg)

If πA(t)→ si with probability pi , for i = 1, . . . , n, LπA(t)M =n∑

i=1

pi .Lsi M

Remark: if t normal, no translation

Theorem (λp+ to Alg)

I If r→ s, with probability 1, then LrM→ LsMI If r→ si with probability pi , for i = 1, . . . , n, then

LrM =∑n

i=1 pi .Lsi M.

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 15/16

Page 43: The probability of non-confluent systems

From non-determinism to probabilitiesλp+ → AlgAlgebraic calculi (Probabilistic version)

r, s, t ::= xA | λxA.r | rs | ΛX .r | rA |n∑

i=1

pi .ri with

n > 0,pi ∈ Q(0, 1] and∑n

i=1 pi = 1

Definition (From λp+ to Alg)

If πA(t)→ si with probability pi , for i = 1, . . . , n, LπA(t)M =n∑

i=1

pi .Lsi M

Remark: if t normal, no translation

Theorem (λp+ to Alg)

I If r→ s, with probability 1, then LrM→ LsMI If r→ si with probability pi , for i = 1, . . . , n, then

LrM =∑n

i=1 pi .Lsi M.

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 15/16

Page 44: The probability of non-confluent systems

Sumarising

I We provide a general technique to transform anon-deterministic calculus into a probabilistic one

I We have a way to transform λ+ into λp+

I We get a simpler calculus, encoding an algebraic calculus,without losing the connections with logic

Alejandro Díaz-Caro & Gilles Dowek The probability of non-confluent systems 16/16


Recommended