# Concurrent Typestate-Oriented Programming in Java

**Authors:** Rosita Gerbo (Universit\`a di Torino), Luca Padovani (Universit\`a di, Torino)

arXiv: 1904.01286 · 2019-04-03

## TL;DR

This paper introduces a generative approach for concurrent typestate-oriented programming in Java, enabling state-sensitive object interfaces with automated synchronization and protocol verification.

## Contribution

It presents a novel method combining behavioral types, code generation, and runtime protocol conformance checking for concurrent programming.

## Key findings

- Automates synchronization code generation for state-sensitive objects.
- Integrates protocol verification with synchronization logic.
- Detects protocol violations at runtime.

## Abstract

We describe a generative approach that enables concurrent typestate-oriented programming in Java and other mainstream languages. The approach allows programmers to implement objects exposing a state-sensitive interface using a high-level synchronization abstraction that synchronizes methods with the states of the receiver object in which those methods have an effect. An external tool takes care of generating all the boilerplate code that implements the synchronization logic. Behavioral types are used to specify object protocols. The tool integrates protocol conformance verification with the synchronization logic so that protocol violations are promptly detected at runtime.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1904.01286/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/1904.01286/full.md

## References

29 references — full list in the complete paper: https://tomesphere.com/paper/1904.01286/full.md

---
Source: https://tomesphere.com/paper/1904.01286