A Technique for Parallel Reachability Analysis of Java Programs Raghuraman R. Sridhar Iyer G. Sajith
CIT 2000 Outline of Talk Errors in Concurrent Programs Reachability Analysis A Technique for Parallel RA Experimental Results Conclusions
CIT 2000 Errors in Concurrent Programs Non-determinism and synchronization involved Data access errors (violation of mutex) Synchronization errors (deadlocks- waiting for shared variables, mesgs) Temporal errors (calls to terminated pgm components)
CIT 2000 Reachability Analysis Systematic enumeration of all possible global states of program execution Technique: Program listing-> Generate abstract representation -> Generate reachability graph-> Analyse for errors-> Error listing
CIT 2000 RA (contd.)
CIT 2000 Inefficiencies in RA - Exponential complexity (N T ) - Limited capacity to deal with dynamic references - Might report spurious errors + State Explosion tackled by Apportioning Technique [Iyer 98] - But time complexity remains
CIT 2000 The Parallel RA Technique Mitigates the time complexity Generate state-transition graphs for each thread Generate cross-product of all state- transition graphs Discard invalid tuples from the cross- product
CIT 2000 System Model All threads created at start of program execution (each thread at state) All threads have the same priority Program terminates when all threads reach their state Synchronization between threads is by using locks
CIT 2000 Algorithm
CIT 2000 An Example Thread 1Thread 2 Consider an example application with 2 threads of execution.
CIT 2000 Example (contd.) Construct state-transition graph for each thread T i (all other threads at their entry points) in parallel
CIT 2000 Example (contd.) Construct R G as cross-product of all R i s. - R G might contain tuples corresponding to multiple threads holding the same lock (R G an arbitrary cross-product): eg. Tuple 2
CIT 2000 Example (contd.) Detect invalid tuples and discard them Remaining tuples correspond to traditional R G
CIT 2000 Experimental Results
CIT 2000 Experimental Results (Contd.)
CIT 2000 Conclusions The technique is safe for all programs in the chosen model Significant reduction in time from to P Where T=no. of threads, N=no of states in each thread, K= no. of locks and P=no. of processors.