Skip to main content

An Efficient Algorithm for Computing MHP Information for Concurrent Java Programs

  • Conference paper
  • First Online:
Software Engineering — ESEC/FSE ’99 (ESEC 1999, SIGSOFT FSE 1999)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. http://vislab-www.nps.navy.mil/~java/course/sourcecode.

  2. http://www.hensa.ac.uk/parallel/groups/wotug/java/applets.

  3. http://www.kai.com/assurej.

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. M. Hecht. Flow Analysis of Computer Programs. North-Holland, New York, 1977.

    MATH  Google Scholar 

  8. 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.

    Google Scholar 

  9. 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.

    Google Scholar 

  10. 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.

    Google Scholar 

  11. D. Lea. Concurrent Programming in Java. Addison-Wesley, Reading, MA, 1997.

    MATH  Google Scholar 

  12. D. Lea. Concurrent programming in Java. Design principles and patterns, online supplement. http://gee.cs.oswego.edu/dl/cpj/index.html, Sept. 1998.

  13. 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.

    Google Scholar 

  14. 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.

    Google Scholar 

  15. 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.

    Google Scholar 

  16. 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.

    Article  Google Scholar 

  17. 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.

    Google Scholar 

  18. 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.

    Google Scholar 

  19. 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.

    Google Scholar 

  20. 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.

    Google Scholar 

  21. R. N. Taylor. Complexity of analyzing the synchronization structure of concurrent programs. Acta Informatica, 19:57–84, 1983.

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics