Spatial and Behavioural types: safety, liveness and decidability - - PowerPoint PPT Presentation

spatial and behavioural types safety liveness and
SMART_READER_LITE
LIVE PREVIEW

Spatial and Behavioural types: safety, liveness and decidability - - PowerPoint PPT Presentation

Spatial and Behavioural types: safety, liveness and decidability Lucia Acciai and Michele Boreale Dipartimento di Sistemi e Informatica Universit degli Studi di Firenze Lisbon, April 1921, 2011 1 Outline Introduction 1 Processes, types


slide-1
SLIDE 1

Spatial and Behavioural types: safety, liveness and decidability

Lucia Acciai and Michele Boreale

Dipartimento di Sistemi e Informatica Università degli Studi di Firenze

Lisbon, April 19–21, 2011

1

slide-2
SLIDE 2

Outline

1

Introduction

2

Processes, types and formulae

3

The local and the global systems

4

Decidability

5

Conclusion

2

slide-3
SLIDE 3

Outline

1

Introduction

2

Processes, types and formulae

3

The local and the global systems

4

Decidability

5

Conclusion

3

slide-4
SLIDE 4

Logics and Types

Need to control the usage of (new) names in pi-calculus Spatial Logic: suitable to analyze properties of systems describe the spatial structure of processes reason on distribution and concurrency Behavioral types: combines static analisys and model checking abstract (the behavior of) processes simplify the analysis of concurrent message-passing processes properties are checked against types E.g. in [Igarashi,Kobayashi’01]

processes = pi-calculus, types = CCS (global) invariant safety properties are considered

4

slide-5
SLIDE 5

Our approach

Introduce a type system where processes and types share the same “shallow” spatial structure each block of declared names is annotated with a SL formula type safety: restricted processes are guaranteed to satisfy precise properties on bound names Benefits properties not limited to safety invariants compositionality: only relevant names are considered when checking properties

5

slide-6
SLIDE 6

Our approach

Introduce a type system where processes and types share the same “shallow” spatial structure each block of declared names is annotated with a SL formula type safety: restricted processes are guaranteed to satisfy precise properties on bound names Benefits properties not limited to safety invariants compositionality: only relevant names are considered when checking properties

5

slide-7
SLIDE 7

Outline

1

Introduction

2

Processes, types and formulae

3

The local and the global systems

4

Decidability

5

Conclusion

6

slide-8
SLIDE 8

Processes

Pi-calculus with replicated input and guarded summation: Prefixes

α ::=

a(˜ b) Input

b Output

  • τ

Silent prefix Processes P

::= ∑i∈I αi.Pi

Guarded summation

  • P|P

Parallel composition

  • (ν˜

b)P Restriction

  • !a(˜

b).P Replicated input

7

slide-9
SLIDE 9

Types

CCS with replicated input and guarded summation: Prefixes

µ ::= a

  • a
  • τ

Process types T ::= ∑i µi.Ti Guarded summation

  • T|T

Parallel composition

  • (ν˜

a)T Restriction

  • !a.T

Replicated input Channel types t ::= (˜ x :˜ t)T

8

slide-10
SLIDE 10

Shallow Logic (SL): examples of formulae

shallow = input and output barbs are not followed by a continuation Race freedom: NoRace(a)

= ∗ ¬H∗(a|a)

Unique receptiveness: UniRec(a)

= ∗

a∧¬H∗(a|a)

  • Responsiveness:

Resp(a)

= ∗

−a ♦∗a

Deadlock freedom: DeadFree(a)

= ∗

a → H∗(a|♦∗ a)

  • a → H∗(a|♦∗ a)
  • 9
slide-11
SLIDE 11

Well-annotated processes

P ::= ···

  • (ν˜

a :˜ t; φ)P with

fn(φ) ⊆ ˜

a with φ a shallow logic formula

Definition (well-annotated processes)

