ACM Home Page
Please provide us with feedback. Feedback
Types for atomicity: Static checking and inference for Java
Full text PdfPdf (990 KB)
Source
ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 30 ,  Issue 4  (July 2008) table of contents
Article No. 20  
Year of Publication: 2008
ISSN:0164-0925
Authors
Cormac Flanagan  University of California at Santa Cruz, Santa Cruz, CA
Stephen N. Freund  Williams College, Williamstown, MA
Marina Lifshin  Williams College, Williamstown, MA
Shaz Qadeer  Microsoft Research, Redmond, WA
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 13,   Downloads (12 Months): 164,   Citation Count: 0
Additional Information:

appendices and supplements   abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1377492.1377495
What is a DOI?

APPENDICES and SUPPLEMENTS
Online appendix to designing mediation for context-aware applications. The appendix supports the information on article 20.


ABSTRACT

Atomicity is a fundamental correctness property in multithreaded programs. A method is atomic if, for every execution, there is an equivalent serial execution in which the actions of the method are not interleaved with actions of other threads. Atomic methods are amenable to sequential reasoning, which significantly facilitates subsequent analysis and verification.

This article presents a type system for specifying and verifying the atomicity of methods in multithreaded Java programs using a synthesis of Lipton's theory of reduction and type systems for race detection. The type system supports guarded, write-guarded, and unguarded fields, as well as thread-local data, parameterized classes and methods, and protected locks. We also present an algorithm for verifying atomicity via type inference.

We have applied our type checker and type inference tools to a number of commonly used Java library classes and programs. These tools were able to verify the vast majority of methods in these benchmarks as atomic, indicating that atomicity is a widespread methodology for multithreaded programming. In addition, reported atomicity violations revealed some subtle errors in the synchronization disciplines of these programs.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
 
2
Agarwal, R. and Stoller, S. D. 2004. Type inference for parameterized race-free Java. In Proceedings of the Conference on Verification, Model Checking, and Abstract Interpretation. 149--160.
3
 
4
Artho, C., Havelund, K., and Biere, A. 2003. High-level data races. In Proceedings of the First International Workshop on Verification and Validation of Enterprise Information Systems.
 
5
 
6
Birrell, A. D. 1989. An introduction to programming with threads. Res. rep. 35, Digital Equipment Corporation Systems Research Center.
 
7
Boyapati, C., Lee, R., and Rinard, M. 2002. A type system for preventing data races and deadlocks in Java programs. In Proceedings of the ACM Conference on Object-Oriented Programming, Systems, Languages and Applications. 211--230.
8
 
9
Bruening, D. 1999. Systematic testing of multithreaded Java programs. M.S. thesis, Massachusetts Institute of Technology.
 
10
 
11
Burrows, M. and Leino, K. R. M. 2002. Finding stale-value errors in concurrent programs. Technical Note 2002-004, Compaq Systems Research Center.
 
12
 
13
Chamillard, A. T., Clarke, L. A., and Avrunin, G. S. 1996. An empirical comparison of static concurrency analysis techniques. Tech. rep. 96-084, Department of Computer Science, University of Massachusetts at Amherst.
14
15
 
16
 
17
18
19
 
20
Detlefs, D. L., Leino, K. R. M., and Nelson, C. G. 1998. Wrestling with rep exposure. Research rep. 156, DEC Systems Research Center.
21
 
22
 
23
Flanagan, C. 2004. Verifying commit-atomicity using model-checking. In Proceedings of the International SPIN Workshop on Model Checking of Software.
 
24
 
25
26
27
 
28
Flanagan, C. and Freund, S. N. 2004b. Type inference against races. In Proceedings of the Static Analysis Symposium. 116--132.
 
29
Flanagan, C. and Freund, S. N. 2005. Automatic synchronization correction. In Proceedings of the Workshop on Synchronization and Concurrency in Object-Oriented Languages.
30
 
31
32
 
33
Flanagan, C. and Qadeer, S. 2003a. Transactions for software model checking. In Proceedings of the Workshop on Software Model Checking.
34
35
36
 
37
Freund, S. N. and Qadeer, S. 2004. Checking concise specifications for multithreaded software. J. Object Tech. 3, 6, 81--101.
 
38
 
39
 
40
41
 
42
Haack, C. and Wells, J. B. 2003. Type error slicing in implicitly typed higher-order languages. In Proceedings of the European Symposium on Programming. 284--301.
43
 
44
Hatcliff, J., Robby, and Dwyer, M. B. 2004. Verifying atomicity specifications for concurrent object-oriented software using model-checking. In Proceedings of the International Conference on Verification, Model Checking and Abstract Interpretation. 175--190.
45
 
46
Hicks, M., Foster, J. S., and Pratikakis, P. 2006. Inferring locking for atomic sections. In Proceedings of the Workshop on Languages, Compilers, and Hardware Support for Transactional Computing.
47
 
48
Hoare, C. A. R. 1972. Towards a theory of parallel programming. In Operating Systems Techniques. A.P.I.C. Studies in Data Processing, vol. 9. 61--71.
 
49
Java Grande Forum. 2003. Java Grande benchmark suite. http://www.javagrande.org/.
 
50
JavaSoft. 2005. Java Developers Kit, version 1.4.0. http://java.sun.com.
51
 
52
Lamport, L. and Schneider, F. B. 1989. Pretending atomicity. Research rep. 44, DEC Systems Research Center.
 
53
Lea, D. 2004. The util.concurrent package, release 1.3.4. http://gee.cs.oswego.edu/dl/.
54
55
56
57
58
59
 
60
61
62
 
63
64
65
66
67
68
69
70
 
71
SPEC. 2000. Standard Performance Evaluation Corporation JBB2000 Benchmark. Available from http://www.spec.org/osg/jbb2000/.
 
72
Sterling, N. 1993. Warlock: A static data race analysis tool. In Proceedings of the USENIX Winter Technical Conference. 97--106.
 
73
Stoller, S. 2006. Personal communication.
 
74
 
75
Talpin, J.-P. and Jouvelot, P. 1992. Polymorphic type, region and effect inference. J. Funct. Program. 2, 3, 245--271.
76
77
78
79
80
 
81
Wang, L. and Stoller, S. D. 2003. Runtime analysis for atomicity. In Proceedings of the Workshop on Runtime Verification.
 
82
 
83
Welc, A., Jagannathan, S., and Hosking, A. L. 2004. Transactional monitors for concurrent objects. In Proceedings of the European Conference on Object-Oriented Programming. 519--542.
 
84
Yang, J., Michaelson, G., Trinder, P., and Wells, J. B. 2000. Improved type error reporting. In Proceedings of the International Workshop on Implementation of Functional Languages. 71--86.

Collaborative Colleagues:
Cormac Flanagan: colleagues
Stephen N. Freund: colleagues
Marina Lifshin: colleagues
Shaz Qadeer: colleagues