Skip to main content
Top

2004 | OriginalPaper | Chapter

Typestates for Objects

Authors : Robert DeLine, Manuel Fähndrich

Published in: ECOOP 2004 – Object-Oriented Programming

Publisher: Springer Berlin Heidelberg

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Today’s mainstream object-oriented compilers and tools do not support declaring and statically checking simple pre- and postconditions on methods and invariants on object representations. The main technical problem preventing static verification is reasoning about the sharing relationships among objects as well as where object invariants should hold. We have developed a programming model of typestates for objects with a sound modular checking algorithm. The programming model handles typical aspects of object-oriented programs such as down-casting, virtual dispatch, direct calls, and subclassing. The model also permits subclasses to extend the interpretation of typestates and to introduce additional typestates. We handle aliasing by adapting our previous work on practical linear types developed in the context of the Vault system. We have implemented these ideas in a tool called Fugue for specifying and checking typestates on Microsoft .NET-based programs.

Metadata
Title
Typestates for Objects
Authors
Robert DeLine
Manuel Fähndrich
Copyright Year
2004
Publisher
Springer Berlin Heidelberg
DOI
https://doi.org/10.1007/978-3-540-24851-4_21

Premium Partner