A process P ∈ P is well-annotated if whenever P ≡ (˜

ν˜

b)(ν˜ a : φ)Q then Q |

= φ.

10

slide-12
SLIDE 12

Remark: a “weakening” property of SL

Lemma

In Shallow Logic ∀B with fn(B) = /

0:

A |

= φ ⇔ A|B | = φ

Necessary for soundness of scope extrusion

(ν˜

a : φ)P |Q ≡ (ν˜ a : φ)(P |Q) if ˜ a /

∈ Q

In (Caires and Cardelli’s) Spatial Logic this does not hold. E.g.

¬(¬0|¬0) ♦T

11

slide-13
SLIDE 13

Remark: a “weakening” property of SL

Lemma

In Shallow Logic ∀B with fn(B) = /

0:

A |

= φ ⇔ A|B | = φ

Necessary for soundness of scope extrusion

(ν˜

a : φ)P |Q ≡ (ν˜ a : φ)(P |Q) if ˜ a /

∈ Q

In (Caires and Cardelli’s) Spatial Logic this does not hold. E.g.

¬(¬0|¬0) ♦T

11

slide-14
SLIDE 14

Outline

1

Introduction

2

Processes, types and formulae

3

The local and the global systems

4

Decidability

5

Conclusion

12

slide-15
SLIDE 15

A “Local” Type System

Judgments: Γ ⊢L P : T Key rule: (T-RES): Γ,˜ a :˜ t ⊢ P : T T ↓˜

a|

= φ Γ ⊢ (ν˜

a :˜ t; φ)P : (ν˜ a :˜ t)T Local: in (T-RES) only the part of T depending on the restricted names, T ↓˜

x, is taken into account - the rest is hidden

Example:

  • a.b.a|(νc)(b.c |d |c)
  • ↓a = a.τ.a|(νc)(τ.c |τ|c)

13

slide-16
SLIDE 16

A “Local” Type System

Judgments: Γ ⊢L P : T Key rule: (T-RES): Γ,˜ a :˜ t ⊢ P : T T ↓˜

a|

= φ Γ ⊢ (ν˜

a :˜ t; φ)P : (ν˜ a :˜ t)T Local: in (T-RES) only the part of T depending on the restricted names, T ↓˜

x, is taken into account - the rest is hidden

Example:

  • a.b.a|(νc)(b.c |d |c)
  • ↓a = a.τ.a|(νc)(τ.c |τ|c)

13

slide-17
SLIDE 17

A “Local” Type System

Judgments: Γ ⊢L P : T Key rule: (T-RES): Γ,˜ a :˜ t ⊢ P : T T ↓˜

a|

= φ Γ ⊢ (ν˜

a :˜ t; φ)P : (ν˜ a :˜ t)T Local: in (T-RES) only the part of T depending on the restricted names, T ↓˜

x, is taken into account - the rest is hidden

Example:

  • a.b.a|(νc)(b.c |d |c)
  • ↓a = a.τ.a|(νc)(τ.c |τ|c)

relevant names = newly created names

13

slide-18
SLIDE 18

Definitions and Results

Definition (negative formulae)

In a negative formula each −˜ x∗ is under an odd number of ¬ Note: no limitations on other modalities!

Theorem (run-time soundness)

Suppose that Γ ⊢L P : T and that P is decorated with negative formulae of the form ∗φ. Then P →∗ P′ implies that P′ is well-annotated. Race Freedom and Unique Receptiveness are negative

14

slide-19
SLIDE 19

Definitions and Results

Definition (negative formulae)

In a negative formula each −˜ x∗ is under an odd number of ¬ Note: no limitations on other modalities!

Theorem (run-time soundness)

Suppose that Γ ⊢L P : T and that P is decorated with negative formulae of the form ∗φ. Then P →∗ P′ implies that P′ is well-annotated. Race Freedom and Unique Receptiveness are negative

14

slide-20
SLIDE 20

A “Global” Type System: motivations

