Dependency Analysis as the Basis for a Generic Type System Maxime - - PowerPoint PPT Presentation

dependency analysis
SMART_READER_LITE
LIVE PREVIEW

Dependency Analysis as the Basis for a Generic Type System Maxime - - PowerPoint PPT Presentation

Dependency Analysis as the Basis for a Generic Type System Maxime Gamboni Instituto de Telecomunica c oes, Instituto Superior T ecnico, Portugal April 20th, 2011 Behaviour Dependencies Activeness and Responsiveness Generic Plan


slide-1
SLIDE 1

Dependency Analysis

as the Basis for a Generic Type System Maxime Gamboni

Instituto de Telecomunica¸ c˜

  • es, Instituto Superior T´

ecnico, Portugal

April 20th, 2011

slide-2
SLIDE 2

Behaviour Dependencies Activeness and Responsiveness Generic

Plan

Behavioural Properties, Existential and Universal

pA, pI Dependency Statements, Behavioural Statements α➌ γ, ξO ✏ ξ1 ❴ ♣ξ2 ❫ ξ3q Type Systems aA ✩AR t.a⑤¯ t Generic Type System Γ ✩K P

Maxime Gamboni Dependency Analysis

slide-3
SLIDE 3

Behaviour Dependencies Activeness and Responsiveness Generic

Behavioural Properties: Existential vs Universal

Definition (Existential Property) Available somewhere. Good things happen eventually. Activeness (Receptiveness) Definition (Universal Property) Available everywhere. Bad things never happen. Deadlock-freedom, Isolation, Determinism, “Responsiveness”, “Non-Termination”.

Maxime Gamboni Dependency Analysis

slide-4
SLIDE 4

Behaviour Dependencies Activeness and Responsiveness Generic

Behavioural Properties: Existential vs Universal

Definition (Existential Property) Available somewhere. Good things happen eventually. Activeness (Receptiveness) Definition (Universal Property) Available everywhere. Bad things never happen. Deadlock-freedom, Isolation, Determinism, “Responsiveness”, “Non-Termination”.

Maxime Gamboni Dependency Analysis

slide-5
SLIDE 5

Behaviour Dependencies Activeness and Responsiveness Generic

Behavioural Properties: Existential vs universal

goodk♣Pq implies goodk♣P ⑤ Qq badk♣Pq implies badk♣P ⑤ Qq

Maxime Gamboni Dependency Analysis

slide-6
SLIDE 6

Behaviour Dependencies Activeness and Responsiveness Generic

Dependency Analysis (1)

Parallel composition fundamental to the π-calculus P ✏ P1 ⑤ P2 ⑤ . . . ⑤ Pn Need to analyse one component at a time tΓi ✩ Pi✉ ÞÑ ♣Γ ✩ Pq Need to make assumptions on the environment Γi ✏ ♣ΞL ➒ ΞEq

Maxime Gamboni Dependency Analysis

slide-7
SLIDE 7

Behaviour Dependencies Activeness and Responsiveness Generic

Dependency Analysis (1)

Parallel composition fundamental to the π-calculus P ✏ P1 ⑤ P2 ⑤ . . . ⑤ Pn Need to analyse one component at a time tΓi ✩ Pi✉ ÞÑ ♣Γ ✩ Pq Need to make assumptions on the environment Γi ✏ ♣ΞL ➒ ΞEq

Maxime Gamboni Dependency Analysis

slide-8
SLIDE 8

Behaviour Dependencies Activeness and Responsiveness Generic

Dependency Analysis (1)

Parallel composition fundamental to the π-calculus P ✏ P1 ⑤ P2 ⑤ . . . ⑤ Pn Need to analyse one component at a time tΓi ✩ Pi✉ ÞÑ ♣Γ ✩ Pq Need to make assumptions on the environment Γi ✏ ♣ΞL ➒ ΞEq

Maxime Gamboni Dependency Analysis

slide-9
SLIDE 9

Behaviour Dependencies Activeness and Responsiveness Generic

Dependency Statement

Definition (Dependency A➌ B) If you give me B, I’ll give you A.

Maxime Gamboni Dependency Analysis

slide-10
SLIDE 10

Behaviour Dependencies Activeness and Responsiveness Generic

Behavioural Statements

