A Java typestate checker supporting inheritance - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Journal Articles Science of Computer Programming Year : 2022

A Java typestate checker supporting inheritance

Abstract

Detecting programming errors in software is increasingly important, and building tools that help developers with this task is a crucial area of investigation on which the industry depends. Leveraging on the observation that in Object-Oriented Programming (OOP) it is natural to define stateful objects where the safe use of methods depends on their internal state, we present Java Typestate Checker (JATYC), a tool that verifies Java source code with respect to typestates. A typestate defines the object's states, the methods that can be called in each state, and the states resulting from the calls. The tool statically verifies that when a Java program runs: sequences of method calls obey to object's protocols; objects' protocols are completed; null-pointer exceptions are not raised; subclasses' instances respect the protocol of their superclasses. To the best of our knowledge, this is the first OOP tool that simultaneously tackles all these aspects.

Dates and versions

hal-03930280 , version 1 (09-01-2023)

Identifiers

Cite

Lorenzo Bacchiani, Mario Bravetti, Marco Giunti, João Mota, António Ravara. A Java typestate checker supporting inheritance. Science of Computer Programming, 2022, 221, pp.102844. ⟨10.1016/j.scico.2022.102844⟩. ⟨hal-03930280⟩
11 View
0 Download

Altmetric

Share

Gmail Facebook Twitter LinkedIn More