Papaya: Global Typestate Analysis of Aliased Objects Extended Version

07/27/2021
by   Mathias Jakobsen, et al.
0

Typestates are state machines used in object-oriented programming to specify and verify correct order of method calls on an object. To avoid inconsistent object states, typestates enforce linear typing, which eliminates - or at best limits - aliasing. However, aliasing is an important feature in programming, and the state-of-the-art on typestates is too restrictive if we want typestates to be adopted in real-world software systems. In this paper, we present a type system for an object-oriented language with typestate annotations, which allows for unrestricted aliasing, and as opposed to previous approaches it does not require linearity constraints. The typestate analysis is global and tracks objects throughout the entire program graph, which ensures that well-typed programs conform and complete the declared protocols. We implement our framework in the Scala programming language and illustrate our approach using a running example that shows the interplay between typestates and aliases.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/05/2022

Detecting Unjustified Assumptions in Subclasses via Elegant Objects Representation

Elegant Objects (EO) is a programming language based on ideas of pure ob...
research
04/13/2019

Got: Git, but for Objects

We look at one important category of distributed applications characteri...
research
03/28/2018

Deadlock-Free Typestate-Oriented Programming

Context. TypeState-Oriented Programming (TSOP) is a paradigm intended to...
research
12/12/2017

A Practical Approach for Detecting Logical Error in Object Oriented Environment

A programming language is a formally constructed language designed to co...
research
08/14/2011

Conscious Machines and Consciousness Oriented Programming

In this paper, we investigate the following question: how could you writ...
research
09/05/2022

Detecting unanticipated mutual recursion using Elegant Objects representation of object-oriented programs

Elegant Objects (EO) is a variation of the object-oriented programming p...
research
02/19/2018

A Type-Based Complexity Analysis of Object Oriented Programs

A type system is introduced for a generic Object Oriented programming la...

Please sign up or login with your details

Forgot password? Click here to reset