%0 Journal Article %J Science of Computer Programming %D 2005 %T Dynamic inference of polymorphic lock types %A Rose,James %A Swamy,Nikhil %A Hicks, Michael W. %K Data races %K Dynamic analysis %K java %K Multithreading %K Type inference %X We present FindLocks, an approach for automatically proving the absence of data races in multi-threaded Java programs, using a combination of dynamic and static analysis. The program in question is instrumented so that when executed it will gather information about locking relationships. This information is then used to automatically generate annotations needed to type check the program using the Race-Free Java type system. Programs that type check are sure to be free from races. We call this technique dynamic annotation inference. We describe the design and implementation of our approach, and our experience applying the tool to a variety of Java programs. We have found that when using a reasonably comprehensive test suite, which is easy for small programs but harder for larger ones, the approach generates useful annotations. %B Science of Computer Programming %V 58 %P 366 - 383 %8 2005/12// %@ 0167-6423 %G eng %U http://www.sciencedirect.com/science/article/pii/S0167642305000705 %N 3 %R 10.1016/j.scico.2005.03.003