A parameterized type system for race-free Java programs

This paper presents a new static type system for multithreaded programs; any well-typed program in our system is free of data races. Our type system is significantly more expressive than previous such type systems. In particular, our system lets programmers write generic code to implement a class, then create different objects of the same class that have different objects of the same class that have different protection mechanisms. This flexibility enables programmers to reduce the number of unnecessary synchronizationoperations in a program without risking data races. We also support default types which reduce the burden of writing extra type annotations. Our experience indicates that our system provides a promising approach to make multithreaded programs more reliable and efficient

[1]  Erik Ruf,et al.  Effective synchronization removal for Java , 2000, PLDI '00.

[2]  David F. Bacon,et al.  Guava: a dialect of Java without data races , 2000, OOPSLA '00.

[3]  P. Brinch-Hansen,et al.  The programming language Concurrent Pascal , 1975 .

[4]  Stephen N. Freund,et al.  Adding type parameterization to the Java language , 1997, OOPSLA '97.

[5]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[6]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[7]  Martín Abadi,et al.  Types for Safe Locking , 1999, ESOP.

[8]  Emin Gün Sirer,et al.  Static Analyses for Eliminating Unnecessary Synchronization from Java Programs , 1999, SAS.

[9]  Robert Cartwright,et al.  Compatible genericity with run-time types for the Java programming language , 1998, OOPSLA '98.

[10]  John Tang Boyland,et al.  Capabilities for Sharing: A Generalisation of Uniqueness and Read-Only , 2001, ECOOP.

[11]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .

[12]  David K. Gifford,et al.  Polymorphic effect systems , 1988, POPL '88.

[13]  Bruno Blanchet,et al.  Escape analysis for object-oriented languages: application to Java , 1999, OOPSLA '99.

[14]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[15]  Anoop Gupta,et al.  The SPLASH-2 programs: characterization and methodological considerations , 1995, ISCA.

[16]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[17]  Martín Abadi,et al.  Object Types against Races , 1999, CONCUR.

[18]  Robert DeLine,et al.  Enforcing high-level protocols in low-level software , 2001, PLDI '01.

[19]  Naftaly H. Minsky Towards Alias-Free Pointers , 1996, ECOOP.

[20]  Jong-Deok Choi,et al.  Escape analysis for Java , 1999, OOPSLA '99.

[21]  Matthias Felleisen,et al.  Classes and mixins , 1998, POPL '98.

[22]  Patrick Lincoln,et al.  Linear logic , 1992, SIGA.

[23]  Stephen N. Freund,et al.  Type-based race detection for Java , 2000, PLDI '00.

[24]  Martin C. Rinard,et al.  Analysis of Multithreaded Programs , 2001, SAS.

[25]  Nicholas Sterling,et al.  WARLOCK - A Static Data Race Analysis Tool , 1993, USENIX Winter.

[26]  Andrew C. Myers,et al.  Subtypes vs. where clauses: constraining parametric polymorphism , 1995, OOPSLA.

[27]  K. Rustan M. Leino,et al.  Checking Java Programs via Guarded Commands , 1999, ECOOP Workshops.

[28]  Martin Odersky,et al.  Making the future safe for the past: adding genericity to the Java programming language , 1998, OOPSLA '98.

[29]  Charles E. Leiserson,et al.  Detecting data races in Cilk programs that use locks , 1998, SPAA '98.

[30]  Andrew D. Birrell,et al.  An Introduction to Programming with Threads , 1996 .

[31]  William Pugh Fixing the Java memory model , 1999, JAVA '99.

[32]  K. Rustan M. Leino,et al.  Extended static checking , 1998, PROCOMET.

[33]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multi-threaded programs , 1997, TOCS.

[34]  James Noble,et al.  Simple Ownership Types for Object Containment , 2001, ECOOP.

[35]  Urs Hölzle,et al.  Removing unnecessary synchronization in Java , 1999, OOPSLA '99.

[36]  Edith Schonberg,et al.  Detecting access anomalies in programs with critical sections , 1991, PADD '91.

[37]  Andrew C. Myers,et al.  Parameterized types for Java , 1997, POPL '97.

[38]  Martin C. Rinard,et al.  Compositional pointer and escape analysis for Java programs , 1999, OOPSLA '99.