scispace - formally typeset
Search or ask a question
Proceedings ArticleDOI

On the fly MHP analysis

19 Feb 2020-pp 173-186
TL;DR: This manuscript proposes a novel scheme to perform incremental MHP analysis (on the fly) of programs written in task parallel languages like X10 to keep the MHP information up to date, in an IDE environment and introduces two new algorithms that deal with addition and removal of parallel constructs like finish, async, atomic, and sequential constructs, on the fly.
Abstract: May-Happen-in-Parallel (MHP) analysis forms the basis for many problems of program analysis and program understanding. MHP analysis can also be used by IDEs (integrated-development-environments) to help programmers to refactor parallel-programs, identify racy programs, understand which parts of the program run in parallel, and so on. Since the code keeps changing in the IDE, re-computing the MHP information after every change can be an expensive affair. In this manuscript, we propose a novel scheme to perform incremental MHP analysis (on the fly) of programs written in task parallel languages like X10 to keep the MHP information up to date, in an IDE environment. The key insight of our proposed approach to maintain the MHP information up to date is that we need not rebuild (from scratch) every data structure related to MHP information, after each modification (addition or deletion of statements) in the source code. The idea is to reuse the old MHP information as much as possible and incrementally recompute the MHP information (of a small set of statements) which depends on the statement added/removed. We introduce two new algorithms that deal with addition and removal of parallel constructs like finish, async, atomic, and sequential constructs like loop, if, if-else and other sequential statements, on the fly. Our evaluation shows that our algorithms run much faster than the repeated invocations of the fastest known MHP analysis for X10 programs [Sankar et al. 2016].
Citations
More filters
01 Jan 2009
TL;DR: Eclipse、IntelliJ IDEA、NetBeans:对于国内很多开发人员来说 ,Eclipse众所周知,Net beans次之LIntelli J IDEA确很少被人了解;IDEA
Abstract: 在目前的Java IDE市场已经形成三足鼎力:Eclipse、IntelliJ IDEA和NetBeans,对于国内很多开发人员来说,Eclipse众所周知,NetBeans次之,IntelliJ IDEA确很少被人了解。IDEA不被人了解的主要原因是其开发公司不大,而且中文文档比较少,宣传也很少。

31 citations

Posted Content
TL;DR: In this article, the authors present a data flow analysis based, fast, static data race checker in the LLVM compiler framework to detect race conditions in OpenMP programs and improve turnaround time and/or developer productivity.
Abstract: Data races, a major source of bugs in concurrent programs, can result in loss of manpower and time as well as data loss due to system failures. OpenMP, the de facto shared memory parallelism framework used in the HPC community, also suffers from data races. To detect race conditions in OpenMP programs and improve turnaround time and/or developer productivity, we present a data flow analysis based, fast, static data race checker in the LLVM compiler framework. Our tool can detect races in the presence or absence of explicit barriers, with implicit or explicit synchronization. In addition, our tool effectively works for the OpenMP target offloading constructs and also supports the frequently used OpenMP constructs. We formalize and provide a data flow analysis framework to perform Phase Interval Analysis (PIA) of OpenMP programs. Phase intervals are then used to compute the MHP (and its complement NHP) sets for the programs, which, in turn, are used to detect data races statically. We evaluate our work using multiple OpenMP race detection benchmarks and real world applications. Our experiments show that the checker is comparable to the state-of-the-art in various performance metrics with around 90% accuracy, almost perfect recall, and significantly lower runtime and memory footprint.
References
More filters
Book ChapterDOI
Rajkishore Barik1
20 Oct 2005
Abstract: Modeling of runtime threads in static analysis of concurrent programs plays an important role in both reducing the complexity and improving the precision of the analysis. Modeling based on type based techniques merges all runtime instances of a particular type and thereby introduces inaccuracy in the analysis. Other approaches model individual runtime threads explicitly in the analysis and are of high complexity. In this paper we introduce a thread model that is both context and flow sensitive. Individual thread abstractions are identified based on the context and multiplicity of the creation site. The interaction among these abstract threads are depicted in a tree structure known as Thread Creation Tree (TCT). The TCT structure is subsequently exploited to efficiently compute May-Happen-in-Parallel (MHP) information for the analysis of multi-threaded programs. For concurrent Java programs, our MHP computation algorithm runs 1.77x (on an average) faster than previously reported MHP computation algorithm.

20 citations

Book ChapterDOI
11 Sep 2012
TL;DR: This work presents algorithms for static MHP analysis of a storeless abstraction of X10-like languages that have async-finish parallelism and procedures and solves the MHP decision problem in O(n) time, via a reduction to constrained dynamic pushdown networks (CDPNs).
Abstract: 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

15 citations


