| | |
Summary: Modular Typestate Checking of Aliased Objects
Kevin Bierhoff Jonathan Aldrich
Institute for Software Research, School of Computer Science
Carnegie Mellon University, 5000 Forbes Avenue, Pittsburgh, PA 15213, USA
{kevin.bierho,jonathan.aldrich} @ cs.cmu.edu
Abstract
Objects often define usage protocols that clients must follow
in order for these objects to work properly. Aliasing makes
it notoriously difficult to check whether clients and imple-
mentations are compliant with such protocols. Accordingly,
existing approaches either operate globally or severely re-
strict aliasing.
We have developed a sound modular protocol checking
approach, based on typestates, that allows a great deal of
flexibility in aliasing while guaranteeing the absence of pro-
tocol violations at runtime. The main technical contribution
is a novel abstraction, access permissions, that combines
typestate and object aliasing information. In our methodol-
ogy, developers express their protocol design intent through
annotations based on access permissions. Our checking ap-
|