Structural Lock Correlation with Ownership Types

Concurrent object-oriented programming languages coordinate conflicting memory accesses through locking, which relies on programmer discipline and suffers from a lack of modularity and compile-time support. Programmers typically work with large libraries of code whose locking behaviours are not formally and precisely specified; thus understanding and writing concurrent programs is notoriously difficult and error-prone. This paper proposes structural lock correlation, a new model for establishing structural connections between locks and the memory locations they protect, in an ownership-based type and effect system. Structural lock correlation enables modular specification of locking. It offers a compiler-checkable lock abstraction with an enforceable contract at interface boundaries, leading to improved safety, understandability and composability of concurrent program components.

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

[2]  Peter M Uller,et al.  Universes: a type system for controlling representation exposure , 1999 .

[3]  Yi Lu,et al.  A Type and Effect System for Determinism in Multithreaded Programs , 2012, ESOP.

[4]  Yi Lu,et al.  On Ownership and Accessibility , 2006, ECOOP.

[5]  Jeffrey Overbey,et al.  A type and effect system for deterministic parallel Java , 2009, OOPSLA 2009.

[6]  Yi Lu,et al.  Validity Invariants and Effects , 2007, ECOOP.

[7]  Sophia Drossopoulou,et al.  Multiple ownership , 2007, OOPSLA.

[8]  Yi Lu,et al.  Ownership Types for Object Synchronisation , 2012, APLAS.

[9]  Martin C. Rinard,et al.  ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), November 2002 Ownership Types for Safe Programming: Preventing Data Races and Deadlocks , 2022 .

[10]  Yuanyuan Zhou,et al.  Learning from mistakes: a comprehensive study on real world concurrency bug characteristics , 2008, ASPLOS.

[11]  Alexander Aiken,et al.  Conditional must not aliasing for static race detection , 2007, POPL '07.

[12]  Martin C. Rinard,et al.  A parameterized type system for race-free Java programs , 2001, OOPSLA '01.

[13]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[14]  Doug Lea,et al.  A Java fork/join framework , 2000, JAVA '00.

[15]  Jan Vitek,et al.  Flexible Alias Protection , 1998, ECOOP.

[16]  Jeffrey S. Foster,et al.  LOCKSMITH: context-sensitive correlation analysis for race detection , 2006, PLDI '06.

[17]  Martin Odersky,et al.  A Statically Safe Alternative to Virtual Types , 1998, ECOOP.

[18]  Sophia Drossopoulou,et al.  Ownership, encapsulation and the disjointness of type and effect , 2002, OOPSLA '02.

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

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

[21]  Aaron Greenhouse,et al.  Assuring and evolving concurrent programs: annotations and policy , 2002, Proceedings of the 24th International Conference on Software Engineering. ICSE 2002.

[22]  Yi Lu,et al.  Protecting representation with effect encapsulation , 2006, POPL '06.

[23]  David Gerard Clarke,et al.  Object ownership and containment , 2003 .

[24]  Dave Thomas ECOOP 2006 - Object-Oriented Programming, 20th European Conference, Nantes, France, July 3-7, 2006, Proceedings , 2006, ECOOP.

[25]  Alexander Aiken,et al.  Effective static race detection for Java , 2006, PLDI '06.

[26]  Erik Ernst,et al.  ECOOP 2007 - Object-Oriented Programming, 21st European Conference, Berlin, Germany, July 30 - August 3, 2007, Proceedings , 2007, ECOOP.