"On the fly MHP analysis" refers methods in this paper

  • ...Many prior works [Agarwal et al. 2007; Chen et al. 2012; Lee and Palsberg 2010; Lee et al. 2012] present techniques to compute the MHP information for pairs of statements (see the exposition of Sankar et al....

    [...]

  • ...Many prior works [Agarwal et al. 2007; Chen et al. 2012; Lee and Palsberg 2010; Lee et al. 2012] present techniques to compute the MHP information for pairs of statements (see the exposition of Sankar et al. [2016], for a detailed discussion on the two types of analyses)....

    [...]

Journal ArticleDOI
TL;DR: A relatively simple modification of the classical union-find data structure that supports delete, as well as makeset and union operations, in constant worst-case time, while still supporting find operations in O(log n) worst- case time and O(α⌈ M/N⌉ (n)) amortized time is presented.
Abstract: A union-find data structure maintains a collection of disjoint sets under the operations makeset, union, and find. Kaplan, Shafrir, and Tarjan [SODA 2002] designed data structures for an extension of the union-find problem in which items of the sets maintained may be deleted. The cost of a delete operation in their implementations is essentially the same as the cost of a find operation; namely, O(log n) worst-case and O(α⌈ M/N⌉ (n)) amortized, where n is the number of items in the set returned by the find operation, N is the total number of makeset operations performed, M is the total number of find operations performed, and α⌈ M/N⌉(n) is a functional inverse of Ackermann’s function. They left open the question whether delete operations can be implemented more efficiently than find operations, for example, in o(log n) worst-case time. We resolve this open problem by presenting a relatively simple modification of the classical union-find data structure that supports delete, as well as makeset and union operations, in constant worst-case time, while still supporting find operations in O(log n) worst-case time and O(α⌈ M/N⌉ (n)) amortized time. Our analysis supplies, in particular, a very concise potential-based amortized analysis of the standard union-find data structure that yields an O(α⌈ M/N⌉ (n)) amortized bound on the cost of find operations. All previous potential-based analyses yielded the weaker amortized bound of O(α⌈ M/N⌉ (N)). Furthermore, our tighter analysis extends to one-path variants of the path compression technique such as path splitting.

11 citations


"On the fly MHP analysis" refers background in this paper

  • ...Each of these can be done in near constant time O (α (N )) [Alstrup et al. 2014], [Cormen et al....

    [...]

  • ...Each of these set operations can be done in near constant time O (α (N )) [Alstrup et al. 2014; Cormen et al. 2001; Kaplan et al. 2002]....

    [...]

Proceedings ArticleDOI
17 Mar 2016
TL;DR: New approaches to do MHP analysis for X10-like languages that support async-finish-atomic parallelism are presented and a fast incremental MHP algorithm to derive all the statements that may run in parallel with a given statement is presented.
Abstract: May-Happen-in-Parallel (MHP) analysis is becoming the backbone of many of the parallel analyses and optimizations. In this paper, we present new approaches to do MHP analysis for X10-like languages that support async-finish-atomic parallelism. We present a fast incremental MHP algorithm to derive all the statements that may run in parallel with a given statement. We also extend the MHP algorithm of Agarwal et al. (answers if two given X10 statements may run in parallel, and under what condition) to improve the computational complexity, without compromising on the precision.

6 citations


"On the fly MHP analysis" refers background or methods or result in this paper

  • ...But remAsync and remLoop, in the worst case, have the same complexity as iMHP [Sankar et al. 2016]; in practice, they take significantly less time, as we are reusing the MHP information and typically A ≪ N ....

    [...]

  • ...We fix the percentage of async, atomic and finish node as 5%, 2%, and 5%, respectively – these percentages indicate a more practical mix [Sankar et al. 2016]....

    [...]

  • ...Many researchers [Agarwal et al. 2007; Barik 2005; Duesterwald and Soffa 1991; Lin and Verbrugge 2004; Masticola and Ryder 1993; Naumovich and Avrunin 1998; Naumovich et al. 1999a,b; Sankar et al. 2016] have studied the problem of May-Happen-in-Parallel (MHP) analysis in the context of many different parallel programming languages....

    [...]

  • ...Our evaluation shows that our algorithms run much faster than the repeated invocations of the fastest known MHP analysis for X10 programs [Sankar et al. 2016]....

    [...]

  • ...On the flyMHP analysis in an IDEWe have implemented both our proposed on the fly algorithms and the iMHP algorithm [Sankar et al. 2016] in the X10DT (an extension based on the Eclipse framework)....

    [...]

Proceedings ArticleDOI
19 Sep 2012
TL;DR: The preliminary experiment on 13 concurrent programs indicates that the proposed novel MHP algorithm is extremely faster than two state-of-art approaches, respectively achieving a relative geometry average speed up of 395.53× and 136.37×, while yielding the same precision with these two approaches.
Abstract: May-Happen-in-Parallel (MHP) analysis is a very important and fundamental mechanism to facilitate concurrent program analysis. But the limitation of its efficiency keep it away from being practical and effective in analyzing large scale real world concurrent programs. We proposed a novel MHP algorithm by performing a reachability analysis on a so-called parallel reachability graph of a program. The MHP algorithm mainly comprises two phases: pre-computation of initial MHP information and top-down propagation of this information along the parallel reachability graph. Our algorithm is fast as it has a low complexity O(|N|+|E|), in which N is the number of nodes in the parallel reachability graph and E is the number of edges in this graph. Our preliminary experiment on 13 concurrent programs indicates that our approach is extremely faster than two state-of-art approaches, respectively achieving a relative geometry average speed up of 395.53× and 136.37×, while yielding the same precision with these two approaches.

5 citations


"On the fly MHP analysis" refers methods in this paper

  • ...Many prior works [Agarwal et al. 2007; Chen et al. 2012; Lee and Palsberg 2010; Lee et al. 2012] present techniques to compute the MHP information for pairs of statements (see the exposition of Sankar et al....

    [...]

  • ...Many prior works [Agarwal et al. 2007; Chen et al. 2012; Lee and Palsberg 2010; Lee et al. 2012] present techniques to compute the MHP information for pairs of statements (see the exposition of Sankar et al. [2016], for a detailed discussion on the two types of analyses)....

    [...]