Definition (Behavioural Statements) Ξ ::✏ ♣γ➌ Ξq ✞ ✞ ♣Ξ ❴ Ξq ✞ ✞ ♣Ξ ❫ Ξq ✞ ✞ ❏ ✞ ✞ ❑ aD➌ ♣bD ❫ cDq ✩ A ✏ ! a♣tf q.b♣νt✶f ✶q.♣t✶.c①tf ②f ✶.f q bD➌ ❏ ✩ B ✏ ! b♣tf q.t bD➌ ❑ ✩ C ✏ ! c♣tf q.♣♣νqq q ⑤ q.t ⑤ q.f q aD➌ ♣❏ ❫ cDq ✕ aD➌ cD ✩ A ⑤ B aD➌ ♣bD ❫ ❑q ✕ aD➌ ❑ ✩ A ⑤ C

Maxime Gamboni Dependency Analysis

slide-11
SLIDE 11

Behaviour Dependencies Activeness and Responsiveness Generic

Behavioural Statements

Definition (Behavioural Statements) Ξ ::✏ ♣γ➌ Ξq ✞ ✞ ♣Ξ ❴ Ξq ✞ ✞ ♣Ξ ❫ Ξq ✞ ✞ ❏ ✞ ✞ ❑ aD➌ ♣bD ❫ cDq ✩ A ✏ ! a♣tf q.b♣νt✶f ✶q.♣t✶.c①tf ②f ✶.f q bD➌ ❏ ✩ B ✏ ! b♣tf q.t bD➌ ❑ ✩ C ✏ ! c♣tf q.♣♣νqq q ⑤ q.t ⑤ q.f q aD➌ ♣❏ ❫ cDq ✕ aD➌ cD ✩ A ⑤ B aD➌ ♣bD ❫ ❑q ✕ aD➌ ❑ ✩ A ⑤ C

Maxime Gamboni Dependency Analysis

slide-12
SLIDE 12

Behaviour Dependencies Activeness and Responsiveness Generic

Behavioural Statements

Definition (Behavioural Statements) Ξ ::✏ ♣γ➌ Ξq ✞ ✞ ♣Ξ ❴ Ξq ✞ ✞ ♣Ξ ❫ Ξq ✞ ✞ ❏ ✞ ✞ ❑ aD➌ ♣bD ❫ cDq ✩ A ✏ ! a♣tf q.b♣νt✶f ✶q.♣t✶.c①tf ②f ✶.f q bD➌ ❏ ✩ B ✏ ! b♣tf q.t bD➌ ❑ ✩ C ✏ ! c♣tf q.♣♣νqq q ⑤ q.t ⑤ q.f q aD➌ ♣❏ ❫ cDq ✕ aD➌ cD ✩ A ⑤ B aD➌ ♣bD ❫ ❑q ✕ aD➌ ❑ ✩ A ⑤ C

Maxime Gamboni Dependency Analysis

slide-13
SLIDE 13

Behaviour Dependencies Activeness and Responsiveness Generic

Behavioural Statements

Definition (Behavioural Statements) Ξ ::✏ ♣γ➌ Ξq ✞ ✞ ♣Ξ ❴ Ξq ✞ ✞ ♣Ξ ❫ Ξq ✞ ✞ ❏ ✞ ✞ ❑ aD➌ ♣bD ❫ cDq ✩ A ✏ ! a♣tf q.b♣νt✶f ✶q.♣t✶.c①tf ②f ✶.f q bD➌ ❏ ✩ B ✏ ! b♣tf q.t bD➌ ❑ ✩ C ✏ ! c♣tf q.♣♣νqq q ⑤ q.t ⑤ q.f q aD➌ ♣❏ ❫ cDq ✕ aD➌ cD ✩ A ⑤ B aD➌ ♣bD ❫ ❑q ✕ aD➌ ❑ ✩ A ⑤ C

Maxime Gamboni Dependency Analysis

slide-14
SLIDE 14

Behaviour Dependencies Activeness and Responsiveness Generic

Behavioural Statements

Definition (Behavioural Statements) Ξ ::✏ ♣γ➌ Ξq ✞ ✞ ♣Ξ ❴ Ξq ✞ ✞ ♣Ξ ❫ Ξq ✞ ✞ ❏ ✞ ✞ ❑ aD➌ ♣bD ❫ cDq ✩ A ✏ ! a♣tf q.b♣νt✶f ✶q.♣t✶.c①tf ②f ✶.f q bD➌ ❏ ✩ B ✏ ! b♣tf q.t bD➌ ❑ ✩ C ✏ ! c♣tf q.♣♣νqq q ⑤ q.t ⑤ q.f q aD➌ ♣❏ ❫ cDq ✕ aD➌ cD ✩ A ⑤ B aD➌ ♣bD ❫ ❑q ✕ aD➌ ❑ ✩ A ⑤ C

Maxime Gamboni Dependency Analysis

slide-15
SLIDE 15

Behaviour Dependencies Activeness and Responsiveness Generic

