February 20, 2006 CS516 Project 1 Clarifications from Prof Ryder and Weilei Zhang (this note supercedes earlier notes) The starting points for the thread-specific unsafe points-to analysis are those run() methods for threads in the application program. You do NOT trace threads in the Java libraries. There are several other information and assumptions based on this clarification: 1) What is considered a thread? the classes inheriting java.lang.Thread or implementating java.lang.Runnable. Actually in Java, a class is not necessarily a thread if it only implements java.lang.Runnable, but you can make this simple assumption for the project. 2) You can assume that each thread run() call can be analyzed separately, deriving thread-specific points-to sets and call graphs for threads of that type. Just so you know, in mtrt benchmark, there is one thread run() in the application, but 62 in the library. 3) Each thread run() method needs to be analyzed only once as the starting point of a thread. It is the run() method, not the callsite (e.g., t.start() which calls run()) that is the root of the thread call graph. 4) What if a thread (A) calls another thread(B)? To simplify things, in analyzing thread A, B.run() can be regarded in the same way as other callees. That is, you will consider those methods called as part of thread B to have been called from thread A, and so as belonging to the execution of thread A. However, you also will need to analyze A.run() and B.run() separately to get an estimate for thread B independent from thread A. 5) The information from a global points-to analysis is needed because: i) You need the global call graph to decide which thread run() methods are to be analyzed (i.e., are reachable in the program from main() during execution). ii) You need the global points-to results to process statements which may refer to the thread receiver object(s) or its (their) fields. (Note: if there are multiple receiver objects of different types, treat them all as one abstract thread object in terms of the points-to's gathered.) (Global here means whole-program analysis.) In our project, the global points-to analysis is the existing 0-CFA analysis with a call graph constructed on-the-fly.