On B¨ ohm Trees and L´ evy-Longo Trees in π -calculus Xian Xu East China University of Science and Technology (from ongoing work with Davide Sangiorgi) April, 2013
1 Subject Encodings from λ -calculus (sequential programming) to π -calculus (concurrent programming) or variants of name-passing process models. 2013
2 Benefit λ in π 1. expressiveness exhibition 2. λ -model in process models 3. full abstraction Known encodings: [Milner, 1990] [Sangiorgi, 1993,1994,1995] [Merro and Sangiorgi, 2004] [Cai and Fu, 2011] [Hirschkoff, Madiot, and Sangiorgi, 2012] ... 2013
3 ] ≍ [ M = N iff [ [ M ] [ N ] ] 2013
3-a Aim of our work To find general conditions that ensure desired full abstraction of an encoding. ] ≍ [ M = N iff [ [ M ] [ N ] ] 2013
3-b Aim of our work To find general conditions that ensure desired full abstraction of an encoding. full abstraction w.r.t. L´ evy-Longo tree (LT) equality or B¨ ohm tree (BT) equality ] ≍ [ M = N iff [ [ M ] [ N ] ] 2013
3-c Aim of our work To find general conditions that ensure desired full abstraction of an encoding. full abstraction w.r.t. L´ evy-Longo tree (LT) equality or B¨ ohm tree (BT) equality ] ≍ [ M = N iff [ [ M ] [ N ] ] = is L´ evy-Longo tree or B¨ ohm tree equality; ≍ is a behavioral equivalence in the target model. 2013
4 Motivation 1. Importance of BT and LT: (1) Operational semantics of λ -terms (2) Observational theory in λ (LT and BT equalities) (3) The local structure of some of influential models of the λ -calculus is the BT equality (E.g. [Scott & Plotkin’s P ω 1976] [Plotkin’s T ω ,1978] [Plotkin & Engeler’s D A , 1981]) 2. Proof methods for full abstraction are often tedious: (1) Operational correspondence (2) Validity of β rule (3) Proof technique: B¨ ohm-out, up-to. (E.g. [Sangiorgi, 1995], [Boudol & Laneve, 1995]) 2013
5 Motivation 1. Importance of BT and LT: (1) Operational semantics of λ -terms (2) Observational theory in λ (LT and BT equalities) (3) The local structure of some of influential models of the λ -calculus is the BT equality (E.g. [Scott & Plotkin’s P ω 1976] [Plotkin’s T ω ,1978] [Plotkin & Engeler’s D A , 1981]) 2. Proof methods for full abstraction are often tedious: (1) Operational correspondence (2) Validity of β rule (3) Proof technique: B¨ ohm-out, up-to. (E.g. [Sangiorgi, 1995], [Boudol & Laneve, 1995]) 2013
6 Organization of this talk • D EFINITIONS • T HE CONDITIONS • E XAMPLES • E XTENSION 2013
7 Definitions 2013
8 M ∈ PO n : M has proper order n , i.e. like λx 1 . . . x n . Ω . evy–Longo Tree of M , LT(M), is: Definition 1 (L´ evy-Longo trees) . The L´ if M ∈ PO ω ; (1) LT ( M ) = ⊤ if M ∈ PO n , 0 � n < ω ; (2) LT ( M ) = λx 1 . . . x n . ⊥ (3) LT ( M ) = λ � x . y · · · · · · LT ( M 1 ) LT ( M n ) → ∗ if M − h λ � x . yM 1 . . . M n , n � 0 . LT equality: LT ( M ) = LT ( N ) , i.e. they have the same LTs. 2013
9 B¨ ohm trees B¨ ohm trees (BTs): if M ∈ PO n , 0 � n � ω BT ( M ) = ⊥ plus (3) of LT. BT equality: BT ( M ) = BT ( N ) , i.e. they have the same BTs. 2013
10 Examples M ≡ λz . x Ω( y Ξ)( λx . Ω) ( Ξ = ( λxz . xx )( λxz . xx ) ) LT ( M ) = λz . x y ⊥ λx . ⊥ ⊤ BT ( M ) = λz . x y ⊥ ⊥ ⊥ 2013
11 Definition 2 (encoding of the λ -calculus) . A mapping from λ -terms to π -agents, and is compositional. def def C x i.e., [ [ λx . M ] ] = λ [ [ [ M ] ] ] [ [ MN ] ] = C app [ [ [ M ] ] , [ [ N ] ] ] 2013
11-a Definition 2 (encoding of the λ -calculus) . A mapping from λ -terms to π -agents, and is compositional. def def C x i.e., [ [ λx . M ] ] = λ [ [ [ M ] ] ] [ [ MN ] ] = C app [ [ [ M ] ] , [ [ N ] ] ] Two kinds of contexts: def • Abstraction context: C x [ λx . [ · ]] = [ ] λ def • Variable context: C x,n = [ [ x [ · ] 1 · · · [ · ] n ] ] var 2013
12 Conventions: • [ [ ] ] is an encoding of the λ -calculus into π -calculus • V ar ⊆ N , where N is the set of π -names • σ stands for name substitution, i.e. mapping on π names • C is a set of contexts for π • ≤ is a precongruence and ≍ is a congruence on the agents of π -calculus 2013
13 Definition 3. [ [ ] ] and ≍ are: • complete if ] ≍ [ LT ( M ) = LT ( N ) (or BT ( M ) = BT ( N ) ) implies [ [ M ] [ N ] ] . • sound if [ [ M ] ] ≍ [ [ N ] ] implies LT ( M ) = LT ( N ) (or BT ( M ) = BT ( N ) ). Full abstraction : soundness & completeness. 2013
14 Auxiliary definitions (Def.4-6) Definition 4. [ [ ] ] and relation R : [ M { N / • validate rule β ] R [ x } ] if [ [( λx . M ) N ] ] . [ λy . ( M { y / • validate rule α if [ ] R [ x } )] [ λx . M ] ] . Definition 5. C is closed under context composition if ∀ C ∈ C . ∀ D (unary context). D [ C ] ∈ C . 2013
15 Definition 6. ≍ has unique solution of equations up to ≤ and the contexts C if ∀R , it holds that • If P R Q implies 1. P ≍ Q , or 2. ∃ C ∈ C with ( 1 � i � n ) ≥ P C [ P 1 , . . . , P n ] ≥ Q C [ Q 1 , . . . , Q n ] R P i Q i P i σ R Q i σ for all σ , if [ · ] i occurs under an input in C then R ⊆≍ . Intuitively, this definition comes from the proof technique of up-to context and expansion. 2013
15-a Definition 6. ≍ has unique solution of equations up to ≤ and the contexts C if ∀R , it holds that • If P R Q implies 1. P ≍ Q , or 2. ∃ C ∈ C with ( 1 � i � n ) ≥ P C [ P 1 , . . . , P n ] ≥ Q C [ Q 1 , . . . , Q n ] R P i Q i P i σ R Q i σ for all σ , if [ · ] i occurs under an input in C then R ⊆≍ . • Moreover, R should also be closed under substitution, if the synchronous π -calculus is used. Intuitively, this definition comes from the proof technique of up-to context and expansion. 2013
16 The conditions 2013
17 The conditions for completeness 2013
18 ] and ≍ are complete for LTs, if Theorem 7 ( completeness for LT ) . [ [ ] ∃ ≤ , C , the conditions below are met. 1. the variable contexts of [ [ ] ] are contained in C ; 2. either (a) the abstraction contexts of [ [ ] ] are contained in C ; 3. ≍⊇≥ ; 4. ≍ has unique solution of equations up to ≤ and the contexts C ; 5. [ [ ] ] , ≥ validate rules α and β ; ] ≡ [ 6. [ [ ] ] respects substitution, i.e. [ [ Mσ ] [ M ] ] σ ; 7. whenever M ∈ PO 0 then [ [ M ] ] ≍ [ [Ω] ] . 2013
18-a ] and ≍ are complete for LTs, if Theorem 7 ( completeness for LT ) . [ [ ] ∃ ≤ , C , the conditions below are met. 1. the variable contexts of [ [ ] ] are contained in C ; 2. either (a) the abstraction contexts of [ [ ] ] are contained in C ; or (b) C is closed under composition and (c) M, N ∈ PO ω imlpies [ [ M ] ] ≍ [ [ N ] ] ; 3. ≍⊇≥ ; 4. ≍ has unique solution of equations up to ≤ and the contexts C ; 5. [ [ ] ] , ≥ validate rules α and β ; ] ≡ [ 6. [ [ ] ] respects substitution, i.e. [ [ Mσ ] [ M ] ] σ ; 7. whenever M ∈ PO 0 then [ [ M ] ] ≍ [ [Ω] ] . 2013
19 ] and ≍ are complete for BTs, if Theorem 8 ( completeness for BT ) . [ [ ] ∃ ≤ , C , the conditions below are met. ] are contained in C ; 1. the variable contexts of [ [ ] 2. either ] are contained in C and (a) the abstraction contexts of [ [ ] (b) [ [ λx . Ω] ] ≤ [ [Ω] ] ; 3. ≍⊇≥ ; 4. ≍ has unique solution of equations up to ≤ and the contexts C ; ] , ≥ validate rules α and β ; 5. [ [ ] 6. [ [ ] ] respects substitution, i.e. [ [ Mσ ] ] ≡ [ [ M ] ] σ ; 7. whenever M ∈ PO 0 then [ ] ≍ [ [ M ] [Ω] ] . 2013
19-a ] and ≍ are complete for BTs, if Theorem 8 ( completeness for BT ) . [ [ ] ∃ ≤ , C , the conditions below are met. ] are contained in C ; 1. the variable contexts of [ [ ] 2. either ] are contained in C and (a) the abstraction contexts of [ [ ] (b) [ [ λx . Ω] ] ≤ [ [Ω] ] ; or (c) C is closed under composition and (d) M ∈ PO ω imlpies [ [ M ] ] ≍ [ [Ω] ] ; 3. ≍⊇≥ ; 4. ≍ has unique solution of equations up to ≤ and the contexts C ; ] , ≥ validate rules α and β ; 5. [ [ ] 6. [ [ ] ] respects substitution, i.e. [ [ Mσ ] ] ≡ [ [ M ] ] σ ; 7. whenever M ∈ PO 0 then [ ] ≍ [ [ M ] [Ω] ] . 2013
20 The conditions for soundness 2013
21 Definition 9. C : n -hole context. C has inverse w.r.t. ≥ , if ∀ i = 1 , . . . , n ∃ D i s.t. D i [ C [ � ∀ A 1 , . . . , A n , it holds that A ]] ≥ A i 2013
22 Theorem 10 ( soundness for LT ) . [ [] ] and ≍ are sound for LTs, if ∃ ≤ , the conditions below are satisfied. 1. ≥⊆≍ (also ≤⊆≍ ); ] and ≥ validate rules α and β ; 2. [ [] 3. If M ∈ PO 0 , then [ ] ≍ [ ] ≍ [ [ M ] [Ω] [ M ] ] ; [ y � 4. [ [Ω] ] , [ [ λx . M ] ] , [ [ xM 1 · · · M m ] ] , [ [ xN 1 · · · N n ] ] , and [ O ] ] are pairwise unequal w.r.t. ≍ ; 5. The abstraction contexts of [ [ ] ] have inverse with respect to ≥ ; ] have inverse with respect to ≥ . 6. The variable contexts of [ [ ] 2013
Recommend
More recommend