Typestates to Automata and back: a tool

André Trindade
(NOVA School of Science and Technology)
João Mota
(NOVA School of Science and Technology)
António Ravara
(NOVA School of Science and Technology)

Development of software is an iterative process. Graphical tools to represent the relevant entities and processes can be helpful. In particular, automata capture well the intended execution flow of applications, and are thus behind many formal approaches, namely behavioral types.

Typestate-oriented programming allow us to model and validate the intended protocol of applications, not only providing a top-down approach to the development of software, but also coping well with compositional development. Moreover, it provides important static guarantees like protocol fidelity and some forms of progress.

Mungo is a front-end tool for Java that associates a typestate describing the valid orders of method calls to each class, and statically checks that the code of all classes follows the prescribed order of method calls.

To assist programming with Mungo, as typestates are textual descriptions that are terms of an elaborate grammar, we developed a tool that bidirectionally converts typestates into an adequate form of automata, providing on one direction a visualization of the underlying protocol specified by the typestate, and on the reverse direction a way to get a syntactically correct typestate from the more intuitive automata representation.

In Julien Lange, Anastasia Mavridou, Larisa Safina and Alceste Scalas: Proceedings 13th Interaction and Concurrency Experience (ICE 2020), Online, 19 June 2020, Electronic Proceedings in Theoretical Computer Science 324, pp. 25–42.
Published: 17th September 2020.

ArXived at: http://dx.doi.org/10.4204/EPTCS.324.4 bibtex PDF
References in reconstructed bibtex, XML and HTML format (approximated).
Comments and questions to: eptcs@eptcs.org
For website issues: webmaster@eptcs.org