Behavioural Statements

Definition (Behavioural Statements) Ξ ::✏ ♣γ➌ Ξq ✞ ✞ ♣Ξ ❴ Ξq ✞ ✞ ♣Ξ ❫ Ξq ✞ ✞ ❏ ✞ ✞ ❑ aD➌ ♣bD ❫ cDq ✩ A ✏ ! a♣tf q.b♣νt✶f ✶q.♣t✶.c①tf ②f ✶.f q bD➌ ❏ ✩ B ✏ ! b♣tf q.t bD➌ ❑ ✩ C ✏ ! c♣tf q.♣♣νqq q ⑤ q.t ⑤ q.f q aD➌ ♣❏ ❫ cDq ✕ aD➌ cD ✩ A ⑤ B aD➌ ♣bD ❫ ❑q ✕ aD➌ ❑ ✩ A ⑤ C

Maxime Gamboni Dependency Analysis

slide-16
SLIDE 16

Behaviour Dependencies Activeness and Responsiveness Generic

Activeness and Responsiveness: Semantics

Definition (Immediate Activeness) goodA♣a, ♣Γ; Pqq if P ✑ ♣ν˜ zq

  • a♣˜

yq.Q ⑤ R ✟ goodA♣a, ♣Γ; Pqq if P ✑ ♣ν˜ zq

  • a①˜

x②.Q ⑤ R ✟ Definition (Immediate Responsiveness) badR♣a, ♣Γ; Pqq if P

a♣tf q

Ý Ý Ý Ý Ñ P✶ and ¯ tA ❴ ¯ fA ⑧⑤ ù P✶.

Maxime Gamboni Dependency Analysis

slide-17
SLIDE 17

Behaviour Dependencies Activeness and Responsiveness Generic

Activeness and Responsiveness: Semantics

Maxime Gamboni Dependency Analysis

slide-18
SLIDE 18

Behaviour Dependencies Activeness and Responsiveness Generic

Type System (Activeness and Responsiveness)

✁ ❏ ✩AR 0 ♣Nilq Γi ✩AR Pi Γ1 ❞ Γ2 ✩AR P1 ⑤ P2 ♣Parq Γ ✩AR P ♣νxq Γ ✩AR ♣νxq P ♣Resq sub♣Giq ✏ tpi✉, ♣ΞLi ➒ ΞEiq ✩AR Gi.Pi, ΞE ➝ ➍

i ΞEi

  • ΞE has concurrent environment pi✶✟

ñ ε ✏ ❑

  • ♣➦

i piqA ➌ ε ❫ ➎ i ΞLi ➒ ΞE

✟ ✩AR ➦

i Gi.Pi

♣Sumq Γ ✩AR P ♣# ✏ 1 and m✶ ✏ ✍q ñ ε ✏ ❑ ✁ p : σ; ➒ pm ❫ ¯ pm✶✠ ❞ ♣ν˜ zq ✁ Γ➌ ¯ pA ❞ σr˜ xs➌ ¯ pAR ❞ p#

A ➌ ε

❫ pR➌ σr˜ xs ✟# ✩AR ♣ν˜ zq p#① ˜ x ②.P ♣Preq

Maxime Gamboni Dependency Analysis

slide-19
SLIDE 19

Behaviour Dependencies Activeness and Responsiveness Generic

Type System (Activeness and Responsiveness)

✁ ❏ ✩AR 0 ♣Nilq Γi ✩AR Pi Γ1 ❞ Γ2 ✩AR P1 ⑤ P2 ♣Parq Γ ✩AR P ♣νxq Γ ✩AR ♣νxq P ♣Resq sub♣Giq ✏ tpi✉, ♣ΞLi ➒ ΞEiq ✩AR Gi.Pi, ΞE ➝ ➍

i ΞEi

  • ΞE has concurrent environment pi✶✟

ñ ε ✏ ❑

  • ♣➦

i piqA ➌ ε ❫ ➎ i ΞLi ➒ ΞE

✟ ✩AR ➦

i Gi.Pi

♣Sumq Γ ✩AR P ♣# ✏ 1 and m✶ ✏ ✍q ñ ε ✏ ❑ ✁ p : σ; ➒ pm ❫ ¯ pm✶✠ ❞ ♣ν˜ zq ✁ Γ➌ ¯ pA ❞ σr˜ xs➌ ¯ pAR ❞ p#

A ➌ ε

❫ pR➌ σr˜ xs ✟# ✩AR ♣ν˜ zq p#① ˜ x ②.P ♣Preq

Maxime Gamboni Dependency Analysis

slide-20
SLIDE 20

