Session-ocaml: a session-based library with polarities and lenses
File(s)preprint.pdf (562.62 KB)
Accepted version
Author(s)
Imai, K
Yoshida, N
Yuen, S
Type
Conference Paper
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.
Date Issued
2017-05-27
Date Acceptance
2017-05-01
Citation
Lecture Notes in Computer Science, 2017, 10319, pp.99-118
ISBN
978-3-319-59746-1
ISSN
0302-9743
Publisher
Springer
Start Page
99
End Page
118
Journal / Book Title
Lecture Notes in Computer Science
Volume
10319
Copyright Statement
© IFIP International Federation for Information Processing 2017
Sponsor
Engineering & Physical Science Research Council (E
Engineering & Physical Science Research Council (E
Engineering & Physical Science Research Council (EPSRC)
Commission of the European Communities
Engineering & Physical Science Research Council (EPSRC)
Engineering & Physical Science Research Council (E
Grant Number
ERI 025567 (EP/K034413/1)
PO 1553380
EP/K011715/1
612985
EP/N027833/1
72043/2
Source
19th International Conference on Coordination Models and Languages
Subjects
Artificial Intelligence & Image Processing
08 Information And Computing Sciences
Publication Status
Published
Start Date
2017-04-18
Finish Date
2017-04-19
Coverage Spatial
Paris, France