Type soundness does not hold for non-negative formulae like Resp(a) and DeadFree(a) E.g.: R = (νa;Resp(a))(c.a|a) is well-typed for suitable Γ. Indeed

Γ,a ⊢L c.a|a : c.a|a

and

(c.a|a) ↓a = τ.a|a | = Resp(a)

but c.a|a |

= Resp(a)

Problem: Resp on a also depends on a “global” name c

15

slide-21
SLIDE 21

A “Global” Type System: motivations

Type soundness does not hold for non-negative formulae like Resp(a) and DeadFree(a) E.g.: R = (νa;Resp(a))(c.a|a) is well-typed for suitable Γ. Indeed

Γ,a ⊢L c.a|a : c.a|a

and

(c.a|a) ↓a = τ.a|a | = Resp(a)

but c.a|a |

= Resp(a)

Problem: Resp on a also depends on a “global” name c

15

slide-22
SLIDE 22

A “Global” Type System: motivations

Type soundness does not hold for non-negative formulae like Resp(a) and DeadFree(a) E.g.: R = (νa;Resp(a))(c.a|a) is well-typed for suitable Γ. Indeed

Γ,a ⊢L c.a|a : c.a|a

and

(c.a|a) ↓a = τ.a|a | = Resp(a)

but c.a|a |

= Resp(a)

Problem: Resp on a also depends on a “global” name c

15

slide-23
SLIDE 23

A “Global” Type System

Main change:

↓˜

x replaced by ⇓˜ x

where T ⇓˜

x keeps the names in ˜

x and the causes of ˜ x in T (plus some bookkeeping on names) E.g.:

(c.a|a) ⇓a = c.a|a | = Resp(a)

relevant names = new names + causally related free names

16

slide-24
SLIDE 24

A “Global” Type System

Main change:

↓˜

x replaced by ⇓˜ x

where T ⇓˜

x keeps the names in ˜

x and the causes of ˜ x in T (plus some bookkeeping on names) E.g.:

(c.a|a) ⇓a = c.a|a | = Resp(a)

relevant names = new names + causally related free names

16

slide-25
SLIDE 25

A “Global” Type System

Main change:

↓˜

x replaced by ⇓˜ x

where T ⇓˜

x keeps the names in ˜

x and the causes of ˜ x in T (plus some bookkeeping on names) E.g.:

(c.a|a) ⇓a = c.a|a | = Resp(a)

relevant names = new names + causally related free names

16

slide-26
SLIDE 26

Definitions and Results

Consider φ of the form

1

either ∗ψ with negation not occurring underneath any −˜ y∗ in

ψ

2

  • r ∗

−˜

y♦∗ψ′ , with negation not occurring in ψ′.

Theorem (run-time soundness)

Suppose that Γ ⊢G P : T and that P is decorated with formulae of the form (1) or (2) above. Then P →∗ P′ implies that P′ is well-annotated. Responsiveness and Deadlock Freedom are of the form (2) and (1) respectively

17

slide-27
SLIDE 27

Definitions and Results

Consider φ of the form

1

either ∗ψ with negation not occurring underneath any −˜ y∗ in

ψ

2

  • r ∗

−˜

y♦∗ψ′ , with negation not occurring in ψ′.

Theorem (run-time soundness)

Suppose that Γ ⊢G P : T and that P is decorated with formulae of the form (1) or (2) above. Then P →∗ P′ implies that P′ is well-annotated. Responsiveness and Deadlock Freedom are of the form (2) and (1) respectively

17

slide-28
SLIDE 28

Outline

1

Introduction

2

Processes, types and formulae

3

The local and the global systems

4

Decidability

5

Conclusion

18

slide-29
SLIDE 29

Decidability of the type system

The type system is decidable provided that:

1

≡ is decidable

2

| = is decidable

19

slide-30
SLIDE 30

Decidability of the type system

The type system is decidable provided that:

1

≡ is decidable

2

