Typestates to automata and back: A tool

Research output: Contribution to journalConference articlepeer-review


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.

Original languageEnglish
Pages (from-to)25-42
Number of pages18
JournalElectronic Proceedings in Theoretical Computer Science, EPTCS
Publication statusPublished - 17 Sep 2020
Event13th Interaction and Concurrency Experience, ICE 2020 - Virtual, Online
Duration: 19 Jun 202020 Jun 2020


Dive into the research topics of 'Typestates to automata and back: A tool'. Together they form a unique fingerprint.

Cite this