Abstract
Information about which statements in a concurrent program may happen in parallel (MHP) has a number of important applications. It can be used in program optimization, debugging, program understanding tools, improving the accuracy of data flow approaches, and detecting synchronization anomalies, such as data races. In this paper we propose a data flow algorithm for computing a conservative estimate of the MHP information for Java programs that has a worst-case time bound that is cubic in the size of the program.We present a preliminary experimental comparison between our algorithm and a reachability analysis algorithm that determines the “ideal” static MHP information for concurrent Java programs. This initial experiment indicates that our data flow algorithm precisely computed the ideal MHP information in the vast majority of cases we examined. In the two out of 29 cases where the MHP algorithm turned out to be less than ideally precise, the number of spurious pairs was small compared to the total number of ideal MHP pairs.
This research was partially supported by the Defense Advanced Research Projects Agency and the Air Force Research Laboratory/IFTD under agreement F30602-97-2-0032, and by the National Science Foundation under Grant CCR-9708184. The views, findings, and conclusions presented here are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the Defense Advanced Research Projects Agency, the Air Force Research Laboratory/IFTD, the National Science Foundation, or the U.S. Government.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
D. Callahan and J. Subhlok. Static analysis of low-level synchronization. In Proceedings of the ACM SIGPLAN and SIGOPS Workshop on Parallel and Distributed Debugging, number 1, pages 100–111, Jan. 1989.
J. C. Corbett. Constructing compact models of concurrent Java programs. In Proceedings of the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA-98), pages 1–10, Mar. 1998.
E. Duesterwald and M. L. Soffa. Concurrency analysis in the presence of procedures using a data flow framework. In Proceedings of the ACM SIGSOFT Fourth Workshop on Software Testing, Analysis, and Verification, pages 36–48, Oct. 1991.
M. Hecht. Flow Analysis of Computer Programs. North-Holland, New York, 1977.
S. Horwitz, T. Reps, and M. Sagiv. Demand interprocedural dataflowanalysis. In Proceedings of the Third ACM SIGSOFT Symposium on the Foundations of Software Engineering, pages 104–115, Oct. 1995.
J. Krinke. Static slicing of threaded programs. In Proceedings of theACMSIGPLAN/SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 35–41, June 1998.
W. Landi and B. Ryder. Pointer-induced aliasing: A problem taxonomy. In Conference Record of the 18th Annual ACM Symposium on Principles of Programming Languages (POPL’ 91), pages 93–103, Jan. 1991.
D. Lea. Concurrent Programming in Java. Addison-Wesley, Reading, MA, 1997.
D. Lea. Concurrent programming in Java. Design principles and patterns, online supplement. http://gee.cs.oswego.edu/dl/cpj/index.html, Sept. 1998.
D. L. Long and L. A. Clarke. Task interaction graphs for concurrency analysis. In Proceedings of the 11th International Conference on Software Engineering, pages 44–52, May 1989.
S. Masticola and B. Ryder. A model of Ada programs for static deadlock detection in polynomial time. In Proceedings of the Workshop on Parallel and Distributed Debugging, pages 97–107, May 1991.
S. Masticola and B. Ryder. Non-concurrency analysis. In Proceedings of the Fourth ACM SIGPLAN Symposium on Principles & Practice of Parallel Programming, pages 129–138, May 1993.
S. P. Masticola, T. J. Marlowe, and B. G. Ryder. Lattice frameworks for multisource and bidirectional data flow problems. ACM Transactions on Programming Languages and Systems, 17(5):777–803, September 1995.
G. Naumovich and G. S. Avrunin. A conservative data flow algorithm for detecting all pairs of statements that may happen in parallel. In Proceedings of the Sixth ACMSIGSOFT Symposium on the Foundations of Software Engineering, pages 24–34, Nov. 1998.
G. Naumovich, G. S. Avrunin, and L. A. Clarke. An efficient algorithm for computing MHP information for concurrent Java programs. Technical Report 98-44, University of Massachusetts, Amherst, Oct. 1998. http://laser.cs.umass.edu/abstracts/98-044.html.
G. Naumovich, G. S. Avrunin, and L. A. Clarke. Data flow analysis for checking properties of concurrent Java programs. In Proceedings of the 21st International Conference on Software Engineering, pages 399–410, May 1999.
J. Plevyak and A. A. Chien. Precise concrete type inference for object-oriented languages. In ACM SIGPLAN Proceedings of the 1994 Conference on Object-Oriented Programming, pages 324–340, Oct. 1994.
R. N. Taylor. Complexity of analyzing the synchronization structure of concurrent programs. Acta Informatica, 19:57–84, 1983.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Naumovich, G., Avrunin, G.S., Clarke, L.A. (1999). An Efficient Algorithm for Computing MHP Information for Concurrent Java Programs. In: Nierstrasz, O., Lemoine, M. (eds) Software Engineering — ESEC/FSE ’99. ESEC SIGSOFT FSE 1999 1999. Lecture Notes in Computer Science, vol 1687. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48166-4_21
Download citation
DOI: https://doi.org/10.1007/3-540-48166-4_21
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66538-0
Online ISBN: 978-3-540-48166-9
eBook Packages: Springer Book Archive