| = is decidable 1) ≡ is decidable

From [Engelfriet & Gelsema 2004]

19

slide-31
SLIDE 31

Decidability of the type system

The type system is decidable provided that:

1

≡ is decidable

2

| = is decidable 1) ≡ is decidable

From [Engelfriet & Gelsema 2004]

2) |

= is decidable (?)

The idea is to extend the approach in [BGZ04] for the decidability of weak barbs on CCS to handle SL

19

slide-32
SLIDE 32

WSTS techniques for deciding “|

=”

Given a (decidable) preorder ≤ on types in T

Theorem ([Finkel and Schnoebelen’01])

Under certain conditions for each I ⊆ T it is possible to compute a finite X such that

↑ X = Pred∗(I)

(finite basis of Pred∗(I)) Since [[♦∗φ]] = Pred∗([[φ]]), to check T |

= ♦∗φ

1

set I = [[φ]] above

2

check if ∃S ∈ X s.t. S ≤ T

Pred(s) = {s′

s′ → s}

Pred∗(s) = {s′

s′ →∗ s}

20

slide-33
SLIDE 33

Conditions [Finkel and Schnoebelen’01]

1 T forms a WSTS w.r.t. (a decidable) ≤ 2

∀T ∈ T it is possible to compute a finite Y s.t. ↑ Y =↑ Pred(↑ T)

(effective pred-basis)

3

∀I (= [[φ]]) it is possible to compute a finite Z s.t. ↑ Z = I (= [[φ]])

(finite basis)

Our task:

Find a preorder satisfying the three conditions above

Our approach:

Viewing types as forests and defining a preorder similar to Kruskal’s tree-preorder

21

slide-34
SLIDE 34

Conditions [Finkel and Schnoebelen’01]

1 T forms a WSTS w.r.t. (a decidable) ≤ 2

∀T ∈ T it is possible to compute a finite Y s.t. ↑ Y =↑ Pred(↑ T)

(effective pred-basis)

3

∀I (= [[φ]]) it is possible to compute a finite Z s.t. ↑ Z = I (= [[φ]])

(finite basis)

Our task:

Find a preorder satisfying the three conditions above

Our approach:

Viewing types as forests and defining a preorder similar to Kruskal’s tree-preorder

21

slide-35
SLIDE 35

Preliminary definition

Fix an initial type T0

Definition (F )

F

= the set of all terms:

containing only subterms and restrictions of T0 having nesting depth smaller than T0’s E.g. T0 = (νa)

  • a.b|a.b
  • :

   (νa)

  • a.b|b|a.b
  • ∈ F

(νa)(νa)(a.b) / ∈ F

22

slide-36
SLIDE 36

WSTS I: types as forests

1

Make types a WSTS We consider types as forests where: internal nodes = restrictions leaves = prefix-guarded terms E.g. T = (νa)

  • a.b|a.b
  • |(νc)
  • (νd)c.d |c.f
  • (νa)

a.b a.b

(νc) (νd)

c.d c.f

23

slide-37
SLIDE 37

WSTS II: decidable ≤

1

Make types a WSTS Defining the preorder ≤ = rooted tree embedding (νa)

a.b

(νc) (νd)

c.d

≤ (νa)

a.b a.b

(νc) (νd)

c.d c.f

(νa)

a.b a.b

≤ (νa)

a.b a.b

24

slide-38
SLIDE 38

WSTS III: F ,→,≤ is a WSTS

Theorem

(i) ≤ is a well-quasi order over F and (ii) F ,→,≤ is a WSTS Proof idea: (i) by induction on the nesting depth of restrictions of terms in F and by using the Higman’s lemma. The base case (height = 0) relies on finiteness of guarded subterms in T0. The inductive step relies on the fact that each forest can be decomposed into a finite number of subforests with smaller height (ii) F ,→,≤ is a finitely branching transition system and

≤ is easily proved to be a computable simulation

