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 Behavioural Properties, Existential and Universal p A , p I Dependency Statements, Behavioural Statements α ➌ γ , ξ O ✏ ξ 1 ❴ ♣ ξ 2 ❫ ξ 3 q Type Systems a A ✩ AR t . a ⑤ ¯ t Generic Type System Γ ✩ K P Maxime Gamboni Dependency Analysis
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
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
Behaviour Dependencies Activeness and Responsiveness Generic Behavioural Properties: Existential vs universal good k ♣ P q implies good k ♣ P ⑤ Q q bad k ♣ P q implies bad k ♣ P ⑤ Q q Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Dependency Analysis (1) Parallel composition fundamental to the π -calculus P ✏ P 1 ⑤ P 2 ⑤ . . . ⑤ P n Need to analyse one component at a time t Γ i ✩ P i ✉ ÞÑ ♣ Γ ✩ P q Need to make assumptions on the environment Γ i ✏ ♣ Ξ L ➒ Ξ E q Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Dependency Analysis (1) Parallel composition fundamental to the π -calculus P ✏ P 1 ⑤ P 2 ⑤ . . . ⑤ P n Need to analyse one component at a time t Γ i ✩ P i ✉ ÞÑ ♣ Γ ✩ P q Need to make assumptions on the environment Γ i ✏ ♣ Ξ L ➒ Ξ E q Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Dependency Analysis (1) Parallel composition fundamental to the π -calculus P ✏ P 1 ⑤ P 2 ⑤ . . . ⑤ P n Need to analyse one component at a time t Γ i ✩ P i ✉ ÞÑ ♣ Γ ✩ P q Need to make assumptions on the environment Γ i ✏ ♣ Ξ L ➒ Ξ E q Maxime Gamboni Dependency Analysis
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
Behaviour Dependencies Activeness and Responsiveness Generic Behavioural Statements Definition (Behavioural Statements) ✞ ✞ ✞ ✞ Ξ :: ✏ ♣ γ ➌ Ξ q ♣ Ξ ❴ Ξ q ♣ Ξ ❫ Ξ q ❏ ❑ ✞ ✞ ✞ ✞ A ✏ ! a ♣ tf q . b ♣ ν t ✶ f ✶ q . ♣ t ✶ . c ① tf ②� f ✶ . f q a D ➌ ♣ b D ❫ c D q ✩ b D ➌ ❏ ✩ B ✏ ! b ♣ tf q . t b D ➌ ❑ ✩ C ✏ ! c ♣ tf q . ♣♣ ν q q q ⑤ q . t ⑤ q . f q a D ➌ ♣❏ ❫ c D q ✕ a D ➌ c D ✩ A ⑤ B a D ➌ ♣ b D ❫ ❑q ✕ a D ➌ ❑ ✩ A ⑤ C Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Behavioural Statements Definition (Behavioural Statements) ✞ ✞ ✞ ✞ Ξ :: ✏ ♣ γ ➌ Ξ q ♣ Ξ ❴ Ξ q ♣ Ξ ❫ Ξ q ❏ ❑ ✞ ✞ ✞ ✞ A ✏ ! a ♣ tf q . b ♣ ν t ✶ f ✶ q . ♣ t ✶ . c ① tf ②� f ✶ . f q a D ➌ ♣ b D ❫ c D q ✩ b D ➌ ❏ ✩ B ✏ ! b ♣ tf q . t b D ➌ ❑ ✩ C ✏ ! c ♣ tf q . ♣♣ ν q q q ⑤ q . t ⑤ q . f q a D ➌ ♣❏ ❫ c D q ✕ a D ➌ c D ✩ A ⑤ B a D ➌ ♣ b D ❫ ❑q ✕ a D ➌ ❑ ✩ A ⑤ C Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Behavioural Statements Definition (Behavioural Statements) ✞ ✞ ✞ ✞ Ξ :: ✏ ♣ γ ➌ Ξ q ♣ Ξ ❴ Ξ q ♣ Ξ ❫ Ξ q ❏ ❑ ✞ ✞ ✞ ✞ A ✏ ! a ♣ tf q . b ♣ ν t ✶ f ✶ q . ♣ t ✶ . c ① tf ②� f ✶ . f q a D ➌ ♣ b D ❫ c D q ✩ b D ➌ ❏ ✩ B ✏ ! b ♣ tf q . t b D ➌ ❑ ✩ C ✏ ! c ♣ tf q . ♣♣ ν q q q ⑤ q . t ⑤ q . f q a D ➌ ♣❏ ❫ c D q ✕ a D ➌ c D ✩ A ⑤ B a D ➌ ♣ b D ❫ ❑q ✕ a D ➌ ❑ ✩ A ⑤ C Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Behavioural Statements Definition (Behavioural Statements) ✞ ✞ ✞ ✞ Ξ :: ✏ ♣ γ ➌ Ξ q ♣ Ξ ❴ Ξ q ♣ Ξ ❫ Ξ q ❏ ❑ ✞ ✞ ✞ ✞ A ✏ ! a ♣ tf q . b ♣ ν t ✶ f ✶ q . ♣ t ✶ . c ① tf ②� f ✶ . f q a D ➌ ♣ b D ❫ c D q ✩ b D ➌ ❏ ✩ B ✏ ! b ♣ tf q . t b D ➌ ❑ ✩ C ✏ ! c ♣ tf q . ♣♣ ν q q q ⑤ q . t ⑤ q . f q a D ➌ ♣❏ ❫ c D q ✕ a D ➌ c D ✩ A ⑤ B a D ➌ ♣ b D ❫ ❑q ✕ a D ➌ ❑ ✩ A ⑤ C Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Behavioural Statements Definition (Behavioural Statements) ✞ ✞ ✞ ✞ Ξ :: ✏ ♣ γ ➌ Ξ q ♣ Ξ ❴ Ξ q ♣ Ξ ❫ Ξ q ❏ ❑ ✞ ✞ ✞ ✞ A ✏ ! a ♣ tf q . b ♣ ν t ✶ f ✶ q . ♣ t ✶ . c ① tf ②� f ✶ . f q a D ➌ ♣ b D ❫ c D q ✩ b D ➌ ❏ ✩ B ✏ ! b ♣ tf q . t b D ➌ ❑ ✩ C ✏ ! c ♣ tf q . ♣♣ ν q q q ⑤ q . t ⑤ q . f q a D ➌ ♣❏ ❫ c D q ✕ a D ➌ c D ✩ A ⑤ B a D ➌ ♣ b D ❫ ❑q ✕ a D ➌ ❑ ✩ A ⑤ C Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Behavioural Statements Definition (Behavioural Statements) ✞ ✞ ✞ ✞ Ξ :: ✏ ♣ γ ➌ Ξ q ♣ Ξ ❴ Ξ q ♣ Ξ ❫ Ξ q ❏ ❑ ✞ ✞ ✞ ✞ A ✏ ! a ♣ tf q . b ♣ ν t ✶ f ✶ q . ♣ t ✶ . c ① tf ②� f ✶ . f q a D ➌ ♣ b D ❫ c D q ✩ b D ➌ ❏ ✩ B ✏ ! b ♣ tf q . t b D ➌ ❑ ✩ C ✏ ! c ♣ tf q . ♣♣ ν q q q ⑤ q . t ⑤ q . f q a D ➌ ♣❏ ❫ c D q ✕ a D ➌ c D ✩ A ⑤ B a D ➌ ♣ b D ❫ ❑q ✕ a D ➌ ❑ ✩ A ⑤ C Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Activeness and Responsiveness: Semantics Definition (Immediate Activeness) � ✟ good A ♣ a , ♣ Γ; P qq if P ✑ ♣ ν ˜ z q a ♣ ˜ y q . Q ⑤ R � ✟ good A ♣ a , ♣ Γ; P qq if P ✑ ♣ ν ˜ z q a ① ˜ x ② . Q ⑤ R Definition (Immediate Responsiveness) a ♣ tf q Ñ P ✶ and ¯ t A ❴ ¯ ù P ✶ . bad R ♣ a , ♣ Γ; P qq if P Ý Ý Ý Ý f A ⑧⑤ Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Activeness and Responsiveness: Semantics Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Type System (Activeness and Responsiveness) ✁ Γ i ✩ AR P i Γ ✩ AR P ❏ ✩ AR 0 ♣ Nil q ♣ Par q ♣ ν x q Γ ✩ AR ♣ ν x q P ♣ Res q Γ 1 ❞ Γ 2 ✩ AR P 1 ⑤ P 2 sub ♣ G i q ✏ t p i ✉ , ♣ Ξ L i ➒ Ξ E i q ✩ AR G i . P i , Ξ E ➝ ➍ i Ξ E i � Ξ E has concurrent environment p i ✶ ✟ ñ ε ✏ ❑ ♣ Sum q � ✟ ♣ ➦ i p i q A ➌ ε ❫ ➎ i Ξ L i ➒ Ξ E ✩ AR ➦ i G i . P i ♣ # ✏ 1 and m ✶ ✏ ✍q ñ ε ✏ ❑ Γ ✩ AR P ♣ Pre q ✁ p m ✶ ✠ p : σ ; ➒ p m ❫ ¯ ✁ ❞ ♣ ν ˜ z q Γ ➌ ¯ p A ❞ σ r ˜ x s➌ ¯ p AR ✟ # ✩ AR ♣ ν ˜ p # z q p # ① ˜ ❞ A ➌ ε ❫ p R ➌ σ r ˜ x s x ② . P Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Type System (Activeness and Responsiveness) ✁ Γ i ✩ AR P i Γ ✩ AR P ❏ ✩ AR 0 ♣ Nil q ♣ Par q ♣ ν x q Γ ✩ AR ♣ ν x q P ♣ Res q Γ 1 ❞ Γ 2 ✩ AR P 1 ⑤ P 2 sub ♣ G i q ✏ t p i ✉ , ♣ Ξ L i ➒ Ξ E i q ✩ AR G i . P i , Ξ E ➝ ➍ i Ξ E i � Ξ E has concurrent environment p i ✶ ✟ ñ ε ✏ ❑ ♣ Sum q � ✟ ♣ ➦ i p i q A ➌ ε ❫ ➎ i Ξ L i ➒ Ξ E ✩ AR ➦ i G i . P i ♣ # ✏ 1 and m ✶ ✏ ✍q ñ ε ✏ ❑ Γ ✩ AR P ♣ Pre q ✁ p m ✶ ✠ p : σ ; ➒ p m ❫ ¯ ✁ ❞ ♣ ν ˜ z q Γ ➌ ¯ p A ❞ σ r ˜ x s➌ ¯ p AR ✟ # ✩ AR ♣ ν ˜ p # z q p # ① ˜ ❞ A ➌ ε ❫ p R ➌ σ r ˜ x s x ② . P Maxime Gamboni Dependency Analysis
Behaviour Dependencies Activeness and Responsiveness Generic Generic Type System Instantiated with: Immediate correctness (semantics) Elementary rules (typing) Maxime Gamboni Dependency Analysis
Recommend
More recommend