Typechecking protocols with Mungo and StMungo: a session type toolchain for Java

Kouzapas, D., Dardha, O. , Perera, R. and Gay, S. J. (2018) Typechecking protocols with Mungo and StMungo: a session type toolchain for Java. Science of Computer Programming, 155, pp. 52-75. (doi: 10.1016/j.scico.2017.10.006)

[img]
Preview
Text
150069.pdf - Published Version
Available under License Creative Commons Attribution.

635kB

Abstract

Static typechecking is an important feature of many standard programming languages. However, static typing focuses on data rather than communication, and therefore does not help programmers correctly implement communication protocols in distributed systems. The theory of session types provides a basis for tackling this problem; we use it to develop two tools that support static typechecking of communication protocols in Java. The first tool, Mungo, extends Java with typestate definitions, which allow classes to be associated with state machines defining permitted sequences of method calls: for example, communication methods. The second tool, StMungo, takes a session type describing a communication protocol, and generates a typestate specification of the permitted sequences of messages in the protocol. Protocol implementations can be validated by Mungo against their typestate definitions and then compiled with a standard Java compiler. The result is a toolchain for static typechecking of communication protocols in Java. We formalise and prove soundness of the typestate inference system used by Mungo, and show that our toolchain can be used to typecheck a client for the standard Simple Mail Transfer Protocol (SMTP).

Item Type:Articles
Status:Published
Refereed:Yes
Glasgow Author(s) Enlighten ID:Dardha, Dr Ornela and Perera, Dr Roland and Gay, Professor Simon and Kouzapas, Mr Dimitrios
Authors: Kouzapas, D., Dardha, O., Perera, R., and Gay, S. J.
College/School:College of Science and Engineering > School of Computing Science
Journal Name:Science of Computer Programming
Publisher:Elsevier
ISSN:0167-6423
ISSN (Online):1872-7964
Published Online:05 December 2017
Copyright Holders:Copyright © 2017 The Authors
First Published:First published in Science of Computer Programming 155:52-75
Publisher Policy:Reproduced under a Creative Commons License

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

Project CodeAward NoProject NamePrincipal InvestigatorFunder's NameFunder RefLead Dept
612411From Data Types to Session Types - A Basis for Concurrency and Distribution.Simon GayEngineering and Physical Sciences Research Council (EPSRC)EP/K034413/1COM - COMPUTING SCIENCE