relation in F

25

slide-39
SLIDE 39

WSTS III: F ,→,≤ is a WSTS

Theorem

(i) ≤ is a well-quasi order over F and (ii) F ,→,≤ is a WSTS Proof idea: (i) by induction on the nesting depth of restrictions of terms in F and by using the Higman’s lemma. The base case (height = 0) relies on finiteness of guarded subterms in T0. The inductive step relies on the fact that each forest can be decomposed into a finite number of subforests with smaller height (ii) F ,→,≤ is a finitely branching transition system and

≤ is easily proved to be a computable simulation

relation in F

TRUST ME

25

slide-40
SLIDE 40

WSTS III: F ,→,≤ is a WSTS

Theorem

(i) ≤ is a well-quasi order over F and (ii) F ,→,≤ is a WSTS Proof idea: (i) by induction on the nesting depth of restrictions of terms in F and by using the Higman’s lemma. The base case (height = 0) relies on finiteness of guarded subterms in T0. The inductive step relies on the fact that each forest can be decomposed into a finite number of subforests with smaller height (ii) F ,→,≤ is a finitely branching transition system and

≤ is easily proved to be a computable simulation

relation in F

TRUST ME

NB: in CCS reductions cannot increase the nesting depth, on the contrary in pi-calculus

(νb)ab|(νc)a(x).x.c → (νb)(νc)b.c

25

slide-41
SLIDE 41

Effective Pred-basis: pb(T)

2

∀T ∈ T it is possible to compute a finite Y s.t. ↑ Y =↑ Pred(↑ T)

T

  • T1
  • T2

T3

26

slide-42
SLIDE 42

Effective Pred-basis: pb(T)

2

∀T ∈ T it is possible to compute a finite Y s.t. ↑ Y =↑ Pred(↑ T)

T

  • T1
  • T2

T3 CT[·,·]

  • [·]
  • T2

T3

[·]

26

slide-43
SLIDE 43

Effective Pred-basis: pb(T)

2

∀T ∈ T it is possible to compute a finite Y s.t. ↑ Y =↑ Pred(↑ T)

T

  • T1
  • T2

T3 CT[·,·]

  • [·]
  • T2

T3

[·] ❀

CT[G1,G2]

  • G1
  • T2

T3 G2 G1,G2 = prefix-guarded processes (leaves)

26

slide-44
SLIDE 44

Effective Pred-basis: pb(T)

2

∀T ∈ T it is possible to compute a finite Y s.t. ↑ Y =↑ Pred(↑ T)

T

  • T1
  • T2

T3

τ

← − − − − − − − − − − −

CT[G1,G2]

  • G1
  • T2

T3 G2 G1,G2 = prefix-guarded processes (leaves)

26

slide-45
SLIDE 45

Effective Pred-basis: pb(T)

2

∀T ∈ T it is possible to compute a finite Y s.t. ↑ Y =↑ Pred(↑ T)

T

  • T1
  • T2

T3

τ

← − − − − − − − − − − −

CT[G1,G2]

  • G1
  • T2

T3 G2

Theorem ∀T ∈ T : pb(T) is effective and ↑ pb(T) =↑ Pred(↑ T)

26

slide-46
SLIDE 46

Finite-basis: ↑ fb(φ) = [[φ]]∩F

3

∀I (= [[φ]]) it is possible to compute a finite Z s.t. ↑ Z = I (= [[φ]])

(G = prefix-guarded process (leaf) – D = context of parallel and restrictions)

Definition (fb(φ))

fb(a)

={D[G] ∈ F

  • G ցa}

(νa)

. . . G

27

slide-47
SLIDE 47

Finite-basis: ↑ fb(φ) = [[φ]]∩F

3

∀I (= [[φ]]) it is possible to compute a finite Z s.t. ↑ Z = I (= [[φ]])

(G = prefix-guarded process (leaf) – D = context of parallel and restrictions)

Definition (fb(φ))

