ABSTRACT
In previous work on SafeJava we presented a type system extension to the Java source language that statically prevents data races and deadlocks in multithreaded programs. SafeJava is expressive enough to support common programming patterns, its type checking is fast and scalable, and it requires little programming overhead. SafeJava thus offers a promising approach for making multithreaded programs more reliable. This paper presents a corresponding type system extension for the Java virtual machine language (JVML). We call the resulting language SafeJVML. Well-typed SafeJVML programs are guaranteed to be free of data races and deadlocks. Designing a corresponding type system for JVML is important because most Java code is shipped in the JVML format. Designing acorresponding type system for JVML is nontrivial because of important differences between Java and JVML. In particular, the absence of block structure in JVML programs and the fact that they do not use named local variables the way Java programs do make the type systems for Java and JVML significantly different. For example, verifying absence of races and deadlocks in JVML programs requires performing an alias analysis, something that was not necessary for verifying absence of races and deadlocks in Java programs. This paper presents static and dynamic semantics for Safe JVML. It also includes a proof that the SafeJVML type system is sound and that it prevents data races and deadlocks. To the best of our knowledge, this is the first type system for JVML that statically ensures absence of synchronization errors.
- Jonathan Aldrich, Valentin Kostadinov, and Craig Chambers. Alias annotations for program understanding. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), November 2002. Google Scholar
Digital Library
- David F. Bacon, Robert E. Strom, and Ashis Tarafdar. Guava: A dialect of Java without data races. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), October 2000. Google Scholar
Digital Library
- Anindya Banerjee and David A. Naumann. Representation independence, confinement, and access control. In Principles of Programming Languages (POPL), January 2002. Google Scholar
Digital Library
- Peter Bertelsen. Dynamic semantics of Java bytecode. In Workshop on Principles of Abstract Machines, 1998.Google Scholar
- Chandrasekhar Boyapati. SafeJava: A unified type system for safe programming. Ph.D. thesis, Massachusetts Institute of Technology, February 2004. Google Scholar
Digital Library
- Chandrasekhar Boyapati, Robert Lee, and Martin Rinard. Ownership types for safe programming: Preventing data races and deadlocks. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), November 2002. Google Scholar
Digital Library
- Chandrasekhar Boyapati, Barbara Liskov, and Liuba Shrira. Ownership types for object encapsulation. In Principles of Programming Languages (POPL), January 2003. Google Scholar
Digital Library
- Chandrasekhar Boyapati, Barbara Liskov, Liuba Shrira, Chuang-Hue Moh, and Steven Richman. Lazy modular upgrades in persistent object stores. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), October 2003. Google Scholar
Digital Library
- Chandrasekhar Boyapati and Martin Rinard. A parameterized type system for race-free Java programs. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), October 2001. Google Scholar
Digital Library
- Chandrasekhar Boyapati, Alexandru Salcianu, William Beebee, Jr., and Martin Rinard. Ownership types for safe region-based memory management in Real-Time Java. In Programming Language Design and Implementation (PLDI), June 2003. Google Scholar
Digital Library
- Robert O'Callahan. A simple, comprehensive type system for Java bytecode subroutines. In Principles of Programming Languages (POPL), 1999. Google Scholar
Digital Library
- David G. Clarke and Sophia Drossopoulou. Ownership, encapsulation and disjointness of type and effect. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), November 2002. Google Scholar
Digital Library
- David G. Clarke, John M. Potter, and James Noble. Ownership types for flexible alias protection. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), October 1998. Google Scholar
Digital Library
- Cormac Flanagan and Martin Abadi. Object types against races. In Conference on Concurrent Theory (CONCUR), August 1999.Google Scholar
Digital Library
- Cormac Flanagan and Martin Abadi. Types for safe locking. In European Symposium on Programming (ESOP), March 1999.Google Scholar
Digital Library
- Cormac Flanagan and Stephen N. Freund. Type-based race detection for Java. In Programming Language Design and Implementation (PLDI), June 2000. Google Scholar
Digital Library
- Matthew Flatt, Shriram Krishnamurthi, and Matthias Felleisen. Classes and mixins. In Principles of Programming Languages (POPL), January 1998. Google Scholar
Digital Library
- Stephen N. Freund. Type systems for object-oriented intermediate languages. Ph.D. thesis, Stanford University, 2000. Google Scholar
Digital Library
- Stephen N. Freund and John C. Mitchell. A type system for object initialization in the Java bytecode language. In ACM Transactions on Programming Languages and Systems, November 1999. Google Scholar
Digital Library
- Stephen N. Freund and John C. Mitchell. A formal framework for Java bytecode language and verifier. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), October 1998. Google Scholar
Digital Library
- James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley, 1996. Google Scholar
Digital Library
- Dan Grossman. Type-safe multithreading in Cyclone. In Workshop on Types in Language Design and Implementation (TLDI), January 2003. Google Scholar
Digital Library
- Futoshi Iwama and Naoki Kobayashi. A new type system for JVM lock primitives. In ASIAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation(ASIA-PEPM), May 2002. Google Scholar
Digital Library
- Gerwin Klein and Martin Wildmoser. Verified bytecode subroutines. Journal of Automated Reasoning, 2003. Google Scholar
Digital Library
- Neel Krishnaswamy and Jonathan Aldrich. Permission based ownership: Encapsulating state in higher order typed languages. In Programming Language Design and Implementation (PLDI), June 2005. Google Scholar
Digital Library
- Cosimo Laneve and Gaetano Bigliardi. A type system for JVM threads. In The Third ACM SIGPLAN Workshop on Types in Compilation (TIC), September 2000.Google Scholar
- Tim Lindholm and Frank Yellin. The Java Virtual Machine Specification. Addison-Wesley, 1997. Google Scholar
Digital Library
- William Pugh. Fixing the Java memory model. In ACM Java Grande Conference, June 1999. Google Scholar
Digital Library
- Zhenyu Qian. A formal specification of Java virtual machine instructions for objects, methods and subrountines. In Formal Syntax and Semantics of Java, pages 271--312, 1999.Google Scholar
Digital Library
- Raymie Stata and Martin Abadi. A type system for Java bytecode subroutines. In Principles of Programming Languages (POPL), January 1998. Google Scholar
Digital Library
Index Terms
A type system for preventing data races and deadlocks in the java virtual machine language: 1
Recommendations
Efficient data race and deadlock prevention in concurrent object-oriented programs
OOPSLA '04: Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applicationsThe main goal of this PhD thesis is to propose and implement a methodology for the construction of programs based on the SCOOP model, and for modular reasoning about their correctness and liveness properties. In particular, the set of correctness rules ...
A type system for preventing data races and deadlocks in the java virtual machine language: 1
Proceedings of the 2007 LCTES conferenceIn previous work on SafeJava we presented a type system extension to the Java source language that statically prevents data races and deadlocks in multithreaded programs. SafeJava is expressive enough to support common programming patterns, its type ...
Ownership types for safe programming: preventing data races and deadlocks
OOPSLA '02: Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsThis 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 ...







Comments