ABSTRACT
X10 is a modern object-oriented programming language designed for high performance, high productivity programming of parallel and multi-core computer systems. Compared to the lower-level thread-based concurrency model in the JavaTM language, X10 has higher-level concurrency constructs such as async, atomic and finish built into the language to simplify creation, analysis and optimization of parallel programs. In this paper, we introduce a new algorithm for May-Happen-in-Parallel (MHP) analysis of X10 programs. The analysis algorithm is based on simple path traversals in the Program Structure Tree, and does not rely on pointer alias analysis of thread objects as in MHP analysis for Java programs. We introduce a more precise definition of the MHP relation than in past work by adding condition vectors that identify execution instances for which the MHP relation holds, instead of just returning a single true/false value for all pairs of executing instances. Further, MHP analysis is refined in our approach by using the observation that two statement instances which occur in atomic sections that execute at the same X10 place must have MHP = false. We expect that our MHP analysis algorithm will be applicable to any language that adopts the core concepts of places, async, finish, and atomic sections from the X10 programming model. We also believe that this approach offers the best of two worlds to programmers and parallel programming tools ---higher-level abstractions of concurrency coupled with simple and efficient analysis algorithms.
- B. Alpern, M. N. Wegman, and F. K. Zadeck. Detecting equality of variables in programs. In POPL '88: Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 1--11, New York, NY, USA, 1988. ACM Press. Google ScholarDigital Library
- Rajkishore Barik. Efficient computation of may-happen-in-parallel information for concurrent java programs. In 18th International Workshop on Languages and Compilers for Parallel Computing, October 2005. Google ScholarDigital Library
- David Callahan and Jaspal Sublok. Static analysis of low-level synchronization. In PADD '88: Proceedings of the 1988 ACM SIGPLAN and SIGOPS workshop on Parallel and distributed debugging, pages 100--111, New York, NY, USA, 1988. ACM Press. Google ScholarDigital Library
- Philippe Charles, Christopher Donawa, Kemal Ebcioglu, Christian Grothoff, Allan Kielstra, Christoph von Praun, Vijay Saraswat, and Vivek Sarkar. X10: An object-oriented approach to non-uniform cluster computing. In OOPSLA 2005 Onward! Track, 2005. Google ScholarDigital Library
- Jong-Deok Choi, Keunwoo Lee, Alexey Loginov, Robert O'Callahan, Vivek Sarkar, and Manu Sridharan. Efficient and precise datarace detection for multithreaded object-oriented programs. In PLDI '02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, pages 258--269, New York, NY, USA, 2002. ACM Press. Google ScholarDigital Library
- Evelyn Duesterwald and Mary Lou Soffa. Concurrency analysis in the presence of procedures using a data-flow framework. In TAV4: Proceedings of the symposium on Testing, analysis, and verification, pages 36--48, New York, NY, USA, 1991. ACM Press. Google ScholarDigital Library
- J. Ferrante, K. Ottenstein, and J. Warren. The Program Dependence Graph and its Use in Optimization. ACM Transactions on Programming Languages and Systems, 9(3):319--349, July 1987. Google ScholarDigital Library
- Dov Harel. A Linear Time Algorithm for Finding Dominators in Flow Graphs and Related Problems. Symposium on Theory of Computing, May 1985. Google ScholarDigital Library
- Ferrante J, Grunwald D, and Srinivasan H. Compile-time analysis and optimization of explicitly parallel programs. In Journal of Parallel algorithms and applications, 1997.Google Scholar
- Jens Krinke. Static slicing of threaded programs. In Workshop on Program Analysis For Software Tools and Engineering, pages 35--42, 1998. Google ScholarDigital Library
- Jaejin Lee. Compilation Techniques for Explicitly Parallel Programs. PhD thesis, University of Illinois at Urbana-Champaign, 1999. Google ScholarDigital Library
- T. Lengauer and Robert Tarjan. A Fast Algorithm for Finding Dominators in a Flowgraph. TOPLAS, July 1979. Google ScholarDigital Library
- Lin Li and Clark Verbrugge. A practical mhp information analysis for concurrent java programs. In The 17th International Workshop on Languages and Compilers for Parallel Computing (LCPC'04), 2004. Google ScholarDigital Library
- Stephen P. Masticola and Barbara G. Ryder. A model of ada programs for static deadlock detection in polynomial times. In PADD '91: Proceedings of the 1991 ACM/ONR workshop on Parallel and distributed debugging, pages 97--107, New York, NY, USA, 1991. ACM Press. Google ScholarDigital Library
- Stephen P. Masticola and Barbara G. Ryder. Non-concurrency analysis. In PPOPP '93: Proceedings of the fourth ACM SIGPLAN symposium on Principles and practice of parallel programming, pages 129--138, New York, NY, USA, 1993. ACM Press. Google ScholarDigital Library
- G. Naumovich, G. S. Avruin, and L. A. Clarke. Data flow analysis for checking properties of concurrent java programs. Technical Report UM-CS-1998-022, 1998. Google ScholarDigital Library
- Gleb Naumovich and George S. Avrunin. A conservative data flow algorithm for detecting all pairs of statements that may happen in parallel. In SIGSOFT '98/FSE-6: Proceedings of the 6th ACM SIGSOFT international symposium on Foundations of software engineering, pages 24--34, New York, NY, USA, 1998. ACM Press. Google ScholarDigital Library
- Gleb Naumovich, George S. Avrunin, and Lori A. Clarke. An efficient algorithm for computing MHP information for concurrent Java programs. In Proceedings of the joint 7th European Software Engineering Conference and 7th ACM SIGSOFT Symposium on the Foundations of Software Engineering, pages 338--354, September 1999. Google ScholarDigital Library
- X10 release on SourceForge. http://x10.sf.net.Google Scholar
- Vivek Sarkar. A Concurrent Execution Semantics for Parallel Program Graphs and Program Dependence Graphs (Extended Abstract). Springer-Verlag Lecture Notes in Computer Science, 757:16--30, 1992. Proceedings of the Fifth Workshop on Languages and Compilers for Parallel Computing, Yale University, August 1992. Google ScholarDigital Library
- Vivek Sarkar. Analysis and Optimization of Explicitly Parallel Programs using the Parallel Program Graph Representation. In Languages and compilers for parallel computing. Proceedings of the 10th international workshop. Held Aug., 1997 in Minneapolis, MN., Lecture Notes in Computer Science. Springer-Verlag, New York, 1998. Google ScholarDigital Library
- Vivek Sarkar and Barbara Simons. Parallel Program Graphs and their Classification. Springer-Verlag Lecture Notes in Computer Science, 768:633--655, 1993. Proceedings of the Sixth Workshop on Languages and Compilers for Parallel Computing, Portland, Oregon, August 1993. Google ScholarDigital Library
- Richard N. Taylor. Complexity of analyzing the synchronization structure of concurrent programs. Acta Inf., 19:57--84, 1983.Google ScholarDigital Library
- Michael J. Wolfe. Optimizing Supercompilers for Supercomputers. Pitman, London and The MIT Press, Cambridge, Massachusetts, 1989. In the series, Research Monographs in Parallel and Distributed Computing. Google ScholarDigital Library
Index Terms
- May-happen-in-parallel analysis of X10 programs
Recommendations
May-happen-in-parallel analysis with static vector clocks
CGO 2018: Proceedings of the 2018 International Symposium on Code Generation and OptimizationMay-Happen-in-Parallel (MHP) analysis computes whether two statements in a multi-threaded program may execute concurrently or not. It works as a basis for many analyses and optimization techniques of concurrent programs. This paper proposes a novel ...
May-Happen-in-Parallel Analysis for Actor-Based Concurrency
This article presents a may-happen-in-parallel (MHP) analysis for languages with actor-based concurrency. In this concurrency model, actors are the concurrency units such that, when a method is invoked on an actor a2 from a task executing on actor a1, ...
Region-Based May-Happen-in-Parallel Analysis for C Programs
ICPP '15: Proceedings of the 2015 44th International Conference on Parallel Processing (ICPP)The C programming language continues to play an essential role in the development of system software. May-Happen-in-Parallel (MHP) analysis is the basis of many other analyses and optimisations for concurrent programs. Existing MHP analyses that work ...
Comments