Mechanising Session Types Onwards and Upwards
Francisco Ferreira and Lorenzo Gheri (joint work with David Castro, and Nobuko Yoshida)
2019 ABCD Meeting
Mechanising Session Types Onwards and Upwards Francisco Ferreira - - PowerPoint PPT Presentation
Mechanising Session Types Onwards and Upwards Francisco Ferreira and Lorenzo Gheri (joint work with David Castro, and Nobuko Yoshida) 2019 ABCD Meeting The First Step Do a case study: Language Primitives and Type Discipline for
Francisco Ferreira and Lorenzo Gheri (joint work with David Castro, and Nobuko Yoshida)
2019 ABCD Meeting
Communication-Based Programming Revisited, by Yoshida and Vasconcelos.
This is the first step. Spoiler: Multiparty session types are next.
ssreflect.
scopes and handle environments in a versatile way.
lessons while struggling to finish the proof).
paper:
Vasconcelos, Kubo system from ESOP’98
paper:
Vasconcelos, Kubo system from ESOP’98
paper:
Vasconcelos, Kubo system from ESOP’98
Informatica
P ::= request a(k) in P session request | accept a(k) in P session acceptance | k![˜ e]; P data sending | k?(˜ x) in P data reception | k ✁ l; P label selection | k ✄ {l1 : P1[ ] · · · [ ]ln : Pn} label branching | throw k[k′]; P channel sending | catch k(k′) in P channel reception | if e then P else Q conditional branch | P | Q parallel composition | inact inaction | (νu)P name/channel hiding | def D in P recursion | X[˜ e˜ k] process variables e ::= c constant | e + e′ | e − e′ | e × e | not(e) | . . .
D ::= X1(˜ x1˜ k1) = P1 and · · · and Xn(˜ xn˜ kn) = Pn declaration for recursion
P ::= request a(k) in P session request | accept a(k) in P session acceptance | k![˜ e]; P data sending | k?(˜ x) in P data reception | k ✁ l; P label selection | k ✄ {l1 : P1[ ] · · · [ ]ln : Pn} label branching | throw k[k′]; P channel sending | catch k(k′) in P channel reception | if e then P else Q conditional branch | P | Q parallel composition | inact inaction | (νu)P name/channel hiding | def D in P recursion | X[˜ e˜ k] process variables e ::= c constant | e + e′ | e − e′ | e × e | not(e) | . . .
D ::= X1(˜ x1˜ k1) = P1 and · · · and Xn(˜ xn˜ kn) = Pn declaration for recursion
P ::= request a(k) in P session request | accept a(k) in P session acceptance | k![˜ e]; P data sending | k?(˜ x) in P data reception | k ✁ l; P label selection | k ✄ {l1 : P1[ ] · · · [ ]ln : Pn} label branching | throw k[k′]; P channel sending | catch k(k′) in P channel reception | if e then P else Q conditional branch | P | Q parallel composition | inact inaction | (νu)P name/channel hiding | def D in P recursion | X[˜ e˜ k] process variables e ::= c constant | e + e′ | e − e′ | e × e | not(e) | . . .
D ::= X1(˜ x1˜ k1) = P1 and · · · and Xn(˜ xn˜ kn) = Pn declaration for recursion
We consider terms up-to α-conversion
P ::= request a(k) in P session request | accept a(k) in P session acceptance | k![˜ e]; P data sending | k?(˜ x) in P data reception | k ✁ l; P label selection | k ✄ {l1 : P1[ ] · · · [ ]ln : Pn} label branching | throw k[k′]; P channel sending | catch k(k′) in P channel reception | if e then P else Q conditional branch | P | Q parallel composition | inact inaction | (νu)P name/channel hiding | def D in P recursion | X[˜ e˜ k] process variables e ::= c constant | e + e′ | e − e′ | e × e | not(e) | . . .
D ::= X1(˜ x1˜ k1) = P1 and · · · and Xn(˜ xn˜ kn) = Pn declaration for recursion
We consider terms up-to α-conversion Then we cannot distinguish: k?(x) in inact and k?(y) in inact
(throw k[k′]; P1) | (catch k(k′) in P2) → P1 | P2
(throw k[k′]; P1) | (catch k(k′) in P2) → P1 | P2
(throw k[k′]; P1) | (catch k(k′) in P2) → P1 | P2
This is a bound variable.
(throw k[k′]; P1) | (catch k(k′) in P2) → P1 | P2
This is a bound variable.
(throw k[k′]; P1) | (catch k(k′′) in P2) → P1 | P2[k′/k′′]
relation.
relation.
class”.
class”.
class”.
18 pages dedicated to the proof for the STLC!
class”.
class”.
(easy to compare)
(easy to split)
(less induction proofs)
(easy to compare)
(easy to split)
(less induction proofs)
These are generic enough and easy to
Theorem 3.3 (Subject Reduction) If Θ; Γ ⊢ P ⊲ ∆ with ∆ balanced and P →∗ Q, then Θ; Γ ⊢ Q ⊲ ∆′ and ∆′ balanced.
Is straightforward to represent:
DTRS19-4.pdf
the literature takes a lot of effort.
multiple name scopes.
akin to very careful implementation.
types.
implementation.
Multiparty Compatibility in Communicating Automata: Characterisation and Synthesis of Global Session Types Deniélou, Yoshida, 2013
We want Scribble-style protocol specifications Featherweight Scribble, Neykova, Yoshida, 2019
We want Scribble-style protocol specifications We also want to reason about concurrent programs.
We want Scribble-style protocol specifications We also want to reason about concurrent programs. Certified Code
we formalised.
we formalised.
Thanks for your kind attention! Questions?