Hybrid session veri cation through endpoint API generation
File(s)DTR15-6.pdf (660.11 KB)
Published version
Author(s)
Hu, Raymond
Yoshida, Nobuko
Type
Report
Abstract
This paper proposes a new hybrid session veri cation method-
ology for applying session types directly to mainstream languages, based
on generating protocol-speci c endpoint APIs from multiparty session
types. The API generation promotes static type checking of the be-
havioural aspect of the source protocol by mapping the state space of
an endpoint in the protocol to a family of channel types in the tar-
get language. This is supplemented by very light run-time checks in the
generated API that enforce a linear usage discipline on instances of the
channel types. The resulting hybrid veri cation guarantees the absence
of protocol violation errors during the execution of the session. We have
implemented our methodology for Java as an extension to the Scrib-
ble framework, and used it to implement compliant clients and servers
for real-world protocols such as HTTP and SMTP. The API genera-
tion methodology additionally provides a platform for applying further
features from session type theory: our implementation supports choice
subtyping through branch interface generation, and safe permutation of
I/O actions and a ne inputs through input future generation.
ology for applying session types directly to mainstream languages, based
on generating protocol-speci c endpoint APIs from multiparty session
types. The API generation promotes static type checking of the be-
havioural aspect of the source protocol by mapping the state space of
an endpoint in the protocol to a family of channel types in the tar-
get language. This is supplemented by very light run-time checks in the
generated API that enforce a linear usage discipline on instances of the
channel types. The resulting hybrid veri cation guarantees the absence
of protocol violation errors during the execution of the session. We have
implemented our methodology for Java as an extension to the Scrib-
ble framework, and used it to implement compliant clients and servers
for real-world protocols such as HTTP and SMTP. The API genera-
tion methodology additionally provides a platform for applying further
features from session type theory: our implementation supports choice
subtyping through branch interface generation, and safe permutation of
I/O actions and a ne inputs through input future generation.
Date Issued
2015-01-01
Citation
Departmental Technical Report: 15/6, 2015, pp.1-24
Publisher
Department of Computing, Imperial College London
Start Page
1
End Page
24
Journal / Book Title
Departmental Technical Report: 15/6
Copyright Statement
© 2015 The Author(s). This report is available open access under a CC-BY-NC-ND (https://creativecommons.org/licenses/by-nc-nd/4.0/)
Publication Status
Published
Article Number
15/6