Efficient May Happen in Parallel Analysis for Async-Finish Parallelism

For concurrent and parallel languages, the may-happen-in-parallel (MHP) decision problem asks, given two actions in the program, if there is an execution in which they can execute in parallel. Closely related, the MHP computation problem asks, given a program, which pairs of statements may happen in parallel. MHP analysis is the basis for many program analysis problems, such as data race detection and determinism checking, and researchers have devised MHP analyses for a variety of programming models. We present algorithms for static MHP analysis of a storeless abstraction of X10-like languages that have async-finish parallelism and procedures. For a program of size n, our first algorithm solves the MHP decision problem in O(n) time, via a reduction to constrained dynamic pushdown networks (CDPNs). Our second algorithm solves the MHP computation problem in O(n · max (n, k)) time, where k is a statically determined upper bound on the number of pairs that may happen in parallel. The second algorithm first runs a type-based analysis that produces a set of candidate pairs, and then it runs the decision procedure on each of those pairs. For programs without recursion, the type-based analysis is exact and gives an output-sensitive algorithm for the MHP computation problem, while for recursive programs, the type-based analysis may produce spurious pairs that the decision procedure will then remove. Our experiments on a large suite of X10 benchmarks suggest that our approach scales well. Our experiments also show that while k is O(n2) in the worst case, k is often O(n) in practice.

[1]  Jens Palsberg,et al.  Object-oriented type systems , 1994, Wiley professional computing.

[2]  Jong-Deok Choi,et al.  Efficient and precise datarace detection for multithreaded object-oriented programs , 2002, PLDI '02.

[3]  Helmut Seidl,et al.  Join-Lock-Sensitive Forward Reachability Analysis for Concurrent Programs with Dynamic Process Creation , 2011, VMCAI.

[4]  George S. Avrunin,et al.  A conservative data flow algorithm for detecting all pairs of statements that may happen in parallel , 1998, SIGSOFT '98/FSE-6.

[5]  Bernhard Steffen,et al.  Constraint-Based Inter-Procedural Analysis of Parallel Programs , 2000, Nord. J. Comput..

[6]  George S. Avrunin,et al.  An efficient algorithm for computing MHP information for concurrent Java programs , 1999, ESEC/FSE-7.

[7]  Rajkishore Barik,et al.  Efficient Computation of May-Happen-in-Parallel Information for Concurrent Java Programs , 2005, LCPC.

[8]  Richard N. Taylor,et al.  Complexity of analyzing the synchronization structure of concurrent programs , 1983, Acta Informatica.

[9]  Tayssir Touili,et al.  Regular Symbolic Analysis of Dynamic Networks of Pushdown Systems , 2005, CONCUR.

[10]  Alexander Aiken,et al.  Conditional must not aliasing for static race detection , 2007, POPL '07.

[11]  Koushik Sen,et al.  Race directed random testing of concurrent programs , 2008, PLDI '08.

[12]  Mary Lou Soffa,et al.  Concurrency analysis in the presence of procedures using a data-flow framework , 1991, TAV4.

[13]  Vivek Sarkar,et al.  X10: an object-oriented approach to non-uniform cluster computing , 2005, OOPSLA '05.

[14]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[15]  Rudolf Eigenmann,et al.  Languages and Compilers for High Performance Computing, 17th International Workshop, LCPC 2004, West Lafayette, IN, USA, September 22-24, 2004, Revised Selected Papers , 2005, LCPC.

[16]  Vincent Danos,et al.  Transactions in RCCS , 2005, CONCUR.

[17]  Vineet Kahlon Boundedness vs. Unboundedness of Lock Chains: Characterizing Decidability of Pairwise CFL-Reachability for Threads Communicating via Locks , 2009, 2009 24th Annual IEEE Symposium on Logic In Computer Science.

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

[19]  Lin Li,et al.  A Practical MHP Information Analysis for Concurrent Java Programs , 2004, LCPC.

[20]  Markus Müller-Olm,et al.  Precise Fixpoint-Based Analysis of Programs with Thread-Creation and Procedures , 2007, CONCUR.

[21]  Kousha Etessami,et al.  Analysis of Recursive Game Graphs Using Data Flow Equations , 2004, VMCAI.

[22]  Oscar Nierstrasz,et al.  Software Engineering - ESEC/FSE '99 , 1999 .

[23]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[24]  G. Ramalingam,et al.  Context-sensitive synchronization-sensitive analysis is undecidable , 2000, TOPL.

[25]  Barbara G. Ryder,et al.  Non-concurrency analysis , 1993, PPOPP '93.

[26]  Jens Palsberg,et al.  Featherweight X10: a core calculus for async-finish parallelism , 2010, PPoPP '10.

[27]  Kim G. Larsen,et al.  On Modal Refinement and Consistency , 2007, CONCUR.