Behaviour Dependencies Activeness and Responsiveness Generic

Generic Type System

Instantiated with: Immediate correctness (semantics) Elementary rules (typing)

Maxime Gamboni Dependency Analysis

slide-21
SLIDE 21

Behaviour Dependencies Activeness and Responsiveness Generic

Generic Type System

✁ ❏ ✩K 0 ♣Nilq Γi ✩K Pi Γ1 ❞ Γ2 ✩K P1 ⑤ P2 ♣Parq Γ ✩K P ♣νxq Γ ✩K ♣νxq P ♣Resq ♣ΞLi ➒ ΞEiq ✩K Gi.Pi ΞE ➝ ➍

i ΞEi

♣sumK♣tpi✉i, ΞEq ❫ ➎

i ΞLi ➒ ΞEq ✩K

i Gi.Pi

♣Sumq Γ ✩K P G ✏ ♣ν˜ zq p#① ˜ x ② ✁ p : σ; ➒ pm ❫ ¯ pm✶✠ ❞ p# ❞ ♣ν˜ zq ✁ Γ➌ depK♣Gq ❞ σr˜ xs➌ ♣depK♣Gq ❫ ¯ pRq ❞ propK♣σ, G, m, m✶q ✠# ✩K ♣ν˜ zq p#① ˜ x ②.P ♣Preq

Maxime Gamboni Dependency Analysis

slide-22
SLIDE 22

Behaviour Dependencies Activeness and Responsiveness Generic

Elementary Rules

Elementary properties of a sum with subjects tp1, p2, . . . ✉: sumk♣tpi✉i, ΞEq

  • f a p-guard G with type σ and multiplicities pm, ¯

pm✶: propk♣σ, G, m, m✶q Resources required to consume a guard: depk♣Gq

Maxime Gamboni Dependency Analysis

slide-23
SLIDE 23

Behaviour Dependencies Activeness and Responsiveness Generic

Activeness

Definition (Activeness) goodA♣p, ♣Γ; Pqq if P ✑ ♣ν˜ zq

  • G.Q ⑤ R

✟ with sub♣Gq ✏ p. depA♣µq ✏ sub♣µqA. propA♣G, σ, m, m✶q ✏ ★ sub♣GqA if #♣Gq ✏ ω or m✶ ✘ ✍ ❏

  • therwise

sumA♣tpi✉i, Ξq ✏ ★ ❏ if Ξ has concurrent environment pi ♣➦

i piqA

  • therwise

Maxime Gamboni Dependency Analysis

slide-24
SLIDE 24

Behaviour Dependencies Activeness and Responsiveness Generic

Activeness

Definition (Activeness) goodA♣p, ♣Γ; Pqq if P ✑ ♣ν˜ zq

  • G.Q ⑤ R

✟ with sub♣Gq ✏ p. depA♣µq ✏ sub♣µqA. propA♣G, σ, m, m✶q ✏ ★ sub♣GqA if #♣Gq ✏ ω or m✶ ✘ ✍ ❏

  • therwise

sumA♣tpi✉i, Ξq ✏ ★ ❏ if Ξ has concurrent environment pi ♣➦

i piqA

  • therwise

Maxime Gamboni Dependency Analysis

slide-25
SLIDE 25

Behaviour Dependencies Activeness and Responsiveness Generic

Activeness

Definition (Activeness) goodA♣p, ♣Γ; Pqq if P ✑ ♣ν˜ zq

  • G.Q ⑤ R

✟ with sub♣Gq ✏ p. depA♣µq ✏ sub♣µqA. propA♣G, σ, m, m✶q ✏ ★ sub♣GqA if #♣Gq ✏ ω or m✶ ✘ ✍ ❏

  • therwise

sumA♣tpi✉i, Ξq ✏ ★ ❏ if Ξ has concurrent environment pi ♣➦

i piqA

  • therwise

Maxime Gamboni Dependency Analysis

slide-26
SLIDE 26

Behaviour Dependencies Activeness and Responsiveness Generic

Activeness

Definition (Activeness) goodA♣p, ♣Γ; Pqq if P ✑ ♣ν˜ zq

  • G.Q ⑤ R

✟ with sub♣Gq ✏ p. depA♣µq ✏ sub♣µqA. propA♣G, σ, m, m✶q ✏ ★ sub♣GqA if #♣Gq ✏ ω or m✶ ✘ ✍ ❏

  • therwise

sumA♣tpi✉i, Ξq ✏ ★ ❏ if Ξ has concurrent environment pi ♣➦

i piqA

  • therwise

Maxime Gamboni Dependency Analysis

