Session type providers: Compile-time API generation for distributed protocols with interaction refinements in F#
File(s)providers.pdf (865.35 KB)
Accepted version
Author(s)
Neykova, R
Hu, Raymond
Yoshida, N
Abdeljallal, F
Type
Conference Paper
Abstract
We present a library for the specification and implementation of distributed protocols in native F# (and other .NET languages) based on multiparty session types (MPST). There are two main contributions. Our library is the first practical development of MPST to support what we refer to as interaction refinements: a collection of features related to the refinement of protocols, such as message-type refinements (value constraints) and message value dependent control flow. A well-typed endpoint program using our library is guaranteed to perform only compliant session I/O actions w.r.t. to the refined protocol, up to premature termination.
Second, our library is developed as a session type provider, that performs on-demand compile-time protocol validation and generation of protocol-specific .NET types for users writing the distributed endpoint programs. It is implemented by extending and integrating Scribble (a toolchain for MPST) with an SMT solver into the type providers framework. The safety guarantees are achieved by a combination of static type checking of the generated types for messages and I/O operations, correctness by construction from code generation, and automated inlining of assertions.
Second, our library is developed as a session type provider, that performs on-demand compile-time protocol validation and generation of protocol-specific .NET types for users writing the distributed endpoint programs. It is implemented by extending and integrating Scribble (a toolchain for MPST) with an SMT solver into the type providers framework. The safety guarantees are achieved by a combination of static type checking of the generated types for messages and I/O operations, correctness by construction from code generation, and automated inlining of assertions.
Date Issued
2018-02-24
Date Acceptance
2018-01-01
Citation
CC 2018 Proceedings of the 27th International Conference on Compiler Construction Pages 128-138, 2018, pp.128-138
ISBN
9781450356442
Publisher
ACM
Start Page
128
End Page
138
Journal / Book Title
CC 2018 Proceedings of the 27th International Conference on Compiler Construction Pages 128-138
Copyright Statement
© 2018 ACM.
Sponsor
Engineering & Physical Science Research Council (E
Engineering & Physical Science Research Council (E
Engineering & Physical Science Research Council (EPSRC)
Engineering & Physical Science Research Council (EPSRC)
Engineering & Physical Science Research Council (E
Grant Number
ERI 025567 (EP/K034413/1)
PO 20015393
EP/K011715/1
EP/N027833/1
PO 20015391
Source
International Conference on Compiler Construction
Subjects
Science & Technology
Technology
Computer Science, Software Engineering
Computer Science
Multiparty Session Types
Distributed Programming
F#
Type Providers
Code Generation
Publication Status
Published
Start Date
2018-02-24
Finish Date
2018-02-25
Coverage Spatial
Vienna, Austria
Date Publish Online
2018-02-24