fb(a)

={D[G] ∈ F

  • G ցa}

fb(H∗(φ1|φ2))

=

Si∈fb(φi)

  • D[˜

G1, ˜ G2] ∈ F

  • ˜

Gi = leaves(Si)

  • (νa)

G1 G2

(νb)

G3

27

slide-48
SLIDE 48

Finite-basis: ↑ fb(φ) = [[φ]]∩F

3

∀I (= [[φ]]) it is possible to compute a finite Z s.t. ↑ Z = I (= [[φ]])

(G = prefix-guarded process (leaf) – D = context of parallel and restrictions)

Definition (fb(φ))

fb(a)

={D[G] ∈ F

  • G ցa}

fb(H∗(φ1|φ2))

=

Si∈fb(φi)

  • D[˜

G1, ˜ G2] ∈ F

  • ˜

Gi = leaves(Si)

  • (νa)

(νb)

G2 G1 G3

27

slide-49
SLIDE 49

Finite-basis: ↑ fb(φ) = [[φ]]∩F

3

∀I (= [[φ]]) it is possible to compute a finite Z s.t. ↑ Z = I (= [[φ]])

(G = prefix-guarded process (leaf) – D = context of parallel and restrictions)

Definition (fb(φ))

fb(a)

={D[G] ∈ F

  • G ցa}

fb(H∗(φ1|φ2))

=

Si∈fb(φi)

  • D[˜

G1, ˜ G2] ∈ F

  • ˜

Gi = leaves(Si)

  • fb(φ1 ∨φ2)

=fb(φ1)∪ fb(φ2)

27

slide-50
SLIDE 50

Finite-basis: ↑ fb(φ) = [[φ]]∩F

3

∀I (= [[φ]]) it is possible to compute a finite Z s.t. ↑ Z = I (= [[φ]])

(G = prefix-guarded process (leaf) – D = context of parallel and restrictions)

Definition (fb(φ))

fb(a)

={D[G] ∈ F

  • G ցa}

fb(H∗(φ1|φ2))

=

Si∈fb(φi)

  • D[˜

G1, ˜ G2] ∈ F

  • ˜

Gi = leaves(Si)

  • fb(φ1 ∨φ2)

=fb(φ1)∪ fb(φ2)

fb(♦∗φ)

=X

s.t.

↑ X = Pred∗(fb(φ)) ···

27

slide-51
SLIDE 51

What about fb(φ1 ∧φ2)?

Idea:

  • S1 ∈ fb(φ1)

28

slide-52
SLIDE 52

What about fb(φ1 ∧φ2)?

Idea:

  • S1 ∈ fb(φ1)
  • S2 ∈ fb(φ2)

28

slide-53
SLIDE 53

What about fb(φ1 ∧φ2)?

Idea:

  • S1 ∈ fb(φ1)
  • S2 ∈ fb(φ2)
  • S

S = “least common multiple” of S1 and S2 E.g. S1 = a|b, S2 = b|c =

⇒ S = a|b|c

28

slide-54
SLIDE 54

Main results

Definition (monotone, anti-monotone and plain formulae) φ is monotone if it does not contain occurrences of ¬

anti-monotone if it is of the form ¬ψ, with ψ monotone

φ is plain if it does not contain ♦∗ underneath H∗ Theorem (decidability on types and processes)

For any φ plain and (anti-)monotone

1

fb(φ) is a computable finite basis for [[φ]]∩F

2

T |

= φ is decidable for any T

3

P |

= φ is decidable for any P well-typed

29

slide-55
SLIDE 55

Examples of decidable formulae

Never two concurrent outputs on a: NoRace(a)

= ¬♦∗H∗(a|a)

Communication on a never occurs more than once: Linear(a)

= ¬♦∗a♦∗a

Resource a never acquired in presence of the lock l: Lock(a,l)

= ¬♦∗H∗(l |a)

30

slide-56
SLIDE 56

