May-Happen-in-Parallel Analysis for Asynchronous Programs with Inter-Procedural Synchronization

A may-happen-in-parallel (MHP) analysis computes pairs of program points that may execute in parallel across different distributed components. This information has been proven to be essential to infer both safety properties (e.g., deadlock freedom) and liveness properties (e.g., termination and resource boundedness) of asynchronous programs. Existing MHP analyses take advantage of the synchronization points to learn that one task has finished and thus will not happen in parallel with other tasks that are still active. Our starting point is an existing MHP analysis developed for intra-procedural synchronization, i.e., it only allows synchronizing with tasks that have been spawned inside the current task. This paper leverages such MHP analysis to handle inter-procedural synchronization, i.e., a task spawned by one task can be awaited within a different task. This is challenging because task synchronization goes beyond the boundaries of methods, and thus the inference of MHP relations requires novel extensions to capture inter-procedural dependencies. The analysis has been implemented and it can be tried online.

[1]  Elvira Albert,et al.  SACO: Static Analyzer for Concurrent Objects , 2014, TACAS.

[2]  Ahmed Bouajjani,et al.  Analysis of recursively parallel programs , 2012, POPL '12.

[3]  Constantin Enea,et al.  Tractable Refinement Checking for Concurrent Objects , 2015, POPL.

[4]  Arnd Poetzsch-Heffter,et al.  JCoBox: Generalizing Active Objects to Concurrent Components , 2010, ECOOP.

[5]  Reiner Hähnle,et al.  ABS: A Core Language for Abstract Behavioral Specification , 2010, FMCO.

[6]  Matthias Felleisen,et al.  The semantics of future and its use in program optimization , 1995, POPL '95.

[7]  Elvira Albert,et al.  Termination and Cost Analysis of Loops with Concurrent Interleavings , 2013, ATVA.

[8]  Jens Palsberg,et al.  Efficient May Happen in Parallel Analysis for Async-Finish Parallelism , 2012, SAS.

[9]  Mario Bravetti,et al.  A Petri Net Based Analysis of Deadlocks for Active Objects and Futures , 2012, FACS.

[10]  Elvira Albert,et al.  Analysis of May-Happen-in-Parallel in Concurrent Objects , 2012, FMOODS/FORTE.

[11]  Alan Mycroft,et al.  Kilim: Isolation-Typed Actors for Java , 2008, ECOOP.

[12]  Frank S. de Boer,et al.  A Complete Guide to the Future , 2007, ESOP.

[13]  Vivek Sarkar,et al.  May-happen-in-parallel analysis of X10 programs , 2007, PPoPP.

[14]  Elvira Albert,et al.  May-Happen-in-Parallel Based Deadlock Analysis for Concurrent Objects , 2013, FMOODS/FORTE.

[15]  Frank D. Valencia,et al.  Formal Methods for Components and Objects , 2002, Lecture Notes in Computer Science.