Jakobsen, M., Ravier, A. and Dardha, O. (2021) Papaya: Global Typestate Analysis of Aliased Objects. In: 23rd International Symposium on Principles and Practice of Declarative Programming (PPDP 2021), Tallinn, Estonia, 06-08 Sep 2021, p. 19. ISBN 9781450386890 (doi: 10.1145/3479394.3479414)
Text
248967.pdf - Accepted Version 675kB |
Abstract
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.
Item Type: | Conference Proceedings |
---|---|
Status: | Published |
Refereed: | Yes |
Glasgow Author(s) Enlighten ID: | Dardha, Dr Ornela and Jakobsen, Mathias Steen and Ravier, Miss Alice |
Authors: | Jakobsen, M., Ravier, A., and Dardha, O. |
College/School: | College of Science and Engineering > School of Computing Science |
ISBN: | 9781450386890 |
Copyright Holders: | Copyright © 2021 Association for Computing Machinery |
Publisher Policy: | Reproduced in accordance with the copyright policy of the publisher |
Related URLs: |
University Staff: Request a correction | Enlighten Editors: Update this record