Outline

1

Introduction

2

Processes, types and formulae

3

The local and the global systems

4

Decidability

5

Conclusion

31

slide-57
SLIDE 57

Further and related works

Further: Decidability: relax some constraints? Difficult: Known result: ♦∗(a∧¬b) is undecidable [Zavattaro’09] Quantitative behavioural types? Ongoing work Related: Behavioural types: Acciai and Boreale’08; Chaki et al.’02; Igarashi and Kobayashi’01; Decidability results in CCS: Valencia et al.’09; Busi et al.’04 Spatial logics: Caires’04 Undecidability results: Kobayashi and Suto 2007

32

slide-58
SLIDE 58

Type system

(T-INP) Γ ⊢ a : (˜

x :˜ t)T

fn(˜

t)∪fn(T)\˜ x = a,

Γ,˜

x :˜ t ⊢ P : T|T′

˜

x /

∈ fn(T′) Γ ⊢ a(˜

x).P : aa.T′

(T-OUT) Γ ⊢ a : (˜

x :˜ t)T

Γ ⊢ ˜

b :˜ t

ΓvdashP : S Γ ⊢ a˜

b.P : a.(T[˜

b/˜ x]|S) (T-RES) Γ,a : t ⊢ P : T a = fn(t) Γ ⊢ (νa : t)P : (νaa)T (T-PAR) Γ ⊢ P : T Γ ⊢ Q : S Γ ⊢ P|Q : T|S (T-SUM) |I| = 1 ∀i ∈ I : Γ ⊢ αi.Pi : µi.Ti Γ ⊢ ∑i∈αi.Pi : ∑i∈Iµi.Ti (T-REP) Γ ⊢ a(˜

x).P : aa.T

Γ ⊢!a(˜

x).P :!aa.T

(T-EQ) Γ ⊢ P : T

T ≡ S

Γ ⊢ P : S (T-TAU) Γ ⊢ P : T Γ ⊢ τ.P : τ.T

33

slide-59
SLIDE 59

Example: Unique Receptiveness (a liveness property)

⇒ Local Type System

UniRec(a)

= ∗

a∧¬H∗(a|a)

  • P =(νa,b,c ;UniRec(a))Q

Q =

  • (ca | a+ b(x).x)|c(y).by
  • is well-typed. Indeed, for a suitable Γ:

Γ,a,b,c ⊢L Q : T

= c.b.a | a+ b | c

with T ↓a,b,c= T |

= UniRec(a)

hence well-typed by (T-RES)

34

slide-60
SLIDE 60

Example: Unique Receptiveness (a liveness property)

⇒ Local Type System

UniRec(a)

= ∗

a∧¬H∗(a|a)

  • P =(νa,b,c ;UniRec(a))Q

Q =

  • (ca | a+ b(x).x)|c(y).by
  • is well-typed. Indeed, for a suitable Γ:

Γ,a,b,c ⊢L Q : T

= c.b.a | a+ b | c

with T ↓a,b,c= T |

= UniRec(a)

hence well-typed by (T-RES)

34

slide-61
SLIDE 61

Example: Unique Receptiveness (a liveness property)

⇒ Local Type System

UniRec(a)

= ∗

a∧¬H∗(a|a)

  • P =(νa,b,c ;UniRec(a))Q

Q =

  • (ca | a+ b(x).x)|c(y).by
  • is well-typed. Indeed, for a suitable Γ:

Γ,a,b,c ⊢L Q : T

= c.b.a | a+ b | c

with T ↓a,b,c= T |

= UniRec(a)

hence well-typed by (T-RES)

34

slide-62
SLIDE 62

Example: Responsiveness

⇒ Global Type System

Resp(a)

= ∗

−a ♦∗a

P =(νa : Resp(a))(ca)|Q Q =!c(x).(x|x)|cb is well-typed. Indeed, for a suitable Γ:

