skip to main content
research-article

Checking race freedom via linear programming

Published:07 June 2008Publication History
Skip Abstract Section

Abstract

We present a new static analysis for race freedom and race detection. The analysis checks race freedom by reducing the problem to (rational) linear programming. Unlike conventional static analyses for race freedom or race detection, our analysis avoids explicit computation of locksets and lock linearity/must-aliasness. Our analysis can handle a variety of synchronization idioms that more conventional approaches often have difficulties with, such as thread joining, semaphores, and signals. We achieve efficiency by utilizing modern linear programming solvers that can quickly solve large linear programming instances. This paper reports on the formal properties of the analysis and the experience with applying an implementation to real world C programs.

References

  1. GNU Linear Programming Kit. http://www.gnu.org/software/glpk/glpk.html.]]Google ScholarGoogle Scholar
  2. R. Agarwal and S. D. Stoller. Type inference for parameterized race-free Java. In Verification, Model Checking, and Abstract Interpretation, 5th International Conference, VMCAI 2004, Proceedings, pages 149--160.]]Google ScholarGoogle Scholar
  3. R. Bornat, C. Calcagno, P. W. O'Hearn, and M. J. Parkinson. Permission accounting in separation logic. In Proceedings of the 32nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 259--270, Long Beach, California, Jan. 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Boyapati, A. Salcianu, W. Beebee, Jr., and M. Rinard. Ownership types for safe region-based memory management in real-time Java. In Proceedings of the 2003 ACM SIGPLAN Conference on Programming Language Design and Implementation, San Diego, California, June 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Boyland. Checking interference with fractional permissions. In Static Analysis, Tenth International Symposium, pages 55--72, San Diego, CA, June 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Das. Unification-based pointer analysis with directional assignments. In Proceedings of the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 35--46, Vancouver B.C., Canada, June 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Das, B. Liblit, M. Fähndrich, and J. Rehof. Estimating the impact of scalable pointer analysis on optimization. In Static Analysis, Eighth International Symposium, pages 260--278, Paris, France, July 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. F\"ahndrich, J. Rehof, and M. Das. Scalable context-sensitive flow analysis using instantiation constraints. In Proceedings of the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 253--263, Vancouver B.C., Canada, June 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Flanagan and M. Abadi. Types for safe locking. In D. Swierstra, editor, 8th European Symposium on Programming, volume 1576 of Lecture Notes in Computer Science, pages 91--108, Amsterdam, The Netherlands, Mar. 1999. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Flanagan and S. N. Freund. Type-based race detection for Java. In Proceedings of the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 219--232, Vancouver B.C., Canada, June 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Flanagan and S. N. Freund. Type inference against races. In Static Analysis, Eleventh International Symposium, pages 116--132, Verona, Italy, August 2004.]]Google ScholarGoogle Scholar
  12. J. S. Foster, T. Terauchi, and A. Aiken. Flow-sensitive type qualifiers. In Proceedings of the 2002 ACM SIGPLAN Conference on Programming Language Design and Implementation, Berlin, Germany, June 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Grossman. Type-safe multithreading in Cyclone. In Proceedings of the 2003 ACM Workshop on Types in Language Design and Implementation, pages 13--25, New Orleans, Louisiana, Jan. 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. Kodumal and A. Aiken. The set constraint/cfl reachability connection in practice. In Proceedings of the 2004 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 207--218, Washington DC, USA, June 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Mimram. ocaml-glpk. http://ocaml-glpk.sourceforge.net/.]]Google ScholarGoogle Scholar
  16. H. Mittelmann. Benchmarks for optimization software. http://plato.asu.edu/bench.html.]]Google ScholarGoogle Scholar
  17. M. Naik and A. Aiken. Conditional must not aliasing for static race detection. In Proceedings of the 34th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 327--338, Nice, France, Jan. 2007.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Naik, A. Aiken, and J. Whaley. Effective static race detection for Java. In Proceedings of the 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 308--319, Ottawa, Ontario, Canada, June 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. G. C. Necula, S. McPeak, S. P. Rahul, and W. Weimer. CIL: Intermediate language and tools for analysis and transformation of c programs. In Compiler Construction, 11th International Conference, pages 213--228, Grenoble, France, Apr. 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. Pratikakis, J. S. Foster, and M. W. Hicks. LOCKSMITH: context-sensitive correlation analysis for race detection. In Proceedings of the 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 320--331, Ottawa, Ontario, Canada, June 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. T. Terauchi and A. Aiken. A capability calculus for concurrency and determinism. In Concurrency Theory, 17th International Conference, volume 4137, pages 218--232, Bonn, Germany, Aug. 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. W. Voung, R. Jhala, and S. Lerner. RELAY: static race detection on millions of lines of code. In Proceedings of the 6th joint meeting of the European Software Engineering Conference and the ACM SIGSOFT International Symposium on Foundations of Software Engineering, pages 205--214, Dubrovnik, Croatia, Sept. 2007.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. Whaley and M. S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proceedings of the 2004 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 131--144, Washington DC, USA, June 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Checking race freedom via linear programming

        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

        Full Access

        • Published in

          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
          • 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

          Copyright © 2008 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 7 June 2008

          Check for updates

          Qualifiers

          • research-article

        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!