Linear logical relations and observational equivalences for session-based concurrency

Jorge A. Pérez, Luís Caires, Frank Pfenning, Bernardo Toninho
2014 Information and Computation  
Citation for published version (APA): Perez, J. A., Caires, L., Pfenning, F., & Toninho, B. (2014) . Linear logical relations and observational equivalences for session-based concurrency. Information and Computation, 239, We investigate strong normalization, confluence, and behavioral equality in the realm of session-based concurrency. These interrelated issues underpin advanced correctness analysis in models of structured communications. The starting point for our study is an interpretation of
more » ... linear logic propositions as session types for communicating processes, proposed in prior work. Strong normalization and confluence are established by developing a theory of logical relations. Defined upon a linear type structure, our logical relations remain remarkably similar to those for functional languages. We also introduce a natural notion of observational equivalence for session-typed processes. Strong normalization and confluence come in handy in the associated coinductive reasoning: as applications, we prove that all proof conversions induced by the logic interpretation actually express observational equivalences, and explain how type isomorphisms resulting from linear logic equivalences are realized by coercions between interface types of session-based concurrent systems. We introduce the syntax and operational semantics of the synchronous π -calculus [42] extended with (binary) guarded choice. Definition 2.1 (Processes). Given an infinite set Λ of names (ranged over x, y, z, u, v), the set of processes (ranged over P , Q , R) is defined by The operators 0, P | Q , and (ν y)P comprise the static fragment of any π -calculus: they represent inaction, parallel composition, and name restriction, respectively. We then have prefixed processes xy.P and x( y).P : while the former denotes a process which sends name y on x and then proceeds as P , the latter denotes a process which receives a name z on x, and then proceeds as P with parameter y replaced by z. Process !x(y).P denotes replicated (persistent) input. Following [40], we write x( y) as an abbreviation for (ν y)xy. The forwarding construct [x ↔ y] equates names x and y; it is a primitive representation of a copycat process, akin to the link processes used in internal mobility encodings of name-passing [5] . As described in Section 3, this construct allows for a simple identity axiom in the type system [45] . The remaining three operators define a minimal labeled choice mechanism, comparable to the n-ary branching constructs found in standard session π -calculi (see, e.g., [23] ). Without loss of generality we restrict our model to binary choice. In restriction (ν y)P and input x( y).P the distinguished occurrence of name y is binding, with scope P . The set of free names of a process P is denoted by fn(P ). A process is closed if it does not contain free occurrences of names. We identify process up to consistent renaming of bound names, writing ≡ α for this congruence. We write P {x/y} for the capture-avoiding substitution of x for y in P . While structural congruence expresses basic identities on the structure of processes, reduction expresses the behavior of processes. Definition 2.2. Structural congruence ( P ≡ Q ) is the least congruence relation on processes such that Definition 2.3. Reduction ( P → Q ) is the binary relation on processes defined by the rules in Fig. 1 . By definition, reduction is closed under ≡. It specifies the computations a process performs on its own. To define the interactions of a process with its environment, we extend the early transition system for the π -calculus [42] with labels Γ ; Δ, x: A ⊗ B, z:C ⊗ D x( y).z(w).P c z(w).x( y).P :: T Proposition 5.3. Let Γ and Δ be a non-linear and a linear typing environment, resp. Then, for all Q ∈ C Γ and for all R ∈ C Δ , we have Q ⇓ and R⇓. Moreover, Q −→. Proof. By Definition 5.6, every process in C Δ corresponds to the composition of non-interfering, terminating processes. Hence, R⇓. The same applies for processes in C Γ , which, by construction, correspond to the composition of input-guarded replicated processes. Hence, Q ⇓, Q −→. 2 Lemma 5.1. Let P be a process such that Γ ; Δ P :: T , with Γ = {u i :B i } i∈I and Δ = {x j :A j } j∈ J . We then have: Proof. Immediate from Definitions 5.5 and 5.6. 2 The following closure properties will be fundamental in the second step of the proof, when we will show that well-typed processes are in the logical predicate. We first state closure of L[T ] with respect to substitution and structural congruence: 5.4. Let A be a type. If P ∈ L[z:A] then P {x/z} ∈ L[x:A]. Proof. Immediate from Definition 5.4. 2 Proposition 5.5. Let P , Q be well-typed. If P ∈ L[T ] and P ≡ Q then Q ∈ L[T ]. Proof. By induction on the definition of P ≡ Q , using Propositions 5.1 and 5.2, and the fact that well-typed processes are closed under ≡ by definition. 2 The next proposition provides a basic liveness guarantee for typed processes. Proposition 5.6. Let ·; · P :: z:T and P ⇓, with T ∈ {A ⊗ B, A B, A ⊕ B, A & B}. Then, there exist α, P such that P α ⇒ P , and one of the following holds:
doi:10.1016/j.ic.2014.08.001 fatcat:jjd3f3lrbncg7hcm53tzb7e2iq