skip to main content
article

Thread-modular shape analysis

Published:10 June 2007Publication History
Skip Abstract Section

Abstract

We present the first shape analysis for multithreaded programs that avoids the explicit enumeration of execution-interleavings. Our approach is to automatically infer a resource invariant associated with each lock that describes the part of the heap protected by the lock. This allows us to use a sequential shape analysis on each thread. We show that resource invariants of a certain class can be characterized as least fixed points and computed via repeated applications of shape analysis only on each individual thread. Based on this approach, we have implemented a thread-modular shape analysis tool and applied it to concurrent heap-manipulating code from Windows device drivers.

References

  1. J. Berdine, C. Calcagno, and P. O'Hearn. Symbolic execution with separation logic. In APLAS'05: Asian Symposium on Programming Languages and Systems, volume 3780 of LNCS, pages 52--68. Springer, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. R. Bornat, C. Calcagno, P. W. O'Hearn, and M. Parkinson. Permission accounting in separation logic. In POPL'05: Principles of Programming Languages, pages 259--270. ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. Boyapati, R. Lee, and M. C. Rinard. Ownership types for safe programming: preventing data races and deadlocks. In OOPSLA'02: Object--Oriented Programming, Systems, Languages, and Applications, pages 211--230. ACM Press, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Calcagno, D. Distefano, P. W. O'Hearn, and H. Yang. Beyond reachability: Shape abstraction in the presence of pointer arithmetic. In SAS'06: Static Analysis Simposium, volume 4134 of em LNCS, pages 182--203. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Choi, K. Lee, A. Loginov, R. O'Callahan, V. Sarkar, and M. Sridharan. Efficient and precise datarace detection for multithreaded object-oriented programs. In PLDI'02: Programming Languages Design and Implementation, pages 258--269. ACM Press, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. E. Clarke. Synthesis of resource invariants for concurrent programs. ACM Trans. Program. Lang. Syst., 2(3):338--358, 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In POPL'77: Principles of Programming Languages, pages 238--252. ACM Press, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Cousot and R. Cousot. Abstract interpretation frameworks. Journal of Logic and Computation, 2(4):511--547, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  9. D. Distefano, P. W. O'Hearn, and H. Yang. A local shape analysis based on separation logic. In TACAS'06: Tools and Algorithms for Analysis and Construction of Systems, volume 3920 of LNCS, pages 287--302. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Flanagan and S. N. Freund. Type-based race detection for Java. In PLDI'00: Programming Languages Design and Implementation, pages 219--232. ACM Press, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Flanagan and S. Qadeer. Thread-modular model checking. In SPIN'03: Workshop on Model Checking Software, volume 2648 of LNCS, pages 213--224. Springer, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A. Gotsman, J. Berdine, and B. Cook. Interprocedural shape analysis with separated heap abstractions. In SAS'06: Static Analysis Symposium, volume 4134 of LNCS, pages 240--260. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Gotsman, N. Rinetzky, J. Berdine, B. Cook, D. Distefano, P. W. O'Hearn, M. Sagiv, and H. Yang. Abstract interpretation with state separation. In preparation, 2007.Google ScholarGoogle Scholar
  14. D. Grossman. Type-safe multithreading in Cyclone. In TLDI'03: Types in Languages Design and Implementation, pages 13--25. ACM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. TLev-Ami. Personal communication. 2006.Google ScholarGoogle Scholar
  16. T. Lev-Ami, N. Immerman, and M. Sagiv. Abstraction for shape analysis with fast and precise transformers. In CAV'06: Computer Aided Verification, volume 4144 of LNCS, pages 547--561. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Naik and A. Aiken. Conditional must not aliasing for static race detection. In POPL'07: Principles of Programming Languages, pages 327--338. ACM Press, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Naik, A. Aiken, and J. Whaley. Effective static race detection for Java. In PLDI'06: Programming Languages Design and Implementation, pages 308--319. ACM Press, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. P. W. O'Hearn. Resources, concurrency and local reasoning. In CONCUR'04: International Conference on Concurrency Theory, volume 3170 of LNCS, pages 49--67. Springer, 2004.Google ScholarGoogle Scholar
  20. S. Owicki and D. Gries. Verifying properties of parallel programs: An axiomatic approach. Commun. ACM, 19(5):279--284, 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Parkinson, R. Bornat, and C. Calcagno. Variables as resource in Hoare logics. In LICS'06: Logic in Computer Science, pages 137--146. IEEE Press, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. P. Pratikakis, J. S. Foster, and M. Hicks. Locksmith: context-sensitive correlation analysis for race detection. In PLDI'06: Programming Languages Design and Implementation, pages 320--331. ACM Press, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS'02: Logic in Computer Science, pages 55--74. IEEE Press, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. N. Rinetzky, M. Sagiv, and E. Yahav. Interprocedural shape analysis for cutpoint-free programs. In SAS'05: Static Analysis Symposium, volume 3672 of LNCS, pages 284--302. Springer, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Savage, M. Burrows, G. Nelson, P. Soblvarro, and T. Anderson. Eraser: A dynamic data race detector for multithreaded programs. ACM Trans. on Comp. Syst., 15(4):371--411, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. E. Yahav. Verifying safety properties of concurrent Java programs using 3-valued logic. In POPL'01: Principles of Programming Languages, pages 27--40. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. H. Yang and P. W. O'Hearn. A semantic basis for local reasoning. In FOSSACS'02: Foundations of Software Science and Computation Structures, volume 2303 of LNCS, pages 402--416. Springer, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Thread-modular shape analysis

              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 42, Issue 6
                Proceedings of the 2007 PLDI conference
                June 2007
                491 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/1273442
                Issue’s Table of Contents
                • cover image ACM Conferences
                  PLDI '07: Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation
                  June 2007
                  508 pages
                  ISBN:9781595936332
                  DOI:10.1145/1250734

                Copyright © 2007 ACM

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 10 June 2007

                Check for updates

                Qualifiers

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