Typechecking Protocols with Mungo and StMungo

Abstract

We report on two tools that extend Java with support for static type-checking of communication protocols. Our Mungo tool extends Java with typestate definitions, which allow classes to be associated with state machines defining permitted sequences of method calls. A complementary tool, StMungo, takes a communication protocol specified in the Scribble protocol description language, and generates a typestate specification for each endpoint, capturing the permitted sequences of messages along that channel. Endpoint implementations can be validated by Mungo against their typestate definitions and then compiled as usual with javac. We formalise Mungo’s typestate inference system and demonstrate the Scribble, Mungo and StMungo toolchain via a typechecked SMTP client that can communicate with a real-world SMTP server.

Publication
In PPDP 2017
Dimitrios Kouzapas
Dimitrios Kouzapas
Research Associate
Ornela Dardha
Ornela Dardha
Assistant Professor

Dr. Ornela Dardha is a Lecturer (Assistant Professor) at the School of Computing Science, University of Glasgow.

Roly Perera
Roly Perera
Senior Research Software Engineer

He is currently a Senior research software engineer at The Alan Turing Institute.

Simon Gay
Simon Gay
Head of School of Computing Science

Professor Simon Gay is Head of School in the School of Computing Science.

Related