Hybrid Session Verification through Endpoint API Generation

Raymond Hu (homepage) and Nobuko Yoshida (homepage)

Abstract

This paper proposes a new hybrid session verification methodology for applying session types directly to mainstream languages, based on generating protocol-specific endpoint APIs from multiparty session types. The API generation promotes static type checking of the behavioural aspect of the source protocol by mapping the state space of an endpoint in the protocol to a family of channel types in the target 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 verification guarantees the absence of protocol violation errors during the execution of the session. We implement our methodology for Java as an extension to the Scribble frame work, and use it to specify and implement compliant clients and servers for real-world protocols such as HTTP and SMTP.


Resources: