Session-ocaml: A Session-Based Library with Polarities and Lenses - Coordination Models and Languages (COORDINATION 2017)
Conference Papers Year : 2017

Session-ocaml: A Session-Based Library with Polarities and Lenses

Keigo Imai
  • Function : Author
  • PersonId : 1024629
Shoji Yuen
  • Function : Author

Abstract

We propose session-ocaml, a novel library for session-typed concurrent/distributed programming in OCaml. Our technique solely relies on parametric polymorphism, which can encode core session type structures with strong static guarantees. Our key ideas are: (1) polarised session types, which give an alternative formulation of duality enabling OCaml to automatically infer an appropriate session type in a session with a reasonable notational overhead; and (2) a parameterised monad with a data structure called ‘slots’ manipulated with lenses, which can statically enforce session linearity and delegations. We show applications of session-ocaml including a travel agency usecase and an SMTP protocol.
Fichier principal
Vignette du fichier
450044_1_En_6_Chapter.pdf (562.81 Ko) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-01657342 , version 1 (06-12-2017)

Licence

Identifiers

Cite

Keigo Imai, Nobuko Yoshida, Shoji Yuen. Session-ocaml: A Session-Based Library with Polarities and Lenses. 19th International Conference on Coordination Languages and Models (COORDINATION), Jun 2017, Neuchâtel, Switzerland. pp.99-118, ⟨10.1007/978-3-319-59746-1_6⟩. ⟨hal-01657342⟩
80 View
48 Download

Altmetric

Share

More