An annotation assistant for interactive debugging of programs with common synchronization idioms

This paper explores an approach to improving the practical usability of static verification tools for debugging synchronization idioms. Synchronization idioms such as mutual exclusion and readers/writer locks are widely-used to ensure atomicity of critical regions. We present an annotation assistant that automatically generates program annotations. These annotations express noninterference between program statements, ensured by the synchronization idioms, and are used to identify atomic code regions. This allows the programmer to debug the use of the idioms in the program. We start by formalizing several well-known idioms by providing an abstract semantics for each idiom. For programs that use these idioms, we require the programmer to provide a few predicates linking the idiom with its realization in terms of program variables. From these, we automatically generate a proof script that is mechanically checked. These scripts include steps such as automatically generating assertions and annotating program actions with them, introducing auxiliary variables and invariants. We have successfully shown the applicability of this approach to several concurrent programs from the literature.

[1]  Cormac Flanagan,et al.  Transactions for Software Model Checking , 2003, SoftMC@CAV.

[2]  Marc Najork,et al.  Boxwood: Abstractions as the Foundation for Storage Infrastructure , 2004, OSDI.

[3]  Maged M. Michael,et al.  Simple, fast, and practical non-blocking and blocking concurrent queue algorithms , 1996, PODC '96.

[4]  Sanjit A. Seshia,et al.  Modular verification of multithreaded programs , 2005, Theor. Comput. Sci..

[5]  Richard J. Lipton,et al.  Reduction: a method of proving properties of parallel programs , 1975, CACM.

[6]  Greg Nelson,et al.  Extended static checking for Java , 2002, PLDI '02.

[7]  Bor-Yuh Evan Chang,et al.  Boogie: A Modular Reusable Verifier for Object-Oriented Programs , 2005, FMCO.

[8]  Michael Stumm,et al.  A Fair Fast Scalable Rea,der-Writer Lock , 1993, 1993 International Conference on Parallel Processing - ICPP'93.

[9]  Eran Yahav,et al.  Automatically Verifying Concurrent Queue Algorithms , 2003, SoftMC@CAV.

[10]  K. Rustan M. Leino,et al.  Houdini, an Annotation Assistant for ESC/Java , 2001, FME.

[11]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[12]  Thomas R. Gross,et al.  Object race detection , 2001, OOPSLA '01.

[13]  Douglas C. Schmidt,et al.  C++ Network Programming: Resolving Complexity Using Ace and Patterns (C++ in-Depth Series) , 2001 .

[14]  Serdar Tasiran,et al.  A calculus of atomic actions , 2009, POPL '09.

[15]  Cormac Flanagan,et al.  Types for atomicity , 2003, TLDI '03.