Typechecking Java Protocols with [St]Mungo

Voinea, A. L. , Dardha, O. and Gay, S. J. (2020) Typechecking Java Protocols with [St]Mungo. In: 40th IFIP WG 6.1 International Conference, FORTE 2020, Valletta, Malta, 15-19 Jun 2020, pp. 208-224. ISBN 9783030500856 (doi: 10.1007/978-3-030-50086-3_12)

[img]
Preview
Text
222899.pdf - Accepted Version

756kB

Abstract

This is a tutorial paper on [St]Mungo, a toolchain based on multiparty session types and their connection to typestates for safe distributed programming in Java language. The StMungo (“Scribble-to-Mungo”) tool is a bridge between multiparty session types and typestates. StMungo translates a communication protocol, namely a sequence of sends and receives of messages, given as a multiparty session type in the Scribble language, into a typestate specification and a Java API skeleton. The generated API skeleton is then further extended with the necessary logic, and finally typechecked by Mungo. The Mungo tool extends Java with (optional) typestate specifications. A typestate is a state machine specifying a Java object protocol, namely the permitted sequence of method calls of that object. Mungo statically typechecks that method calls follow the object’s protocol, as defined by its typestate specification. Finally, if no errors are reported, the code is compiled with javac and run as standard Java code. In this tutorial paper we give an overview of the stages of the [St]Mungo toolchain, starting from Scribble communication protocols, translating to Java classes with typestates, and finally to typechecking method calls with Mungo. We illustrate the [St]Mungo toolchain via a real-world case study, the HTTP client-server request-response protocol over TCP. During the tutorial session, we will apply [St]Mungo to a range of examples having increasing complexity, with HTTP being one of them.

Item Type:Conference Proceedings
Status:Published
Refereed:Yes
Glasgow Author(s) Enlighten ID:Dardha, Dr Ornela and VOINEA, Laura and Gay, Professor Simon
Authors: Voinea, A. L., Dardha, O., and Gay, S. J.
College/School:College of Science and Engineering > School of Computing Science
ISSN:0302-9743
ISBN:9783030500856
Published Online:08 June 2020
Copyright Holders:Copyright © 2020 IFIP International Federation for Information Processing
First Published:First published in Formal Techniques for Distributed Objects, Components, and Systems: 208-224
Publisher Policy:Reproduced in accordance with the publisher copyright policy

University Staff: Request a correction | Enlighten Editors: Update this record

Project CodeAward NoProject NamePrincipal InvestigatorFunder's NameFunder RefLead Dept
168293From Data Types to Session Types - A Basis for Concurrency and Distribution.Simon GayEngineering and Physical Sciences Research Council (EPSRC)EP/K034413/1Computing Science
300253BEHAPIOrnela DardhaEuropean Commission (EC)778233Computing Science