Patent ID: 6343371
Filing Date: 2002-01-29
Classification: G06F

Abstract:
A method for statically detecting potential race conditions in a multi-threaded computer program, the computer program being written in an object oriented programming language and having at least one class, each class having a structure including at least one method or at least one data field defined therein, each class being a template for a run-time object that implements the class structure, the method comprising:generating a synchronization graph representing method declarations, object data field declarations and synchronization statements in the computer program; each method declaration, object data field declaration and synchronization statement in the computer program that is represented by the synchronization graph being represented by a respective node in the synchronization graph; wherein each respective node and its associated method declaration, object data field declaration or synchronization statement is associated with a single respective class of the at least one class; the synchronization graph generating step including: storing for each node in the synchronization graph synchronization information indicating any locks declared in the method declaration, object data field declaration or synchronization statement associated with the node; and generating edges between the nodes of the graph representing execution paths of the program; each edge originating at a respective first node and pointing to a respective second node; traversing the synchronization graph, and generating for each node a synchronization value representing a union of first and second values, the first value corresponding to the synchronization information stored for the node, and the second value corresponding to an intersection of all locks applicable to each other node in the graph for which there is an edge pointing to the node from the other node; and reporting at least a subset of the nodes representing object data field declarations whose synchronization value is a predefined null value.