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.
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}T. Elmas, S. Qadeer, and S. Tasiran. A Calculus of Atomic Actions. In ACM Symposium on Principles of Programming Languages, 2009. Google ScholarDigital Library
- }}D. Engler and K. Ashcraft. RacerX: Effective, Static Detection of Race Conditions and Deadlocks. In ACM Symposium on Operating Systems Principles, 2003. Google ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}C. Flanagan and S. N. Freund. Type-based Race Detection for Java. In ACM Conference on Programming Language Design and Implementation, 2000. Google ScholarDigital Library
- }}C. Flanagan and S. N. Freund. Atomizer: A Dynamic Atomicity Checker for Multithreaded Programs. In ACM Symposium on Principles of Programming Languages, 2004. Google ScholarDigital Library
- }}C. Flanagan and S. N. Freund. FastTrack: Efficient and Precise Dynamic Race Detection. In ACM Conference on Programming Language Design and Implementation, 2009. Google ScholarDigital Library
- }}C. Flanagan and S. Qadeer. A Type And Effect System For Atomicity. In ACM Conference on Programming Language Design and Implementation, 2003. Google ScholarDigital Library
- }}C. Flanagan and S. Qadeer. Types for Atomicity. In ACM Workshop on Types in Language Design and Implementation, 2003. Google ScholarDigital Library
- }}C. Flanagan, S. N. Freund, S. Qadeer, and S. A. Seshia. Modular Verification of Multithreaded Programs. Theoretical Computer Science, 338(1--3), 2005. Google ScholarDigital Library
- }}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 ScholarDigital Library
- }}P. Godefroid. Model Checking for Programming Languages Using Verisoft. In ACM Symposium on Principles of Programming Languages, 1997. Google ScholarDigital Library
- }}D. Grossman. Type-Safe Multithreading in Cyclone. In ACM Workshop on Types in Language Design and Implementation, 2003. Google ScholarDigital Library
- }}T. A. Henzinger, R. Jhala, and R. Majumdar. Race Checking by Context Inference. In ACM Conference on Programming Language Design and Implementation, 2004. Google ScholarDigital Library
- }}B. H. Liskov and J. M. Wing. A Behavioral Notion of Subtyping. ACM Transactions on Programming Languages and Systems, 16(6), 1994. Google ScholarDigital Library
- }}B. Lucia and L. Ceze.Finding Concurrency Bugs with Context-Aware Communication Graphs. In ACM/IEEE International Symposium on Computer Architecture, 2009. Google ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}M. Naik and A. Aiken. Conditional Must Not Aliasing for Static Race Detection. In ACM Symposium on Principles of Programming Languages, 2007. Google ScholarDigital Library
- }}M. Naik, A. Aiken, and J. Whaley. Effective Static Race Detection for Java. In ACM Conference on Programming Language Design and Implementation, 2006. Google ScholarDigital Library
- }}M. G. Nanda and S. Ramesh. Pointer Analysis of Multithreaded Java Programs. In ACM Symposium on Applied Computing, 2003. Google ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}R. Rugina and M. C. Rinard. Pointer Analysis for Structured Parallel Programs. ACM Transactions on Programming Languages and Systems, 25(1), 2003. Google ScholarDigital Library
- }}A. Salcianu and M. Rinard. Pointer and Escape Analysis for Multithreaded Programs. In ACM Symposium on Principles and Practice of Parallel Programming, 2001. Google ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}N. Sterling. A Static Data Race Analysis Tool. In USENIX Winter Technical Conference, 1993.Google Scholar
- }}D. F. Sutherland and W. L. Scherlis. Composable Thread Coloring. In ACM Symposium on Principles and Practice of Parallel Programming, 2010. Google ScholarDigital Library
- }}W. Visser, G. P. B. Klaus Havelund, and S. Park. Model Checking Programs. In IEEE/ACM International Conference on Automated Software Engineering, 2000. Google ScholarDigital Library
- }}C. von Praun and T. Gross.Object Race Detection.In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2001. Google ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 Scholar
- }}E. Yahav. Verifying Safety Properties of Concurrent Java Programs Using 3-value Logic. In ACM Symposium on Principles of Programming Languages, 2001. Google ScholarDigital Library
- }}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 ScholarDigital Library
- }}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 ScholarDigital Library
- }}P. Zhou, R. Teodorescu, and Y. Zhou. HARD: Hardware-Assisted Lockset-based Race Detection. In International Symposium on High-Performance Computer Architecture, 2007. Google ScholarDigital Library
Index Terms
- Composable specifications for structured shared-memory communication
Recommendations
Composable specifications for structured shared-memory communication
OOPSLA '10In 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 ...
Specification, Refinement and Verification of Concurrent Systems—An Integration of Object-Z and CSP
This paper presents a method of formally specifying, refining and verifying concurrent systems which uses the object-oriented state-based specification language Object-Z together with the process algebra CSP. Object-Z provides a convenient way of ...
On Grainless Footprint Semantics for Shared-memory Programs
We develop an improved grainless denotational semantics for shared-memory parallel programs, building on ideas from earlier trace-based models with local states and footprints S. Brookes. A Grainless Semantics for Parallel Programs with Shared Mutable ...
Comments