ACM Home Page
Please provide us with feedback. Feedback
Ownership types for safe programming: preventing data races and deadlocks
Full text PdfPdf (460 KB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications table of contents
Seattle, Washington, USA
SESSION: Static Analysis table of contents
Pages: 211 - 230  
Year of Publication: 2002
ISBN:1-58113-471-1
Also published in ...
Authors
Chandrasekhar Boyapati  Massachusetts Institute of Technology, Cambridge, MA
Robert Lee  Massachusetts Institute of Technology, Cambridge, MA
Martin Rinard  Massachusetts Institute of Technology, Cambridge, MA
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 14,   Downloads (12 Months): 105,   Citation Count: 71
Additional Information:

abstract   references   cited by   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/582419.582440
What is a DOI?

ABSTRACT

This paper presents a new static type system for multithreaded programs; well-typed programs in our system are guaranteed to be free of data races and deadlocks. Our type system allows programmers to partition the locks into a fixed number of equivalence classes and specify a partial order among the equivalence classes. The type checker then statically verifies that whenever a thread holds more than one lock, the thread acquires the locks in the descending order.Our system also allows programmers to use recursive tree-based data structures to describe the partial order. For example, programmers can specify that nodes in a tree must be locked in the tree order. Our system allows mutations to the data structure that change the partial order at runtime. The type checker statically verifies that the mutations do not introduce cycles in the partial order, and that the changing of the partial order does not lead to deadlocks. We do not know of any other sound static system for preventing deadlocks that allows changes to the partial order at runtime.Our system uses a variant of ownership types to prevent data races and deadlocks. Ownership types provide a statically enforceable way of specifying object encapsulation. Ownership types are useful for preventing data races and deadlocks because the lock that protects an object can also protect its encapsulated objects. This paper describes how to use our type system to statically enforce object encapsulation as well as prevent data races and deadlocks. The paper also contains a detailed discussion of different ownership type systems and the encapsulation guarantees they provide.


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
 
3
P. S. Almeida. Balloon types: Controlling sharing of state in data types. In European Conference for Object-Oriented Programming (ECOOP), June 1997.
4
 
5
C. Boyapati, R. Lee, and M. Rinard. Safe runtime downcasts with ownership types. Technical Report TR-853, MIT Laboratory for Computer Science, June 2002.
 
6
C. Boyapati, B. Liskov, and L. Shrira. Ownership types and safe lazy upgrades in object oriented databases. Technical Report TR-858, MIT Laboratory for Computer Science, July 2002.
7
8
 
9
P. Brinch-Hansen. The programming language Concurrent Pascal. In IEEE Transactions on Software Engineering SE-1(2), June 1975.
10
11
12
 
13
14
 
15
16
17
18
 
19
D. L. Detlefs, K. R. M. Leino, G. Nelson, and J. B. Saxe. Extended static checking. Research Report 159, Compaq Systems Research Center, December 1998.
20
21
22
23
 
24
25
26
27
28
 
29
J. A. Korty. Sema: A lint-like tool for analyzing semaphore usage in a multithreaded UNIX kernel. In USENIX Winter Technical Conference, January 1989.
30
31
32
 
33
K. R. M. Leino and G. Nelson. Data abstraction and information hiding. Research Report 160, Compaq Systems Research Center, November 2000.
34
 
35
36
37
 
38
39
 
40
P. Muller and A. Poetzsch-Heffter. Universes: A type system for controlling representation exposure. In A. Poetzsch-Heffter and J. Meyer, editors, Programming Languages and Fundamentals of Programming. 1999.
41
42
43
 
44
N. Sterling. Warlock: A static data race analysis tool. In USENIX Winter Technical Conference, January 1993.
45
46
 
47
P. Wadler. Linear types can change the world. In M. Broy and C. Jones, editors, Programming Concepts and Methods. 1990.
 
48

CITED BY  71

Collaborative Colleagues:
Chandrasekhar Boyapati: colleagues
Robert Lee: colleagues
Martin Rinard: colleagues