skip to main content
10.1145/1375581.1375620acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Dataflow analysis for concurrent programs using datarace detection

Authors Info & Claims
Published:07 June 2008Publication History

ABSTRACT

Dataflow analyses for concurrent programs differ from their single-threaded counterparts in that they must account for shared memory locations being overwritten by concurrent threads. Existing dataflow analysis techniques for concurrent programs typically fall at either end of a spectrum: at one end, the analysis conservatively kills facts about all data that might possibly be shared by multiple threads; at the other end, a precise thread-interleaving analysis determines which data may be shared, and thus which dataflow facts must be invalidated. The former approach can suffer from imprecision, whereas the latter does not scale.

We present RADAR, a framework that automatically converts a dataflow analysis for sequential programs into one that is correct for concurrent programs. RADAR uses a race detection engine to kill the dataflow facts, generated and propagated by the sequential analysis, that become invalid due to concurrent writes. Our approach of factoring all reasoning about concurrency into a race detection engine yields two benefits. First, to obtain analyses for code using new concurrency constructs, one need only design a suitable race detection engine for the constructs. Second, it gives analysis designers an easy way to tune the scalability and precision of the overall analysis by only modifying the race detection engine. We describe the RADAR framework and its implementation using a pre-existing race detection engine. We show how RADAR was used to generate a concurrent version of a null-pointer dereference analysis, and we analyze the result of running the generated concurrent analysis on several benchmarks.

References

  1. C. Boyapati, R. Lee, and M. Rinard. Ownership types for safe programming: preventing data races and deadlocks. In OOPSLA, pages 211--230, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. J. M. Cobleigh, L. A. Clarke, and L. J. Osterweil. FLAVERS: A finite state verification technique for software systems. IBM Systems Journal, 41(1):140--165, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. N. Cooprider and J. Regehr. Pluggable abstract domains for analyzing embedded software. In LCTES, pages 44--53, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. I. Dillig, T. Dillig, and A. Aiken. Static error detection using semantic inconsistency inference. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. Engler and K. Ashcraft. Racerx: Effective, static detection of race conditions and deadlocks. In SOSP, pages 237--252. ACM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Flanagan and S.N. Freund. Type-based race detection for Java. In PLDI, pages 219--232. ACM, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. C. Flanagan and S. Qadeer. Thread-modular model checking. In SPIN, LNCS 2648, pages 213--224. Springer, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Gay, P. Levis, R. von Behren, M. Welsh, E. Brewer, and D. Culler. The nesC language: A holistic approach to networked embedded systems. In PLDI 2003, pages 1--11. ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. D. Grunwald and H. Srinivasan. Data flow equations for explicitly parallel programs. In PPoPP, San Diego, CA, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Brian Hackett, Manuvir Das, Daniel Wang, and Zhe Yang. Modular checking for buffer overflows in the large. In ICSE, pages 129--144. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. T.A. Henzinger, R. Jhala, and R. Majumdar. Race checking by context inference. In PLDI, pages 1--12. ACM, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C.B. Jones. Tentative steps toward a development method for interfering programs. TOPLAS, 5(4):596--619, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Knoop, B. Steffen, and J. Vollmer. Parallelism for free: Efficient and optimal bitvector analyses for parallel programs. TOPLAS, 18(3):268--299, May 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. L. Lamport. Proving the correctness of multiprocess programs. IEEE Transactions on Software Engineering, SE-3(2):125--143, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. Lee, D.A. Padua, and S.P. Midkiff. Basic compiler algorithms for parallel programs. In PPOPP, pages 1--12, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R.J. Lipton. Reduction: A new method of proving properties of systems of processes. In POPL, pages 78--86, 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Naik, A. Aiken, and J. Whaley. Effective static race detection for java. In PLDI, pages 308--319, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. G. Naumovich, G.S. Avrunin, and L.A. Clarke. An efficient algorithm for computing mhp information for concurrent java programs. In ESEC / SIGSOFT FSE, pages 338--354, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. S. Owicki and D. Gries. An axiomatic proof technique for parallel programs. Acta Informatica, 6(4):319--340, 1976.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. Pratikakis, J.S. Foster, and M.W. Hicks. Locksmith: context-sensitive correlation analysis for race detection. In PLDI, pages 320--331, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. G. Ramalingam. Context-sensitive synchronization-sensitive analysis is undecidable. TOPLAS, 22(2):416--430, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. R. Rugina and M.C. Rinard. Pointer analysis for multithreaded programs. In PLDI, pages 77--90, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. Salcianu and M.C. Rinard. Pointer and escape analysis for multithreaded programs. In PPOPP, pages 12--23, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. V. Sarkar. Analysis and optimization of explicitly parallel programs using the parallel program graph representation. In LCPC, pages 94--113, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. D.A. Schmidt. Data flow analysis is model checking of abstract interpretation. In POPL, pages 38--48. ACM, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. B. Steensgaard. Points-to analysis in almost linear time. In POPL, pages 32--41. ACM, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. A. Venet and G.P. Brat. Precise and efficient static array bound checking for large embedded c programs. In PLDI, pages 231--242, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. C. von Praun and T.R. Gross. Static conflict analysis for multi-threaded object-oriented programs. In PLDI, pages 115--128, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. J. Voung, R. Jhala, and S. Lerner. Relay: Static race detection on millions of lines of code. In ESEC/FSE. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Dataflow analysis for concurrent programs using datarace detection

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              PLDI '08: Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation
              June 2008
              396 pages
              ISBN:9781595938602
              DOI:10.1145/1375581
              • General Chair:
              • Rajiv Gupta,
              • Program Chair:
              • Saman Amarasinghe
              • cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 43, Issue 6
                PLDI '08
                June 2008
                382 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/1379022
                Issue’s Table of Contents

              Copyright © 2008 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 7 June 2008

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Overall Acceptance Rate406of2,067submissions,20%

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!