slide-27
SLIDE 27

Behaviour Dependencies Activeness and Responsiveness Generic

Determinism

Definition (Determinism) For any pair of transitions ♣Γ; Pq

µi

ÝÝ Ñ ♣Γi; Piq s.t. π1 ✘ π2 are the corresponding steps, ❉♣Γi; Piq

ˆ µ¯

ı

Ý Ý Ý Ñ ♣Γ✶; P✶q s.t. the step corresponding to ˆ µi is πi.

Maxime Gamboni Dependency Analysis

slide-28
SLIDE 28

Behaviour Dependencies Activeness and Responsiveness Generic

Determinism

Definition (Determinism) For any pair of transitions ♣Γ; Pq

µi

ÝÝ Ñ ♣Γi; Piq s.t. π1 ✘ π2 are the corresponding steps, ❉♣Γi; Piq

ˆ µ¯

ı

Ý Ý Ý Ñ ♣Γ✶; P✶q s.t. the step corresponding to ˆ µi is πi. depD♣µq ✏ ❏ ϕD♣σ, G, m, m✶q def ✏ ★ ❑ if ✍ P tm, m✶✉ and ω ❘ tm, m✶✉ sub♣GqD

  • therwise

ϕD♣tpi✉i, Ξq def ✏ ★ ❑ if Ξ has concurrent environment pi ❏

  • therwise

Maxime Gamboni Dependency Analysis

slide-29
SLIDE 29

Behaviour Dependencies Activeness and Responsiveness Generic

Determinism

Definition (Determinism) For any pair of transitions ♣Γ; Pq

µi

ÝÝ Ñ ♣Γi; Piq s.t. π1 ✘ π2 are the corresponding steps, ❉♣Γi; Piq

ˆ µ¯

ı

Ý Ý Ý Ñ ♣Γ✶; P✶q s.t. the step corresponding to ˆ µi is πi. depD♣µq ✏ ❏ ϕD♣σ, G, m, m✶q def ✏ ★ ❑ if ✍ P tm, m✶✉ and ω ❘ tm, m✶✉ sub♣GqD

  • therwise

ϕD♣tpi✉i, Ξq def ✏ ★ ❑ if Ξ has concurrent environment pi ❏

  • therwise

Maxime Gamboni Dependency Analysis

slide-30
SLIDE 30

Behaviour Dependencies Activeness and Responsiveness Generic

Current and Future Work

Sound well-formedness criteria. Generic Type System Soundness. Implementation. Extensions (complex channel usages, recursion, subtyping, etc).

Maxime Gamboni Dependency Analysis

slide-31
SLIDE 31

Behaviour Dependencies Activeness and Responsiveness Generic

Current and Future Work

Sound well-formedness criteria. Generic Type System Soundness. Implementation. Extensions (complex channel usages, recursion, subtyping, etc).

Maxime Gamboni Dependency Analysis

slide-32
SLIDE 32

Behaviour Dependencies Activeness and Responsiveness Generic

Current and Future Work

Sound well-formedness criteria. Generic Type System Soundness. Implementation. Extensions (complex channel usages, recursion, subtyping, etc).

Maxime Gamboni Dependency Analysis

slide-33
SLIDE 33

Behaviour Dependencies Activeness and Responsiveness Generic

Current and Future Work

Sound well-formedness criteria. Generic Type System Soundness. Implementation. Extensions (complex channel usages, recursion, subtyping, etc).

Maxime Gamboni Dependency Analysis

slide-34
SLIDE 34

Behaviour Dependencies Activeness and Responsiveness Generic

Summary

Behavioural Properties Dependency Analysis: Reusable types for reusable code Generic Type Systems: Write an elementary rule, get a type system for almost free

Maxime Gamboni Dependency Analysis

slide-35
SLIDE 35

Behaviour Dependencies Activeness and Responsiveness Generic

Summary

Behavioural Properties Dependency Analysis: Reusable types for reusable code Generic Type Systems: Write an elementary rule, get a type system for almost free

Maxime Gamboni Dependency Analysis

slide-36
SLIDE 36

Behaviour Dependencies Activeness and Responsiveness Generic

Summary

Behavioural Properties Dependency Analysis: Reusable types for reusable code Generic Type Systems: Write an elementary rule, get a type system for almost free

Maxime Gamboni Dependency Analysis

slide-37
SLIDE 37

Behaviour Dependencies Activeness and Responsiveness Generic

Thank You

http://maxime.gamboni.org Answers to questions are non-isolated, non-deterministic, non-functional, active, responsive, deadlock-free, and terminate.

Maxime Gamboni Dependency Analysis