Γ ⊢G ca|Q : c.(a|a)|!c|c.(b|b)

= T

and T ⇓a= c.(a|a)|!c|c.(τ|τ) |

= Resp(a)

hence well-typed by (T-RES)

35

slide-63
SLIDE 63

Example: Responsiveness

⇒ Global Type System

Resp(a)

= ∗

−a ♦∗a

P =(νa : Resp(a))(ca)|Q Q =!c(x).(x|x)|cb is well-typed. Indeed, for a suitable Γ:

Γ ⊢G ca|Q : c.(a|a)|!c|c.(b|b)

= T

and T ⇓a= c.(a|a)|!c|c.(τ|τ) |

= Resp(a)

hence well-typed by (T-RES)

35

slide-64
SLIDE 64

Example: Responsiveness

⇒ Global Type System

Resp(a)

= ∗

−a ♦∗a

P =(νa : Resp(a))(ca)|Q Q =!c(x).(x|x)|cb is well-typed. Indeed, for a suitable Γ:

Γ ⊢G ca|Q : c.(a|a)|!c|c.(b|b)

= T

and T ⇓a= c.(a|a)|!c|c.(τ|τ) |

= Resp(a)

hence well-typed by (T-RES)

35

slide-65
SLIDE 65

Shallow Logic (SL)

φ::=T

  • ¬φ
  • φ∨φ
  • φ∧φ
  • a
  • a
  • φ|φ
  • H∗φ
  • ˜

a∗φ

  • −˜

a∗φ

[[T]] = U [[¬φ]] = U \[[φ]] [[φ1 ∨φ2]] = [[φ1]]∪[[φ2]] [[φ1 ∧φ2]] = [[φ1]]∩[[φ2]] [[a]] =

  • A
  • A ցa
  • [[a]] =
  • A
  • A ցa
  • [[φ1|φ2]] =
  • A
  • ∃A1,A2 : A ≡ A1|A2, A1 ∈ [[φ1]], A2 ∈ [[φ2]]
  • [[H∗φ]] =
  • A
  • ∃˜

a,B : A ≡ (˜

ν˜

a)B, ˜ a#φ, B ∈ [[φ]]

  • [[aφ]] =
  • A
  • ∃B : A

a

− → B, B ∈ [[φ]]

  • [[˜

a∗φ]] =

  • A
  • ∃σ,B : A

σ

− → B, N \˜

a#σ, B ∈ [[φ]]

  • [[−˜

a∗φ]] =

  • A
  • ∃σ,B : A

σ

− → B, ˜

a#σ, B ∈ [[φ]]

  • 36
slide-66
SLIDE 66

Shallow Logic (SL)

φ::=T

  • ¬φ
  • φ∨φ
  • φ∧φ
  • a
  • a
  • φ|φ
  • H∗φ
  • ˜

a∗φ

  • −˜

a∗φ

[[T]] = U [[¬φ]] = U \[[φ]] [[φ1 ∨φ2]] = [[φ1]]∪[[φ2]] [[φ1 ∧φ2]] = [[φ1]]∩[[φ2]] [[a]] =

  • A
  • A ցa
  • [[a]] =
  • A
  • A ցa
  • [[φ1|φ2]] =
  • A
  • ∃A1,A2 : A ≡ A1|A2, A1 ∈ [[φ1]], A2 ∈ [[φ2]]
  • [[H∗φ]] =
  • A
  • ∃˜

a,B : A ≡ (˜

ν˜

a)B, ˜ a#φ, B ∈ [[φ]]

  • [[aφ]] =
  • A
  • ∃B : A

a

− → B, B ∈ [[φ]]

  • [[˜

a∗φ]] =

  • A
  • ∃σ,B : A

σ

− → B, N \˜

a#σ, B ∈ [[φ]]

  • [[−˜

a∗φ]] =

  • A
  • ∃σ,B : A

σ

− → B, ˜

a#σ, B ∈ [[φ]]

  • 36