fuse an other ocaml implementation of binary sessions
play

FuSe an(other) OCaml implementation of binary sessions Luca - PowerPoint PPT Presentation

FuSe an(other) OCaml implementation of binary sessions Luca Padovani 1 / 8 target API Linear type theory for asynchronous session types (Gay & Vasconcelos 2010) : A service A accept : A service A request send : ! .


  1. FuSe an(other) OCaml implementation of binary sessions Luca Padovani 1 / 8

  2. target API Linear type theory for asynchronous session types (Gay & Vasconcelos 2010) : A service → A accept : A service → A request send : α → ! α . A → A : ? α . A → α × A receive : ( A k → [C i : A i ] i ∈ I ) → ⊕ [C i : A i ] i ∈ I → A k select : &[C i : A i ] i ∈ I → [C i : A i ] i ∈ I branch : unit → A × A create : end → unit close 2 / 8

  3. duality and linearity in OCaml Turn duality into equality ◮ Dardha et al. 2012 + tweak 3 / 8

  4. duality and linearity in OCaml Turn duality into equality ◮ Dardha et al. 2012 + tweak Ostrich approach to linearity ◮ no type-based mechanism, no monads, . . . ◮ affinity violations detected at runtime (Tov & Pucella 2010, Hu & Yoshida 2016) ◮ some (many?) violations detected by OCaml anyway 3 / 8

  5. duality ⇒ equality Session types revisited (Dardha et al., PPDP 2012) � T � = κ [ t ] � ! t . T � = ![ t × � T � ] � ? t . T � = ?[ t × � T � ] � T � = κ [ t ] ⇒ � T � = κ [ t ] 4 / 8

  6. duality ⇒ equality Session types revisited + tweak (Dardha et al., PPDP 2012) � T � = � t , s � � ! t . T � = � 0 , t × � T � � � ? t . T � = � t × � T � , 0 � � T � = � t , s � ⇒ � T � = � s , t � 5 / 8

  7. target API (encoded) accept : � α, β � service → � α, β � : � α, β � service → � β, α � request : γ → � 0 , γ × � β, α �� → � α, β � send : � γ × � α, β � , 0 � → γ × � α, β � receive : ( � β, α � → γ ) → � 0 , γ � → � α, β � select : � γ, 0 � → γ branch create : unit → � α, β � × � β, α � : � 0 , 0 � → unit close 6 / 8

  8. DEMO 7 / 8

  9. wrap-up ◮ GV-style sessions (Gay & Vasconcelos, JFP 2010) ◮ context-free session types (Thiemann & Vasconcelos, ICFP 2016) ◮ subtyping (Gay & Hole, Acta 2005) ◮ chaperone contracts (ongoing with Hernán Melgratti) References ◮ FuSe details and implementation (Padovani, JFP 2017) ◮ context-free session types in FuSe (Padovani, ESOP 2017) 8 / 8

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend