Cargando…
Typechecking Java Protocols with [St]Mungo
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 communic...
Autores principales: | , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
2020
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7281875/ http://dx.doi.org/10.1007/978-3-030-50086-3_12 |
_version_ | 1783544016114024448 |
---|---|
author | Voinea, A. Laura Dardha, Ornela Gay, Simon J. |
author_facet | Voinea, A. Laura Dardha, Ornela Gay, Simon J. |
author_sort | Voinea, A. Laura |
collection | PubMed |
description | 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. |
format | Online Article Text |
id | pubmed-7281875 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2020 |
record_format | MEDLINE/PubMed |
spelling | pubmed-72818752020-06-09 Typechecking Java Protocols with [St]Mungo Voinea, A. Laura Dardha, Ornela Gay, Simon J. Formal Techniques for Distributed Objects, Components, and Systems Article 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. 2020-05-13 /pmc/articles/PMC7281875/ http://dx.doi.org/10.1007/978-3-030-50086-3_12 Text en © IFIP International Federation for Information Processing 2020 This article is made available via the PMC Open Access Subset for unrestricted research re-use and secondary analysis in any form or by any means with acknowledgement of the original source. These permissions are granted for the duration of the World Health Organization (WHO) declaration of COVID-19 as a global pandemic. |
spellingShingle | Article Voinea, A. Laura Dardha, Ornela Gay, Simon J. Typechecking Java Protocols with [St]Mungo |
title | Typechecking Java Protocols with [St]Mungo |
title_full | Typechecking Java Protocols with [St]Mungo |
title_fullStr | Typechecking Java Protocols with [St]Mungo |
title_full_unstemmed | Typechecking Java Protocols with [St]Mungo |
title_short | Typechecking Java Protocols with [St]Mungo |
title_sort | typechecking java protocols with [st]mungo |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7281875/ http://dx.doi.org/10.1007/978-3-030-50086-3_12 |
work_keys_str_mv | AT voineaalaura typecheckingjavaprotocolswithstmungo AT dardhaornela typecheckingjavaprotocolswithstmungo AT gaysimonj typecheckingjavaprotocolswithstmungo |