skip to main content
10.1145/1869459.1869473acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Composable specifications for structured shared-memory communication

Published:17 October 2010Publication History

ABSTRACT

In this paper we propose a communication-centric approach to specifying and checking how multithreaded programs use shared memory to perform inter-thread communication. Our approach complements past efforts for improving the safety of multithreaded programs such as race detection and atomicity checking. Unlike prior work, we focus on what pieces of code are allowed to communicate with one another, as opposed to declaring what data items are shared or what code blocks should be atomic. We develop a language that supports composable specifications at multiple levels of abstraction and that allows libraries to specify whether or not shared-memory communication is exposed to clients. The precise meaning of a specification is given with a formal semantics we present. We have developed a dynamic-analysis tool for Java that observes program execution to see if it obeys a specification. We report results for using the tool on several benchmark programs to which we added specifications, concluding that our approach matches the modular structure of multithreaded applications and that our tool is performant enough for use in development and testing.

References

  1. }}M. Abadi, C. Flanagan, and S. N. Freund. Types for Safe Locking: Static Race Detection for Java. ACM Transactions on Programming Languages and Systems, 28(2), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. }}R. Agarwal, A. Sasturkar, L. Wang, and S. D. Stoller. Optimized Run-time Race Detection and Atomicity Checking Using Partial Discovered Types. In IEEE/ACM International Conference on Automated Software Engineering, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}Z. Anderson, D. Gay, R. Ennals, and E. Brewer. SharC: Checking Data Sharing Strategies for Multithreaded C. In ACM Conference on Programming Language Design and Implementation, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}Z. Anderson, D. Gay, and M. Naik. Lightweight Annotations for Controlling Sharing in Concurrent Data Structures. In ACM Conference on Programming Language Design and Implementation, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}C. Boyapati and M. Rinard. A Parameterized Type System for Race-Free Java Programs. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}C. Boyapati, R. Lee, and M. Rinard. Ownership Types for Safe Programming: Preventing Data Races and Deadlocks. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. }}G.-I. Cheng, M. Feng, C. Leiserson, K. Randall, and A. Stark. Detecting Data Races in Cilk Programs that Use Locks. In ACM Symposium on Parallel Algorithms and Architectures, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}J.-D. Choi, K. Lee, A. Loginov, R. O'Callahan, V. Sarkar, and M. Sridharan. Efficient and Precise Datarace Detection for Multithreaded Object-Oriented Programs. In ACM Conference on Programming Language Design and Implementation, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}M. Dwyer, J. Hatcliff, R. Joehanes, S. Laubach, C. Pasareanu, Robby, W. Visser, and H. Zheng. Tool-supported Program Abstraction for Finite-state Verification. In ACM/IEEE International Conference on Software Engineering, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}T. Elmas, S. Qadeer, and S. Tasiran. A Calculus of Atomic Actions. In ACM Symposium on Principles of Programming Languages, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}D. Engler and K. Ashcraft. RacerX: Effective, Static Detection of Race Conditions and Deadlocks. In ACM Symposium on Operating Systems Principles, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}C. Flanagan and M. Abadi. Object Types Against Races. In International Conference on Concurrency Theory, volume 1664 of Lecture Notes in Computer Science. Springer-Verlag, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}C. Flanagan and M. Abadi. Types for Safe Locking. In European Symposium on Programming, volume 1576 of Lecture Notes in Computer Science. Springer-Verlag, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. }}C. Flanagan and S. N. Freund. Type-based Race Detection for Java. In ACM Conference on Programming Language Design and Implementation, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}C. Flanagan and S. N. Freund. Atomizer: A Dynamic Atomicity Checker for Multithreaded Programs. In ACM Symposium on Principles of Programming Languages, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. }}C. Flanagan and S. N. Freund. FastTrack: Efficient and Precise Dynamic Race Detection. In ACM Conference on Programming Language Design and Implementation, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}C. Flanagan and S. Qadeer. A Type And Effect System For Atomicity. In ACM Conference on Programming Language Design and Implementation, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. }}C. Flanagan and S. Qadeer. Types for Atomicity. In ACM Workshop on Types in Language Design and Implementation, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}C. Flanagan, S. N. Freund, S. Qadeer, and S. A. Seshia. Modular Verification of Multithreaded Programs. Theoretical Computer Science, 338(1--3), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}C. Flanagan, S. N. Freund, and J. Yi.Velodrome: A Sound And Complete Dynamic Atomicity Checker for Multithreaded Programs. In ACM Conference on Programming Language Design and Implementation, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. }}P. Godefroid. Model Checking for Programming Languages Using Verisoft. In ACM Symposium on Principles of Programming Languages, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. }}D. Grossman. Type-Safe Multithreading in Cyclone. In ACM Workshop on Types in Language Design and Implementation, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}T. A. Henzinger, R. Jhala, and R. Majumdar. Race Checking by Context Inference. In ACM Conference on Programming Language Design and Implementation, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}B. H. Liskov and J. M. Wing. A Behavioral Notion of Subtyping. ACM Transactions on Programming Languages and Systems, 16(6), 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. }}B. Lucia and L. Ceze.Finding Concurrency Bugs with Context-Aware Communication Graphs. In ACM/IEEE International Symposium on Computer Architecture, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. }}J.-P. Martin, M. Hicks, M. Costa, P. Akritidis, and M. Castro. Dynamically Checking Ownership Policies in Concurrent C/C++ Programs. In ACM Symposium on Principles of Programming Languages, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. }}M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. Nainar, and I. Neamtiu. Finding and Reproducing Heisenbugs in Concurrent Programs. In USENIX Symposium on Operating Systems Design and Implementation, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. }}M. Naik and A. Aiken. Conditional Must Not Aliasing for Static Race Detection. In ACM Symposium on Principles of Programming Languages, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. }}M. Naik, A. Aiken, and J. Whaley. Effective Static Race Detection for Java. In ACM Conference on Programming Language Design and Implementation, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. }}M. G. Nanda and S. Ramesh. Pointer Analysis of Multithreaded Java Programs. In ACM Symposium on Applied Computing, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. }}C.-S. Park and K. Sen. Randomized Active Atomicity Violation Detection in Concurrent Programs. In ACM International Symposium on the Foundations of Software Engineering, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. }}P. Pratikakis, J. S. Foster, and M. Hicks.LOCKSMITH: Context-Sensitive Correlation Analysis for Race Detection. In ACM Conference on Programming Language Design and Implementation, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. }}R. Rugina and M. C. Rinard. Pointer Analysis for Structured Parallel Programs. ACM Transactions on Programming Languages and Systems, 25(1), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. }}A. Salcianu and M. Rinard. Pointer and Escape Analysis for Multithreaded Programs. In ACM Symposium on Principles and Practice of Parallel Programming, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. }}S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A Dynamic Data Race Detector for Multithreaded Programs. ACM Transactions on Computer Systems, 15(4), 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. }}L. A. Smith, J. M. Bull, and J. Obdrzálek. A Parallel Java Grande Benchmark Suite. In ACM/IEEE International Conference for High Performance Computing and Networking, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. }}N. Sterling. A Static Data Race Analysis Tool. In USENIX Winter Technical Conference, 1993.Google ScholarGoogle Scholar
  39. }}D. F. Sutherland and W. L. Scherlis. Composable Thread Coloring. In ACM Symposium on Principles and Practice of Parallel Programming, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. }}W. Visser, G. P. B. Klaus Havelund, and S. Park. Model Checking Programs. In IEEE/ACM International Conference on Automated Software Engineering, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. }}C. von Praun and T. Gross.Object Race Detection.In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. }}C. von Praun and T. R. Gross. Static Conflict Analysis for Multi-Threaded Object-Oriented Programs. In ACM Conference on Programming Language Design and Implementation, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. }}J. Voung, R. Jhala, and S. Lerner. RELAY: Static Race Detection on Millions of Lines of Code. In ACM International Symposium on the Foundations of Software Engineering, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. }}L. Wang and S. D. Stoller. Accurate and Efficient Runtime Detection of Atomicity Errors in Concurrent Programs. In ACM Symposium on Principles and Practice of Parallel Programming, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. }}B. P. Wood, J. Devietti, L. Ceze, and D. Grossman. Code-Centric Communication Graphs for Shared-Memory Multithreaded Programs.Technical Report UW-CSE-09-05-02, University of Washington, 2009.Google ScholarGoogle Scholar
  46. }}E. Yahav. Verifying Safety Properties of Concurrent Java Programs Using 3-value Logic. In ACM Symposium on Principles of Programming Languages, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. }}J. Yu and S. Narayanasamy.A Case for an Interleaving Constrained Shared-Memory Multi-Processor. In ACM/IEEE International Symposium on Computer Architecture, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. }}Y. Yu, T. Rodeheffer, and W. Chen. RaceTrack: Efficient Detection of Data Race Conditions via Adaptive Tracking. In ACM Symposium on Operating Systems Principles, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. }}P. Zhou, R. Teodorescu, and Y. Zhou. HARD: Hardware-Assisted Lockset-based Race Detection. In International Symposium on High-Performance Computer Architecture, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Composable specifications for structured shared-memory communication

            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
              OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
              October 2010
              984 pages
              ISBN:9781450302036
              DOI:10.1145/1869459
              • cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 45, Issue 10
                OOPSLA '10
                October 2010
                957 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/1932682
                Issue’s Table of Contents

              Copyright © 2010 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 17 October 2010

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Overall Acceptance Rate268of1,244submissions,22%

              Upcoming Conference

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader