| | |
Summary: Verifying Correct Usage of Atomic Blocks and Typestate
Nels E. Beckman Kevin Bierhoff Jonathan Aldrich
School of Computer Science
Carnegie Mellon University
{nbeckman,kbierhof,aldrich}@cs.cmu.edu
Abstract
The atomic block, a synchronization primitive provided to
programmers in transactional memory systems, has the po-
tential to greatly ease the development of concurrent soft-
ware. However, atomic blocks can still be used incorrectly,
and race conditions can still occur at the level of application
logic. In this paper, we present a intraprocedural static analy-
sis, formalized as a type system and proven sound, that helps
programmers use atomic blocks correctly. Using access per-
missions, which describe how objects are aliased and mod-
ified, our system statically prevents race conditions and en-
forces typestate properties in concurrent programs. We have
implemented a prototype static analysis for the Java lan-
guage based on our system and have used it to verify several
realistic examples.
|